@mycelish/cli 0.2.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/commands/disable.test.js +0 -20
  2. package/dist/commands/disable.test.js.map +1 -1
  3. package/dist/commands/doctor.d.ts.map +1 -1
  4. package/dist/commands/doctor.js +65 -0
  5. package/dist/commands/doctor.js.map +1 -1
  6. package/dist/commands/enable.test.js +0 -18
  7. package/dist/commands/enable.test.js.map +1 -1
  8. package/dist/commands/health-checks/runner.d.ts.map +1 -1
  9. package/dist/commands/health-checks/runner.js +23 -1
  10. package/dist/commands/health-checks/runner.js.map +1 -1
  11. package/dist/commands/marketplace.d.ts.map +1 -1
  12. package/dist/commands/marketplace.js +34 -1
  13. package/dist/commands/marketplace.js.map +1 -1
  14. package/dist/commands/remote.d.ts.map +1 -1
  15. package/dist/commands/remote.js +17 -0
  16. package/dist/commands/remote.js.map +1 -1
  17. package/dist/commands/remove.d.ts +16 -7
  18. package/dist/commands/remove.d.ts.map +1 -1
  19. package/dist/commands/remove.js +234 -30
  20. package/dist/commands/remove.js.map +1 -1
  21. package/dist/commands/remove.test.js +18 -0
  22. package/dist/commands/remove.test.js.map +1 -1
  23. package/dist/commands/status.test.js +6 -1
  24. package/dist/commands/status.test.js.map +1 -1
  25. package/dist/commands/sync.d.ts.map +1 -1
  26. package/dist/commands/sync.js +20 -1
  27. package/dist/commands/sync.js.map +1 -1
  28. package/dist/core/auto-adapter.d.ts.map +1 -1
  29. package/dist/core/auto-adapter.js +2 -0
  30. package/dist/core/auto-adapter.js.map +1 -1
  31. package/dist/core/config-merger.d.ts.map +1 -1
  32. package/dist/core/config-merger.js +39 -6
  33. package/dist/core/config-merger.js.map +1 -1
  34. package/dist/core/config-merger.test.js +28 -0
  35. package/dist/core/config-merger.test.js.map +1 -1
  36. package/dist/core/content-hash.d.ts +3 -0
  37. package/dist/core/content-hash.d.ts.map +1 -0
  38. package/dist/core/content-hash.js +11 -0
  39. package/dist/core/content-hash.js.map +1 -0
  40. package/dist/core/env-template.d.ts +8 -0
  41. package/dist/core/env-template.d.ts.map +1 -1
  42. package/dist/core/env-template.js +67 -1
  43. package/dist/core/env-template.js.map +1 -1
  44. package/dist/core/env-template.test.js +100 -1
  45. package/dist/core/env-template.test.js.map +1 -1
  46. package/dist/core/manifest-migrator.d.ts +0 -1
  47. package/dist/core/manifest-migrator.d.ts.map +1 -1
  48. package/dist/core/manifest-migrator.js +1 -1
  49. package/dist/core/manifest-migrator.js.map +1 -1
  50. package/dist/core/manifest-state.d.ts +8 -2
  51. package/dist/core/manifest-state.d.ts.map +1 -1
  52. package/dist/core/manifest-state.js +32 -1
  53. package/dist/core/manifest-state.js.map +1 -1
  54. package/dist/core/manifest-state.test.js +3 -7
  55. package/dist/core/manifest-state.test.js.map +1 -1
  56. package/dist/core/marketplace-cache.d.ts +12 -0
  57. package/dist/core/marketplace-cache.d.ts.map +1 -0
  58. package/dist/core/marketplace-cache.js +127 -0
  59. package/dist/core/marketplace-cache.js.map +1 -0
  60. package/dist/core/marketplace-cache.test.d.ts +2 -0
  61. package/dist/core/marketplace-cache.test.d.ts.map +1 -0
  62. package/dist/core/marketplace-cache.test.js +122 -0
  63. package/dist/core/marketplace-cache.test.js.map +1 -0
  64. package/dist/core/marketplace-constants.d.ts +14 -0
  65. package/dist/core/marketplace-constants.d.ts.map +1 -0
  66. package/dist/core/marketplace-constants.js +14 -0
  67. package/dist/core/marketplace-constants.js.map +1 -0
  68. package/dist/core/marketplace-deduplicator.d.ts +13 -0
  69. package/dist/core/marketplace-deduplicator.d.ts.map +1 -0
  70. package/dist/core/marketplace-deduplicator.js +84 -0
  71. package/dist/core/marketplace-deduplicator.js.map +1 -0
  72. package/dist/core/marketplace-deduplicator.test.d.ts +2 -0
  73. package/dist/core/marketplace-deduplicator.test.d.ts.map +1 -0
  74. package/dist/core/marketplace-deduplicator.test.js +70 -0
  75. package/dist/core/marketplace-deduplicator.test.js.map +1 -0
  76. package/dist/core/marketplace-registry.d.ts.map +1 -1
  77. package/dist/core/marketplace-registry.js +10 -16
  78. package/dist/core/marketplace-registry.js.map +1 -1
  79. package/dist/core/marketplace-registry.test.js +5 -4
  80. package/dist/core/marketplace-registry.test.js.map +1 -1
  81. package/dist/core/marketplace-sources.d.ts +68 -15
  82. package/dist/core/marketplace-sources.d.ts.map +1 -1
  83. package/dist/core/marketplace-sources.js +415 -91
  84. package/dist/core/marketplace-sources.js.map +1 -1
  85. package/dist/core/marketplace-sources.test.d.ts +2 -0
  86. package/dist/core/marketplace-sources.test.d.ts.map +1 -0
  87. package/dist/core/marketplace-sources.test.js +240 -0
  88. package/dist/core/marketplace-sources.test.js.map +1 -0
  89. package/dist/core/marketplace.d.ts +22 -5
  90. package/dist/core/marketplace.d.ts.map +1 -1
  91. package/dist/core/marketplace.js +371 -120
  92. package/dist/core/marketplace.js.map +1 -1
  93. package/dist/core/marketplace.test.js +90 -39
  94. package/dist/core/marketplace.test.js.map +1 -1
  95. package/dist/core/migrator/executor.d.ts.map +1 -1
  96. package/dist/core/migrator/executor.js +11 -2
  97. package/dist/core/migrator/executor.js.map +1 -1
  98. package/dist/core/migrator/manifest.d.ts +10 -1
  99. package/dist/core/migrator/manifest.d.ts.map +1 -1
  100. package/dist/core/migrator/manifest.js +12 -2
  101. package/dist/core/migrator/manifest.js.map +1 -1
  102. package/dist/core/plugin-scanner.test.js +0 -4
  103. package/dist/core/plugin-scanner.test.js.map +1 -1
  104. package/dist/core/plugin-state.d.ts.map +1 -1
  105. package/dist/core/plugin-state.js +50 -18
  106. package/dist/core/plugin-state.js.map +1 -1
  107. package/dist/core/plugin-takeover.d.ts +15 -0
  108. package/dist/core/plugin-takeover.d.ts.map +1 -1
  109. package/dist/core/plugin-takeover.js +163 -3
  110. package/dist/core/plugin-takeover.js.map +1 -1
  111. package/dist/core/presets.test.js +0 -3
  112. package/dist/core/presets.test.js.map +1 -1
  113. package/dist/core/secret-detector.d.ts +20 -0
  114. package/dist/core/secret-detector.d.ts.map +1 -0
  115. package/dist/core/secret-detector.js +83 -0
  116. package/dist/core/secret-detector.js.map +1 -0
  117. package/dist/core/secret-detector.test.d.ts +2 -0
  118. package/dist/core/secret-detector.test.d.ts.map +1 -0
  119. package/dist/core/secret-detector.test.js +91 -0
  120. package/dist/core/secret-detector.test.js.map +1 -0
  121. package/dist/core/security-scanner.d.ts +24 -0
  122. package/dist/core/security-scanner.d.ts.map +1 -0
  123. package/dist/core/security-scanner.js +182 -0
  124. package/dist/core/security-scanner.js.map +1 -0
  125. package/dist/core/security-scanner.test.d.ts +2 -0
  126. package/dist/core/security-scanner.test.d.ts.map +1 -0
  127. package/dist/core/security-scanner.test.js +120 -0
  128. package/dist/core/security-scanner.test.js.map +1 -0
  129. package/dist/core/snapshot.d.ts.map +1 -1
  130. package/dist/core/snapshot.js +0 -6
  131. package/dist/core/snapshot.js.map +1 -1
  132. package/dist/core/snapshot.test.js +0 -4
  133. package/dist/core/snapshot.test.js.map +1 -1
  134. package/dist/core/state-verifier.d.ts.map +1 -1
  135. package/dist/core/state-verifier.js +0 -1
  136. package/dist/core/state-verifier.js.map +1 -1
  137. package/dist/dashboard/assets/_baseUniq-CaVE7eUV.js +1 -0
  138. package/dist/dashboard/assets/arc-CR894Erh.js +1 -0
  139. package/dist/dashboard/assets/architectureDiagram-VXUJARFQ-vuLSFK92.js +36 -0
  140. package/dist/dashboard/assets/blockDiagram-VD42YOAC-CjXwNwFV.js +122 -0
  141. package/dist/dashboard/assets/c4Diagram-YG6GDRKO-BUk0KT3V.js +10 -0
  142. package/dist/dashboard/assets/channel-BzUEK7Iv.js +1 -0
  143. package/dist/dashboard/assets/chunk-4BX2VUAB-BCCD1RD0.js +1 -0
  144. package/dist/dashboard/assets/chunk-55IACEB6-7M5H4j_M.js +1 -0
  145. package/dist/dashboard/assets/chunk-B4BG7PRW-CkuZp9sw.js +165 -0
  146. package/dist/dashboard/assets/chunk-DI55MBZ5-aoWuqaxJ.js +220 -0
  147. package/dist/dashboard/assets/chunk-FMBD7UC4-zGR2QW6c.js +15 -0
  148. package/dist/dashboard/assets/chunk-QN33PNHL-Lj8Zu7hm.js +1 -0
  149. package/dist/dashboard/assets/chunk-QZHKN3VN-JLEIDbAK.js +1 -0
  150. package/dist/dashboard/assets/chunk-TZMSLE5B-BB4GoxaV.js +1 -0
  151. package/dist/dashboard/assets/classDiagram-2ON5EDUG-CMpOlMXG.js +1 -0
  152. package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-CMpOlMXG.js +1 -0
  153. package/dist/dashboard/assets/clone-CHi7kZ5h.js +1 -0
  154. package/dist/dashboard/assets/cose-bilkent-S5V4N54A-DLEOmN1S.js +1 -0
  155. package/dist/dashboard/assets/cytoscape.esm-5J0xJHOV.js +321 -0
  156. package/dist/dashboard/assets/dagre-6UL2VRFP-BKeNwVe7.js +4 -0
  157. package/dist/dashboard/assets/defaultLocale-DX6XiGOO.js +1 -0
  158. package/dist/dashboard/assets/diagram-PSM6KHXK-BwTCZWHJ.js +24 -0
  159. package/dist/dashboard/assets/diagram-QEK2KX5R-Bg109hRA.js +43 -0
  160. package/dist/dashboard/assets/diagram-S2PKOQOG-CjzZEN97.js +24 -0
  161. package/dist/dashboard/assets/erDiagram-Q2GNP2WA-C_o1kY7B.js +60 -0
  162. package/dist/dashboard/assets/flowDiagram-NV44I4VS-CGcmMJTD.js +162 -0
  163. package/dist/dashboard/assets/ganttDiagram-JELNMOA3-Dh1Atgfm.js +267 -0
  164. package/dist/dashboard/assets/gitGraphDiagram-NY62KEGX-BkHRiPWO.js +65 -0
  165. package/dist/dashboard/assets/graph-gTAnu0gr.js +1 -0
  166. package/dist/dashboard/assets/index-DFP3ko3G.css +1 -0
  167. package/dist/dashboard/assets/index-Dr2pvJml.js +189 -0
  168. package/dist/dashboard/assets/infoDiagram-WHAUD3N6-CdqkT51i.js +2 -0
  169. package/dist/dashboard/assets/init-Gi6I4Gst.js +1 -0
  170. package/dist/dashboard/assets/journeyDiagram-XKPGCS4Q-D6H-T7IF.js +139 -0
  171. package/dist/dashboard/assets/kanban-definition-3W4ZIXB7-CdtlB9dE.js +89 -0
  172. package/dist/dashboard/assets/katex-DhXJpUyf.js +261 -0
  173. package/dist/dashboard/assets/layout-5P3G0oCF.js +1 -0
  174. package/dist/dashboard/assets/linear-BEr0iAwY.js +1 -0
  175. package/dist/dashboard/assets/mermaid.core-DY8Lk9ir.js +250 -0
  176. package/dist/dashboard/assets/min-rFBMICyx.js +1 -0
  177. package/dist/dashboard/assets/mindmap-definition-VGOIOE7T-BBgtd54T.js +68 -0
  178. package/dist/dashboard/assets/ordinal-Cboi1Yqb.js +1 -0
  179. package/dist/dashboard/assets/pieDiagram-ADFJNKIX-fgAzUnCv.js +30 -0
  180. package/dist/dashboard/assets/quadrantDiagram-AYHSOK5B-BtBFRMty.js +7 -0
  181. package/dist/dashboard/assets/requirementDiagram-UZGBJVZJ-Dsb2J8qM.js +64 -0
  182. package/dist/dashboard/assets/sankeyDiagram-TZEHDZUN-DgeXoGZy.js +10 -0
  183. package/dist/dashboard/assets/sequenceDiagram-WL72ISMW-CW8ApGYu.js +145 -0
  184. package/dist/dashboard/assets/stateDiagram-FKZM4ZOC-CFKNRDGr.js +1 -0
  185. package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-B3pJgIRu.js +1 -0
  186. package/dist/dashboard/assets/timeline-definition-IT6M3QCI-DeE7K_Tn.js +61 -0
  187. package/dist/dashboard/assets/treemap-KMMF4GRG-DgksShPO.js +128 -0
  188. package/dist/dashboard/assets/xychartDiagram-PRI3JC2R-C8fn_Zm6.js +7 -0
  189. package/dist/dashboard/index.html +2 -2
  190. package/dist/routes/marketplace.d.ts.map +1 -1
  191. package/dist/routes/marketplace.js +179 -1
  192. package/dist/routes/marketplace.js.map +1 -1
  193. package/dist/routes/remove.d.ts.map +1 -1
  194. package/dist/routes/remove.js +4 -3
  195. package/dist/routes/remove.js.map +1 -1
  196. package/dist/routes/state.d.ts.map +1 -1
  197. package/dist/routes/state.js +63 -11
  198. package/dist/routes/state.js.map +1 -1
  199. package/package.json +2 -2
  200. package/dist/dashboard/assets/index-B15EvyT1.css +0 -1
  201. package/dist/dashboard/assets/index-Bt5n5lhF.js +0 -150
@@ -0,0 +1,250 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-6UL2VRFP-BKeNwVe7.js","assets/graph-gTAnu0gr.js","assets/_baseUniq-CaVE7eUV.js","assets/layout-5P3G0oCF.js","assets/min-rFBMICyx.js","assets/clone-CHi7kZ5h.js","assets/index-Dr2pvJml.js","assets/index-DFP3ko3G.css","assets/cose-bilkent-S5V4N54A-DLEOmN1S.js","assets/cytoscape.esm-5J0xJHOV.js","assets/c4Diagram-YG6GDRKO-BUk0KT3V.js","assets/chunk-TZMSLE5B-BB4GoxaV.js","assets/flowDiagram-NV44I4VS-CGcmMJTD.js","assets/chunk-FMBD7UC4-zGR2QW6c.js","assets/chunk-55IACEB6-7M5H4j_M.js","assets/chunk-QN33PNHL-Lj8Zu7hm.js","assets/channel-BzUEK7Iv.js","assets/erDiagram-Q2GNP2WA-C_o1kY7B.js","assets/gitGraphDiagram-NY62KEGX-BkHRiPWO.js","assets/chunk-4BX2VUAB-BCCD1RD0.js","assets/chunk-QZHKN3VN-JLEIDbAK.js","assets/treemap-KMMF4GRG-DgksShPO.js","assets/ganttDiagram-JELNMOA3-Dh1Atgfm.js","assets/linear-BEr0iAwY.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-WHAUD3N6-CdqkT51i.js","assets/pieDiagram-ADFJNKIX-fgAzUnCv.js","assets/arc-CR894Erh.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-BtBFRMty.js","assets/xychartDiagram-PRI3JC2R-C8fn_Zm6.js","assets/requirementDiagram-UZGBJVZJ-Dsb2J8qM.js","assets/sequenceDiagram-WL72ISMW-CW8ApGYu.js","assets/classDiagram-2ON5EDUG-CMpOlMXG.js","assets/chunk-B4BG7PRW-CkuZp9sw.js","assets/classDiagram-v2-WZHVMYZB-CMpOlMXG.js","assets/stateDiagram-FKZM4ZOC-CFKNRDGr.js","assets/chunk-DI55MBZ5-aoWuqaxJ.js","assets/stateDiagram-v2-4FDKWEC3-B3pJgIRu.js","assets/journeyDiagram-XKPGCS4Q-D6H-T7IF.js","assets/timeline-definition-IT6M3QCI-DeE7K_Tn.js","assets/mindmap-definition-VGOIOE7T-BBgtd54T.js","assets/kanban-definition-3W4ZIXB7-CdtlB9dE.js","assets/sankeyDiagram-TZEHDZUN-DgeXoGZy.js","assets/diagram-S2PKOQOG-CjzZEN97.js","assets/diagram-QEK2KX5R-Bg109hRA.js","assets/blockDiagram-VD42YOAC-CjXwNwFV.js","assets/architectureDiagram-VXUJARFQ-vuLSFK92.js","assets/diagram-PSM6KHXK-BwTCZWHJ.js"])))=>i.map(i=>d[i]);
2
+ import{g as lg,_ as ft,s as ht}from"./index-Dr2pvJml.js";var Wo={name:"mermaid",version:"11.12.2",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.21",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"}},Vi={exports:{}},cg=Vi.exports,qo;function hg(){return qo||(qo=1,(function(e,t){(function(r,i){e.exports=i()})(cg,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",p="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(B){var A=["th","st","nd","rd"],T=B%100;return"["+B+(A[(T-20)%10]||A[T]||A[0])+"]"}},C=function(B,A,T){var $=String(B);return!$||$.length>=A?B:""+Array(A+1-$.length).join(T)+B},w={s:C,z:function(B){var A=-B.utcOffset(),T=Math.abs(A),$=Math.floor(T/60),M=T%60;return(A<=0?"+":"-")+C($,2,"0")+":"+C(M,2,"0")},m:function B(A,T){if(A.date()<T.date())return-B(T,A);var $=12*(T.year()-A.year())+(T.month()-A.month()),M=A.clone().add($,u),q=T-M<0,V=A.clone().add($+(q?-1:1),u);return+(-($+(T-M)/(q?M-V:V-M))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:p,w:h,d:c,D:g,h:l,m:n,s:o,ms:s,Q:d}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},k="en",L={};L[k]=b;var v="$isDayjsObject",D=function(B){return B instanceof N||!(!B||!B[v])},I=function B(A,T,$){var M;if(!A)return k;if(typeof A=="string"){var q=A.toLowerCase();L[q]&&(M=q),T&&(L[q]=T,M=q);var V=A.split("-");if(!M&&V.length>1)return B(V[0])}else{var K=A.name;L[K]=A,M=K}return!$&&M&&(k=M),M||!$&&k},O=function(B,A){if(D(B))return B.clone();var T=typeof A=="object"?A:{};return T.date=B,T.args=arguments,new N(T)},E=w;E.l=I,E.i=D,E.w=function(B,A){return O(B,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var N=(function(){function B(T){this.$L=I(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[v]=!0}var A=B.prototype;return A.parse=function(T){this.$d=(function($){var M=$.date,q=$.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var V=M.match(y);if(V){var K=V[2]-1||0,J=(V[7]||"0").substring(0,3);return q?new Date(Date.UTC(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)):new Date(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)}}return new Date(M)})(T),this.init()},A.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},A.$utils=function(){return E},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(T,$){var M=O(T);return this.startOf($)<=M&&M<=this.endOf($)},A.isAfter=function(T,$){return O(T)<this.startOf($)},A.isBefore=function(T,$){return this.endOf($)<O(T)},A.$g=function(T,$,M){return E.u(T)?this[$]:this.set(M,T)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(T,$){var M=this,q=!!E.u($)||$,V=E.p(T),K=function(ee,xt){var re=E.w(M.$u?Date.UTC(M.$y,xt,ee):new Date(M.$y,xt,ee),M);return q?re:re.endOf(c)},J=function(ee,xt){return E.w(M.toDate()[ee].apply(M.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(xt)),M)},Z=this.$W,ct=this.$M,st=this.$D,Ct="set"+(this.$u?"UTC":"");switch(V){case p:return q?K(1,0):K(31,11);case u:return q?K(1,ct):K(0,ct+1);case h:var _t=this.$locale().weekStart||0,Nt=(Z<_t?Z+7:Z)-_t;return K(q?st-Nt:st+(6-Nt),ct);case c:case g:return J(Ct+"Hours",0);case l:return J(Ct+"Minutes",1);case n:return J(Ct+"Seconds",2);case o:return J(Ct+"Milliseconds",3);default:return this.clone()}},A.endOf=function(T){return this.startOf(T,!1)},A.$set=function(T,$){var M,q=E.p(T),V="set"+(this.$u?"UTC":""),K=(M={},M[c]=V+"Date",M[g]=V+"Date",M[u]=V+"Month",M[p]=V+"FullYear",M[l]=V+"Hours",M[n]=V+"Minutes",M[o]=V+"Seconds",M[s]=V+"Milliseconds",M)[q],J=q===c?this.$D+($-this.$W):$;if(q===u||q===p){var Z=this.clone().set(g,1);Z.$d[K](J),Z.init(),this.$d=Z.set(g,Math.min(this.$D,Z.daysInMonth())).$d}else K&&this.$d[K](J);return this.init(),this},A.set=function(T,$){return this.clone().$set(T,$)},A.get=function(T){return this[E.p(T)]()},A.add=function(T,$){var M,q=this;T=Number(T);var V=E.p($),K=function(ct){var st=O(q);return E.w(st.date(st.date()+Math.round(ct*T)),q)};if(V===u)return this.set(u,this.$M+T);if(V===p)return this.set(p,this.$y+T);if(V===c)return K(1);if(V===h)return K(7);var J=(M={},M[n]=i,M[l]=a,M[o]=r,M)[V]||1,Z=this.$d.getTime()+T*J;return E.w(Z,this)},A.subtract=function(T,$){return this.add(-1*T,$)},A.format=function(T){var $=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var q=T||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),K=this.$H,J=this.$m,Z=this.$M,ct=M.weekdays,st=M.months,Ct=M.meridiem,_t=function(xt,re,Ee,ie){return xt&&(xt[re]||xt($,q))||Ee[re].slice(0,ie)},Nt=function(xt){return E.s(K%12||12,xt,"0")},ee=Ct||function(xt,re,Ee){var ie=xt<12?"AM":"PM";return Ee?ie.toLowerCase():ie};return q.replace(x,(function(xt,re){return re||(function(Ee){switch(Ee){case"YY":return String($.$y).slice(-2);case"YYYY":return E.s($.$y,4,"0");case"M":return Z+1;case"MM":return E.s(Z+1,2,"0");case"MMM":return _t(M.monthsShort,Z,st,3);case"MMMM":return _t(st,Z);case"D":return $.$D;case"DD":return E.s($.$D,2,"0");case"d":return String($.$W);case"dd":return _t(M.weekdaysMin,$.$W,ct,2);case"ddd":return _t(M.weekdaysShort,$.$W,ct,3);case"dddd":return ct[$.$W];case"H":return String(K);case"HH":return E.s(K,2,"0");case"h":return Nt(1);case"hh":return Nt(2);case"a":return ee(K,J,!0);case"A":return ee(K,J,!1);case"m":return String(J);case"mm":return E.s(J,2,"0");case"s":return String($.$s);case"ss":return E.s($.$s,2,"0");case"SSS":return E.s($.$ms,3,"0");case"Z":return V}return null})(xt)||V.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(T,$,M){var q,V=this,K=E.p($),J=O(T),Z=(J.utcOffset()-this.utcOffset())*i,ct=this-J,st=function(){return E.m(V,J)};switch(K){case p:q=st()/12;break;case u:q=st();break;case d:q=st()/3;break;case h:q=(ct-Z)/6048e5;break;case c:q=(ct-Z)/864e5;break;case l:q=ct/a;break;case n:q=ct/i;break;case o:q=ct/r;break;default:q=ct}return M?q:E.a(q)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return L[this.$L]},A.locale=function(T,$){if(!T)return this.$L;var M=this.clone(),q=I(T,$,!0);return q&&(M.$L=q),M},A.clone=function(){return E.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},B})(),R=N.prototype;return O.prototype=R,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",p],["$D",g]].forEach((function(B){R[B[1]]=function(A){return this.$g(A,B[0],B[1])}})),O.extend=function(B,A){return B.$i||(B(A,N,O),B.$i=!0),O},O.locale=I,O.isDayjs=D,O.unix=function(B){return O(1e3*B)},O.en=L[k],O.Ls=L,O.p={},O}))})(Vi)),Vi.exports}var ug=hg();const dg=lg(ug);var oc=Object.defineProperty,f=(e,t)=>oc(e,"name",{value:t,configurable:!0}),pg=(e,t)=>{for(var r in t)oc(e,r,{get:t[r],enumerable:!0})},we={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Ln=f(function(e="fatal"){let t=we.fatal;typeof e=="string"?e.toLowerCase()in we&&(t=we[e]):typeof e=="number"&&(t=e),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},t<=we.fatal&&(F.fatal=console.error?console.error.bind(console,Kt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Kt("FATAL"))),t<=we.error&&(F.error=console.error?console.error.bind(console,Kt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Kt("ERROR"))),t<=we.warn&&(F.warn=console.warn?console.warn.bind(console,Kt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Kt("WARN"))),t<=we.info&&(F.info=console.info?console.info.bind(console,Kt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Kt("INFO"))),t<=we.debug&&(F.debug=console.debug?console.debug.bind(console,Kt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kt("DEBUG"))),t<=we.trace&&(F.trace=console.debug?console.debug.bind(console,Kt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kt("TRACE")))},"setLogLevel"),Kt=f(e=>`%c${dg().format("ss.SSS")} : ${e} : `,"format");const Xi={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 a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Xi.hue2rgb(s,a,e+1/3)*255;case"g":return Xi.hue2rgb(s,a,e)*255;case"b":return Xi.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},fg={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},gg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:Xi,lang:fg,unit:gg},$e={};for(let e=0;e<=255;e++)$e[e]=nt.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class mg{constructor(){this.type=Ft.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=Ft.ALL}is(t){return this.type===t}}class yg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new mg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ra=new yg({r:0,g:0,b:0,a:0},"transparent"),_r={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(_r.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Ra.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}${$e[Math.round(a*255)]}`:`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}`}},Xe={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(Xe.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Xe.re);if(!r)return;const[,i,a,s,o,n]=r;return Ra.set({h:Xe._hue2deg(i),s:nt.channel.clamp.s(parseFloat(a)),l:nt.channel.clamp.l(parseFloat(s)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${a})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},li={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=li.colors[e];if(t)return _r.parse(t)},stringify:e=>{const t=_r.stringify(e);for(const r in li.colors)if(li.colors[r]===t)return r}},ri={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(ri.re);if(!r)return;const[,i,a,s,o,n,l,c,h]=r;return Ra.set({r:nt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?nt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(a)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},ye={format:{keyword:li,hex:_r,rgb:ri,rgba:ri,hsl:Xe,hsla:Xe},parse:e=>{if(typeof e!="string")return e;const t=_r.parse(e)||ri.parse(e)||Xe.parse(e)||li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?Xe.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ri.stringify(e):_r.stringify(e)},lc=(e,t)=>{const r=ye.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return ye.stringify(r)},ci=(e,t,r=0,i=1)=>{if(typeof e!="number")return lc(e,{a:t});const a=Ra.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return ye.stringify(a)},xg=e=>{const{r:t,g:r,b:i}=ye.parse(e),a=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(a)},bg=e=>xg(e)>=.5,wi=e=>!bg(e),cc=(e,t,r)=>{const i=ye.parse(e),a=i[t],s=nt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),ye.stringify(i)},H=(e,t)=>cc(e,"l",t),et=(e,t)=>cc(e,"l",-t),S=(e,t)=>{const r=ye.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return lc(e,i)},Cg=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=ye.parse(e),{r:n,g:l,b:c,a:h}=ye.parse(t),u=r/100,d=u*2-1,p=o-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,y=1-m,x=i*m+n*y,b=a*m+l*y,C=s*m+c*y,w=o*u+h*(1-u);return ci(x,b,C,w)},z=(e,t=100)=>{const r=ye.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Cg(r,e,t)};const{entries:hc,setPrototypeOf:Ho,isFrozen:_g,getPrototypeOf:kg,getOwnPropertyDescriptor:wg}=Object;let{freeze:jt,seal:Qt,create:Os}=Object,{apply:Rs,construct:Is}=typeof Reflect<"u"&&Reflect;jt||(jt=function(t){return t});Qt||(Qt=function(t){return t});Rs||(Rs=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});Is||(Is=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Pi=Yt(Array.prototype.forEach),Sg=Yt(Array.prototype.lastIndexOf),jo=Yt(Array.prototype.pop),Ur=Yt(Array.prototype.push),vg=Yt(Array.prototype.splice),Zi=Yt(String.prototype.toLowerCase),ms=Yt(String.prototype.toString),ys=Yt(String.prototype.match),Gr=Yt(String.prototype.replace),Tg=Yt(String.prototype.indexOf),Bg=Yt(String.prototype.trim),ae=Yt(Object.prototype.hasOwnProperty),zt=Yt(RegExp.prototype.test),Vr=Lg(TypeError);function Yt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Rs(e,t,i)}}function Lg(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Is(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zi;Ho&&Ho(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(_g(t)||(t[i]=s),a=s)}e[a]=!0}return e}function Ag(e){for(let t=0;t<e.length;t++)ae(e,t)||(e[t]=null);return e}function pe(e){const t=Os(null);for(const[r,i]of hc(e))ae(e,r)&&(Array.isArray(i)?t[r]=Ag(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=pe(i):t[r]=i);return t}function Xr(e,t){for(;e!==null;){const i=wg(e,t);if(i){if(i.get)return Yt(i.get);if(typeof i.value=="function")return Yt(i.value)}e=kg(e)}function r(){return null}return r}const Yo=jt(["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"]),xs=jt(["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"]),bs=jt(["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"]),Mg=jt(["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"]),Cs=jt(["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"]),Eg=jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uo=jt(["#text"]),Go=jt(["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"]),_s=jt(["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"]),Vo=jt(["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"]),Ni=jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$g=Qt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Fg=Qt(/<%[\w\W]*|[\w\W]*%>/gm),Dg=Qt(/\$\{[\w\W]*/gm),Og=Qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rg=Qt(/^aria-[\-\w]+$/),uc=Qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ig=Qt(/^(?:\w+script|data):/i),Pg=Qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dc=Qt(/^html$/i),Ng=Qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Xo=Object.freeze({__proto__:null,ARIA_ATTR:Rg,ATTR_WHITESPACE:Pg,CUSTOM_ELEMENT:Ng,DATA_ATTR:Og,DOCTYPE_NAME:dc,ERB_EXPR:Fg,IS_ALLOWED_URI:uc,IS_SCRIPT_OR_DATA:Ig,MUSTACHE_EXPR:$g,TMPLIT_EXPR:Dg});const Zr={element:1,text:3,progressingInstruction:7,comment:8,document:9},zg=function(){return typeof window>"u"?null:window},Wg=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Zo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zg();const t=tt=>pc(tt);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==Zr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:p}=e,g=l.prototype,m=Xr(g,"cloneNode"),y=Xr(g,"remove"),x=Xr(g,"nextSibling"),b=Xr(g,"childNodes"),C=Xr(g,"parentNode");if(typeof o=="function"){const tt=r.createElement("template");tt.content&&tt.content.ownerDocument&&(r=tt.content.ownerDocument)}let w,k="";const{implementation:L,createNodeIterator:v,createDocumentFragment:D,getElementsByTagName:I}=r,{importNode:O}=i;let E=Zo();t.isSupported=typeof hc=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:R,TMPLIT_EXPR:B,DATA_ATTR:A,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:q}=Xo;let{IS_ALLOWED_URI:V}=Xo,K=null;const J=ot({},[...Yo,...xs,...bs,...Cs,...Uo]);let Z=null;const ct=ot({},[...Go,..._s,...Vo,...Ni]);let st=Object.seal(Os(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,_t=null;const Nt=Object.seal(Os(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ee=!0,xt=!0,re=!1,Ee=!0,ie=!1,Ei=!0,He=!1,ns=!1,os=!1,ur=!1,$i=!1,Fi=!1,So=!0,vo=!1;const tg="user-content-";let ls=!0,jr=!1,dr={},he=null;const cs=ot({},["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 To=null;const Bo=ot({},["audio","video","img","source","image","track"]);let hs=null;const Lo=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Di="http://www.w3.org/1998/Math/MathML",Oi="http://www.w3.org/2000/svg",Ce="http://www.w3.org/1999/xhtml";let pr=Ce,us=!1,ds=null;const eg=ot({},[Di,Oi,Ce],ms);let Ri=ot({},["mi","mo","mn","ms","mtext"]),Ii=ot({},["annotation-xml"]);const rg=ot({},["title","style","font","a","script"]);let Yr=null;const ig=["application/xhtml+xml","text/html"],ag="text/html";let St=null,fr=null;const sg=r.createElement("form"),Ao=function(_){return _ instanceof RegExp||_ instanceof Function},ps=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(fr&&fr===_)){if((!_||typeof _!="object")&&(_={}),_=pe(_),Yr=ig.indexOf(_.PARSER_MEDIA_TYPE)===-1?ag:_.PARSER_MEDIA_TYPE,St=Yr==="application/xhtml+xml"?ms:Zi,K=ae(_,"ALLOWED_TAGS")?ot({},_.ALLOWED_TAGS,St):J,Z=ae(_,"ALLOWED_ATTR")?ot({},_.ALLOWED_ATTR,St):ct,ds=ae(_,"ALLOWED_NAMESPACES")?ot({},_.ALLOWED_NAMESPACES,ms):eg,hs=ae(_,"ADD_URI_SAFE_ATTR")?ot(pe(Lo),_.ADD_URI_SAFE_ATTR,St):Lo,To=ae(_,"ADD_DATA_URI_TAGS")?ot(pe(Bo),_.ADD_DATA_URI_TAGS,St):Bo,he=ae(_,"FORBID_CONTENTS")?ot({},_.FORBID_CONTENTS,St):cs,Ct=ae(_,"FORBID_TAGS")?ot({},_.FORBID_TAGS,St):pe({}),_t=ae(_,"FORBID_ATTR")?ot({},_.FORBID_ATTR,St):pe({}),dr=ae(_,"USE_PROFILES")?_.USE_PROFILES:!1,ee=_.ALLOW_ARIA_ATTR!==!1,xt=_.ALLOW_DATA_ATTR!==!1,re=_.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=_.SAFE_FOR_TEMPLATES||!1,Ei=_.SAFE_FOR_XML!==!1,He=_.WHOLE_DOCUMENT||!1,ur=_.RETURN_DOM||!1,$i=_.RETURN_DOM_FRAGMENT||!1,Fi=_.RETURN_TRUSTED_TYPE||!1,os=_.FORCE_BODY||!1,So=_.SANITIZE_DOM!==!1,vo=_.SANITIZE_NAMED_PROPS||!1,ls=_.KEEP_CONTENT!==!1,jr=_.IN_PLACE||!1,V=_.ALLOWED_URI_REGEXP||uc,pr=_.NAMESPACE||Ce,Ri=_.MATHML_TEXT_INTEGRATION_POINTS||Ri,Ii=_.HTML_INTEGRATION_POINTS||Ii,st=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Ao(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Ao(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ie&&(xt=!1),$i&&(ur=!0),dr&&(K=ot({},Uo),Z=[],dr.html===!0&&(ot(K,Yo),ot(Z,Go)),dr.svg===!0&&(ot(K,xs),ot(Z,_s),ot(Z,Ni)),dr.svgFilters===!0&&(ot(K,bs),ot(Z,_s),ot(Z,Ni)),dr.mathMl===!0&&(ot(K,Cs),ot(Z,Vo),ot(Z,Ni))),_.ADD_TAGS&&(typeof _.ADD_TAGS=="function"?Nt.tagCheck=_.ADD_TAGS:(K===J&&(K=pe(K)),ot(K,_.ADD_TAGS,St))),_.ADD_ATTR&&(typeof _.ADD_ATTR=="function"?Nt.attributeCheck=_.ADD_ATTR:(Z===ct&&(Z=pe(Z)),ot(Z,_.ADD_ATTR,St))),_.ADD_URI_SAFE_ATTR&&ot(hs,_.ADD_URI_SAFE_ATTR,St),_.FORBID_CONTENTS&&(he===cs&&(he=pe(he)),ot(he,_.FORBID_CONTENTS,St)),_.ADD_FORBID_CONTENTS&&(he===cs&&(he=pe(he)),ot(he,_.ADD_FORBID_CONTENTS,St)),ls&&(K["#text"]=!0),He&&ot(K,["html","head","body"]),K.table&&(ot(K,["tbody"]),delete Ct.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=_.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=Wg(p,a)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));jt&&jt(_),fr=_}},Mo=ot({},[...xs,...bs,...Mg]),Eo=ot({},[...Cs,...Eg]),ng=function(_){let P=C(_);(!P||!P.tagName)&&(P={namespaceURI:pr,tagName:"template"});const X=Zi(_.tagName),mt=Zi(P.tagName);return ds[_.namespaceURI]?_.namespaceURI===Oi?P.namespaceURI===Ce?X==="svg":P.namespaceURI===Di?X==="svg"&&(mt==="annotation-xml"||Ri[mt]):!!Mo[X]:_.namespaceURI===Di?P.namespaceURI===Ce?X==="math":P.namespaceURI===Oi?X==="math"&&Ii[mt]:!!Eo[X]:_.namespaceURI===Ce?P.namespaceURI===Oi&&!Ii[mt]||P.namespaceURI===Di&&!Ri[mt]?!1:!Eo[X]&&(rg[X]||!Mo[X]):!!(Yr==="application/xhtml+xml"&&ds[_.namespaceURI]):!1},ue=function(_){Ur(t.removed,{element:_});try{C(_).removeChild(_)}catch{y(_)}},je=function(_,P){try{Ur(t.removed,{attribute:P.getAttributeNode(_),from:P})}catch{Ur(t.removed,{attribute:null,from:P})}if(P.removeAttribute(_),_==="is")if(ur||$i)try{ue(P)}catch{}else try{P.setAttribute(_,"")}catch{}},$o=function(_){let P=null,X=null;if(os)_="<remove></remove>"+_;else{const kt=ys(_,/^[\r\n\t ]+/);X=kt&&kt[0]}Yr==="application/xhtml+xml"&&pr===Ce&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const mt=w?w.createHTML(_):_;if(pr===Ce)try{P=new d().parseFromString(mt,Yr)}catch{}if(!P||!P.documentElement){P=L.createDocument(pr,"template",null);try{P.documentElement.innerHTML=us?k:mt}catch{}}const $t=P.body||P.documentElement;return _&&X&&$t.insertBefore(r.createTextNode(X),$t.childNodes[0]||null),pr===Ce?I.call(P,He?"html":"body")[0]:He?P.documentElement:$t},Fo=function(_){return v.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},fs=function(_){return _ instanceof u&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof h)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Do=function(_){return typeof n=="function"&&_ instanceof n};function _e(tt,_,P){Pi(tt,X=>{X.call(t,_,P,fr)})}const Oo=function(_){let P=null;if(_e(E.beforeSanitizeElements,_,null),fs(_))return ue(_),!0;const X=St(_.nodeName);if(_e(E.uponSanitizeElement,_,{tagName:X,allowedTags:K}),Ei&&_.hasChildNodes()&&!Do(_.firstElementChild)&&zt(/<[/\w!]/g,_.innerHTML)&&zt(/<[/\w!]/g,_.textContent)||_.nodeType===Zr.progressingInstruction||Ei&&_.nodeType===Zr.comment&&zt(/<[/\w]/g,_.data))return ue(_),!0;if(!(Nt.tagCheck instanceof Function&&Nt.tagCheck(X))&&(!K[X]||Ct[X])){if(!Ct[X]&&Io(X)&&(st.tagNameCheck instanceof RegExp&&zt(st.tagNameCheck,X)||st.tagNameCheck instanceof Function&&st.tagNameCheck(X)))return!1;if(ls&&!he[X]){const mt=C(_)||_.parentNode,$t=b(_)||_.childNodes;if($t&&mt){const kt=$t.length;for(let Ut=kt-1;Ut>=0;--Ut){const ke=m($t[Ut],!0);ke.__removalCount=(_.__removalCount||0)+1,mt.insertBefore(ke,x(_))}}}return ue(_),!0}return _ instanceof l&&!ng(_)||(X==="noscript"||X==="noembed"||X==="noframes")&&zt(/<\/no(script|embed|frames)/i,_.innerHTML)?(ue(_),!0):(ie&&_.nodeType===Zr.text&&(P=_.textContent,Pi([N,R,B],mt=>{P=Gr(P,mt," ")}),_.textContent!==P&&(Ur(t.removed,{element:_.cloneNode()}),_.textContent=P)),_e(E.afterSanitizeElements,_,null),!1)},Ro=function(_,P,X){if(So&&(P==="id"||P==="name")&&(X in r||X in sg))return!1;if(!(xt&&!_t[P]&&zt(A,P))){if(!(ee&&zt(T,P))){if(!(Nt.attributeCheck instanceof Function&&Nt.attributeCheck(P,_))){if(!Z[P]||_t[P]){if(!(Io(_)&&(st.tagNameCheck instanceof RegExp&&zt(st.tagNameCheck,_)||st.tagNameCheck instanceof Function&&st.tagNameCheck(_))&&(st.attributeNameCheck instanceof RegExp&&zt(st.attributeNameCheck,P)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(P,_))||P==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&zt(st.tagNameCheck,X)||st.tagNameCheck instanceof Function&&st.tagNameCheck(X))))return!1}else if(!hs[P]){if(!zt(V,Gr(X,M,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&_!=="script"&&Tg(X,"data:")===0&&To[_])){if(!(re&&!zt($,Gr(X,M,"")))){if(X)return!1}}}}}}}return!0},Io=function(_){return _!=="annotation-xml"&&ys(_,q)},Po=function(_){_e(E.beforeSanitizeAttributes,_,null);const{attributes:P}=_;if(!P||fs(_))return;const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let mt=P.length;for(;mt--;){const $t=P[mt],{name:kt,namespaceURI:Ut,value:ke}=$t,gr=St(kt),gs=ke;let At=kt==="value"?gs:Bg(gs);if(X.attrName=gr,X.attrValue=At,X.keepAttr=!0,X.forceKeepAttr=void 0,_e(E.uponSanitizeAttribute,_,X),At=X.attrValue,vo&&(gr==="id"||gr==="name")&&(je(kt,_),At=tg+At),Ei&&zt(/((--!?|])>)|<\/(style|title|textarea)/i,At)){je(kt,_);continue}if(gr==="attributename"&&ys(At,"href")){je(kt,_);continue}if(X.forceKeepAttr)continue;if(!X.keepAttr){je(kt,_);continue}if(!Ee&&zt(/\/>/i,At)){je(kt,_);continue}ie&&Pi([N,R,B],zo=>{At=Gr(At,zo," ")});const No=St(_.nodeName);if(!Ro(No,gr,At)){je(kt,_);continue}if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ut)switch(p.getAttributeType(No,gr)){case"TrustedHTML":{At=w.createHTML(At);break}case"TrustedScriptURL":{At=w.createScriptURL(At);break}}if(At!==gs)try{Ut?_.setAttributeNS(Ut,kt,At):_.setAttribute(kt,At),fs(_)?ue(_):jo(t.removed)}catch{je(kt,_)}}_e(E.afterSanitizeAttributes,_,null)},og=function tt(_){let P=null;const X=Fo(_);for(_e(E.beforeSanitizeShadowDOM,_,null);P=X.nextNode();)_e(E.uponSanitizeShadowNode,P,null),Oo(P),Po(P),P.content instanceof s&&tt(P.content);_e(E.afterSanitizeShadowDOM,_,null)};return t.sanitize=function(tt){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,X=null,mt=null,$t=null;if(us=!tt,us&&(tt="<!-->"),typeof tt!="string"&&!Do(tt))if(typeof tt.toString=="function"){if(tt=tt.toString(),typeof tt!="string")throw Vr("dirty is not a string, aborting")}else throw Vr("toString is not a function");if(!t.isSupported)return tt;if(ns||ps(_),t.removed=[],typeof tt=="string"&&(jr=!1),jr){if(tt.nodeName){const ke=St(tt.nodeName);if(!K[ke]||Ct[ke])throw Vr("root node is forbidden and cannot be sanitized in-place")}}else if(tt instanceof n)P=$o("<!---->"),X=P.ownerDocument.importNode(tt,!0),X.nodeType===Zr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?P=X:P.appendChild(X);else{if(!ur&&!ie&&!He&&tt.indexOf("<")===-1)return w&&Fi?w.createHTML(tt):tt;if(P=$o(tt),!P)return ur?null:Fi?k:""}P&&os&&ue(P.firstChild);const kt=Fo(jr?tt:P);for(;mt=kt.nextNode();)Oo(mt),Po(mt),mt.content instanceof s&&og(mt.content);if(jr)return tt;if(ur){if($i)for($t=D.call(P.ownerDocument);P.firstChild;)$t.appendChild(P.firstChild);else $t=P;return(Z.shadowroot||Z.shadowrootmode)&&($t=O.call(i,$t,!0)),$t}let Ut=He?P.outerHTML:P.innerHTML;return He&&K["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&zt(dc,P.ownerDocument.doctype.name)&&(Ut="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
3
+ `+Ut),ie&&Pi([N,R,B],ke=>{Ut=Gr(Ut,ke," ")}),w&&Fi?w.createHTML(Ut):Ut},t.setConfig=function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ps(tt),ns=!0},t.clearConfig=function(){fr=null,ns=!1},t.isValidAttribute=function(tt,_,P){fr||ps({});const X=St(tt),mt=St(_);return Ro(X,mt,P)},t.addHook=function(tt,_){typeof _=="function"&&Ur(E[tt],_)},t.removeHook=function(tt,_){if(_!==void 0){const P=Sg(E[tt],_);return P===-1?void 0:vg(E[tt],P,1)[0]}return jo(E[tt])},t.removeHooks=function(tt){E[tt]=[]},t.removeAllHooks=function(){E=Zo()},t}var Er=pc(),fc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,hi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qg=/\s*%%.*\n/gm,wr,gc=(wr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(wr,"UnknownDiagramError"),wr),tr={},An=f(function(e,t){e=e.replace(fc,"").replace(hi,"").replace(qg,`
4
+ `);for(const[r,{detector:i}]of Object.entries(tr))if(i(e,t))return r;throw new gc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ps=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)mc(t,r,i)},"registerLazyLoadedDiagrams"),mc=f((e,t,r)=>{tr[e]&&F.warn(`Detector with key ${e} already exists. Overwriting.`),tr[e]={detector:t,loader:r},F.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Hg=f(e=>tr[e].loader,"getDiagramLoader"),Ns=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ns(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),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(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ns(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Tt=Ns,Ia="#ffffff",Pa="#f2f2f2",Wt=f((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),"mkBorder"),Sr,jg=(Sr=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||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||z(this.tertiaryColor),this.lineColor=this.lineColor||z(this.background),this.arrowheadColor=this.arrowheadColor||z(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||z(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||H(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||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||z(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(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]||S(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||S(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||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(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||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wi(this.quadrant1Fill)?H(this.quadrant1Fill):et(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?et(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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||Ia,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pa}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]})}},f(Sr,"Theme"),Sr),Yg=f(e=>{const t=new jg;return t.calculate(e),t},"getThemeVariables"),vr,Ug=(vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=z(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ci(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=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=ci(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ci(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=H(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=H(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=H(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(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||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wi(this.quadrant1Fill)?H(this.quadrant1Fill):et(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?et(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||S(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||S(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||S(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||S(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||S(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(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]})}},f(vr,"Theme"),vr),Gg=f(e=>{const t=new Ug;return t.calculate(e),t},"getThemeVariables"),Tr,Vg=(Tr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(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=ci(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||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||S(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(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||z(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||z(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=H(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||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||S(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||S(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||S(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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wi(this.quadrant1Fill)?H(this.quadrant1Fill):et(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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(z(this.git0),25),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||Ia,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pa}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]})}},f(Tr,"Theme"),Tr),Xg=f(e=>{const t=new Vg;return t.calculate(e),t},"getThemeVariables"),Br,Zg=(Br=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=H("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.primaryColor),this.lineColor=z(this.background),this.textColor=z(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=et(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||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(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]||S(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(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||S(this.primaryColor,{l:-30}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||S(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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wi(this.quadrant1Fill)?H(this.quadrant1Fill):et(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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||Ia,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pa}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]})}},f(Br,"Theme"),Br),Kg=f(e=>{const t=new Zg;return t.calculate(e),t},"getThemeVariables"),Lr,Qg=(Lr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(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]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||et(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]||S(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||S(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=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=et(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=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=et(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wi(this.quadrant1Fill)?H(this.quadrant1Fill):et(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=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||S(this.primaryColor,{h:-30}),this.git4=this.pie5||S(this.primaryColor,{h:-60}),this.git5=this.pie6||S(this.primaryColor,{h:-90}),this.git6=this.pie7||S(this.primaryColor,{h:60}),this.git7=this.pie8||S(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||Ia,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pa}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]})}},f(Lr,"Theme"),Lr),Jg=f(e=>{const t=new Qg;return t.calculate(e),t},"getThemeVariables"),Te={base:{getThemeVariables:Yg},dark:{getThemeVariables:Gg},default:{getThemeVariables:Xg},forest:{getThemeVariables:Kg},neutral:{getThemeVariables:Jg}},de={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},yc={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Te.default.getThemeVariables(),sequence:{...de.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},radar:{...de.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},xc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...xc(e[i],"")]:[...r,t+i],[]),"keyify"),tm=new Set(xc(yc,"")),bc=yc,na=f(e=>{if(F.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>na(t));return}for(const t of Object.keys(e)){if(F.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!tm.has(t)||e[t]==null){F.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){F.debug("sanitizing object",t),na(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(F.debug("sanitizing css option",t),e[t]=em(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]="")}F.debug("After sanitization",e)}},"sanitizeDirective"),em=f(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"),$r=Object.freeze(bc),Vt=Tt({},$r),oa,er=[],ui=Tt({},$r),Na=f((e,t)=>{let r=Tt({},e),i={};for(const a of t)kc(a),i=Tt(i,a);if(r=Tt(r,i),i.theme&&i.theme in Te){const a=Tt({},oa),s=Tt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Te&&(r.themeVariables=Te[r.theme].getThemeVariables(s))}return ui=r,wc(ui),ui},"updateCurrentConfig"),rm=f(e=>(Vt=Tt({},$r),Vt=Tt(Vt,e),e.theme&&Te[e.theme]&&(Vt.themeVariables=Te[e.theme].getThemeVariables(e.themeVariables)),Na(Vt,er),Vt),"setSiteConfig"),im=f(e=>{oa=Tt({},e)},"saveConfigFromInitialize"),am=f(e=>(Vt=Tt(Vt,e),Na(Vt,er),Vt),"updateSiteConfig"),Cc=f(()=>Tt({},Vt),"getSiteConfig"),_c=f(e=>(wc(e),Tt(ui,e),Ot()),"setConfig"),Ot=f(()=>Tt({},ui),"getConfig"),kc=f(e=>{e&&(["secure",...Vt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(F.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"&&kc(e[t])}))},"sanitize"),sm=f(e=>{na(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),er.push(e),Na(Vt,er)},"addDirective"),la=f((e=Vt)=>{er=[],Na(e,er)},"reset"),nm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ko={},om=f(e=>{Ko[e]||(F.warn(nm[e]),Ko[e]=!0)},"issueWarning"),wc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&om("LAZY_LOAD_DEPRECATED")},"checkConfig"),Hw=f(()=>{let e={};oa&&(e=Tt(e,oa));for(const t of er)e=Tt(e,t);return e},"getUserDefinedConfig"),Si=/<br\s*\/?>/gi,lm=f(e=>e?Tc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),cm=(()=>{let e=!1;return()=>{e||(Sc(),e=!0)}})();function Sc(){const e="data-temp-href-target";Er.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Er.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"))})}f(Sc,"setupDompurifyHooks");var vc=f(e=>(cm(),Er.sanitize(e)),"removeScript"),Qo=f((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=vc(e):r!=="loose"&&(e=Tc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=pm(e))}return e},"sanitizeMore"),Jt=f((e,t)=>e&&(t.dompurifyConfig?e=Er.sanitize(Qo(e,t),t.dompurifyConfig).toString():e=Er.sanitize(Qo(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),hm=f((e,t)=>typeof e=="string"?Jt(e,t):e.flat().map(r=>Jt(r,t)),"sanitizeTextOrArray"),um=f(e=>Si.test(e),"hasBreaks"),dm=f(e=>e.split(Si),"splitBreaks"),pm=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Tc=f(e=>e.replace(Si,"#br#"),"breakToPlaceholder"),fm=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Lt=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),gm=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),mm=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Jo=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];ym(s,o)&&(a=s+","+o,i++,r.pop())}r.push(xm(a))}return r.join("")},"parseGenericTypes"),zs=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),ym=f((e,t)=>{const r=zs(e,"~"),i=zs(t,"~");return r===1&&i===1},"shouldCombineSets"),xm=f(e=>{const t=zs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),tl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ws=/\$\$(.*)\$\$/g,Fr=f(e=>(e.match(Ws)?.length??0)>0,"hasKatex"),jw=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Mn(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 a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),bm=f(async(e,t)=>{if(!Fr(e))return e;if(!(tl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ws,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:a}=await import("./katex-DhXJpUyf.js");return{default:a}},[]),i=t.forceLegacyMathML||!tl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Si).map(a=>Fr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ws,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Mn=f(async(e,t)=>Jt(await bm(e,t),t),"renderKatexSanitized"),Pr={getRows:lm,sanitizeText:Jt,sanitizeTextOrArray:hm,hasBreaks:um,splitBreaks:dm,lineBreakRegex:Si,removeScript:vc,getUrl:fm,evaluate:Lt,getMax:gm,getMin:mm},Cm=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),_m=f(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"),Bc=f(function(e,t,r,i){const a=_m(t,r,i);Cm(e,a)},"configureSvgSize"),km=f(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;F.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;F.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,F.info(`Calculated bounds: ${n}x${l}`),Bc(t,l,n,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Ki={},wm=f((e,t,r)=>{let i="";return e in Ki&&Ki[e]?i=Ki[e](r):F.warn(`No theme found for ${e}`),` & {
5
+ font-family: ${r.fontFamily};
6
+ font-size: ${r.fontSize};
7
+ fill: ${r.textColor}
8
+ }
9
+ @keyframes edge-animation-frame {
10
+ from {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ }
14
+ @keyframes dash {
15
+ to {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ & .edge-animation-slow {
20
+ stroke-dasharray: 9,5 !important;
21
+ stroke-dashoffset: 900;
22
+ animation: dash 50s linear infinite;
23
+ stroke-linecap: round;
24
+ }
25
+ & .edge-animation-fast {
26
+ stroke-dasharray: 9,5 !important;
27
+ stroke-dashoffset: 900;
28
+ animation: dash 20s linear infinite;
29
+ stroke-linecap: round;
30
+ }
31
+ /* Classes common for multiple diagrams */
32
+
33
+ & .error-icon {
34
+ fill: ${r.errorBkgColor};
35
+ }
36
+ & .error-text {
37
+ fill: ${r.errorTextColor};
38
+ stroke: ${r.errorTextColor};
39
+ }
40
+
41
+ & .edge-thickness-normal {
42
+ stroke-width: 1px;
43
+ }
44
+ & .edge-thickness-thick {
45
+ stroke-width: 3.5px
46
+ }
47
+ & .edge-pattern-solid {
48
+ stroke-dasharray: 0;
49
+ }
50
+ & .edge-thickness-invisible {
51
+ stroke-width: 0;
52
+ fill: none;
53
+ }
54
+ & .edge-pattern-dashed{
55
+ stroke-dasharray: 3;
56
+ }
57
+ .edge-pattern-dotted {
58
+ stroke-dasharray: 2;
59
+ }
60
+
61
+ & .marker {
62
+ fill: ${r.lineColor};
63
+ stroke: ${r.lineColor};
64
+ }
65
+ & .marker.cross {
66
+ stroke: ${r.lineColor};
67
+ }
68
+
69
+ & svg {
70
+ font-family: ${r.fontFamily};
71
+ font-size: ${r.fontSize};
72
+ }
73
+ & p {
74
+ margin: 0
75
+ }
76
+
77
+ ${i}
78
+
79
+ ${t}
80
+ `},"getStyles"),Sm=f((e,t)=>{t!==void 0&&(Ki[e]=t)},"addStylesForDiagram"),vm=wm,Lc={};pg(Lc,{clear:()=>Tm,getAccDescription:()=>Mm,getAccTitle:()=>Lm,getDiagramTitle:()=>$m,setAccDescription:()=>Am,setAccTitle:()=>Bm,setDiagramTitle:()=>Em});var En="",$n="",Fn="",Dn=f(e=>Jt(e,Ot()),"sanitizeText"),Tm=f(()=>{En="",Fn="",$n=""},"clear"),Bm=f(e=>{En=Dn(e).replace(/^\s+/g,"")},"setAccTitle"),Lm=f(()=>En,"getAccTitle"),Am=f(e=>{Fn=Dn(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),Mm=f(()=>Fn,"getAccDescription"),Em=f(e=>{$n=Dn(e)},"setDiagramTitle"),$m=f(()=>$n,"getDiagramTitle"),el=F,Fm=Ln,dt=Ot,Yw=_c,Uw=$r,On=f(e=>Jt(e,dt()),"sanitizeText"),Dm=km,Om=f(()=>Lc,"getCommonDb"),ca={},ha=f((e,t,r)=>{ca[e]&&el.warn(`Diagram with id ${e} already registered. Overwriting.`),ca[e]=t,r&&mc(e,r),Sm(e,t.styles),t.injectUtils?.(el,Fm,dt,On,Dm,Om(),()=>{})},"registerDiagram"),qs=f(e=>{if(e in ca)return ca[e];throw new Rm(e)},"getDiagram"),Ar,Rm=(Ar=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Ar,"DiagramNotFoundError"),Ar);const Hs=Math.PI,js=2*Hs,Ue=1e-6,Im=js-Ue;function Ac(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Pm(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ac;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class Nm{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ac:Pm(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,c=a-r,h=o-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Ue)if(!(Math.abs(u*l-c*h)>Ue)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=a-n,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(d),C=s*Math.tan((Hs-Math.acos((m+d-y)/(2*x*b)))/2),w=C/b,k=C/x;Math.abs(w-1)>Ue&&this._append`L${t+w*h},${r+w*u}`,this._append`A${s},${s},0,0,${+(u*p>h*g)},${this._x1=t+k*l},${this._y1=r+k*c}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),c=t+n,h=r+l,u=1^o,d=o?a-s:s-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ue||Math.abs(this._y1-h)>Ue)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%js+js),d>Im?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>Ue&&this._append`A${i},${i},0,${+(d>=Hs)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function mr(e){return function(){return e}}const Gw=Math.abs,Vw=Math.atan2,Xw=Math.cos,Zw=Math.max,Kw=Math.min,Qw=Math.sin,Jw=Math.sqrt,rl=1e-12,Rn=Math.PI,il=Rn/2,tS=2*Rn;function eS(e){return e>1?0:e<-1?Rn:Math.acos(e)}function rS(e){return e>=1?il:e<=-1?-il:Math.asin(e)}function zm(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 Nm(t)}function Wm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Mc(e){this._context=e}Mc.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 ua(e){return new Mc(e)}function qm(e){return e[0]}function Hm(e){return e[1]}function jm(e,t){var r=mr(!0),i=null,a=ua,s=null,o=zm(n);e=typeof e=="function"?e:e===void 0?qm:mr(e),t=typeof t=="function"?t:t===void 0?Hm:mr(t);function n(l){var c,h=(l=Wm(l)).length,u,d=!1,p;for(i==null&&(s=a(p=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(u,c,l),+t(u,c,l));if(p)return s=null,p+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:mr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:mr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:mr(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}class Ec{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 $c(e){return new Ec(e,!0)}function Fc(e){return new Ec(e,!1)}function Oe(){}function da(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function za(e){this._context=e}za.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:da(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qi(e){return new za(e)}function Dc(e){this._context=e}Dc.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ym(e){return new Dc(e)}function Oc(e){this._context=e}Oc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Um(e){return new Oc(e)}function Rc(e,t){this._basis=new za(e),this._beta=t}Rc.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],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Gm=(function e(t){function r(i){return t===1?new za(i):new Rc(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function pa(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function In(e,t){this._context=e,this._k=(1-t)/6}In.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:pa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ic=(function e(t){function r(i){return new In(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Pn(e,t){this._context=e,this._k=(1-t)/6}Pn.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:pa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vm=(function e(t){function r(i){return new Pn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Xm=(function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function zn(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>rl){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>rl){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);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function Pc(e,t){this._context=e,this._alpha=t}Pc.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:zn(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 Nc=(function e(t){function r(i){return t?new Pc(i,t):new In(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function zc(e,t){this._context=e,this._alpha=t}zc.prototype={areaStart:Oe,areaEnd:Oe,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:zn(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 Zm=(function e(t){function r(i){return t?new zc(i,t):new Pn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Wc(e,t){this._context=e,this._alpha=t}Wc.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:zn(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 Km=(function e(t){function r(i){return t?new Wc(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qc(e){this._context=e}qc.prototype={areaStart:Oe,areaEnd:Oe,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 Qm(e){return new qc(e)}function al(e){return e<0?-1:1}function sl(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(al(s)+al(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function nl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ks(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function fa(e){this._context=e}fa.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:ks(this,this._t0,nl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ks(this,nl(this,r=sl(this,e,t)),r);break;default:ks(this,this._t0,r=sl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Hc(e){this._context=new jc(e)}(Hc.prototype=Object.create(fa.prototype)).point=function(e,t){fa.prototype.point.call(this,t,e)};function jc(e){this._context=e}jc.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,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function Yc(e){return new fa(e)}function Uc(e){return new Hc(e)}function Gc(e){this._context=e}Gc.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=ol(e),a=ol(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ol(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function Vc(e){return new Gc(e)}function Wa(e,t){this._context=e,this._t=t}Wa.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 Xc(e){return new Wa(e,.5)}function Zc(e){return new Wa(e,0)}function Kc(e){return new Wa(e,1)}var Jm=f(e=>{const{securityLevel:t}=dt();let r=ht("body");if(t==="sandbox"){const s=ht(`#i${e}`).node()?.contentDocument??document;r=ht(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Wn(e){return typeof e>"u"||e===null}f(Wn,"isNothing");function Qc(e){return typeof e=="object"&&e!==null}f(Qc,"isObject");function Jc(e){return Array.isArray(e)?e:Wn(e)?[]:[e]}f(Jc,"toArray");function th(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}f(th,"extend");function eh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(eh,"repeat");function rh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(rh,"isNegativeZero");var ty=Wn,ey=Qc,ry=Jc,iy=eh,ay=rh,sy=th,Bt={isNothing:ty,isObject:ey,toArray:ry,repeat:iy,isNegativeZero:ay,extend:sy};function qn(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
+
83
+ `+e.mark.snippet),i+" "+r):i}f(qn,"formatError");function Dr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(Dr,"YAMLException$1");Dr.prototype=Object.create(Error.prototype);Dr.prototype.constructor=Dr;Dr.prototype.toString=f(function(t){return this.name+": "+qn(this,t)},"toString");var Xt=Dr;function Ji(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}f(Ji,"getLine");function ta(e,t){return Bt.repeat(" ",t-e.length)+e}f(ta,"padStart");function ih(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],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Ji(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),n=Bt.repeat(" ",t.indent)+ta((e.line-l+1).toString(),h)+" | "+c.str+`
84
+ `+n;for(c=Ji(e.buffer,i[o],a[o],e.position,u),n+=Bt.repeat(" ",t.indent)+ta((e.line+1).toString(),h)+" | "+c.str+`
85
+ `,n+=Bt.repeat("-",t.indent+h+3+c.pos)+`^
86
+ `,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=Ji(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),n+=Bt.repeat(" ",t.indent)+ta((e.line+l+1).toString(),h)+" | "+c.str+`
87
+ `;return n.replace(/\n$/,"")}f(ih,"makeSnippet");var ny=ih,oy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ly=["scalar","sequence","mapping"];function ah(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(ah,"compileStyleAliases");function sh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(oy.indexOf(r)===-1)throw new Xt('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=ah(t.styleAliases||null),ly.indexOf(this.kind)===-1)throw new Xt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(sh,"Type$1");var Rt=sh;function Ys(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}f(Ys,"compileList");function nh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(nh,"compileMap");function ga(e){return this.extend(e)}f(ga,"Schema$1");ga.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Rt)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 Xt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Rt))throw new Xt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Xt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Xt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Rt))throw new Xt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ga.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=Ys(a,"implicit"),a.compiledExplicit=Ys(a,"explicit"),a.compiledTypeMap=nh(a.compiledImplicit,a.compiledExplicit),a},"extend");var cy=ga,hy=new Rt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),uy=new Rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),dy=new Rt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),py=new cy({explicit:[hy,uy,dy]});function oh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(oh,"resolveYamlNull");function lh(){return null}f(lh,"constructYamlNull");function ch(e){return e===null}f(ch,"isNull");var fy=new Rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:oh,construct:lh,predicate:ch,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function hh(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")}f(hh,"resolveYamlBoolean");function uh(e){return e==="true"||e==="True"||e==="TRUE"}f(uh,"constructYamlBoolean");function dh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(dh,"isBoolean");var gy=new Rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hh,construct:uh,predicate:dh,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ph(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(ph,"isHexCode");function fh(e){return 48<=e&&e<=55}f(fh,"isOctCode");function gh(e){return 48<=e&&e<=57}f(gh,"isDecCode");function mh(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!ph(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!fh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!gh(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}f(mh,"resolveYamlInteger");function yh(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)}f(yh,"constructYamlInteger");function xh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Bt.isNegativeZero(e)}f(xh,"isInteger");var my=new Rt("tag:yaml.org,2002:int",{kind:"scalar",resolve:mh,construct:yh,predicate:xh,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(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"]}}),yy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function bh(e){return!(e===null||!yy.test(e)||e[e.length-1]==="_")}f(bh,"resolveYamlFloat");function Ch(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)}f(Ch,"constructYamlFloat");var xy=/^[-+]?[0-9]+e/;function _h(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(Bt.isNegativeZero(e))return"-0.0";return r=e.toString(10),xy.test(r)?r.replace("e",".e"):r}f(_h,"representYamlFloat");function kh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Bt.isNegativeZero(e))}f(kh,"isFloat");var by=new Rt("tag:yaml.org,2002:float",{kind:"scalar",resolve:bh,construct:Ch,predicate:kh,represent:_h,defaultStyle:"lowercase"}),wh=py.extend({implicit:[fy,gy,my,by]}),Cy=wh,Sh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vh=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 Th(e){return e===null?!1:Sh.exec(e)!==null||vh.exec(e)!==null}f(Th,"resolveYamlTimestamp");function Bh(e){var t,r,i,a,s,o,n,l=0,c=null,h,u,d;if(t=Sh.exec(e),t===null&&(t=vh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,a,s,o,n,l)),c&&d.setTime(d.getTime()-c),d}f(Bh,"constructYamlTimestamp");function Lh(e){return e.toISOString()}f(Lh,"representYamlTimestamp");var _y=new Rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Th,construct:Bh,instanceOf:Date,represent:Lh});function Ah(e){return e==="<<"||e===null}f(Ah,"resolveYamlMerge");var ky=new Rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ah}),Hn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function Mh(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=Hn;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(Mh,"resolveYamlBinary");function Eh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=Hn,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(Eh,"constructYamlBinary");function $h(e){var t="",r=0,i,a,s=e.length,o=Hn;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f($h,"representYamlBinary");function Fh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Fh,"isBinary");var wy=new Rt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Mh,construct:Eh,predicate:Fh,represent:$h}),Sy=Object.prototype.hasOwnProperty,vy=Object.prototype.toString;function Dh(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,vy.call(a)!=="[object Object]")return!1;for(s in a)if(Sy.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}f(Dh,"resolveYamlOmap");function Oh(e){return e!==null?e:[]}f(Oh,"constructYamlOmap");var Ty=new Rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Dh,construct:Oh}),By=Object.prototype.toString;function Rh(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],By.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}f(Rh,"resolveYamlPairs");function Ih(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}f(Ih,"constructYamlPairs");var Ly=new Rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Rh,construct:Ih}),Ay=Object.prototype.hasOwnProperty;function Ph(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ay.call(r,t)&&r[t]!==null)return!1;return!0}f(Ph,"resolveYamlSet");function Nh(e){return e!==null?e:{}}f(Nh,"constructYamlSet");var My=new Rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ph,construct:Nh}),zh=Cy.extend({implicit:[_y,ky],explicit:[wy,Ty,Ly,My]}),Re=Object.prototype.hasOwnProperty,ma=1,Wh=2,qh=3,ya=4,ws=1,Ey=2,ll=3,$y=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fy=/[\x85\u2028\u2029]/,Dy=/[,\[\]\{\}]/,Hh=/^(?:!|!!|![a-z\-]+!)$/i,jh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Us(e){return Object.prototype.toString.call(e)}f(Us,"_class");function le(e){return e===10||e===13}f(le,"is_EOL");function De(e){return e===9||e===32}f(De,"is_WHITE_SPACE");function qt(e){return e===9||e===32||e===10||e===13}f(qt,"is_WS_OR_EOL");function Ze(e){return e===44||e===91||e===93||e===123||e===125}f(Ze,"is_FLOW_INDICATOR");function Yh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Yh,"fromHexCode");function Uh(e){return e===120?2:e===117?4:e===85?8:0}f(Uh,"escapedHexLen");function Gh(e){return 48<=e&&e<=57?e-48:-1}f(Gh,"fromDecimalCode");function Gs(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":""}f(Gs,"simpleEscapeSequence");function Vh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(Vh,"charFromCodepoint");var Xh=new Array(256),Zh=new Array(256);for(Ye=0;Ye<256;Ye++)Xh[Ye]=Gs(Ye)?1:0,Zh[Ye]=Gs(Ye);var Ye;function Kh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zh,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=[]}f(Kh,"State$1");function jn(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=ny(r),new Xt(t,r)}f(jn,"generateError");function Q(e,t){throw jn(e,t)}f(Q,"throwError");function fi(e,t){e.onWarning&&e.onWarning.call(null,jn(e,t))}f(fi,"throwWarning");var cl={YAML:f(function(t,r,i){var a,s,o;t.version!==null&&Q(t,"duplication of %YAML directive"),i.length!==1&&Q(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&Q(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&Q(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&fi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var a,s;i.length!==2&&Q(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Hh.test(a)||Q(t,"ill-formed tag handle (first argument) of the TAG directive"),Re.call(t.tagMap,a)&&Q(t,'there is a previously declared suffix for "'+a+'" tag handle'),jh.test(s)||Q(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Q(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Be(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||Q(e,"expected valid JSON character");else $y.test(n)&&Q(e,"the stream contains non-printable characters");e.result+=n}}f(Be,"captureSegment");function Vs(e,t,r,i){var a,s,o,n;for(Bt.isObject(r)||Q(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],Re.call(t,s)||(t[s]=r[s],i[s]=!0)}f(Vs,"mergeMappings");function Ke(e,t,r,i,a,s,o,n,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&Q(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Us(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&Us(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Vs(e,t,s[c],r);else Vs(e,t,s,r);else!e.json&&!Re.call(r,a)&&Re.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,Q(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete r[a];return t}f(Ke,"storeMappingPair");function qa(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++):Q(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(qa,"readLineBreak");function bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;De(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(le(a))for(qa(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&fi(e,"deficient indentation"),i}f(bt,"skipSeparationSpace");function vi(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||qt(r)))}f(vi,"testDocumentSeparator");function Ha(e,t){t===1?e.result+=" ":t>1&&(e.result+=Bt.repeat(`
90
+ `,t-1))}f(Ha,"writeFoldedLines");function Qh(e,t,r){var i,a,s,o,n,l,c,h,u=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),qt(p)||Ze(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),qt(a)||r&&Ze(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),qt(a)||r&&Ze(a))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&vi(e)||r&&Ze(p))break;if(le(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){n=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Be(e,s,o,!1),Ha(e,e.line-l),s=o=e.position,n=!1),De(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Be(e,s,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}f(Qh,"readPlainScalar");function Jh(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Be(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else le(r)?(Be(e,i,a,!0),Ha(e,bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&vi(e)?Q(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Q(e,"unexpected end of the stream within a single quoted scalar")}f(Jh,"readSingleQuotedScalar");function tu(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Be(e,r,e.position,!0),e.position++,!0;if(n===92){if(Be(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),le(n))bt(e,!1,t);else if(n<256&&Xh[n])e.result+=Zh[n],e.position++;else if((o=Uh(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=Yh(n))>=0?s=(s<<4)+o:Q(e,"expected hexadecimal character");e.result+=Vh(s),e.position++}else Q(e,"unknown escape sequence");r=i=e.position}else le(n)?(Be(e,r,i,!0),Ha(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&vi(e)?Q(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Q(e,"unexpected end of the stream within a double quoted scalar")}f(tu,"readDoubleQuotedScalar");function eu(e,t){var r=!0,i,a,s,o=e.tag,n,l=e.anchor,c,h,u,d,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,n=[];else if(b===123)h=125,p=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),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=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=n,!0;r?b===44&&Q(e,"expected the node content, but found ','"):Q(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),qt(c)&&(u=d=!0,e.position++,bt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,rr(e,t,ma,!1,!0),y=e.tag,m=e.result,bt(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),bt(e,!0,t),rr(e,t,ma,!1,!0),x=e.result),p?Ke(e,n,g,y,m,x,i,a,s):u?n.push(Ke(e,null,g,y,m,x,i,a,s)):n.push(m),bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Q(e,"unexpected end of the stream within a flow collection")}f(eu,"readFlowCollection");function ru(e,t){var r,i,a=ws,s=!1,o=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)ws===a?a=u===43?ll:Ey:Q(e,"repeat of a chomping mode identifier");else if((h=Gh(u))>=0)h===0?Q(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Q(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(De(u)){do u=e.input.charCodeAt(++e.position);while(De(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!le(u)&&u!==0)}for(;u!==0;){for(qa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),le(u)){l++;continue}if(e.lineIndent<n){a===ll?e.result+=Bt.repeat(`
91
+ `,s?1+l:l):a===ws&&s&&(e.result+=`
92
+ `);break}for(i?De(u)?(c=!0,e.result+=Bt.repeat(`
93
+ `,s?1+l:l)):c?(c=!1,e.result+=Bt.repeat(`
94
+ `,l+1)):l===0?s&&(e.result+=" "):e.result+=Bt.repeat(`
95
+ `,l):e.result+=Bt.repeat(`
96
+ `,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!le(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Be(e,r,e.position,!1)}return!0}f(ru,"readBlockScalar");function Xs(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!qt(o))));){if(n=!0,e.position++,bt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,rr(e,t,qh,!1,!0),s.push(e.result),bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Q(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}f(Xs,"readBlockSequence");function iu(e,t,r){var i,a,s,o,n,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),p=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,Q(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&qt(i))b===63?(y&&(Ke(e,u,d,p,g,null,o,n,l),p=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):Q(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!rr(e,r,Wh,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);De(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),qt(b)||Q(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ke(e,u,d,p,g,null,o,n,l),p=g=m=null),x=!0,y=!1,a=!1,p=e.tag,g=e.result;else if(x)Q(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)Q(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===s||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),rr(e,t,ya,!0,a)&&(y?g=e.result:m=e.result),y||(Ke(e,u,d,p,g,m,o,n,l),p=g=m=null),bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)Q(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ke(e,u,d,p,g,null,o,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}f(iu,"readBlockMapping");function au(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Q(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Q(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!qt(o);)o===33&&(i?Q(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Hh.test(a)||Q(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Dy.test(s)&&Q(e,"tag suffix cannot contain flow indicator characters")}s&&!jh.test(s)&&Q(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Q(e,"tag name is malformed: "+s)}return r?e.tag=s:Re.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:Q(e,'undeclared tag handle "'+a+'"'),!0}f(au,"readTagProperty");function su(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Q(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!Ze(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(su,"readAnchorProperty");function nu(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&&!qt(i)&&!Ze(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Re.call(e.anchorMap,r)||Q(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],bt(e,!0,-1),!0}f(nu,"readAlias");function rr(e,t,r,i,a){var s,o,n,l=1,c=!1,h=!1,u,d,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=ya===r||qh===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(;au(e)||su(e);)bt(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||a),(l===1||ya===r)&&(ma===r||Wh===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(Xs(e,y)||iu(e,y,m))||eu(e,m)?h=!0:(o&&ru(e,m)||Jh(e,m)||tu(e,m)?h=!0:nu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Q(e,"alias node should not have any properties")):Qh(e,m,ma===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&Xs(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"&&Q(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;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(Re.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,d=p.length;u<d;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||Q(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Q(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)):Q(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}f(rr,"composeNode");function ou(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!qt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&Q(e,"directive name must not be less than one character in length");o!==0;){for(;De(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!le(o));break}if(le(o))break;for(r=e.position;o!==0&&!qt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&qa(e),Re.call(cl,i)?cl[i](e,i,a):fi(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)):s&&Q(e,"directives end mark is expected"),rr(e,e.lineIndent-1,ya,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&Fy.test(e.input.slice(t,e.position))&&fi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&vi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1));return}if(e.position<e.length-1)Q(e,"end of the stream or a document separator is expected");else return}f(ou,"readDocument");function Yn(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 Kh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Q(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;)ou(r);return r.documents}f(Yn,"loadDocuments");function Oy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Yn(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}f(Oy,"loadAll$1");function lu(e,t){var r=Yn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Xt("expected a single document in the stream, but found more")}}f(lu,"load$1");var Ry=lu,Iy={load:Ry},cu=Object.prototype.toString,hu=Object.prototype.hasOwnProperty,Un=65279,Py=9,gi=10,Ny=13,zy=32,Wy=33,qy=34,Zs=35,Hy=37,jy=38,Yy=39,Uy=42,uu=44,Gy=45,xa=58,Vy=61,Xy=62,Zy=63,Ky=64,du=91,pu=93,Qy=96,fu=123,Jy=124,gu=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var t0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],e0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function mu(e,t){var r,i,a,s,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&hu.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(mu,"compileStyleMap");function yu(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 Xt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Bt.repeat("0",i-t.length)+t}f(yu,"encodeHex");var r0=1,mi=2;function xu(e){this.schema=e.schema||zh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Bt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=mu(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==='"'?mi:r0,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}f(xu,"State");function Ks(e,t){for(var r=Bt.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
98
+ `,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
99
+ `&&(s+=r),s+=o;return s}f(Ks,"indentString");function ba(e,t){return`
100
+ `+Bt.repeat(" ",e.indent*t)}f(ba,"generateNextLine");function bu(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}f(bu,"testImplicitResolving");function yi(e){return e===zy||e===Py}f(yi,"isWhitespace");function Or(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Un||65536<=e&&e<=1114111}f(Or,"isPrintable");function Qs(e){return Or(e)&&e!==Un&&e!==Ny&&e!==gi}f(Qs,"isNsCharOrWhitespace");function Js(e,t,r){var i=Qs(e),a=i&&!yi(e);return(r?i:i&&e!==uu&&e!==du&&e!==pu&&e!==fu&&e!==gu)&&e!==Zs&&!(t===xa&&!a)||Qs(t)&&!yi(t)&&e===Zs||t===xa&&a}f(Js,"isPlainSafe");function Cu(e){return Or(e)&&e!==Un&&!yi(e)&&e!==Gy&&e!==Zy&&e!==xa&&e!==uu&&e!==du&&e!==pu&&e!==fu&&e!==gu&&e!==Zs&&e!==jy&&e!==Uy&&e!==Wy&&e!==Jy&&e!==Vy&&e!==Xy&&e!==Yy&&e!==qy&&e!==Hy&&e!==Ky&&e!==Qy}f(Cu,"isPlainSafeFirst");function _u(e){return!yi(e)&&e!==xa}f(_u,"isPlainSafeLast");function Cr(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}f(Cr,"codePointAt");function Gn(e){var t=/^\n* /;return t.test(e)}f(Gn,"needIndentIndicator");var ku=1,tn=2,wu=3,Su=4,xr=5;function vu(e,t,r,i,a,s,o,n){var l,c=0,h=null,u=!1,d=!1,p=i!==-1,g=-1,m=Cu(Cr(e,0))&&_u(Cr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Cr(e,l),!Or(c))return xr;m=m&&Js(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Cr(e,l),c===gi)u=!0,p&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Or(c))return xr;m=m&&Js(c,h,n),h=c}d=d||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!a(e)?ku:s===mi?xr:tn:r>9&&Gn(e)?xr:o?s===mi?xr:tn:d?Su:wu}f(vu,"chooseScalarStyle");function Tu(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===mi?'""':"''";if(!e.noCompatMode&&(t0.indexOf(t)!==-1||e0.test(t)))return e.quotingType===mi?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return bu(e,c)}switch(f(l,"testAmbiguity"),vu(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case ku:return t;case tn:return"'"+t.replace(/'/g,"''")+"'";case wu:return"|"+en(t,e.indent)+rn(Ks(t,s));case Su:return">"+en(t,e.indent)+rn(Ks(Bu(t,o),s));case xr:return'"'+Lu(t)+'"';default:throw new Xt("impossible error: invalid scalar style")}})()}f(Tu,"writeScalar");function en(e,t){var r=Gn(e)?String(t):"",i=e[e.length-1]===`
101
+ `,a=i&&(e[e.length-2]===`
102
+ `||e===`
103
+ `),s=a?"+":i?"":"-";return r+s+`
104
+ `}f(en,"blockHeader");function rn(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}f(rn,"dropEndingNewline");function Bu(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,an(e.slice(0,c),t)})(),a=e[0]===`
107
+ `||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],l=o[2];s=l[0]===" ",i+=n+(!a&&!s&&l!==""?`
108
+ `:"")+an(l,t),a=s}return i}f(Bu,"foldString");function an(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,l+=`
109
+ `+e.slice(a,s),a=s+1),o=n;return l+=`
110
+ `,e.length-a>t&&o>a?l+=e.slice(a,o)+`
111
+ `+e.slice(o+1):l+=e.slice(a),l.slice(1)}f(an,"foldLine");function Lu(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Cr(e,a),i=Pt[r],!i&&Or(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||yu(r);return t}f(Lu,"escapeString");function Au(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(xe(e,t,n,!1,!1)||typeof n>"u"&&xe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}f(Au,"writeFlowSequence");function sn(e,t,r,i){var a="",s=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(xe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&xe(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=ba(e,t)),e.dump&&gi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}f(sn,"writeBlockSequence");function Mu(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,l,c,h;for(o=0,n=s.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),xe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),xe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}f(Mu,"writeFlowMapping");function Eu(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,l,c,h,u,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Xt("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)d="",(!i||a!=="")&&(d+=ba(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),xe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&gi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=ba(e,t)),xe(e,t+1,h,!0,u)&&(e.dump&&gi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,a+=d));e.tag=s,e.dump=a||"{}"}f(Eu,"writeBlockMapping");function nn(e,t,r){var i,a,s,o,n,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,cu.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(hu.call(n.represent,l))i=n.represent[l](t,l);else throw new Xt("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(nn,"detectType");function xe(e,t,r,i,a,s,o){e.tag=null,e.dump=r,nn(e,r,!1)||nn(e,r,!0);var n=cu.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Eu(e,t,e.dump,a),d&&(e.dump="&ref_"+u+e.dump)):(Mu(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?sn(e,t-1,e.dump,a):sn(e,t,e.dump,a),d&&(e.dump="&ref_"+u+e.dump)):(Au(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Tu(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Xt("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}f(xe,"writeNode");function $u(e,t){var r=[],i=[],a,s;for(Ca(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}f($u,"getDuplicateReferences");function Ca(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Ca(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Ca(e[i[a]],t,r)}f(Ca,"inspectNode");function i0(e,t){t=t||{};var r=new xu(t);r.noRefs||$u(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),xe(r,0,i,!0,!0)?r.dump+`
112
+ `:""}f(i0,"dump$1");function a0(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.")}}f(a0,"renamed");var s0=wh,n0=Iy.load;var Dt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},hl={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function ii(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(ii,"calculateDeltaAndAngle");var yt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),o0=f(e=>({x:f(function(t,r,i){let a=0;const s=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:p,deltaX:g}=ii(i[0],i[1]);a=Dt[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:p,deltaX:g}=ii(i[i.length-1],i[i.length-2]);a=Dt[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(yt(t).x-yt(i[i.length-1]).x),n=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let p=u+d-o;p*=s==="right"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+d-l;p*=s==="right"?-1:1,a+=p}return yt(t).x+a},"x"),y:f(function(t,r,i){let a=0;const s=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:p,deltaY:g}=ii(i[0],i[1]);a=Dt[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:p,deltaY:g}=ii(i[i.length-1],i[i.length-2]);a=Dt[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(yt(t).y-yt(i[i.length-1]).y),n=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let p=u+d-o;p*=s==="up"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+d-l;p*=s==="up"?-1:1,a+=p}return yt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Vn=f(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),l0=f(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Nr=f(e=>{const t=c0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),c0=f(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a?.trim())}),t},"styles2Map"),Fu=f(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"),U=f(e=>{const{stylesArray:t}=Nr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];Fu(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),Y=f((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=Nr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:h0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),h0=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),zi={},vt={},ul;function u0(){return ul||(ul=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|&colon;)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var dl;function d0(){if(dl)return zi;dl=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.sanitizeUrl=s;var e=u0();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.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 d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var p=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return p;if(d==="http:"||d==="https:"){if(!i(p))return e.BLANK_URL;var g=new URL(p);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return p}return zi}var p0=d0(),Du=typeof global=="object"&&global&&global.Object===Object&&global,f0=typeof self=="object"&&self&&self.Object===Object&&self,be=Du||f0||Function("return this")(),_a=be.Symbol,Ou=Object.prototype,g0=Ou.hasOwnProperty,m0=Ou.toString,Kr=_a?_a.toStringTag:void 0;function y0(e){var t=g0.call(e,Kr),r=e[Kr];try{e[Kr]=void 0;var i=!0}catch{}var a=m0.call(e);return i&&(t?e[Kr]=r:delete e[Kr]),a}var x0=Object.prototype,b0=x0.toString;function C0(e){return b0.call(e)}var _0="[object Null]",k0="[object Undefined]",pl=_a?_a.toStringTag:void 0;function zr(e){return e==null?e===void 0?k0:_0:pl&&pl in Object(e)?y0(e):C0(e)}function nr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var w0="[object AsyncFunction]",S0="[object Function]",v0="[object GeneratorFunction]",T0="[object Proxy]";function Xn(e){if(!nr(e))return!1;var t=zr(e);return t==S0||t==v0||t==w0||t==T0}var Ss=be["__core-js_shared__"],fl=(function(){var e=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function B0(e){return!!fl&&fl in e}var L0=Function.prototype,A0=L0.toString;function or(e){if(e!=null){try{return A0.call(e)}catch{}try{return e+""}catch{}}return""}var M0=/[\\^$.*+?()[\]{}|]/g,E0=/^\[object .+?Constructor\]$/,$0=Function.prototype,F0=Object.prototype,D0=$0.toString,O0=F0.hasOwnProperty,R0=RegExp("^"+D0.call(O0).replace(M0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I0(e){if(!nr(e)||B0(e))return!1;var t=Xn(e)?R0:E0;return t.test(or(e))}function P0(e,t){return e?.[t]}function lr(e,t){var r=P0(e,t);return I0(r)?r:void 0}var xi=lr(Object,"create");function N0(){this.__data__=xi?xi(null):{},this.size=0}function z0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var W0="__lodash_hash_undefined__",q0=Object.prototype,H0=q0.hasOwnProperty;function j0(e){var t=this.__data__;if(xi){var r=t[e];return r===W0?void 0:r}return H0.call(t,e)?t[e]:void 0}var Y0=Object.prototype,U0=Y0.hasOwnProperty;function G0(e){var t=this.__data__;return xi?t[e]!==void 0:U0.call(t,e)}var V0="__lodash_hash_undefined__";function X0(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xi&&t===void 0?V0: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=N0;ir.prototype.delete=z0;ir.prototype.get=j0;ir.prototype.has=G0;ir.prototype.set=X0;function Z0(){this.__data__=[],this.size=0}function ja(e,t){return e===t||e!==e&&t!==t}function Ya(e,t){for(var r=e.length;r--;)if(ja(e[r][0],t))return r;return-1}var K0=Array.prototype,Q0=K0.splice;function J0(e){var t=this.__data__,r=Ya(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Q0.call(t,r,1),--this.size,!0}function tx(e){var t=this.__data__,r=Ya(t,e);return r<0?void 0:t[r][1]}function ex(e){return Ya(this.__data__,e)>-1}function rx(e,t){var r=this.__data__,i=Ya(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Me(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])}}Me.prototype.clear=Z0;Me.prototype.delete=J0;Me.prototype.get=tx;Me.prototype.has=ex;Me.prototype.set=rx;var bi=lr(be,"Map");function ix(){this.size=0,this.__data__={hash:new ir,map:new(bi||Me),string:new ir}}function ax(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ua(e,t){var r=e.__data__;return ax(t)?r[typeof t=="string"?"string":"hash"]:r.map}function sx(e){var t=Ua(this,e).delete(e);return this.size-=t?1:0,t}function nx(e){return Ua(this,e).get(e)}function ox(e){return Ua(this,e).has(e)}function lx(e,t){var r=Ua(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ne(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])}}Ne.prototype.clear=ix;Ne.prototype.delete=sx;Ne.prototype.get=nx;Ne.prototype.has=ox;Ne.prototype.set=lx;var cx="Expected a function";function Ti(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cx);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Ti.Cache||Ne),r}Ti.Cache=Ne;function hx(){this.__data__=new Me,this.size=0}function ux(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function dx(e){return this.__data__.get(e)}function px(e){return this.__data__.has(e)}var fx=200;function gx(e,t){var r=this.__data__;if(r instanceof Me){var i=r.__data__;if(!bi||i.length<fx-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ne(i)}return r.set(e,t),this.size=r.size,this}function Wr(e){var t=this.__data__=new Me(e);this.size=t.size}Wr.prototype.clear=hx;Wr.prototype.delete=ux;Wr.prototype.get=dx;Wr.prototype.has=px;Wr.prototype.set=gx;var ka=(function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Zn(e,t,r){t=="__proto__"&&ka?ka(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t,r){(r!==void 0&&!ja(e[t],r)||r===void 0&&!(t in e))&&Zn(e,t,r)}function mx(e){return function(t,r,i){for(var a=-1,s=Object(t),o=i(t),n=o.length;n--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var yx=mx(),Ru=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gl=Ru&&typeof module=="object"&&module&&!module.nodeType&&module,xx=gl&&gl.exports===Ru,ml=xx?be.Buffer:void 0,yl=ml?ml.allocUnsafe:void 0;function bx(e,t){if(t)return e.slice();var r=e.length,i=yl?yl(r):new e.constructor(r);return e.copy(i),i}var xl=be.Uint8Array;function Cx(e){var t=new e.constructor(e.byteLength);return new xl(t).set(new xl(e)),t}function _x(e,t){var r=t?Cx(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function kx(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var bl=Object.create,wx=(function(){function e(){}return function(t){if(!nr(t))return{};if(bl)return bl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Iu(e,t){return function(r){return e(t(r))}}var Pu=Iu(Object.getPrototypeOf,Object),Sx=Object.prototype;function Ga(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Sx;return e===r}function vx(e){return typeof e.constructor=="function"&&!Ga(e)?wx(Pu(e)):{}}function Bi(e){return e!=null&&typeof e=="object"}var Tx="[object Arguments]";function Cl(e){return Bi(e)&&zr(e)==Tx}var Nu=Object.prototype,Bx=Nu.hasOwnProperty,Lx=Nu.propertyIsEnumerable,wa=Cl((function(){return arguments})())?Cl:function(e){return Bi(e)&&Bx.call(e,"callee")&&!Lx.call(e,"callee")},Sa=Array.isArray,Ax=9007199254740991;function zu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ax}function Va(e){return e!=null&&zu(e.length)&&!Xn(e)}function Mx(e){return Bi(e)&&Va(e)}function Ex(){return!1}var Wu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_l=Wu&&typeof module=="object"&&module&&!module.nodeType&&module,$x=_l&&_l.exports===Wu,kl=$x?be.Buffer:void 0,Fx=kl?kl.isBuffer:void 0,Kn=Fx||Ex,Dx="[object Object]",Ox=Function.prototype,Rx=Object.prototype,qu=Ox.toString,Ix=Rx.hasOwnProperty,Px=qu.call(Object);function Nx(e){if(!Bi(e)||zr(e)!=Dx)return!1;var t=Pu(e);if(t===null)return!0;var r=Ix.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&qu.call(r)==Px}var zx="[object Arguments]",Wx="[object Array]",qx="[object Boolean]",Hx="[object Date]",jx="[object Error]",Yx="[object Function]",Ux="[object Map]",Gx="[object Number]",Vx="[object Object]",Xx="[object RegExp]",Zx="[object Set]",Kx="[object String]",Qx="[object WeakMap]",Jx="[object ArrayBuffer]",tb="[object DataView]",eb="[object Float32Array]",rb="[object Float64Array]",ib="[object Int8Array]",ab="[object Int16Array]",sb="[object Int32Array]",nb="[object Uint8Array]",ob="[object Uint8ClampedArray]",lb="[object Uint16Array]",cb="[object Uint32Array]",gt={};gt[eb]=gt[rb]=gt[ib]=gt[ab]=gt[sb]=gt[nb]=gt[ob]=gt[lb]=gt[cb]=!0;gt[zx]=gt[Wx]=gt[Jx]=gt[qx]=gt[tb]=gt[Hx]=gt[jx]=gt[Yx]=gt[Ux]=gt[Gx]=gt[Vx]=gt[Xx]=gt[Zx]=gt[Kx]=gt[Qx]=!1;function hb(e){return Bi(e)&&zu(e.length)&&!!gt[zr(e)]}function ub(e){return function(t){return e(t)}}var Hu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,di=Hu&&typeof module=="object"&&module&&!module.nodeType&&module,db=di&&di.exports===Hu,vs=db&&Du.process,wl=(function(){try{var e=di&&di.require&&di.require("util").types;return e||vs&&vs.binding&&vs.binding("util")}catch{}})(),Sl=wl&&wl.isTypedArray,Qn=Sl?ub(Sl):hb;function ln(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var pb=Object.prototype,fb=pb.hasOwnProperty;function gb(e,t,r){var i=e[t];(!(fb.call(e,t)&&ja(i,r))||r===void 0&&!(t in e))&&Zn(e,t,r)}function mb(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var n=t[s],l=void 0;l===void 0&&(l=e[n]),a?Zn(r,n,l):gb(r,n,l)}return r}function yb(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var xb=9007199254740991,bb=/^(?:0|[1-9]\d*)$/;function ju(e,t){var r=typeof e;return t=t??xb,!!t&&(r=="number"||r!="symbol"&&bb.test(e))&&e>-1&&e%1==0&&e<t}var Cb=Object.prototype,_b=Cb.hasOwnProperty;function kb(e,t){var r=Sa(e),i=!r&&wa(e),a=!r&&!i&&Kn(e),s=!r&&!i&&!a&&Qn(e),o=r||i||a||s,n=o?yb(e.length,String):[],l=n.length;for(var c in e)(t||_b.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ju(c,l)))&&n.push(c);return n}function wb(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Sb=Object.prototype,vb=Sb.hasOwnProperty;function Tb(e){if(!nr(e))return wb(e);var t=Ga(e),r=[];for(var i in e)i=="constructor"&&(t||!vb.call(e,i))||r.push(i);return r}function Yu(e){return Va(e)?kb(e,!0):Tb(e)}function Bb(e){return mb(e,Yu(e))}function Lb(e,t,r,i,a,s,o){var n=ln(e,r),l=ln(t,r),c=o.get(l);if(c){on(e,r,c);return}var h=s?s(n,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=Sa(l),p=!d&&Kn(l),g=!d&&!p&&Qn(l);h=l,d||p||g?Sa(n)?h=n:Mx(n)?h=kx(n):p?(u=!1,h=bx(l,!0)):g?(u=!1,h=_x(l,!0)):h=[]:Nx(l)||wa(l)?(h=n,wa(n)?h=Bb(n):(!nr(n)||Xn(n))&&(h=vx(l))):u=!1}u&&(o.set(l,h),a(h,l,i,s,o),o.delete(l)),on(e,r,h)}function Uu(e,t,r,i,a){e!==t&&yx(t,function(s,o){if(a||(a=new Wr),nr(s))Lb(e,t,o,r,Uu,i,a);else{var n=i?i(ln(e,o),s,o+"",e,t,a):void 0;n===void 0&&(n=s),on(e,o,n)}},Yu)}function Gu(e){return e}function Ab(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 vl=Math.max;function Mb(e,t,r){return t=vl(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=vl(i.length-t,0),o=Array(s);++a<s;)o[a]=i[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=i[a];return n[t]=r(o),Ab(e,this,n)}}function Eb(e){return function(){return e}}var $b=ka?function(e,t){return ka(e,"toString",{configurable:!0,enumerable:!1,value:Eb(t),writable:!0})}:Gu,Fb=800,Db=16,Ob=Date.now;function Rb(e){var t=0,r=0;return function(){var i=Ob(),a=Db-(i-r);if(r=i,a>0){if(++t>=Fb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ib=Rb($b);function Pb(e,t){return Ib(Mb(e,t,Gu),e+"")}function Nb(e,t,r){if(!nr(r))return!1;var i=typeof t;return(i=="number"?Va(r)&&ju(t,r.length):i=="string"&&t in r)?ja(r[t],e):!1}function zb(e){return Pb(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&Nb(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var n=r[i];n&&e(t,n,i,s)}return t})}var Wb=zb(function(e,t,r){Uu(e,t,r)}),qb="​",Hb={curveBasis:Qi,curveBasisClosed:Ym,curveBasisOpen:Um,curveBumpX:$c,curveBumpY:Fc,curveBundle:Gm,curveCardinalClosed:Vm,curveCardinalOpen:Xm,curveCardinal:Ic,curveCatmullRomClosed:Zm,curveCatmullRomOpen:Km,curveCatmullRom:Nc,curveLinear:ua,curveLinearClosed:Qm,curveMonotoneX:Yc,curveMonotoneY:Uc,curveNatural:Vc,curveStep:Xc,curveStepAfter:Kc,curveStepBefore:Zc},jb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yb=f(function(e,t){const r=Vu(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);na(o),i=Tt(i,[...o])}else i=r.args;if(!i)return;let a=An(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Vu=f(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${jb.source})(?=[}][%]{2}).*
113
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const a=[];for(;(i=hi.exec(e))!==null;)if(i.index===hi.lastIndex&&hi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:s,args:o})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return F.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Ub=f(function(e){return e.replace(hi,"")},"removeDirectives"),Gb=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Jn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Hb[r]??t}f(Jn,"interpolateToCurve");function Xu(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?p0.sanitizeUrl(r):r}f(Xu,"formatUrl");var Vb=f((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){F.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function to(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(to,"distance");function Zu(e){let t,r=0;e.forEach(a=>{r+=to(a,t),t=a});const i=r/2;return eo(e,i)}f(Zu,"traverseEdge");function Ku(e){return e.length===1?e[0]:Zu(e)}f(Ku,"calcLabelPosition");var Tl=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),eo=f((e,t)=>{let r,i=t;for(const a of e){if(r){const s=to(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Tl((1-o)*r.x+o*a.x,5),y:Tl((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Xb=f((e,t,r)=>{F.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=eo(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function Qu(e,t,r){const i=structuredClone(r);F.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=eo(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}f(Qu,"calcTerminalLabelPosition");function Ju(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}}f(Ju,"getStylesFromArray");var Bl=0,Zb=f(()=>(Bl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Bl),"generateId");function td(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(td,"makeRandomHex");var Kb=f(e=>td(e.length),"random"),Qb=f(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"),Jb=f(function(e,t){const r=t.text.replace(Pr.lineBreakRegex," "),[,i]=Xa(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),t1=Ti((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Pr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=Le(`${o} `,r),c=Le(s,r);if(l>t){const{hyphenatedStrings:d,remainingWord:p}=e1(o,t,"-",r);a.push(s,...d),s=p}else c+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),e1=Ti((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const c=`${o}${n}`;if(Le(c,i)>=t){const u=l+1,d=a.length===u,p=`${c}${r}`;s.push(d?c:p),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ed(e,t){return ro(e,t).height}f(ed,"calculateTextHeight");function Le(e,t){return ro(e,t).width}f(Le,"calculateTextWidth");var ro=Ti((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Xa(r),o=["sans-serif",i],n=e.split(Pr.lineBreakRegex),l=[],c=ht("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Qb();y.text=m||qb;const x=Jb(h,y).style("font-size",s).style("font-weight",a).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}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}`),Mr,r1=(Mr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(Mr,"InitIDGenerator"),Mr),Wi,i1=f(function(e){return Wi=Wi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Wi.innerHTML=e,unescape(Wi.textContent)},"entityDecode");function io(e){return"str"in e}f(io,"isDetailedError");var a1=f((e,t,r,i)=>{if(!i)return;const a=e.node()?.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Xa=f(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 ao(e,t){return Wb({},e,t)}f(ao,"cleanAndMerge");var oe={assignWithDepth:Tt,wrapLabel:t1,calculateTextHeight:ed,calculateTextWidth:Le,calculateTextDimensions:ro,cleanAndMerge:ao,detectInit:Yb,detectDirective:Vu,isSubstringInArray:Gb,interpolateToCurve:Jn,calcLabelPosition:Ku,calcCardinalityPosition:Xb,calcTerminalLabelPosition:Qu,formatUrl:Xu,getStylesFromArray:Ju,generateId:Zb,random:Kb,runFunc:Vb,entityDecode:i1,insertTitle:a1,isLabelCoordinateInPath:rd,parseFontSize:Xa,InitIDGenerator:r1},s1=f(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"),cr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),iS=f((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function It(e){return e??null}f(It,"handleUndefinedAttr");function rd(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}f(rd,"isLabelCoordinateInPath");const n1=Object.freeze({left:0,top:0,width:16,height:16}),va=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),id=Object.freeze({...n1,...va}),o1=Object.freeze({...id,body:"",hidden:!1}),l1=Object.freeze({width:null,height:null}),c1=Object.freeze({...l1,...va}),h1=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:n};return Ts(c)?c:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Ts(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Ts(n,r)?n:null}return null},Ts=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function u1(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 Ll(e,t){const r=u1(e,t);for(const i in o1)i in va?i in e&&!(i in r)&&(r[i]=va[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function d1(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function Al(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=Ll(i[n]||a[n],s)}return o(t),r.forEach(o),Ll(e,s)}function p1(e,t){if(e.icons[t])return Al(e,t,[]);const r=d1(e,[t])[t];return r?Al(e,t,r):null}const f1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,g1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ml(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(f1);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=g1.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function m1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function y1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function x1(e,t,r){const i=m1(e);return y1(i.defs,t+i.content+r)}const b1=e=>e==="unset"||e==="undefined"||e==="none";function C1(e,t){const r={...id,...e},i={...c1,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let w;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:w=a.height/2+a.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}C%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),y.length&&(s=x1(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,c=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Ml(u,l/c)):(h=o==="auto"?l:o,u=n===null?Ml(h,c/l):n==="auto"?c:n);const d={},p=(m,y)=>{b1(y)||(d[m]=y.toString())};p("width",h),p("height",u);const g=[a.left,a.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:s}}const _1=/\sid="(\S+)"/g,El=new Map;function k1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=El.get(e)||0;return El.set(e,t+1),t?`${e}${t}`:e}function w1(e){const t=[];let r;for(;r=_1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=k1(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function S1(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 so(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hr=so();function ad(e){hr=e}var pi={exec:()=>null};function ut(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Ht.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var v1=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ht={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")},T1=/^(?:[ \t]*(?:\n|$))+/,B1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Li=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,A1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,no=/(?:[*+-]|\d{1,9}[.)])/,sd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nd=ut(sd).replace(/bull/g,no).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(),M1=ut(sd).replace(/bull/g,no).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(),oo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E1=/^[^\n]+/,lo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$1=ut(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F1=ut(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,no).getRegex(),Za="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",co=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,D1=ut("^ {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",co).replace("tag",Za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),od=ut(oo).replace("hr",Li).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",Za).getRegex(),O1=ut(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",od).getRegex(),ho={blockquote:O1,code:B1,def:$1,fences:L1,heading:A1,hr:Li,html:D1,lheading:nd,list:F1,newline:T1,paragraph:od,table:pi,text:E1},$l=ut("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Li).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",Za).getRegex(),R1={...ho,lheading:M1,table:$l,paragraph:ut(oo).replace("hr",Li).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$l).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",Za).getRegex()},I1={...ho,html:ut(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",co).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:pi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ut(oo).replace("hr",Li).replace("heading",` *#{1,6} *[^
114
+ ]`).replace("lheading",nd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},P1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,N1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ld=/^( {2,}|\\)\n(?!\s*$)/,z1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ka=/[\p{P}\p{S}]/u,uo=/[\s\p{P}\p{S}]/u,cd=/[^\s\p{P}\p{S}]/u,W1=ut(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uo).getRegex(),hd=/(?!~)[\p{P}\p{S}]/u,q1=/(?!~)[\s\p{P}\p{S}]/u,H1=/(?:[^\s\p{P}\p{S}]|~)/u,j1=ut(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",v1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ud=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Y1=ut(ud,"u").replace(/punct/g,Ka).getRegex(),U1=ut(ud,"u").replace(/punct/g,hd).getRegex(),dd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G1=ut(dd,"gu").replace(/notPunctSpace/g,cd).replace(/punctSpace/g,uo).replace(/punct/g,Ka).getRegex(),V1=ut(dd,"gu").replace(/notPunctSpace/g,H1).replace(/punctSpace/g,q1).replace(/punct/g,hd).getRegex(),X1=ut("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cd).replace(/punctSpace/g,uo).replace(/punct/g,Ka).getRegex(),Z1=ut(/\\(punct)/,"gu").replace(/punct/g,Ka).getRegex(),K1=ut(/^<(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(),Q1=ut(co).replace("(?:-->|$)","-->").getRegex(),J1=ut("^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",Q1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ta=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,t2=ut(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ta).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pd=ut(/^!?\[(label)\]\[(ref)\]/).replace("label",Ta).replace("ref",lo).getRegex(),fd=ut(/^!?\[(ref)\](?:\[\])?/).replace("ref",lo).getRegex(),e2=ut("reflink|nolink(?!\\()","g").replace("reflink",pd).replace("nolink",fd).getRegex(),Fl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,po={_backpedal:pi,anyPunctuation:Z1,autolink:K1,blockSkip:j1,br:ld,code:N1,del:pi,emStrongLDelim:Y1,emStrongRDelimAst:G1,emStrongRDelimUnd:X1,escape:P1,link:t2,nolink:fd,punctuation:W1,reflink:pd,reflinkSearch:e2,tag:J1,text:z1,url:pi},r2={...po,link:ut(/^!?\[(label)\]\((.*?)\)/).replace("label",Ta).getRegex(),reflink:ut(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ta).getRegex()},cn={...po,emStrongRDelimAst:V1,emStrongLDelim:U1,url:ut(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Fl).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:ut(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Fl).getRegex()},i2={...cn,br:ut(ld).replace("{2,}","*").getRegex(),text:ut(cn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qi={normal:ho,gfm:R1,pedantic:I1},Qr={normal:po,gfm:cn,breaks:i2,pedantic:r2},a2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dl=e=>a2[e];function fe(e,t){if(t){if(Ht.escapeTest.test(e))return e.replace(Ht.escapeReplace,Dl)}else if(Ht.escapeTestNoEncode.test(e))return e.replace(Ht.escapeReplaceNoEncode,Dl);return e}function Ol(e){try{e=encodeURI(e).replace(Ht.percentDecode,"%")}catch{return null}return e}function Rl(e,t){let r=e.replace(Ht.findPipe,(s,o,n)=>{let l=!1,c=o;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Ht.splitPipe),a=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(;a<i.length;a++)i[a]=i[a].trim().replace(Ht.slashPipe,"|");return i}function Jr(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function s2(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 Il(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function n2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
115
+ `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
116
+ `)}var Ba=class{options;rules;lexer;constructor(t){this.options=t||hr}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:Jr(i,`
117
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=n2(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:a}}}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 a=Jr(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.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:Jr(r[0],`
118
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Jr(r[0],`
119
+ `).split(`
120
+ `),a="",s="",o=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
121
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
122
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
123
+ ${h}`:h,s=s?`${s}
124
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=d,i.length===0)break;let p=o.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=g.raw+`
125
+ `+i.join(`
126
+ `),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(p?.type==="list"){let g=p,m=g.raw+`
127
+ `+i.join(`
128
+ `),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-p.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
129
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
130
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),p=t.split(`
131
+ `,1)[0],g=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(p)&&(h+=p+`
132
+ `,t=t.substring(p.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),C=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),k=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
133
+ `,1)[0],D;if(p=v,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),D=p):D=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||k.test(p)||L.test(p)||b.test(p)||C.test(p))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!p.trim())u+=`
134
+ `+D.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(d)||k.test(d)||C.test(d))break;u+=`
135
+ `+p}!g&&!p.trim()&&(g=!0),h+=v+`
136
+ `,t=t.substring(v.length+1),d=D.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!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,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}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," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=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:a,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Rl(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
137
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let n of a)this.rules.other.tableAlignRight.test(n)?o.align.push("right"):this.rules.other.tableAlignCenter.test(n)?o.align.push("center"):this.rules.other.tableAlignLeft.test(n)?o.align.push("left"):o.align.push(null);for(let n=0;n<i.length;n++)o.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:o.align[n]});for(let n of s)o.rows.push(Rl(n,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
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 o=Jr(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=s2(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Il(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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 a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Il(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,o,n,l=s,c=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(n=[...o].length,a[3]||a[4]){l+=n;continue}else if((a[5]||a[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...a[0]][0].length,d=t.slice(0,s+a.index+u+n);if(Math.min(s,n)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(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,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,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}}}},se=class hn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hr,this.options.tokenizer=this.options.tokenizer||new Ba,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:Ht,block:qi.normal,inline:Qr.normal};this.options.pedantic?(r.block=qi.pedantic,r.inline=Qr.pedantic):this.options.gfm&&(r.block=qi.gfm,this.options.breaks?r.inline=Qr.breaks:r.inline=Qr.gfm),this.tokenizer.rules=r}static get rules(){return{block:qi,inline:Qr}}static lex(t,r){return new hn(r).lex(t)}static lexInline(t,r){return new hn(r).inlineTokens(t)}lex(t){t=t.replace(Ht.carriageReturn,`
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(Ht.tabCharGlobal," ").replace(Ht.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(o=>(a=o.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let o=r.at(-1);a.raw.length===1&&o!==void 0?o.raw+=`
140
+ `:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
141
+ `)?"":`
142
+ `)+a.raw,o.text+=`
143
+ `+a.text,this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
144
+ `)?"":`
145
+ `)+a.raw,o.text+=`
146
+ `+a.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
147
+ `)?"":`
148
+ `)+a.raw,o.text+=`
149
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a),i=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
150
+ `)?"":`
151
+ `)+a.raw,o.text+=`
152
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,a=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,n="";for(;t;){o||(n=""),o=!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,n)){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),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),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)!=="_"&&(n=l.raw.slice(-1)),o=!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}},La=class{options;parser;constructor(t){this.options=t||hr}space(t){return""}code({text:t,lang:r,escaped:i}){let a=(r||"").match(Ht.notSpaceStart)?.[0],s=t.replace(Ht.endingNewline,"")+`
153
+ `;return a?'<pre><code class="language-'+fe(a)+'">'+(i?s:fe(s,!0))+`</code></pre>
154
+ `:"<pre><code>"+(i?s:fe(s,!0))+`</code></pre>
155
+ `}blockquote({tokens:t}){return`<blockquote>
156
+ ${this.parser.parse(t)}</blockquote>
157
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
158
+ `}hr(t){return`<hr>
159
+ `}list(t){let r=t.ordered,i=t.start,a="";for(let n=0;n<t.items.length;n++){let l=t.items[n];a+=this.listitem(l)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
160
+ `+a+"</"+s+`>
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>
162
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
163
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
164
+ <thead>
165
+ `+r+`</thead>
166
+ `+a+`</table>
167
+ `}tablerow({text:t}){return`<tr>
168
+ ${t}</tr>
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 a=this.parser.parseInline(i),s=Ol(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+fe(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=Ol(t);if(s===null)return fe(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${fe(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:fe(t.text)}},fo=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""}},ne=class un{options;renderer;textRenderer;constructor(t){this.options=t||hr,this.options.renderer=this.options.renderer||new La,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fo}static parse(t,r){return new un(r).parse(t)}static parseInline(t,r){return new un(r).parseInline(t)}parse(t,r=!0){let i="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let o=s;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"def":{i+=this.renderer.def(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let n=o,l=this.renderer.text(n);for(;a+1<t.length&&t[a+1].type==="text";)n=t[++a],l+=`
171
+ `+this.renderer.text(n);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 n='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let o=s;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let n='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},ai=class{options;block;constructor(t){this.options=t||hr}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?se.lex:se.lexInline}provideParser(){return this.block?ne.parse:ne.parseInline}},o2=class{defaults=so();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ne;Renderer=La;TextRenderer=fo;Lexer=se;Tokenizer=Ba;Hooks=ai;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of s.rows)for(let n of o)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=a;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let n=s[o].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new La(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ba(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new ai;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=s[n];ai.passThroughHooks.has(o)?s[n]=h=>{if(this.defaults.async&&ai.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await l.call(s,h);return c.call(s,d)})();let u=l.call(s,h);return c.call(s,u)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(s,h);return d===!1&&(d=await c.apply(s,h)),d})();let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return se.lex(t,r??this.defaults)}parser(t,r){return ne.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?se.lex:se.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?ne.parse:ne.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?se.lex:se.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?ne.parse:ne.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
172
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},ar=new o2;function pt(e,t){return ar.parse(e,t)}pt.options=pt.setOptions=function(e){return ar.setOptions(e),pt.defaults=ar.defaults,ad(pt.defaults),pt};pt.getDefaults=so;pt.defaults=hr;pt.use=function(...e){return ar.use(...e),pt.defaults=ar.defaults,ad(pt.defaults),pt};pt.walkTokens=function(e,t){return ar.walkTokens(e,t)};pt.parseInline=ar.parseInline;pt.Parser=ne;pt.parser=ne.parse;pt.Renderer=La;pt.TextRenderer=fo;pt.Lexer=se;pt.lexer=se.lex;pt.Tokenizer=Ba;pt.Hooks=ai;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;ne.parse;se.lex;function gd(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 a=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(a.length){var s=new RegExp(`
173
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
174
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
175
+ `)&&(u=String(n).split(`
176
+ `).map(function(d,p){return p===0?d:""+h+d}).join(`
177
+ `)),o+=u+i[l+1]}),o}var l2={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},dn=new Map,md=new Map,c2=f(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(F.debug("Registering icon pack:",t.name),"loader"in t)md.set(t.name,t.loader);else if("icons"in t)dn.set(t.name,t.icons);else throw F.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),yd=f(async(e,t)=>{const r=h1(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 a=dn.get(i);if(!a){const o=md.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},dn.set(i,a)}catch(n){throw F.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p1(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),h2=f(async e=>{try{return await yd(e),!0}catch{return!1}},"isIconAvailable"),Ai=f(async(e,t,r)=>{let i;try{i=await yd(e,t?.fallbackPrefix)}catch(o){F.error(o),i=l2}const a=C1(i,t),s=S1(w1(a.body),{...a.attributes,...r});return Jt(s,Ot())},"getIconSVG");function xd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
178
+ `).replace(/\n{2,}/g,`
179
+ `),a=gd(i);return t===!1?a.replace(/ /g,"&nbsp;"):a}f(xd,"preprocessMarkdown");function bd(e,t={}){const r=xd(e,t),i=pt.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
180
+ `).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&a[s].push({content:d,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{o(l)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}f(bd,"markdownToLines");function Cd(e,{markdownAutoWrap:t}={}){const r=pt.lexer(e);function i(a){return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${a.tokens?.map(i).join("")}</strong>`:a.type==="em"?`<em>${a.tokens?.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${a.tokens?.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(F.warn(`Unsupported markdown: ${a.type}`),a.raw)}return f(i,"output"),r.map(i).join("")}f(Cd,"markdownToHTML");function _d(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(_d,"splitTextToChars");function kd(e,t){const r=_d(t.content);return go(e,[],r,t.type)}f(kd,"splitWordToFitWidth");function go(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?go(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(go,"splitWordToFitWidthRecursion");function wd(e,t){if(e.some(({content:r})=>r.includes(`
181
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Aa(e,t)}f(wd,"splitLineToFitWidth");function Aa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Aa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=kd(t,s);r.push([n]),l.content&&e.unshift(l)}return Aa(e,t,r)}f(Aa,"splitLineToFitWidthRecursion");function pn(e,t){t&&e.attr("style",t)}f(pn,"applyStyle");async function Sd(e,t,r,i,a=!1,s=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const n=o.append("xhtml:div"),l=Fr(t.label)?await Mn(t.label.replace(Pr.lineBreakRegex,`
182
+ `),s):Jt(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),pn(h,t.labelStyle),h.attr("class",`${c} ${i}`),pn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),n.style("max-width",r+"px"),n.style("text-align","center"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(Sd,"addHtmlSpan");function Qa(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")}f(Qa,"createTspan");function vd(e,t,r){const i=e.append("text"),a=Qa(i,1,t);Ja(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}f(vd,"computeWidthOfText");function u2(e,t,r){const i=e.append("text"),a=Qa(i,1,t);Ja(a,[{content:r,type:"normal"}]);const s=a.node()?.getBoundingClientRect();return s&&i.remove(),s}f(u2,"computeDimensionOfText");function Td(e,t,r,i=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),n=s.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=f(d=>vd(s,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:wd(c,h);for(const d of u){const p=Qa(n,l,1.1);Ja(p,d),l++}}if(i){const c=n.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),s.node()}else return n.node()}f(Td,"createFormattedText");function Ja(e,t){e.text(""),t.forEach((r,i)=>{const a=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?a.text(r.content):a.text(" "+r.content)})}f(Ja,"updateTextContentAndStyles");async function Bd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await h2(n)?await Ai(n,void 0,{class:"label-icon"}):`<i class='${Jt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(Bd,"replaceIconSubstring");var ze=f(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,isNode:o=!0,width:n=200,addSvgBackground:l=!1}={},c)=>{if(F.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",l),s){const h=Cd(t,c),u=await Bd(cr(h),c),d=t.replace(/\\\\/g,"\\"),p={isNode:o,label:Fr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await Sd(e,p,n,a,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=bd(h.replace("<br>","<br/>"),c),d=Td(n,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).select("text").attr("style",g)}return d}},"createText");function Bs(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*n+i,l[1]=(c-i)*n+(h-a)*o+a}}}function d2(e,t){return e[0]===t[0]&&e[1]===t[1]}function p2(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const c of o)Bs(c,n,a);const l=(function(c,h,u){const d=[];for(const b of c){const C=[...b];d2(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&d.push(C)}const p=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let C=0;C<b.length-1;C++){const w=b[C],k=b[C+1];if(w[1]!==k[1]){const L=Math.min(w[1],k[1]);g.push({ymin:L,ymax:Math.max(w[1],k[1]),x:L===w[1]?w[0]:k[0],islope:(k[0]-w[0])/(k[1]-w[1])})}}if(g.sort(((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax))),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let C=0;C<g.length&&!(g[C].ymin>y);C++)b=C;g.splice(0,b+1).forEach((C=>{m.push({s:y,edge:C})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const w=m[b].edge,k=m[C].edge;p.push([[Math.round(w.x),y],[Math.round(k.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return p})(o,s,i);if(a){for(const c of o)Bs(c,n,-a);(function(c,h,u){const d=[];c.forEach((p=>d.push(...p))),Bs(d,h,u)})(l,n,-a)}return l}function Mi(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),p2(e,a,i,s||1)}class mo{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Mi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function ts(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 f2 extends mo{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Mi(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of a)ts([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class g2 extends mo{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class m2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Mi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=ts(n),c=l/a,h=Math.ceil(c)-1,u=l-h*a,d=(n[0][0]+n[1][0])/2-a/4,p=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=p+u+g*a,y=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class y2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Mi(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,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=ts(o),l=Math.floor(n/(i+a)),c=(n+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(i+a),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),s}}class x2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Mi(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=ts(s),n=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,p=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.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))}})),a}}const Gt={};class b2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const C2=0,Ls=1,Pl=2,Hi={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 As(e,t){return e.type===t}function yo(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:C2,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ls,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Pl,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!As(s,Pl);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return yo("M0,0"+e);a++,o=Hi[s.text],i=s.text}else As(s,Ls)?o=Hi[i]:(a++,o=Hi[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!As(c,Ls))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Hi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Ld(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function Ad(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=a+(a-l)):(u=i,d=a),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,d]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-n),g=a+(a-l)):(p=i,g=a);const m=i+2*(p-i)/3,y=a+2*(g-a)/3,x=u+2*(p-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),n=p,l=g,i=u,a=d;break}case"Q":{const[u,d,p,g]=h,m=i+2*(u-i)/3,y=a+2*(d-a)/3,x=p+2*(u-p)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),n=u,l=d,i=p,a=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(Md(i,a,y,x,u,d,p,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=c}return t}function ti(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Md(e,t,r,i,a,s,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=ti(e,t,-h),[r,i]=ti(r,i,-h);const R=(e-r)/2,B=(t-i)/2;let A=R*R/(a*a)+B*B/(s*s);A>1&&(A=Math.sqrt(A),a*=A,s*=A);const T=a*a,$=s*s,M=T*$-T*B*B-$*R*R,q=T*B*B+$*R*R,V=(n===l?-1:1)*Math.sqrt(Math.abs(M/q));m=V*a*B/s+(e+r)/2,y=V*-s*R/a+(t+i)/2,p=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const R=g,B=r,A=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=Md(r=m+a*Math.cos(g),i=y+s*Math.sin(g),B,A,a,s,o,0,l,[g,R,m,y])}x=g-p;const b=Math.cos(p),C=Math.sin(p),w=Math.cos(g),k=Math.sin(g),L=Math.tan(x/4),v=4/3*a*L,D=4/3*s*L,I=[e,t],O=[e+v*C,t-D*b],E=[r+v*k,i-D*w],N=[r,i];if(O[0]=2*I[0]-O[0],O[1]=2*I[1]-O[1],c)return[O,E,N].concat(d);{d=[O,E,N].concat(d);const R=[];for(let B=0;B<d.length;B+=3){const A=ti(d[B][0],d[B][1],h),T=ti(d[B+1][0],d[B+1][1],h),$=ti(d[B+2][0],d[B+2][1],h);R.push([A[0],A[1],T[0],T[1],$[0],$[1]])}return R}}const _2={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return Ma(e,t,r)},ellipse:function(e,t,r,i,a){const s=$d(r,i,a);return fn(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Ie(e,t,r,i,a,!0)}};function Ed(e,t,r,i,a){return{type:"path",ops:Ie(e,t,r,i,a)}}function ea(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Ie(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Ie(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Ed(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function k2(e,t,r,i,a){return(function(s,o){return ea(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Nl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ji(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:ji(r[0],1.5*(1+.22*t.roughness),ql(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=ji(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ji(o,1.5*(1+.22*t.roughness),ql(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function $d(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=at(o*l,r),n+=at(n*l,r),{increment:s,rx:o,ry:n}}function fn(e,t,r,i){const[a,s]=Hl(i.increment,e,t,i.rx,i.ry,1,i.increment*Ma(.1,Ma(.4,1,r),r),r);let o=Ea(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Hl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ea(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function zl(e,t,r,i,a,s,o,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=at(.01*u,l),d+=at(.01*d,l);let p=a,g=s;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=jl(y,c,h,u,d,p,g,1,l);if(!l.disableMultiStroke){const b=jl(y,c,h,u,d,p,g,1.5,l);x.push(...b)}return o&&(n?x.push(...Ie(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...Ie(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:x}}function Wl(e,t){const r=Ad(Ld(yo(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Ie(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,p]=n;i.push(...w2(l,c,h,u,d,p,s,t)),s=[d,p];break}case"Z":i.push(...Ie(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Ms(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+at(a,t),i[0][1]+at(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+at(a,t),i[o][1]+at(a,t)]})}}return{type:"fillPath",ops:r}}function yr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Gt[a])switch(a){case"zigzag":Gt[a]||(Gt[a]=new f2(i));break;case"cross-hatch":Gt[a]||(Gt[a]=new g2(i));break;case"dots":Gt[a]||(Gt[a]=new m2(i));break;case"dashed":Gt[a]||(Gt[a]=new y2(i));break;case"zigzag-line":Gt[a]||(Gt[a]=new x2(i));break;default:a="hachure",Gt[a]||(Gt[a]=new mo(i))}return Gt[a]})(t,_2).fillPolygons(e,t)}function ql(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Fd(e){return e.randomizer||(e.randomizer=new b2(e.seed||0)),e.randomizer.next()}function Ma(e,t,r,i=1){return r.roughness*i*(Fd(r)*(t-e)+e)}function at(e,t,r=1){return Ma(-e,e,t,r)}function Ie(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=gn(e,t,r,i,a,!0,!1);if(o)return n;const l=gn(e,t,r,i,a,!0,!0);return n.concat(l)}function gn(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*Fd(a);let p=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;p=at(p,a,c),g=at(g,a,c);const m=[],y=()=>at(u,a,c),x=()=>at(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:at(h,a,c)),t+(b?0:at(h,a,c))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*d+x(),g+t+(i-t)*d+x(),p+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function ji(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+at(t,r),e[a][1]+at(t,r)]),a===e.length-1&&i.push([e[a][0]+at(t,r),e[a][1]+at(t,r)]);return Ea(i,null,r)}function Ea(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...gn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Hl(e,t,r,i,a,s,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=at(.5,n)-Math.PI/2;c.push([at(s,n)+t+.9*i*Math.cos(h-e),at(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const p=[at(s,n)+t+i*Math.cos(d),at(s,n)+r+a*Math.sin(d)];l.push(p),c.push(p)}c.push([at(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),at(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([at(s,n)+t+.98*i*Math.cos(h+o),at(s,n)+r+.98*a*Math.sin(h+o)]),c.push([at(s,n)+t+.9*i*Math.cos(h+.5*o),at(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function jl(e,t,r,i,a,s,o,n,l){const c=s+at(.1,l),h=[];h.push([at(n,l)+t+.9*i*Math.cos(c-e),at(n,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([at(n,l)+t+i*Math.cos(u),at(n,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Ea(h,null,l)}function w2(e,t,r,i,a,s,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:at(c[0],n)),o[1]+(d?0:at(c[0],n))]}),h=d?[a,s]:[a+at(c[p],n),s+at(c[p],n)],l.push({op:"bcurveTo",data:[e+at(c[p],n),t+at(c[p],n),r+at(c[p],n),i+at(c[p],n),h[0],h[1]]});return l}function ei(e){return[...e]}function Yl(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(ei(e[0]),ei(e[1]),ei(e[2]),ei(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(ei(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function ra(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function S2(e,t,r){const i=ra(t,r);if(i===0)return ra(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),ra(e,Ge(t,r,a))}function Ge(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function mn(e,t,r,i){const a=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let p=3*h[0]-2*c[0]-d[0];p*=p;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,p<m&&(p=m),g<y&&(g=y),p+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(ra(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Ge(l,c,.5),p=Ge(c,h,.5),g=Ge(h,u,.5),m=Ge(d,p,.5),y=Ge(p,g,.5),x=Ge(m,y,.5);mn([l,d,m,x],0,r,a),mn([x,y,g,u],0,r,a)}var s,o;return a}function v2(e,t){return $a(e,0,e.length,t)}function $a(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=S2(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?($a(e,t,c+1,i,s),$a(e,c,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Es(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)mn(e,3*s,t,i);return r&&r>0?$a(i,0,i.length,r):i}const Zt="none";class Fa{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,a,s){const o=this._o(s);return this._d("line",[Ed(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=k2(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(Ms([c],o)):n.push(yr([c],o))}return o.stroke!==Zt&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=$d(i,a,o),c=fn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=fn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(yr([c.estimatedPoints],o));return o.stroke!==Zt&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ea(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const c=this._o(l),h=[],u=zl(t,r,i,a,s,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const p=zl(t,r,i,a,s,o,!0,!1,d);p.type="fillPath",h.push(p)}else h.push((function(d,p,g,m,y,x,b){const C=d,w=p;let k=Math.abs(g/2),L=Math.abs(m/2);k+=at(.01*k,b),L+=at(.01*L,b);let v=y,D=x;for(;v<0;)v+=2*Math.PI,D+=2*Math.PI;D-v>2*Math.PI&&(v=0,D=2*Math.PI);const I=(D-v)/b.curveStepCount,O=[];for(let E=v;E<=D;E+=I)O.push([C+k*Math.cos(E),w+L*Math.sin(E)]);return O.push([C+k*Math.cos(D),w+L*Math.sin(D)]),O.push([C,w]),yr([O],b)})(t,r,i,a,s,o,c));return c.stroke!==Zt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],s=Nl(t,i);if(i.fill&&i.fill!==Zt)if(i.fillStyle==="solid"){const o=Nl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Es(Yl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Es(Yl(c),10,(1+i.roughness)/2))}o.length&&a.push(yr([o],i))}return i.stroke!==Zt&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=ea(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Ms([t],i)):a.push(yr([t],i))),i.stroke!==Zt&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Zt,o=i.stroke!==Zt,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const p=Ad(Ld(yo(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Es(x,u)),x=[]},C=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:k,data:L}of p)switch(k){case"M":C(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const v=m.length?m[m.length-1]:y;x.push([v[0],v[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!d)return g;const w=[];for(const k of g){const L=v2(k,d);L.length&&w.push(L)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Wl(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=Wl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(Ms(l,i));else a.push(yr(l,i));return o&&(n?l.forEach((h=>{a.push(ea(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Zt};break;case"fillPath":o={d:this.opsToPath(s),stroke:Zt,strokeWidth:0,fill:i.fill||Zt};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Zt,strokeWidth:i,fill:Zt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class T2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Fa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}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,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Yi="http://www.w3.org/2000/svg";class B2{constructor(t,r){this.svg=t,this.gen=new Fa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Yi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(Yi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Yi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Yi,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}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,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new T2(e,t),svg:(e,t)=>new B2(e,t),generator:e=>new Fa(e),newSeed:()=>Fa.newSeed()},it=f(async(e,t,r)=>{let i;const a=t.useHtmlLabels||Lt(dt()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",It(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=await ze(o,Jt(cr(n),dt()),{useHtmlLabels:a,width:t.width||dt().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(a){const u=l.children[0],d=ht(l),p=u.getElementsByTagName("img");if(p){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,C=5,[w=bc.fontSize]=Xa(b),k=w*C+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}f(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:h,label:o}},"labelHelper"),$s=f(async(e,t,r)=>{const i=r.useHtmlLabels||Lt(dt()?.flowchart?.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await ze(a,Jt(cr(t),dt()),{useHtmlLabels:i,width:r.width||dt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Lt(dt()?.flowchart?.htmlLabels)){const l=s.children[0],c=ht(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),G=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function lt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(lt,"createPathFromPoints");function Pe(e,t,r,i,a,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,d=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=d+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}f(Pe,"generateFullSineWavePoints");function Ci(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(Ci,"generateCirclePoints");var L2=f((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,c=n):(a<0&&(o=-o),l=o,c=a===0?0:o*s/a),{x:r+l,y:i+c}},"intersectRect"),qr=L2;function Dd(e,t){t&&e.attr("style",t)}f(Dd,"applyStyle");async function Od(e){const t=ht(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let a=e.label;e.label&&Fr(e.label)&&(a=await Mn(e.label.replace(Pr.lineBreakRegex,`
183
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Jt(o,i)),Dd(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()}f(Od,"addHtmlLabel");var A2=f(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Lt(dt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),F.info("vertexText"+a);const s={isNode:i,label:cr(a).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Od(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const n of o){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=n.trim(),s.appendChild(l)}return s}},"createLabel"),Qe=A2,We=f((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Rd=f(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Lt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await ze(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(Lt(r.flowchart.htmlLabels)){const v=g.children[0],D=ht(g);m=v.getBoundingClientRect(),D.attr("width",m.width),D.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,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=j.svg(u),D=Y(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),I=v.path(We(b,C,y,x,0),D);w=u.insert(()=>(F.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",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=Vn(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),n){const v=p.select("span");v&&v.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return qr(t,v)},{cluster:u,labelBBox:m}},"rect"),M2=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return qr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),E2=f(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,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 d=c.append("rect");const p=u.node().appendChild(await Qe(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Lt(r.flowchart.htmlLabels)){const I=p.children[0],O=ht(p);g=I.getBoundingClientRect(),O.attr("width",g.width),O.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,C=t.height+m-g.height-6,w=t.x-x/2,k=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let v;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),O=j.svg(c),E=t.rx||t.ry?O.path(We(w,k,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):O.rectangle(w,k,x,b,{seed:a});v=c.insert(()=>E,":first-child");const N=O.rectangle(w,L,x,C,{fill:I?s:o,fillStyle:I?"hachure":"solid",stroke:l,seed:a});v=c.insert(()=>E,":first-child"),d=c.insert(()=>N)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",w).attr("y",k).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",w).attr("y",L).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-g.width/2}, ${k+1-(Lt(r.flowchart.htmlLabels)?0:3)})`);const D=v.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(I){return qr(t,I)},{cluster:c,labelBBox:g}},"roundedWithTitle"),$2=f(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Lt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await ze(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(Lt(r.flowchart.htmlLabels)){const v=g.children[0],D=ht(g);m=v.getBoundingClientRect(),D.attr("width",m.width),D.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,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=j.svg(u),D=Y(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),I=v.path(We(b,C,y,x,t.rx),D);w=u.insert(()=>(F.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",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=Vn(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),n){const v=p.select("span");v&&v.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return qr(t,v)},{cluster:u,labelBBox:m}},"kanbanSection"),F2=f((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.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,d=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const y=j.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});p=o.insert(()=>y,":first-child")}else p=n.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return qr(t,m)},{cluster:o,labelBBox:{}}},"divider"),D2=Rd,O2={rect:Rd,squareRect:D2,roundedWithTitle:E2,noteGroup:M2,divider:F2,kanbanSection:$2},Id=new Map,R2=f(async(e,t)=>{const r=t.shape||"rect",i=await O2[r](e,t);return Id.set(t.id,i),i},"insertCluster"),cS=f(()=>{Id=new Map},"clear");function Pd(e,t){return e.intersect(t)}f(Pd,"intersectNode");var I2=Pd;function Nd(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:a+c,y:s+h}}f(Nd,"intersectEllipse");var zd=Nd;function Wd(e,t,r){return zd(e,t,t,r)}f(Wd,"intersectCircle");var P2=Wd;function qd(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,c=1e-6;if(n!==0&&l!==0&&yn(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,p=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(p)<c&&Math.abs(g)<c&&yn(p,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*d-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*d;const C=x<0?(x-y)/m:(x+y)/m;return{x:b,y:C}}}f(qd,"intersectLine");function yn(e,t){return e*t>0}f(yn,"sameSign");var N2=qd;function Hd(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],p=N2(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(h,u){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),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}),s[0]):e}f(Hd,"intersectPolygon");var z2=Hd,W={node:I2,circle:P2,ellipse:zd,polygon:z2,rect:qr};function jd(e,t){const{labelStyles:r}=U(t);t.labelStyle=r;const i=rt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=j.svg(s),c=Y(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",It(n)),G(t,u),t.intersect=function(d){return F.info("Circle intersect",t,o,d),W.circle(t,o,d)},s}f(jd,"anchor");function xn(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,p=u/a,g=d/s,m=Math.sqrt(p**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*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/s,(e-x)/a);let k=Math.atan2((i-b)/s,(r-x)/a)-C;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const L=[];for(let v=0;v<20;v++){const D=v/19,I=C+D*k,O=x+a*Math.cos(I),E=b+s*Math.sin(I);L.push({x:O,y:E})}return L}f(xn,"generateArcPoints");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.width+t.padding+20,n=s.height+t.padding,l=n/2,c=l/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},...xn(-o/2,-n/2,-o/2,n/2,c,l,!1),{x:o/2,y:n/2},...xn(o/2,n/2,o/2,-n/2,c,l,!0)],d=j.svg(a),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(u),m=d.path(g,p),y=a.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)`),G(t,y),t.intersect=function(x){return W.polygon(t,u,x)},a}f(Yd,"bowTieRect");function qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(qe,"insertPolygonShape");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.height+t.padding,n=12,l=s.width+t.padding+n,c=0,h=l,u=-o,d=0,p=[{x:c+n,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+n},{x:c+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(a),x=Y(t,{}),b=lt(p),C=y.path(b,x);g=a.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=qe(a,l,o,p);return i&&g.attr("style",i),G(t,g),t.intersect=function(y){return W.polygon(t,p,y)},a}f(Ud,"card");function Gd(e,t){const{nodeStyles:r}=U(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=j.svg(i),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=lt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return W.polygon(t,o,d)},i}f(Gd,"choice");async function xo(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await it(e,t,rt(t)),l=r?.padding??n,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=j.svg(s),p=Y(t,{}),g=d.circle(0,0,c*2,p);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",It(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return G(t,h),t.calcIntersect=function(d,p){const g=d.width/2;return W.circle(d,g,p)},t.intersect=function(d){return F.info("Circle intersect",t,c,d),W.circle(t,c,d)},s}f(xo,"circle");function Vd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,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},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
184
+ M ${a.x},${a.y} L ${o.x},${o.y}`}f(Vd,"createLine");function Xd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,n=j.svg(a),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Vd(s),u=n.path(h,l),d=a.insert(()=>c,":first-child");return d.insert(()=>u),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),G(t,d),t.intersect=function(p){return F.info("crossedCircle intersect",t,{radius:s,point:p}),W.circle(t,s,p)},a}f(Xd,"crossedCircle");function Se(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(Se,"generateCirclePoints");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Se(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...Se(n/2+c*2,-c,c,20,-180,-270),...Se(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...Se(n/2,l/2,c,20,0,90)],d=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...Se(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...Se(n/2+n*.1,-c,c,20,-180,-270),...Se(n/2+n*.1,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...Se(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2,y:l/2+c}],p=j.svg(a),g=Y(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(d),C=p.path(b,{...g}),w=a.insert("g",":first-child");return w.insert(()=>C,":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)`),o.attr("transform",`translate(${-n/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),G(t,w),t.intersect=function(k){return W.polygon(t,d,k)},a}f(Zd,"curlyBraceLeft");function ve(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:p,y:g})}return o}f(ve,"generateCirclePoints");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ve(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...ve(n/2+c*2,-c,c,20,-180,-270),...ve(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...ve(n/2,l/2,c,20,0,90)],d=[{x:-n/2,y:-l/2-c},{x:n/2,y:-l/2-c},...ve(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...ve(n/2+c*2,-c,c,20,-180,-270),...ve(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...ve(n/2,l/2,c,20,0,90),{x:n/2,y:l/2+c},{x:-n/2,y:l/2+c}],p=j.svg(a),g=Y(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(d),C=p.path(b,{...g}),w=a.insert("g",":first-child");return w.insert(()=>C,":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)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),G(t,w),t.intersect=function(k){return W.polygon(t,d,k)},a}f(Kd,"curlyBraceRight");function Mt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(Mt,"generateCirclePoints");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Mt(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...Mt(n/2+c*2,-c,c,20,-180,-270),...Mt(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...Mt(n/2,l/2,c,20,0,90)],d=[...Mt(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...Mt(-n/2-c/2,-c,c,20,0,90),...Mt(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...Mt(-n/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...Mt(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...Mt(n/2+c*2,-c,c,20,-180,-270),...Mt(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...Mt(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2-c-c/2,y:l/2+c},...Mt(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...Mt(-n/2-c/2,-c,c,20,0,90),...Mt(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...Mt(-n/2+c+c/2,l/2,c,30,-180,-270)],g=j.svg(a),m=Y(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=lt(u).replace("Z",""),b=g.path(x,m),w=lt(d).replace("Z",""),k=g.path(w,m),L=lt(p),v=g.path(L,{...m}),D=a.insert("g",":first-child");return D.insert(()=>v,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>k,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),G(t,D),t.intersect=function(I){return W.polygon(t,p,I)},a}f(Qd,"curlyBraces");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=80,n=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(n,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=j.svg(a),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.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},...Ci(-y,-m/2,h,50,270,90)],C=lt(b),w=d.path(C,p),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-l/2}, ${-c/2})`),G(t,k),t.intersect=function(L){return W.polygon(t,b,L)},a}f(Jd,"curvedTrapezoid");var W2=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),q2=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),H2=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function tp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+t.padding,t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j.svg(a),g=q2(0,0,n,h,l,c),m=H2(0,c,n,h,l,c),y=p.path(g,Y(t,{})),x=p.path(m,Y(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const p=W2(0,0,n,h,l,c);u=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",It(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),G(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(p){const g=W.rect(t,p),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,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}f(tp,"cylinder");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=s.width+t.padding,l=s.height+t.padding,c=l*.2,h=-n/2,u=-l/2-c/2,{cssStyles:d}=t,p=j.svg(a),g=Y(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=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(t.padding??0)/2-(s.y-(s.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},a}f(ep,"dividedRectangle");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,rt(t)),l=s.width/2+o+5,c=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=j.svg(a),p=Y(t,{roughness:.2,strokeWidth:2.5}),g=Y(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,p),y=d.circle(0,0,c*2,g);h=a.insert("g",":first-child"),h.attr("class",It(t.cssClasses)).attr("style",It(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=a.insert("g",":first-child");const d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return G(t,h),t.intersect=function(d){return F.info("DoubleCircle intersect",t,l,d),W.circle(t,l,d)},a}f(rp,"doublecircle");function ip(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=j.svg(s),{nodeBorder:c}=r,h=Y(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=s.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),G(t,d),t.intersect=function(p){return F.info("filledCircle intersect",t,{radius:o,point:p}),W.circle(t,o,p)},s}f(ip,"filledCircle");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=s.width+(t.padding??0),l=n+s.height,c=n+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=j.svg(a),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(h),m=d.path(g,p),y=a.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=n,t.height=l,G(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},a}f(ap,"flippedTriangle");function sp(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=U(t);t.label="";const o=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=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,d=j.svg(o),p=Y(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(h,u,l,c,p),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),G(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 W.rect(t,x)},o}f(sp,"forkJoin");async function np(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=80,s=50,{shapeSvg:o,bbox:n}=await it(e,t,rt(t)),l=Math.max(a,n.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,n.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=j.svg(o),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Ci(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=lt(g),y=d.path(m,p),x=o.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),G(t,x),t.intersect=function(b){return F.info("Pill intersect",t,{radius:h,point:b}),W.polygon(t,g,b)},o}f(np,"halfRoundedRectangle");async function op(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.height+(t.padding??0),n=s.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=j.svg(a),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=n/2;const d=u/6;u=u+d;const p=o/2,g=p/2,m=u-g,y=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:u,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-u,y:0}],x=lt(y),b=c.path(x,h),C=a.insert(()=>b,":first-child");return C.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),t.width=n,t.height=o,G(t,C),t.intersect=function(w){return W.polygon(t,y,w)},a}f(op,"hexagon");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await it(e,t,rt(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:n}=t,l=j.svg(a),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=lt(h),d=l.path(u,c),p=a.insert(()=>d,":first-child");return p.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-s/2}, ${-o/2})`),G(t,p),t.intersect=function(g){return F.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},a}f(lp,"hourglass");async function cp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=t.pos==="t",p=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=Nr(t),x=-g/2,b=-p/2,C=t.label?8:0,w=j.svg(c),k=Y(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=w.rectangle(x,b,g,p,k),v=Math.max(g,h.width),D=p+h.height+C,I=w.rectangle(-v/2,-D/2,v,D,{...k,fill:"transparent",stroke:"none"}),O=c.insert(()=>L,":first-child"),E=c.insert(()=>I);if(t.icon){const N=c.append("g");N.html(`<g>${await Ai(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),B=R.width,A=R.height,T=R.x,$=R.y;N.attr("transform",`translate(${-B/2-T},${d?h.height/2+C/2-A/2-$:-h.height/2-C/2-A/2-$})`),N.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-D/2:D/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),G(t,E),t.intersect=function(N){if(F.info("iconSquare intersect",t,N),!t.label)return W.rect(t,N);const R=t.x??0,B=t.y??0,A=t.height??0;let T=[];return d?T=[{x:R-h.width/2,y:B-A/2},{x:R+h.width/2,y:B-A/2},{x:R+h.width/2,y:B-A/2+h.height+C},{x:R+g/2,y:B-A/2+h.height+C},{x:R+g/2,y:B+A/2},{x:R-g/2,y:B+A/2},{x:R-g/2,y:B-A/2+h.height+C},{x:R-h.width/2,y:B-A/2+h.height+C}]:T=[{x:R-g/2,y:B-A/2},{x:R+g/2,y:B-A/2},{x:R+g/2,y:B-A/2+p},{x:R+h.width/2,y:B-A/2+p},{x:R+h.width/2/2,y:B+A/2},{x:R-h.width/2,y:B+A/2},{x:R-h.width/2,y:B-A/2+p},{x:R-g/2,y:B-A/2+p}],W.polygon(t,T,N)},c}f(cp,"icon");async function hp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Nr(t),b=j.svg(c),C=Y(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.get("fill");C.stroke=w??y;const k=c.append("g");t.icon&&k.html(`<g>${await Ai(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=k.node().getBBox(),v=L.width,D=L.height,I=L.x,O=L.y,E=Math.max(v,D)*Math.SQRT2+d*2,N=b.circle(0,0,E,C),R=Math.max(E,h.width),B=E+h.height+p,A=b.rectangle(-R/2,-B/2,R,B,{...C,fill:"transparent",stroke:"none"}),T=c.insert(()=>N,":first-child"),$=c.insert(()=>A);return k.attr("transform",`translate(${-v/2-I},${g?h.height/2+p/2-D/2-O:-h.height/2-p/2-D/2-O})`),k.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-B/2:B/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),G(t,$),t.intersect=function(M){return F.info("iconSquare intersect",t,M),W.rect(t,M)},c}f(hp,"iconCircle");async function up(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Nr(t),C=-m/2,w=-g/2,k=t.label?8:0,L=j.svg(c),v=Y(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const I=L.path(We(C,w,m,g,5),v),O=Math.max(m,h.width),E=g+h.height+k,N=L.rectangle(-O/2,-E/2,O,E,{...v,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child").attr("class","icon-shape2"),B=c.insert(()=>N);if(t.icon){const A=c.append("g");A.html(`<g>${await Ai(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const T=A.node().getBBox(),$=T.width,M=T.height,q=T.x,V=T.y;A.attr("transform",`translate(${-$/2-q},${p?h.height/2+k/2-M/2-V:-h.height/2-k/2-M/2-V})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),G(t,B),t.intersect=function(A){if(F.info("iconSquare intersect",t,A),!t.label)return W.rect(t,A);const T=t.x??0,$=t.y??0,M=t.height??0;let q=[];return p?q=[{x:T-h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2+h.height+k},{x:T+m/2,y:$-M/2+h.height+k},{x:T+m/2,y:$+M/2},{x:T-m/2,y:$+M/2},{x:T-m/2,y:$-M/2+h.height+k},{x:T-h.width/2,y:$-M/2+h.height+k}]:q=[{x:T-m/2,y:$-M/2},{x:T+m/2,y:$-M/2},{x:T+m/2,y:$-M/2+g},{x:T+h.width/2,y:$-M/2+g},{x:T+h.width/2/2,y:$+M/2},{x:T-h.width/2,y:$+M/2},{x:T-h.width/2,y:$-M/2+g},{x:T-m/2,y:$-M/2+g}],W.polygon(t,q,A)},c}f(up,"iconRounded");async function dp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Nr(t),C=-m/2,w=-g/2,k=t.label?8:0,L=j.svg(c),v=Y(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=b.get("fill");v.stroke=D??x;const I=L.path(We(C,w,m,g,.1),v),O=Math.max(m,h.width),E=g+h.height+k,N=L.rectangle(-O/2,-E/2,O,E,{...v,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child"),B=c.insert(()=>N);if(t.icon){const A=c.append("g");A.html(`<g>${await Ai(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const T=A.node().getBBox(),$=T.width,M=T.height,q=T.x,V=T.y;A.attr("transform",`translate(${-$/2-q},${p?h.height/2+k/2-M/2-V:-h.height/2-k/2-M/2-V})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),G(t,B),t.intersect=function(A){if(F.info("iconSquare intersect",t,A),!t.label)return W.rect(t,A);const T=t.x??0,$=t.y??0,M=t.height??0;let q=[];return p?q=[{x:T-h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2+h.height+k},{x:T+m/2,y:$-M/2+h.height+k},{x:T+m/2,y:$+M/2},{x:T-m/2,y:$+M/2},{x:T-m/2,y:$-M/2+h.height+k},{x:T-h.width/2,y:$-M/2+h.height+k}]:q=[{x:T-m/2,y:$-M/2},{x:T+m/2,y:$-M/2},{x:T+m/2,y:$-M/2+g},{x:T+h.width/2,y:$-M/2+g},{x:T+h.width/2/2,y:$+M/2},{x:T-h.width/2,y:$+M/2},{x:T-h.width/2,y:$-M/2+g},{x:T-m/2,y:$-M/2+g}],W.polygon(t,q,A)},c}f(dp,"iconSquare");async function pp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=U(t);t.labelStyle=o;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??a),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:p}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=j.svg(u),C=Y(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=b.rectangle(m,y,c,h,C),k=Math.max(c,d.width),L=h+d.height+x,v=b.rectangle(-k/2,-L/2,k,L,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>w,":first-child"),I=u.insert(()=>v);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),D.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),G(t,I),t.intersect=function(O){if(F.info("iconSquare intersect",t,O),!t.label)return W.rect(t,O);const E=t.x??0,N=t.y??0,R=t.height??0;let B=[];return g?B=[{x:E-d.width/2,y:N-R/2},{x:E+d.width/2,y:N-R/2},{x:E+d.width/2,y:N-R/2+d.height+x},{x:E+c/2,y:N-R/2+d.height+x},{x:E+c/2,y:N+R/2},{x:E-c/2,y:N+R/2},{x:E-c/2,y:N-R/2+d.height+x},{x:E-d.width/2,y:N-R/2+d.height+x}]:B=[{x:E-c/2,y:N-R/2},{x:E+c/2,y:N-R/2},{x:E+c/2,y:N-R/2+h},{x:E+d.width/2,y:N-R/2+h},{x:E+d.width/2/2,y:N+R/2},{x:E-d.width/2,y:N+R/2},{x:E-d.width/2,y:N-R/2+h},{x:E-c/2,y:N-R/2+h}],W.polygon(t,B,O)},u}f(pp,"imageSquare");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),n=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:-3*n/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(a),d=Y(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=qe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},a}f(fp,"inv_trapezoid");async function es(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await it(e,t,rt(t)),n=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let u,{rx:d,ry:p}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),t.look==="handDrawn"){const m=j.svg(s),y=Y(t,{}),x=d||p?m.path(We(c,h,n,l,d||0),y):m.rectangle(c,h,n,l,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",It(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",It(d)).attr("ry",It(p)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return G(t,u),t.calcIntersect=function(m,y){return W.rect(m,y)},t.intersect=function(m){return W.rect(t,m)},s}f(es,"drawRect");async function gp(e,t){const{shapeSvg:r,bbox:i,label:a}=await it(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),G(t,s),t.intersect=function(l){return W.rect(t,l)},r}f(gp,"labelRect");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),n=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:-(3*n)/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(a),d=Y(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=qe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},a}f(mp,"lean_left");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),n=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:-3*n/6,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:0,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(a),d=Y(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=qe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},a}f(yp,"lean_right");function xp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=j.svg(a),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=lt(c),p=h.path(d,u),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),G(t,g),t.intersect=function(m){return F.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},a}f(xp,"lightningBolt");var j2=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Y2=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),U2=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0),t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j.svg(a),m=Y2(0,0,n,h,l,c,u),y=U2(0,c,n,h,l,c),x=Y(t,{}),b=g.path(m,x),C=g.path(y,x);a.insert(()=>C,":first-child").attr("class","line"),d=a.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=j2(0,0,n,h,l,c,u);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",It(p)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),G(t,d),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(g){const m=W.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},a}f(bp,"linedCylinder");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=j.svg(a),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Pe(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,c,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),p),y=a.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})`),o.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),G(t,y),t.intersect=function(x){return W.polygon(t,g,x)},a}f(Cp,"linedWaveEdgedRect");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-n/2,u=-l/2,{cssStyles:d}=t,p=j.svg(a),g=Y(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+n-c,y:u+l+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u+l-c},{x:h+n+c,y:u+l-c},{x:h+n+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+n-c,y:u+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),C=lt(y),w=p.path(C,{...g,fill:"none"}),k=a.insert(()=>w,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),G(t,k),t.intersect=function(L){return W.polygon(t,m,L)},a}f(_p,"multiRect");async function kp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-n/2,d=-h/2,p=5,{cssStyles:g}=t,m=Pe(u-p,d+h+p,u+n-p,d+h+p,c,.8),y=m?.[m.length-1],x=[{x:u-p,y:d+p},{x:u-p,y:d+h+p},...m,{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:y.y-2*p},{x:u+n+p,y:y.y-2*p},{x:u+n+p,y:d-p},{x:u+p,y:d-p},{x:u+p,y:d},{x:u,y:d},{x:u,y:d+p}],b=[{x:u,y:d+p},{x:u+n-p,y:d+p},{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:d},{x:u,y:d}],C=j.svg(a),w=Y(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const k=lt(x),L=C.path(k,w),v=lt(b),D=C.path(v,w),I=a.insert(()=>L,":first-child");return I.insert(()=>D),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})`),o.attr("transform",`translate(${-(s.width/2)-p-(s.x-(s.left??0))}, ${-(s.height/2)+p-c/2-(s.y-(s.top??0))})`),G(t,I),t.intersect=function(O){return W.polygon(t,x,O)},a}f(kp,"multiWaveEdgedRectangle");async function wp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i,t.useHtmlLabels||Ot().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:p}=t,g=j.svg(o),m=Y(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},o}f(wp,"note");var G2=f((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 Sp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.width+t.padding,n=s.height+t.padding,l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j.svg(a),g=Y(t,{}),m=G2(0,0,l),y=p.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=qe(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),G(t,u),t.calcIntersect=function(p,g){const m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=W.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},a}f(Sp,"question");async function vp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),c=-n/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=t,g=j.svg(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=lt(d),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),G(t,b),t.intersect=function(C){return W.polygon(t,d,C)},a}f(vp,"rect_left_inv_arrow");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=n.node().appendChild(await Qe(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Lt(dt()?.flowchart?.htmlLabels)){const D=h.children[0],I=ht(h);u=D.getBoundingClientRect(),I.attr("width",u.width),I.attr("height",u.height)}F.info("Text 2",l);const d=l||[],p=h.getBBox(),g=n.node().appendChild(await Qe(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),ht(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),C=u.height+(t.padding||0),w=-u.width/2-x,k=-u.height/2-x;let L,v;if(t.look==="handDrawn"){const D=j.svg(s),I=Y(t,{}),O=D.path(We(w,k,b,C,t.rx||0),I),E=D.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,I);v=s.insert(()=>(F.debug("Rough node insert CXC",O),E),":first-child"),L=s.insert(()=>(F.debug("Rough node insert CXC",O),O),":first-child")}else L=o.insert("rect",":first-child"),v=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return G(t,L),t.intersect=function(D){return W.rect(t,D)},s}f(Tp,"rectWithTitle");function si(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,p=u/a,g=d/s,m=Math.sqrt(p**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*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/s,(e-x)/a);let k=Math.atan2((i-b)/s,(r-x)/a)-C;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const L=[];for(let v=0;v<20;v++){const D=v/19,I=C+D*k,O=x+a*Math.cos(I),E=b+s*Math.sin(I);L.push({x:O,y:E})}return L}f(si,"generateArcPoints");async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=t?.padding??0,n=t?.padding??0,l=(t?.width?t?.width:s.width)+o*2,c=(t?.height?t?.height:s.height)+n*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,p=j.svg(a),g=Y(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},...si(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},...si(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},...si(-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},...si(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=lt(m),x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),G(t,b),t.intersect=function(C){return W.polygon(t,m,C)},a}f(Bp,"roundedRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=t?.padding??0,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-s.width/2-n,u=-s.height/2-n,{cssStyles:d}=t,p=j.svg(a),g=Y(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=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",It(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},a}f(Lp,"shadedProcess");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=-n/2,h=-l/2,{cssStyles:u}=t,d=j.svg(a),p=Y(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+n,y:h+l},{x:c+n,y:h-l/2}],m=lt(g),y=d.path(m,p),x=a.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})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),G(t,x),t.intersect=function(b){return W.polygon(t,g,b)},a}f(Ap,"slopedRect");async function Mp(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return es(e,t,r)}f(Mp,"squareRect");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.height+t.padding,n=s.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=j.svg(a),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-n/2+l,y:-o/2},{x:n/2-l,y:-o/2},...Ci(-n/2+l,0,l,50,90,270),{x:n/2-l,y:o/2},...Ci(n/2-l,0,l,50,270,450)],p=lt(d),g=h.path(p,u),m=a.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),G(t,m),t.intersect=function(y){return W.polygon(t,d,y)},a}f(Ep,"stadium");async function $p(e,t){return es(e,t,{rx:5,ry:5})}f($p,"state");function Fp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(c),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=n??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),s&&m.selectAll("path").attr("style",s),a&&m.selectAll("path").attr("style",a),G(t,m),t.intersect=function(y){return W.circle(t,7,y)},c}f(Fp,"stateEnd");function Dp(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const n=j.svg(a).circle(0,0,14,l0(i));s=a.insert(()=>n),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return G(t,s),t.intersect=function(o){return W.circle(t,7,o)},a}f(Dp,"stateStart");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=(t?.padding||0)/2,n=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:n,y:0},{x:n,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=j.svg(a),p=Y(t,{}),g=d.rectangle(c-8,h,n+16,l,p),m=d.line(c,h,c,h+l,p),y=d.line(c+n,h,c+n,h+l,p);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",It(b)),G(t,x)}else{const d=qe(a,n,l,u);i&&d.attr("style",i),G(t,d)}return t.intersect=function(d){return W.polygon(t,u,d)},a}f(Op,"subroutine");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),n=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-n/2,h=.2*n,u=.2*n,{cssStyles:d}=t,p=j.svg(a),g=Y(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+n},{x:l-h/2,y:c+n}],y=[{x:l+o-h/2,y:c+n},{x:l+o+h/2,y:c+n},{x:l+o+h/2,y:c+n-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),C=lt(y),w=p.path(C,{...g,fillStyle:"solid"}),k=a.insert(()=>w,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),G(t,k),t.intersect=function(L){return W.polygon(t,m,L)},a}f(Rp,"taggedRect");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*n,u=.2*l,d=l+c,{cssStyles:p}=t,g=j.svg(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:d/2},...Pe(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,b=-d/2-u*.4,C=[{x:x+n-h,y:(b+l)*1.4},{x:x+n,y:b+l-u},{x:x+n,y:(b+l)*.9},...Pe(x+n,(b+l)*1.3,x+n-h,(b+l)*1.5,-l*.03,.5)],w=lt(y),k=g.path(w,m),L=lt(C),v=g.path(L,{...m,fillStyle:"solid"}),D=a.insert(()=>v,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),G(t,D),t.intersect=function(I){return W.polygon(t,y,I)},a}f(Ip,"taggedWaveEdgedRectangle");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+t.padding,t?.width||0),n=Math.max(s.height+t.padding,t?.height||0),l=-o/2,c=-n/2,h=a.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",o).attr("height",n),G(t,h),t.intersect=function(u){return W.rect(t,u)},a}f(Pp,"text");var V2=f((e,t,r,i,a,s)=>`M${e},${t}
185
+ a${a},${s} 0,0,1 0,${-i}
186
+ l${r},0
187
+ a${a},${s} 0,0,1 0,${i}
188
+ M${r},${-i}
189
+ a${a},${s} 0,0,0 0,${i}
190
+ l${-r},0`,"createCylinderPathD"),X2=f((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Z2=f((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o,halfPadding:n}=await it(e,t,rt(t)),l=t.look==="neo"?n*2:n,c=s.height+l,h=c/2,u=h/(2.5+c/50),d=s.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=j.svg(a),y=X2(0,0,d,c,u,h),x=Z2(0,0,d,c,u,h),b=m.path(y,Y(t,{})),C=m.path(x,Y(t,{fill:"none"}));g=a.insert(()=>C,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=V2(0,0,d,c,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",It(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),G(t,g),t.intersect=function(m){const y=W.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},a}f(Np,"tiltedCylinder");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=s.width+t.padding,n=s.height+t.padding,l=[{x:-3*n/6,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:0,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(a),d=Y(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=qe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},a}f(zp,"trapezoid");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=60,n=20,l=Math.max(o,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(n,s.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=j.svg(a),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{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=lt(p),m=u.path(g,d),y=a.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),G(t,y),t.intersect=function(x){return W.polygon(t,p,x)},a}f(Wp,"trapezoidalPentagon");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Lt(dt().flowchart?.htmlLabels),l=s.width+(t.padding??0),c=l+s.height,h=l+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,p=j.svg(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=lt(u),y=p.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,G(t,x),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(t.padding??0)/(n?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(b){return F.info("Triangle intersect",t,u,b),W.polygon(t,u,b)},a}f(qp,"triangle");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-n,g=p>0?p/2:0,m=j.svg(a),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-g,y:h/2},...Pe(-n/2-g,h/2,n/2+g,h/2,c,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],b=lt(x),C=m.path(b,y),w=a.insert(()=>C,":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})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c-(s.y-(s.top??0))})`),G(t,w),t.intersect=function(k){return W.polygon(t,x,k)},a}f(Hp,"waveEdgedRectangle");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=100,n=50,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,o),d=Math.max(d,n);const p=Math.min(d*.2,d/4),g=d+p*2,{cssStyles:m}=t,y=j.svg(a),x=Y(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Pe(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Pe(u/2,-g/2,-u/2,-g/2,p,-1)],C=lt(b),w=y.path(C,x),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),G(t,k),t.intersect=function(L){return W.polygon(t,b,L)},a}f(jp,"waveRectangle");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await it(e,t,rt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-n/2,u=-l/2,{cssStyles:d}=t,p=j.svg(a),g=Y(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u-c}],y=`M${h-c},${u-c} L${h+n},${u-c} L${h+n},${u+l} L${h-c},${u+l} L${h-c},${u-c}
191
+ M${h-c},${u} L${h+n},${u}
192
+ M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),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),o.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),G(t,b),t.intersect=function(C){return W.polygon(t,m,C)},a}f(Yp,"windowPane");async function bo(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:J}=Ot(),{background:Z}=J,ct={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await bo(e,ct)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,s=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:n,nodeStyles:l}=U(t);if(r.attributes.length===0&&t.label){const J={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Le(t.label,i)+J.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const Z=await es(e,t,J);if(!Lt(i.htmlLabels)){const ct=Z.select("text"),st=ct.node()?.getBBox();ct.attr("transform",`translate(${-st.width/2}, 0)`)}return Z}i.htmlLabels||(a*=1.25,s*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await br(h,t.label??"",i,0,0,["name"],n);u.height+=s;let d=0;const p=[],g=[];let m=0,y=0,x=0,b=0,C=!0,w=!0;for(const J of r.attributes){const Z=await br(h,J.type,i,0,d,["attribute-type"],n);m=Math.max(m,Z.width+a);const ct=await br(h,J.name,i,0,d,["attribute-name"],n);y=Math.max(y,ct.width+a);const st=await br(h,J.keys.join(),i,0,d,["attribute-keys"],n);x=Math.max(x,st.width+a);const Ct=await br(h,J.comment,i,0,d,["attribute-comment"],n);b=Math.max(b,Ct.width+a);const _t=Math.max(Z.height,ct.height,st.height,Ct.height)+s;g.push({yOffset:d,rowHeight:_t}),d+=_t}let k=4;x<=a&&(C=!1,x=0,k--),b<=a&&(w=!1,b=0,k--);const L=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const J=u.width+a*2-(m+y+x+b);m+=J/k,y+=J/k,x>0&&(x+=J/k),b>0&&(b+=J/k)}const v=m+y+x+b,D=j.svg(h),I=Y(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((J,Z)=>J+(Z?.rowHeight??0),0));const E=Math.max(L.width+a*2,t?.width||0,v),N=Math.max((O??0)+u.height,t?.height||0),R=-E/2,B=-N/2;h.selectAll("g:not(:first-child)").each((J,Z,ct)=>{const st=ht(ct[Z]),Ct=st.attr("transform");let _t=0,Nt=0;if(Ct){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ct);xt&&(_t=parseFloat(xt[1]),Nt=parseFloat(xt[2]),st.attr("class").includes("attribute-name")?_t+=m:st.attr("class").includes("attribute-keys")?_t+=m+y:st.attr("class").includes("attribute-comment")&&(_t+=m+y+x))}st.attr("transform",`translate(${R+a/2+_t}, ${Nt+B+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(B+s/2)+")");const A=D.rectangle(R,B,E,N,I),T=h.insert(()=>A,":first-child").attr("style",o.join("")),{themeVariables:$}=Ot(),{rowEven:M,rowOdd:q,nodeBorder:V}=$;p.push(0);for(const[J,Z]of g.entries()){const st=(J+1)%2===0&&Z.yOffset!==0,Ct=D.rectangle(R,u.height+B+Z?.yOffset,E,Z?.rowHeight,{...I,fill:st?M:q,stroke:V});h.insert(()=>Ct,"g.label").attr("style",o.join("")).attr("class",`row-rect-${st?"even":"odd"}`)}let K=D.line(R,u.height+B,E+R,u.height+B,I);h.insert(()=>K).attr("class","divider"),K=D.line(m+R,u.height+B,m+R,N+B,I),h.insert(()=>K).attr("class","divider"),C&&(K=D.line(m+y+R,u.height+B,m+y+R,N+B,I),h.insert(()=>K).attr("class","divider")),w&&(K=D.line(m+y+x+R,u.height+B,m+y+x+R,N+B,I),h.insert(()=>K).attr("class","divider"));for(const J of p)K=D.line(R,u.height+B+J,E+R,u.height+B+J,I),h.insert(()=>K).attr("class","divider");if(G(t,T),l&&t.look!=="handDrawn"){const Z=l.split(";")?.filter(ct=>ct.includes("stroke"))?.map(ct=>`${ct}`).join("; ");h.selectAll("path").attr("style",Z??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(J){return W.rect(t,J)},h}f(bo,"erBox");async function br(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Jo(t)&&(t=Jo(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ze(n,t,{width:Le(t,r)+100,style:o,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(Lt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ht(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}f(br,"addText");async function Up(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,p=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ni(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ni(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const C=await ni(c,b,m,[b.parseClassifier()]);m+=C+s}p=c.node().getBBox().height,p<=0&&(p=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const C=await ni(h,b,y,[b.parseClassifier()]);y+=C+s}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}f(Up,"textHelper");async function ni(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:Lt(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Fr(n)&&(o=!0);const l=await ze(a,On(cr(n)),{width:Le(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,h=1;if(o){const u=l.children[0],d=ht(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=s.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)}f(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(ni,"addText");async function Gp(e,t){const r=dt(),i=r.class.padding??12,a=i,s=t.useHtmlLabels??Lt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:n,bbox:l}=await Up(e,t,r,s,a),{labelStyles:c,nodeStyles:h}=U(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,p=j.svg(n),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,C=p.rectangle(x-i,b-i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),w=n.insert(()=>C,":first-child");w.attr("class","basic label-container");const k=w.node().getBBox();n.selectAll(".text").each((I,O,E)=>{const N=ht(E[O]),R=N.attr("transform");let B=0;if(R){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);M&&(B=parseFloat(M[2]))}let A=B+b+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(A-=4);let T=x;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(T=-N.node()?.getBBox().width/2||0,n.selectAll("text").each(function($,M,q){window.getComputedStyle(q[M]).textAnchor==="middle"&&(T=0)})),N.attr("transform",`translate(${T}, ${A})`)});const L=n.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,v=n.select(".label-group").node().getBBox().height-(d?i/2:0)||0,D=n.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const I=p.line(k.x,L+v+b+i,k.x+k.width,L+v+b+i,g);n.insert(()=>I).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const I=p.line(k.x,L+v+D+b+a*2+i,k.x+k.width,L+v+D+b+i+a*2,g);n.insert(()=>I).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&n.selectAll("path").attr("style",u),w.select(":nth-child(2)").attr("style",u),n.selectAll(".divider").select("path").attr("style",u),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",u),!s){const I=RegExp(/color\s*:\s*([^;]*)/),O=I.exec(u);if(O){const E=O[0].replace("color","fill");n.selectAll("tspan").attr("style",E)}else if(c){const E=I.exec(c);if(E){const N=E[0].replace("color","fill");n.selectAll("tspan").attr("style",N)}}}return G(t,w),t.intersect=function(I){return W.rect(t,I)},n}f(Gp,"classBox");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ge(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):u=await ge(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=u;const p=await ge(h,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+n,l){const L=await ge(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,d,t.labelStyle);d+=L;const v=await ge(h,`${a.text?`Text: ${a.text}`:""}`,d,t.labelStyle);d+=v;const D=await ge(h,`${a.risk?`Risk: ${a.risk}`:""}`,d,t.labelStyle);d+=D,await ge(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,d,t.labelStyle)}else{const L=await ge(h,`${s.type?`Type: ${s.type}`:""}`,d,t.labelStyle);d+=L,await ge(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,y=-g/2,x=-m/2,b=j.svg(h),C=Y(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=b.rectangle(y,x,g,m,C),k=h.insert(()=>w,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,v,D)=>{const I=ht(D[v]),O=I.attr("transform");let E=0,N=0;if(O){const T=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);T&&(E=parseFloat(T[1]),N=parseFloat(T[2]))}const R=N-m/2;let B=y+o/2;(v===0||v===1)&&(B=E),I.attr("transform",`translate(${B}, ${R+o})`)}),d>u+p+n){const L=b.line(y,x+u+p+n,y+g,x+u+p+n,C);h.insert(()=>L).attr("style",i)}return G(t,k),t.intersect=function(L){return W.rect(t,L)},h}f(Vp,"requirementBox");async function ge(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=dt(),o=s.htmlLabels??!0,n=await ze(a,On(cr(t)),{width:Le(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const c=n.children[0],h=ht(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(ge,"addText");var K2=f(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 Xp(e,t,{config:r}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await $s(d,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await $s(n,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await $s(n,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,C=t?.width||0,w=Math.max(m.height,x.height)/2,k=Math.max(l.height+b*2,t?.height||0)+w,L=-C/2,v=-k/2;c.attr("transform","translate("+(h-C/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(h-C/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*s)+", "+(-w+l.height/2)+")");let D;const{rx:I,ry:O}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const N=j.svg(n),R=Y(t,{}),B=I||O?N.path(We(L,v,C,k,I||0),R):N.rectangle(L,v,C,k,R);D=n.insert(()=>B,":first-child"),D.attr("class","basic label-container").attr("style",E||null)}else{D=n.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",a).attr("rx",I??5).attr("ry",O??5).attr("x",L).attr("y",v).attr("width",C).attr("height",k);const N="priority"in t&&t.priority;if(N){const R=n.append("line"),B=L+2,A=v+Math.floor((I??0)/2),T=v+k-Math.floor((I??0)/2);R.attr("x1",B).attr("y1",A).attr("x2",B).attr("y2",T).attr("stroke-width","4").attr("stroke",K2(N))}}return G(t,D),t.height=k,t.intersect=function(N){return W.rect(t,N)},n}f(Xp,"kanbanItem");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await it(e,t,rt(t)),l=s.width+10*o,c=s.height+8*o,h=.15*l,{cssStyles:u}=t,d=s.width+20,p=s.height+20,g=Math.max(l,d),m=Math.max(c,p);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const x=`M0 0
193
+ a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
194
+ a${h},${h} 1 0,0 ${g*.25},0
195
+ a${h},${h} 1 0,0 ${g*.25},0
196
+ a${h},${h} 1 0,0 ${g*.25},${m*.1}
197
+
198
+ a${h},${h} 1 0,0 ${g*.15},${m*.33}
199
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
200
+ a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
201
+
202
+ a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
203
+ a${h},${h} 1 0,0 ${-1*g*.25},0
204
+ a${h},${h} 1 0,0 ${-1*g*.25},0
205
+ a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
206
+
207
+ a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
208
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
209
+ a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
210
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=j.svg(a),C=Y(t,{}),w=b.path(x,C);y=a.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",It(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),G(t,y),t.calcIntersect=function(b,C){return W.rect(b,C)},t.intersect=function(b){return F.info("Bang intersect",t,b),W.rect(t,b)},a}f(Zp,"bang");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await it(e,t,rt(t)),l=s.width+2*o,c=s.height+2*o,h=.15*l,u=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
211
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
212
+ a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
213
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
214
+
215
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
216
+ a${p},${p} 1 0,1 ${-1*l*.15},${c*.65}
217
+
218
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
219
+ a${d},${d} 1 0,1 ${-1*l*.5},0
220
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
221
+
222
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
223
+ a${p},${p} 1 0,1 ${l*.1},${-1*c*.65}
224
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=j.svg(a),b=Y(t,{}),C=x.path(y,b);m=a.insert(()=>C,":first-child"),m.attr("class","basic label-container").attr("style",It(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),G(t,m),t.calcIntersect=function(x,b){return W.rect(x,b)},t.intersect=function(x){return F.info("Cloud intersect",t,x),W.rect(t,x)},a}f(Kp,"cloud");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await it(e,t,rt(t)),l=s.width+8*o,c=s.height+2*o,h=5,u=`
225
+ M${-l/2} ${c/2-h}
226
+ v${-c+2*h}
227
+ q0,-${h} ${h},-${h}
228
+ h${l-2*h}
229
+ q${h},0 ${h},${h}
230
+ v${c-2*h}
231
+ q0,${h} -${h},${h}
232
+ h${-l+2*h}
233
+ q-${h},0 -${h},-${h}
234
+ Z
235
+ `,d=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),G(t,d),t.calcIntersect=function(p,g){return W.rect(p,g)},t.intersect=function(p){return W.rect(t,p)},a}f(Qp,"defaultMindmapNode");async function Jp(e,t){const r={padding:t.padding??0};return xo(e,t,r)}f(Jp,"mindmapCircle");var Q2=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Mp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Bp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ep},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Op},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:xo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Zp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Kp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Sp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:op},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:yp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:mp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:zp},{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:fp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:rp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Pp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ud},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Lp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Dp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:sp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:lp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Zd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Kd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Qd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:xp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Hp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:np},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Np},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:bp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Jd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ep},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:qp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Yp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ip},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Wp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ap},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ap},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:kp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:_p},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Yd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Xd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ip},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Rp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:jp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:vp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Cp}],J2=f(()=>{const t=[...Object.entries({state:$p,choice:Gd,note:wp,rectWithTitle:Tp,labelRect:gp,iconSquare:dp,iconCircle:hp,icon:cp,iconRounded:up,imageSquare:pp,anchor:jd,kanbanItem:Xp,mindmapCircle:Jp,defaultMindmapNode:Qp,classBox:Gp,erBox:bo,requirementBox:Vp}),...Q2.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),tf=J2();function tC(e){return e in tf}f(tC,"isValidShape");var rs=new Map;async function ef(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?tf[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),rs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(ef,"insertNode");var hS=f((e,t)=>{rs.set(t.id,e)},"setNodeElem"),uS=f(()=>{rs.clear()},"clear"),dS=f(e=>{const t=rs.get(e.id);F.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"),eC=f((e,t,r,i,a,s)=>{t.arrowTypeStart&&Ul(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&Ul(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),rC={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}},Ul=f((e,t,r,i,a,s,o)=>{const n=rC[r];if(!n){F.warn(`Unknown arrow type: ${r}`);return}const l=n.type,h=`${a}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const p=document.getElementById(h);if(p){const g=p.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),n.fill&&y.setAttribute("fill",o)}),p.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Da=new Map,Et=new Map,pS=f(()=>{Da.clear(),Et.clear()},"clear"),Ui=f(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),iC=f(async(e,t)=>{let r=Lt(dt().flowchart.htmlLabels);const{labelStyles:i}=U(t);t.labelStyle=i;const a=await ze(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});F.info("abc82",t,t.labelType);const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let n=a.getBBox();if(r){const c=a.children[0],h=ht(a);n=c.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Da.set(t.id,s),t.width=n.width,t.height=n.height;let l;if(t.startLabelLeft){const c=await Qe(t.startLabelLeft,Ui(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=h,oi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await Qe(t.startLabelRight,Ui(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 d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=h,oi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await Qe(t.endLabelLeft,Ui(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=h,oi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await Qe(t.endLabelRight,Ui(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=h,oi(l,t.endLabelRight)}return a},"insertEdgeLabel");function oi(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(oi,"setTerminalWidth");var aC=f((e,t)=>{F.debug("Moving label abc88 ",e.id,e.label,Da.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:a}=Vn(i);if(e.label){const s=Da.get(e.id);let o=e.x,n=e.y;if(r){const l=oe.calcLabelPosition(r);F.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Et.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Et.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Et.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Et.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),sC=f((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),nC=f((e,t,r)=>{F.debug(`intersection calc abc89:
236
+ outsidePoint: ${JSON.stringify(t)}
237
+ insidePoint : ${JSON.stringify(r)}
238
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),F.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,p=r.y<t.y?r.y+u:r.y-u;return F.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:p}),n===0&&(d=t.x,p=t.y),h===0&&(d=t.x),c===0&&(p=t.y),{x:d,y:p}}},"intersection"),Gl=f((e,t)=>{F.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(F.info("abc88 checking point",s,t),!sC(t,s)&&!a){const o=nC(t,i,s);F.debug("abc88 inside",s,i,o),F.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?F.warn("abc88 no intersect",o,r):r.push(o),a=!0}else F.warn("abc88 outside",s,i),i=s,a||r.push(s)}),F.debug("returning points",r),r},"cutPathAtIntersect");function rf(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(rf,"extractCornerPoints");var Vl=f(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),oC=f(function(e){const{cornerPointPositions:t}=rf(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=Vl(a,o,5),l=Vl(s,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){F.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const p=5;o.x===n.x?d={x:c<0?n.x-p+u:n.x+p-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-p+u:n.y+p-u}}else F.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),lC=f((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),cC=f(function(e,t,r,i,a,s,o,n=!1){const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=a;var d=s;const p=[];for(const B in t.cssCompiledStyles)Fu(B)||p.push(t.cssCompiledStyles[B]);F.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),F.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(F.info("to cluster abc88",r.get(t.toCluster)),c=Gl(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(F.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Gl(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(B=>!Number.isNaN(B.y));m=oC(m);let y=Qi;switch(y=ua,t.curve){case"linear":y=ua;break;case"basis":y=Qi;break;case"cardinal":y=Ic;break;case"bumpX":y=$c;break;case"bumpY":y=Fc;break;case"catmullRom":y=Nc;break;case"monotoneX":y=Yc;break;case"monotoneY":y=Uc;break;case"natural":y=Vc;break;case"step":y=Xc;break;case"stepAfter":y=Kc;break;case"stepBefore":y=Zc;break;default:y=Qi}const{x,y:b}=o0(t),C=jm().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 k,L=t.curve==="rounded"?af(sf(m,t),5):C(m);const v=Array.isArray(t.style)?t.style:[t.style];let D=v.find(B=>B?.startsWith("stroke:")),I=!1;if(t.look==="handDrawn"){const B=j.svg(e);Object.assign([],m);const A=B.path(L,{roughness:.3,seed:l});w+=" transition",k=ht(A).select("path").attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce(($,M)=>$+";"+M,""):"");let T=k.attr("d");k.attr("d",T),e.node().appendChild(k.node())}else{const B=p.join(";"),A=v?v.reduce((J,Z)=>J+Z+";",""):"";let T="";t.animate&&(T=" edge-animation-fast"),t.animation&&(T=" edge-animation-"+t.animation);const $=(B?B+";"+A+";":A)+";"+(v?v.reduce((J,Z)=>J+";"+Z,""):"");k=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")+(T??"")).attr("style",$),D=$.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||B.includes("animation");const M=k.node(),q=typeof M.getTotalLength=="function"?M.getTotalLength():0,V=hl[t.arrowTypeStart]||0,K=hl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const Z=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?lC(q,V,K):`0 ${V} ${q-V-K} ${K}`}; stroke-dashoffset: 0;`;k.attr("style",Z+k.attr("style"))}}k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",t.id),k.attr("data-points",g),t.showPoints&&m.forEach(B=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",B.x).attr("cy",B.y)});let O="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),F.info("arrowTypeStart",t.arrowTypeStart),F.info("arrowTypeEnd",t.arrowTypeEnd),eC(k,t,O,o,i,D);const E=Math.floor(c.length/2),N=c[E];oe.isLabelCoordinateInPath(N,k.attr("d"))||(h=!0);let R={};return h&&(R.updatedPath=c),R.originalPath=t.points,R},"insertEdge");function af(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,d=l.y-o.y,p=Math.hypot(c,h),g=Math.hypot(u,d);if(p<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/p,y=h/p,x=u/g,b=d/g,C=m*x+y*b,w=Math.max(-1,Math.min(1,C)),k=Math.acos(w);if(k<a||Math.abs(Math.PI-k)<a){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(k/2),p/2,g/2),v=o.x-m*L,D=o.y-y*L,I=o.x+x*L,O=o.y+b*L;r+=`L${v},${D}`,r+=`Q${o.x},${o.y} ${I},${O}`}}return r}f(af,"generateRoundedPath");function bn(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}}f(bn,"calculateDeltaAndAngle");function sf(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Dt[t.arrowTypeStart]){const a=Dt[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=bn(s,o),l=a*Math.cos(n),c=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Dt[t.arrowTypeEnd]){const a=Dt[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=bn(o,s),l=a*Math.cos(n),c=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}f(sf,"applyMarkerOffsetsToPoints");var hC=f((e,t,r,i)=>{t.forEach(a=>{TC[a](e,r,i)})},"insertMarkers"),uC=f((e,t,r)=>{F.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"),dC=f((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"),pC=f((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"),fC=f((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"),gC=f((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"),mC=f((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"),yC=f((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"),xC=f((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"),bC=f((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"),CC=f((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"),_C=f((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),kC=f((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"),wC=f((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),SC=f((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
+ L20,10
240
+ M20,10
241
+ L0,20`)},"requirement_arrow"),vC=f((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"),TC={extension:uC,composition:dC,aggregation:pC,dependency:fC,lollipop:gC,point:mC,circle:yC,cross:xC,barb:bC,only_one:CC,zero_or_one:_C,one_or_more:kC,zero_or_more:wC,requirement_arrow:SC,requirement_contains:vC},BC=hC,LC={common:Pr,getConfig:Ot,insertCluster:R2,insertEdge:cC,insertEdgeLabel:iC,insertMarkers:BC,insertNode:ef,interpolateToCurve:Jn,labelHelper:it,log:F,positionEdgeLabel:aC},_i={},nf=f(e=>{for(const t of e)_i[t.name]=t},"registerLayoutLoaders"),AC=f(()=>{nf([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-6UL2VRFP-BKeNwVe7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-DLEOmN1S.js"),__vite__mapDeps([8,9,6,7])),"loader")}])},"registerDefaultLayoutLoaders");AC();var fS=f(async(e,t)=>{if(!(e.layoutAlgorithm in _i))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=_i[e.layoutAlgorithm];return(await r.loader()).render(e,t,LC,{algorithm:r.algorithm})},"render"),gS=f((e="",{fallback:t="dagre"}={})=>{if(e in _i)return e;if(t in _i)return F.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"),of="comm",lf="rule",cf="decl",MC="@import",EC="@namespace",$C="@keyframes",FC="@layer",hf=Math.abs,Co=String.fromCharCode;function uf(e){return e.trim()}function ia(e,t,r){return e.replace(t,r)}function DC(e,t,r){return e.indexOf(t,r)}function kr(e,t){return e.charCodeAt(t)|0}function Rr(e,t,r){return e.slice(t,r)}function me(e){return e.length}function OC(e){return e.length}function Gi(e,t){return t.push(e),e}var is=1,Ir=1,df=0,te=0,wt=0,Hr="";function _o(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:is,column:Ir,length:o,return:"",siblings:n}}function RC(){return wt}function IC(){return wt=te>0?kr(Hr,--te):0,Ir--,wt===10&&(Ir=1,is--),wt}function ce(){return wt=te<df?kr(Hr,te++):0,Ir++,wt===10&&(Ir=1,is++),wt}function Fe(){return kr(Hr,te)}function aa(){return te}function as(e,t){return Rr(Hr,e,t)}function ki(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 PC(e){return is=Ir=1,df=me(Hr=e),te=0,[]}function NC(e){return Hr="",e}function Fs(e){return uf(as(te-1,Cn(e===91?e+2:e===40?e+1:e)))}function zC(e){for(;(wt=Fe())&&wt<33;)ce();return ki(e)>2||ki(wt)>3?"":" "}function WC(e,t){for(;--t&&ce()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return as(e,aa()+(t<6&&Fe()==32&&ce()==32))}function Cn(e){for(;ce();)switch(wt){case e:return te;case 34:case 39:e!==34&&e!==39&&Cn(wt);break;case 40:e===41&&Cn(e);break;case 92:ce();break}return te}function qC(e,t){for(;ce()&&e+wt!==57;)if(e+wt===84&&Fe()===47)break;return"/*"+as(t,te-1)+"*"+Co(e===47?e:ce())}function HC(e){for(;!ki(Fe());)ce();return as(e,te)}function jC(e){return NC(sa("",null,null,null,[""],e=PC(e),0,[0],e))}function sa(e,t,r,i,a,s,o,n,l){for(var c=0,h=0,u=o,d=0,p=0,g=0,m=1,y=1,x=1,b=0,C="",w=a,k=s,L=i,v=C;y;)switch(g=b,b=ce()){case 40:if(g!=108&&kr(v,u-1)==58){DC(v+=ia(Fs(b),"&","&\f"),"&\f",hf(c?n[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=Fs(b);break;case 9:case 10:case 13:case 32:v+=zC(g);break;case 92:v+=WC(aa()-1,7);continue;case 47:switch(Fe()){case 42:case 47:Gi(YC(qC(ce(),aa()),t,r,l),l),(ki(g||1)==5||ki(Fe()||1)==5)&&me(v)&&Rr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=me(v)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(v=ia(v,/\f/g,"")),p>0&&(me(v)-u||m===0&&g===47)&&Gi(p>32?Zl(v+";",i,r,u-1,l):Zl(ia(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Gi(L=Xl(v,t,r,c,h,a,n,C,w=[],k=[],u,s),s),b===123)if(h===0)sa(v,t,L,L,w,s,u,n,k);else{switch(d){case 99:if(kr(v,3)===110)break;case 108:if(kr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?sa(e,L,L,i&&Gi(Xl(e,L,L,0,0,a,n,C,a,w=[],u,k),k),a,k,u,n,i?w:k):sa(v,L,L,L,[""],k,0,n,k)}}c=h=p=0,m=x=1,C=v="",u=o;break;case 58:u=1+me(v),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&IC()==125)continue}switch(v+=Co(b),b*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:n[c++]=(me(v)-1)*x,x=1;break;case 64:Fe()===45&&(v+=Fs(ce())),d=Fe(),h=u=me(C=v+=HC(aa())),b++;break;case 45:g===45&&me(v)==2&&(m=0)}}return s}function Xl(e,t,r,i,a,s,o,n,l,c,h,u){for(var d=a-1,p=a===0?s:[""],g=OC(p),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Rr(e,d+1,d=hf(y=o[m])),w=e;b<g;++b)(w=uf(y>0?p[b]+" "+C:ia(C,/&\f/g,p[b])))&&(l[x++]=w);return _o(e,t,r,a===0?lf:n,l,c,h,u)}function YC(e,t,r,i){return _o(e,t,r,of,Co(RC()),Rr(e,2,-2),0,i)}function Zl(e,t,r,i,a){return _o(e,t,r,cf,Rr(e,0,i),Rr(e,i+1,-1),i,a)}function _n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function UC(e,t,r,i){switch(e.type){case FC:if(e.children.length)break;case MC:case EC:case cf:return e.return=e.return||e.value;case of:return"";case $C:return e.return=e.value+"{"+_n(e.children,i)+"}";case lf:if(!me(e.value=e.props.join(",")))return""}return me(r=_n(e.children,i))?e.return=e.value+"{"+r+"}":""}var GC=Iu(Object.keys,Object),VC=Object.prototype,XC=VC.hasOwnProperty;function ZC(e){if(!Ga(e))return GC(e);var t=[];for(var r in Object(e))XC.call(e,r)&&r!="constructor"&&t.push(r);return t}var kn=lr(be,"DataView"),wn=lr(be,"Promise"),Sn=lr(be,"Set"),vn=lr(be,"WeakMap"),Kl="[object Map]",KC="[object Object]",Ql="[object Promise]",Jl="[object Set]",tc="[object WeakMap]",ec="[object DataView]",QC=or(kn),JC=or(bi),t_=or(wn),e_=or(Sn),r_=or(vn),Ve=zr;(kn&&Ve(new kn(new ArrayBuffer(1)))!=ec||bi&&Ve(new bi)!=Kl||wn&&Ve(wn.resolve())!=Ql||Sn&&Ve(new Sn)!=Jl||vn&&Ve(new vn)!=tc)&&(Ve=function(e){var t=zr(e),r=t==KC?e.constructor:void 0,i=r?or(r):"";if(i)switch(i){case QC:return ec;case JC:return Kl;case t_:return Ql;case e_:return Jl;case r_:return tc}return t});var i_="[object Map]",a_="[object Set]",s_=Object.prototype,n_=s_.hasOwnProperty;function rc(e){if(e==null)return!0;if(Va(e)&&(Sa(e)||typeof e=="string"||typeof e.splice=="function"||Kn(e)||Qn(e)||wa(e)))return!e.length;var t=Ve(e);if(t==i_||t==a_)return!e.size;if(Ga(e))return!ZC(e).length;for(var r in e)if(n_.call(e,r))return!1;return!0}var pf="c4",o_=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-BUk0KT3V.js");return{diagram:t}},__vite__mapDeps([10,11,6,7]));return{id:pf,diagram:e}},"loader"),c_={id:pf,detector:o_,loader:l_},h_=c_,ff="flowchart",u_=f((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),d_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CGcmMJTD.js");return{diagram:t}},__vite__mapDeps([12,13,14,6,7,15,16]));return{id:ff,diagram:e}},"loader"),p_={id:ff,detector:u_,loader:d_},f_=p_,gf="flowchart-v2",g_=f((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"),m_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CGcmMJTD.js");return{diagram:t}},__vite__mapDeps([12,13,14,6,7,15,16]));return{id:gf,diagram:e}},"loader"),y_={id:gf,detector:g_,loader:m_},x_=y_,mf="er",b_=f(e=>/^\s*erDiagram/.test(e),"detector"),C_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-C_o1kY7B.js");return{diagram:t}},__vite__mapDeps([17,14,6,7,15,16]));return{id:mf,diagram:e}},"loader"),__={id:mf,detector:b_,loader:C_},k_=__,yf="gitGraph",w_=f(e=>/^\s*gitGraph/.test(e),"detector"),S_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-BkHRiPWO.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,6,7,4,2]));return{id:yf,diagram:e}},"loader"),v_={id:yf,detector:w_,loader:S_},T_=v_,xf="gantt",B_=f(e=>/^\s*gantt/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-Dh1Atgfm.js");return{diagram:t}},__vite__mapDeps([22,6,7,23,24,25]));return{id:xf,diagram:e}},"loader"),A_={id:xf,detector:B_,loader:L_},M_=A_,bf="info",E_=f(e=>/^\s*info/.test(e),"detector"),$_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-WHAUD3N6-CdqkT51i.js");return{diagram:t}},__vite__mapDeps([26,21,6,7,4,2]));return{id:bf,diagram:e}},"loader"),F_={id:bf,detector:E_,loader:$_},Cf="pie",D_=f(e=>/^\s*pie/.test(e),"detector"),O_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-fgAzUnCv.js");return{diagram:t}},__vite__mapDeps([27,19,21,6,7,4,2,28,29,24]));return{id:Cf,diagram:e}},"loader"),R_={id:Cf,detector:D_,loader:O_},_f="quadrantChart",I_=f(e=>/^\s*quadrantChart/.test(e),"detector"),P_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-BtBFRMty.js");return{diagram:t}},__vite__mapDeps([30,6,7,23,24,25]));return{id:_f,diagram:e}},"loader"),N_={id:_f,detector:I_,loader:P_},z_=N_,kf="xychart",W_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),q_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-C8fn_Zm6.js");return{diagram:t}},__vite__mapDeps([31,6,7,24,29,23,25]));return{id:kf,diagram:e}},"loader"),H_={id:kf,detector:W_,loader:q_},j_=H_,wf="requirement",Y_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),U_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-Dsb2J8qM.js");return{diagram:t}},__vite__mapDeps([32,14,6,7,15]));return{id:wf,diagram:e}},"loader"),G_={id:wf,detector:Y_,loader:U_},V_=G_,Sf="sequence",X_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-CW8ApGYu.js");return{diagram:t}},__vite__mapDeps([33,11,20,6,7]));return{id:Sf,diagram:e}},"loader"),K_={id:Sf,detector:X_,loader:Z_},Q_=K_,vf="class",J_=f((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),tk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-CMpOlMXG.js");return{diagram:t}},__vite__mapDeps([34,35,13,14,6,7,15]));return{id:vf,diagram:e}},"loader"),ek={id:vf,detector:J_,loader:tk},rk=ek,Tf="classDiagram",ik=f((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),ak=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-CMpOlMXG.js");return{diagram:t}},__vite__mapDeps([36,35,13,14,6,7,15]));return{id:Tf,diagram:e}},"loader"),sk={id:Tf,detector:ik,loader:ak},nk=sk,Bf="state",ok=f((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),lk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-CFKNRDGr.js");return{diagram:t}},__vite__mapDeps([37,38,14,6,7,15,1,2,3,4]));return{id:Bf,diagram:e}},"loader"),ck={id:Bf,detector:ok,loader:lk},hk=ck,Lf="stateDiagram",uk=f((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),dk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-B3pJgIRu.js");return{diagram:t}},__vite__mapDeps([39,38,14,6,7,15]));return{id:Lf,diagram:e}},"loader"),pk={id:Lf,detector:uk,loader:dk},fk=pk,Af="journey",gk=f(e=>/^\s*journey/.test(e),"detector"),mk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-D6H-T7IF.js");return{diagram:t}},__vite__mapDeps([40,11,13,6,7,28]));return{id:Af,diagram:e}},"loader"),yk={id:Af,detector:gk,loader:mk},xk=yk,bk=f((e,t,r)=>{F.debug(`rendering svg for syntax error
242
+ `);const i=Jm(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Bc(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Mf={draw:bk},Ck=Mf,_k={db:{},renderer:Mf,parser:{parse:f(()=>{},"parse")}},kk=_k,Ef="flowchart-elk",wk=f((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),Sk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-CGcmMJTD.js");return{diagram:t}},__vite__mapDeps([12,13,14,6,7,15,16]));return{id:Ef,diagram:e}},"loader"),vk={id:Ef,detector:wk,loader:Sk},Tk=vk,$f="timeline",Bk=f(e=>/^\s*timeline/.test(e),"detector"),Lk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-DeE7K_Tn.js");return{diagram:t}},__vite__mapDeps([41,6,7,28]));return{id:$f,diagram:e}},"loader"),Ak={id:$f,detector:Bk,loader:Lk},Mk=Ak,Ff="mindmap",Ek=f(e=>/^\s*mindmap/.test(e),"detector"),$k=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-BBgtd54T.js");return{diagram:t}},__vite__mapDeps([42,14,6,7,15]));return{id:Ff,diagram:e}},"loader"),Fk={id:Ff,detector:Ek,loader:$k},Dk=Fk,Df="kanban",Ok=f(e=>/^\s*kanban/.test(e),"detector"),Rk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-CdtlB9dE.js");return{diagram:t}},__vite__mapDeps([43,13,6,7]));return{id:Df,diagram:e}},"loader"),Ik={id:Df,detector:Ok,loader:Rk},Pk=Ik,Of="sankey",Nk=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),zk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-DgeXoGZy.js");return{diagram:t}},__vite__mapDeps([44,6,7,29,24]));return{id:Of,diagram:e}},"loader"),Wk={id:Of,detector:Nk,loader:zk},qk=Wk,Rf="packet",Hk=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),jk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-CjzZEN97.js");return{diagram:t}},__vite__mapDeps([45,19,21,6,7,4,2]));return{id:Rf,diagram:e}},"loader"),Yk={id:Rf,detector:Hk,loader:jk},If="radar",Uk=f(e=>/^\s*radar-beta/.test(e),"detector"),Gk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-Bg109hRA.js");return{diagram:t}},__vite__mapDeps([46,19,21,6,7,4,2]));return{id:If,diagram:e}},"loader"),Vk={id:If,detector:Uk,loader:Gk},Pf="block",Xk=f(e=>/^\s*block(-beta)?/.test(e),"detector"),Zk=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-CjXwNwFV.js");return{diagram:t}},__vite__mapDeps([47,13,5,1,2,6,7,16]));return{id:Pf,diagram:e}},"loader"),Kk={id:Pf,detector:Xk,loader:Zk},Qk=Kk,Nf="architecture",Jk=f(e=>/^\s*architecture/.test(e),"detector"),tw=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-vuLSFK92.js");return{diagram:t}},__vite__mapDeps([48,19,21,6,7,4,2,9]));return{id:Nf,diagram:e}},"loader"),ew={id:Nf,detector:Jk,loader:tw},rw=ew,zf="treemap",iw=f(e=>/^\s*treemap/.test(e),"detector"),aw=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-BwTCZWHJ.js");return{diagram:t}},__vite__mapDeps([49,15,19,21,6,7,4,2,25,29,24]));return{id:zf,diagram:e}},"loader"),sw={id:zf,detector:iw,loader:aw},ic=!1,ss=f(()=>{ic||(ic=!0,ha("error",kk,e=>e.toLowerCase().trim()==="error"),ha("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ps(Tk,Dk,rw),Ps(h_,Pk,nk,rk,k_,M_,F_,R_,V_,Q_,x_,f_,Mk,T_,fk,hk,xk,z_,qk,Yk,j_,Qk,Vk,sw))},"addDiagrams"),nw=f(async()=>{F.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(tr).map(async([r,{detector:i,loader:a}])=>{if(a)try{qs(r)}catch{try{const{diagram:s,id:o}=await a();ha(o,s,i)}catch(s){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete tr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){F.error(`Failed to load ${t.length} external diagrams`);for(const r of t)F.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),ow="graphics-document document";function Wf(e,t){e.attr("role",ow),t!==""&&e.attr("aria-roledescription",t)}f(Wf,"setA11yDiagramInfo");function qf(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}f(qf,"addSVGa11yTitleDescription");var Je,Tn=(Je=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){const i=Ot(),a=An(t,i);t=s1(t)+`
243
+ `;try{qs(a)}catch{const c=Hg(a);if(!c)throw new gc(`Diagram ${a} not found.`);const{id:h,diagram:u}=await c();ha(h,u)}const{db:s,parser:o,renderer:n,init:l}=qs(a);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new Je(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(Je,"Diagram"),Je),ac=[],lw=f(()=>{ac.forEach(e=>{e()}),ac=[]},"attachFunctions"),cw=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Hf(e){const t=e.match(fc);if(!t)return{text:e,metadata:{}};let r=n0(t[1],{schema:s0})??{};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}}f(Hf,"extractFrontMatter");var hw=f(e=>e.replace(/\r\n?/g,`
244
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),uw=f(e=>{const{text:t,metadata:r}=Hf(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),dw=f(e=>{const t=oe.detectInit(e)??{},r=oe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Ub(e),directive:t}},"processDirectives");function ko(e){const t=hw(e),r=uw(t),i=dw(r.text),a=ao(r.config,i.directive);return e=cw(i.text),{code:e,title:r.title,config:a}}f(ko,"preprocessDiagram");function jf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(jf,"toBase64");var pw=5e4,fw="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",gw="sandbox",mw="loose",yw="http://www.w3.org/2000/svg",xw="http://www.w3.org/1999/xlink",bw="http://www.w3.org/1999/xhtml",Cw="100%",_w="100%",kw="border:0;margin:0;",ww="margin:0",Sw="allow-top-navigation-by-user-activation allow-popups",vw='The "iframe" tag is not supported by your browser.',Tw=["foreignobject"],Bw=["dominant-baseline"];function wo(e){const t=ko(e);return la(),sm(t.config??{}),t}f(wo,"processAndSetConfigs");async function Yf(e,t){ss();try{const{code:r,config:i}=wo(e);return{diagramType:(await Gf(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}f(Yf,"parse");var sc=f((e,t,r=[])=>`
245
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Lw=f((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
246
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
247
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
248
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{rc(n.styles)||o.forEach(l=>{r+=sc(n.id,l,n.styles)}),rc(n.textStyles)||(r+=sc(n.id,"tspan",(n?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),Aw=f((e,t,r,i)=>{const a=Lw(e,r),s=vm(t,a,e.themeVariables);return _n(jC(`${i}{${s}}`),UC)},"createUserStyles"),Mw=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=cr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Ew=f((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":_w,i=jf(`<body style="${ww}">${e}</body>`);return`<iframe style="width:${Cw};height:${r};${kw}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Sw}">
249
+ ${vw}
250
+ </iframe>`},"putIntoIFrame"),nc=f((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",yw);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function Bn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Bn,"sandboxedIframe");var $w=f((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),Fw=f(async function(e,t,r){ss();const i=wo(t);t=i.code;const a=Ot();F.debug(a),t.length>(a?.maxTextSize??pw)&&(t=fw);const s="#"+e,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=f(()=>{const R=ht(d?n:c).node();R&&"remove"in R&&R.remove()},"removeTempElements");let u=ht("body");const d=a.securityLevel===gw,p=a.securityLevel===mw,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const N=Bn(ht(r),o);u=ht(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht(r);nc(u,e,l,`font-family: ${g}`,xw)}else{if($w(document,e,l,o),d){const N=Bn(ht("body"),o);u=ht(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht("body");nc(u,e,l)}let m,y;try{m=await Tn.fromText(t,{title:i.title})}catch(N){if(a.suppressErrorRendering)throw h(),N;m=await Tn.fromText("error"),y=N}const x=u.select(c).node(),b=m.type,C=x.firstChild,w=C.firstChild,k=m.renderer.getClasses?.(t,m),L=Aw(a,b,k,s),v=document.createElement("style");v.innerHTML=L,C.insertBefore(v,w);try{await m.renderer.draw(t,e,Wo.version,m)}catch(N){throw a.suppressErrorRendering?h():Ck.draw(t,e,Wo.version),N}const D=u.select(`${c} svg`),I=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();Vf(b,D,I,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",bw);let E=u.select(c).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=Mw(E,d,Lt(a.arrowMarkerAbsolute)),d){const N=u.select(c+" svg").node();E=Ew(E,N)}else p||(E=Er.sanitize(E,{ADD_TAGS:Tw,ADD_ATTR:Bw,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(lw(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function Uf(e={}){const t=Tt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),im(t),t?.theme&&t.theme in Te?t.themeVariables=Te[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Te.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?rm(t):Cc();Ln(r.logLevel),ss()}f(Uf,"initialize");var Gf=f((e,t={})=>{const{code:r}=ko(e);return Tn.fromText(r,t)},"getDiagramFromText");function Vf(e,t,r,i){Wf(t,e),qf(t,r,i,t.attr("id"))}f(Vf,"addA11yInfo");var sr=Object.freeze({render:Fw,parse:Yf,getDiagramFromText:Gf,initialize:Uf,getConfig:Ot,setConfig:_c,getSiteConfig:Cc,updateSiteConfig:am,reset:f(()=>{la()},"reset"),globalReset:f(()=>{la($r)},"globalReset"),defaultConfig:$r});Ln(Ot().logLevel);la(Ot());var Dw=f((e,t,r)=>{F.warn(e),io(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"),Xf=f(async function(e={querySelector:".mermaid"}){try{await Ow(e)}catch(t){if(io(t)&&F.error(t.str),Ae.parseError&&Ae.parseError(t),!e.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Ow=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=sr.getConfig();F.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(F.debug("Start On Load: "+i?.startOnLoad),sr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new oe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if(F.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=gd(oe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=oe.detectInit(o);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Jf(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){Dw(u,n,Ae.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Zf=f(function(e){sr.initialize(e)},"initialize"),Rw=f(async function(e,t,r){F.warn("mermaid.init is deprecated. Please use run instead."),e&&Zf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Xf(i)},"init"),Iw=f(async(e,{lazyLoad:t=!0}={})=>{ss(),Ps(...e),t===!1&&await nw()},"registerExternalDiagrams"),Kf=f(function(){if(Ae.startOnLoad){const{startOnLoad:e}=sr.getConfig();e&&Ae.run().catch(t=>F.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Kf,!1);var Pw=f(function(e){Ae.parseError=e},"setParseErrorHandler"),Oa=[],Ds=!1,Qf=f(async()=>{if(!Ds){for(Ds=!0;Oa.length>0;){const e=Oa.shift();if(e)try{await e()}catch(t){F.error("Error executing queue",t)}}Ds=!1}},"executeQueue"),Nw=f(async(e,t)=>new Promise((r,i)=>{const a=f(()=>new Promise((s,o)=>{sr.parse(e,t).then(n=>{s(n),r(n)},n=>{F.error("Error parsing",n),Ae.parseError?.(n),o(n),i(n)})}),"performCall");Oa.push(a),Qf().catch(i)}),"parse"),Jf=f((e,t,r)=>new Promise((i,a)=>{const s=f(()=>new Promise((o,n)=>{sr.render(e,t,r).then(l=>{o(l),i(l)},l=>{F.error("Error parsing",l),Ae.parseError?.(l),n(l),a(l)})}),"performCall");Oa.push(s),Qf().catch(a)}),"render"),zw=f(()=>Object.keys(tr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ae={startOnLoad:!0,mermaidAPI:sr,parse:Nw,render:Jf,init:Rw,run:Xf,registerExternalDiagrams:Iw,registerLayoutLoaders:nf,initialize:Zf,parseError:void 0,contentLoaded:Kf,setParseErrorHandler:Pw,detectType:An,registerIconPacks:c2,getRegisteredDiagramsMetadata:zw},Ww=Ae;const mS=Object.freeze(Object.defineProperty({__proto__:null,default:Ww},Symbol.toStringTag,{value:"Module"}));export{zm as $,pg as A,Dm as B,ao as C,bc as D,Ot as E,Kb as F,Jm as G,Wo as H,Xg as I,s0 as J,Fr as K,jw as L,Xa as M,fm as N,Mn as O,Jo as P,jm as Q,Qi as R,Zb as S,Si as T,km as U,wi as V,H as W,et as X,Lc as Y,qb as Z,f as _,Lm as a,Eb as a$,Rn as a0,Xw as a1,Qw as a2,mr as a3,il as a4,rl as a5,tS as a6,Jw as a7,Kw as a8,Gw as a9,Wm as aA,Hw as aB,Va as aC,Sa as aD,Gu as aE,Ai as aF,c2 as aG,l2 as aH,mb as aI,Yu as aJ,Pu as aK,Cx as aL,_a as aM,_x as aN,Bi as aO,Ve as aP,ub as aQ,wl as aR,nr as aS,kx as aT,Kn as aU,bx as aV,vx as aW,Wr as aX,gb as aY,Pb as aZ,Mx as a_,Vw as aa,Zw as ab,rS as ac,eS as ad,R2 as ae,ef as af,dS as ag,o0 as ah,Lt as ai,ze as aj,Vn as ak,Bd as al,cr as am,Ju as an,nt as ao,ye as ap,BC as aq,uS as ar,pS as as,cS as at,G as au,hS as av,cC as aw,aC as ax,iC as ay,u2 as az,Bm as b,Xn as b0,rc as b1,U as b2,Fu as b3,dg as b4,Ib as b5,Mb as b6,Nb as b7,ja as b8,yx as b9,Zn as ba,ju as bb,Wb as bc,zr as bd,kb as be,ZC as bf,Ti as bg,wa as bh,Ne as bi,xl as bj,Qn as bk,zu as bl,Sn as bm,mS as bn,dt as c,Bc as d,Tt as e,Le as f,Mm as g,Jt as h,p0 as i,Pr as j,ed as k,F as l,Yw as m,gS as n,Em as o,$m as p,n0 as q,fS as r,Am as s,tC as t,oe as u,iS as v,t1 as w,Tm as x,Uw as y,ci as z};