@kabmo-labs/kabmo 0.42.0 → 0.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +592 -593
- package/dist/client/static/js/{CsvGrid-20k047ht.js → CsvGrid-g6rek8y9.js} +1 -1
- package/dist/client/static/js/{DocxView-qpvhfcmg.js → DocxView-41t9ryws.js} +2 -2
- package/dist/client/static/js/{DrawioView-178skky8.js → DrawioView-mfxhfz1h.js} +1 -1
- package/dist/client/static/js/{ImageView-460th5qa.js → ImageView-bxqw3t4k.js} +1 -1
- package/dist/client/static/js/{LayoutWrapper-5cv0dty8.js → LayoutWrapper-zt14rv9m.js} +2 -2
- package/dist/client/static/js/{Modal-wks6p4r5.js → Modal-cm35g20x.js} +10 -10
- package/dist/client/static/js/{PdfView-y51g03nr.js → PdfView-bek8k888.js} +1 -1
- package/dist/client/static/js/{SessionsView-rsmvn7ks.js → SessionsView-gn53zyn7.js} +1 -1
- package/dist/client/static/js/{SheetView-z7yvb05v.js → SheetView-vezssf6b.js} +1 -1
- package/dist/client/static/js/{SvgPreview-yehgzhem.js → SvgPreview-f1qaw73k.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-6zxpcy8b.js → abnfDiagram-O67JEVCF-4qn94h52.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-cagtcfhk.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-m98sgh3c.js → architectureDiagram-NJMV4G6O-tbewzdya.js} +3 -3
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-cp7rervg.js → blockDiagram-BEXU5L5S-njgnwckz.js} +2 -2
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-t31recqm.js → c4Diagram-YGBWAQC7-f58pcvbk.js} +1 -1
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fy8x3dkx.js → classDiagram-v2-NBCMYWYE-52g73vyw.js} +3 -3
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-va7ybm9e.js → cose-bilkent-JH36ORCC-ptdnshzh.js} +1 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-6g2ydrss.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4k0k429c.js → cynefinDiagram-VND7K2PF-qabfdkzr.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-ykdhxq6t.js → dagre-6A5THRUB-kyf5jetf.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-5nvwx7b6.js → diagram-22UHCM2B-bxrsjtv9.js} +4 -4
- package/dist/client/static/js/{diagram-3UASUU5V-hc7zsjgw.js → diagram-3UASUU5V-0f41s00j.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-97ae07y7.js → diagram-ATOU4E4O-0z1zx9h1.js} +1 -1
- package/dist/client/static/js/{diagram-CDSNMT55-b56nnbbs.js → diagram-CDSNMT55-znrmr6bk.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-37rygr9k.js → diagram-MLGK6HIB-jfe2jhk0.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-wv3vhhfk.js → diagram-MPIPVDR6-2kaawmwa.js} +1 -1
- package/dist/client/static/js/{dockerfile-0efb1z6e.js → dockerfile-12exatm9.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-13fv7vxg.js → ebnfDiagram-ZINNZB2B-s5n37rfp.js} +1 -1
- package/dist/client/static/js/{elixir-mabagxwa.js → elixir-szk51ehr.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-xam60ktz.js → elk-276RUBZZ-433rd9fp.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-24ctv2ee.js → erDiagram-OPXOYQCR-key6ah0b.js} +2 -2
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b774qbn2.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-nznq0n36.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-766a8fqw.js → ganttDiagram-FUAMR5RP-4efkhmca.js} +2 -2
- package/dist/client/static/js/gitGraph-4MIJSDKK-b047d6vk.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-fmwjkgh6.js → gitGraphDiagram-X574FWY7-ac376y2k.js} +1 -1
- package/dist/client/static/js/html-tbz83eke.js +1 -0
- package/dist/client/static/js/{index-13xbwcbz.js → index-02543wk3.js} +1 -1
- package/dist/client/static/js/{index-sx809d6d.js → index-0e9nkc0g.js} +1 -1
- package/dist/client/static/js/{index-1c0pnsjd.js → index-0gbj4270.js} +1 -1
- package/dist/client/static/js/{index-z6kpc98a.js → index-0pabfaac.js} +1 -1
- package/dist/client/static/js/{index-4mstdh41.js → index-1t5ybx9v.js} +1 -1
- package/dist/client/static/js/{index-9vdbnvmk.js → index-1y3rzw6b.js} +1 -1
- package/dist/client/static/js/{index-qj34r6d0.js → index-38xv8h4t.js} +1 -1
- package/dist/client/static/js/{index-4j8rgr4p.js → index-50mdqev0.js} +1 -1
- package/dist/client/static/js/{index-zvazj4va.js → index-5jnvz9hw.js} +1 -1
- package/dist/client/static/js/{index-97qst4k9.js → index-77t0nvt1.js} +1 -1
- package/dist/client/static/js/{index-x7f5ysch.js → index-7a2efrbj.js} +1 -1
- package/dist/client/static/js/{index-yvxa7hd8.js → index-82vk27q1.js} +1 -1
- package/dist/client/static/js/{index-nbexks3x.js → index-8k7vjp8b.js} +1 -1
- package/dist/client/static/js/{index-sq3r1xhf.js → index-8kbp24xg.js} +1 -1
- package/dist/client/static/js/{index-zjydzxhm.js → index-b0v6gwym.js} +2 -2
- package/dist/client/static/js/{index-grczkttn.js → index-b42t14wk.js} +7 -7
- package/dist/client/static/js/{index-13dr1t1r.js → index-cz50ha6x.js} +23 -23
- package/dist/client/static/js/{index-8jqawh3r.js → index-dtj73vs1.js} +1 -1
- package/dist/client/static/js/{index-7t63akyt.js → index-dzmar8jr.js} +1 -1
- package/dist/client/static/js/{index-2x9eqztp.js → index-f33c4paw.js} +1 -1
- package/dist/client/static/js/{index-xxe52zrm.js → index-fb6pw9xb.js} +1 -1
- package/dist/client/static/js/{index-6ge6gk9w.js → index-gp57dx2v.js} +1 -1
- package/dist/client/static/js/{index-2hpy58d0.js → index-gsxebrq9.js} +2 -2
- package/dist/client/static/js/{index-czagykbq.js → index-pxtff3ez.js} +2 -2
- package/dist/client/static/js/{index-8hgm0abr.js → index-pzvr1699.js} +187 -183
- package/dist/client/static/js/{index-dydwcp3n.js → index-r9db1gsf.js} +1 -1
- package/dist/client/static/js/{index-b4y5g48d.js → index-raca8tsh.js} +1 -1
- package/dist/client/static/js/{index-95en3p3g.js → index-rf29f3fq.js} +4 -4
- package/dist/client/static/js/{index-sz3mxjvy.js → index-s4gv0rpk.js} +1 -1
- package/dist/client/static/js/{index-a9t9gdew.js → index-v3f7we4n.js} +4 -4
- package/dist/client/static/js/{index-ejdnjh5c.js → index-yjmm73jm.js} +1 -1
- package/dist/client/static/js/{index-1rxa9zxp.js → index-ykfd2fyj.js} +1 -1
- package/dist/client/static/js/{index-4z4ax55k.js → index-yzda8j2d.js} +6 -6
- package/dist/client/static/js/{index-vcn1kcpy.js → index-z78bzryw.js} +3 -3
- package/dist/client/static/js/{index-tqycj126.js → index-zndbhb9w.js} +1 -1
- package/dist/client/static/js/{index-ka2rc2cr.js → index-zs73zwjz.js} +3 -3
- package/dist/client/static/js/{index-xe5cqwnf.js → index-zs7sjv6x.js} +1 -1
- package/dist/client/static/js/{index-hzwr5fm9.js → index-zw621xez.js} +3 -3
- package/dist/client/static/js/info-A6RAGUB7-n495k952.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-tqytmzp1.js → infoDiagram-VRGFBTTK-4e7ej63f.js} +2 -2
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rp77ff6m.js → ishikawaDiagram-OU5B5YK6-k3yet1ec.js} +2 -2
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-c7bxrhf1.js → journeyDiagram-ZHPQQLJL-qe352kyd.js} +2 -2
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-j2pxewqq.js → kanban-definition-PNTS6WVX-58hag75n.js} +4 -4
- package/dist/client/static/js/{mermaid.core-cqqe1krg.js → mermaid.core-6e89h6vm.js} +2 -2
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-s03k32p9.js → mindmap-definition-NLK3R4M7-ncsam2fm.js} +1 -1
- package/dist/client/static/js/one-dark-pro-qmyne0tn.js +1 -0
- package/dist/client/static/js/one-light-dj0ecjcj.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-zajj62z6.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-dfg2j0zc.js → pegDiagram-GJSIUBJH-b5ckc39d.js} +1 -1
- package/dist/client/static/js/{perl-5vxax0nr.js → perl-dtn1fccw.js} +1 -1
- package/dist/client/static/js/{php-hgrgdq63.js → php-7av78hch.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-1ve78y5f.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-pshd1j79.js → pieDiagram-5QR66LMP-s4d47ve8.js} +2 -2
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-cvvvmtk2.js → quadrantDiagram-O4NWA36T-zm0ekvjz.js} +1 -1
- package/dist/client/static/js/radar-RG4KPBEZ-8rqadb58.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-v6ppm8dy.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-9j6bae14.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-56cpyt0g.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yfdmspf4.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-h53p3sha.js → railroadDiagram-XR7U4H2S-52vdqf53.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bdv2fkxd.js → requirementDiagram-PLB6GJNP-7kf8bmk9.js} +1 -1
- package/dist/client/static/js/{ruby-8pxcn21w.js → ruby-s2bqr910.js} +1 -1
- package/dist/client/static/js/{rust-j80dxgjg.js → rust-q98kssv3.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-xqnnvmhy.js → sankeyDiagram-IPEJSGJF-bcb9f54a.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3p67305f.js → sequenceDiagram-PO4LG4MO-76ywvj7g.js} +3 -3
- package/dist/client/static/js/{sizeCapture-INFHLROL-f87525h7.js → sizeCapture-INFHLROL-p9bsf5dc.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-e5st1fy3.js → stateDiagram-v2-GCMORJYK-1ecfb3fs.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-ceghkbez.js → swimlanes-2SLR337P-2pyjr946.js} +1 -1
- package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-vc8hvfya.js → swimlanesDiagram-TC7HE7FX-qr5hdxm4.js} +1 -1
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-f7evs443.js → timeline-definition-EJHVYXUP-4csxwmn2.js} +3 -3
- package/dist/client/static/js/treeView-Q6P3EWNA-vwpg3wp8.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-htfxwd32.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-0gpn21p7.js → usecaseDiagram-POWQR4AR-0p1jnbsn.js} +7 -7
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-4spzy428.js → vennDiagram-UO4OBE2U-y1hgdet4.js} +2 -2
- package/dist/client/static/js/{vue-xm1dxpmy.js → vue-cbqm4bed.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hapfjkzq.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-745xr2pa.js → wardleyDiagram-VNRHLVJA-p578yrgm.js} +2 -2
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-7dr9qwx5.js → xychartDiagram-PMCCYNJV-b08b4ah0.js} +3 -3
- package/package.json +1 -1
- package/src/cli/lib/commands/session.js +12 -1
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +14 -123
- package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +214 -0
- package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +126 -0
- package/src/client/components/workspace/chat-timeline/UserTurn.tsx +183 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +45 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +14 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -12
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +42 -38
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +25 -21
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +41 -29
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +47 -43
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +136 -0
- package/src/client/hooks/chat/timeline/composer-modes.ts +10 -7
- package/src/client/hooks/chat/timeline/plan-review-republish.test.ts +121 -0
- package/src/client/hooks/chat/timeline/plan-review.ts +12 -3
- package/src/server/lib/harness/acp/acp-audit.server.ts +1 -1
- package/src/server/lib/harness/acp/session-exit.ts +39 -5
- package/src/server/lib/harness/acp/session-turns.ts +67 -12
- package/src/server/lib/harness/acp/session.test.ts +61 -0
- package/src/server/lib/harness/acp/session.ts +15 -25
- package/src/server/lib/harness/acp/turn-outcome.server.test.ts +97 -0
- package/src/server/lib/harness/acp/turn-outcome.server.ts +71 -0
- package/src/server/lib/harness/acp/turn-silence.ts +52 -0
- package/src/server/lib/harness/acp/turn.test.ts +85 -3
- package/src/server/lib/harness/acp/turn.ts +62 -4
- package/src/server/lib/lifecycle/after-listen.ts +10 -0
- package/src/server/lib/omp/rpc/frame-fold-contract.ts +21 -0
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +4 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +25 -2
- package/src/server/lib/omp/rpc/manager.ts +9 -8
- package/src/server/lib/omp/rpc/retry-saga.ts +54 -0
- package/src/server/lib/omp/rpc/run-settle.server.ts +38 -5
- package/src/server/lib/omp/rpc/run-settle.test.ts +5 -2
- package/src/server/lib/omp/rpc/session-commands-dialog.test.ts +6 -20
- package/src/server/lib/omp/rpc/session-commands-mapping.test.ts +131 -0
- package/src/server/lib/omp/rpc/session-commands.test.ts +95 -116
- package/src/server/lib/omp/rpc/session-commands.ts +38 -17
- package/src/server/lib/omp/rpc/terminal-settle.test.ts +223 -0
- package/src/server/lib/omp/rpc/terminal-settle.ts +127 -29
- package/src/server/lib/omp/session/scan.ts +15 -2
- package/src/server/lib/omp/session/session-discovery.test.ts +21 -0
- package/src/server/lib/sessions/notify.server.test.ts +11 -3
- package/src/server/lib/sessions/notify.server.ts +67 -42
- package/src/server/lib/sessions/spawn.server.test.ts +5 -1
- package/src/server/lib/sessions/spawn.server.ts +8 -3
- package/src/server/routes/sessions/answer.test.ts +62 -0
- package/src/server/routes/sessions/answer.ts +13 -2
- package/src/shared/lib/chat/composer/delegation.ts +11 -7
- package/src/shared/lib/chat/export-markdown.ts +19 -0
- package/src/shared/lib/chat/orchestration/notice.test.ts +118 -0
- package/src/shared/lib/chat/orchestration/notice.ts +183 -0
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +6 -1
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +3 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +36 -36
- package/src/shared/lib/omp/session/operator-title.test.ts +21 -0
- package/src/shared/lib/omp/session/operator-title.ts +28 -0
- package/dist/client/static/js/architecture-7GRP2DOG-9q06651f.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-w7a38g4g.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-6wrjccyw.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-19vjkg84.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-4je2p50v.js +0 -1
- package/dist/client/static/js/html-bwyt0ayy.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-k0z5qdew.js +0 -1
- package/dist/client/static/js/one-dark-pro-9tt0a020.js +0 -1
- package/dist/client/static/js/one-light-5fg4r0ra.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-6cnvmb2z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-m9z1mztn.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-8m9rkex6.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-wc55emj8.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2y2rnrzq.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-zzcc9x0v.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-z82na5nb.js +0 -1
- package/dist/client/static/js/treeView-Q6P3EWNA-kzh6cm3f.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-wz5ed560.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-zewbfccz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$t}from"./index-8hgm0abr.js";import{mn,Bn}from"./index-czagykbq.js";var ep=Bn(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",b="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(st){var D=["th","st","nd","rd"],Y=st%100;return"["+st+(D[(Y-20)%10]||D[Y]||D[0])+"]"}},_=function(st,D,Y){var et=String(st);return!et||et.length>=D?st:""+Array(D+1-et.length).join(Y)+st},v={s:_,z:function(st){var D=-st.utcOffset(),Y=Math.abs(D),et=Math.floor(Y/60),W=Y%60;return(D<=0?"+":"-")+_(et,2,"0")+":"+_(W,2,"0")},m:function st(D,Y){if(D.date()<Y.date())return-st(Y,D);var et=12*(Y.year()-D.year())+(Y.month()-D.month()),W=D.clone().add(et,f),nt=Y-W<0,at=D.clone().add(et+(nt?-1:1),f);return+(-(et+(Y-W)/(nt?W-at:at-W))||0)},a:function(st){return st<0?Math.ceil(st)||0:Math.floor(st)},p:function(st){return{M:f,y:m,w:d,d:n,D:b,h:c,m:a,s:o,ms:s,Q:u}[st]||String(st||"").toLowerCase().replace(/s$/,"")},u:function(st){return st===void 0}},M="en",I={};I[M]=B;var O="$isDayjsObject",X=function(st){return st instanceof ht||!(!st||!st[O])},G=function st(D,Y,et){var W;if(!D)return M;if(typeof D=="string"){var nt=D.toLowerCase();I[nt]&&(W=nt),Y&&(I[nt]=Y,W=nt);var at=D.split("-");if(!W&&at.length>1)return st(at[0])}else{var wt=D.name;I[wt]=D,W=wt}return!et&&W&&(M=W),W||!et&&M},tt=function(st,D){if(X(st))return st.clone();var Y=typeof D=="object"?D:{};return Y.date=st,Y.args=arguments,new ht(Y)},it=v;it.l=G,it.i=X,it.w=function(st,D){return tt(st,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var ht=function(){function st(Y){this.$L=G(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[O]=!0}var D=st.prototype;return D.parse=function(Y){this.$d=function(et){var{date:W,utc:nt}=et;if(W===null)return new Date(NaN);if(it.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var at=W.match(S);if(at){var wt=at[2]-1||0,Tt=(at[7]||"0").substring(0,3);return nt?new Date(Date.UTC(at[1],wt,at[3]||1,at[4]||0,at[5]||0,at[6]||0,Tt)):new Date(at[1],wt,at[3]||1,at[4]||0,at[5]||0,at[6]||0,Tt)}}return new Date(W)}(Y),this.init()},D.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},D.$utils=function(){return it},D.isValid=function(){return this.$d.toString()!==k},D.isSame=function(Y,et){var W=tt(Y);return this.startOf(et)<=W&&W<=this.endOf(et)},D.isAfter=function(Y,et){return tt(Y)<this.startOf(et)},D.isBefore=function(Y,et){return this.endOf(et)<tt(Y)},D.$g=function(Y,et,W){return it.u(Y)?this[et]:this.set(W,Y)},D.unix=function(){return Math.floor(this.valueOf()/1000)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(Y,et){var W=this,nt=!!it.u(et)||et,at=it.p(Y),wt=function(Pt,Gt){var zt=it.w(W.$u?Date.UTC(W.$y,Gt,Pt):new Date(W.$y,Gt,Pt),W);return nt?zt:zt.endOf(n)},Tt=function(Pt,Gt){return it.w(W.toDate()[Pt].apply(W.toDate("s"),(nt?[0,0,0,0]:[23,59,59,999]).slice(Gt)),W)},Ut=this.$W,Xt=this.$M,Kt=this.$D,Zt="set"+(this.$u?"UTC":"");switch(at){case m:return nt?wt(1,0):wt(31,11);case f:return nt?wt(1,Xt):wt(0,Xt+1);case d:var Et=this.$locale().weekStart||0,_t=(Ut<Et?Ut+7:Ut)-Et;return wt(nt?Kt-_t:Kt+(6-_t),Xt);case n:case b:return Tt(Zt+"Hours",0);case c:return Tt(Zt+"Minutes",1);case a:return Tt(Zt+"Seconds",2);case o:return Tt(Zt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(Y){return this.startOf(Y,!1)},D.$set=function(Y,et){var W,nt=it.p(Y),at="set"+(this.$u?"UTC":""),wt=(W={},W[n]=at+"Date",W[b]=at+"Date",W[f]=at+"Month",W[m]=at+"FullYear",W[c]=at+"Hours",W[a]=at+"Minutes",W[o]=at+"Seconds",W[s]=at+"Milliseconds",W)[nt],Tt=nt===n?this.$D+(et-this.$W):et;if(nt===f||nt===m){var Ut=this.clone().set(b,1);Ut.$d[wt](Tt),Ut.init(),this.$d=Ut.set(b,Math.min(this.$D,Ut.daysInMonth())).$d}else wt&&this.$d[wt](Tt);return this.init(),this},D.set=function(Y,et){return this.clone().$set(Y,et)},D.get=function(Y){return this[it.p(Y)]()},D.add=function(Y,et){var W,nt=this;Y=Number(Y);var at=it.p(et),wt=function(Xt){var Kt=tt(nt);return it.w(Kt.date(Kt.date()+Math.round(Xt*Y)),nt)};if(at===f)return this.set(f,this.$M+Y);if(at===m)return this.set(m,this.$y+Y);if(at===n)return wt(1);if(at===d)return wt(7);var Tt=(W={},W[a]=e,W[c]=i,W[o]=r,W)[at]||1,Ut=this.$d.getTime()+Y*Tt;return it.w(Ut,this)},D.subtract=function(Y,et){return this.add(-1*Y,et)},D.format=function(Y){var et=this,W=this.$locale();if(!this.isValid())return W.invalidDate||k;var nt=Y||"YYYY-MM-DDTHH:mm:ssZ",at=it.z(this),wt=this.$H,Tt=this.$m,Ut=this.$M,{weekdays:Xt,months:Kt,meridiem:Zt}=W,Et=function(Gt,zt,ae,oe){return Gt&&(Gt[zt]||Gt(et,nt))||ae[zt].slice(0,oe)},_t=function(Gt){return it.s(wt%12||12,Gt,"0")},Pt=Zt||function(Gt,zt,ae){var oe=Gt<12?"AM":"PM";return ae?oe.toLowerCase():oe};return nt.replace(T,function(Gt,zt){return zt||function(ae){switch(ae){case"YY":return String(et.$y).slice(-2);case"YYYY":return it.s(et.$y,4,"0");case"M":return Ut+1;case"MM":return it.s(Ut+1,2,"0");case"MMM":return Et(W.monthsShort,Ut,Kt,3);case"MMMM":return Et(Kt,Ut);case"D":return et.$D;case"DD":return it.s(et.$D,2,"0");case"d":return String(et.$W);case"dd":return Et(W.weekdaysMin,et.$W,Xt,2);case"ddd":return Et(W.weekdaysShort,et.$W,Xt,3);case"dddd":return Xt[et.$W];case"H":return String(wt);case"HH":return it.s(wt,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Pt(wt,Tt,!0);case"A":return Pt(wt,Tt,!1);case"m":return String(Tt);case"mm":return it.s(Tt,2,"0");case"s":return String(et.$s);case"ss":return it.s(et.$s,2,"0");case"SSS":return it.s(et.$ms,3,"0");case"Z":return at}return null}(Gt)||at.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(Y,et,W){var nt,at=this,wt=it.p(et),Tt=tt(Y),Ut=(Tt.utcOffset()-this.utcOffset())*e,Xt=this-Tt,Kt=function(){return it.m(at,Tt)};switch(wt){case m:nt=Kt()/12;break;case f:nt=Kt();break;case u:nt=Kt()/3;break;case d:nt=(Xt-Ut)/604800000;break;case n:nt=(Xt-Ut)/86400000;break;case c:nt=Xt/i;break;case a:nt=Xt/e;break;case o:nt=Xt/r;break;default:nt=Xt}return W?nt:it.a(nt)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return I[this.$L]},D.locale=function(Y,et){if(!Y)return this.$L;var W=this.clone(),nt=G(Y,et,!0);return nt&&(W.$L=nt),W},D.clone=function(){return it.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},st}(),lt=ht.prototype;return tt.prototype=lt,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",b]].forEach(function(st){lt[st[1]]=function(D){return this.$g(D,st[0],st[1])}}),tt.extend=function(st,D){return st.$i||(st(D,ht,tt),st.$i=!0),tt},tt.locale=G,tt.isDayjs=X,tt.unix=function(st){return tt(1000*st)},tt.en=I[M],tt.Ls=I,tt.p={},tt})});var Vd=Bn(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|:)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var Ls=Bn(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=Eb;var Se=Vd();function Fb(r){return Se.relativeFirstCharacters.indexOf(r[0])>-1}function Mb(r){var e=r.replace(Se.ctrlCharactersRegex,"");return e.replace(Se.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Ab(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function Eb(r){if(!r)return Se.BLANK_URL;var e,i=Kd(r.trim());do i=Mb(i).replace(Se.htmlCtrlEntityRegex,"").replace(Se.ctrlCharactersRegex,"").replace(Se.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(Se.ctrlCharactersRegex)||i.match(Se.htmlEntitiesRegex)||i.match(Se.htmlCtrlEntityRegex)||i.match(Se.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Se.BLANK_URL;if(Fb(s))return s;var o=s.trimStart(),a=o.match(Se.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(Se.invalidProtocolRegex.test(c))return Se.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!Ab(n))return Se.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),lo=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=mn(ep(),1),rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Tu=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,Ee("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ee("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,Ee("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ee("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,Ee("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ee("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,Ee("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ee("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,Ee("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,Ee("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("TRACE"))},"setLogLevel"),Ee=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Tc=Do;var Ey={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Bc=Ey;var $y={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=$y;var Iy={channel:Tc,lang:Bc,unit:_c},Dt=Iy;var or={};for(let r=0;r<=255;r++)or[r]=Dt.unit.dec2hex(r);var pe={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=pe.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=pe.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=pe.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Dt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Dt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Dt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Dt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Dt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Dt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(pe.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(pe.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(pe.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(pe.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(pe.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(pe.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var Oy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=Oy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}${or[Math.round(o*255)]}`;else return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}`}},wr=Ac;var Po={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:(r)=>{let e=r.match(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Dt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Dt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(i)*360)}}return Dt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Dt.channel.clamp.s(parseFloat(o)),l:Dt.channel.clamp.l(parseFloat(a)),a:c?Dt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%, ${o})`;else return`hsl(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%)`}},Bi=Po;var Ro={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:(r)=>{r=r.toLowerCase();let e=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ya=Ro;var Ec={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Dt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Dt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Dt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)}, ${Dt.lang.round(o)})`;else return`rgb(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`}},_i=Ec;var Dy={format:{keyword:ya,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ya.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(pe.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ge=Dy;var Py=(r,e)=>{let i=ge.parse(r);for(let s in e)i[s]=Dt.channel.clamp[s](e[s]);return ge.stringify(i)},qo=Py;var Ry=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Dt.channel.clamp.r(r),g:Dt.channel.clamp.g(e),b:Dt.channel.clamp.b(i),a:Dt.channel.clamp.a(s)});return ge.stringify(o)},mt=Ry;var qy=(r,e)=>Dt.lang.round(ge.parse(r)[e]),ua=qy;var Wy=(r)=>{let{r:e,g:i,b:s}=ge.parse(r),o=0.2126*Dt.channel.toLinear(e)+0.7152*Dt.channel.toLinear(i)+0.0722*Dt.channel.toLinear(s);return Dt.lang.round(o)},$c=Wy;var Ny=(r)=>$c(r)>=0.5,Ic=Ny;var zy=(r)=>!Ic(r),Be=zy;var Hy=(r,e,i)=>{let s=ge.parse(r),o=s[e],a=Dt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ge.stringify(s)},Ml=Hy;var Yy=(r,e)=>Ml(r,"l",e),g=Yy;var jy=(r,e)=>Ml(r,"l",-e),A=jy;var Uy=(r,e)=>{let i=ge.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=Uy;var Xy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ge.parse(r),{r:n,g:d,b:f,a:u}=ge.parse(e),m=i/100,b=m*2-1,k=c-u,T=((b*k===-1?b:(b+k)/(1+b*k))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,M=a*T+f*B,I=c*m+u*(1-m);return mt(_,v,M,I)},Oc=Xy;var Gy=(r,e=100)=>{let i=ge.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=Gy;var Rf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Hr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vy=/\s/,Ky=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
|
|
1
|
+
import{$t}from"./index-pzvr1699.js";import{mn,In}from"./index-pxtff3ez.js";var ep=In(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",b="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(st){var D=["th","st","nd","rd"],Y=st%100;return"["+st+(D[(Y-20)%10]||D[Y]||D[0])+"]"}},_=function(st,D,Y){var et=String(st);return!et||et.length>=D?st:""+Array(D+1-et.length).join(Y)+st},v={s:_,z:function(st){var D=-st.utcOffset(),Y=Math.abs(D),et=Math.floor(Y/60),W=Y%60;return(D<=0?"+":"-")+_(et,2,"0")+":"+_(W,2,"0")},m:function st(D,Y){if(D.date()<Y.date())return-st(Y,D);var et=12*(Y.year()-D.year())+(Y.month()-D.month()),W=D.clone().add(et,f),nt=Y-W<0,at=D.clone().add(et+(nt?-1:1),f);return+(-(et+(Y-W)/(nt?W-at:at-W))||0)},a:function(st){return st<0?Math.ceil(st)||0:Math.floor(st)},p:function(st){return{M:f,y:m,w:d,d:n,D:b,h:c,m:a,s:o,ms:s,Q:u}[st]||String(st||"").toLowerCase().replace(/s$/,"")},u:function(st){return st===void 0}},M="en",I={};I[M]=B;var O="$isDayjsObject",G=function(st){return st instanceof ht||!(!st||!st[O])},Z=function st(D,Y,et){var W;if(!D)return M;if(typeof D=="string"){var nt=D.toLowerCase();I[nt]&&(W=nt),Y&&(I[nt]=Y,W=nt);var at=D.split("-");if(!W&&at.length>1)return st(at[0])}else{var wt=D.name;I[wt]=D,W=wt}return!et&&W&&(M=W),W||!et&&M},tt=function(st,D){if(G(st))return st.clone();var Y=typeof D=="object"?D:{};return Y.date=st,Y.args=arguments,new ht(Y)},it=v;it.l=Z,it.i=G,it.w=function(st,D){return tt(st,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var ht=function(){function st(Y){this.$L=Z(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[O]=!0}var D=st.prototype;return D.parse=function(Y){this.$d=function(et){var{date:W,utc:nt}=et;if(W===null)return new Date(NaN);if(it.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var at=W.match(S);if(at){var wt=at[2]-1||0,Tt=(at[7]||"0").substring(0,3);return nt?new Date(Date.UTC(at[1],wt,at[3]||1,at[4]||0,at[5]||0,at[6]||0,Tt)):new Date(at[1],wt,at[3]||1,at[4]||0,at[5]||0,at[6]||0,Tt)}}return new Date(W)}(Y),this.init()},D.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},D.$utils=function(){return it},D.isValid=function(){return this.$d.toString()!==k},D.isSame=function(Y,et){var W=tt(Y);return this.startOf(et)<=W&&W<=this.endOf(et)},D.isAfter=function(Y,et){return tt(Y)<this.startOf(et)},D.isBefore=function(Y,et){return this.endOf(et)<tt(Y)},D.$g=function(Y,et,W){return it.u(Y)?this[et]:this.set(W,Y)},D.unix=function(){return Math.floor(this.valueOf()/1000)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(Y,et){var W=this,nt=!!it.u(et)||et,at=it.p(Y),wt=function(Pt,Gt){var zt=it.w(W.$u?Date.UTC(W.$y,Gt,Pt):new Date(W.$y,Gt,Pt),W);return nt?zt:zt.endOf(n)},Tt=function(Pt,Gt){return it.w(W.toDate()[Pt].apply(W.toDate("s"),(nt?[0,0,0,0]:[23,59,59,999]).slice(Gt)),W)},Ut=this.$W,Xt=this.$M,Kt=this.$D,Zt="set"+(this.$u?"UTC":"");switch(at){case m:return nt?wt(1,0):wt(31,11);case f:return nt?wt(1,Xt):wt(0,Xt+1);case d:var Et=this.$locale().weekStart||0,_t=(Ut<Et?Ut+7:Ut)-Et;return wt(nt?Kt-_t:Kt+(6-_t),Xt);case n:case b:return Tt(Zt+"Hours",0);case c:return Tt(Zt+"Minutes",1);case a:return Tt(Zt+"Seconds",2);case o:return Tt(Zt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(Y){return this.startOf(Y,!1)},D.$set=function(Y,et){var W,nt=it.p(Y),at="set"+(this.$u?"UTC":""),wt=(W={},W[n]=at+"Date",W[b]=at+"Date",W[f]=at+"Month",W[m]=at+"FullYear",W[c]=at+"Hours",W[a]=at+"Minutes",W[o]=at+"Seconds",W[s]=at+"Milliseconds",W)[nt],Tt=nt===n?this.$D+(et-this.$W):et;if(nt===f||nt===m){var Ut=this.clone().set(b,1);Ut.$d[wt](Tt),Ut.init(),this.$d=Ut.set(b,Math.min(this.$D,Ut.daysInMonth())).$d}else wt&&this.$d[wt](Tt);return this.init(),this},D.set=function(Y,et){return this.clone().$set(Y,et)},D.get=function(Y){return this[it.p(Y)]()},D.add=function(Y,et){var W,nt=this;Y=Number(Y);var at=it.p(et),wt=function(Xt){var Kt=tt(nt);return it.w(Kt.date(Kt.date()+Math.round(Xt*Y)),nt)};if(at===f)return this.set(f,this.$M+Y);if(at===m)return this.set(m,this.$y+Y);if(at===n)return wt(1);if(at===d)return wt(7);var Tt=(W={},W[a]=e,W[c]=i,W[o]=r,W)[at]||1,Ut=this.$d.getTime()+Y*Tt;return it.w(Ut,this)},D.subtract=function(Y,et){return this.add(-1*Y,et)},D.format=function(Y){var et=this,W=this.$locale();if(!this.isValid())return W.invalidDate||k;var nt=Y||"YYYY-MM-DDTHH:mm:ssZ",at=it.z(this),wt=this.$H,Tt=this.$m,Ut=this.$M,{weekdays:Xt,months:Kt,meridiem:Zt}=W,Et=function(Gt,zt,ae,oe){return Gt&&(Gt[zt]||Gt(et,nt))||ae[zt].slice(0,oe)},_t=function(Gt){return it.s(wt%12||12,Gt,"0")},Pt=Zt||function(Gt,zt,ae){var oe=Gt<12?"AM":"PM";return ae?oe.toLowerCase():oe};return nt.replace(T,function(Gt,zt){return zt||function(ae){switch(ae){case"YY":return String(et.$y).slice(-2);case"YYYY":return it.s(et.$y,4,"0");case"M":return Ut+1;case"MM":return it.s(Ut+1,2,"0");case"MMM":return Et(W.monthsShort,Ut,Kt,3);case"MMMM":return Et(Kt,Ut);case"D":return et.$D;case"DD":return it.s(et.$D,2,"0");case"d":return String(et.$W);case"dd":return Et(W.weekdaysMin,et.$W,Xt,2);case"ddd":return Et(W.weekdaysShort,et.$W,Xt,3);case"dddd":return Xt[et.$W];case"H":return String(wt);case"HH":return it.s(wt,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Pt(wt,Tt,!0);case"A":return Pt(wt,Tt,!1);case"m":return String(Tt);case"mm":return it.s(Tt,2,"0");case"s":return String(et.$s);case"ss":return it.s(et.$s,2,"0");case"SSS":return it.s(et.$ms,3,"0");case"Z":return at}return null}(Gt)||at.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(Y,et,W){var nt,at=this,wt=it.p(et),Tt=tt(Y),Ut=(Tt.utcOffset()-this.utcOffset())*e,Xt=this-Tt,Kt=function(){return it.m(at,Tt)};switch(wt){case m:nt=Kt()/12;break;case f:nt=Kt();break;case u:nt=Kt()/3;break;case d:nt=(Xt-Ut)/604800000;break;case n:nt=(Xt-Ut)/86400000;break;case c:nt=Xt/i;break;case a:nt=Xt/e;break;case o:nt=Xt/r;break;default:nt=Xt}return W?nt:it.a(nt)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return I[this.$L]},D.locale=function(Y,et){if(!Y)return this.$L;var W=this.clone(),nt=Z(Y,et,!0);return nt&&(W.$L=nt),W},D.clone=function(){return it.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},st}(),lt=ht.prototype;return tt.prototype=lt,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",b]].forEach(function(st){lt[st[1]]=function(D){return this.$g(D,st[0],st[1])}}),tt.extend=function(st,D){return st.$i||(st(D,ht,tt),st.$i=!0),tt},tt.locale=Z,tt.isDayjs=G,tt.unix=function(st){return tt(1000*st)},tt.en=I[M],tt.Ls=I,tt.p={},tt})});var Vd=In(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|:)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var Ls=In(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=Eb;var Se=Vd();function Fb(r){return Se.relativeFirstCharacters.indexOf(r[0])>-1}function Mb(r){var e=r.replace(Se.ctrlCharactersRegex,"");return e.replace(Se.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Ab(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function Eb(r){if(!r)return Se.BLANK_URL;var e,i=Kd(r.trim());do i=Mb(i).replace(Se.htmlCtrlEntityRegex,"").replace(Se.ctrlCharactersRegex,"").replace(Se.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(Se.ctrlCharactersRegex)||i.match(Se.htmlEntitiesRegex)||i.match(Se.htmlCtrlEntityRegex)||i.match(Se.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Se.BLANK_URL;if(Fb(s))return s;var o=s.trimStart(),a=o.match(Se.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(Se.invalidProtocolRegex.test(c))return Se.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!Ab(n))return Se.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),lo=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=mn(ep(),1),rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Tu=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,Ee("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ee("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,Ee("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ee("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,Ee("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ee("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,Ee("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ee("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,Ee("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,Ee("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ee("TRACE"))},"setLogLevel"),Ee=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Tc=Do;var Ey={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Bc=Ey;var $y={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=$y;var Iy={channel:Tc,lang:Bc,unit:_c},Dt=Iy;var or={};for(let r=0;r<=255;r++)or[r]=Dt.unit.dec2hex(r);var pe={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=pe.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=pe.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=pe.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Dt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Dt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Dt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Dt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Dt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Dt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(pe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Dt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(pe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Dt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(pe.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(pe.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(pe.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(pe.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(pe.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(pe.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var Oy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=Oy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}${or[Math.round(o*255)]}`;else return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}`}},wr=Ac;var Po={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:(r)=>{let e=r.match(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Dt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Dt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(i)*360)}}return Dt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Dt.channel.clamp.s(parseFloat(o)),l:Dt.channel.clamp.l(parseFloat(a)),a:c?Dt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%, ${o})`;else return`hsl(${Dt.lang.round(e)}, ${Dt.lang.round(i)}%, ${Dt.lang.round(s)}%)`}},Bi=Po;var Ro={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:(r)=>{r=r.toLowerCase();let e=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ya=Ro;var Ec={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Dt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Dt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Dt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)}, ${Dt.lang.round(o)})`;else return`rgb(${Dt.lang.round(e)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`}},_i=Ec;var Dy={format:{keyword:ya,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ya.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(pe.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ge=Dy;var Py=(r,e)=>{let i=ge.parse(r);for(let s in e)i[s]=Dt.channel.clamp[s](e[s]);return ge.stringify(i)},qo=Py;var Ry=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Dt.channel.clamp.r(r),g:Dt.channel.clamp.g(e),b:Dt.channel.clamp.b(i),a:Dt.channel.clamp.a(s)});return ge.stringify(o)},mt=Ry;var qy=(r,e)=>Dt.lang.round(ge.parse(r)[e]),ua=qy;var Wy=(r)=>{let{r:e,g:i,b:s}=ge.parse(r),o=0.2126*Dt.channel.toLinear(e)+0.7152*Dt.channel.toLinear(i)+0.0722*Dt.channel.toLinear(s);return Dt.lang.round(o)},$c=Wy;var Ny=(r)=>$c(r)>=0.5,Ic=Ny;var zy=(r)=>!Ic(r),Be=zy;var Hy=(r,e,i)=>{let s=ge.parse(r),o=s[e],a=Dt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ge.stringify(s)},Ml=Hy;var Yy=(r,e)=>Ml(r,"l",e),g=Yy;var jy=(r,e)=>Ml(r,"l",-e),A=jy;var Uy=(r,e)=>{let i=ge.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=Uy;var Xy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ge.parse(r),{r:n,g:d,b:f,a:u}=ge.parse(e),m=i/100,b=m*2-1,k=c-u,T=((b*k===-1?b:(b+k)/(1+b*k))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,M=a*T+f*B,I=c*m+u*(1-m);return mt(_,v,M,I)},Oc=Xy;var Gy=(r,e=100)=>{let i=ge.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=Gy;var Rf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Hr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vy=/\s/,Ky=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
|
|
2
2
|
`,o);if(a===-1)break;let c=o;while(c>i&&Vy.test(r[c-1]))c--;e+=r.slice(i,c)+`
|
|
3
3
|
`,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Ff=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Di={},Pl=t(function(r,e){r=Ky(r.replace(Rf,"").replace(Hr,""));for(let[i,{detector:s}]of Object.entries(Di))if(s(r,e))return i;throw new Ff(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),tp=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Wc(e,i,s)},"registerLazyLoadedDiagrams"),Wc=t((r,e,i)=>{if(Di[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Di[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Lg=t((r)=>Di[r].loader,"getDiagramLoader"),xa=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>xa(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(c)?[]:{};if(typeof o[a]==="object")o[a]=xa(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),Ke=xa,ze="#ffffff",He="#f2f2f2",Vt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),Zy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode)this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=mt(255,255,255,0.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=mt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=mt(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||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=g(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=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=g(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=J(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Vt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=mt(102,102,255,0.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||A(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},jt=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),rx=class{static{t(this,"Theme")}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=g("#cde498",10),this.primaryBorderColor=Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ix=t((r)=>{let e=new rx;return e.calculate(r),e},"getThemeVariables"),ox=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(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=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},sx=t((r)=>{let e=new ox;return e.calculate(r),e},"getThemeVariables"),ax=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Vt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||L(r,{h:30}),this.cScale4=this.cScale4||L(r,{h:60}),this.cScale5=this.cScale5||L(r,{h:90}),this.cScale6=this.cScale6||L(r,{h:120}),this.cScale7=this.cScale7||L(r,{h:150}),this.cScale8=this.cScale8||L(r,{h:210,l:150}),this.cScale9=this.cScale9||L(r,{h:270}),this.cScale10=this.cScale10||L(r,{h:300}),this.cScale11=this.cScale11||L(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},nx=t((r)=>{let e=new ax;return e.calculate(r),e},"getThemeVariables"),lx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=mt(255,255,255,0.25),this.arrowheadColor=J(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var hx=t((r)=>{let e=new lx;return e.calculate(r),e},"getThemeVariables"),cx=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Vt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ux=t((r)=>{let e=new cx;return e.calculate(r),e},"getThemeVariables"),dx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=mt(255,255,255,0.25),this.arrowheadColor=J(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},fx=t((r)=>{let e=new dx;return e.calculate(r),e},"getThemeVariables"),px=class{static{t(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Vt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Be(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},gx=t((r)=>{let e=new px;return e.calculate(r),e},"getThemeVariables"),mx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=mt(255,255,255,0.25),this.arrowheadColor=J(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||J(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?g(this.quadrant1Fill):A(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,legendTextColor:this.xyChart?.legendTextColor||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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25);this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ze,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||He}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},yx=t((r)=>{let e=new mx;return e.calculate(r),e},"getThemeVariables"),co={base:{getThemeVariables:Qy},dark:{getThemeVariables:tx},default:{getThemeVariables:jt},forest:{getThemeVariables:ix},neutral:{getThemeVariables:sx},neo:{getThemeVariables:nx},"neo-dark":{getThemeVariables:hx},redux:{getThemeVariables:ux},"redux-dark":{getThemeVariables:fx},"redux-color":{getThemeVariables:gx},"redux-dark-color":{getThemeVariables:yx}},fe={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:50000,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},Nc={...fe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:co.default.getThemeVariables(),sequence:{...fe.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:fe.class?.theme,look:fe.class?.look,layout:fe.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...fe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...fe.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...fe.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...fe.pie,useWidth:984},xyChart:{...fe.xyChart,useWidth:void 0},requirement:{...fe.requirement,useWidth:void 0},packet:{...fe.packet},eventmodeling:{...fe.eventmodeling},treeView:{...fe.treeView,useWidth:void 0},radar:{...fe.radar},usecase:{...fe.usecase},railroad:{...fe.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...fe.ishikawa},sankey:{...fe.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...fe.venn},cynefin:{...fe.cynefin}},zc=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...zc(r[s],"")];return[...i,e+s]},[]),"keyify"),xx=new Set(zc(Nc,"")),V=Nc,Cx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},bx=t((r)=>Cx[r]??r,"getDiagramConfigKey"),kx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},wx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Ei=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Ei(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=kx[e];if(s)wx(r[e],s);else l.debug("sanitizing object",e),Ei(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Lf(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Lf=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),Ko=Object.freeze(V),Sx=["theme","look","layout"],Tx=new Set(["classic","handDrawn","neo"]),Bx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(co,e);return r!=="look"||Tx.has(e)},"isUsableAppearance"),_x=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bx(i,o))},"readAppearance"),Or=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Te=Ke({},Ko),zo,Ho={},ar=[],vi=Ke({},Ko),Ai,vx=t((r,e)=>{if(!Ai)return;let i=[e,...[...ar].reverse(),Ho,Ko],s=r[Ai];for(let o of Sx)for(let a of i){let c=_x(a,Ai,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Yr=t((r,e)=>{let i=Ke({},r),s={};for(let a of e)Hc(a),s=Ke(s,a);if(i=Ke(i,s),vx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(co,i.theme)){let a=Ke({},zo),c=Ke(a.themeVariables||{},s.themeVariables);i.themeVariables=co[i.theme].getThemeVariables(c)}return vi=i,Fx(vi),vi},"updateCurrentConfig"),np=t((r)=>{Ai=r===void 0?void 0:bx(r),Yr(Te,ar)},"setDiagramConfigScope"),Mg=t((r)=>{if(Te=Ke({},Ko),Te=Ke(Te,r),Ho=Ke({},r),r.theme&&Object.hasOwn(co,r.theme))Te.themeVariables=co[r.theme].getThemeVariables(r.themeVariables);return Yr(Te,ar),Te},"setSiteConfig"),Pg=t((r)=>{zo=Ke({},r)},"saveConfigFromInitialize"),Og=t((r)=>(Te=Ke(Te,r),Ho=Ke(Ho,r),Yr(Te,ar),Te),"updateSiteConfig"),Mf=t(()=>Ke({},Te),"getSiteConfig"),Pf=t((r)=>(Yr(vi,[r]),C()),"setConfig"),C=t(()=>Ke({},vi),"getConfig"),Hc=t((r)=>{if(!r)return;["secure",...Te.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")Hc(r[e])})},"sanitize"),$g=t((r)=>{if(Ei(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};ar.push(r),Yr(Te,ar)},"addDirective"),Du=t((r=Te)=>{ar=[],Ai=void 0,Yr(r,ar)},"reset"),Lx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Dc={},Yc=t((r)=>{if(Dc[r])return;l.warn(Lx[r]),Dc[r]=!0},"issueWarning"),Fx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),zg=t(()=>{let r={};if(zo)r=Ke(r,zo);for(let e of ar)r=Ke(r,e);return r},"getUserDefinedConfig"),qt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Yc("FLOWCHART_HTML_LABELS_DEPRECATED");return Or(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Qs=/<\/?br\s*\/?>/gi,Mx=new RegExp(Qs.source,"i"),Ax=t((r)=>{if(!r)return[""];return Xc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ex=(()=>{let r=!1;return()=>{if(!r)jc(),r=!0}})();function jc(){$t.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),$t.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(jc,"setupDompurifyHooks");var Uc=t((r)=>(Ex(),$t.sanitize(r)),"removeScript"),Pc=t((r,e)=>{if(qt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Uc(r);else if(i!=="loose")r=Xc(r),r=r.replace(/</g,"<").replace(/>/g,">"),r=r.replace(/=/g,"="),r=Dx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=$t.sanitize(Pc(r,e),e.dompurifyConfig).toString();else r=$t.sanitize(Pc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),$x=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Ix=t((r)=>Mx.test(r),"hasBreaks"),Ox=t((r)=>r.split(Qs),"splitBreaks"),Dx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=t((r)=>r.replace(Qs,"#br#"),"breakToPlaceholder"),Of=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Px=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Rx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),uo=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],c=e[s+1];if(qx(a,c))o=a+","+c,s++,i.pop()}i.push(Wx(o))}return i.join("")},"parseGenericTypes"),Ca=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),qx=t((r,e)=>{let i=Ca(r,"~"),s=Ca(e,"~");return i===1&&s===1},"shouldCombineSets"),Wx=t((r)=>{let e=Ca(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Rc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,It=t((r)=>(r.match(Wo)?.length??0)>0,"hasKatex"),Ol=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await $l(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Nx=t(async(r,e)=>{if(!It(r))return r;if(!(Rc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Wo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Rc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Qs).map((o)=>It(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Wo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Wo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),$l=t(async(r,e)=>ee(await Nx(r,e),e),"renderKatexSanitized"),x={getRows:Ax,sanitizeText:ee,sanitizeTextOrArray:$x,hasBreaks:Ix,splitBreaks:Ox,lineBreakRegex:Qs,removeScript:Uc,getUrl:Of,evaluate:Or,getMax:Px,getMin:Rx},zx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Hx=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),te=t(function(r,e,i,s){let o=Hx(e,i,s);zx(r,o)},"configureSvgSize"),$r=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),No={};function rp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
|
|
4
4
|
`)}t(rp,"cssStyleSheetToString");var Yx=t((r,e,i,s)=>{let o="";if(r in No&&No[r])o=No[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
|
|
@@ -123,26 +123,26 @@ import{$t}from"./index-8hgm0abr.js";import{mn,Bn}from"./index-czagykbq.js";var e
|
|
|
123
123
|
|
|
124
124
|
${e}
|
|
125
125
|
`},"getStyles"),jx=t((r,e)=>{if(e!==void 0)No[r]=e},"addStylesForDiagram"),Ug=Yx,ap={};lo(ap,{clear:()=>R,getAccDescription:()=>U,getAccTitle:()=>z,getDiagramTitle:()=>j,setAccDescription:()=>P,setAccTitle:()=>F,setDiagramTitle:()=>q});var ba="",ka="",wa="",Sa=t((r)=>ee(r,C()),"sanitizeText"),R=t(()=>{ba="",wa="",ka=""},"clear"),F=t((r)=>{ba=Sa(r).replace(/^\s+/g,"")},"setAccTitle"),z=t(()=>ba,"getAccTitle"),P=t((r)=>{wa=Sa(r).replace(/\n\s+/g,`
|
|
126
|
-
`)},"setAccDescription"),U=t(()=>wa,"getAccDescription"),q=t((r)=>{ka=Sa(r)},"setDiagramTitle"),j=t(()=>ka,"getDiagramTitle"),qc=l,Ux=Tu,p=C,da=Pf,Ni=Ko,Uo=t((r)=>ee(r,p()),"sanitizeText"),zl=$r,Xx=t(()=>ap,"getCommonDb"),jo={},Nu=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);jx(r,e.styles),e.injectUtils?.(qc,Ux,p,Uo,zl,Xx(),()=>{})},"registerDiagram"),op=t((r)=>{if(r in jo)return jo[r];throw new Gx(r)},"getDiagram"),Gx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class $i extends Map{constructor(r,e=Zx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Vx(this,r),e)}delete(r){return super.delete(Kx(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Vx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Kx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Zx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Qx={value:()=>{}};function Kc(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Xo(i)}function Xo(r){this._=r}function Jx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Xo.prototype=Kc.prototype={constructor:Xo,on:function(r,e){var i=this._,s=Jx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=t0(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Xo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function t0(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Qx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Ta=Kc;var Go="http://www.w3.org/1999/xhtml",Ba={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ye(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ba.hasOwnProperty(e)?{space:Ba[e],local:r}:r}function e0(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Go&&e.documentElement.namespaceURI===Go?e.createElement(r):e.createElementNS(i,r)}}function r0(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Ye(r);return(e.local?r0:e0)(e)}function i0(){}function gr(r){return r==null?i0:function(){return this.querySelector(r)}}function _a(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new ce(s,this._parents)}function va(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function o0(){return[]}function jr(r){return r==null?o0:function(){return this.querySelectorAll(r)}}function s0(r){return function(){return va(r.apply(this,arguments))}}function La(r){if(typeof r==="function")r=s0(r);else r=jr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new ce(s,o)}function Xr(r){return function(){return this.matches(r)}}function Zo(r){return function(e){return e.matches(r)}}var a0=Array.prototype.find;function n0(r){return function(){return a0.call(this.children,r)}}function l0(){return this.firstElementChild}function Fa(r){return this.select(r==null?l0:n0(typeof r==="function"?r:Zo(r)))}var h0=Array.prototype.filter;function c0(){return Array.from(this.children)}function u0(r){return function(){return h0.call(this.children,r)}}function Ma(r){return this.selectAll(r==null?c0:u0(typeof r==="function"?r:Zo(r)))}function Aa(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new ce(s,this._parents)}function Oi(r){return Array(r.length)}function Ea(){return new ce(this._enter||this._groups.map(Oi),this._parents)}function Pi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Pi.prototype={constructor:Pi,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Ia(r){return function(){return r}}function d0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new Pi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function f0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,b=Array(u),k;for(n=0;n<u;++n)if(d=e[n])if(b[n]=k=c.call(d,d.__data__,n,e)+"",f.has(k))o[n]=d;else f.set(k,d);for(n=0;n<m;++n)if(k=c.call(r,a[n],n,a)+"",d=f.get(k))s[n]=d,d.__data__=a[n],f.delete(k);else i[n]=new Pi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(b[n])===d)o[n]=d}function p0(r){return r.__data__}function Da(r,e){if(!arguments.length)return Array.from(this,p0);var i=e?f0:d0,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],b=m.length,k=g0(r.call(u,u&&u.__data__,f,s)),S=k.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(b);i(u,m,T,B,_,k,e);for(var v=0,M=0,I,O;v<S;++v)if(I=T[v]){if(v>=M)M=v+1;while(!(O=B[M])&&++M<S);I._next=O||null}}return c=new ce(c,s),c._enter=n,c._exit=d,c}function g0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Pa(){return new ce(this._exit||this._groups.map(Oi),this._parents)}function Ra(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function qa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,b=n[d]=Array(m),k,S=0;S<m;++S)if(k=f[S]||u[S])b[S]=k;for(;d<o;++d)n[d]=i[d];return new ce(n,this._parents)}function Wa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Na(r){if(!r)r=m0;function e(m,b){return m&&b?r(m.__data__,b.__data__):!m-!b}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new ce(o,this._parents).order()}function m0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function za(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function y0(r){return function(){this.removeAttribute(r)}}function x0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function C0(r,e){return function(){this.setAttribute(r,e)}}function b0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function k0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function w0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Ga(r,e){var i=Ye(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?x0:y0:typeof e==="function"?i.local?w0:k0:i.local?b0:C0)(i,e))}function qi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function S0(r){return function(){this.style.removeProperty(r)}}function T0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function B0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Va(r,e,i){return arguments.length>1?this.each((e==null?S0:typeof e==="function"?B0:T0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||qi(r).getComputedStyle(r,null).getPropertyValue(e)}function _0(r){return function(){delete this[r]}}function v0(r,e){return function(){this[r]=e}}function L0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?_0:typeof e==="function"?L0:v0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function F0(r){return function(){Jc(this,r)}}function M0(r){return function(){tu(this,r)}}function A0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?A0:e?F0:M0)(i,e))}function E0(){this.textContent=""}function $0(r){return function(){this.textContent=r}}function I0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?E0:(typeof r==="function"?I0:$0)(r)):this.node().textContent}function O0(){this.innerHTML=""}function D0(r){return function(){this.innerHTML=r}}function P0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?O0:(typeof r==="function"?P0:D0)(r)):this.node().innerHTML}function R0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(R0)}function q0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each(q0)}function sn(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function W0(){return null}function an(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?W0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function N0(){var r=this.parentNode;if(r)r.removeChild(this)}function nn(){return this.each(N0)}function z0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function H0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function ln(r){return this.select(r?H0:z0)}function hn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function Y0(r){return function(e){r.call(this,e,this.__data__)}}function j0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function U0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function X0(r,e,i){return function(){var s=this.__on,o,a=Y0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function cn(r,e,i){var s=j0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?X0:U0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=qi(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function G0(r,e){return function(){return eu(this,r,e)}}function V0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?V0:G0)(r,e))}function*dn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var fn=[null];function ce(r,e){this._groups=r,this._parents=e}function ru(){return new ce([[document.documentElement]],fn)}function K0(){return this}ce.prototype=ru.prototype={constructor:ce,select:_a,selectAll:La,selectChild:Fa,selectChildren:Ma,filter:Aa,data:Da,enter:Ea,exit:Pa,join:Ra,merge:qa,selection:K0,order:Wa,sort:Na,call:za,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:sn,insert:an,remove:nn,clone:ln,datum:hn,on:cn,dispatch:un,[Symbol.iterator]:dn};var nr=ru;function h(r){return typeof r==="string"?new ce([[document.querySelector(r)]],[document.documentElement]):new ce([[r]],fn)}function Qi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Ul(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Ri(){}var Wi=0.7,es=1/Wi,Vr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z0=/^#([0-9a-f]{3,8})$/,Q0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),J0=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),tC=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${zi}\\)$`),eC=new RegExp(`^rgba\\(${je},${je},${je},${zi}\\)$`),rC=new RegExp(`^hsl\\(${zi},${je},${je}\\)$`),iC=new RegExp(`^hsla\\(${zi},${je},${je},${zi}\\)$`),iu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Qi(Ri,Oa,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:oC,formatHsl:sC,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function oC(){return this.rgb().formatHex8()}function sC(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function Oa(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Z0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new In(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Q0.exec(r))?new In(e[1],e[2],e[3],1):(e=J0.exec(r))?new In(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tC.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=eC.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rC.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=iC.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new In(NaN,NaN,NaN,0):null}function au(r){return new In(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new In(r,e,i,s)}function $f(r){if(!(r instanceof Ri))r=Oa(r);if(!r)return new In;return r=r.rgb(),new In(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?$f(r):new In(r,e,i,s==null?1:s)}function In(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Qi(In,Kr,Ul(Ri,{brighter(r){return r=r==null?es:Math.pow(es,r),new In(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new In(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new In(Tr(this.r),Tr(this.g),Tr(this.b),rs(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:nu,formatHex:nu,formatHex8:aC,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function aC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Sr(r){return r=Tr(r),(r<16?"0":"")+r.toString(16)}function hu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Oe(r,e,i,s)}function uu(r){if(r instanceof Oe)return new Oe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Ri))r=Oa(r);if(!r)return new Oe;if(r instanceof Oe)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Oe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Oe(r,e,i,s==null?1:s)}function Oe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Qi(Oe,du,Ul(Ri,{brighter(r){return r=r==null?es:Math.pow(es,r),new Oe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new Oe(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new In(pn(r>=240?r-240:r+120,o,s),pn(r,o,s),pn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Oe(cu(this.h),ts(this.s),ts(this.l),rs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function pn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function gn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return gn((i-s/e)*e,c,o,a,n)}}function Cn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],c=r[(s+1)%e],n=r[(s+2)%e];return gn((i-s/e)*e,o,a,c,n)}}var Gl=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function nC(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function Gg(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):Gl(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Vo:function(e,i){return i-e?nC(e,i,r):Gl(isNaN(e)?i:e)}}function Vo(r,e){var i=e-r;return i?fu(r,i):Gl(isNaN(r)?e:r)}var Rs=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Vo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var lC=gu(yn),hC=gu(Cn);function xn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bn=new RegExp(kn.source,"g");function cC(r){return function(){return r}}function uC(r){return function(e){return r(e)+""}}function jl(r,e){var i=kn.lastIndex=bn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=kn.exec(r))&&(o=bn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:xn(s,o)});i=bn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?uC(d[0].x):cC(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,b,k,S){if(f!==m||u!==b){var T=k.push("translate(",null,e,null,i);S.push({i:T-4,x:xn(f,m)},{i:T-2,x:xn(u,b)})}else if(m||b)k.push("translate("+m+e+b+i)}function c(f,u,m,b){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;b.push({i:m.push(o(m)+"rotate(",null,s)-2,x:xn(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,b){if(f!==u)b.push({i:m.push(o(m)+"skewX(",null,s)-2,x:xn(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,b,k,S){if(f!==m||u!==b){var T=k.push(o(k)+"scale(",null,",",null,")");S.push({i:T-4,x:xn(f,m)},{i:T-2,x:xn(u,b)})}else if(m!==1||b!==1)k.push(o(k)+"scale("+m+","+b+")")}return function(f,u){var m=[],b=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,b),c(f.rotate,u.rotate,m,b),n(f.skewX,u.skewX,m,b),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,b),f=u=null,function(k){var S=-1,T=b.length,B;while(++S<T)m[(B=b[S]).i]=B.x(k);return m.join("")}}}var Tn=Cu(yu,"px, ","px)","deg)"),vn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return Br||(wu(dC),Br=Ui.now()+ls)}function dC(){Br=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=hs.prototype={constructor:Xi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Ln()},stop:function(){if(this._call)this._call=null,this._time=1/0,Ln()}};function hs(r,e,i){var s=new Xi;return s.restart(r,e,i),s}function Su(){Gi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Ui.now())+ls,Zr=Yi=0;try{Su()}finally{Zr=0,pC(),Br=0}}function fC(){var r=Ui.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function pC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;ji=r,Ln(s)}function Ln(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Ui.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Ui.now(),Hi=setInterval(fC,ku);Zr=1,wu(bu)}}function Vi(r,e,i){var s=new Xi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var gC=Ta("start","end","cancel","interrupt"),mC=[],vu=0,Bu=1,us=2,cs=3,_u=4,ds=5,Ki=6;function hr(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;yC(r,i,{name:e,index:s,group:o,on:gC,tween:mC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:vu})}function Zi(r,e){var i=me(r,e);if(i.state>vu)throw Error("too late; already scheduled");return i}function xe(r,e){var i=me(r,e);if(i.state>cs)throw Error("too late; already running");return i}function me(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function yC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Bu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,b,k;if(i.state!==Bu)return d();for(u in s){if(k=s[u],k.name!==i.name)continue;if(k.state===cs)return Vi(c);if(k.state===_u)k.state=Ki,k.timer.stop(),k.on.call("interrupt",r,r.__data__,k.index,k.group),delete s[u];else if(+u<e)k.state=Ki,k.timer.stop(),k.on.call("cancel",r,r.__data__,k.index,k.group),delete s[u]}if(Vi(function(){if(i.state===cs)i.state=_u,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(b=i.tween.length);for(u=0,m=-1;u<b;++u)if(k=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=k;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,b=o.length;while(++m<b)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Ki,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Ki,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function Fn(r){return this.each(function(){Ji(this,r)})}function xC(r,e){var i,s;return function(){var o=xe(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function CC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=xe(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function Mn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=me(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?xC:CC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=xe(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return me(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?xn:e instanceof Oa?Rs:(i=Oa(e))?(e=i,Rs):jl)(r,e)}function bC(r){return function(){this.removeAttribute(r)}}function kC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function wC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function SC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function TC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function BC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function An(r,e){var i=Ye(r),s=i==="transform"?vn:to;return this.attrTween(r,typeof e==="function"?(i.local?BC:TC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?kC:bC)(i):(i.local?SC:wC)(i,s,e))}function _C(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function vC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function LC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&vC(r,a);return i}return o._value=e,o}function FC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&_C(r,a);return i}return o._value=e,o}function En(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ye(r);return this.tween(i,(s.local?LC:FC)(s,e))}function MC(r,e){return function(){Zi(this,r).delay=+e.apply(this,arguments)}}function AC(r,e){return e=+e,function(){Zi(this,r).delay=e}}function $n(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?MC:AC)(e,r)):me(this.node(),e).delay}function EC(r,e){return function(){xe(this,r).duration=+e.apply(this,arguments)}}function $C(r,e){return e=+e,function(){xe(this,r).duration=e}}function On(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?EC:$C)(e,r)):me(this.node(),e).duration}function IC(r,e){if(typeof e!=="function")throw Error();return function(){xe(this,r).ease=e}}function Dn(r){var e=this._id;return arguments.length?this.each(IC(e,r)):me(this.node(),e).ease}function OC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();xe(this,r).ease=i}}function Pn(r){if(typeof r!=="function")throw Error();return this.each(OC(this._id,r))}function Rn(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new _e(s,this._parents,this._name,this._id)}function Nn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),b,k=0;k<u;++k)if(b=d[k]||f[k])m[k]=b;for(;n<s;++n)c[n]=e[n];return new _e(c,this._parents,this._name,this._id)}function DC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function PC(r,e,i){var s,o,a=DC(e)?Zi:xe;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function zn(r,e){var i=this._id;return arguments.length<2?me(this.node(),i).on.on(r):this.each(PC(i,r,e))}function RC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Yn(){return this.on("end.remove",RC(this._id))}function Un(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,b=0;b<d;++b)if((u=n[b])&&(m=r.call(u,u.__data__,b,n))){if("__data__"in u)m.__data__=u.__data__;f[b]=m,hr(f[b],e,i,b,f,me(u,i))}return new _e(a,this._parents,e,i)}function Xn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=jr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var b=r.call(u,u.__data__,m,d),k,S=me(u,i),T=0,B=b.length;T<B;++T)if(k=b[T])hr(k,e,i,T,b,S);a.push(b),c.push(u)}return new _e(a,c,e,i)}var qC=nr.prototype.constructor;function Gn(){return new qC(this._groups,this._parents)}function WC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function Au(r){return function(){this.style.removeProperty(r)}}function NC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function zC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function HC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=xe(this,r),f=d.on,u=d.value[a]==null?n||(n=Au(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Vn(r,e,i){var s=(r+="")==="transform"?Tn:to;return e==null?this.styleTween(r,WC(r,s)).on("end.style."+r,Au(r)):typeof e==="function"?this.styleTween(r,zC(r,s,Qr(this,"style."+r,e))).each(HC(this._id,r)):this.styleTween(r,NC(r,s,e),i).on("end.style."+r,null)}function YC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function jC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&YC(r,c,i);return s}return a._value=e,a}function Kn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,jC(r,e,i==null?"":i))}function UC(r){return function(){this.textContent=r}}function XC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Zn(r){return this.tween("text",typeof r==="function"?XC(Qr(this,"text",r)):UC(r==null?"":r+""))}function GC(r){return function(e){this.textContent=r.call(this,e)}}function VC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&GC(o);return e}return s._value=r,s}function Qn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,VC(r))}function Jn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=me(d,e);hr(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new _e(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=xe(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var KC=0;function _e(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Eu(r){return nr().transition(r)}function fs(){return++KC}var cr=nr.prototype;_e.prototype=Eu.prototype={constructor:_e,select:Un,selectAll:Xn,selectChild:cr.selectChild,selectChildren:cr.selectChildren,filter:Rn,merge:Nn,selection:Gn,transition:Jn,call:cr.call,nodes:cr.nodes,node:cr.node,size:cr.size,empty:cr.empty,each:cr.each,on:zn,attr:An,attrTween:En,style:Vn,styleTween:Kn,text:Zn,textTween:Qn,remove:Yn,tween:Mn,delay:$n,duration:On,ease:Dn,easeVarying:Pn,end:tl,[Symbol.iterator]:cr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var ZC={time:null,delay:0,duration:250,ease:ps};function QC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof _e)e=r._id,r=r._name;else e=fs(),(i=ZC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])hr(d,r,e,f,c,i||QC(d,e));return new _e(s,this._parents,r,e)}nr.prototype.interrupt=Fn;nr.prototype.transition=el;var{abs:cF,max:uF,min:dF}=Math;function $u(r){return[+r[0],+r[1]]}function JC(r){return[$u(r[0]),$u(r[1])]}var fF={name:"x",handles:["w","e"].map(rl),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},pF={name:"y",handles:["n","s"].map(rl),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},gF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:JC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var tb=ol-0.000001;function Iu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function eb(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Iu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Iu:eb(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let b=i-a,k=s-c,S=n*n+d*d,T=b*b+k*k,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),M=v/_,I=v/B;if(Math.abs(M-1)>0.000001)this._append`L${r+M*f},${e+M*u}`;this._append`A${o},${o},0,0,${+(u*b>f*k)},${this._x1=r+I*n},${this._y1=e+I*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>tb)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function qu(){return new Jr}qu.prototype=Jr.prototype;function po(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var sl=Symbol("implicit");function jn(){var r=new $i,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new $i;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return jn(e,i).unknown(s)},po.apply(o,arguments),o}function vt(r){return function(){return r}}var{abs:al,atan2:Ce,cos:yr,max:Wu,min:gs,sin:De,sqrt:_r}=Math,ye=0.000000000001,ti=Math.PI,eo=ti/2,ql=2*ti;function zu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Jr(e)}function rb(r){return r.innerRadius}function ib(r){return r.outerRadius}function ob(r){return r.startAngle}function sb(r){return r.endAngle}function ab(r){return r&&r.padAngle}function nb(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,b=m*d-u*f;if(b*b<ye)return;return b=(u*(e-a)-m*(r-o))/b,[r+b*d,e+b*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,b=r+u,k=e+m,S=i+u,T=s+m,B=(b+S)/2,_=(k+T)/2,v=S-b,M=T-k,I=v*v+M*M,O=o-a,X=b*T-S*k,G=(M<0?-1:1)*_r(Wu(0,O*O*I-X*X)),tt=(X*M-v*G)/I,it=(-X*v-M*G)/I,ht=(X*M+v*G)/I,lt=(-X*v+M*G)/I,st=tt-B,D=it-_,Y=ht-B,et=lt-_;if(st*st+D*D>Y*Y+et*et)tt=ht,it=lt;return{cx:tt,cy:it,x01:-u,y01:-m,x11:tt*(o/O-1),y11:it*(o/O-1)}}function zr(){var r=rb,e=ib,i=vt(0),s=null,o=ob,a=sb,c=ab,n=null,d=ms(f);function f(){var u,m,b=+r.apply(this,arguments),k=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(k<b)m=k,k=b,b=m;if(!(k>ye))n.moveTo(0,0);else if(B>ql-ye){if(n.moveTo(k*yr(S),k*De(S)),n.arc(0,0,k,S,T,!_),b>ye)n.moveTo(b*yr(T),b*De(T)),n.arc(0,0,b,T,S,_)}else{var v=S,M=T,I=S,O=T,X=B,G=B,tt=c.apply(this,arguments)/2,it=tt>ye&&(s?+s.apply(this,arguments):_r(b*b+k*k)),ht=gs(al(k-b)/2,+i.apply(this,arguments)),lt=ht,st=ht,D,Y;if(it>ye){var et=nl(it/b*De(tt)),W=nl(it/k*De(tt));if((X-=et*2)>ye)et*=_?1:-1,I+=et,O-=et;else X=0,I=O=(S+T)/2;if((G-=W*2)>ye)W*=_?1:-1,v+=W,M-=W;else G=0,v=M=(S+T)/2}var nt=k*yr(v),at=k*De(v),wt=b*yr(O),Tt=b*De(O);if(ht>ye){var Ut=k*yr(M),Xt=k*De(M),Kt=b*yr(I),Zt=b*De(I),Et;if(B<ti)if(Et=nb(nt,at,Kt,Zt,Ut,Xt,wt,Tt)){var _t=nt-Et[0],Pt=at-Et[1],Gt=Ut-Et[0],zt=Xt-Et[1],ae=1/De(zu((_t*Gt+Pt*zt)/(_r(_t*_t+Pt*Pt)*_r(Gt*Gt+zt*zt)))/2),oe=_r(Et[0]*Et[0]+Et[1]*Et[1]);lt=gs(ht,(b-oe)/(ae-1)),st=gs(ht,(k-oe)/(ae+1))}else lt=st=0}if(!(G>ye))n.moveTo(nt,at);else if(st>ye)if(D=ys(Kt,Zt,nt,at,k,st,_),Y=ys(Ut,Xt,wt,Tt,k,st,_),n.moveTo(D.cx+D.x01,D.cy+D.y01),st<ht)n.arc(D.cx,D.cy,st,Ce(D.y01,D.x01),Ce(Y.y01,Y.x01),!_);else n.arc(D.cx,D.cy,st,Ce(D.y01,D.x01),Ce(D.y11,D.x11),!_),n.arc(0,0,k,Ce(D.cy+D.y11,D.cx+D.x11),Ce(Y.cy+Y.y11,Y.cx+Y.x11),!_),n.arc(Y.cx,Y.cy,st,Ce(Y.y11,Y.x11),Ce(Y.y01,Y.x01),!_);else n.moveTo(nt,at),n.arc(0,0,k,v,M,!_);if(!(b>ye)||!(X>ye))n.lineTo(wt,Tt);else if(lt>ye)if(D=ys(wt,Tt,Ut,Xt,b,-lt,_),Y=ys(nt,at,Kt,Zt,b,-lt,_),n.lineTo(D.cx+D.x01,D.cy+D.y01),lt<ht)n.arc(D.cx,D.cy,lt,Ce(D.y01,D.x01),Ce(Y.y01,Y.x01),!_);else n.arc(D.cx,D.cy,lt,Ce(D.y01,D.x01),Ce(D.y11,D.x11),!_),n.arc(0,0,b,Ce(D.cy+D.y11,D.cx+D.x11),Ce(Y.cy+Y.y11,Y.cx+Y.x11),_),n.arc(Y.cx,Y.cy,lt,Ce(Y.y11,Y.x11),Ce(Y.y01,Y.x01),!_);else n.arc(0,0,b,O,I,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,De(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:vt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:vt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:vt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:vt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:vt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:vt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:vt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var GF=Array.prototype.slice;function Qu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Hu(r){this._context=r}Hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function pa(r){return new Hu(r)}function Yu(r){return r[0]}function ju(r){return r[1]}function Fs(r,e){var i=vt(!0),s=null,o=pa,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Yu:vt(r),e=typeof e==="function"?e:e===void 0?ju:vt(e);function n(d){var f,u=(d=Qu(d)).length,m,b=!1,k;if(s==null)a=o(k=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===b)if(b=!b)a.lineStart();else a.lineEnd();if(b)a.point(+r(m,f,d),+e(m,f,d))}if(k)return a=null,k+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:vt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:vt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:vt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Me(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function oo(r){this._context=r}oo.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:ei(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function Uu(r){this._context=r}Uu.prototype={areaStart:Me,areaEnd:Me,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new Uu(r)}function Xu(r){this._context=r}Xu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new oo(r),this._beta=e}Gu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Me,areaEnd:Me,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>ye){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>ye){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var no=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:Me,areaEnd:Me,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fl=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Me,areaEnd:Me,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function ho(r){return new Ts(r)}function go(r){return new id(r)}function ad(r){this._context=r}ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function oi(r){return new Bs(r,0.5)}function yo(r){return new Bs(r,0)}function xo(r){return new Bs(r,1)}function xr(r,e,i){this.k=r,this.x=e,this.y=i}xr.prototype={constructor:xr,scale:function(r){return r===1?this:new xr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new xr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var ue=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var ke={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
|
|
126
|
+
`)},"setAccDescription"),U=t(()=>wa,"getAccDescription"),q=t((r)=>{ka=Sa(r)},"setDiagramTitle"),j=t(()=>ka,"getDiagramTitle"),qc=l,Ux=Tu,p=C,da=Pf,Ni=Ko,Uo=t((r)=>ee(r,p()),"sanitizeText"),zl=$r,Xx=t(()=>ap,"getCommonDb"),jo={},Nu=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);jx(r,e.styles),e.injectUtils?.(qc,Ux,p,Uo,zl,Xx(),()=>{})},"registerDiagram"),op=t((r)=>{if(r in jo)return jo[r];throw new Gx(r)},"getDiagram"),Gx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class $i extends Map{constructor(r,e=Zx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Vx(this,r),e)}delete(r){return super.delete(Kx(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Vx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Kx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Zx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Qx={value:()=>{}};function Kc(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Xo(i)}function Xo(r){this._=r}function Jx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Xo.prototype=Kc.prototype={constructor:Xo,on:function(r,e){var i=this._,s=Jx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=t0(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Xo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function t0(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Qx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Ta=Kc;var Go="http://www.w3.org/1999/xhtml",Ba={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ye(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ba.hasOwnProperty(e)?{space:Ba[e],local:r}:r}function e0(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Go&&e.documentElement.namespaceURI===Go?e.createElement(r):e.createElementNS(i,r)}}function r0(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Ye(r);return(e.local?r0:e0)(e)}function i0(){}function gr(r){return r==null?i0:function(){return this.querySelector(r)}}function _a(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new ce(s,this._parents)}function va(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function o0(){return[]}function jr(r){return r==null?o0:function(){return this.querySelectorAll(r)}}function s0(r){return function(){return va(r.apply(this,arguments))}}function La(r){if(typeof r==="function")r=s0(r);else r=jr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new ce(s,o)}function Xr(r){return function(){return this.matches(r)}}function Zo(r){return function(e){return e.matches(r)}}var a0=Array.prototype.find;function n0(r){return function(){return a0.call(this.children,r)}}function l0(){return this.firstElementChild}function Fa(r){return this.select(r==null?l0:n0(typeof r==="function"?r:Zo(r)))}var h0=Array.prototype.filter;function c0(){return Array.from(this.children)}function u0(r){return function(){return h0.call(this.children,r)}}function Ma(r){return this.selectAll(r==null?c0:u0(typeof r==="function"?r:Zo(r)))}function Aa(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new ce(s,this._parents)}function Oi(r){return Array(r.length)}function Ea(){return new ce(this._enter||this._groups.map(Oi),this._parents)}function Pi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Pi.prototype={constructor:Pi,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Ia(r){return function(){return r}}function d0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new Pi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function f0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,b=Array(u),k;for(n=0;n<u;++n)if(d=e[n])if(b[n]=k=c.call(d,d.__data__,n,e)+"",f.has(k))o[n]=d;else f.set(k,d);for(n=0;n<m;++n)if(k=c.call(r,a[n],n,a)+"",d=f.get(k))s[n]=d,d.__data__=a[n],f.delete(k);else i[n]=new Pi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(b[n])===d)o[n]=d}function p0(r){return r.__data__}function Da(r,e){if(!arguments.length)return Array.from(this,p0);var i=e?f0:d0,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],b=m.length,k=g0(r.call(u,u&&u.__data__,f,s)),S=k.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(b);i(u,m,T,B,_,k,e);for(var v=0,M=0,I,O;v<S;++v)if(I=T[v]){if(v>=M)M=v+1;while(!(O=B[M])&&++M<S);I._next=O||null}}return c=new ce(c,s),c._enter=n,c._exit=d,c}function g0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Pa(){return new ce(this._exit||this._groups.map(Oi),this._parents)}function Ra(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function qa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,b=n[d]=Array(m),k,S=0;S<m;++S)if(k=f[S]||u[S])b[S]=k;for(;d<o;++d)n[d]=i[d];return new ce(n,this._parents)}function Wa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Na(r){if(!r)r=m0;function e(m,b){return m&&b?r(m.__data__,b.__data__):!m-!b}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new ce(o,this._parents).order()}function m0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function za(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function y0(r){return function(){this.removeAttribute(r)}}function x0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function C0(r,e){return function(){this.setAttribute(r,e)}}function b0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function k0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function w0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Ga(r,e){var i=Ye(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?x0:y0:typeof e==="function"?i.local?w0:k0:i.local?b0:C0)(i,e))}function qi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function S0(r){return function(){this.style.removeProperty(r)}}function T0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function B0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Va(r,e,i){return arguments.length>1?this.each((e==null?S0:typeof e==="function"?B0:T0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||qi(r).getComputedStyle(r,null).getPropertyValue(e)}function _0(r){return function(){delete this[r]}}function v0(r,e){return function(){this[r]=e}}function L0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?_0:typeof e==="function"?L0:v0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function F0(r){return function(){Jc(this,r)}}function M0(r){return function(){tu(this,r)}}function A0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?A0:e?F0:M0)(i,e))}function E0(){this.textContent=""}function $0(r){return function(){this.textContent=r}}function I0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?E0:(typeof r==="function"?I0:$0)(r)):this.node().textContent}function O0(){this.innerHTML=""}function D0(r){return function(){this.innerHTML=r}}function P0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?O0:(typeof r==="function"?P0:D0)(r)):this.node().innerHTML}function R0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(R0)}function q0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each(q0)}function sn(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function W0(){return null}function an(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?W0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function N0(){var r=this.parentNode;if(r)r.removeChild(this)}function nn(){return this.each(N0)}function z0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function H0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function ln(r){return this.select(r?H0:z0)}function hn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function Y0(r){return function(e){r.call(this,e,this.__data__)}}function j0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function U0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function X0(r,e,i){return function(){var s=this.__on,o,a=Y0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function cn(r,e,i){var s=j0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?X0:U0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=qi(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function G0(r,e){return function(){return eu(this,r,e)}}function V0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?V0:G0)(r,e))}function*dn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var fn=[null];function ce(r,e){this._groups=r,this._parents=e}function ru(){return new ce([[document.documentElement]],fn)}function K0(){return this}ce.prototype=ru.prototype={constructor:ce,select:_a,selectAll:La,selectChild:Fa,selectChildren:Ma,filter:Aa,data:Da,enter:Ea,exit:Pa,join:Ra,merge:qa,selection:K0,order:Wa,sort:Na,call:za,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:sn,insert:an,remove:nn,clone:ln,datum:hn,on:cn,dispatch:un,[Symbol.iterator]:dn};var nr=ru;function h(r){return typeof r==="string"?new ce([[document.querySelector(r)]],[document.documentElement]):new ce([[r]],fn)}function Qi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Ul(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Ri(){}var Wi=0.7,es=1/Wi,Vr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z0=/^#([0-9a-f]{3,8})$/,Q0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),J0=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),tC=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${zi}\\)$`),eC=new RegExp(`^rgba\\(${je},${je},${je},${zi}\\)$`),rC=new RegExp(`^hsl\\(${zi},${je},${je}\\)$`),iC=new RegExp(`^hsla\\(${zi},${je},${je},${zi}\\)$`),iu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Qi(Ri,Oa,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:oC,formatHsl:sC,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function oC(){return this.rgb().formatHex8()}function sC(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function Oa(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Z0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new _n(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Q0.exec(r))?new _n(e[1],e[2],e[3],1):(e=J0.exec(r))?new _n(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tC.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=eC.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rC.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=iC.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new _n(NaN,NaN,NaN,0):null}function au(r){return new _n(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new _n(r,e,i,s)}function $f(r){if(!(r instanceof Ri))r=Oa(r);if(!r)return new _n;return r=r.rgb(),new _n(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?$f(r):new _n(r,e,i,s==null?1:s)}function _n(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Qi(_n,Kr,Ul(Ri,{brighter(r){return r=r==null?es:Math.pow(es,r),new _n(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new _n(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new _n(Tr(this.r),Tr(this.g),Tr(this.b),rs(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:nu,formatHex:nu,formatHex8:aC,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function aC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Sr(r){return r=Tr(r),(r<16?"0":"")+r.toString(16)}function hu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Oe(r,e,i,s)}function uu(r){if(r instanceof Oe)return new Oe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Ri))r=Oa(r);if(!r)return new Oe;if(r instanceof Oe)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Oe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Oe(r,e,i,s==null?1:s)}function Oe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Qi(Oe,du,Ul(Ri,{brighter(r){return r=r==null?es:Math.pow(es,r),new Oe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new Oe(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new _n(pn(r>=240?r-240:r+120,o,s),pn(r,o,s),pn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Oe(cu(this.h),ts(this.s),ts(this.l),rs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function pn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function gn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return gn((i-s/e)*e,c,o,a,n)}}function xn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],c=r[(s+1)%e],n=r[(s+2)%e];return gn((i-s/e)*e,o,a,c,n)}}var Gl=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function nC(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function Gg(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):Gl(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Vo:function(e,i){return i-e?nC(e,i,r):Gl(isNaN(e)?i:e)}}function Vo(r,e){var i=e-r;return i?fu(r,i):Gl(isNaN(r)?e:r)}var Rs=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Vo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var lC=gu(yn),hC=gu(xn);function wn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bn=new RegExp(kn.source,"g");function cC(r){return function(){return r}}function uC(r){return function(e){return r(e)+""}}function jl(r,e){var i=kn.lastIndex=bn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=kn.exec(r))&&(o=bn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:wn(s,o)});i=bn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?uC(d[0].x):cC(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,b,k,S){if(f!==m||u!==b){var T=k.push("translate(",null,e,null,i);S.push({i:T-4,x:wn(f,m)},{i:T-2,x:wn(u,b)})}else if(m||b)k.push("translate("+m+e+b+i)}function c(f,u,m,b){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;b.push({i:m.push(o(m)+"rotate(",null,s)-2,x:wn(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,b){if(f!==u)b.push({i:m.push(o(m)+"skewX(",null,s)-2,x:wn(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,b,k,S){if(f!==m||u!==b){var T=k.push(o(k)+"scale(",null,",",null,")");S.push({i:T-4,x:wn(f,m)},{i:T-2,x:wn(u,b)})}else if(m!==1||b!==1)k.push(o(k)+"scale("+m+","+b+")")}return function(f,u){var m=[],b=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,b),c(f.rotate,u.rotate,m,b),n(f.skewX,u.skewX,m,b),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,b),f=u=null,function(k){var S=-1,T=b.length,B;while(++S<T)m[(B=b[S]).i]=B.x(k);return m.join("")}}}var Bn=Cu(yu,"px, ","px)","deg)"),vn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return Br||(wu(dC),Br=Ui.now()+ls)}function dC(){Br=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=hs.prototype={constructor:Xi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Ln()},stop:function(){if(this._call)this._call=null,this._time=1/0,Ln()}};function hs(r,e,i){var s=new Xi;return s.restart(r,e,i),s}function Su(){Gi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Ui.now())+ls,Zr=Yi=0;try{Su()}finally{Zr=0,pC(),Br=0}}function fC(){var r=Ui.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function pC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;ji=r,Ln(s)}function Ln(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Ui.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Ui.now(),Hi=setInterval(fC,ku);Zr=1,wu(bu)}}function Vi(r,e,i){var s=new Xi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var gC=Ta("start","end","cancel","interrupt"),mC=[],vu=0,Bu=1,us=2,cs=3,_u=4,ds=5,Ki=6;function hr(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;yC(r,i,{name:e,index:s,group:o,on:gC,tween:mC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:vu})}function Zi(r,e){var i=me(r,e);if(i.state>vu)throw Error("too late; already scheduled");return i}function xe(r,e){var i=me(r,e);if(i.state>cs)throw Error("too late; already running");return i}function me(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function yC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Bu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,b,k;if(i.state!==Bu)return d();for(u in s){if(k=s[u],k.name!==i.name)continue;if(k.state===cs)return Vi(c);if(k.state===_u)k.state=Ki,k.timer.stop(),k.on.call("interrupt",r,r.__data__,k.index,k.group),delete s[u];else if(+u<e)k.state=Ki,k.timer.stop(),k.on.call("cancel",r,r.__data__,k.index,k.group),delete s[u]}if(Vi(function(){if(i.state===cs)i.state=_u,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(b=i.tween.length);for(u=0,m=-1;u<b;++u)if(k=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=k;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,b=o.length;while(++m<b)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Ki,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Ki,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function Fn(r){return this.each(function(){Ji(this,r)})}function xC(r,e){var i,s;return function(){var o=xe(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function CC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=xe(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function Mn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=me(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?xC:CC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=xe(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return me(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?wn:e instanceof Oa?Rs:(i=Oa(e))?(e=i,Rs):jl)(r,e)}function bC(r){return function(){this.removeAttribute(r)}}function kC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function wC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function SC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function TC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function BC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function An(r,e){var i=Ye(r),s=i==="transform"?vn:to;return this.attrTween(r,typeof e==="function"?(i.local?BC:TC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?kC:bC)(i):(i.local?SC:wC)(i,s,e))}function _C(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function vC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function LC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&vC(r,a);return i}return o._value=e,o}function FC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&_C(r,a);return i}return o._value=e,o}function En(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ye(r);return this.tween(i,(s.local?LC:FC)(s,e))}function MC(r,e){return function(){Zi(this,r).delay=+e.apply(this,arguments)}}function AC(r,e){return e=+e,function(){Zi(this,r).delay=e}}function $n(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?MC:AC)(e,r)):me(this.node(),e).delay}function EC(r,e){return function(){xe(this,r).duration=+e.apply(this,arguments)}}function $C(r,e){return e=+e,function(){xe(this,r).duration=e}}function On(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?EC:$C)(e,r)):me(this.node(),e).duration}function IC(r,e){if(typeof e!=="function")throw Error();return function(){xe(this,r).ease=e}}function Dn(r){var e=this._id;return arguments.length?this.each(IC(e,r)):me(this.node(),e).ease}function OC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();xe(this,r).ease=i}}function Pn(r){if(typeof r!=="function")throw Error();return this.each(OC(this._id,r))}function Rn(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new _e(s,this._parents,this._name,this._id)}function Nn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),b,k=0;k<u;++k)if(b=d[k]||f[k])m[k]=b;for(;n<s;++n)c[n]=e[n];return new _e(c,this._parents,this._name,this._id)}function DC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function PC(r,e,i){var s,o,a=DC(e)?Zi:xe;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function zn(r,e){var i=this._id;return arguments.length<2?me(this.node(),i).on.on(r):this.each(PC(i,r,e))}function RC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Yn(){return this.on("end.remove",RC(this._id))}function Un(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,b=0;b<d;++b)if((u=n[b])&&(m=r.call(u,u.__data__,b,n))){if("__data__"in u)m.__data__=u.__data__;f[b]=m,hr(f[b],e,i,b,f,me(u,i))}return new _e(a,this._parents,e,i)}function Xn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=jr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var b=r.call(u,u.__data__,m,d),k,S=me(u,i),T=0,B=b.length;T<B;++T)if(k=b[T])hr(k,e,i,T,b,S);a.push(b),c.push(u)}return new _e(a,c,e,i)}var qC=nr.prototype.constructor;function Gn(){return new qC(this._groups,this._parents)}function WC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function Au(r){return function(){this.style.removeProperty(r)}}function NC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function zC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function HC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=xe(this,r),f=d.on,u=d.value[a]==null?n||(n=Au(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Vn(r,e,i){var s=(r+="")==="transform"?Bn:to;return e==null?this.styleTween(r,WC(r,s)).on("end.style."+r,Au(r)):typeof e==="function"?this.styleTween(r,zC(r,s,Qr(this,"style."+r,e))).each(HC(this._id,r)):this.styleTween(r,NC(r,s,e),i).on("end.style."+r,null)}function YC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function jC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&YC(r,c,i);return s}return a._value=e,a}function Kn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,jC(r,e,i==null?"":i))}function UC(r){return function(){this.textContent=r}}function XC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Zn(r){return this.tween("text",typeof r==="function"?XC(Qr(this,"text",r)):UC(r==null?"":r+""))}function GC(r){return function(e){this.textContent=r.call(this,e)}}function VC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&GC(o);return e}return s._value=r,s}function Qn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,VC(r))}function Jn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=me(d,e);hr(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new _e(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=xe(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var KC=0;function _e(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Eu(r){return nr().transition(r)}function fs(){return++KC}var cr=nr.prototype;_e.prototype=Eu.prototype={constructor:_e,select:Un,selectAll:Xn,selectChild:cr.selectChild,selectChildren:cr.selectChildren,filter:Rn,merge:Nn,selection:Gn,transition:Jn,call:cr.call,nodes:cr.nodes,node:cr.node,size:cr.size,empty:cr.empty,each:cr.each,on:zn,attr:An,attrTween:En,style:Vn,styleTween:Kn,text:Zn,textTween:Qn,remove:Yn,tween:Mn,delay:$n,duration:On,ease:Dn,easeVarying:Pn,end:tl,[Symbol.iterator]:cr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var ZC={time:null,delay:0,duration:250,ease:ps};function QC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof _e)e=r._id,r=r._name;else e=fs(),(i=ZC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])hr(d,r,e,f,c,i||QC(d,e));return new _e(s,this._parents,r,e)}nr.prototype.interrupt=Fn;nr.prototype.transition=el;var{abs:cF,max:uF,min:dF}=Math;function $u(r){return[+r[0],+r[1]]}function JC(r){return[$u(r[0]),$u(r[1])]}var fF={name:"x",handles:["w","e"].map(rl),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},pF={name:"y",handles:["n","s"].map(rl),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},gF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:JC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var tb=ol-0.000001;function Iu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function eb(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Iu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Iu:eb(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let b=i-a,k=s-c,S=n*n+d*d,T=b*b+k*k,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),M=v/_,I=v/B;if(Math.abs(M-1)>0.000001)this._append`L${r+M*f},${e+M*u}`;this._append`A${o},${o},0,0,${+(u*b>f*k)},${this._x1=r+I*n},${this._y1=e+I*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>tb)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function qu(){return new Jr}qu.prototype=Jr.prototype;function po(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var sl=Symbol("implicit");function jn(){var r=new $i,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new $i;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return jn(e,i).unknown(s)},po.apply(o,arguments),o}function vt(r){return function(){return r}}var{abs:al,atan2:Ce,cos:yr,max:Wu,min:gs,sin:De,sqrt:_r}=Math,ye=0.000000000001,ti=Math.PI,eo=ti/2,ql=2*ti;function zu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Jr(e)}function rb(r){return r.innerRadius}function ib(r){return r.outerRadius}function ob(r){return r.startAngle}function sb(r){return r.endAngle}function ab(r){return r&&r.padAngle}function nb(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,b=m*d-u*f;if(b*b<ye)return;return b=(u*(e-a)-m*(r-o))/b,[r+b*d,e+b*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,b=r+u,k=e+m,S=i+u,T=s+m,B=(b+S)/2,_=(k+T)/2,v=S-b,M=T-k,I=v*v+M*M,O=o-a,G=b*T-S*k,Z=(M<0?-1:1)*_r(Wu(0,O*O*I-G*G)),tt=(G*M-v*Z)/I,it=(-G*v-M*Z)/I,ht=(G*M+v*Z)/I,lt=(-G*v+M*Z)/I,st=tt-B,D=it-_,Y=ht-B,et=lt-_;if(st*st+D*D>Y*Y+et*et)tt=ht,it=lt;return{cx:tt,cy:it,x01:-u,y01:-m,x11:tt*(o/O-1),y11:it*(o/O-1)}}function zr(){var r=rb,e=ib,i=vt(0),s=null,o=ob,a=sb,c=ab,n=null,d=ms(f);function f(){var u,m,b=+r.apply(this,arguments),k=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(k<b)m=k,k=b,b=m;if(!(k>ye))n.moveTo(0,0);else if(B>ql-ye){if(n.moveTo(k*yr(S),k*De(S)),n.arc(0,0,k,S,T,!_),b>ye)n.moveTo(b*yr(T),b*De(T)),n.arc(0,0,b,T,S,_)}else{var v=S,M=T,I=S,O=T,G=B,Z=B,tt=c.apply(this,arguments)/2,it=tt>ye&&(s?+s.apply(this,arguments):_r(b*b+k*k)),ht=gs(al(k-b)/2,+i.apply(this,arguments)),lt=ht,st=ht,D,Y;if(it>ye){var et=nl(it/b*De(tt)),W=nl(it/k*De(tt));if((G-=et*2)>ye)et*=_?1:-1,I+=et,O-=et;else G=0,I=O=(S+T)/2;if((Z-=W*2)>ye)W*=_?1:-1,v+=W,M-=W;else Z=0,v=M=(S+T)/2}var nt=k*yr(v),at=k*De(v),wt=b*yr(O),Tt=b*De(O);if(ht>ye){var Ut=k*yr(M),Xt=k*De(M),Kt=b*yr(I),Zt=b*De(I),Et;if(B<ti)if(Et=nb(nt,at,Kt,Zt,Ut,Xt,wt,Tt)){var _t=nt-Et[0],Pt=at-Et[1],Gt=Ut-Et[0],zt=Xt-Et[1],ae=1/De(zu((_t*Gt+Pt*zt)/(_r(_t*_t+Pt*Pt)*_r(Gt*Gt+zt*zt)))/2),oe=_r(Et[0]*Et[0]+Et[1]*Et[1]);lt=gs(ht,(b-oe)/(ae-1)),st=gs(ht,(k-oe)/(ae+1))}else lt=st=0}if(!(Z>ye))n.moveTo(nt,at);else if(st>ye)if(D=ys(Kt,Zt,nt,at,k,st,_),Y=ys(Ut,Xt,wt,Tt,k,st,_),n.moveTo(D.cx+D.x01,D.cy+D.y01),st<ht)n.arc(D.cx,D.cy,st,Ce(D.y01,D.x01),Ce(Y.y01,Y.x01),!_);else n.arc(D.cx,D.cy,st,Ce(D.y01,D.x01),Ce(D.y11,D.x11),!_),n.arc(0,0,k,Ce(D.cy+D.y11,D.cx+D.x11),Ce(Y.cy+Y.y11,Y.cx+Y.x11),!_),n.arc(Y.cx,Y.cy,st,Ce(Y.y11,Y.x11),Ce(Y.y01,Y.x01),!_);else n.moveTo(nt,at),n.arc(0,0,k,v,M,!_);if(!(b>ye)||!(G>ye))n.lineTo(wt,Tt);else if(lt>ye)if(D=ys(wt,Tt,Ut,Xt,b,-lt,_),Y=ys(nt,at,Kt,Zt,b,-lt,_),n.lineTo(D.cx+D.x01,D.cy+D.y01),lt<ht)n.arc(D.cx,D.cy,lt,Ce(D.y01,D.x01),Ce(Y.y01,Y.x01),!_);else n.arc(D.cx,D.cy,lt,Ce(D.y01,D.x01),Ce(D.y11,D.x11),!_),n.arc(0,0,b,Ce(D.cy+D.y11,D.cx+D.x11),Ce(Y.cy+Y.y11,Y.cx+Y.x11),_),n.arc(Y.cx,Y.cy,lt,Ce(Y.y11,Y.x11),Ce(Y.y01,Y.x01),!_);else n.arc(0,0,b,O,I,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,De(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:vt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:vt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:vt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:vt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:vt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:vt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:vt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var GF=Array.prototype.slice;function Qu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Hu(r){this._context=r}Hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function pa(r){return new Hu(r)}function Yu(r){return r[0]}function ju(r){return r[1]}function Fs(r,e){var i=vt(!0),s=null,o=pa,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Yu:vt(r),e=typeof e==="function"?e:e===void 0?ju:vt(e);function n(d){var f,u=(d=Qu(d)).length,m,b=!1,k;if(s==null)a=o(k=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===b)if(b=!b)a.lineStart();else a.lineEnd();if(b)a.point(+r(m,f,d),+e(m,f,d))}if(k)return a=null,k+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:vt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:vt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:vt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Me(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function oo(r){this._context=r}oo.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:ei(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function Uu(r){this._context=r}Uu.prototype={areaStart:Me,areaEnd:Me,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new Uu(r)}function Xu(r){this._context=r}Xu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new oo(r),this._beta=e}Gu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Me,areaEnd:Me,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>ye){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>ye){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var no=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:Me,areaEnd:Me,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fl=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Me,areaEnd:Me,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function ho(r){return new Ts(r)}function go(r){return new id(r)}function ad(r){this._context=r}ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function oi(r){return new Bs(r,0.5)}function yo(r){return new Bs(r,0)}function xo(r){return new Bs(r,1)}function xr(r,e,i){this.k=r,this.x=e,this.y=i}xr.prototype={constructor:xr,scale:function(r){return r===1?this:new xr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new xr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var de=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var ke={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
|
|
127
127
|
|
|
128
128
|
`+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),yl=e,yl}t(ai,"requireException");var xl,hd;function $d(){if(hd)return xl;hd=1;let r=si();function e(o,a,c,n,d){let f="",u="",m=Math.floor(d/2)-1;if(n-a>m)f=" ... ",a=n-m+f.length;if(c-n>m)u=" ...",c=n+m-u.length;return{str:f+o.slice(a,c).replace(/\t/g,"→")+u,pos:n-a+f.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let c=/\r?\n|\r|\0/g,n=[0],d=[],f,u=-1;while(f=c.exec(o.buffer))if(d.push(f.index),n.push(f.index+f[0].length),o.position<=f.index&&u<0)u=n.length-2;if(u<0)u=n.length-1;let m="",b=Math.min(o.line+a.linesAfter,d.length).toString().length,k=a.maxLength-(a.indent+b+3);for(let T=1;T<=a.linesBefore;T++){if(u-T<0)break;let B=e(o.buffer,n[u-T],d[u-T],o.position-(n[u]-n[u-T]),k);m=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),b)+" | "+B.str+`
|
|
129
129
|
`+m}let S=e(o.buffer,n[u],d[u],o.position,k);m+=r.repeat(" ",a.indent)+i((o.line+1).toString(),b)+" | "+S.str+`
|
|
130
130
|
`,m+=r.repeat("-",a.indent+b+3+S.pos)+`^
|
|
131
131
|
`;for(let T=1;T<=a.linesAfter;T++){if(u+T>=d.length)break;let B=e(o.buffer,n[u+T],d[u+T],o.position-(n[u]-n[u+T]),k);m+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),b)+" | "+B.str+`
|
|
132
132
|
`}return m.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t($d,"requireSnippet");var Cl,cd;function we(){if(cd)return Cl;cd=1;let r=ai(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(we,"requireType");var bl,ud;function th(){if(ud)return bl;ud=1;let r=ai(),e=we();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,m){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=m}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(th,"requireSchema");var kl,dd;function eh(){if(dd)return kl;return dd=1,kl=new(we())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(eh,"requireStr");var wl,fd;function rh(){if(fd)return wl;return fd=1,wl=new(we())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(rh,"requireSeq");var Sl,pd;function ih(){if(pd)return Sl;return pd=1,Sl=new(we())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(ih,"requireMap");var Tl,gd;function oh(){if(gd)return Tl;return gd=1,Tl=new(th())({explicit:[eh(),rh(),ih()]}),Tl}t(oh,"requireFailsafe");var Bl,md;function sh(){if(md)return Bl;md=1;let r=we();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bl}t(sh,"require_null");var _l,yd;function ah(){if(yd)return _l;yd=1;let r=we();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),_l=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),_l}t(ah,"requireBool");var vl,xd;function nh(){if(xd)return vl;xd=1;let r=si(),e=we();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,m=0,b=!1;if(!u)return!1;let k=f[m];if(k==="-"||k==="+")k=f[++m];if(k==="0"){if(m+1===u)return!0;if(k=f[++m],k==="b"){m++;for(;m<u;m++){if(k=f[m],k!=="0"&&k!=="1")return!1;b=!0}return b&&isFinite(c(f))}if(k==="x"){m++;for(;m<u;m++){if(!i(f.charCodeAt(m)))return!1;b=!0}return b&&isFinite(c(f))}if(k==="o"){m++;for(;m<u;m++){if(!s(f.charCodeAt(m)))return!1;b=!0}return b&&isFinite(c(f))}}for(;m<u;m++){if(!o(f.charCodeAt(m)))return!1;b=!0}if(!b)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,m=1,b=u[0];if(b==="-"||b==="+"){if(b==="-")m=-1;u=u.slice(1),b=u[0]}if(u==="0")return 0;if(b==="0"){if(u[1]==="b")return m*parseInt(u.slice(2),2);if(u[1]==="x")return m*parseInt(u.slice(2),16);if(u[1]==="o")return m*parseInt(u.slice(2),8)}return m*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(nh,"requireInt");var Ll,Cd;function lh(){if(Cd)return Ll;Cd=1;let r=si(),e=we(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),m=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return m*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return c.test(m)?m.replace("e",".e"):m}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(lh,"requireFloat");var Fl,bd;function hh(){if(bd)return Fl;return bd=1,Fl=oh().extend({implicit:[sh(),ah(),nh(),lh()]}),Fl}t(hh,"requireJson");var Al,kd;function ch(){if(kd)return Al;return kd=1,Al=hh(),Al}t(ch,"requireCore");var El,wd;function uh(){if(wd)return El;wd=1;let r=we(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],m=+f[2]-1,b=+f[3];if(!f[4])return new Date(Date.UTC(u,m,b));let k=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,m,b,k,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),El=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),El}t(uh,"requireTimestamp");var Il,Sd;function dh(){if(Sd)return Il;Sd=1;let r=we();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Il=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Il}t(dh,"requireMerge");var Dl,Td;function fh(){if(Td)return Dl;Td=1;let r=we(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
133
|
-
\r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let k=0;k<d;k++){if(k%4===0&&k)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(k))}let b=d%4*6;if(b===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(b===18)m.push(u>>10&255),m.push(u>>2&255);else if(b===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let b=0;b<f;b++){if(b%3===0&&b)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[b]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),Dl=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),Dl}t(fh,"requireBinary");var Rl,Bd;function ph(){if(Bd)return Rl;Bd=1;let r=we(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let b;for(b in u)if(e.call(u,b))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(b)===-1)c.push(b);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Rl=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Rl}t(ph,"requireOmap");var Nl,_d;function gh(){if(_d)return Nl;_d=1;let r=we(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Nl=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Nl}t(gh,"requirePairs");var Xl,vd;function mh(){if(vd)return Xl;vd=1;let r=we(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Xl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Xl}t(mh,"requireSet");var Zl,Ld;function vs(){if(Ld)return Zl;return Ld=1,Zl=ch().extend({implicit:[uh(),dh()],explicit:[fh(),ph(),gh(),mh()]}),Zl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,b=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(w){return Object.prototype.toString.call(w)}t(_,"_class");function v(w){return w===10||w===13}t(v,"isEol");function M(w){return w===9||w===32}t(M,"isWhiteSpace");function I(w){return w===9||w===32||w===10||w===13}t(I,"isWsOrEol");function O(w){return w===44||w===91||w===93||w===123||w===125}t(O,"isFlowIndicator");function
|
|
133
|
+
\r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let k=0;k<d;k++){if(k%4===0&&k)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(k))}let b=d%4*6;if(b===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(b===18)m.push(u>>10&255),m.push(u>>2&255);else if(b===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let b=0;b<f;b++){if(b%3===0&&b)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[b]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),Dl=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),Dl}t(fh,"requireBinary");var Rl,Bd;function ph(){if(Bd)return Rl;Bd=1;let r=we(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let b;for(b in u)if(e.call(u,b))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(b)===-1)c.push(b);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Rl=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Rl}t(ph,"requireOmap");var Nl,_d;function gh(){if(_d)return Nl;_d=1;let r=we(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Nl=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Nl}t(gh,"requirePairs");var Xl,vd;function mh(){if(vd)return Xl;vd=1;let r=we(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Xl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Xl}t(mh,"requireSet");var Zl,Ld;function vs(){if(Ld)return Zl;return Ld=1,Zl=ch().extend({implicit:[uh(),dh()],explicit:[fh(),ph(),gh(),mh()]}),Zl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,b=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(w){return Object.prototype.toString.call(w)}t(_,"_class");function v(w){return w===10||w===13}t(v,"isEol");function M(w){return w===9||w===32}t(M,"isWhiteSpace");function I(w){return w===9||w===32||w===10||w===13}t(I,"isWsOrEol");function O(w){return w===44||w===91||w===93||w===123||w===125}t(O,"isFlowIndicator");function G(w){if(w>=48&&w<=57)return w-48;let rt=w|32;if(rt>=97&&rt<=102)return rt-97+10;return-1}t(G,"fromHexCode");function Z(w){if(w===120)return 2;if(w===117)return 4;if(w===85)return 8;return 0}t(Z,"escapedHexLen");function tt(w){if(w>=48&&w<=57)return w-48;return-1}t(tt,"fromDecimalCode");function it(w){switch(w){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
|
|
134
134
|
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(it,"simpleEscapeSequence");function ht(w){if(w<=65535)return String.fromCharCode(w);return String.fromCharCode((w-65536>>10)+55296,(w-65536&1023)+56320)}t(ht,"charFromCodepoint");function lt(w,rt,ut){if(rt==="__proto__")Object.defineProperty(w,rt,{configurable:!0,enumerable:!0,writable:!0,value:ut});else w[rt]=ut}t(lt,"setProperty");let st=Array(256),D=Array(256);for(let w=0;w<256;w++)st[w]=it(w)?1:0,D[w]=it(w);function Y(w,rt){this.input=w,this.filename=rt.filename||null,this.schema=rt.schema||s,this.onWarning=rt.onWarning||null,this.legacy=rt.legacy||!1,this.json=rt.json||!1,this.listener=rt.listener||null,this.maxDepth=typeof rt.maxDepth==="number"?rt.maxDepth:100,this.maxTotalMergeKeys=typeof rt.maxTotalMergeKeys==="number"?rt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=w.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(Y,"State");function et(w,rt){let ut={name:w.filename,buffer:w.input.slice(0,-1),position:w.position,line:w.line,column:w.position-w.lineStart};return ut.snippet=i(ut),new e(rt,ut)}t(et,"generateError");function W(w,rt){throw et(w,rt)}t(W,"throwError");function nt(w,rt){if(w.onWarning)w.onWarning.call(null,et(w,rt))}t(nt,"throwWarning");function at(w,rt,ut){let yt=w.anchorMapTransactions;if(yt.length!==0){let ct=yt[yt.length-1];if(!o.call(ct,rt))ct[rt]={existed:o.call(w.anchorMap,rt),value:w.anchorMap[rt]}}w.anchorMap[rt]=ut}t(at,"storeAnchor");function wt(w){w.anchorMapTransactions.push(Object.create(null))}t(wt,"beginAnchorTransaction");function Tt(w){let rt=w.anchorMapTransactions.pop(),ut=w.anchorMapTransactions;if(ut.length===0)return;let yt=ut[ut.length-1],ct=Object.keys(rt);for(let kt=0,E=ct.length;kt<E;kt+=1){let ot=ct[kt];if(!o.call(yt,ot))yt[ot]=rt[ot]}}t(Tt,"commitAnchorTransaction");function Ut(w){let rt=w.anchorMapTransactions.pop(),ut=Object.keys(rt);for(let yt=ut.length-1;yt>=0;yt-=1){let ct=rt[ut[yt]];if(ct.existed)w.anchorMap[ut[yt]]=ct.value;else delete w.anchorMap[ut[yt]]}}t(Ut,"rollbackAnchorTransaction");function Xt(w){return{position:w.position,line:w.line,lineStart:w.lineStart,lineIndent:w.lineIndent,firstTabInLine:w.firstTabInLine,tag:w.tag,anchor:w.anchor,kind:w.kind,result:w.result}}t(Xt,"snapshotState");function Kt(w,rt){w.position=rt.position,w.line=rt.line,w.lineStart=rt.lineStart,w.lineIndent=rt.lineIndent,w.firstTabInLine=rt.firstTabInLine,w.tag=rt.tag,w.anchor=rt.anchor,w.kind=rt.kind,w.result=rt.result}t(Kt,"restoreState");let Zt={YAML:t(function(rt,ut,yt){if(rt.version!==null)W(rt,"duplication of %YAML directive");if(yt.length!==1)W(rt,"YAML directive accepts exactly one argument");let ct=/^([0-9]+)\.([0-9]+)$/.exec(yt[0]);if(ct===null)W(rt,"ill-formed argument of the YAML directive");let kt=parseInt(ct[1],10),E=parseInt(ct[2],10);if(kt!==1)W(rt,"unacceptable YAML version of the document");if(rt.version=yt[0],rt.checkLineBreaks=E<2,E!==1&&E!==2)nt(rt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(rt,ut,yt){let ct;if(yt.length!==2)W(rt,"TAG directive accepts exactly two arguments");let kt=yt[0];if(ct=yt[1],!T.test(kt))W(rt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(rt.tagMap,kt))W(rt,'there is a previously declared suffix for "'+kt+'" tag handle');if(!B.test(ct))W(rt,"ill-formed tag prefix (second argument) of the TAG directive");try{ct=decodeURIComponent(ct)}catch(E){W(rt,"tag prefix is malformed: "+ct)}rt.tagMap[kt]=ct},"handleTagDirective")};function Et(w,rt,ut,yt){if(rt<ut){let ct=w.input.slice(rt,ut);if(yt)for(let kt=0,E=ct.length;kt<E;kt+=1){let ot=ct.charCodeAt(kt);if(!(ot===9||ot>=32&&ot<=1114111))W(w,"expected valid JSON character")}else if(b.test(ct))W(w,"the stream contains non-printable characters");w.result+=ct}}t(Et,"captureSegment");function _t(w,rt,ut,yt){if(!r.isObject(ut))W(w,"cannot merge mappings; the provided source object is unacceptable");let ct=Object.keys(ut);for(let kt=0,E=ct.length;kt<E;kt+=1){let ot=ct[kt];if(w.maxTotalMergeKeys!==-1&&++w.totalMergeKeys>w.maxTotalMergeKeys)W(w,"merge keys exceeded maxTotalMergeKeys ("+w.maxTotalMergeKeys+")");if(!o.call(rt,ot))lt(rt,ot,ut[ot]),yt[ot]=!0}}t(_t,"mergeMappings");function Pt(w,rt,ut,yt,ct,kt,E,ot,Ct){if(Array.isArray(ct)){ct=Array.prototype.slice.call(ct);for(let dt=0,pt=ct.length;dt<pt;dt+=1){if(Array.isArray(ct[dt]))W(w,"nested arrays are not supported inside keys");if(typeof ct==="object"&&_(ct[dt])==="[object Object]")ct[dt]="[object Object]"}}if(typeof ct==="object"&&_(ct)==="[object Object]")ct="[object Object]";if(ct=String(ct),rt===null)rt={};if(yt==="tag:yaml.org,2002:merge")if(Array.isArray(kt))for(let dt=0,pt=kt.length;dt<pt;dt+=1)_t(w,rt,kt[dt],ut);else _t(w,rt,kt,ut);else{if(!w.json&&!o.call(ut,ct)&&o.call(rt,ct))w.line=E||w.line,w.lineStart=ot||w.lineStart,w.position=Ct||w.position,W(w,"duplicated mapping key");lt(rt,ct,kt),delete ut[ct]}return rt}t(Pt,"storeMappingPair");function Gt(w){let rt=w.input.charCodeAt(w.position);if(rt===10)w.position++;else if(rt===13){if(w.position++,w.input.charCodeAt(w.position)===10)w.position++}else W(w,"a line break is expected");w.line+=1,w.lineStart=w.position,w.firstTabInLine=-1}t(Gt,"readLineBreak");function zt(w,rt,ut){let yt=0,ct=w.input.charCodeAt(w.position);while(ct!==0){while(M(ct)){if(ct===9&&w.firstTabInLine===-1)w.firstTabInLine=w.position;ct=w.input.charCodeAt(++w.position)}if(rt&&ct===35)do ct=w.input.charCodeAt(++w.position);while(ct!==10&&ct!==13&&ct!==0);if(v(ct)){Gt(w),ct=w.input.charCodeAt(w.position),yt++,w.lineIndent=0;while(ct===32)w.lineIndent++,ct=w.input.charCodeAt(++w.position)}else break}if(ut!==-1&&yt!==0&&w.lineIndent<ut)nt(w,"deficient indentation");return yt}t(zt,"skipSeparationSpace");function ae(w){let rt=w.position,ut=w.input.charCodeAt(rt);if((ut===45||ut===46)&&ut===w.input.charCodeAt(rt+1)&&ut===w.input.charCodeAt(rt+2)){if(rt+=3,ut=w.input.charCodeAt(rt),ut===0||I(ut))return!0}return!1}t(ae,"testDocumentSeparator");function oe(w,rt){if(rt===1)w.result+=" ";else if(rt>1)w.result+=r.repeat(`
|
|
135
|
-
`,rt-1)}t(oe,"writeFoldedLines");function er(w,rt,ut){let yt,ct,kt,E,ot,Ct,{kind:dt,result:pt}=w,bt=w.input.charCodeAt(w.position);if(I(bt)||O(bt)||bt===35||bt===38||bt===42||bt===33||bt===124||bt===62||bt===39||bt===34||bt===37||bt===64||bt===96)return!1;if(bt===63||bt===45){let xt=w.input.charCodeAt(w.position+1);if(I(xt)||ut&&O(xt))return!1}w.kind="scalar",w.result="",yt=ct=w.position,kt=!1;while(bt!==0){if(bt===58){let xt=w.input.charCodeAt(w.position+1);if(I(xt)||ut&&O(xt))break}else if(bt===35){let xt=w.input.charCodeAt(w.position-1);if(I(xt))break}else if(w.position===w.lineStart&&ae(w)||ut&&O(bt))break;else if(v(bt))if(E=w.line,ot=w.lineStart,Ct=w.lineIndent,zt(w,!1,-1),w.lineIndent>=rt){kt=!0,bt=w.input.charCodeAt(w.position);continue}else{w.position=ct,w.line=E,w.lineStart=ot,w.lineIndent=Ct;break}if(kt)Et(w,yt,ct,!1),oe(w,w.line-E),yt=ct=w.position,kt=!1;if(!M(bt))ct=w.position+1;bt=w.input.charCodeAt(++w.position)}if(Et(w,yt,ct,!1),w.result)return!0;return w.kind=dt,w.result=pt,!1}t(er,"readPlainScalar");function Dr(w,rt){let ut,yt,ct=w.input.charCodeAt(w.position);if(ct!==39)return!1;w.kind="scalar",w.result="",w.position++,ut=yt=w.position;while((ct=w.input.charCodeAt(w.position))!==0)if(ct===39)if(Et(w,ut,w.position,!0),ct=w.input.charCodeAt(++w.position),ct===39)ut=w.position,w.position++,yt=w.position;else return!0;else if(v(ct))Et(w,ut,yt,!0),oe(w,zt(w,!1,rt)),ut=yt=w.position;else if(w.position===w.lineStart&&ae(w))W(w,"unexpected end of the document within a single quoted scalar");else if(w.position++,!M(ct))yt=w.position;W(w,"unexpected end of the stream within a single quoted scalar")}t(Dr,"readSingleQuotedScalar");function We(w,rt){let ut,yt,ct,kt=w.input.charCodeAt(w.position);if(kt!==34)return!1;w.kind="scalar",w.result="",w.position++,ut=yt=w.position;while((kt=w.input.charCodeAt(w.position))!==0)if(kt===34)return Et(w,ut,w.position,!0),w.position++,!0;else if(kt===92){if(Et(w,ut,w.position,!0),kt=w.input.charCodeAt(++w.position),v(kt))zt(w,!1,rt);else if(kt<256&&st[kt])w.result+=D[kt],w.position++;else if((ct=
|
|
135
|
+
`,rt-1)}t(oe,"writeFoldedLines");function er(w,rt,ut){let yt,ct,kt,E,ot,Ct,{kind:dt,result:pt}=w,bt=w.input.charCodeAt(w.position);if(I(bt)||O(bt)||bt===35||bt===38||bt===42||bt===33||bt===124||bt===62||bt===39||bt===34||bt===37||bt===64||bt===96)return!1;if(bt===63||bt===45){let xt=w.input.charCodeAt(w.position+1);if(I(xt)||ut&&O(xt))return!1}w.kind="scalar",w.result="",yt=ct=w.position,kt=!1;while(bt!==0){if(bt===58){let xt=w.input.charCodeAt(w.position+1);if(I(xt)||ut&&O(xt))break}else if(bt===35){let xt=w.input.charCodeAt(w.position-1);if(I(xt))break}else if(w.position===w.lineStart&&ae(w)||ut&&O(bt))break;else if(v(bt))if(E=w.line,ot=w.lineStart,Ct=w.lineIndent,zt(w,!1,-1),w.lineIndent>=rt){kt=!0,bt=w.input.charCodeAt(w.position);continue}else{w.position=ct,w.line=E,w.lineStart=ot,w.lineIndent=Ct;break}if(kt)Et(w,yt,ct,!1),oe(w,w.line-E),yt=ct=w.position,kt=!1;if(!M(bt))ct=w.position+1;bt=w.input.charCodeAt(++w.position)}if(Et(w,yt,ct,!1),w.result)return!0;return w.kind=dt,w.result=pt,!1}t(er,"readPlainScalar");function Dr(w,rt){let ut,yt,ct=w.input.charCodeAt(w.position);if(ct!==39)return!1;w.kind="scalar",w.result="",w.position++,ut=yt=w.position;while((ct=w.input.charCodeAt(w.position))!==0)if(ct===39)if(Et(w,ut,w.position,!0),ct=w.input.charCodeAt(++w.position),ct===39)ut=w.position,w.position++,yt=w.position;else return!0;else if(v(ct))Et(w,ut,yt,!0),oe(w,zt(w,!1,rt)),ut=yt=w.position;else if(w.position===w.lineStart&&ae(w))W(w,"unexpected end of the document within a single quoted scalar");else if(w.position++,!M(ct))yt=w.position;W(w,"unexpected end of the stream within a single quoted scalar")}t(Dr,"readSingleQuotedScalar");function We(w,rt){let ut,yt,ct,kt=w.input.charCodeAt(w.position);if(kt!==34)return!1;w.kind="scalar",w.result="",w.position++,ut=yt=w.position;while((kt=w.input.charCodeAt(w.position))!==0)if(kt===34)return Et(w,ut,w.position,!0),w.position++,!0;else if(kt===92){if(Et(w,ut,w.position,!0),kt=w.input.charCodeAt(++w.position),v(kt))zt(w,!1,rt);else if(kt<256&&st[kt])w.result+=D[kt],w.position++;else if((ct=Z(kt))>0){let E=ct,ot=0;for(;E>0;E--)if(kt=w.input.charCodeAt(++w.position),(ct=G(kt))>=0)ot=(ot<<4)+ct;else W(w,"expected hexadecimal character");w.result+=ht(ot),w.position++}else W(w,"unknown escape sequence");ut=yt=w.position}else if(v(kt))Et(w,ut,yt,!0),oe(w,zt(w,!1,rt)),ut=yt=w.position;else if(w.position===w.lineStart&&ae(w))W(w,"unexpected end of the document within a double quoted scalar");else if(w.position++,!M(kt))yt=w.position;W(w,"unexpected end of the stream within a double quoted scalar")}t(We,"readDoubleQuotedScalar");function yi(w,rt){let ut=!0,yt,ct,kt,E=w.tag,ot,Ct=w.anchor,dt,pt,bt,xt,Mt=Object.create(null),Bt,Ot,Nt,Qt=w.input.charCodeAt(w.position);if(Qt===91)dt=93,xt=!1,ot=[];else if(Qt===123)dt=125,xt=!0,ot={};else return!1;if(w.anchor!==null)at(w,w.anchor,ot);Qt=w.input.charCodeAt(++w.position);while(Qt!==0){if(zt(w,!0,rt),Qt=w.input.charCodeAt(w.position),Qt===dt)return w.position++,w.tag=E,w.anchor=Ct,w.kind=xt?"mapping":"sequence",w.result=ot,!0;else if(!ut)W(w,"missed comma between flow collection entries");else if(Qt===44)W(w,"expected the node content, but found ','");if(Ot=Bt=Nt=null,pt=bt=!1,Qt===63){let ne=w.input.charCodeAt(w.position+1);if(I(ne))pt=bt=!0,w.position++,zt(w,!0,rt)}if(yt=w.line,ct=w.lineStart,kt=w.position,Ie(w,rt,a,!1,!0),Ot=w.tag,Bt=w.result,zt(w,!0,rt),Qt=w.input.charCodeAt(w.position),(bt||w.line===yt)&&Qt===58)pt=!0,Qt=w.input.charCodeAt(++w.position),zt(w,!0,rt),Ie(w,rt,a,!1,!0),Nt=w.result;if(xt)Pt(w,ot,Mt,Ot,Bt,Nt,yt,ct,kt);else if(pt)ot.push(Pt(w,null,Mt,Ot,Bt,Nt,yt,ct,kt));else ot.push(Bt);if(zt(w,!0,rt),Qt=w.input.charCodeAt(w.position),Qt===44)ut=!0,Qt=w.input.charCodeAt(++w.position);else ut=!1}W(w,"unexpected end of the stream within a flow collection")}t(yi,"readFlowCollection");function xi(w,rt){let ut,yt=f,ct=!1,kt=!1,E=rt,ot=0,Ct=!1,dt,pt=w.input.charCodeAt(w.position);if(pt===124)ut=!1;else if(pt===62)ut=!0;else return!1;w.kind="scalar",w.result="";while(pt!==0)if(pt=w.input.charCodeAt(++w.position),pt===43||pt===45)if(f===yt)yt=pt===43?m:u;else W(w,"repeat of a chomping mode identifier");else if((dt=tt(pt))>=0)if(dt===0)W(w,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!kt)E=rt+dt-1,kt=!0;else W(w,"repeat of an indentation width identifier");else break;if(M(pt)){do pt=w.input.charCodeAt(++w.position);while(M(pt));if(pt===35)do pt=w.input.charCodeAt(++w.position);while(!v(pt)&&pt!==0)}while(pt!==0){Gt(w),w.lineIndent=0,pt=w.input.charCodeAt(w.position);while((!kt||w.lineIndent<E)&&pt===32)w.lineIndent++,pt=w.input.charCodeAt(++w.position);if(!kt&&w.lineIndent>E)E=w.lineIndent;if(v(pt)){ot++;continue}if(!kt&&E===0)W(w,"missing indentation for block scalar");if(w.lineIndent<E){if(yt===m)w.result+=r.repeat(`
|
|
136
136
|
`,ct?1+ot:ot);else if(yt===f){if(ct)w.result+=`
|
|
137
137
|
`}break}if(ut)if(M(pt))Ct=!0,w.result+=r.repeat(`
|
|
138
138
|
`,ct?1+ot:ot);else if(Ct)Ct=!1,w.result+=r.repeat(`
|
|
139
139
|
`,ot+1);else if(ot===0){if(ct)w.result+=" "}else w.result+=r.repeat(`
|
|
140
140
|
`,ot);else w.result+=r.repeat(`
|
|
141
141
|
`,ct?1+ot:ot);ct=!0,kt=!0,ot=0;let bt=w.position;while(!v(pt)&&pt!==0)pt=w.input.charCodeAt(++w.position);Et(w,bt,w.position,!1)}return!0}t(xi,"readBlockScalar");function Ne(w,rt){let{tag:ut,anchor:yt}=w,ct=[],kt=!1;if(w.firstTabInLine!==-1)return!1;if(w.anchor!==null)at(w,w.anchor,ct);let E=w.input.charCodeAt(w.position);while(E!==0){if(w.firstTabInLine!==-1)w.position=w.firstTabInLine,W(w,"tab characters must not be used in indentation");if(E!==45)break;let ot=w.input.charCodeAt(w.position+1);if(!I(ot))break;if(kt=!0,w.position++,zt(w,!0,-1)){if(w.lineIndent<=rt){ct.push(null),E=w.input.charCodeAt(w.position);continue}}let Ct=w.line;if(Ie(w,rt,n,!1,!0),ct.push(w.result),zt(w,!0,-1),E=w.input.charCodeAt(w.position),(w.line===Ct||w.lineIndent>rt)&&E!==0)W(w,"bad indentation of a sequence entry");else if(w.lineIndent<rt)break}if(kt)return w.tag=ut,w.anchor=yt,w.kind="sequence",w.result=ct,!0;return!1}t(Ne,"readBlockSequence");function Pr(w,rt,ut){let yt,ct,kt,E,{tag:ot,anchor:Ct}=w,dt={},pt=Object.create(null),bt=null,xt=null,Mt=null,Bt=!1,Ot=!1;if(w.firstTabInLine!==-1)return!1;if(w.anchor!==null)at(w,w.anchor,dt);let Nt=w.input.charCodeAt(w.position);while(Nt!==0){if(!Bt&&w.firstTabInLine!==-1)w.position=w.firstTabInLine,W(w,"tab characters must not be used in indentation");let Qt=w.input.charCodeAt(w.position+1),ne=w.line;if((Nt===63||Nt===58)&&I(Qt)){if(Nt===63){if(Bt)Pt(w,dt,pt,bt,xt,null,ct,kt,E),bt=xt=Mt=null;Ot=!0,Bt=!0,yt=!0}else if(Bt)Bt=!1,yt=!0;else W(w,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");w.position+=1,Nt=Qt}else{if(ct=w.line,kt=w.lineStart,E=w.position,!Ie(w,ut,c,!1,!0))break;if(w.line===ne){Nt=w.input.charCodeAt(w.position);while(M(Nt))Nt=w.input.charCodeAt(++w.position);if(Nt===58){if(Nt=w.input.charCodeAt(++w.position),!I(Nt))W(w,"a whitespace character is expected after the key-value separator within a block mapping");if(Bt)Pt(w,dt,pt,bt,xt,null,ct,kt,E),bt=xt=Mt=null;Ot=!0,Bt=!1,yt=!1,bt=w.tag,xt=w.result}else if(Ot)W(w,"can not read an implicit mapping pair; a colon is missed");else return w.tag=ot,w.anchor=Ct,!0}else if(Ot)W(w,"can not read a block mapping entry; a multiline key may not be an implicit key");else return w.tag=ot,w.anchor=Ct,!0}if(w.line===ne||w.lineIndent>rt){if(Bt)ct=w.line,kt=w.lineStart,E=w.position;if(Ie(w,rt,d,!0,yt))if(Bt)xt=w.result;else Mt=w.result;if(!Bt)Pt(w,dt,pt,bt,xt,Mt,ct,kt,E),bt=xt=Mt=null;zt(w,!0,-1),Nt=w.input.charCodeAt(w.position)}if((w.line===ne||w.lineIndent>rt)&&Nt!==0)W(w,"bad indentation of a mapping entry");else if(w.lineIndent<rt)break}if(Bt)Pt(w,dt,pt,bt,xt,null,ct,kt,E);if(Ot)w.tag=ot,w.anchor=Ct,w.kind="mapping",w.result=dt;return Ot}t(Pr,"readBlockMapping");function Ci(w){let rt=!1,ut=!1,yt,ct,kt=w.input.charCodeAt(w.position);if(kt!==33)return!1;if(w.tag!==null)W(w,"duplication of a tag property");if(kt=w.input.charCodeAt(++w.position),kt===60)rt=!0,kt=w.input.charCodeAt(++w.position);else if(kt===33)ut=!0,yt="!!",kt=w.input.charCodeAt(++w.position);else yt="!";let E=w.position;if(rt){do kt=w.input.charCodeAt(++w.position);while(kt!==0&&kt!==62);if(w.position<w.length)ct=w.input.slice(E,w.position),kt=w.input.charCodeAt(++w.position);else W(w,"unexpected end of the stream within a verbatim tag")}else{while(kt!==0&&!I(kt)){if(kt===33)if(!ut){if(yt=w.input.slice(E-1,w.position+1),!T.test(yt))W(w,"named tag handle cannot contain such characters");ut=!0,E=w.position+1}else W(w,"tag suffix cannot contain exclamation marks");kt=w.input.charCodeAt(++w.position)}if(ct=w.input.slice(E,w.position),S.test(ct))W(w,"tag suffix cannot contain flow indicator characters")}if(ct&&!B.test(ct))W(w,"tag name cannot contain such characters: "+ct);try{ct=decodeURIComponent(ct)}catch(ot){W(w,"tag name is malformed: "+ct)}if(rt)w.tag=ct;else if(o.call(w.tagMap,yt))w.tag=w.tagMap[yt]+ct;else if(yt==="!")w.tag="!"+ct;else if(yt==="!!")w.tag="tag:yaml.org,2002:"+ct;else W(w,'undeclared tag handle "'+yt+'"');return!0}t(Ci,"readTagProperty");function Rr(w){let rt=w.input.charCodeAt(w.position);if(rt!==38)return!1;if(w.anchor!==null)W(w,"duplication of an anchor property");rt=w.input.charCodeAt(++w.position);let ut=w.position;while(rt!==0&&!I(rt)&&!O(rt))rt=w.input.charCodeAt(++w.position);if(w.position===ut)W(w,"name of an anchor node must contain at least one character");return w.anchor=w.input.slice(ut,w.position),!0}t(Rr,"readAnchorProperty");function qr(w){let rt=w.input.charCodeAt(w.position);if(rt!==42)return!1;rt=w.input.charCodeAt(++w.position);let ut=w.position;while(rt!==0&&!I(rt)&&!O(rt))rt=w.input.charCodeAt(++w.position);if(w.position===ut)W(w,"name of an alias node must contain at least one character");let yt=w.input.slice(ut,w.position);if(!o.call(w.anchorMap,yt))W(w,'unidentified alias "'+yt+'"');return w.result=w.anchorMap[yt],zt(w,!0,-1),!0}t(qr,"readAlias");function bi(w,rt,ut,yt){let ct=Xt(w);if(wt(w),Kt(w,rt),w.tag=null,w.anchor=null,w.kind=null,w.result=null,Pr(w,ut,yt)&&w.kind==="mapping")return Tt(w),!0;return Ut(w),Kt(w,ct),!1}t(bi,"tryReadBlockMappingFromProperty");function Ie(w,rt,ut,yt,ct){let kt,E,ot=1,Ct=!1,dt=!1,pt=null,bt,xt,Mt;if(w.depth>=w.maxDepth)W(w,"nesting exceeded maxDepth ("+w.maxDepth+")");if(w.depth+=1,w.listener!==null)w.listener("open",w);w.tag=null,w.anchor=null,w.kind=null,w.result=null;let Bt=kt=E=d===ut||n===ut;if(yt){if(zt(w,!0,-1)){if(Ct=!0,w.lineIndent>rt)ot=1;else if(w.lineIndent===rt)ot=0;else if(w.lineIndent<rt)ot=-1}}if(ot===1)while(!0){let Ot=w.input.charCodeAt(w.position),Nt=Xt(w);if(Ct&&(Ot===33&&w.tag!==null||Ot===38&&w.anchor!==null))break;if(!Ci(w)&&!Rr(w))break;if(pt===null)pt=Nt;if(zt(w,!0,-1)){if(Ct=!0,E=Bt,w.lineIndent>rt)ot=1;else if(w.lineIndent===rt)ot=0;else if(w.lineIndent<rt)ot=-1}else E=!1}if(E)E=Ct||ct;if(ot===1||d===ut){if(a===ut||c===ut)xt=rt;else xt=rt+1;if(Mt=w.position-w.lineStart,ot===1)if(E&&(Ne(w,Mt)||Pr(w,Mt,xt))||yi(w,xt))dt=!0;else{let Ot=w.input.charCodeAt(w.position);if(pt!==null&&Bt&&!E&&Ot!==124&&Ot!==62&&bi(w,pt,pt.position-pt.lineStart,xt))dt=!0;else if(kt&&xi(w,xt)||Dr(w,xt)||We(w,xt))dt=!0;else if(qr(w)){if(dt=!0,w.tag!==null||w.anchor!==null)W(w,"alias node should not have any properties")}else if(er(w,xt,a===ut)){if(dt=!0,w.tag===null)w.tag="?"}if(w.anchor!==null)at(w,w.anchor,w.result)}else if(ot===0)dt=E&&Ne(w,Mt)}if(w.tag===null){if(w.anchor!==null)at(w,w.anchor,w.result)}else if(w.tag==="?"){if(w.result!==null&&w.kind!=="scalar")W(w,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+w.kind+'"');for(let Ot=0,Nt=w.implicitTypes.length;Ot<Nt;Ot+=1)if(bt=w.implicitTypes[Ot],bt.resolve(w.result)){if(w.result=bt.construct(w.result),w.tag=bt.tag,w.anchor!==null)at(w,w.anchor,w.result);break}}else if(w.tag!=="!"){if(o.call(w.typeMap[w.kind||"fallback"],w.tag))bt=w.typeMap[w.kind||"fallback"][w.tag];else{bt=null;let Ot=w.typeMap.multi[w.kind||"fallback"];for(let Nt=0,Qt=Ot.length;Nt<Qt;Nt+=1)if(w.tag.slice(0,Ot[Nt].tag.length)===Ot[Nt].tag){bt=Ot[Nt];break}}if(!bt)W(w,"unknown tag !<"+w.tag+">");if(w.result!==null&&bt.kind!==w.kind)W(w,"unacceptable node kind for !<"+w.tag+'> tag; it should be "'+bt.kind+'", not "'+w.kind+'"');if(!bt.resolve(w.result,w.tag))W(w,"cannot resolve a node with !<"+w.tag+"> explicit tag");else if(w.result=bt.construct(w.result,w.tag),w.anchor!==null)at(w,w.anchor,w.result)}if(w.listener!==null)w.listener("close",w);return w.depth-=1,w.tag!==null||w.anchor!==null||dt}t(Ie,"composeNode");function ki(w){let rt=w.position,ut=!1,yt;w.version=null,w.checkLineBreaks=w.legacy,w.tagMap=Object.create(null),w.anchorMap=Object.create(null);while((yt=w.input.charCodeAt(w.position))!==0){if(zt(w,!0,-1),yt=w.input.charCodeAt(w.position),w.lineIndent>0||yt!==37)break;ut=!0,yt=w.input.charCodeAt(++w.position);let ct=w.position;while(yt!==0&&!I(yt))yt=w.input.charCodeAt(++w.position);let kt=w.input.slice(ct,w.position),E=[];if(kt.length<1)W(w,"directive name must not be less than one character in length");while(yt!==0){while(M(yt))yt=w.input.charCodeAt(++w.position);if(yt===35){do yt=w.input.charCodeAt(++w.position);while(yt!==0&&!v(yt));break}if(v(yt))break;ct=w.position;while(yt!==0&&!I(yt))yt=w.input.charCodeAt(++w.position);E.push(w.input.slice(ct,w.position))}if(yt!==0)Gt(w);if(o.call(Zt,kt))Zt[kt](w,kt,E);else nt(w,'unknown document directive "'+kt+'"')}if(zt(w,!0,-1),w.lineIndent===0&&w.input.charCodeAt(w.position)===45&&w.input.charCodeAt(w.position+1)===45&&w.input.charCodeAt(w.position+2)===45)w.position+=3,zt(w,!0,-1);else if(ut)W(w,"directives end mark is expected");if(Ie(w,w.lineIndent-1,d,!1,!0),zt(w,!0,-1),w.checkLineBreaks&&k.test(w.input.slice(rt,w.position)))nt(w,"non-ASCII line breaks are interpreted as content");if(w.documents.push(w.result),w.position===w.lineStart&&ae(w)){if(w.input.charCodeAt(w.position)===46)w.position+=3,zt(w,!0,-1);return}if(w.position<w.length-1)W(w,"end of the stream or a document separator is expected")}t(ki,"readDocument");function Wr(w,rt){if(w=String(w),rt=rt||{},w.length!==0){if(w.charCodeAt(w.length-1)!==10&&w.charCodeAt(w.length-1)!==13)w+=`
|
|
142
|
-
`;if(w.charCodeAt(0)===65279)w=w.slice(1)}let ut=new Y(w,rt),yt=w.indexOf("\x00");if(yt!==-1)ut.position=yt,W(ut,"null byte is not allowed in input");ut.input+="\x00";while(ut.input.charCodeAt(ut.position)===32)ut.lineIndent+=1,ut.position+=1;while(ut.position<ut.length-1)ki(ut);return ut.documents}t(Wr,"loadDocuments");function Nr(w,rt,ut){if(rt!==null&&typeof rt==="object"&&typeof ut>"u")ut=rt,rt=null;let yt=Wr(w,ut);if(typeof rt!=="function")return yt;for(let ct=0,kt=yt.length;ct<kt;ct+=1)rt(yt[ct])}t(Nr,"loadAll2");function wi(w,rt){let ut=Wr(w,rt);if(ut.length===0)return;else if(ut.length===1)return ut[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Nr,_s.load=wi,_s}t(Id,"requireLoader");var Ql={},Md;function Od(){if(Md)return Ql;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,b=35,k=37,S=38,T=39,B=42,_=44,v=45,M=58,I=61,O=62,
|
|
142
|
+
`;if(w.charCodeAt(0)===65279)w=w.slice(1)}let ut=new Y(w,rt),yt=w.indexOf("\x00");if(yt!==-1)ut.position=yt,W(ut,"null byte is not allowed in input");ut.input+="\x00";while(ut.input.charCodeAt(ut.position)===32)ut.lineIndent+=1,ut.position+=1;while(ut.position<ut.length-1)ki(ut);return ut.documents}t(Wr,"loadDocuments");function Nr(w,rt,ut){if(rt!==null&&typeof rt==="object"&&typeof ut>"u")ut=rt,rt=null;let yt=Wr(w,ut);if(typeof rt!=="function")return yt;for(let ct=0,kt=yt.length;ct<kt;ct+=1)rt(yt[ct])}t(Nr,"loadAll2");function wi(w,rt){let ut=Wr(w,rt);if(ut.length===0)return;else if(ut.length===1)return ut[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Nr,_s.load=wi,_s}t(Id,"requireLoader");var Ql={},Md;function Od(){if(Md)return Ql;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,b=35,k=37,S=38,T=39,B=42,_=44,v=45,M=58,I=61,O=62,G=63,Z=64,tt=91,it=93,ht=96,lt=123,st=124,D=125,Y={};Y[0]="\\0",Y[7]="\\a",Y[8]="\\b",Y[9]="\\t",Y[10]="\\n",Y[11]="\\v",Y[12]="\\f",Y[13]="\\r",Y[27]="\\e",Y[34]="\\\"",Y[92]="\\\\",Y[133]="\\N",Y[160]="\\_",Y[8232]="\\L",Y[8233]="\\P";let et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],W=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function nt(E,ot){if(ot===null)return{};let Ct={},dt=Object.keys(ot);for(let pt=0,bt=dt.length;pt<bt;pt+=1){let xt=dt[pt],Mt=String(ot[xt]);if(xt.slice(0,2)==="!!")xt="tag:yaml.org,2002:"+xt.slice(2);let Bt=E.compiledTypeMap.fallback[xt];if(Bt&&o.call(Bt.styleAliases,Mt))Mt=Bt.styleAliases[Mt];Ct[xt]=Mt}return Ct}t(nt,"compileStyleMap");function at(E){let ot,Ct,dt=E.toString(16).toUpperCase();if(E<=255)ot="x",Ct=2;else if(E<=65535)ot="u",Ct=4;else if(E<=4294967295)ot="U",Ct=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+ot+r.repeat("0",Ct-dt.length)+dt}t(at,"encodeHex");let wt=1,Tt=2;function Ut(E){this.schema=E.schema||i,this.indent=Math.max(1,E.indent||2),this.noArrayIndent=E.noArrayIndent||!1,this.skipInvalid=E.skipInvalid||!1,this.flowLevel=r.isNothing(E.flowLevel)?-1:E.flowLevel,this.styleMap=nt(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==='"'?Tt:wt,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}t(Ut,"State");function Xt(E,ot){let Ct=r.repeat(" ",ot),dt=0,pt="",bt=E.length;while(dt<bt){let xt,Mt=E.indexOf(`
|
|
143
143
|
`,dt);if(Mt===-1)xt=E.slice(dt),dt=bt;else xt=E.slice(dt,Mt+1),dt=Mt+1;if(xt.length&&xt!==`
|
|
144
144
|
`)pt+=Ct;pt+=xt}return pt}t(Xt,"indentString");function Kt(E,ot){return`
|
|
145
|
-
`+r.repeat(" ",E.indent*ot)}t(Kt,"generateNextLine");function Zt(E,ot){for(let Ct=0,dt=E.implicitTypes.length;Ct<dt;Ct+=1)if(E.implicitTypes[Ct].resolve(ot))return!0;return!1}t(Zt,"testImplicitResolving");function Et(E){return E===f||E===c}t(Et,"isWhitespace");function _t(E){return E>=32&&E<=126||E>=161&&E<=55295&&E!==8232&&E!==8233||E>=57344&&E<=65533&&E!==a||E>=65536&&E<=1114111}t(_t,"isPrintable");function Pt(E){return _t(E)&&E!==a&&E!==d&&E!==n}t(Pt,"isNsCharOrWhitespace");function Gt(E,ot,Ct){let dt=Pt(E),pt=dt&&!Et(E);return(Ct?dt:dt&&E!==_&&E!==tt&&E!==it&&E!==lt&&E!==D)&&E!==b&&!(ot===M&&!pt)||Pt(ot)&&!Et(ot)&&E===b||ot===M&&pt}t(Gt,"isPlainSafe");function zt(E){return _t(E)&&E!==a&&!Et(E)&&E!==v&&E!==
|
|
145
|
+
`+r.repeat(" ",E.indent*ot)}t(Kt,"generateNextLine");function Zt(E,ot){for(let Ct=0,dt=E.implicitTypes.length;Ct<dt;Ct+=1)if(E.implicitTypes[Ct].resolve(ot))return!0;return!1}t(Zt,"testImplicitResolving");function Et(E){return E===f||E===c}t(Et,"isWhitespace");function _t(E){return E>=32&&E<=126||E>=161&&E<=55295&&E!==8232&&E!==8233||E>=57344&&E<=65533&&E!==a||E>=65536&&E<=1114111}t(_t,"isPrintable");function Pt(E){return _t(E)&&E!==a&&E!==d&&E!==n}t(Pt,"isNsCharOrWhitespace");function Gt(E,ot,Ct){let dt=Pt(E),pt=dt&&!Et(E);return(Ct?dt:dt&&E!==_&&E!==tt&&E!==it&&E!==lt&&E!==D)&&E!==b&&!(ot===M&&!pt)||Pt(ot)&&!Et(ot)&&E===b||ot===M&&pt}t(Gt,"isPlainSafe");function zt(E){return _t(E)&&E!==a&&!Et(E)&&E!==v&&E!==G&&E!==M&&E!==_&&E!==tt&&E!==it&&E!==lt&&E!==D&&E!==b&&E!==S&&E!==B&&E!==u&&E!==st&&E!==I&&E!==O&&E!==T&&E!==m&&E!==k&&E!==Z&&E!==ht}t(zt,"isPlainSafeFirst");function ae(E){return!Et(E)&&E!==M}t(ae,"isPlainSafeLast");function oe(E,ot){let Ct=E.charCodeAt(ot),dt;if(Ct>=55296&&Ct<=56319&&ot+1<E.length){if(dt=E.charCodeAt(ot+1),dt>=56320&&dt<=57343)return(Ct-55296)*1024+dt-56320+65536}return Ct}t(oe,"codePointAt");function er(E){return/^\n* /.test(E)}t(er,"needIndentIndicator");let Dr=1,We=2,yi=3,xi=4,Ne=5;function Pr(E,ot,Ct,dt,pt,bt,xt,Mt){let Bt,Ot=0,Nt=null,Qt=!1,ne=!1,kc=dt!==-1,Si=-1,Ti=zt(oe(E,0))&&ae(oe(E,E.length-1));if(ot||xt)for(Bt=0;Bt<E.length;Ot>=65536?Bt+=2:Bt++){if(Ot=oe(E,Bt),!_t(Ot))return Ne;Ti=Ti&&Gt(Ot,Nt,Mt),Nt=Ot}else{for(Bt=0;Bt<E.length;Ot>=65536?Bt+=2:Bt++){if(Ot=oe(E,Bt),Ot===n){if(Qt=!0,kc)ne=ne||Bt-Si-1>dt&&E[Si+1]!==" ",Si=Bt}else if(!_t(Ot))return Ne;Ti=Ti&&Gt(Ot,Nt,Mt),Nt=Ot}ne=ne||kc&&(Bt-Si-1>dt&&E[Si+1]!==" ")}if(!Qt&&!ne){if(Ti&&!xt&&!pt(E))return Dr;return bt===Tt?Ne:We}if(Ct>9&&er(E))return Ne;if(!xt)return ne?xi:yi;return bt===Tt?Ne:We}t(Pr,"chooseScalarStyle");function Ci(E,ot,Ct,dt,pt){E.dump=function(){if(ot.length===0)return E.quotingType===Tt?'""':"''";if(!E.noCompatMode){if(et.indexOf(ot)!==-1||W.test(ot))return E.quotingType===Tt?'"'+ot+'"':"'"+ot+"'"}let bt=E.indent*Math.max(1,Ct),xt=E.lineWidth===-1?-1:Math.max(Math.min(E.lineWidth,40),E.lineWidth-bt),Mt=dt||E.flowLevel>-1&&Ct>=E.flowLevel;function Bt(Ot){return Zt(E,Ot)}switch(t(Bt,"testAmbiguity"),Pr(ot,Mt,E.indent,xt,Bt,E.quotingType,E.forceQuotes&&!dt,pt)){case Dr:return ot;case We:return"'"+ot.replace(/'/g,"''")+"'";case yi:return"|"+Rr(ot,E.indent)+qr(Xt(ot,bt));case xi:return">"+Rr(ot,E.indent)+qr(Xt(bi(ot,xt),bt));case Ne:return'"'+ki(ot)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Ci,"writeScalar");function Rr(E,ot){let Ct=er(E)?String(ot):"",dt=E[E.length-1]===`
|
|
146
146
|
`,bt=dt&&(E[E.length-2]===`
|
|
147
147
|
`||E===`
|
|
148
148
|
`)?"+":dt?"":"-";return Ct+bt+`
|
|
@@ -155,7 +155,7 @@ import{$t}from"./index-8hgm0abr.js";import{mn,Bn}from"./index-czagykbq.js";var e
|
|
|
155
155
|
`,E.length-pt>ot&&xt>pt)Bt+=E.slice(pt,xt)+`
|
|
156
156
|
`+E.slice(xt+1);else Bt+=E.slice(pt);return Bt.slice(1)}t(Ie,"foldLine");function ki(E){let ot="",Ct=0;for(let dt=0;dt<E.length;Ct>=65536?dt+=2:dt++){Ct=oe(E,dt);let pt=Y[Ct];if(!pt&&_t(Ct)){if(ot+=E[dt],Ct>=65536)ot+=E[dt+1]}else ot+=pt||at(Ct)}return ot}t(ki,"escapeString");function Wr(E,ot,Ct){let dt="",pt=E.tag;for(let bt=0,xt=Ct.length;bt<xt;bt+=1){let Mt=Ct[bt];if(E.replacer)Mt=E.replacer.call(Ct,String(bt),Mt);if(ut(E,ot,Mt,!1,!1)||typeof Mt>"u"&&ut(E,ot,null,!1,!1)){if(dt!=="")dt+=","+(!E.condenseFlow?" ":"");dt+=E.dump}}E.tag=pt,E.dump="["+dt+"]"}t(Wr,"writeFlowSequence");function Nr(E,ot,Ct,dt){let pt="",bt=E.tag;for(let xt=0,Mt=Ct.length;xt<Mt;xt+=1){let Bt=Ct[xt];if(E.replacer)Bt=E.replacer.call(Ct,String(xt),Bt);if(ut(E,ot+1,Bt,!0,!0,!1,!0)||typeof Bt>"u"&&ut(E,ot+1,null,!0,!0,!1,!0)){if(!dt||pt!=="")pt+=Kt(E,ot);if(E.dump&&n===E.dump.charCodeAt(0))pt+="-";else pt+="- ";pt+=E.dump}}E.tag=bt,E.dump=pt||"[]"}t(Nr,"writeBlockSequence");function wi(E,ot,Ct){let dt="",pt=E.tag,bt=Object.keys(Ct);for(let xt=0,Mt=bt.length;xt<Mt;xt+=1){let Bt="";if(dt!=="")Bt+=", ";if(E.condenseFlow)Bt+='"';let Ot=bt[xt],Nt=Ct[Ot];if(E.replacer)Nt=E.replacer.call(Ct,Ot,Nt);if(!ut(E,ot,Ot,!1,!1))continue;if(E.dump.length>1024)Bt+="? ";if(Bt+=E.dump+(E.condenseFlow?'"':"")+":"+(E.condenseFlow?"":" "),!ut(E,ot,Nt,!1,!1))continue;Bt+=E.dump,dt+=Bt}E.tag=pt,E.dump="{"+dt+"}"}t(wi,"writeFlowMapping");function w(E,ot,Ct,dt){let pt="",bt=E.tag,xt=Object.keys(Ct);if(E.sortKeys===!0)xt.sort();else if(typeof E.sortKeys==="function")xt.sort(E.sortKeys);else if(E.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Mt=0,Bt=xt.length;Mt<Bt;Mt+=1){let Ot="";if(!dt||pt!=="")Ot+=Kt(E,ot);let Nt=xt[Mt],Qt=Ct[Nt];if(E.replacer)Qt=E.replacer.call(Ct,Nt,Qt);if(!ut(E,ot+1,Nt,!0,!0,!0))continue;let ne=E.tag!==null&&E.tag!=="?"||E.dump&&E.dump.length>1024;if(ne)if(E.dump&&n===E.dump.charCodeAt(0))Ot+="?";else Ot+="? ";if(Ot+=E.dump,ne)Ot+=Kt(E,ot);if(!ut(E,ot+1,Qt,!0,ne))continue;if(E.dump&&n===E.dump.charCodeAt(0))Ot+=":";else Ot+=": ";Ot+=E.dump,pt+=Ot}E.tag=bt,E.dump=pt||"{}"}t(w,"writeBlockMapping");function rt(E,ot,Ct){let dt=Ct?E.explicitTypes:E.implicitTypes;for(let pt=0,bt=dt.length;pt<bt;pt+=1){let xt=dt[pt];if((xt.instanceOf||xt.predicate)&&(!xt.instanceOf||typeof ot==="object"&&ot instanceof xt.instanceOf)&&(!xt.predicate||xt.predicate(ot))){if(Ct)if(xt.multi&&xt.representName)E.tag=xt.representName(ot);else E.tag=xt.tag;else E.tag="?";if(xt.represent){let Mt=E.styleMap[xt.tag]||xt.defaultStyle,Bt;if(s.call(xt.represent)==="[object Function]")Bt=xt.represent(ot,Mt);else if(o.call(xt.represent,Mt))Bt=xt.represent[Mt](ot,Mt);else throw new e("!<"+xt.tag+'> tag resolver accepts not "'+Mt+'" style');E.dump=Bt}return!0}}return!1}t(rt,"detectType");function ut(E,ot,Ct,dt,pt,bt,xt){if(E.tag=null,E.dump=Ct,!rt(E,Ct,!1))rt(E,Ct,!0);let Mt=s.call(E.dump),Bt=dt;if(dt)dt=E.flowLevel<0||E.flowLevel>ot;let Ot=Mt==="[object Object]"||Mt==="[object Array]",Nt,Qt;if(Ot)Nt=E.duplicates.indexOf(Ct),Qt=Nt!==-1;if(E.tag!==null&&E.tag!=="?"||Qt||E.indent!==2&&ot>0)pt=!1;if(Qt&&E.usedDuplicates[Nt])E.dump="*ref_"+Nt;else{if(Ot&&Qt&&!E.usedDuplicates[Nt])E.usedDuplicates[Nt]=!0;if(Mt==="[object Object]"){if(dt&&Object.keys(E.dump).length!==0){if(w(E,ot,E.dump,pt),Qt)E.dump="&ref_"+Nt+E.dump}else if(wi(E,ot,E.dump),Qt)E.dump="&ref_"+Nt+" "+E.dump}else if(Mt==="[object Array]"){if(dt&&E.dump.length!==0){if(E.noArrayIndent&&!xt&&ot>0)Nr(E,ot-1,E.dump,pt);else Nr(E,ot,E.dump,pt);if(Qt)E.dump="&ref_"+Nt+E.dump}else if(Wr(E,ot,E.dump),Qt)E.dump="&ref_"+Nt+" "+E.dump}else if(Mt==="[object String]"){if(E.tag!=="?")Ci(E,E.dump,ot,bt,Bt)}else if(Mt==="[object Undefined]")return!1;else{if(E.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Mt)}if(E.tag!==null&&E.tag!=="?"){let ne=encodeURI(E.tag[0]==="!"?E.tag.slice(1):E.tag).replace(/!/g,"%21");if(E.tag[0]==="!")ne="!"+ne;else if(ne.slice(0,18)==="tag:yaml.org,2002:")ne="!!"+ne.slice(18);else ne="!<"+ne+">";E.dump=ne+" "+E.dump}}return!0}t(ut,"writeNode");function yt(E,ot){let Ct=[],dt=[];ct(E,Ct,dt);let pt=dt.length;for(let bt=0;bt<pt;bt+=1)ot.duplicates.push(Ct[dt[bt]]);ot.usedDuplicates=Array(pt)}t(yt,"getDuplicateReferences");function ct(E,ot,Ct){if(E!==null&&typeof E==="object"){let dt=ot.indexOf(E);if(dt!==-1){if(Ct.indexOf(dt)===-1)Ct.push(dt)}else if(ot.push(E),Array.isArray(E))for(let pt=0,bt=E.length;pt<bt;pt+=1)ct(E[pt],ot,Ct);else{let pt=Object.keys(E);for(let bt=0,xt=pt.length;bt<xt;bt+=1)ct(E[pt[bt]],ot,Ct)}}}t(ct,"inspectNode");function kt(E,ot){ot=ot||{};let Ct=new Ut(ot);if(!Ct.noRefs)yt(E,Ct);let dt=E;if(Ct.replacer)dt=Ct.replacer.call({"":dt},"",dt);if(ut(Ct,0,dt,!0,!0))return Ct.dump+`
|
|
157
157
|
`;return""}return t(kt,"dump2"),Ql.dump=kt,Ql}t(Od,"requireDumper");var Ad;function Dd(){if(Ad)return ke;Ad=1;let r=Id(),e=Od();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),ke.Type=we(),ke.Schema=th(),ke.FAILSAFE_SCHEMA=oh(),ke.JSON_SCHEMA=hh(),ke.CORE_SCHEMA=ch(),ke.DEFAULT_SCHEMA=vs(),ke.load=r.load,ke.loadAll=r.loadAll,ke.dump=e.dump,ke.YAMLException=ai(),ke.types={binary:fh(),float:lh(),map:ih(),null:sh(),pairs:gh(),set:mh(),timestamp:uh(),bool:ah(),int:nh(),merge:dh(),omap:ph(),seq:rh(),str:eh()},ke.safeLoad=i("safeLoad","load"),ke.safeLoadAll=i("safeLoadAll","loadAll"),ke.safeDump=i("safeDump","dump"),ke}t(Dd,"requireJsYaml");var lb=Dd(),hb=Ed(lb),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:ir,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:sr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=hb;var ip=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((m,b,k)=>r.append("defs").append("filter").attr("id",m).attr("height",b).attr("width",b).append("feDropShadow").attr("dx",k).attr("dy",k).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Pd=t((r)=>{let{handDrawnSeed:e}=p();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),cb=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ue=t((r)=>{let e=ub([...r.cssCompiledStyles||[],...r.cssStyles||[],...cb(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ub=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Ru=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),Q=t((r)=>{let{stylesArray:e}=Ue(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Ru(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),St=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=p(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ue(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:db(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),db=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var yh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!As(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!As(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!As(n,i)?null:n}return null},As=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var fb=Object.freeze({left:0,top:0,width:16,height:16}),ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xh=Object.freeze({...fb,...ni}),Rd=Object.freeze({...xh,body:"",hidden:!1});function qd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function Ch(r,e){let i=qd(r,e);for(let s in Rd)if(s in ni){if(s in r&&!(s in i))i[s]=ni[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Wd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Nd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=Ch(s[n]||o[n],a)}return c(e),i.forEach(c),Ch(r,a)}function bh(r,e){if(r.icons[e])return Nd(r,e,[]);let i=Wd(r,[e])[e];return i?Nd(r,e,i):null}var pb=Object.freeze({width:null,height:null}),zd=Object.freeze({...pb,...ni});var gb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kh(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(gb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=mb.test(a);while(!0){if(c){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");c=!c}}function yb(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function xb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Hd(r,e,i){let s=yb(r);return xb(s.defs,e+s.content+i)}var Cb=(r)=>r==="unset"||r==="undefined"||r==="none";function wh(r,e){let i={...xh,...r},s={...zd,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:M}=T;if(_)if(v)M+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let I;if(M<0)M-=Math.floor(M/4)*4;switch(M=M%4,M){case 1:I=o.height/2+o.top,B.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:I=o.width/2+o.left,B.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")")}if(M%2===1){if(o.left!==o.top)I=o.left,o.left=o.top,o.top=I;if(o.width!==o.height)I=o.width,o.width=o.height,o.height=I}if(B.length)a=Hd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,m;if(c===null)m=n===null?"1em":n==="auto"?f:n,u=kh(m,d/f);else u=c==="auto"?d:c,m=n===null?kh(u,f/d):n==="auto"?f:n;let b={},k=(T,B)=>{if(!Cb(B))b[T]=B.toString()};k("width",u),k("height",m);let S=[o.left,o.top,d,f];return b.viewBox=S.join(" "),{attributes:b,viewBox:S,body:a}}var bb=/\sid="(\S+)"/g,Yd=new Map;function kb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Yd.get(r)||0;return Yd.set(r,e+1),e?`${r}${e}`:r}function Sh(r){let e=[],i;while(i=bb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=kb(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function Th(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var zf={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},Bh=new Map,jd=new Map,Fi=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)jd.set(e.name,e.loader);else if("icons"in e)Bh.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ud=t(async(r,e)=>{let i=yh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=Bh.get(s);if(!o){let c=jd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},Bh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=bh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Es=t(async(r)=>{try{return await Ud(r),!0}catch{return!1}},"isIconAvailable"),lr=t(async(r,e,i)=>{let s;try{s=await Ud(r,e?.fallbackPrefix)}catch(c){l.error(c),s=zf}let o=wh(s,e),a=Th(Sh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var hf=mn(Ls(),1);function Lr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function Li(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Yo(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var sp="[object RegExp]",Hl="[object String]",Wl="[object Number]",Kl="[object Boolean]",Vl="[object Arguments]",lp="[object Symbol]",cp="[object Date]",up="[object Map]",dp="[object Set]",pp="[object Array]";var mp="[object ArrayBuffer]",fp="[object Object]";var gp="[object DataView]",Ap="[object Uint8Array]",hp="[object Uint8ClampedArray]",bp="[object Uint16Array]",yp="[object Uint32Array]";var vp="[object Int8Array]",kp="[object Int16Array]",xp="[object Int32Array]";var wp="[object Float32Array]",Cp="[object Float64Array]";function li(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Jo(r){return li(r)}function Qd(){}function Jd(r){if(Li(r))return r;if(Array.isArray(r)||li(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function $s(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var _h=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Yl(r){return typeof _h.Buffer<"u"&&_h.Buffer.isBuffer(r)}function tf(r){return r==="__proto__"}function Is(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ef(r,e){return hi(r,void 0,r,new Map,e)}function hi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Li(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,hi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(hi(n,void 0,i,s,o));return c}if(Yl(r))return r.subarray();if(li(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),$e(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),$e(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),$e(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,$e(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),$e(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),$e(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),$e(c,r,i,s,o),c}if(typeof r==="object"&&Ib(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),$e(c,r,i,s,o),c}return r}function $e(r,e,i=r,s,o){let a=[...Object.keys(e),...$s(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=hi(e[n],n,i,s,o)}}function Ib(r){switch(Yo(r)){case Vl:case pp:case mp:case gp:case Kl:case cp:case wp:case Cp:case vp:case kp:case xp:case up:case Wl:case fp:case sp:case dp:case Hl:case lp:case Ap:case hp:case bp:case yp:return!0;default:return!1}}function rf(r,e){return ef(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Yo(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),$e(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Wl:case Hl:case Kl:{let n=new r.constructor(r?.valueOf());return $e(n,r),n}case Vl:{let n={};return $e(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function vh(r){return rf(r)}function Fu(r){return r!==null&&typeof r==="object"&&Yo(r)==="[object Arguments]"}function Co(r){return typeof r==="object"&&r!==null}function of(r){return Number.isSafeInteger(r)&&r>=0}function Ep(r){return r!=null&&typeof r!=="function"&&of(r.length)}function sf(r){return Co(r)&&Ep(r)}function af(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Ds(o,c,s,new Map)}return o}function Ds(r,e,i,s){if(Li(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return Jd(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...$s(e)];for(let a=0;a<o.length;a++){let c=o[a];if(tf(c))continue;let n=e[c],d=r[c];if(Fu(n))n={...n};if(Fu(d))d={...d};if(Yl(n))n=vh(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],m=Reflect.ownKeys(d);for(let b=0;b<m.length;b++){let k=m[b];u[k]=d[k]}d=u}else if(sf(d)){let u=[];for(let m=0;m<d.length;m++)u[m]=d[m];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Ds(d,n,i,s);else if(Co(d)&&Co(n)&&(Is(d)||Is(n)||Jo(d)||Jo(n)))r[c]=Ds(d,n,i,s);else if(d==null&&Is(n))r[c]=Ds({},n,i,s);else if(d==null&&Jo(n))r[c]=vh(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function Lh(r,...e){return af(r,...e,Qd)}var Uf="",Ob={curveBasis:vr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ro,curveBumpY:io,curveBundle:hl,curveCardinalClosed:cl,curveCardinalOpen:ul,curveCardinal:so,curveCatmullRomClosed:dl,curveCatmullRomOpen:fl,curveCatmullRom:no,curveLinear:pa,curveLinearClosed:Ss,curveMonotoneX:ho,curveMonotoneY:go,curveNatural:ii,curveStep:oi,curveStepAfter:xo,curveStepBefore:yo},Db=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Pb=t(function(r,e){let i=cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);Ei(c),s=Ke(s,[...c])}else s=i.args;if(!s)return;let o=Pl(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Db.source})(?=[}][%]{2}).*
|
|
158
|
-
`,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Hr.exec(r))!==null){if(s.index===Hr.lastIndex)Hr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),jg=t(function(r){return r.replace(Hr,"")},"removeDirectives"),Rb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Ws(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Ob[i]??e}t(Ws,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var qb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function Fh(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(Fh,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=Fh(o,e),e=o});let s=i/2;return Mh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),Mh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=Fh(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Wb=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=Mh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=Mh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Bp(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Bp,"getStylesFromArray");var lf=0,Gf=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(gf,"makeRandomHex");var jf=t((r)=>gf(r.length),"random"),Nb=t(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"),zb=t(function(r,e){let i=e.text.replace(x.lineBreakRegex," "),[,s]=_n(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),Mi=Lr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),x.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((c,n)=>{let d=qn(`${c} `,i),f=qn(a,i);if(d>e){let{hyphenatedStrings:b,remainingWord:k}=Hb(c,e,"-",i);o.push(a,...b),a=k}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Hb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(qn(f,s)>=e){let m=d+1,b=o.length===m,k=`${f}${i}`;a.push(b?f:k),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Lu(r,e){return Mu(r,e).height}t(Lu,"calculateTextHeight");function qn(r,e){return Mu(r,e).width}t(qn,"calculateTextWidth");var Mu=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=_n(i),c=["sans-serif",s],n=r.split(x.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let b of c){let k=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Nb();B.text=T||Uf;let _=zb(u,B).style("font-size",a).style("font-weight",o).style("font-family",b),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),k=Math.round(v.height),S.height+=k,S.lineHeight=Math.round(Math.max(S.lineHeight,k))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Yb=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},qs,jb=t(function(r){return qs=qs||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qs.innerHTML=r,unescape(qs.textContent)},"entityDecode");function Ip(r){return"str"in r}t(Ip,"isDetailedError");var Ub=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),_n=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function se(r,e){return Lh({},r,e)}t(se,"cleanAndMerge");var K={assignWithDepth:Ke,wrapLabel:Mi,calculateTextHeight:Lu,calculateTextWidth:qn,calculateTextDimensions:Mu,cleanAndMerge:se,detectInit:Pb,detectDirective:cf,isSubstringInArray:Rb,interpolateToCurve:Ws,calcLabelPosition:ff,calcCardinalityPosition:Wb,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Bp,generateId:Gf,random:jf,runFunc:qb,entityDecode:jb,insertTitle:Ub,isLabelCoordinateInPath:mf,parseFontSize:_n,InitIDGenerator:Yb},qg=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),$a=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),wn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function he(r){return r??null}t(he,"handleUndefinedAttr");function mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(mf,"isLabelCoordinateInPath");function Eh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=Eh();function Sf(r){Mr=r}var So={exec:()=>null};function re(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(ve.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Xb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ve={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:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Gb=/^(?:[ \t]*(?:\n|$))+/,Vb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,To=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Zb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$h=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=re(Tf).replace(/bull/g,$h).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(),Qb=re(Tf).replace(/bull/g,$h).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(),Ih=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jb=/^[^\n]+/,Oh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tk=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Oh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ek=re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$h).getRegex(),js="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",Dh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rk=re("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Dh).replace("tag",js).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=re(Ih).replace("hr",To).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",js).getRegex(),ik=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Ph={blockquote:ik,code:Vb,def:tk,fences:Kb,heading:Zb,hr:To,html:rk,lheading:Bf,list:ek,newline:Gb,paragraph:_f,table:So,text:Jb},yf=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",js).getRegex(),ok={...Ph,lheading:Qb,table:yf,paragraph:re(Ih).replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",js).getRegex()},sk={...Ph,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dh).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:So,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Ih).replace("hr",To).replace("heading",` *#{1,6} *[^
|
|
158
|
+
`,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Hr.exec(r))!==null){if(s.index===Hr.lastIndex)Hr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),jg=t(function(r){return r.replace(Hr,"")},"removeDirectives"),Rb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Ws(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Ob[i]??e}t(Ws,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var qb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function Fh(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(Fh,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=Fh(o,e),e=o});let s=i/2;return Mh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),Mh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=Fh(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Wb=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=Mh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=Mh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Bp(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Bp,"getStylesFromArray");var lf=0,Gf=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(gf,"makeRandomHex");var jf=t((r)=>gf(r.length),"random"),Nb=t(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"),zb=t(function(r,e){let i=e.text.replace(x.lineBreakRegex," "),[,s]=Sn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),Mi=Lr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),x.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((c,n)=>{let d=qn(`${c} `,i),f=qn(a,i);if(d>e){let{hyphenatedStrings:b,remainingWord:k}=Hb(c,e,"-",i);o.push(a,...b),a=k}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Hb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(qn(f,s)>=e){let m=d+1,b=o.length===m,k=`${f}${i}`;a.push(b?f:k),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Lu(r,e){return Mu(r,e).height}t(Lu,"calculateTextHeight");function qn(r,e){return Mu(r,e).width}t(qn,"calculateTextWidth");var Mu=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Sn(i),c=["sans-serif",s],n=r.split(x.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let b of c){let k=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Nb();B.text=T||Uf;let _=zb(u,B).style("font-size",a).style("font-weight",o).style("font-family",b),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),k=Math.round(v.height),S.height+=k,S.lineHeight=Math.round(Math.max(S.lineHeight,k))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Yb=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},qs,jb=t(function(r){return qs=qs||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qs.innerHTML=r,unescape(qs.textContent)},"entityDecode");function Ip(r){return"str"in r}t(Ip,"isDetailedError");var Ub=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Sn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function se(r,e){return Lh({},r,e)}t(se,"cleanAndMerge");var K={assignWithDepth:Ke,wrapLabel:Mi,calculateTextHeight:Lu,calculateTextWidth:qn,calculateTextDimensions:Mu,cleanAndMerge:se,detectInit:Pb,detectDirective:cf,isSubstringInArray:Rb,interpolateToCurve:Ws,calcLabelPosition:ff,calcCardinalityPosition:Wb,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Bp,generateId:Gf,random:jf,runFunc:qb,entityDecode:jb,insertTitle:Ub,isLabelCoordinateInPath:mf,parseFontSize:Sn,InitIDGenerator:Yb},qg=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),$a=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Cn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function he(r){return r??null}t(he,"handleUndefinedAttr");function mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(mf,"isLabelCoordinateInPath");function Eh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=Eh();function Sf(r){Mr=r}var So={exec:()=>null};function re(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(ve.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Xb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ve={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:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Gb=/^(?:[ \t]*(?:\n|$))+/,Vb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,To=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Zb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$h=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=re(Tf).replace(/bull/g,$h).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(),Qb=re(Tf).replace(/bull/g,$h).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(),Ih=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jb=/^[^\n]+/,Oh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tk=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Oh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ek=re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$h).getRegex(),js="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",Dh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rk=re("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Dh).replace("tag",js).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=re(Ih).replace("hr",To).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",js).getRegex(),ik=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Ph={blockquote:ik,code:Vb,def:tk,fences:Kb,heading:Zb,hr:To,html:rk,lheading:Bf,list:ek,newline:Gb,paragraph:_f,table:So,text:Jb},yf=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",js).getRegex(),ok={...Ph,lheading:Qb,table:yf,paragraph:re(Ih).replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",js).getRegex()},sk={...Ph,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dh).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:So,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Ih).replace("hr",To).replace("heading",` *#{1,6} *[^
|
|
159
159
|
]`).replace("lheading",Bf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ak=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vf=/^( {2,}|\\)\n(?!\s*$)/,lk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Us=/[\p{P}\p{S}]/u,Rh=/[\s\p{P}\p{S}]/u,Af=/[^\s\p{P}\p{S}]/u,hk=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rh).getRegex(),Ef=/(?!~)[\p{P}\p{S}]/u,ck=/(?!~)[\s\p{P}\p{S}]/u,uk=/(?:[^\s\p{P}\p{S}]|~)/u,dk=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),If=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fk=re(If,"u").replace(/punct/g,Us).getRegex(),pk=re(If,"u").replace(/punct/g,Ef).getRegex(),Df="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gk=re(Df,"gu").replace(/notPunctSpace/g,Af).replace(/punctSpace/g,Rh).replace(/punct/g,Us).getRegex(),mk=re(Df,"gu").replace(/notPunctSpace/g,uk).replace(/punctSpace/g,ck).replace(/punct/g,Ef).getRegex(),yk=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Af).replace(/punctSpace/g,Rh).replace(/punct/g,Us).getRegex(),xk=re(/\\(punct)/,"gu").replace(/punct/g,Us).getRegex(),Ck=re(/^<(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(),bk=re(Dh).replace("(?:-->|$)","-->").getRegex(),kk=re("^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",bk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,wk=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nf=re(/^!?\[(label)\]\[(ref)\]/).replace("label",zs).replace("ref",Oh).getRegex(),Yf=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Oh).getRegex(),Sk=re("reflink|nolink(?!\\()","g").replace("reflink",Nf).replace("nolink",Yf).getRegex(),xf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qh={_backpedal:So,anyPunctuation:xk,autolink:Ck,blockSkip:dk,br:vf,code:nk,del:So,emStrongLDelim:fk,emStrongRDelimAst:gk,emStrongRDelimUnd:yk,escape:ak,link:wk,nolink:Yf,punctuation:hk,reflink:Nf,reflinkSearch:Sk,tag:kk,text:lk,url:So},Tk={...qh,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",zs).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zs).getRegex()},Ah={...qh,emStrongRDelimAst:mk,emStrongLDelim:pk,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xf).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:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xf).getRegex()},Bk={...Ah,br:re(vf).replace("{2,}","*").getRegex(),text:re(Ah.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ns={normal:Ph,gfm:ok,pedantic:sk},bo={normal:qh,gfm:Ah,breaks:Bk,pedantic:Tk},_k={"&":"&","<":"<",">":">",'"':""","'":"'"},Cf=(r)=>_k[r];function Ge(r,e){if(e){if(ve.escapeTest.test(r))return r.replace(ve.escapeReplace,Cf)}else if(ve.escapeTestNoEncode.test(r))return r.replace(ve.escapeReplaceNoEncode,Cf);return r}function bf(r){try{r=encodeURI(r).replace(ve.percentDecode,"%")}catch{return null}return r}function kf(r,e){let i=r.replace(ve.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(ve.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(ve.slashPipe,"|");return s}function ko(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function vk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function wf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function Lk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
|
|
160
160
|
`).map((a)=>{let c=a.match(i.other.beginningSpace);if(c===null)return a;let[n]=c;return n.length>=o.length?a.slice(o.length):a}).join(`
|
|
161
161
|
`)}var Hs=class{options;rules;lexer;constructor(r){this.options=r||Mr}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ko(i,`
|
|
@@ -174,11 +174,11 @@ ${u}`:u;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
174
174
|
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),c=!1;for(;r;){let d=!1,f="",u="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;f=e[0],r=r.substring(f.length);let m=e[2].split(`
|
|
175
175
|
`,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),b=r.split(`
|
|
176
176
|
`,1)[0],k=!m.trim(),S=0;if(this.options.pedantic?(S=2,u=m.trimStart()):k?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,u=m.slice(S),S+=e[1].length),k&&this.rules.other.blankLine.test(b)&&(f+=b+`
|
|
177
|
-
`,r=r.substring(b.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),M=this.rules.other.fencesBeginRegex(S),I=this.rules.other.headingBeginRegex(S),O=this.rules.other.htmlBeginRegex(S);for(;r;){let
|
|
178
|
-
`,1)[0],
|
|
179
|
-
`+
|
|
180
|
-
`+b}!k&&!b.trim()&&(k=!0),f+=
|
|
181
|
-
`,r=r.substring(
|
|
177
|
+
`,r=r.substring(b.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),M=this.rules.other.fencesBeginRegex(S),I=this.rules.other.headingBeginRegex(S),O=this.rules.other.htmlBeginRegex(S);for(;r;){let G=r.split(`
|
|
178
|
+
`,1)[0],Z;if(b=G,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),Z=b):Z=b.replace(this.rules.other.tabCharGlobal," "),M.test(b)||I.test(b)||O.test(b)||_.test(b)||v.test(b))break;if(Z.search(this.rules.other.nonSpaceChar)>=S||!b.trim())u+=`
|
|
179
|
+
`+Z.slice(S);else{if(k||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(m)||I.test(m)||v.test(m))break;u+=`
|
|
180
|
+
`+b}!k&&!b.trim()&&(k=!0),f+=G+`
|
|
181
|
+
`,r=r.substring(G.length+1),m=Z.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(u),T&&(B=T[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!T,checked:B,loose:!1,text:u,tokens:[]}),o.raw+=f}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter((m)=>m.type==="space"),u=f.length>0&&f.some((m)=>this.rules.other.anyLine.test(m.raw));o.loose=u}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=kf(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
182
182
|
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?a.align.push("right"):this.rules.other.tableAlignCenter.test(c)?a.align.push("center"):this.rules.other.tableAlignLeft.test(c)?a.align.push("left"):a.align.push(null);for(let c=0;c<i.length;c++)a.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:a.align[c]});for(let c of o)a.rows.push(kf(c,a.header.length).map((n,d)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[d]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
|
|
183
183
|
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ko(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=vk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),wf(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return wf(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,m=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let k=m.slice(1,-1);return{type:"em",raw:m,text:k,tokens:this.lexer.inlineTokens(k)}}let b=m.slice(2,-2);return{type:"strong",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Pe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new Hs,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 i={other:ve,block:Ns.normal,inline:bo.normal};this.options.pedantic?(i.block=Ns.pedantic,i.inline=bo.pedantic):this.options.gfm&&(i.block=Ns.gfm,this.options.breaks?i.inline=bo.breaks:i.inline=bo.gfm),this.tokenizer.rules=i}static get rules(){return{block:Ns,inline:bo}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(ve.carriageReturn,`
|
|
184
184
|
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(ve.tabCharGlobal," ").replace(ve.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
|
|
@@ -226,16 +226,16 @@ ${o.join(`
|
|
|
226
226
|
`);return _p(s)}t(Vf,"preprocessMarkdown");function Zf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Zf,"nonMarkdownToLines");function Sp(r,e={}){let i=Vf(r,e),s=ie.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
|
|
227
227
|
`).forEach((u,m)=>{if(m!==0)a++,o.push([]);u.split(" ").forEach((b)=>{if(b=b.replace(/'/g,"'"),b)o[a].push({content:b,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Sp,"markdownToLines");function Qf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Qf,"nonMarkdownToHTML");function Jf(r,{markdownAutoWrap:e}={}){let i=ie.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g," ");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Jf,"markdownToHTML");var $k=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var m=!u?f:f.bind(u);return this.reads.push(m),o(this),m},"measure"),mutate:t(function(f,u){e("mutate");var m=!u?f:f.bind(u);return this.writes.push(m),o(this),m},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:m}=f,b;try{e("flushing reads",m.length),f.runTasks(m),e("flushing writes",u.length),f.runTasks(u)}catch(k){b=k}if(f.scheduled=!1,m.length||u.length)o(f);if(b)if(e("task errored",b.message),f.catch)f.catch(b);else throw b}t(a,"flush");function c(f,u){var m=f.indexOf(u);return!!~m&&!!f.splice(m,1)}t(c,"remove");function n(f,u){for(var m in u)if(u.hasOwnProperty(m))f[m]=u[m]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),Lp={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Hh(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Hh(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Hh(r,e,i,s){var{_tasks:o,fastdom:a}=r,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t(Hh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Lp,Ik=Lp,Ok=$k.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Ik),ur=Ok;function Fp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Fp,"splitTextToChars");function Mp(r,e){let i=Fp(e.content);return Uh(r,[],i,e.type)}t(Mp,"splitWordToFitWidth");function Uh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Uh(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Uh,"splitWordToFitWidthRecursion");function $p(r,e){if(r.some(({content:i})=>i.includes(`
|
|
228
228
|
`)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xs(r,e)}t($p,"splitLineToFitWidth");function Xs(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Xs(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=Mp(e,a);if(i.push([n]),d.content)r.unshift(d)}return Xs(r,e,i)}t(Xs,"splitLineToFitWidthRecursion");function Yh(r,e){if(e)r.attr("style",e)}t(Yh,"applyStyle");var Xf=16384;async function Op(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Xf)}px`),n.attr("height",`${Math.min(10*i,Xf)}px`);let d=n.append("xhtml:div"),f=It(e.label)?await $l(e.label.replace(x.lineBreakRegex,`
|
|
229
|
-
`),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Yh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Yh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let b=await ur.measure(()=>d.node().getBoundingClientRect());if(b.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(b.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(Op,"addHtmlSpan");function Gs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Gs,"createTspan");function Dp(r,e,i){let s=r.append("text"),o=Gs(s,1,e);Vs(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Dp,"computeWidthOfText");function qf(r,e,i){let s=r.append("text"),o=Gs(s,1,e);Vs(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(qf,"computeDimensionOfText");function Pp(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((k)=>Dp(c,1.1,k)<=r,"checkWidth"),b=m(u)?[u]:$p(u,m);for(let k of b){let S=Gs(d,f,1.1,o);Vs(S,k),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Pp,"createFormattedText");function jh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(jh,"decodeHTMLEntities");function Vs(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(jh(i.content));else o.text(" "+jh(i.content))})}t(Vs,"updateTextContentAndStyles");async function Rp(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Es(n))return await lr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Rp,"replaceIconSubstring");var on=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let b=c?Jf(e,m):Qf(e),k=await Rp($a(b),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:It(e)?S:k,labelStyle:i.replace("fill:","color:")};return await Op(r,T,d,o,u,m,f)}else{let b=$a(e.replace(/<br\s*\/?>/g,"<br/>")),k=c?Sp(b.replace("<br>","<br/>"),m):Zf(b),S=Pp(d,r,k,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var Pu=new Set(["redux-color","redux-dark-color"]),Dk=12,Pk=64,ft=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),Ze=t((r,e)=>r!=null&&Pu.has(r)&&ft(e),"isColorTheme"),Rk=/^[\w-]+$/,Xe=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Rk.test(e)?e:"classic"},"safeLook"),Ur=t((r)=>ft(r)?r.length:0,"paletteSlotCount"),Hn=t((r,e)=>{if(ft(e))return Ur(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Pk?r:Dk},"colorSlotCount"),Wn=t((r,e,i,s)=>{if(e===void 0||!Ze(i,s))return;let o=e%Ur(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Xh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function qk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Wk(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Xh(f,n,o);let d=function(f,u,m){let b=[];for(let v of f){let M=[...v];qk(M[0],M[M.length-1])||M.push([M[0][0],M[0][1]]),M.length>2&&b.push(M)}let k=[];u=Math.max(u,0.1);let S=[];for(let v of b)for(let M=0;M<v.length-1;M++){let I=v[M],O=v[M+1];if(I[1]!==O[1]){let X=Math.min(I[1],O[1]);S.push({ymin:X,ymax:Math.max(I[1],O[1]),x:X===I[1]?I[0]:O[0],islope:(O[0]-I[0])/(O[1]-I[1])})}}if(S.sort((v,M)=>v.ymin<M.ymin?-1:v.ymin>M.ymin?1:v.x<M.x?-1:v.x>M.x?1:v.ymax===M.ymax?0:(v.ymax-M.ymax)/Math.abs(v.ymax-M.ymax)),!S.length)return k;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let M=0;M<S.length&&!(S[M].ymin>B);M++)v=M;S.splice(0,v+1).forEach((M)=>{T.push({s:B,edge:M})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,M)=>v.edge.x===M.edge.x?0:(v.edge.x-M.edge.x)/Math.abs(v.edge.x-M.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let M=v+1;if(M>=T.length)break;let I=T[v].edge,O=T[M].edge;k.push([[Math.round(I.x),B],[Math.round(O.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return k}(c,a,s);if(o){for(let f of c)Xh(f,n,-o);(function(f,u,m){let b=[];f.forEach((k)=>b.push(...k)),Xh(b,u,m)})(d,n,-o)}return d}function Lo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Wk(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=Lo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function aa(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class Xp extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=Lo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Gp extends sa{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class Vp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Lo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,b=Math.min(c[0][1],c[1][1]);for(let k=0;k<f;k++){let S=b+u+k*s,T=m-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class Kp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Lo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let b=0;b<n;b++){let k=b*(i+s),S=k+i,T=[f[0]+k*Math.cos(m)+d*Math.cos(m),f[1]+k*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Zp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=Lo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,b=2*(u+1)*e,k=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+b*Math.cos(f),n[1]+b*Math.sin(f)],B=[S[0]+k*Math.cos(f+Math.PI/4),S[1]+k*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Le={};class Qp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Nk=0,Gh=1,qp=2,Ks={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 Vh(r,e){return r.type===e}function ec(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Nk,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Gh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:qp,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Vh(a,qp);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return ec("M0,0"+r);o++,c=Ks[a.text],s=a.text}else Vh(a,Gh)?c=Ks[s]:(o++,c=Ks[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Vh(f,Gh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Ks[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function Jp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function tg(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,b=0;i==="C"||i==="S"?(m=s+(s-n),b=o+(o-d)):(m=s,b=o),e.push({key:"C",data:[m,b,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,b]=u,k=0,S=0;i==="Q"||i==="T"?(k=s+(s-n),S=o+(o-d)):(k=s,S=o);let T=s+2*(k-s)/3,B=o+2*(S-o)/3,_=m+2*(k-m)/3,v=b+2*(S-b)/3;e.push({key:"C",data:[T,B,_,v,m,b]}),n=k,d=S,s=m,o=b;break}case"Q":{let[m,b,k,S]=u,T=s+2*(m-s)/3,B=o+2*(b-o)/3,_=k+2*(m-k)/3,v=S+2*(b-S)/3;e.push({key:"C",data:[T,B,_,v,k,S]}),n=m,d=b,s=k,o=S;break}case"A":{let m=Math.abs(u[0]),b=Math.abs(u[1]),k=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||b===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)eg(s,o,B,_,m,b,k,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function Bo(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function eg(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let b=[],k=0,S=0,T=0,B=0;if(f)[k,S,T,B]=f;else{[r,e]=Bo(r,e,-u),[i,s]=Bo(i,s,-u);let D=(r-i)/2,Y=(e-s)/2,et=D*D/(o*o)+Y*Y/(a*a);et>1&&(et=Math.sqrt(et),o*=et,a*=et);let W=o*o,nt=a*a,at=W*nt-W*Y*Y-nt*D*D,wt=W*Y*Y+nt*D*D,Tt=(n===d?-1:1)*Math.sqrt(Math.abs(at/wt));T=Tt*o*Y/a+(r+i)/2,B=Tt*-a*D/o+(e+s)/2,k=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(k=Math.PI-k),i<T&&(S=Math.PI-S),k<0&&(k=2*Math.PI+k),S<0&&(S=2*Math.PI+S),d&&k>S&&(k-=2*Math.PI),!d&&S>k&&(S-=2*Math.PI)}let _=S-k;if(Math.abs(_)>120*Math.PI/180){let D=S,Y=i,et=s;S=d&&S>k?k+120*Math.PI/180*1:k+120*Math.PI/180*-1,b=eg(i=T+o*Math.cos(S),s=B+a*Math.sin(S),Y,et,o,a,c,0,d,[S,D,T,B])}_=S-k;let v=Math.cos(k),M=Math.sin(k),I=Math.cos(S),O=Math.sin(S),X=Math.tan(_/4),G=1.3333333333333333*o*X,tt=1.3333333333333333*a*X,it=[r,e],ht=[r+G*M,e-tt*v],lt=[i+G*O,s-tt*I],st=[i,s];if(ht[0]=2*it[0]-ht[0],ht[1]=2*it[1]-ht[1],f)return[ht,lt,st].concat(b);{b=[ht,lt,st].concat(b);let D=[];for(let Y=0;Y<b.length;Y+=3){let et=Bo(b[Y][0],b[Y][1],u),W=Bo(b[Y+1][0],b[Y+1][1],u),nt=Bo(b[Y+2][0],b[Y+2][1],u);D.push([et[0],et[1],W[0],W[1],nt[0],nt[1]])}return D}}var zk={randOffset:function(r,e){return Yt(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=ig(i,s,o);return Qh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function rg(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?rg(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Hk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Wp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Zs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Zs(i[0],1.5*(1+0.22*e.roughness),Hp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Zs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Zs(c,1.5*(1+0.22*e.roughness),Hp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function ig(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Yt(c*d,i),n+=Yt(n*d,i),{increment:a,rx:c,ry:n}}function Qh(r,e,i,s){let[o,a]=Yp(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=Yp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function Np(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),b=Math.abs(s/2);m+=Yt(0.01*m,d),b+=Yt(0.01*b,d);let k=o,S=a;for(;k<0;)k+=2*Math.PI,S+=2*Math.PI;S-k>2*Math.PI&&(k=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-k)/2),_=jp(B,f,u,m,b,k,S,1,d);if(!d.disableMultiStroke){let v=jp(B,f,u,m,b,k,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(k),u+b*Math.sin(k),d),...br(f,u,f+m*Math.cos(S),u+b*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(k),u+b*Math.sin(k)]})),{type:"path",ops:_}}function zp(r,e){let i=tg(Jp(ec(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,b,k]=n;s.push(...Yk(d,f,u,m,b,k,a,e)),a=[b,k];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Kh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Yt(o,e),s[0][1]+Yt(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Yt(o,e),s[c][1]+Yt(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Le[o])switch(o){case"zigzag":Le[o]||(Le[o]=new Xp(s));break;case"cross-hatch":Le[o]||(Le[o]=new Gp(s));break;case"dots":Le[o]||(Le[o]=new Vp(s));break;case"dashed":Le[o]||(Le[o]=new Kp(s));break;case"zigzag-line":Le[o]||(Le[o]=new Zp(s));break;default:o="hachure",Le[o]||(Le[o]=new sa(s))}return Le[o]}(e,zk).fillPolygons(r,e)}function Hp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function og(r){return r.randomizer||(r.randomizer=new Qp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(og(i)*(e-r)+r)}function Yt(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Jh(r,e,i,s,o,!0,!1);if(c)return n;let d=Jh(r,e,i,s,o,!0,!0);return n.concat(d)}function Jh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,b=0.2+0.2*og(o),k=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;k=Yt(k,o,f),S=Yt(S,o,f);let T=[],B=()=>Yt(m,o,f),_=()=>Yt(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Yt(u,o,f)),e+(v?0:Yt(u,o,f))]})),c?T.push({op:"bcurveTo",data:[k+r+(i-r)*b+B(),S+e+(s-e)*b+B(),k+r+2*(i-r)*b+B(),S+e+2*(s-e)*b+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[k+r+(i-r)*b+_(),S+e+(s-e)*b+_(),k+r+2*(i-r)*b+_(),S+e+2*(s-e)*b+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Zs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Yt(e,i),r[0][1]+Yt(e,i)]),s.push([r[0][0]+Yt(e,i),r[0][1]+Yt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Yt(e,i),r[o][1]+Yt(e,i)]),o===r.length-1&&s.push([r[o][0]+Yt(e,i),r[o][1]+Yt(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Yt(n,i),e[1]+Yt(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Jh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function Yp(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Yt(0.5,n)-Math.PI/2;f.push([Yt(a,n)+e+0.9*s*Math.cos(u-r),Yt(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let b=u;b<m;b+=r){let k=[Yt(a,n)+e+s*Math.cos(b),Yt(a,n)+i+o*Math.sin(b)];d.push(k),f.push(k)}f.push([Yt(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Yt(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Yt(a,n)+e+0.98*s*Math.cos(u+c),Yt(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Yt(a,n)+e+0.9*s*Math.cos(u+0.5*c),Yt(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function jp(r,e,i,s,o,a,c,n,d){let f=a+Yt(0.1,d),u=[];u.push([Yt(n,d)+e+0.9*s*Math.cos(f-r),Yt(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Yt(n,d)+e+s*Math.cos(m),Yt(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Yk(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,b=n.preserveVertices;for(let k=0;k<m;k++)k===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(b?0:Yt(f[0],n)),c[1]+(b?0:Yt(f[0],n))]}),u=b?[o,a]:[o+Yt(f[k],n),a+Yt(f[k],n)],d.push({op:"bcurveTo",data:[r+Yt(f[k],n),e+Yt(f[k],n),i+Yt(f[k],n),s+Yt(f[k],n),u[0],u[1]]});return d}function _o(r){return[...r]}function Up(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(_o(r[0]),_o(r[1]),_o(r[2]),_o(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],c=1-e;s.push(_o(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function jk(r,e,i){let s=ea(e,i);if(s===0)return ea(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),ea(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function tc(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],b=n[d+3],k=3*u[0]-2*f[0]-b[0];k*=k;let S=3*u[1]-2*f[1]-b[1];S*=S;let T=3*m[0]-2*b[0]-f[0];T*=T;let B=3*m[1]-2*b[1]-f[1];return B*=B,k<T&&(k=T),S<B&&(S=B),k+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],b=Ar(d,f,0.5),k=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(b,k,0.5),B=Ar(k,S,0.5),_=Ar(T,B,0.5);tc([d,b,T,_],0,i,o),tc([_,B,S,m],0,i,o)}var a,c;return o}function Uk(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=jk(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Zh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)tc(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var Ae="none";class vo{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[rg(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Hk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Kh([d],a)):c.push(ui([d],a))}return a.stroke!==Ae&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=ig(i,s,a),d=Qh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Qh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==Ae&&c.push(d.opset),this._d("ellipse",c,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=Np(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let b=Np(r,e,i,s,o,a,!0,!1,m);b.type="fillPath",f.push(b)}else f.push(function(m,b,k,S,T,B,_){let v=m,M=b,I=Math.abs(k/2),O=Math.abs(S/2);I+=Yt(0.01*I,_),O+=Yt(0.01*O,_);let X=T,G=B;for(;X<0;)X+=2*Math.PI,G+=2*Math.PI;G-X>2*Math.PI&&(X=0,G=2*Math.PI);let tt=(G-X)/_.curveStepCount,it=[];for(let ht=X;ht<=G;ht+=tt)it.push([v+I*Math.cos(ht),M+O*Math.sin(ht)]);return it.push([v+I*Math.cos(G),M+O*Math.sin(G)]),it.push([v,M]),ui([it],_)}(r,e,i,s,o,a,d));return d.stroke!==Ae&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Wp(r,i);if(i.fill&&i.fill!==Ae)if(i.fillStyle==="solid"){let a=Wp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Zh(Up([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Zh(Up(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==Ae&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Kh([r],i)):s.push(ui([r],i))),i.stroke!==Ae&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Ae,a=i.stroke!==Ae,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let b=tg(Jp(ec(f))),k=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Zh(B,u)),B=[]},v=()=>{_(),S.length&&(k.push(S),S=[])};for(let{key:I,data:O}of b)switch(I){case"M":v(),T=[O[0],O[1]],S.push(T);break;case"L":_(),S.push([O[0],O[1]]);break;case"C":if(!B.length){let X=S.length?S[S.length-1]:T;B.push([X[0],X[1]])}B.push([O[0],O[1]]),B.push([O[2],O[3]]),B.push([O[4],O[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return k;let M=[];for(let I of k){let O=Uk(I,m);O.length&&M.push(O)}return M}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=zp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=zp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Kh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ae};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ae,strokeWidth:0,fill:i.fill||Ae};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Ae,strokeWidth:i,fill:Ae}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class sg{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new vo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Js="http://www.w3.org/2000/svg";class ag{constructor(r,e){this.svg=r,this.gen=new vo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,c,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Js,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new sg(r,e),svg:(r,e)=>new ag(r,e),generator:(r)=>new vo(r),newSeed:()=>vo.newSeed()};var Xk=1,Gk=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=V.fontSize]=_n(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===Gk)return r.textContent?.trim()!=="";if(r.nodeType!==Xk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var ng=3,Vk=32,Kk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",he(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),d=e.width?Math.max(e.width-2*(e.padding??0),Vk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),M=await on(v,ee($a(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(M).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(M).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),b=Math.max(...m.map(({box:_})=>_.width),0),k=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${b/2-v.x-v.width/2}, ${k-v.y})`),k+=v.height+ng;let S=m.length>0?k-ng:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-b/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),lg=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),Z=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Kk(r,e,i);let s,o=e.useHtmlLabels||Or(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",he(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await on(c,ee($a(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),b=(e?.padding??0)/2,k;if(o){let S=m.children[0],T=h(m);await fc(S),k=await ur.measure(()=>S.getBoundingClientRect()),k=lg(k,u),T.attr("width",k.width),T.attr("height",k.height)}else k=await ur.measure(()=>m.getBBox()),k=lg(k,u);if(o)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");else c.attr("transform","translate(0, "+-k.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:k,halfPadding:b,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??qt(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await on(o,ee($a(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(qt(p())){let d=a.children[0],f=h(a);n=await ur.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await ur.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:c,label:o}},"insertLabel"),H=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),At=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Jt(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Jt,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,b=e+f/2;for(let k=0;k<=50;k++){let S=k/50,T=r+S*d,B=b+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var Zk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=Zk;function Eg(r,e){return r.intersect(e)}t(Eg,"intersectNode");var Qk=Eg;function Ig(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ig,"intersectEllipse");var Dg=Ig;function Rg(r,e,i){return Dg(r,e,e,i)}t(Rg,"intersectCircle");var Jk=Rg;function Ng(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,b=s.x*i.y-i.x*s.y,k=u*r.x+m*r.y+b,S=u*e.x+m*e.y+b;if(Math.abs(k)<0.000001&&Math.abs(S)<0.000001&&cc(k,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*b-m*c)/T,_=(u*c-o*b)/T;return{x:B,y:_}}}t(Ng,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var t1=Ng;function Yg(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],b=e[u<e.length-1?u+1:0],k=t1(r,i,{x:d+m.x,y:f+m.y},{x:d+b.x,y:f+b.y});if(k)a.push(k)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let b=u.x-i.x,k=u.y-i.y,S=Math.sqrt(b*b+k*k),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Yg,"intersectPolygon");var e1=Yg,N={node:Qk,circle:Jk,ellipse:Dg,polygon:e1,rect:Je},Fe=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),r1=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=qt(c);return await on(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),qe=r1;function Xg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=At(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=St(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",he(n)),H(e,m),e.intersect=function(b){return l.info("Circle intersect",e,c,b),N.circle(e,c,b)},a}t(Xg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,b=(s-e)/2,k=m/o,S=b/a,T=Math.sqrt(k**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),M=Math.atan2((e-v)/a,(r-_)/o),O=Math.atan2((s-v)/a,(i-_)/o)-M;if(c&&O<0)O+=2*Math.PI;if(!c&&O>0)O-=2*Math.PI;let X=[];for(let G=0;G<20;G++){let tt=G/19,it=M+tt*O,ht=_+o*Math.cos(it),lt=v+a*Math.sin(it);X.push({x:ht,y:lt})}return X}t(uc,"generateArcPoints");function Zg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Zg,"calculateArcSagitta");async function Qg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((it)=>it+c,"calcTotalHeight"),d=t((it)=>{let ht=it/2;return[ht/(2.5+it/50),ht]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await Z(r,e,At(e)),m=n(e?.height?e?.height:u.height),[b,k]=d(m),S=Zg(m,b,k),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,M=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,b,k,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,b,k,!0)],I=y.svg(f),O=St(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let X=Jt(M),G=I.path(X,O),tt=f.insert(()=>G,":first-child");if(tt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")tt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(${b/2}, 0)`),H(e,tt),e.intersect=function(it){return N.polygon(e,M,it)},f}t(Qg,"bowTieRect");async function Jg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await Z(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),b=Math.max(c.height+f*2+m,e.height??0),k=-b/2+m,S=b/2,T=u*0.72,B=[`M${-u/2},${k}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${k}`,`A${u/2},${m} 0 0 0 ${-u/2},${k}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let tt=y.svg(a).path(B,St(e,{}));if(v.node()?.appendChild(tt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",k).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),H(e,v);let M=k+(S-k)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${M-c.height/2-(c.y-(c.top??0))})`);let I=12,O=t((G,tt,it)=>Array.from({length:I+1},(ht,lt)=>{let st=Math.PI-lt*Math.PI/I;return{x:G*Math.cos(st),y:tt+it*m*Math.sin(st)}}),"arc"),X=[...O(u/2,k,-1),...O(T/2,S,1).reverse()];return e.intersect=function(G){return N.polygon(e,X,G)},a}t(Jg,"bucket");var rc=20,ic=8,i1=80,o1=8;function tm(r){let{themeVariables:e}=p(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:o1,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(tm,"getCollapsedStyle");async function em(r,e){let i=tm(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await Z(r,e,At(e)),{theme:d,themeVariables:f}=p();Wn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,b=Math.max(n.width+u*2,i1,e?.width??0),k=Math.max(m+ic+rc+u*2,e?.height??0),S=-b/2,T=-k/2,B=-(ic+rc)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??qt(p()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let G=y.svg(c),tt=St(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),it=G.path(Fe(S,T,b,k,i.rx),tt);v=c.insert(()=>it,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",he(e.cssStyles))}else if(v=c.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",b).attr("height",k).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let M=T+u+m+ic;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",M).attr("x2",S+b-8).attr("y2",M).attr("stroke",o).attr("stroke-dasharray","3, 3");let I=M+rc/2,O=2.5,X=10;for(let G=-1;G<=1;G++)c.append("circle").attr("class","collapsed-indicator").attr("cx",G*X).attr("cy",I).attr("r",O).attr("fill",o);return H(e,v),e.calcIntersect=function(G,tt){return N.rect(G,tt)},e.intersect=function(G){return N.rect(e,G)},c}t(em,"collapsedGroup");function tr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(tr,"insertPolygonShape");var s1=["right","left","up","down"],gc="point",a1=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),n1=t((r)=>s1.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),hg={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},l1=t((r,e,i,s)=>{let o=a1(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=n1(o);return(hg[f]??hg[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function rm(r,e){let i=e,{shapeSvg:s,bbox:o}=await Z(r,i,At(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,b=l1(i.directions??[],o,i,m),k=tr(s,m,c,b);return k.attr("style",i.style??null),H(i,k),i.intersect=function(S){return N.polygon(i,b,S)},s}t(rm,"block_arrow");async function im(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await Z(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,b=Math.max(c.width+f*2,e.width??0,90),k=Math.max(c.height+f*2+u,e.height??0),S=-k/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let M=y.svg(a).path(Fe(-b/2,S,b,k,m),St(e,{}));if(B.node()?.appendChild(M),T)B.attr("style",T)}else B.append("rect").attr("x",-b/2).attr("y",S).attr("width",b).attr("height",k).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-b/2).attr("y1",S+u).attr("x2",b/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-b/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-b/2+44).attr("y",S+4).attr("width",Math.max(b-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),H(e,B);let _=S+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(im,"browser");var na=12;async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,b=f,k=-u,S=0,T=[{x:m+na,y:k},{x:b,y:k},{x:b,y:S},{x:m,y:S},{x:m,y:k+na},{x:m+na,y:k}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),M=St(e,{}),I=Jt(T),O=v.path(I,M);if(B=n.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return H(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(om,"card");function sm(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=St(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=Jt(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(b){return N.polygon(e,c,b)},s}t(sm,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await Z(r,e,At(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=St(e,{}),B=S.circle(0,0,m*2,T);b=a.insert(()=>B,":first-child"),b.attr("class","basic label-container").attr("style",he(k))}else b=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return H(e,b),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function am(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await Z(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,b=i.positioned?-u/2:-a.height/2-c;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",m).attr("y",b).attr("width",f).attr("height",u),H(i,n),i.intersect=function(k){return N.rect(i,k)},o}t(am,"composite");async function nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await Z(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,b=Math.max(c.width+f*2,e.width??0,90),k=Math.max(c.height+f*2+u,e.height??0),S=-k/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let M=y.svg(a).path(Fe(-b/2,S,b,k,m),St(e,{}));if(B.node()?.appendChild(M),T)B.attr("style",T)}else B.append("rect").attr("x",-b/2).attr("y",S).attr("width",b).attr("height",k).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-b/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),H(e,B);let _=S+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(nm,"consoleWindow");function lm(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
230
|
-
M ${o.x},${o.y} L ${c.x},${c.y}`}t(lm,"createLine");function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=St(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=lm(a),m=n.path(u,d),b=o.insert(()=>f,":first-child");if(b.insert(()=>m),b.attr("class","outer-path"),c&&e.look!=="handDrawn")b.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")b.selectAll("path").attr("style",s);return H(e,b),e.intersect=function(k){return l.info("crossedCircle intersect",e,{radius:a,point:k}),N.circle(e,a,k)},o}t(hm,"crossedCircle");function dr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(dr,"generateCirclePoints");async function cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...dr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...dr(f/2+m*2,-m,m,20,-180,-270),...dr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...dr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...dr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...dr(f/2+f*0.1,-m,m,20,-180,-270),...dr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...dr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=St(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Jt(k).replace("Z",""),M=T.path(v,B),I=Jt(S),O=T.path(I,{...B}),X=o.insert("g",":first-child");if(X.insert(()=>O,":first-child").attr("stroke-opacity",0),X.insert(()=>M,":first-child"),X.attr("class","text"),b&&e.look!=="handDrawn")X.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")X.selectAll("path").attr("style",s);return X.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,X),e.intersect=function(G){return N.polygon(e,S,G)},o}t(cm,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:k,y:S})}return c}t(fr,"generateCirclePoints");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=St(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Jt(k).replace("Z",""),M=T.path(v,B),I=Jt(S),O=T.path(I,{...B}),X=o.insert("g",":first-child");if(X.insert(()=>O,":first-child").attr("stroke-opacity",0),X.insert(()=>M,":first-child"),X.attr("class","text"),b&&e.look!=="handDrawn")X.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")X.selectAll("path").attr("style",s);return X.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,X),e.intersect=function(G){return N.polygon(e,S,G)},o}t(um,"curlyBraceRight");function be(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(be,"generateCirclePoints");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...be(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...be(f/2+m*2,-m,m,20,-180,-270),...be(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...be(f/2,u/2,m,20,0,90)],S=[...be(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...be(-f/2-m/2,-m,m,20,0,90),...be(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...be(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...be(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...be(f/2+m*2,-m,m,20,-180,-270),...be(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...be(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...be(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...be(-f/2-m/2,-m,m,20,0,90),...be(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...be(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=St(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let M=Jt(k).replace("Z",""),I=B.path(M,_),X=Jt(S).replace("Z",""),G=B.path(X,_),tt=Jt(T),it=B.path(tt,{..._}),ht=o.insert("g",":first-child");if(ht.insert(()=>it,":first-child").attr("stroke-opacity",0),ht.insert(()=>I,":first-child"),ht.insert(()=>G,":first-child"),ht.attr("class","text"),b&&e.look!=="handDrawn")ht.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,T,lt)},o}t(dm,"curlyBraces");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await Z(r,e,At(e)),m=Math.max(d,u.height+c*2,e?.height??0),b=m/2,k=b-Math.sqrt(Math.max(0,b**2-(u.height/2)**2)),S=Math.max(m/4,k),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=T,I=m,O=M-b,X=I/4,G=[{x:O,y:0},{x:X,y:0},{x:0,y:I/2},{x:X,y:I},{x:O,y:I},...Qe(-O,-I/2,b,50,270,90)],tt=Jt(G),it=_.path(tt,v),ht=f.insert(()=>it,":first-child");if(ht.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",s);return ht.attr("transform",`translate(${-T/2}, ${-m/2})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,G,lt)},f}t(fm,"curvedTrapezoid");async function pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),b=Math.min(d*0.177,m*0.45),k=m+2*f-u,S=-k/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let tt=y.svg(o),it=St(e,{}),ht=tt.path(Fe(-d/2,T,d,m,b),it),lt=tt.circle(0,S+f,f*2,it);if(B.insert(()=>lt,":first-child"),B.insert(()=>ht,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",b).attr("ry",b).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);H(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let M=S+f,I=Math.asin(Math.min(1,(T-M)/f))*180/Math.PI,O=24,G=[...Qe(0,-M,f,O,180+I,-I),...Qe(-(-d/2+b),-(T+b),b,12,90,0),...Qe(-(-d/2+b),-(k/2-b),b,12,360,270),...Qe(-(d/2-b),-(k/2-b),b,12,270,180),...Qe(-(d/2-b),-(T+b),b,12,180,90)];return e.intersect=function(tt){return N.polygon(e,G,tt)},o}t(pm,"person");var h1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),c1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),u1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),cg=8,ug=8;async function gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<cg)e.height=cg}let{shapeSvg:d,bbox:f,label:u}=await Z(r,e,At(e)),m=Math.max(e.width??0,f.width)+c,b=m/2,k=b/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+k,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=c1(0,0,m,S,b,k),M=u1(0,k,m,S,b,k),I=St(e,{}),O=_.path(v,I),X=_.path(M,St(e,{fill:"none"}));if(T=d.insert(()=>X,":first-child"),T=d.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=h1(0,0,m,S,b,k);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",he(B)).attr("style",s)}return T.attr("label-offset-y",k),T.attr("transform",`translate(${-m/2}, ${-(S/2+k)})`),H(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),M=v.x-(e.x??0);if(b!=0&&(Math.abs(M)<(e.width??0)/2||Math.abs(M)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-k)){let I=k*k*(1-M*M/(b*b));if(I>0)I=Math.sqrt(I);if(I=k-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},d}t(gm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await Z(r,e,At(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:b,ry:k}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)b=i.rx,k=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=St(e,{}),_=b||k?T.path(Fe(f,u,n,d,b||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",he(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",he(b)).attr("ry",he(k)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return H(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function mm(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let k=y.svg(f),S=St(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>k.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>k.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,b=(Number(u.attr("height"))||n)??0;if(m>0&&b>0)u.attr("stroke-dasharray",`${m} ${b}`);return f}t(mm,"datastore");async function ym(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await Z(r,e,At(e)),f=n.width+o,u=n.height+a,m=u*0.2,b=-f/2,k=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:b,y:k+m},{x:-b,y:k+m},{x:-b,y:-k},{x:b,y:-k},{x:b,y:k},{x:-b,y:k},{x:-b,y:k+m}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),M=c.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")M.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")M.selectAll("path").attr("style",s);return d.attr("transform",`translate(${b+(e.padding??0)/2-(n.x-(n.left??0))}, ${k+m+(e.padding??0)/2-(n.y-(n.top??0))})`),H(e,M),e.intersect=function(I){return N.rect(e,I)},c}t(ym,"dividedRectangle");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{roughness:0.2,strokeWidth:2.5}),B=St(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,m*2,T),v=S.circle(0,0,u*2,B);b=n.insert("g",":first-child"),b.attr("class",he(e.cssClasses)).attr("style",he(k)),b.node()?.appendChild(_),b.node()?.appendChild(v)}else{b=n.insert("g",":first-child");let S=b.insert("circle",":first-child"),T=b.insert("circle");b.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return H(e,b),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(xm,"doublecircle");async function Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await Z(r,e,At(e)),{theme:n,themeVariables:d}=p();Wn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=St(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(b=o.insert(()=>B,":first-child"),b.attr("class","basic label-container"),k)b.attr("style",k)}else b=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,H(e,b),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(Cm,"usecaseEllipse");function bm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=St(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),b=a.insert(()=>m,":first-child");if(b.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")b.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")b.selectAll("path").attr("style",o);return H(e,b),e.intersect=function(k){return l.info("filledCircle intersect",e,{radius:c,point:k}),N.circle(e,c,k)},a}t(bm,"filledCircle");var dg=10,fg=10;async function km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await Z(r,e,At(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,b=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:k}=e,S=y.svg(c),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=Jt(b),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(k&&e.look!=="handDrawn")v.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,H(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(M){return l.info("Triangle intersect",e,b,M),N.polygon(e,b,M)},c}t(km,"flippedTriangle");async function wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),b=m-u,k=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+k,y:S},{x:-d/2+k,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((I)=>`L${I.x},${I.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let O=y.svg(o).path(B,St(e,{}));if(v=o.insert(()=>O,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")H(e,v);else H(e,v,{width:d,height:m});let M=S+u+b/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${M-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(I){return N.polygon(e,T,I)},o}t(wm,"folder");function Sm(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,b=y.svg(c),k=St(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")k.roughness=0,k.fillStyle="solid";let S=b.rectangle(u,m,d,f,k),T=c.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);H(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return N.rect(e,_)},c}t(Sm,"forkJoin");async function Tm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await Z(r,e,At(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,b=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),k=(e?.width?e?.width:Math.max(o,f.width)+b*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-k/2,y:-u/2},{x:k/2-m,y:-u/2},...Qe(-k/2+m,0,m,50,90,270),{x:k/2-m,y:u/2},{x:-k/2,y:u/2}],v=Jt(_),M=T.path(v,B),I=d.insert(()=>M,":first-child");if(I.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")I.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return H(e,I),e.intersect=function(O){return l.info("Pill intersect",e,{radius:m,point:O}),N.polygon(e,_,O)},d}t(Tm,"halfRoundedRectangle");var d1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let M=(e.height??0)/o;e.width=(e?.width??0)-2*M-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await Z(r,e,At(e)),b=(e?.height?e?.height:m.height)+d,k=b/o,S=(e?.width?e?.width:m.width)+2*k+f,T=[{x:k,y:0},{x:S-k,y:0},{x:S,y:-b/2},{x:S-k,y:-b},{x:k,y:-b},{x:0,y:-b/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),M=St(e,{}),I=d1(0,0,S,b,k),O=v.path(I,M);if(B=u.insert(()=>O,":first-child").attr("transform",`translate(${-S/2}, ${b/2})`),_)B.attr("style",_)}else B=tr(u,S,b,T);if(s)B.attr("style",s);return e.width=S,e.height=b,H(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(Bm,"hexagon");async function _m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await Z(r,e,At(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=St(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=Jt(u),b=d.path(m,f),k=o.insert(()=>b,":first-child");if(k.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")k.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")k.selectChildren("path").attr("style",s);return k.attr("transform",`translate(${-a/2}, ${-c/2})`),H(e,k),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(_m,"hourglass");async function vm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await Z(r,e,"icon-shape default"),b=e.pos==="t",k=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ue(e),_=-S/2,v=-k/2,M=e.label?8:0,I=y.svg(f),O=St(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let X=I.rectangle(_,v,S,k,O),G=Math.max(S,u.width),tt=k+u.height+M,it=I.rectangle(-G/2,-tt/2,G,tt,{...O,fill:"transparent",stroke:"none"}),ht=f.insert(()=>X,":first-child"),lt=f.insert(()=>it);if(e.icon){let st=f.append("g");st.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let D=st.node().getBBox(),{width:Y,height:et,x:W,y:nt}=D;st.attr("transform",`translate(${-Y/2-W},${b?u.height/2+M/2-et/2-nt:-u.height/2-M/2-et/2-nt})`),st.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-tt/2:tt/2-u.height})`),ht.attr("transform",`translate(0,${b?u.height/2+M/2:-u.height/2-M/2})`),H(e,lt),e.intersect=function(st){if(l.info("iconSquare intersect",e,st),!e.label)return N.rect(e,st);let D=e.x??0,Y=e.y??0,et=e.height??0,W=[];if(b)W=[{x:D-u.width/2,y:Y-et/2},{x:D+u.width/2,y:Y-et/2},{x:D+u.width/2,y:Y-et/2+u.height+M},{x:D+S/2,y:Y-et/2+u.height+M},{x:D+S/2,y:Y+et/2},{x:D-S/2,y:Y+et/2},{x:D-S/2,y:Y-et/2+u.height+M},{x:D-u.width/2,y:Y-et/2+u.height+M}];else W=[{x:D-S/2,y:Y-et/2},{x:D+S/2,y:Y-et/2},{x:D+S/2,y:Y-et/2+k},{x:D+u.width/2,y:Y-et/2+k},{x:D+u.width/2/2,y:Y+et/2},{x:D-u.width/2,y:Y+et/2},{x:D-u.width/2,y:Y-et/2+k},{x:D-S/2,y:Y-et/2+k}];return N.polygon(e,W,st)},f}t(vm,"icon");async function Lm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await Z(r,e,"icon-shape default"),b=20,k=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ue(e),v=y.svg(f),M=St(e,{});if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let I=_.get("fill");M.stroke=I??B;let O=f.append("g");if(e.icon)O.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let X=O.node().getBBox(),{width:G,height:tt,x:it,y:ht}=X,lt=Math.max(G,tt)*Math.SQRT2+b*2,st=v.circle(0,0,lt,M),D=Math.max(lt,u.width),Y=lt+u.height+k,et=v.rectangle(-D/2,-Y/2,D,Y,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>st,":first-child"),nt=f.insert(()=>et);return O.attr("transform",`translate(${-G/2-it},${S?u.height/2+k/2-tt/2-ht:-u.height/2-k/2-tt/2-ht})`),O.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-Y/2:Y/2-u.height})`),W.attr("transform",`translate(0,${S?u.height/2+k/2:-u.height/2-k/2})`),H(e,nt),e.intersect=function(at){return l.info("iconSquare intersect",e,at),N.rect(e,at)},f}t(Lm,"iconCircle");async function Fm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:b}=await Z(r,e,"icon-shape default"),k=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ue(e),M=-T/2,I=-S/2,O=e.label?8:0,X=y.svg(f),G=St(e,{});if(e.look!=="handDrawn")G.roughness=0,G.fillStyle="solid";let tt=v.get("fill");G.stroke=tt??_;let it=X.path(Fe(M,I,T,S,5),G),ht=Math.max(T,u.width),lt=S+u.height+O,st=X.rectangle(-ht/2,-lt/2,ht,lt,{...G,fill:"transparent",stroke:"none"}),D=f.insert(()=>it,":first-child").attr("class","icon-shape2"),Y=f.insert(()=>st);if(e.icon){let et=f.append("g");et.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let W=et.node().getBBox(),{width:nt,height:at,x:wt,y:Tt}=W;et.attr("transform",`translate(${-nt/2-wt},${k?u.height/2+O/2-at/2-Tt:-u.height/2-O/2-at/2-Tt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return b.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-lt/2:lt/2-u.height})`),D.attr("transform",`translate(0,${k?u.height/2+O/2:-u.height/2-O/2})`),H(e,Y),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let W=e.x??0,nt=e.y??0,at=e.height??0,wt=[];if(k)wt=[{x:W-u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt+at/2},{x:W-T/2,y:nt+at/2},{x:W-T/2,y:nt-at/2+u.height+O},{x:W-u.width/2,y:nt-at/2+u.height+O}];else wt=[{x:W-T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2+S},{x:W+u.width/2,y:nt-at/2+S},{x:W+u.width/2/2,y:nt+at/2},{x:W-u.width/2,y:nt+at/2},{x:W-u.width/2,y:nt-at/2+S},{x:W-T/2,y:nt-at/2+S}];return N.polygon(e,wt,et)},f}t(Fm,"iconRounded");async function Mm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:b}=await Z(r,e,"icon-shape default"),k=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ue(e),M=-T/2,I=-S/2,O=e.label?8:0,X=y.svg(f),G=St(e,{});if(e.look!=="handDrawn")G.roughness=0,G.fillStyle="solid";let tt=v.get("fill");G.stroke=tt??_;let it=X.path(Fe(M,I,T,S,0.1),G),ht=Math.max(T,u.width),lt=S+u.height+O,st=X.rectangle(-ht/2,-lt/2,ht,lt,{...G,fill:"transparent",stroke:"none"}),D=f.insert(()=>it,":first-child"),Y=f.insert(()=>st);if(e.icon){let et=f.append("g");et.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let W=et.node().getBBox(),{width:nt,height:at,x:wt,y:Tt}=W;et.attr("transform",`translate(${-nt/2-wt},${k?u.height/2+O/2-at/2-Tt:-u.height/2-O/2-at/2-Tt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return b.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-lt/2:lt/2-u.height})`),D.attr("transform",`translate(0,${k?u.height/2+O/2:-u.height/2-O/2})`),H(e,Y),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let W=e.x??0,nt=e.y??0,at=e.height??0,wt=[];if(k)wt=[{x:W-u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt+at/2},{x:W-T/2,y:nt+at/2},{x:W-T/2,y:nt-at/2+u.height+O},{x:W-u.width/2,y:nt-at/2+u.height+O}];else wt=[{x:W-T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2+S},{x:W+u.width/2,y:nt-at/2+S},{x:W+u.width/2/2,y:nt+at/2},{x:W-u.width/2,y:nt+at/2},{x:W-u.width/2,y:nt-at/2+S},{x:W-T/2,y:nt-at/2+S}];return N.polygon(e,wt,et)},f}t(Mm,"iconSquare");async function Am(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:b,label:k}=await Z(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),M=St(e,{});if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let I=v.rectangle(T,B,f,u,M),O=Math.max(f,b.width),X=u+b.height+_,G=v.rectangle(-O/2,-X/2,O,X,{...M,fill:"none",stroke:"none"}),tt=m.insert(()=>I,":first-child"),it=m.insert(()=>G);if(e.img){let ht=m.append("image");ht.attr("href",e.img),ht.attr("width",f),ht.attr("height",u),ht.attr("preserveAspectRatio","none"),ht.attr("transform",`translate(${-f/2},${S?X/2-u:-X/2})`)}return k.attr("transform",`translate(${-b.width/2-(b.x-(b.left??0))},${S?-u/2-b.height/2-_/2:u/2-b.height/2+_/2})`),tt.attr("transform",`translate(0,${S?b.height/2+_/2:-b.height/2-_/2})`),H(e,it),e.intersect=function(ht){if(l.info("iconSquare intersect",e,ht),!e.label)return N.rect(e,ht);let lt=e.x??0,st=e.y??0,D=e.height??0,Y=[];if(S)Y=[{x:lt-b.width/2,y:st-D/2},{x:lt+b.width/2,y:st-D/2},{x:lt+b.width/2,y:st-D/2+b.height+_},{x:lt+f/2,y:st-D/2+b.height+_},{x:lt+f/2,y:st+D/2},{x:lt-f/2,y:st+D/2},{x:lt-f/2,y:st-D/2+b.height+_},{x:lt-b.width/2,y:st-D/2+b.height+_}];else Y=[{x:lt-f/2,y:st-D/2},{x:lt+f/2,y:st-D/2},{x:lt+f/2,y:st-D/2+u},{x:lt+b.width/2,y:st-D/2+u},{x:lt+b.width/2/2,y:st+D/2},{x:lt-b.width/2,y:st+D/2},{x:lt-b.width/2,y:st-D/2+u},{x:lt-f/2,y:st-D/2+u}];return N.polygon(e,Y,ht)},m}t(Am,"imageSquare");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Em,"inv_trapezoid");async function $m(r,e){let{shapeSvg:i,bbox:s,label:o}=await Z(r,e,"label"),a=i.insert("rect",":first-child"),c=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),H(e,a),e.intersect=function(d){return N.rect(e,d)},i}t($m,"labelRect");async function Im(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Im,"lean_left");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Om,"lean_right");function Dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=St(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let b=Jt(f),k=u.path(b,m),S=o.insert(()=>k,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${c/2},${-n})`),H(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Dm,"lightningBolt");var f1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),p1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),g1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let M=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-M*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await Z(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,b=m/(2.5+u/50),k=(e?.height?e?.height:d.height)+b+c*2,S=k*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=p1(0,0,u,k,m,b,S),M=g1(0,b,u,k,m,b),I=St(e,{}),O=_.path(v,I),X=_.path(M,I);if(n.insert(()=>X,":first-child").attr("class","line"),T=n.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=f1(0,0,u,k,m,b,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",he(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-u/2}, ${-(k/2+b)})`),H(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+b-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),M=v.x-(e.x??0);if(m!=0&&(Math.abs(M)<(e.width??0)/2||Math.abs(M)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let I=b*b*(1-M*M/(m*m));if(I>0)I=Math.sqrt(I);if(I=b-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},n}t(Pm,"linedCylinder");async function Rm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let I=e.width;if(e.width=(I??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await Z(r,e,At(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,b=e.look==="neo"?m/4:m/8,k=m+b,{cssStyles:S}=e,T=y.svg(n),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:k/2},...kr(-u/2-u/2*0.1,k/2,u/2+u/2*0.1,k/2,b,0.8),{x:u/2+u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2,y:-k/2},{x:-u/2,y:k/2*1.1},{x:-u/2,y:-k/2}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),M=n.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")M.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")M.selectAll("path").attr("style",s);return M.attr("transform",`translate(0,${-b/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-b-(d.y-(d.top??0))})`),H(e,M),e.intersect=function(I){return N.polygon(e,_,I)},n}t(Rm,"linedWaveEdgedRect");var m1=56,oc=72,mg=8,yg=2,y1=8,x1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,sc=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),C1={normal:sc(-24,12),hollow:sc(-23,9),awesome:sc(-21,13),icon:"M 12 -8 L 26 -26"},bg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),yc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,St(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),b1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,St(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var k1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",C1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Mo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await Z(r,c,At(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:b}=p();Wn(n,e.colorIndex,m,b.borderColorArray);let k,S;if(e.stereotype){let tt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});k=tt.label.attr("class","label usecase-stereotype"),S=tt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${x1[i]}`).attr("style",a||null);await s(T,e),k1(T,e,i);let B=e.padding??y1,_=S?.height??0,v=oc+mg+d.height+(S?_+yg:0),M=Math.max(m1,d.width,S?.width??0)+B*2,I=v+B*2,O=-v/2;T.attr("transform",`translate(0,${O+oc/2})`);let X=O+oc+mg;if(k&&S)X+=_/2,bg(k,S,X),X+=_/2+yg;bg(f,d,X+d.height/2);let G=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-M/2).attr("y",-I/2).attr("width",M).attr("height",I).attr("opacity",0).attr("aria-hidden","true");return H(e,G),e.intersect=(tt)=>N.rect(e,tt),n}t(Mo,"renderUsecaseActor");var w1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function qm(r,e){return Mo(r,e,"normal",(i,s)=>{yc(i,s,w1,"usecase-actor-stick")})}t(qm,"usecaseActor");var S1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Wm(r,e){return Mo(r,e,"awesome",(i,s)=>{yc(i,s,S1,"usecase-actor-awesome-silhouette")})}t(Wm,"usecaseActorAwesome");var T1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Nm(r,e){return Mo(r,e,"hollow",(i,s)=>{b1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,T1,"usecase-actor-hollow-body",!0)})}t(Nm,"usecaseActorHollow");var di=52,kg=42,wg=-2,B1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,St(e,{}));r.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Es(o.includes(":")?o:`fa:${o}`),c=await lr(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function zm(r,e){return Mo(r,e,"icon",B1)}t(zm,"usecaseActorIcon");var Sg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Hm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await Z(r,a,At(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Wn(c,e.colorIndex,u,m.borderColorArray);let b,k;if(i.stereotype){let D=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=D.label.attr("class","label usecase-stereotype"),k=D.bbox}let S=k?2:0,T=n.height+(k?.height??0)+S,B=Math.max(n.width,k?.width??0),_=d??10,v=B/2+_*2,M=T/2+_*2,I=Math.min(Math.max(_/5,1),_/2),O=B/2+I,X=v-I,G=O/v,tt=X/v,it=M*Math.sqrt(Math.max(0,1-G*G)),ht=-M*Math.sqrt(Math.max(0,1-tt*tt));if(b&&k)Sg(b,k,-T/2+k.height/2);Sg(f,n,T/2-n.height/2);let lt;if(e.look==="handDrawn"){let Y=y.svg(c).ellipse(0,0,v*2,M*2,St(e,{}));lt=c.insert(()=>Y,":first-child").attr("class","basic label-container usecase-business-ellipse")}else lt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",M).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${O} ${it} L ${X} ${ht}`).attr("fill","none").attr("style",o||null);let st=i.accessibleName??i.label;if(st)c.attr("role","img").attr("aria-label",st);return H(e,lt),e.calcIntersect=(D,Y)=>N.ellipse(D,D.width/2,D.height/2,Y),e.intersect=(D)=>N.ellipse(e,v,M,D),c}t(Hm,"usecaseBusiness");var ac=8,Tg=4,_1=1,nc=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),v1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:_1},"numericStrokeWidth");async function Ym(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ue(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await Z(r,e,At(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let D of i.jsonRows??[]){let Y=await Ir(f,D.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),et=await Ir(f,D.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:Y.label.attr("class","label usecase-json-key"),bbox:Y.bbox},value:{label:et.label.attr("class","label usecase-json-value"),bbox:et.bbox}})}let m=Math.max(0,...u.map(({key:D})=>D.bbox.width))+ac*2,b=Math.max(0,...u.map(({value:D})=>D.bbox.width))+ac*2,k=n.width+ac*2,S=Math.max(k,m+b),T=b+Math.max(0,S-m-b),B=n.height+Tg*2,_=u.map(({key:D,value:Y})=>Math.max(D.bbox.height,Y.bbox.height)+Tg*2),v=B+_.reduce((D,Y)=>D+Y,0),M=v1(a.get("stroke-width")),I=S+M*2,O=v+M*2,X=-S/2,G=-v/2,tt=e.look==="handDrawn"?y.svg(c):void 0,it=tt?St(e,{}):void 0,ht=t((D,Y,et,W,nt,at)=>{if(tt&&it){let wt=tt.rectangle(et,W,nt,at,it);return D.insert(()=>wt,":first-child").attr("class",Y)}return D.insert("rect",":first-child").attr("class",Y).attr("x",et).attr("y",W).attr("width",nt).attr("height",at).attr("style",o)},"insertCell"),lt=ht(c,"label-container usecase-json-border",-I/2,-O/2,I,O);ht(f,"usecase-json-cell usecase-json-title-cell",X,G,S,B),f.node()?.append(d.node()),nc(d,n,0,G+B/2);let st=G+B;return u.forEach(({key:D,value:Y},et)=>{let W=_[et],nt=f.append("g").attr("class","usecase-json-row").attr("data-row-index",et).attr("transform",`translate(0,${st})`);ht(nt,"usecase-json-cell usecase-json-key-cell",X,0,m,W),ht(nt,"usecase-json-cell usecase-json-value-cell",X+m,0,T,W),nt.node()?.append(D.label.node(),Y.label.node()),nc(D.label,D.bbox,X+m/2,W/2),nc(Y.label,Y.bbox,X+m+T/2,W/2),st+=W}),H(e,lt),e.intersect=(D)=>N.rect(e,D),c}t(Ym,"usecaseJsonTable");async function jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await Z(r,e,At(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,b=(e?.height?e?.height:f.height)+c*2+2*n,k=m-2*n,S=b-2*n,T=-k/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),M=St(e,{}),I=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+k-n,y:B+S+n},{x:T+k-n,y:B+S},{x:T+k,y:B+S},{x:T+k,y:B+S-n},{x:T+k+n,y:B+S-n},{x:T+k+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],O=[{x:T,y:B+n},{x:T+k-n,y:B+n},{x:T+k-n,y:B+S},{x:T+k,y:B+S},{x:T+k,y:B},{x:T,y:B}];if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let X=Jt(I),G=v.path(X,M),tt=Jt(O),it=v.path(tt,M);if(e.look!=="handDrawn")G=hc(G),it=hc(it);let ht=d.insert("g",":first-child");if(ht.insert(()=>G),ht.insert(()=>it),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,I,lt)},d}t(jm,"multiRect");async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,b=Math.max(a.height,e?.height??0)+f*3,k=e.look==="neo"?b/4:b/8,S=b+(u?k/2:-k/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,M=kr(T-_,B+S+_,T+m-_,B+S+_,k,0.8),I=M?.[M.length-1],O=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...M,{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:I.y-2*_},{x:T+m+_,y:I.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],X=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:B},{x:T,y:B}],G=y.svg(o),tt=St(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=Jt(O),ht=G.path(it,tt),lt=Jt(X),st=G.path(lt,tt),D=o.insert(()=>ht,":first-child");if(D.insert(()=>st),D.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")D.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return D.attr("transform",`translate(0,${-k/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-k-(a.y-(a.top??0))})`),H(e,D),e.intersect=function(Y){return N.polygon(e,O,Y)},o}t(Um,"multiWaveEdgedRectangle");async function Xm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||qt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await Z(r,e,At(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,b=-u/2,{cssStyles:k}=e,S=y.svg(c),T=St(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,b,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),k&&e.look!=="handDrawn")_.selectAll("path").attr("style",k);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),H(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Xm,"note");var L1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await Z(r,e,At(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:b}=e;if(e.look==="handDrawn"){let k=y.svg(o),S=St(e,{}),T=L1(0,0,d),B=k.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),b)m.attr("style",b)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return H(e,m),e.calcIntersect=function(k,S){let T=k.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(k,B,S)},e.intersect=function(k){return this.calcIntersect(e,k)},o}t(Gm,"question");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await Z(r,e,At(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),b=m/4,S=-Math.max(u,(e.width??0)-b)/2,T=-m/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,M=y.svg(n),I=St(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=Jt(_),X=M.path(O,I),G=n.insert(()=>X,":first-child");if(G.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")G.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.attr("transform",`translate(${-B/2},0)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),H(e,G),e.intersect=function(tt){return N.polygon(e,_,tt)},n}t(Vm,"rect_left_inv_arrow");async function Km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await qe(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(qt(p())){let tt=u.children[0],it=h(u);m=tt.getBoundingClientRect(),it.attr("width",m.width),it.attr("height",m.height)}l.info("Text 2",d);let b=d||[],k=u.getBBox(),S=await qe(n,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>k.width?0:(k.width-m.width)/2)+", "+(k.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<k.width?0:-(k.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),M=m.height+(e.padding||0),I=-m.width/2-_,O=-m.height/2-_,X,G;if(e.look==="handDrawn"){let tt=y.svg(a),it=St(e,{}),ht=tt.path(Fe(I,O,v,M,e.rx||0),it),lt=tt.line(-m.width/2-_,-m.height/2-_+k.height+_,m.width/2+_,-m.height/2-_+k.height+_,it);G=a.insert(()=>(l.debug("Rough node insert CXC",ht),lt),":first-child"),X=a.insert(()=>(l.debug("Rough node insert CXC",ht),ht),":first-child")}else X=c.insert("rect",":first-child"),G=c.insert("line"),X.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),G.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+k.height+_).attr("y2",-m.height/2-_+k.height+_);return H(e,X),e.intersect=function(tt){return N.rect(e,tt)},a}t(Km,"rectWithTitle");async function Zm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return mi(r,e,o)}t(Zm,"roundedRect");var Er=8;async function Qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await Z(r,e,At(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,b=u,k=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=St(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:k,y:S},{x:k+m,y:S},{x:k+m,y:S+b},{x:k-Er,y:S+b},{x:k-Er,y:S},{x:k,y:S},{x:k,y:S+b}],M=B.polygon(v.map((O)=>[O.x,O.y]),_),I=c.insert(()=>M,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",he(T)),s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),H(e,I),e.intersect=function(O){return N.rect(e,O)},c}t(Qm,"shadedProcess");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await Z(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,b=u,k=m/1.5,S=-b/2,T=-k/2,{cssStyles:B}=e,_=y.svg(n),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=[{x:S,y:T},{x:S,y:T+k},{x:S+b,y:T+k},{x:S+b,y:T-k/2}],I=Jt(M),O=_.path(I,v),X=n.insert(()=>O,":first-child");if(X.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")X.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return X.attr("transform",`translate(0, ${k/4})`),f.attr("transform",`translate(${-b/2+(e.padding??0)-(d.x-(d.left??0))}, ${-k/4+(e.padding??0)-(d.y-(d.top??0))})`),H(e,X),e.intersect=function(G){return N.polygon(e,M,G)},n}t(Jm,"slopedRect");async function ty(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Wn(c,e.colorIndex,n,d.borderColorArray)}return c}t(ty,"squareRect");var dc=50,F1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),{w:f,h:u}=F1(d,a,c),m=u/2,{cssStyles:b}=e,k=y.svg(n),S=St(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=Jt(T),_=k.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return H(e,v),e.intersect=function(M){return N.polygon(e,T,M)},n}t(ey,"stadium");async function ry(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(ry,"state");function iy(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),b=St(e,{});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let k=m.circle(0,0,e.width,{...b,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...b,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>k,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",M=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${M})`)}return H(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(iy,"stateEnd");function oy(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return H(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(oy,"stateStart");var fi=8;async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,b=u,k=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-b},{x:0,y:-b},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-b},{x:-8,y:-b},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=St(e,{}),v=B.rectangle(k,S,m+16,b,_),M=B.line(k+fi,S,k+fi,S+b,_),I=B.line(k+fi+m,S,k+fi+m,S+b,_);n.insert(()=>M,":first-child"),n.insert(()=>I,":first-child");let O=n.insert(()=>v,":first-child"),{cssStyles:X}=e;O.attr("class","basic label-container").attr("style",he(X)),H(e,O)}else{let B=tr(n,m,b,T);if(s)B.attr("style",s);H(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(sy,"subroutine");var lc=0.2;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-lc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await Z(r,e,At(e)),f=(e?.height?e?.height:d.height)+c*2,u=lc*f,m=lc*f,k=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-k/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),M=St(e,{}),I=[{x:T-u/2,y:B},{x:T+k+u/2,y:B},{x:T+k+u/2,y:B+S},{x:T-u/2,y:B+S}],O=[{x:T+k-u/2,y:B+S},{x:T+k+u/2,y:B+S},{x:T+k+u/2,y:B+S-m}];if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let X=Jt(I),G=v.path(X,M),tt=Jt(O),it=v.path(tt,{...M,fillStyle:"solid"}),ht=n.insert(()=>it,":first-child");if(ht.insert(()=>G,":first-child"),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return H(e,ht),e.intersect=function(lt){return N.polygon(e,I,lt)},n}t(ay,"taggedRect");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await Z(r,e,At(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,b=d+f,{cssStyles:k}=e,S=y.svg(o),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:b/2},...kr(-n/2-n/2*0.1,b/2,n/2+n/2*0.1,b/2,f,0.8),{x:n/2+n/2*0.1,y:-b/2},{x:-n/2-n/2*0.1,y:-b/2}],_=-n/2+n/2*0.1,v=-b/2-m*0.4,M=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],I=Jt(B),O=S.path(I,T),X=Jt(M),G=S.path(X,{...T,fillStyle:"solid"}),tt=o.insert(()=>G,":first-child");if(tt.insert(()=>O,":first-child"),tt.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")tt.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),H(e,tt),e.intersect=function(it){return N.polygon(e,B,it)},o}t(ny,"taggedWaveEdgedRectangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await Z(r,e,At(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),H(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(ly,"text");var M1=t((r,e,i,s,o,a)=>`M${r},${e}
|
|
229
|
+
`),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Yh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Yh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let b=await ur.measure(()=>d.node().getBoundingClientRect());if(b.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(b.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(Op,"addHtmlSpan");function Gs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Gs,"createTspan");function Dp(r,e,i){let s=r.append("text"),o=Gs(s,1,e);Vs(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Dp,"computeWidthOfText");function qf(r,e,i){let s=r.append("text"),o=Gs(s,1,e);Vs(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(qf,"computeDimensionOfText");function Pp(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((k)=>Dp(c,1.1,k)<=r,"checkWidth"),b=m(u)?[u]:$p(u,m);for(let k of b){let S=Gs(d,f,1.1,o);Vs(S,k),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Pp,"createFormattedText");function jh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(jh,"decodeHTMLEntities");function Vs(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(jh(i.content));else o.text(" "+jh(i.content))})}t(Vs,"updateTextContentAndStyles");async function Rp(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Es(n))return await lr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Rp,"replaceIconSubstring");var on=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let b=c?Jf(e,m):Qf(e),k=await Rp($a(b),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:It(e)?S:k,labelStyle:i.replace("fill:","color:")};return await Op(r,T,d,o,u,m,f)}else{let b=$a(e.replace(/<br\s*\/?>/g,"<br/>")),k=c?Sp(b.replace("<br>","<br/>"),m):Zf(b),S=Pp(d,r,k,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var Pu=new Set(["redux-color","redux-dark-color"]),Dk=12,Pk=64,ft=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),Ze=t((r,e)=>r!=null&&Pu.has(r)&&ft(e),"isColorTheme"),Rk=/^[\w-]+$/,Xe=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Rk.test(e)?e:"classic"},"safeLook"),Ur=t((r)=>ft(r)?r.length:0,"paletteSlotCount"),Hn=t((r,e)=>{if(ft(e))return Ur(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Pk?r:Dk},"colorSlotCount"),Wn=t((r,e,i,s)=>{if(e===void 0||!Ze(i,s))return;let o=e%Ur(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Xh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function qk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Wk(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Xh(f,n,o);let d=function(f,u,m){let b=[];for(let v of f){let M=[...v];qk(M[0],M[M.length-1])||M.push([M[0][0],M[0][1]]),M.length>2&&b.push(M)}let k=[];u=Math.max(u,0.1);let S=[];for(let v of b)for(let M=0;M<v.length-1;M++){let I=v[M],O=v[M+1];if(I[1]!==O[1]){let G=Math.min(I[1],O[1]);S.push({ymin:G,ymax:Math.max(I[1],O[1]),x:G===I[1]?I[0]:O[0],islope:(O[0]-I[0])/(O[1]-I[1])})}}if(S.sort((v,M)=>v.ymin<M.ymin?-1:v.ymin>M.ymin?1:v.x<M.x?-1:v.x>M.x?1:v.ymax===M.ymax?0:(v.ymax-M.ymax)/Math.abs(v.ymax-M.ymax)),!S.length)return k;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let M=0;M<S.length&&!(S[M].ymin>B);M++)v=M;S.splice(0,v+1).forEach((M)=>{T.push({s:B,edge:M})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,M)=>v.edge.x===M.edge.x?0:(v.edge.x-M.edge.x)/Math.abs(v.edge.x-M.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let M=v+1;if(M>=T.length)break;let I=T[v].edge,O=T[M].edge;k.push([[Math.round(I.x),B],[Math.round(O.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return k}(c,a,s);if(o){for(let f of c)Xh(f,n,-o);(function(f,u,m){let b=[];f.forEach((k)=>b.push(...k)),Xh(b,u,m)})(d,n,-o)}return d}function Lo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Wk(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=Lo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function aa(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class Xp extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=Lo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Gp extends sa{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class Vp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Lo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,b=Math.min(c[0][1],c[1][1]);for(let k=0;k<f;k++){let S=b+u+k*s,T=m-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class Kp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Lo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let b=0;b<n;b++){let k=b*(i+s),S=k+i,T=[f[0]+k*Math.cos(m)+d*Math.cos(m),f[1]+k*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Zp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=Lo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,b=2*(u+1)*e,k=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+b*Math.cos(f),n[1]+b*Math.sin(f)],B=[S[0]+k*Math.cos(f+Math.PI/4),S[1]+k*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Le={};class Qp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Nk=0,Gh=1,qp=2,Ks={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 Vh(r,e){return r.type===e}function ec(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Nk,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Gh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:qp,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Vh(a,qp);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return ec("M0,0"+r);o++,c=Ks[a.text],s=a.text}else Vh(a,Gh)?c=Ks[s]:(o++,c=Ks[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Vh(f,Gh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Ks[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function Jp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function tg(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,b=0;i==="C"||i==="S"?(m=s+(s-n),b=o+(o-d)):(m=s,b=o),e.push({key:"C",data:[m,b,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,b]=u,k=0,S=0;i==="Q"||i==="T"?(k=s+(s-n),S=o+(o-d)):(k=s,S=o);let T=s+2*(k-s)/3,B=o+2*(S-o)/3,_=m+2*(k-m)/3,v=b+2*(S-b)/3;e.push({key:"C",data:[T,B,_,v,m,b]}),n=k,d=S,s=m,o=b;break}case"Q":{let[m,b,k,S]=u,T=s+2*(m-s)/3,B=o+2*(b-o)/3,_=k+2*(m-k)/3,v=S+2*(b-S)/3;e.push({key:"C",data:[T,B,_,v,k,S]}),n=m,d=b,s=k,o=S;break}case"A":{let m=Math.abs(u[0]),b=Math.abs(u[1]),k=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||b===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)eg(s,o,B,_,m,b,k,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function Bo(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function eg(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let b=[],k=0,S=0,T=0,B=0;if(f)[k,S,T,B]=f;else{[r,e]=Bo(r,e,-u),[i,s]=Bo(i,s,-u);let D=(r-i)/2,Y=(e-s)/2,et=D*D/(o*o)+Y*Y/(a*a);et>1&&(et=Math.sqrt(et),o*=et,a*=et);let W=o*o,nt=a*a,at=W*nt-W*Y*Y-nt*D*D,wt=W*Y*Y+nt*D*D,Tt=(n===d?-1:1)*Math.sqrt(Math.abs(at/wt));T=Tt*o*Y/a+(r+i)/2,B=Tt*-a*D/o+(e+s)/2,k=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(k=Math.PI-k),i<T&&(S=Math.PI-S),k<0&&(k=2*Math.PI+k),S<0&&(S=2*Math.PI+S),d&&k>S&&(k-=2*Math.PI),!d&&S>k&&(S-=2*Math.PI)}let _=S-k;if(Math.abs(_)>120*Math.PI/180){let D=S,Y=i,et=s;S=d&&S>k?k+120*Math.PI/180*1:k+120*Math.PI/180*-1,b=eg(i=T+o*Math.cos(S),s=B+a*Math.sin(S),Y,et,o,a,c,0,d,[S,D,T,B])}_=S-k;let v=Math.cos(k),M=Math.sin(k),I=Math.cos(S),O=Math.sin(S),G=Math.tan(_/4),Z=1.3333333333333333*o*G,tt=1.3333333333333333*a*G,it=[r,e],ht=[r+Z*M,e-tt*v],lt=[i+Z*O,s-tt*I],st=[i,s];if(ht[0]=2*it[0]-ht[0],ht[1]=2*it[1]-ht[1],f)return[ht,lt,st].concat(b);{b=[ht,lt,st].concat(b);let D=[];for(let Y=0;Y<b.length;Y+=3){let et=Bo(b[Y][0],b[Y][1],u),W=Bo(b[Y+1][0],b[Y+1][1],u),nt=Bo(b[Y+2][0],b[Y+2][1],u);D.push([et[0],et[1],W[0],W[1],nt[0],nt[1]])}return D}}var zk={randOffset:function(r,e){return Yt(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=ig(i,s,o);return Qh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function rg(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?rg(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Hk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Wp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Zs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Zs(i[0],1.5*(1+0.22*e.roughness),Hp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Zs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Zs(c,1.5*(1+0.22*e.roughness),Hp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function ig(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Yt(c*d,i),n+=Yt(n*d,i),{increment:a,rx:c,ry:n}}function Qh(r,e,i,s){let[o,a]=Yp(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=Yp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function Np(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),b=Math.abs(s/2);m+=Yt(0.01*m,d),b+=Yt(0.01*b,d);let k=o,S=a;for(;k<0;)k+=2*Math.PI,S+=2*Math.PI;S-k>2*Math.PI&&(k=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-k)/2),_=jp(B,f,u,m,b,k,S,1,d);if(!d.disableMultiStroke){let v=jp(B,f,u,m,b,k,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(k),u+b*Math.sin(k),d),...br(f,u,f+m*Math.cos(S),u+b*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(k),u+b*Math.sin(k)]})),{type:"path",ops:_}}function zp(r,e){let i=tg(Jp(ec(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,b,k]=n;s.push(...Yk(d,f,u,m,b,k,a,e)),a=[b,k];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Kh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Yt(o,e),s[0][1]+Yt(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Yt(o,e),s[c][1]+Yt(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Le[o])switch(o){case"zigzag":Le[o]||(Le[o]=new Xp(s));break;case"cross-hatch":Le[o]||(Le[o]=new Gp(s));break;case"dots":Le[o]||(Le[o]=new Vp(s));break;case"dashed":Le[o]||(Le[o]=new Kp(s));break;case"zigzag-line":Le[o]||(Le[o]=new Zp(s));break;default:o="hachure",Le[o]||(Le[o]=new sa(s))}return Le[o]}(e,zk).fillPolygons(r,e)}function Hp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function og(r){return r.randomizer||(r.randomizer=new Qp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(og(i)*(e-r)+r)}function Yt(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Jh(r,e,i,s,o,!0,!1);if(c)return n;let d=Jh(r,e,i,s,o,!0,!0);return n.concat(d)}function Jh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,b=0.2+0.2*og(o),k=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;k=Yt(k,o,f),S=Yt(S,o,f);let T=[],B=()=>Yt(m,o,f),_=()=>Yt(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Yt(u,o,f)),e+(v?0:Yt(u,o,f))]})),c?T.push({op:"bcurveTo",data:[k+r+(i-r)*b+B(),S+e+(s-e)*b+B(),k+r+2*(i-r)*b+B(),S+e+2*(s-e)*b+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[k+r+(i-r)*b+_(),S+e+(s-e)*b+_(),k+r+2*(i-r)*b+_(),S+e+2*(s-e)*b+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Zs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Yt(e,i),r[0][1]+Yt(e,i)]),s.push([r[0][0]+Yt(e,i),r[0][1]+Yt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Yt(e,i),r[o][1]+Yt(e,i)]),o===r.length-1&&s.push([r[o][0]+Yt(e,i),r[o][1]+Yt(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Yt(n,i),e[1]+Yt(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Jh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function Yp(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Yt(0.5,n)-Math.PI/2;f.push([Yt(a,n)+e+0.9*s*Math.cos(u-r),Yt(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let b=u;b<m;b+=r){let k=[Yt(a,n)+e+s*Math.cos(b),Yt(a,n)+i+o*Math.sin(b)];d.push(k),f.push(k)}f.push([Yt(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Yt(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Yt(a,n)+e+0.98*s*Math.cos(u+c),Yt(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Yt(a,n)+e+0.9*s*Math.cos(u+0.5*c),Yt(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function jp(r,e,i,s,o,a,c,n,d){let f=a+Yt(0.1,d),u=[];u.push([Yt(n,d)+e+0.9*s*Math.cos(f-r),Yt(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Yt(n,d)+e+s*Math.cos(m),Yt(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Yk(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,b=n.preserveVertices;for(let k=0;k<m;k++)k===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(b?0:Yt(f[0],n)),c[1]+(b?0:Yt(f[0],n))]}),u=b?[o,a]:[o+Yt(f[k],n),a+Yt(f[k],n)],d.push({op:"bcurveTo",data:[r+Yt(f[k],n),e+Yt(f[k],n),i+Yt(f[k],n),s+Yt(f[k],n),u[0],u[1]]});return d}function _o(r){return[...r]}function Up(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(_o(r[0]),_o(r[1]),_o(r[2]),_o(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],c=1-e;s.push(_o(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function jk(r,e,i){let s=ea(e,i);if(s===0)return ea(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),ea(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function tc(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],b=n[d+3],k=3*u[0]-2*f[0]-b[0];k*=k;let S=3*u[1]-2*f[1]-b[1];S*=S;let T=3*m[0]-2*b[0]-f[0];T*=T;let B=3*m[1]-2*b[1]-f[1];return B*=B,k<T&&(k=T),S<B&&(S=B),k+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],b=Ar(d,f,0.5),k=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(b,k,0.5),B=Ar(k,S,0.5),_=Ar(T,B,0.5);tc([d,b,T,_],0,i,o),tc([_,B,S,m],0,i,o)}var a,c;return o}function Uk(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=jk(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Zh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)tc(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var Ae="none";class vo{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[rg(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Hk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Kh([d],a)):c.push(ui([d],a))}return a.stroke!==Ae&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=ig(i,s,a),d=Qh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Qh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==Ae&&c.push(d.opset),this._d("ellipse",c,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=Np(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let b=Np(r,e,i,s,o,a,!0,!1,m);b.type="fillPath",f.push(b)}else f.push(function(m,b,k,S,T,B,_){let v=m,M=b,I=Math.abs(k/2),O=Math.abs(S/2);I+=Yt(0.01*I,_),O+=Yt(0.01*O,_);let G=T,Z=B;for(;G<0;)G+=2*Math.PI,Z+=2*Math.PI;Z-G>2*Math.PI&&(G=0,Z=2*Math.PI);let tt=(Z-G)/_.curveStepCount,it=[];for(let ht=G;ht<=Z;ht+=tt)it.push([v+I*Math.cos(ht),M+O*Math.sin(ht)]);return it.push([v+I*Math.cos(Z),M+O*Math.sin(Z)]),it.push([v,M]),ui([it],_)}(r,e,i,s,o,a,d));return d.stroke!==Ae&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Wp(r,i);if(i.fill&&i.fill!==Ae)if(i.fillStyle==="solid"){let a=Wp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Zh(Up([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Zh(Up(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==Ae&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Kh([r],i)):s.push(ui([r],i))),i.stroke!==Ae&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Ae,a=i.stroke!==Ae,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let b=tg(Jp(ec(f))),k=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Zh(B,u)),B=[]},v=()=>{_(),S.length&&(k.push(S),S=[])};for(let{key:I,data:O}of b)switch(I){case"M":v(),T=[O[0],O[1]],S.push(T);break;case"L":_(),S.push([O[0],O[1]]);break;case"C":if(!B.length){let G=S.length?S[S.length-1]:T;B.push([G[0],G[1]])}B.push([O[0],O[1]]),B.push([O[2],O[3]]),B.push([O[4],O[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return k;let M=[];for(let I of k){let O=Uk(I,m);O.length&&M.push(O)}return M}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=zp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=zp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Kh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ae};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ae,strokeWidth:0,fill:i.fill||Ae};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Ae,strokeWidth:i,fill:Ae}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class sg{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new vo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Js="http://www.w3.org/2000/svg";class ag{constructor(r,e){this.svg=r,this.gen=new vo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,c,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Js,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new sg(r,e),svg:(r,e)=>new ag(r,e),generator:(r)=>new vo(r),newSeed:()=>vo.newSeed()};var Xk=1,Gk=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=V.fontSize]=Sn(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===Gk)return r.textContent?.trim()!=="";if(r.nodeType!==Xk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var ng=3,Vk=32,Kk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",he(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),d=e.width?Math.max(e.width-2*(e.padding??0),Vk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),M=await on(v,ee($a(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(M).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(M).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),b=Math.max(...m.map(({box:_})=>_.width),0),k=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${b/2-v.x-v.width/2}, ${k-v.y})`),k+=v.height+ng;let S=m.length>0?k-ng:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-b/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),lg=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Kk(r,e,i);let s,o=e.useHtmlLabels||Or(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",he(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await on(c,ee($a(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),b=(e?.padding??0)/2,k;if(o){let S=m.children[0],T=h(m);await fc(S),k=await ur.measure(()=>S.getBoundingClientRect()),k=lg(k,u),T.attr("width",k.width),T.attr("height",k.height)}else k=await ur.measure(()=>m.getBBox()),k=lg(k,u);if(o)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");else c.attr("transform","translate(0, "+-k.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:k,halfPadding:b,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??qt(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await on(o,ee($a(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(qt(p())){let d=a.children[0],f=h(a);n=await ur.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await ur.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:c,label:o}},"insertLabel"),H=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),At=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Jt(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Jt,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,b=e+f/2;for(let k=0;k<=50;k++){let S=k/50,T=r+S*d,B=b+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var Zk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=Zk;function Eg(r,e){return r.intersect(e)}t(Eg,"intersectNode");var Qk=Eg;function Ig(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ig,"intersectEllipse");var Dg=Ig;function Rg(r,e,i){return Dg(r,e,e,i)}t(Rg,"intersectCircle");var Jk=Rg;function Ng(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,b=s.x*i.y-i.x*s.y,k=u*r.x+m*r.y+b,S=u*e.x+m*e.y+b;if(Math.abs(k)<0.000001&&Math.abs(S)<0.000001&&cc(k,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*b-m*c)/T,_=(u*c-o*b)/T;return{x:B,y:_}}}t(Ng,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var t1=Ng;function Yg(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],b=e[u<e.length-1?u+1:0],k=t1(r,i,{x:d+m.x,y:f+m.y},{x:d+b.x,y:f+b.y});if(k)a.push(k)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let b=u.x-i.x,k=u.y-i.y,S=Math.sqrt(b*b+k*k),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Yg,"intersectPolygon");var e1=Yg,N={node:Qk,circle:Jk,ellipse:Dg,polygon:e1,rect:Je},Fe=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),r1=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=qt(c);return await on(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),qe=r1;function Xg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=At(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=St(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",he(n)),H(e,m),e.intersect=function(b){return l.info("Circle intersect",e,c,b),N.circle(e,c,b)},a}t(Xg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,b=(s-e)/2,k=m/o,S=b/a,T=Math.sqrt(k**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),M=Math.atan2((e-v)/a,(r-_)/o),O=Math.atan2((s-v)/a,(i-_)/o)-M;if(c&&O<0)O+=2*Math.PI;if(!c&&O>0)O-=2*Math.PI;let G=[];for(let Z=0;Z<20;Z++){let tt=Z/19,it=M+tt*O,ht=_+o*Math.cos(it),lt=v+a*Math.sin(it);G.push({x:ht,y:lt})}return G}t(uc,"generateArcPoints");function Zg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Zg,"calculateArcSagitta");async function Qg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((it)=>it+c,"calcTotalHeight"),d=t((it)=>{let ht=it/2;return[ht/(2.5+it/50),ht]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,At(e)),m=n(e?.height?e?.height:u.height),[b,k]=d(m),S=Zg(m,b,k),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,M=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,b,k,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,b,k,!0)],I=y.svg(f),O=St(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let G=Jt(M),Z=I.path(G,O),tt=f.insert(()=>Z,":first-child");if(tt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")tt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(${b/2}, 0)`),H(e,tt),e.intersect=function(it){return N.polygon(e,M,it)},f}t(Qg,"bowTieRect");async function Jg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),b=Math.max(c.height+f*2+m,e.height??0),k=-b/2+m,S=b/2,T=u*0.72,B=[`M${-u/2},${k}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${k}`,`A${u/2},${m} 0 0 0 ${-u/2},${k}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let tt=y.svg(a).path(B,St(e,{}));if(v.node()?.appendChild(tt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",k).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),H(e,v);let M=k+(S-k)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${M-c.height/2-(c.y-(c.top??0))})`);let I=12,O=t((Z,tt,it)=>Array.from({length:I+1},(ht,lt)=>{let st=Math.PI-lt*Math.PI/I;return{x:Z*Math.cos(st),y:tt+it*m*Math.sin(st)}}),"arc"),G=[...O(u/2,k,-1),...O(T/2,S,1).reverse()];return e.intersect=function(Z){return N.polygon(e,G,Z)},a}t(Jg,"bucket");var rc=20,ic=8,i1=80,o1=8;function tm(r){let{themeVariables:e}=p(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:o1,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(tm,"getCollapsedStyle");async function em(r,e){let i=tm(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await X(r,e,At(e)),{theme:d,themeVariables:f}=p();Wn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,b=Math.max(n.width+u*2,i1,e?.width??0),k=Math.max(m+ic+rc+u*2,e?.height??0),S=-b/2,T=-k/2,B=-(ic+rc)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??qt(p()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Z=y.svg(c),tt=St(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),it=Z.path(Fe(S,T,b,k,i.rx),tt);v=c.insert(()=>it,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",he(e.cssStyles))}else if(v=c.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",b).attr("height",k).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let M=T+u+m+ic;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",M).attr("x2",S+b-8).attr("y2",M).attr("stroke",o).attr("stroke-dasharray","3, 3");let I=M+rc/2,O=2.5,G=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*G).attr("cy",I).attr("r",O).attr("fill",o);return H(e,v),e.calcIntersect=function(Z,tt){return N.rect(Z,tt)},e.intersect=function(Z){return N.rect(e,Z)},c}t(em,"collapsedGroup");function tr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(tr,"insertPolygonShape");var s1=["right","left","up","down"],gc="point",a1=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),n1=t((r)=>s1.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),hg={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},l1=t((r,e,i,s)=>{let o=a1(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=n1(o);return(hg[f]??hg[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function rm(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,At(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,b=l1(i.directions??[],o,i,m),k=tr(s,m,c,b);return k.attr("style",i.style??null),H(i,k),i.intersect=function(S){return N.polygon(i,b,S)},s}t(rm,"block_arrow");async function im(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,b=Math.max(c.width+f*2,e.width??0,90),k=Math.max(c.height+f*2+u,e.height??0),S=-k/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let M=y.svg(a).path(Fe(-b/2,S,b,k,m),St(e,{}));if(B.node()?.appendChild(M),T)B.attr("style",T)}else B.append("rect").attr("x",-b/2).attr("y",S).attr("width",b).attr("height",k).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-b/2).attr("y1",S+u).attr("x2",b/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-b/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-b/2+44).attr("y",S+4).attr("width",Math.max(b-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),H(e,B);let _=S+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(im,"browser");var na=12;async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,b=f,k=-u,S=0,T=[{x:m+na,y:k},{x:b,y:k},{x:b,y:S},{x:m,y:S},{x:m,y:k+na},{x:m+na,y:k}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),M=St(e,{}),I=Jt(T),O=v.path(I,M);if(B=n.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return H(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(om,"card");function sm(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=St(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=Jt(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(b){return N.polygon(e,c,b)},s}t(sm,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,At(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=St(e,{}),B=S.circle(0,0,m*2,T);b=a.insert(()=>B,":first-child"),b.attr("class","basic label-container").attr("style",he(k))}else b=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return H(e,b),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function am(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,b=i.positioned?-u/2:-a.height/2-c;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",m).attr("y",b).attr("width",f).attr("height",u),H(i,n),i.intersect=function(k){return N.rect(i,k)},o}t(am,"composite");async function nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,At(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,b=Math.max(c.width+f*2,e.width??0,90),k=Math.max(c.height+f*2+u,e.height??0),S=-k/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let M=y.svg(a).path(Fe(-b/2,S,b,k,m),St(e,{}));if(B.node()?.appendChild(M),T)B.attr("style",T)}else B.append("rect").attr("x",-b/2).attr("y",S).attr("width",b).attr("height",k).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-b/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),H(e,B);let _=S+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(nm,"consoleWindow");function lm(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
230
|
+
M ${o.x},${o.y} L ${c.x},${c.y}`}t(lm,"createLine");function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=St(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=lm(a),m=n.path(u,d),b=o.insert(()=>f,":first-child");if(b.insert(()=>m),b.attr("class","outer-path"),c&&e.look!=="handDrawn")b.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")b.selectAll("path").attr("style",s);return H(e,b),e.intersect=function(k){return l.info("crossedCircle intersect",e,{radius:a,point:k}),N.circle(e,a,k)},o}t(hm,"crossedCircle");function dr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(dr,"generateCirclePoints");async function cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...dr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...dr(f/2+m*2,-m,m,20,-180,-270),...dr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...dr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...dr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...dr(f/2+f*0.1,-m,m,20,-180,-270),...dr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...dr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=St(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Jt(k).replace("Z",""),M=T.path(v,B),I=Jt(S),O=T.path(I,{...B}),G=o.insert("g",":first-child");if(G.insert(()=>O,":first-child").attr("stroke-opacity",0),G.insert(()=>M,":first-child"),G.attr("class","text"),b&&e.look!=="handDrawn")G.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,G),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(cm,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:k,y:S})}return c}t(fr,"generateCirclePoints");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=St(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Jt(k).replace("Z",""),M=T.path(v,B),I=Jt(S),O=T.path(I,{...B}),G=o.insert("g",":first-child");if(G.insert(()=>O,":first-child").attr("stroke-opacity",0),G.insert(()=>M,":first-child"),G.attr("class","text"),b&&e.look!=="handDrawn")G.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,G),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(um,"curlyBraceRight");function be(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let b=n+m*u,k=r+i*Math.cos(b),S=e+i*Math.sin(b);c.push({x:-k,y:-S})}return c}t(be,"generateCirclePoints");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:b}=e,k=[...be(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...be(f/2+m*2,-m,m,20,-180,-270),...be(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...be(f/2,u/2,m,20,0,90)],S=[...be(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...be(-f/2-m/2,-m,m,20,0,90),...be(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...be(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...be(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...be(f/2+m*2,-m,m,20,-180,-270),...be(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...be(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...be(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...be(-f/2-m/2,-m,m,20,0,90),...be(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...be(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=St(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let M=Jt(k).replace("Z",""),I=B.path(M,_),G=Jt(S).replace("Z",""),Z=B.path(G,_),tt=Jt(T),it=B.path(tt,{..._}),ht=o.insert("g",":first-child");if(ht.insert(()=>it,":first-child").attr("stroke-opacity",0),ht.insert(()=>I,":first-child"),ht.insert(()=>Z,":first-child"),ht.attr("class","text"),b&&e.look!=="handDrawn")ht.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,T,lt)},o}t(dm,"curlyBraces");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,At(e)),m=Math.max(d,u.height+c*2,e?.height??0),b=m/2,k=b-Math.sqrt(Math.max(0,b**2-(u.height/2)**2)),S=Math.max(m/4,k),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=T,I=m,O=M-b,G=I/4,Z=[{x:O,y:0},{x:G,y:0},{x:0,y:I/2},{x:G,y:I},{x:O,y:I},...Qe(-O,-I/2,b,50,270,90)],tt=Jt(Z),it=_.path(tt,v),ht=f.insert(()=>it,":first-child");if(ht.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",s);return ht.attr("transform",`translate(${-T/2}, ${-m/2})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,Z,lt)},f}t(fm,"curvedTrapezoid");async function pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),b=Math.min(d*0.177,m*0.45),k=m+2*f-u,S=-k/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let tt=y.svg(o),it=St(e,{}),ht=tt.path(Fe(-d/2,T,d,m,b),it),lt=tt.circle(0,S+f,f*2,it);if(B.insert(()=>lt,":first-child"),B.insert(()=>ht,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",b).attr("ry",b).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);H(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let M=S+f,I=Math.asin(Math.min(1,(T-M)/f))*180/Math.PI,O=24,Z=[...Qe(0,-M,f,O,180+I,-I),...Qe(-(-d/2+b),-(T+b),b,12,90,0),...Qe(-(-d/2+b),-(k/2-b),b,12,360,270),...Qe(-(d/2-b),-(k/2-b),b,12,270,180),...Qe(-(d/2-b),-(T+b),b,12,180,90)];return e.intersect=function(tt){return N.polygon(e,Z,tt)},o}t(pm,"person");var h1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),c1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),u1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),cg=8,ug=8;async function gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<cg)e.height=cg}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,At(e)),m=Math.max(e.width??0,f.width)+c,b=m/2,k=b/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+k,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=c1(0,0,m,S,b,k),M=u1(0,k,m,S,b,k),I=St(e,{}),O=_.path(v,I),G=_.path(M,St(e,{fill:"none"}));if(T=d.insert(()=>G,":first-child"),T=d.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=h1(0,0,m,S,b,k);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",he(B)).attr("style",s)}return T.attr("label-offset-y",k),T.attr("transform",`translate(${-m/2}, ${-(S/2+k)})`),H(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),M=v.x-(e.x??0);if(b!=0&&(Math.abs(M)<(e.width??0)/2||Math.abs(M)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-k)){let I=k*k*(1-M*M/(b*b));if(I>0)I=Math.sqrt(I);if(I=k-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},d}t(gm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,At(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:b,ry:k}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)b=i.rx,k=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=St(e,{}),_=b||k?T.path(Fe(f,u,n,d,b||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",he(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",he(b)).attr("ry",he(k)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return H(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function mm(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let k=y.svg(f),S=St(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>k.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>k.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,b=(Number(u.attr("height"))||n)??0;if(m>0&&b>0)u.attr("stroke-dasharray",`${m} ${b}`);return f}t(mm,"datastore");async function ym(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=n.width+o,u=n.height+a,m=u*0.2,b=-f/2,k=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:b,y:k+m},{x:-b,y:k+m},{x:-b,y:-k},{x:b,y:-k},{x:b,y:k},{x:-b,y:k},{x:-b,y:k+m}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),M=c.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")M.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")M.selectAll("path").attr("style",s);return d.attr("transform",`translate(${b+(e.padding??0)/2-(n.x-(n.left??0))}, ${k+m+(e.padding??0)/2-(n.y-(n.top??0))})`),H(e,M),e.intersect=function(I){return N.rect(e,I)},c}t(ym,"dividedRectangle");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{roughness:0.2,strokeWidth:2.5}),B=St(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,m*2,T),v=S.circle(0,0,u*2,B);b=n.insert("g",":first-child"),b.attr("class",he(e.cssClasses)).attr("style",he(k)),b.node()?.appendChild(_),b.node()?.appendChild(v)}else{b=n.insert("g",":first-child");let S=b.insert("circle",":first-child"),T=b.insert("circle");b.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return H(e,b),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(xm,"doublecircle");async function Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,At(e)),{theme:n,themeVariables:d}=p();Wn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=St(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(b=o.insert(()=>B,":first-child"),b.attr("class","basic label-container"),k)b.attr("style",k)}else b=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,H(e,b),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(Cm,"usecaseEllipse");function bm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=St(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),b=a.insert(()=>m,":first-child");if(b.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")b.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")b.selectAll("path").attr("style",o);return H(e,b),e.intersect=function(k){return l.info("filledCircle intersect",e,{radius:c,point:k}),N.circle(e,c,k)},a}t(bm,"filledCircle");var dg=10,fg=10;async function km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,b=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:k}=e,S=y.svg(c),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=Jt(b),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(k&&e.look!=="handDrawn")v.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,H(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(M){return l.info("Triangle intersect",e,b,M),N.polygon(e,b,M)},c}t(km,"flippedTriangle");async function wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),b=m-u,k=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+k,y:S},{x:-d/2+k,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((I)=>`L${I.x},${I.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let O=y.svg(o).path(B,St(e,{}));if(v=o.insert(()=>O,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")H(e,v);else H(e,v,{width:d,height:m});let M=S+u+b/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${M-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(I){return N.polygon(e,T,I)},o}t(wm,"folder");function Sm(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,b=y.svg(c),k=St(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")k.roughness=0,k.fillStyle="solid";let S=b.rectangle(u,m,d,f,k),T=c.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);H(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return N.rect(e,_)},c}t(Sm,"forkJoin");async function Tm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,At(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,b=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),k=(e?.width?e?.width:Math.max(o,f.width)+b*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-k/2,y:-u/2},{x:k/2-m,y:-u/2},...Qe(-k/2+m,0,m,50,90,270),{x:k/2-m,y:u/2},{x:-k/2,y:u/2}],v=Jt(_),M=T.path(v,B),I=d.insert(()=>M,":first-child");if(I.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")I.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return H(e,I),e.intersect=function(O){return l.info("Pill intersect",e,{radius:m,point:O}),N.polygon(e,_,O)},d}t(Tm,"halfRoundedRectangle");var d1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let M=(e.height??0)/o;e.width=(e?.width??0)-2*M-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await X(r,e,At(e)),b=(e?.height?e?.height:m.height)+d,k=b/o,S=(e?.width?e?.width:m.width)+2*k+f,T=[{x:k,y:0},{x:S-k,y:0},{x:S,y:-b/2},{x:S-k,y:-b},{x:k,y:-b},{x:0,y:-b/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),M=St(e,{}),I=d1(0,0,S,b,k),O=v.path(I,M);if(B=u.insert(()=>O,":first-child").attr("transform",`translate(${-S/2}, ${b/2})`),_)B.attr("style",_)}else B=tr(u,S,b,T);if(s)B.attr("style",s);return e.width=S,e.height=b,H(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(Bm,"hexagon");async function _m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,At(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=St(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=Jt(u),b=d.path(m,f),k=o.insert(()=>b,":first-child");if(k.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")k.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")k.selectChildren("path").attr("style",s);return k.attr("transform",`translate(${-a/2}, ${-c/2})`),H(e,k),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(_m,"hourglass");async function vm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),b=e.pos==="t",k=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ue(e),_=-S/2,v=-k/2,M=e.label?8:0,I=y.svg(f),O=St(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let G=I.rectangle(_,v,S,k,O),Z=Math.max(S,u.width),tt=k+u.height+M,it=I.rectangle(-Z/2,-tt/2,Z,tt,{...O,fill:"transparent",stroke:"none"}),ht=f.insert(()=>G,":first-child"),lt=f.insert(()=>it);if(e.icon){let st=f.append("g");st.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let D=st.node().getBBox(),{width:Y,height:et,x:W,y:nt}=D;st.attr("transform",`translate(${-Y/2-W},${b?u.height/2+M/2-et/2-nt:-u.height/2-M/2-et/2-nt})`),st.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-tt/2:tt/2-u.height})`),ht.attr("transform",`translate(0,${b?u.height/2+M/2:-u.height/2-M/2})`),H(e,lt),e.intersect=function(st){if(l.info("iconSquare intersect",e,st),!e.label)return N.rect(e,st);let D=e.x??0,Y=e.y??0,et=e.height??0,W=[];if(b)W=[{x:D-u.width/2,y:Y-et/2},{x:D+u.width/2,y:Y-et/2},{x:D+u.width/2,y:Y-et/2+u.height+M},{x:D+S/2,y:Y-et/2+u.height+M},{x:D+S/2,y:Y+et/2},{x:D-S/2,y:Y+et/2},{x:D-S/2,y:Y-et/2+u.height+M},{x:D-u.width/2,y:Y-et/2+u.height+M}];else W=[{x:D-S/2,y:Y-et/2},{x:D+S/2,y:Y-et/2},{x:D+S/2,y:Y-et/2+k},{x:D+u.width/2,y:Y-et/2+k},{x:D+u.width/2/2,y:Y+et/2},{x:D-u.width/2,y:Y+et/2},{x:D-u.width/2,y:Y-et/2+k},{x:D-S/2,y:Y-et/2+k}];return N.polygon(e,W,st)},f}t(vm,"icon");async function Lm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),b=20,k=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ue(e),v=y.svg(f),M=St(e,{});if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let I=_.get("fill");M.stroke=I??B;let O=f.append("g");if(e.icon)O.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let G=O.node().getBBox(),{width:Z,height:tt,x:it,y:ht}=G,lt=Math.max(Z,tt)*Math.SQRT2+b*2,st=v.circle(0,0,lt,M),D=Math.max(lt,u.width),Y=lt+u.height+k,et=v.rectangle(-D/2,-Y/2,D,Y,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>st,":first-child"),nt=f.insert(()=>et);return O.attr("transform",`translate(${-Z/2-it},${S?u.height/2+k/2-tt/2-ht:-u.height/2-k/2-tt/2-ht})`),O.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-Y/2:Y/2-u.height})`),W.attr("transform",`translate(0,${S?u.height/2+k/2:-u.height/2-k/2})`),H(e,nt),e.intersect=function(at){return l.info("iconSquare intersect",e,at),N.rect(e,at)},f}t(Lm,"iconCircle");async function Fm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:b}=await X(r,e,"icon-shape default"),k=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ue(e),M=-T/2,I=-S/2,O=e.label?8:0,G=y.svg(f),Z=St(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let tt=v.get("fill");Z.stroke=tt??_;let it=G.path(Fe(M,I,T,S,5),Z),ht=Math.max(T,u.width),lt=S+u.height+O,st=G.rectangle(-ht/2,-lt/2,ht,lt,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>it,":first-child").attr("class","icon-shape2"),Y=f.insert(()=>st);if(e.icon){let et=f.append("g");et.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let W=et.node().getBBox(),{width:nt,height:at,x:wt,y:Tt}=W;et.attr("transform",`translate(${-nt/2-wt},${k?u.height/2+O/2-at/2-Tt:-u.height/2-O/2-at/2-Tt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return b.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-lt/2:lt/2-u.height})`),D.attr("transform",`translate(0,${k?u.height/2+O/2:-u.height/2-O/2})`),H(e,Y),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let W=e.x??0,nt=e.y??0,at=e.height??0,wt=[];if(k)wt=[{x:W-u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt+at/2},{x:W-T/2,y:nt+at/2},{x:W-T/2,y:nt-at/2+u.height+O},{x:W-u.width/2,y:nt-at/2+u.height+O}];else wt=[{x:W-T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2+S},{x:W+u.width/2,y:nt-at/2+S},{x:W+u.width/2/2,y:nt+at/2},{x:W-u.width/2,y:nt+at/2},{x:W-u.width/2,y:nt-at/2+S},{x:W-T/2,y:nt-at/2+S}];return N.polygon(e,wt,et)},f}t(Fm,"iconRounded");async function Mm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:b}=await X(r,e,"icon-shape default"),k=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ue(e),M=-T/2,I=-S/2,O=e.label?8:0,G=y.svg(f),Z=St(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let tt=v.get("fill");Z.stroke=tt??_;let it=G.path(Fe(M,I,T,S,0.1),Z),ht=Math.max(T,u.width),lt=S+u.height+O,st=G.rectangle(-ht/2,-lt/2,ht,lt,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>it,":first-child"),Y=f.insert(()=>st);if(e.icon){let et=f.append("g");et.html(`<g>${await lr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let W=et.node().getBBox(),{width:nt,height:at,x:wt,y:Tt}=W;et.attr("transform",`translate(${-nt/2-wt},${k?u.height/2+O/2-at/2-Tt:-u.height/2-O/2-at/2-Tt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return b.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-lt/2:lt/2-u.height})`),D.attr("transform",`translate(0,${k?u.height/2+O/2:-u.height/2-O/2})`),H(e,Y),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let W=e.x??0,nt=e.y??0,at=e.height??0,wt=[];if(k)wt=[{x:W-u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2},{x:W+u.width/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt-at/2+u.height+O},{x:W+T/2,y:nt+at/2},{x:W-T/2,y:nt+at/2},{x:W-T/2,y:nt-at/2+u.height+O},{x:W-u.width/2,y:nt-at/2+u.height+O}];else wt=[{x:W-T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2},{x:W+T/2,y:nt-at/2+S},{x:W+u.width/2,y:nt-at/2+S},{x:W+u.width/2/2,y:nt+at/2},{x:W-u.width/2,y:nt+at/2},{x:W-u.width/2,y:nt-at/2+S},{x:W-T/2,y:nt-at/2+S}];return N.polygon(e,wt,et)},f}t(Mm,"iconSquare");async function Am(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:b,label:k}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),M=St(e,{});if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let I=v.rectangle(T,B,f,u,M),O=Math.max(f,b.width),G=u+b.height+_,Z=v.rectangle(-O/2,-G/2,O,G,{...M,fill:"none",stroke:"none"}),tt=m.insert(()=>I,":first-child"),it=m.insert(()=>Z);if(e.img){let ht=m.append("image");ht.attr("href",e.img),ht.attr("width",f),ht.attr("height",u),ht.attr("preserveAspectRatio","none"),ht.attr("transform",`translate(${-f/2},${S?G/2-u:-G/2})`)}return k.attr("transform",`translate(${-b.width/2-(b.x-(b.left??0))},${S?-u/2-b.height/2-_/2:u/2-b.height/2+_/2})`),tt.attr("transform",`translate(0,${S?b.height/2+_/2:-b.height/2-_/2})`),H(e,it),e.intersect=function(ht){if(l.info("iconSquare intersect",e,ht),!e.label)return N.rect(e,ht);let lt=e.x??0,st=e.y??0,D=e.height??0,Y=[];if(S)Y=[{x:lt-b.width/2,y:st-D/2},{x:lt+b.width/2,y:st-D/2},{x:lt+b.width/2,y:st-D/2+b.height+_},{x:lt+f/2,y:st-D/2+b.height+_},{x:lt+f/2,y:st+D/2},{x:lt-f/2,y:st+D/2},{x:lt-f/2,y:st-D/2+b.height+_},{x:lt-b.width/2,y:st-D/2+b.height+_}];else Y=[{x:lt-f/2,y:st-D/2},{x:lt+f/2,y:st-D/2},{x:lt+f/2,y:st-D/2+u},{x:lt+b.width/2,y:st-D/2+u},{x:lt+b.width/2/2,y:st+D/2},{x:lt-b.width/2,y:st+D/2},{x:lt-b.width/2,y:st-D/2+u},{x:lt-f/2,y:st-D/2+u}];return N.polygon(e,Y,ht)},m}t(Am,"imageSquare");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Em,"inv_trapezoid");async function $m(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),H(e,a),e.intersect=function(d){return N.rect(e,d)},i}t($m,"labelRect");async function Im(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Im,"lean_left");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Om,"lean_right");function Dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=St(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let b=Jt(f),k=u.path(b,m),S=o.insert(()=>k,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${c/2},${-n})`),H(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Dm,"lightningBolt");var f1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),p1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),g1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let M=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-M*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,b=m/(2.5+u/50),k=(e?.height?e?.height:d.height)+b+c*2,S=k*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=p1(0,0,u,k,m,b,S),M=g1(0,b,u,k,m,b),I=St(e,{}),O=_.path(v,I),G=_.path(M,I);if(n.insert(()=>G,":first-child").attr("class","line"),T=n.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=f1(0,0,u,k,m,b,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",he(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-u/2}, ${-(k/2+b)})`),H(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+b-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),M=v.x-(e.x??0);if(m!=0&&(Math.abs(M)<(e.width??0)/2||Math.abs(M)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let I=b*b*(1-M*M/(m*m));if(I>0)I=Math.sqrt(I);if(I=b-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},n}t(Pm,"linedCylinder");async function Rm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let I=e.width;if(e.width=(I??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,b=e.look==="neo"?m/4:m/8,k=m+b,{cssStyles:S}=e,T=y.svg(n),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:k/2},...kr(-u/2-u/2*0.1,k/2,u/2+u/2*0.1,k/2,b,0.8),{x:u/2+u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2,y:-k/2},{x:-u/2,y:k/2*1.1},{x:-u/2,y:-k/2}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),M=n.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")M.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")M.selectAll("path").attr("style",s);return M.attr("transform",`translate(0,${-b/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-b-(d.y-(d.top??0))})`),H(e,M),e.intersect=function(I){return N.polygon(e,_,I)},n}t(Rm,"linedWaveEdgedRect");var m1=56,oc=72,mg=8,yg=2,y1=8,x1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,sc=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),C1={normal:sc(-24,12),hollow:sc(-23,9),awesome:sc(-21,13),icon:"M 12 -8 L 26 -26"},bg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),yc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,St(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),b1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,St(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var k1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",C1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Mo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,At(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:b}=p();Wn(n,e.colorIndex,m,b.borderColorArray);let k,S;if(e.stereotype){let tt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});k=tt.label.attr("class","label usecase-stereotype"),S=tt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${x1[i]}`).attr("style",a||null);await s(T,e),k1(T,e,i);let B=e.padding??y1,_=S?.height??0,v=oc+mg+d.height+(S?_+yg:0),M=Math.max(m1,d.width,S?.width??0)+B*2,I=v+B*2,O=-v/2;T.attr("transform",`translate(0,${O+oc/2})`);let G=O+oc+mg;if(k&&S)G+=_/2,bg(k,S,G),G+=_/2+yg;bg(f,d,G+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-M/2).attr("y",-I/2).attr("width",M).attr("height",I).attr("opacity",0).attr("aria-hidden","true");return H(e,Z),e.intersect=(tt)=>N.rect(e,tt),n}t(Mo,"renderUsecaseActor");var w1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function qm(r,e){return Mo(r,e,"normal",(i,s)=>{yc(i,s,w1,"usecase-actor-stick")})}t(qm,"usecaseActor");var S1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Wm(r,e){return Mo(r,e,"awesome",(i,s)=>{yc(i,s,S1,"usecase-actor-awesome-silhouette")})}t(Wm,"usecaseActorAwesome");var T1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Nm(r,e){return Mo(r,e,"hollow",(i,s)=>{b1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,T1,"usecase-actor-hollow-body",!0)})}t(Nm,"usecaseActorHollow");var di=52,kg=42,wg=-2,B1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,St(e,{}));r.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Es(o.includes(":")?o:`fa:${o}`),c=await lr(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function zm(r,e){return Mo(r,e,"icon",B1)}t(zm,"usecaseActorIcon");var Sg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Hm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,At(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Wn(c,e.colorIndex,u,m.borderColorArray);let b,k;if(i.stereotype){let D=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=D.label.attr("class","label usecase-stereotype"),k=D.bbox}let S=k?2:0,T=n.height+(k?.height??0)+S,B=Math.max(n.width,k?.width??0),_=d??10,v=B/2+_*2,M=T/2+_*2,I=Math.min(Math.max(_/5,1),_/2),O=B/2+I,G=v-I,Z=O/v,tt=G/v,it=M*Math.sqrt(Math.max(0,1-Z*Z)),ht=-M*Math.sqrt(Math.max(0,1-tt*tt));if(b&&k)Sg(b,k,-T/2+k.height/2);Sg(f,n,T/2-n.height/2);let lt;if(e.look==="handDrawn"){let Y=y.svg(c).ellipse(0,0,v*2,M*2,St(e,{}));lt=c.insert(()=>Y,":first-child").attr("class","basic label-container usecase-business-ellipse")}else lt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",M).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${O} ${it} L ${G} ${ht}`).attr("fill","none").attr("style",o||null);let st=i.accessibleName??i.label;if(st)c.attr("role","img").attr("aria-label",st);return H(e,lt),e.calcIntersect=(D,Y)=>N.ellipse(D,D.width/2,D.height/2,Y),e.intersect=(D)=>N.ellipse(e,v,M,D),c}t(Hm,"usecaseBusiness");var ac=8,Tg=4,_1=1,nc=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),v1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:_1},"numericStrokeWidth");async function Ym(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ue(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let D of i.jsonRows??[]){let Y=await Ir(f,D.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),et=await Ir(f,D.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:Y.label.attr("class","label usecase-json-key"),bbox:Y.bbox},value:{label:et.label.attr("class","label usecase-json-value"),bbox:et.bbox}})}let m=Math.max(0,...u.map(({key:D})=>D.bbox.width))+ac*2,b=Math.max(0,...u.map(({value:D})=>D.bbox.width))+ac*2,k=n.width+ac*2,S=Math.max(k,m+b),T=b+Math.max(0,S-m-b),B=n.height+Tg*2,_=u.map(({key:D,value:Y})=>Math.max(D.bbox.height,Y.bbox.height)+Tg*2),v=B+_.reduce((D,Y)=>D+Y,0),M=v1(a.get("stroke-width")),I=S+M*2,O=v+M*2,G=-S/2,Z=-v/2,tt=e.look==="handDrawn"?y.svg(c):void 0,it=tt?St(e,{}):void 0,ht=t((D,Y,et,W,nt,at)=>{if(tt&&it){let wt=tt.rectangle(et,W,nt,at,it);return D.insert(()=>wt,":first-child").attr("class",Y)}return D.insert("rect",":first-child").attr("class",Y).attr("x",et).attr("y",W).attr("width",nt).attr("height",at).attr("style",o)},"insertCell"),lt=ht(c,"label-container usecase-json-border",-I/2,-O/2,I,O);ht(f,"usecase-json-cell usecase-json-title-cell",G,Z,S,B),f.node()?.append(d.node()),nc(d,n,0,Z+B/2);let st=Z+B;return u.forEach(({key:D,value:Y},et)=>{let W=_[et],nt=f.append("g").attr("class","usecase-json-row").attr("data-row-index",et).attr("transform",`translate(0,${st})`);ht(nt,"usecase-json-cell usecase-json-key-cell",G,0,m,W),ht(nt,"usecase-json-cell usecase-json-value-cell",G+m,0,T,W),nt.node()?.append(D.label.node(),Y.label.node()),nc(D.label,D.bbox,G+m/2,W/2),nc(Y.label,Y.bbox,G+m+T/2,W/2),st+=W}),H(e,lt),e.intersect=(D)=>N.rect(e,D),c}t(Ym,"usecaseJsonTable");async function jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,At(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,b=(e?.height?e?.height:f.height)+c*2+2*n,k=m-2*n,S=b-2*n,T=-k/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),M=St(e,{}),I=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+k-n,y:B+S+n},{x:T+k-n,y:B+S},{x:T+k,y:B+S},{x:T+k,y:B+S-n},{x:T+k+n,y:B+S-n},{x:T+k+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],O=[{x:T,y:B+n},{x:T+k-n,y:B+n},{x:T+k-n,y:B+S},{x:T+k,y:B+S},{x:T+k,y:B},{x:T,y:B}];if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let G=Jt(I),Z=v.path(G,M),tt=Jt(O),it=v.path(tt,M);if(e.look!=="handDrawn")Z=hc(Z),it=hc(it);let ht=d.insert("g",":first-child");if(ht.insert(()=>Z),ht.insert(()=>it),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),H(e,ht),e.intersect=function(lt){return N.polygon(e,I,lt)},d}t(jm,"multiRect");async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,b=Math.max(a.height,e?.height??0)+f*3,k=e.look==="neo"?b/4:b/8,S=b+(u?k/2:-k/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,M=kr(T-_,B+S+_,T+m-_,B+S+_,k,0.8),I=M?.[M.length-1],O=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...M,{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:I.y-2*_},{x:T+m+_,y:I.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],G=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:B},{x:T,y:B}],Z=y.svg(o),tt=St(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=Jt(O),ht=Z.path(it,tt),lt=Jt(G),st=Z.path(lt,tt),D=o.insert(()=>ht,":first-child");if(D.insert(()=>st),D.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")D.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return D.attr("transform",`translate(0,${-k/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-k-(a.y-(a.top??0))})`),H(e,D),e.intersect=function(Y){return N.polygon(e,O,Y)},o}t(Um,"multiWaveEdgedRectangle");async function Xm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||qt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,b=-u/2,{cssStyles:k}=e,S=y.svg(c),T=St(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,b,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),k&&e.look!=="handDrawn")_.selectAll("path").attr("style",k);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),H(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Xm,"note");var L1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,At(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:b}=e;if(e.look==="handDrawn"){let k=y.svg(o),S=St(e,{}),T=L1(0,0,d),B=k.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),b)m.attr("style",b)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return H(e,m),e.calcIntersect=function(k,S){let T=k.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(k,B,S)},e.intersect=function(k){return this.calcIntersect(e,k)},o}t(Gm,"question");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),b=m/4,S=-Math.max(u,(e.width??0)-b)/2,T=-m/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,M=y.svg(n),I=St(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=Jt(_),G=M.path(O,I),Z=n.insert(()=>G,":first-child");if(Z.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Z.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-B/2},0)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),H(e,Z),e.intersect=function(tt){return N.polygon(e,_,tt)},n}t(Vm,"rect_left_inv_arrow");async function Km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await qe(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(qt(p())){let tt=u.children[0],it=h(u);m=tt.getBoundingClientRect(),it.attr("width",m.width),it.attr("height",m.height)}l.info("Text 2",d);let b=d||[],k=u.getBBox(),S=await qe(n,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>k.width?0:(k.width-m.width)/2)+", "+(k.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<k.width?0:-(k.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),M=m.height+(e.padding||0),I=-m.width/2-_,O=-m.height/2-_,G,Z;if(e.look==="handDrawn"){let tt=y.svg(a),it=St(e,{}),ht=tt.path(Fe(I,O,v,M,e.rx||0),it),lt=tt.line(-m.width/2-_,-m.height/2-_+k.height+_,m.width/2+_,-m.height/2-_+k.height+_,it);Z=a.insert(()=>(l.debug("Rough node insert CXC",ht),lt),":first-child"),G=a.insert(()=>(l.debug("Rough node insert CXC",ht),ht),":first-child")}else G=c.insert("rect",":first-child"),Z=c.insert("line"),G.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+k.height+_).attr("y2",-m.height/2-_+k.height+_);return H(e,G),e.intersect=function(tt){return N.rect(e,tt)},a}t(Km,"rectWithTitle");async function Zm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return mi(r,e,o)}t(Zm,"roundedRect");var Er=8;async function Qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,b=u,k=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=St(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:k,y:S},{x:k+m,y:S},{x:k+m,y:S+b},{x:k-Er,y:S+b},{x:k-Er,y:S},{x:k,y:S},{x:k,y:S+b}],M=B.polygon(v.map((O)=>[O.x,O.y]),_),I=c.insert(()=>M,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",he(T)),s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),H(e,I),e.intersect=function(O){return N.rect(e,O)},c}t(Qm,"shadedProcess");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,b=u,k=m/1.5,S=-b/2,T=-k/2,{cssStyles:B}=e,_=y.svg(n),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=[{x:S,y:T},{x:S,y:T+k},{x:S+b,y:T+k},{x:S+b,y:T-k/2}],I=Jt(M),O=_.path(I,v),G=n.insert(()=>O,":first-child");if(G.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")G.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")G.selectChildren("path").attr("style",s);return G.attr("transform",`translate(0, ${k/4})`),f.attr("transform",`translate(${-b/2+(e.padding??0)-(d.x-(d.left??0))}, ${-k/4+(e.padding??0)-(d.y-(d.top??0))})`),H(e,G),e.intersect=function(Z){return N.polygon(e,M,Z)},n}t(Jm,"slopedRect");async function ty(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Wn(c,e.colorIndex,n,d.borderColorArray)}return c}t(ty,"squareRect");var dc=50,F1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),{w:f,h:u}=F1(d,a,c),m=u/2,{cssStyles:b}=e,k=y.svg(n),S=St(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=Jt(T),_=k.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return H(e,v),e.intersect=function(M){return N.polygon(e,T,M)},n}t(ey,"stadium");async function ry(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(ry,"state");function iy(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),b=St(e,{});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let k=m.circle(0,0,e.width,{...b,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...b,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>k,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",M=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${M})`)}return H(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(iy,"stateEnd");function oy(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return H(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(oy,"stateStart");var fi=8;async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,b=u,k=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-b},{x:0,y:-b},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-b},{x:-8,y:-b},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=St(e,{}),v=B.rectangle(k,S,m+16,b,_),M=B.line(k+fi,S,k+fi,S+b,_),I=B.line(k+fi+m,S,k+fi+m,S+b,_);n.insert(()=>M,":first-child"),n.insert(()=>I,":first-child");let O=n.insert(()=>v,":first-child"),{cssStyles:G}=e;O.attr("class","basic label-container").attr("style",he(G)),H(e,O)}else{let B=tr(n,m,b,T);if(s)B.attr("style",s);H(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(sy,"subroutine");var lc=0.2;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-lc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=(e?.height?e?.height:d.height)+c*2,u=lc*f,m=lc*f,k=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-k/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),M=St(e,{}),I=[{x:T-u/2,y:B},{x:T+k+u/2,y:B},{x:T+k+u/2,y:B+S},{x:T-u/2,y:B+S}],O=[{x:T+k-u/2,y:B+S},{x:T+k+u/2,y:B+S},{x:T+k+u/2,y:B+S-m}];if(e.look!=="handDrawn")M.roughness=0,M.fillStyle="solid";let G=Jt(I),Z=v.path(G,M),tt=Jt(O),it=v.path(tt,{...M,fillStyle:"solid"}),ht=n.insert(()=>it,":first-child");if(ht.insert(()=>Z,":first-child"),ht.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ht.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return H(e,ht),e.intersect=function(lt){return N.polygon(e,I,lt)},n}t(ay,"taggedRect");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,At(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,b=d+f,{cssStyles:k}=e,S=y.svg(o),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:b/2},...kr(-n/2-n/2*0.1,b/2,n/2+n/2*0.1,b/2,f,0.8),{x:n/2+n/2*0.1,y:-b/2},{x:-n/2-n/2*0.1,y:-b/2}],_=-n/2+n/2*0.1,v=-b/2-m*0.4,M=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],I=Jt(B),O=S.path(I,T),G=Jt(M),Z=S.path(G,{...T,fillStyle:"solid"}),tt=o.insert(()=>Z,":first-child");if(tt.insert(()=>O,":first-child"),tt.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")tt.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),H(e,tt),e.intersect=function(it){return N.polygon(e,B,it)},o}t(ny,"taggedWaveEdgedRectangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,At(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),H(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(ly,"text");var M1=t((r,e,i,s,o,a)=>`M${r},${e}
|
|
231
231
|
a${o},${a} 0,0,1 0,${-s}
|
|
232
232
|
l${i},0
|
|
233
233
|
a${o},${a} 0,0,1 0,${s}
|
|
234
234
|
M${i},${-s}
|
|
235
235
|
a${o},${a} 0,0,0 0,${s}
|
|
236
|
-
l${-i},0`,"createCylinderPathD"),A1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),E1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await
|
|
237
|
-
M${k-
|
|
238
|
-
M${k},${S-de} L${k},${S+b}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let I=B.path(M,_),O=c.insert(()=>I,":first-child");if(O.attr("transform",`translate(${de/2}, ${de/2})`),O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")O.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+de/2-(n.x-(n.left??0))}, ${-(n.height/2)+de/2-(n.y-(n.top??0))})`),H(e,O),e.intersect=function(X){return N.polygon(e,v,X)},c}t(gy,"windowPane");var Ag=new Set(["redux-color","redux-dark-color"]),$1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:_t}=C(),{background:Pt}=_t,Gt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Pt}`]};await xc(r,Gt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:b}=e,{labelStyles:k,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let _t={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(qn(e.label,f)+_t.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Pt=await mi(r,e,_t);if(s!=null&&Ag.has(s)){let Gt=i.colorIndex??0;Pt.attr("data-color-id",`color-${Gt%d.length}`)}if(!Or(f.htmlLabels)){let Gt=Pt.select("text"),zt=Gt.node()?.getBBox();Gt.attr("transform",`translate(${-zt.width/2}, 0)`)}return Pt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=At(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],k);_.height+=m;let v=0,M=[],I=[],O=0,X=0,G=0,tt=0,it=!0,ht=!0;for(let _t of i.attributes){let Pt=await pi(B,_t.type,f,0,v,["attribute-type"],k);O=Math.max(O,Pt.width+u);let Gt=await pi(B,_t.name,f,0,v,["attribute-name"],k);X=Math.max(X,Gt.width+u);let zt=await pi(B,_t.keys.join(),f,0,v,["attribute-keys"],k);G=Math.max(G,zt.width+u);let ae=await pi(B,_t.comment,f,0,v,["attribute-comment"],k);tt=Math.max(tt,ae.width+u);let oe=Math.max(Pt.height,Gt.height,zt.height,ae.height)+m;I.push({yOffset:v,rowHeight:oe}),v+=oe}let lt=4;if(G<=u)it=!1,G=0,lt--;if(tt<=u)ht=!1,tt=0,lt--;let st=B.node().getBBox();if(_.width+u*2-(O+X+G+tt)>0){let _t=_.width+u*2-(O+X+G+tt);if(O+=_t/lt,X+=_t/lt,G>0)G+=_t/lt;if(tt>0)tt+=_t/lt}let D=O+X+G+tt,Y=y.svg(B),et=St(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let W=0;if(I.length>0)W=I.reduce((_t,Pt)=>_t+(Pt?.rowHeight??0),0);let nt=Math.max(st.width+u*2,e?.width||0,D),at=Math.max((W??0)+_.height,e?.height||0),wt=-nt/2,Tt=-at/2;if(B.selectAll("g:not(:first-child)").each((_t,Pt,Gt)=>{let zt=h(Gt[Pt]),ae=zt.attr("transform"),oe=0,er=0;if(ae){let We=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ae);if(We){if(oe=parseFloat(We[1]),er=parseFloat(We[2]),zt.attr("class").includes("attribute-name"))oe+=O;else if(zt.attr("class").includes("attribute-keys"))oe+=O+X;else if(zt.attr("class").includes("attribute-comment"))oe+=O+X+G}}zt.attr("transform",`translate(${wt+u/2+oe}, ${er+Tt+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(Tt+m/2)+")"),s!=null&&Ag.has(s)){let _t=i.colorIndex??0;B.attr("data-color-id",`color-${_t%d.length}`)}let Ut=Y.rectangle(wt,Tt,nt,at,et),Xt=B.insert(()=>Ut,":first-child").attr("class","outer-path").attr("style",b.join(""));M.push(0);for(let[_t,Pt]of I.entries()){let zt=(_t+1)%2===0&&Pt.yOffset!==0,ae=Y.rectangle(wt,_.height+Tt+Pt?.yOffset,nt,Pt?.rowHeight,{...et,fill:zt?a:c,stroke:n});B.insert(()=>ae,"g.label").attr("style",b.join("")).attr("class",`row-rect-${zt?"even":"odd"}`)}let Kt=0.0001,Zt=gi(wt,_.height+Tt,nt+wt,_.height+Tt,Kt),Et=Y.polygon(Zt.map((_t)=>[_t.x,_t.y]),et);if(B.insert(()=>Et).attr("class","divider"),Zt=gi(O+wt,_.height+Tt,O+wt,at+Tt,Kt),Et=Y.polygon(Zt.map((_t)=>[_t.x,_t.y]),et),B.insert(()=>Et).attr("class","divider"),it){let _t=O+X+wt;Zt=gi(_t,_.height+Tt,_t,at+Tt,Kt),Et=Y.polygon(Zt.map((Pt)=>[Pt.x,Pt.y]),et),B.insert(()=>Et).attr("class","divider")}if(ht){let _t=O+X+G+wt;Zt=gi(_t,_.height+Tt,_t,at+Tt,Kt),Et=Y.polygon(Zt.map((Pt)=>[Pt.x,Pt.y]),et),B.insert(()=>Et).attr("class","divider")}for(let _t of M){let Pt=_.height+Tt+_t;Zt=gi(wt,Pt,nt+wt,Pt,Kt),Et=Y.polygon(Zt.map((Gt)=>[Gt.x,Gt.y]),et),B.insert(()=>Et).attr("class","divider")}if(H(e,Xt),S&&e.look!=="handDrawn")if(s!=null&&$1.has(s))B.selectAll("path").attr("style",S);else{let Pt=S.split(";")?.filter((Gt)=>Gt.includes("stroke"))?.map((Gt)=>`${Gt}`).join("; ");B.selectAll("path").attr("style",Pt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(_t){return N.rect(e,_t)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==uo(e))e=uo(e),e=e.replaceAll("<","<").replaceAll(">",">");let d=n.node().appendChild(await on(n,e,{width:qn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("<")||e.includes(">")){let u=d.children[0];u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let f=d.getBBox();if(Or(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(gi,"lineToPolygon");async function my(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",At(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,b=0,k=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Fo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Fo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();b=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let M=await Fo(f,v,T,[v.parseClassifier()]);T+=M+a}if(k=f.node().getBBox().height,k<=0)k=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let M=await Fo(u,v,B,[v.parseClassifier()]);B+=M+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+b+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+b+(k?k+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(my,"textHelper");async function Fo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:Or(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(It(n))c=!0;let d=await on(o,Uo($a(n)),{width:qn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes(">")){if(m.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],b=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Fo,"addText");async function yy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??Or(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:b}=await my(r,e,i,f,d);Wn(m,e.colorIndex,s,c);let{labelStyles:k,nodeStyles:S}=Q(e);e.labelStyle=k,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=Math.max(e.width??0,b.width),I=Math.max(e.height??0,b.height),O=(e.height??0)>b.height;if(u.members.length===0&&u.methods.length===0)I+=d;else if(u.members.length>0&&u.methods.length===0)I+=d*2;let X=-M/2,G=-I/2,tt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(O)tt=n*2;let it=_.rectangle(X-n,G-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),M+2*n,I+2*n+tt,v),ht=m.insert(()=>it,":first-child");ht.attr("class","basic label-container outer-path");let lt=ht.node().getBBox(),st=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,D=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,Y=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,et=(st+D+G+n-(G-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((W,nt,at)=>{let wt=h(at[nt]),Tt=wt.attr("transform"),Ut=0;if(Tt){let Et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Tt);if(Et)Ut=parseFloat(Et[2])}let Xt=Ut+G+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(wt.attr("class").includes("methods-group")){let Zt=Math.max(Y,d/2);if(O)Xt=Math.max(et,st+D+Zt+G+d*2+n)+d*2;else Xt=st+D+Zt+G+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Xt=Ut-d;else Xt=Ut;if(!f)Xt-=4;let Kt=X;if(wt.attr("class").includes("label-group")||wt.attr("class").includes("annotation-group"))Kt=-wt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Zt,Et,_t){if(window.getComputedStyle(_t[Et]).textAnchor==="middle")Kt=0});wt.attr("transform",`translate(${Kt}, ${Xt})`)}),u.members.length>0||u.methods.length>0||B){let W=st+D+G+n,nt=_.line(lt.x,W,lt.x+lt.width,W+0.001,v);m.insert(()=>nt).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let W=st+D+Y+G+d*2+n,nt=_.line(lt.x,O?Math.max(et,W):W,lt.x+lt.width,(O?Math.max(et,W):W)+0.001,v);m.insert(()=>nt).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ht.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let W=RegExp(/color\s*:\s*([^;]*)/),nt=W.exec(T);if(nt){let at=nt[0].replace("color","fill");m.selectAll("tspan").attr("style",at)}else if(k){let at=W.exec(k);if(at){let wt=at[0].replace("color","fill");m.selectAll("tspan").attr("style",wt)}}}return H(e,ht),e.intersect=function(W){return N.rect(e,W)},m}t(yy,"classBox");async function xy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=At(e),u=p(),{themeVariables:m}=u,{borderColorArray:b,requirementEdgeLabelBackground:k}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ve(T,`<<${o.type}>>`,0,e.labelStyle);else B=await Ve(T,"<<Element>>",0,e.labelStyle);let _=B,v=await Ve(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let lt=await Ve(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=lt;let st=await Ve(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=st;let D=await Ve(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=D,await Ve(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let lt=await Ve(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=lt,await Ve(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let M=(T.node()?.getBBox().width??200)+c,I=(T.node()?.getBBox().height??200)+c,O=-M/2,X=-I/2,G=y.svg(T),tt=St(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=G.rectangle(O,X,M,I,tt),ht=T.insert(()=>it,":first-child");if(ht.attr("class","basic label-container outer-path").attr("style",s),b?.length){let lt=e.colorIndex??0;T.attr("data-color-id",`color-${lt%b.length}`)}if(T.selectAll(".label").each((lt,st,D)=>{let Y=h(D[st]),et=Y.attr("transform"),W=0,nt=0;if(et){let Ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(et);if(Ut)W=parseFloat(Ut[1]),nt=parseFloat(Ut[2])}let at=nt-I/2,wt=O+c/2;if(st===0||st===1)wt=W;Y.attr("transform",`translate(${wt}, ${at+c})`)}),_>B+v+n){let lt=X+B+v+n,st;if(e.look==="neo"){let et=[[O,lt],[O+M,lt],[O+M,lt+0.001],[O,lt+0.001]];st=G.polygon(et,tt)}else st=G.line(O,lt,O+M,lt,tt);T.insert(()=>st).attr("class","divider")}if(H(e,ht),e.intersect=function(lt){return N.rect(e,lt)},s&&e.look!=="handDrawn"&&(k||b?.length))T.selectAll("path").attr("style",s);return T}t(xy,"requirementBox");async function Ve(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await on(a,Uo($a(e)),{width:qn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ve,"addText");var I1=t((r)=>{switch(r){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 Cy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await Z(r,e,At(e)),u=e.padding||10,m="",b;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),b=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(b)({label:S,bbox:T}=await Ir(b,"ticket"in e&&e.ticket||"",k));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",k));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",k);e.width=c;let v=10,M=e?.width||0,I=Math.max(T.height,_.height)/2,O=Math.max(d.height+v*2,e?.height||0)+I,X=-M/2,G=-O/2;f.attr("transform","translate("+(u-M/2)+", "+(-I-d.height/2)+")"),S.attr("transform","translate("+(u-M/2)+", "+(-I+d.height/2)+")"),B.attr("transform","translate("+(u+M/2-_.width-2*a)+", "+(-I+d.height/2)+")");let tt,{rx:it,ry:ht}=e,{cssStyles:lt}=e;if(e.look==="handDrawn"){let st=y.svg(n),D=St(e,{}),Y=it||ht?st.path(Fe(X,G,M,O,it||0),D):st.rectangle(X,G,M,O,D);tt=n.insert(()=>Y,":first-child"),tt.attr("class","basic label-container").attr("style",lt?lt:null)}else{tt=n.insert("rect",":first-child"),tt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",it??5).attr("ry",ht??5).attr("x",X).attr("y",G).attr("width",M).attr("height",O);let st="priority"in e&&e.priority;if(st){let D=n.append("line"),Y=X+2,et=G+Math.floor((it??0)/2),W=G+O-Math.floor((it??0)/2);D.attr("x1",Y).attr("y1",et).attr("x2",Y).attr("y2",W).attr("stroke-width","4").attr("stroke",I1(st))}}return H(e,tt),e.height=O,e.intersect=function(st){return N.rect(e,st)},n}t(Cy,"kanbanItem");async function by(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await Z(r,e,At(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,b=a.width+20,k=a.height+20,S=Math.max(d,b),T=Math.max(f,k);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
|
|
236
|
+
l${-i},0`,"createCylinderPathD"),A1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),E1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=Math.max(e.height??0,d.height)+a,m=u/2,b=m/(2.5+u/50),k=Math.max(e.width??0,d.width)+b+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=A1(0,0,k,u,b,m),v=E1(0,0,k,u,b,m),M=B.path(_,St(e,{})),I=B.path(v,St(e,{fill:"none"}));if(T=n.insert(()=>I,":first-child"),T=n.insert(()=>M,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=M1(0,0,k,u,b,m);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",he(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",b),T.attr("transform",`translate(${-k/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-b-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),H(e,T),e.intersect=function(B){let _=N.rect(e,B),v=_.y-(e.y??0);if(m!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-b)){let M=b*b*(1-v*v/(m*m));if(M!=0)M=Math.sqrt(Math.abs(M));if(M=b-M,B.x-(e.x??0)>0)M=-M;_.x+=M}return _},n}t(hy,"tiltedCylinder");async function cy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],b,{cssStyles:k}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=St(e,{}),B=Jt(m),_=S.path(B,T);if(b=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)b.attr("style",k)}else b=tr(n,u,f,m);if(s)b.attr("style",s);return e.width=u,e.height=f,H(e,b),e.intersect=function(S){return N.polygon(e,m,S)},n}t(cy,"trapezoid");async function uy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,At(e)),m=(e?.width?e?.width:u.width)+a*2,b=(e?.height?e?.height:u.height)+c*2,{cssStyles:k}=e,S=y.svg(f),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-m/2*0.8,y:-b/2},{x:m/2*0.8,y:-b/2},{x:m/2,y:-b/2*0.6},{x:m/2,y:b/2},{x:-m/2,y:b/2},{x:-m/2,y:-b/2*0.6}],_=Jt(B),v=S.path(_,T),M=f.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")M.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")M.selectChildren("path").attr("style",s);return H(e,M),e.intersect=function(I){return N.polygon(e,B,I)},f}t(uy,"trapezoidalPentagon");var vg=10,Fg=10;async function dy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<Fg)e.width=Fg;if(e.height=e?.height??0,e.height<vg)e.height=vg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=Or(p().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,m=e?.height?e?.height:u+n.height,b=m,k=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-m}],{cssStyles:S}=e,T=y.svg(c),B=St(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=Jt(k),v=T.path(_,B),M=c.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")M.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")M.selectChildren("path").attr("style",s);return e.width=u,e.height=m,H(e,M),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(I){return l.info("Triangle intersect",e,k,I),N.polygon(e,k,I)},c}t(dy,"triangle");async function fy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,At(e)),m=(e?.width?e?.width:f.width)+(a??0)*2,b=(e?.height?e?.height:f.height)+(c??0)*2,k=e.look==="neo"?b/4:b/8,S=b+(n?k:-k),{cssStyles:T}=e,_=14-m,v=_>0?_/2:0,M=y.svg(d),I=St(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=[{x:-m/2-v,y:S/2},...kr(-m/2-v,S/2,m/2+v,S/2,k,0.8),{x:m/2+v,y:-S/2},{x:-m/2-v,y:-S/2}],G=Jt(O),Z=M.path(G,I),tt=d.insert(()=>Z,":first-child");if(tt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")tt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-k/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))},${-b/2+(e.padding??0)-k-(f.y-(f.top??0))})`),H(e,tt),e.intersect=function(it){return N.polygon(e,O,it)},d}t(fy,"waveEdgedRectangle");async function py(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let I=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-I*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,At(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,m=u/8,b=u+m*2,{cssStyles:k}=e,S=y.svg(n),T=St(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:b/2},...kr(-f/2,b/2,f/2,b/2,m,1),{x:f/2,y:-b/2},...kr(f/2,-b/2,-f/2,-b/2,m,-1)],_=Jt(B),v=S.path(_,T),M=n.insert(()=>v,":first-child");if(M.attr("class","basic label-container"),k&&e.look!=="handDrawn")M.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")M.selectAll("path").attr("style",s);return H(e,M),e.intersect=function(I){return N.polygon(e,B,I)},n}t(py,"waveRectangle");var ue=10;async function gy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-ue,10),e.height=Math.max((e?.height??0)-a*2-ue,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,At(e)),f=(e?.width?e?.width:n.width)+o*2+ue,u=(e?.height?e?.height:n.height)+a*2+ue,m=f-ue,b=u-ue,k=-m/2,S=-b/2,{cssStyles:T}=e,B=y.svg(c),_=St(e,{}),v=[{x:k-ue,y:S-ue},{x:k-ue,y:S+b},{x:k+m,y:S+b},{x:k+m,y:S-ue}],M=`M${k-ue},${S-ue} L${k+m},${S-ue} L${k+m},${S+b} L${k-ue},${S+b} L${k-ue},${S-ue}
|
|
237
|
+
M${k-ue},${S} L${k+m},${S}
|
|
238
|
+
M${k},${S-ue} L${k},${S+b}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let I=B.path(M,_),O=c.insert(()=>I,":first-child");if(O.attr("transform",`translate(${ue/2}, ${ue/2})`),O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")O.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+ue/2-(n.x-(n.left??0))}, ${-(n.height/2)+ue/2-(n.y-(n.top??0))})`),H(e,O),e.intersect=function(G){return N.polygon(e,v,G)},c}t(gy,"windowPane");var Ag=new Set(["redux-color","redux-dark-color"]),$1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:_t}=C(),{background:Pt}=_t,Gt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Pt}`]};await xc(r,Gt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:b}=e,{labelStyles:k,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let _t={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(qn(e.label,f)+_t.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Pt=await mi(r,e,_t);if(s!=null&&Ag.has(s)){let Gt=i.colorIndex??0;Pt.attr("data-color-id",`color-${Gt%d.length}`)}if(!Or(f.htmlLabels)){let Gt=Pt.select("text"),zt=Gt.node()?.getBBox();Gt.attr("transform",`translate(${-zt.width/2}, 0)`)}return Pt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=At(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],k);_.height+=m;let v=0,M=[],I=[],O=0,G=0,Z=0,tt=0,it=!0,ht=!0;for(let _t of i.attributes){let Pt=await pi(B,_t.type,f,0,v,["attribute-type"],k);O=Math.max(O,Pt.width+u);let Gt=await pi(B,_t.name,f,0,v,["attribute-name"],k);G=Math.max(G,Gt.width+u);let zt=await pi(B,_t.keys.join(),f,0,v,["attribute-keys"],k);Z=Math.max(Z,zt.width+u);let ae=await pi(B,_t.comment,f,0,v,["attribute-comment"],k);tt=Math.max(tt,ae.width+u);let oe=Math.max(Pt.height,Gt.height,zt.height,ae.height)+m;I.push({yOffset:v,rowHeight:oe}),v+=oe}let lt=4;if(Z<=u)it=!1,Z=0,lt--;if(tt<=u)ht=!1,tt=0,lt--;let st=B.node().getBBox();if(_.width+u*2-(O+G+Z+tt)>0){let _t=_.width+u*2-(O+G+Z+tt);if(O+=_t/lt,G+=_t/lt,Z>0)Z+=_t/lt;if(tt>0)tt+=_t/lt}let D=O+G+Z+tt,Y=y.svg(B),et=St(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let W=0;if(I.length>0)W=I.reduce((_t,Pt)=>_t+(Pt?.rowHeight??0),0);let nt=Math.max(st.width+u*2,e?.width||0,D),at=Math.max((W??0)+_.height,e?.height||0),wt=-nt/2,Tt=-at/2;if(B.selectAll("g:not(:first-child)").each((_t,Pt,Gt)=>{let zt=h(Gt[Pt]),ae=zt.attr("transform"),oe=0,er=0;if(ae){let We=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ae);if(We){if(oe=parseFloat(We[1]),er=parseFloat(We[2]),zt.attr("class").includes("attribute-name"))oe+=O;else if(zt.attr("class").includes("attribute-keys"))oe+=O+G;else if(zt.attr("class").includes("attribute-comment"))oe+=O+G+Z}}zt.attr("transform",`translate(${wt+u/2+oe}, ${er+Tt+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(Tt+m/2)+")"),s!=null&&Ag.has(s)){let _t=i.colorIndex??0;B.attr("data-color-id",`color-${_t%d.length}`)}let Ut=Y.rectangle(wt,Tt,nt,at,et),Xt=B.insert(()=>Ut,":first-child").attr("class","outer-path").attr("style",b.join(""));M.push(0);for(let[_t,Pt]of I.entries()){let zt=(_t+1)%2===0&&Pt.yOffset!==0,ae=Y.rectangle(wt,_.height+Tt+Pt?.yOffset,nt,Pt?.rowHeight,{...et,fill:zt?a:c,stroke:n});B.insert(()=>ae,"g.label").attr("style",b.join("")).attr("class",`row-rect-${zt?"even":"odd"}`)}let Kt=0.0001,Zt=gi(wt,_.height+Tt,nt+wt,_.height+Tt,Kt),Et=Y.polygon(Zt.map((_t)=>[_t.x,_t.y]),et);if(B.insert(()=>Et).attr("class","divider"),Zt=gi(O+wt,_.height+Tt,O+wt,at+Tt,Kt),Et=Y.polygon(Zt.map((_t)=>[_t.x,_t.y]),et),B.insert(()=>Et).attr("class","divider"),it){let _t=O+G+wt;Zt=gi(_t,_.height+Tt,_t,at+Tt,Kt),Et=Y.polygon(Zt.map((Pt)=>[Pt.x,Pt.y]),et),B.insert(()=>Et).attr("class","divider")}if(ht){let _t=O+G+Z+wt;Zt=gi(_t,_.height+Tt,_t,at+Tt,Kt),Et=Y.polygon(Zt.map((Pt)=>[Pt.x,Pt.y]),et),B.insert(()=>Et).attr("class","divider")}for(let _t of M){let Pt=_.height+Tt+_t;Zt=gi(wt,Pt,nt+wt,Pt,Kt),Et=Y.polygon(Zt.map((Gt)=>[Gt.x,Gt.y]),et),B.insert(()=>Et).attr("class","divider")}if(H(e,Xt),S&&e.look!=="handDrawn")if(s!=null&&$1.has(s))B.selectAll("path").attr("style",S);else{let Pt=S.split(";")?.filter((Gt)=>Gt.includes("stroke"))?.map((Gt)=>`${Gt}`).join("; ");B.selectAll("path").attr("style",Pt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(_t){return N.rect(e,_t)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==uo(e))e=uo(e),e=e.replaceAll("<","<").replaceAll(">",">");let d=n.node().appendChild(await on(n,e,{width:qn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("<")||e.includes(">")){let u=d.children[0];u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let f=d.getBBox();if(Or(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(gi,"lineToPolygon");async function my(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",At(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,b=0,k=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Fo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Fo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();b=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let M=await Fo(f,v,T,[v.parseClassifier()]);T+=M+a}if(k=f.node().getBBox().height,k<=0)k=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let M=await Fo(u,v,B,[v.parseClassifier()]);B+=M+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+b+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+b+(k?k+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(my,"textHelper");async function Fo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:Or(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(It(n))c=!0;let d=await on(o,Uo($a(n)),{width:qn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes(">")){if(m.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],b=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Fo,"addText");async function yy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??Or(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:b}=await my(r,e,i,f,d);Wn(m,e.colorIndex,s,c);let{labelStyles:k,nodeStyles:S}=Q(e);e.labelStyle=k,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=St(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let M=Math.max(e.width??0,b.width),I=Math.max(e.height??0,b.height),O=(e.height??0)>b.height;if(u.members.length===0&&u.methods.length===0)I+=d;else if(u.members.length>0&&u.methods.length===0)I+=d*2;let G=-M/2,Z=-I/2,tt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(O)tt=n*2;let it=_.rectangle(G-n,Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),M+2*n,I+2*n+tt,v),ht=m.insert(()=>it,":first-child");ht.attr("class","basic label-container outer-path");let lt=ht.node().getBBox(),st=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,D=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,Y=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,et=(st+D+Z+n-(Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((W,nt,at)=>{let wt=h(at[nt]),Tt=wt.attr("transform"),Ut=0;if(Tt){let Et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Tt);if(Et)Ut=parseFloat(Et[2])}let Xt=Ut+Z+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(wt.attr("class").includes("methods-group")){let Zt=Math.max(Y,d/2);if(O)Xt=Math.max(et,st+D+Zt+Z+d*2+n)+d*2;else Xt=st+D+Zt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Xt=Ut-d;else Xt=Ut;if(!f)Xt-=4;let Kt=G;if(wt.attr("class").includes("label-group")||wt.attr("class").includes("annotation-group"))Kt=-wt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Zt,Et,_t){if(window.getComputedStyle(_t[Et]).textAnchor==="middle")Kt=0});wt.attr("transform",`translate(${Kt}, ${Xt})`)}),u.members.length>0||u.methods.length>0||B){let W=st+D+Z+n,nt=_.line(lt.x,W,lt.x+lt.width,W+0.001,v);m.insert(()=>nt).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let W=st+D+Y+Z+d*2+n,nt=_.line(lt.x,O?Math.max(et,W):W,lt.x+lt.width,(O?Math.max(et,W):W)+0.001,v);m.insert(()=>nt).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ht.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let W=RegExp(/color\s*:\s*([^;]*)/),nt=W.exec(T);if(nt){let at=nt[0].replace("color","fill");m.selectAll("tspan").attr("style",at)}else if(k){let at=W.exec(k);if(at){let wt=at[0].replace("color","fill");m.selectAll("tspan").attr("style",wt)}}}return H(e,ht),e.intersect=function(W){return N.rect(e,W)},m}t(yy,"classBox");async function xy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=At(e),u=p(),{themeVariables:m}=u,{borderColorArray:b,requirementEdgeLabelBackground:k}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ve(T,`<<${o.type}>>`,0,e.labelStyle);else B=await Ve(T,"<<Element>>",0,e.labelStyle);let _=B,v=await Ve(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let lt=await Ve(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=lt;let st=await Ve(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=st;let D=await Ve(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=D,await Ve(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let lt=await Ve(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=lt,await Ve(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let M=(T.node()?.getBBox().width??200)+c,I=(T.node()?.getBBox().height??200)+c,O=-M/2,G=-I/2,Z=y.svg(T),tt=St(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let it=Z.rectangle(O,G,M,I,tt),ht=T.insert(()=>it,":first-child");if(ht.attr("class","basic label-container outer-path").attr("style",s),b?.length){let lt=e.colorIndex??0;T.attr("data-color-id",`color-${lt%b.length}`)}if(T.selectAll(".label").each((lt,st,D)=>{let Y=h(D[st]),et=Y.attr("transform"),W=0,nt=0;if(et){let Ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(et);if(Ut)W=parseFloat(Ut[1]),nt=parseFloat(Ut[2])}let at=nt-I/2,wt=O+c/2;if(st===0||st===1)wt=W;Y.attr("transform",`translate(${wt}, ${at+c})`)}),_>B+v+n){let lt=G+B+v+n,st;if(e.look==="neo"){let et=[[O,lt],[O+M,lt],[O+M,lt+0.001],[O,lt+0.001]];st=Z.polygon(et,tt)}else st=Z.line(O,lt,O+M,lt,tt);T.insert(()=>st).attr("class","divider")}if(H(e,ht),e.intersect=function(lt){return N.rect(e,lt)},s&&e.look!=="handDrawn"&&(k||b?.length))T.selectAll("path").attr("style",s);return T}t(xy,"requirementBox");async function Ve(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await on(a,Uo($a(e)),{width:qn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ve,"addText");var I1=t((r)=>{switch(r){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 Cy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,At(e)),u=e.padding||10,m="",b;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),b=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(b)({label:S,bbox:T}=await Ir(b,"ticket"in e&&e.ticket||"",k));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",k));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",k);e.width=c;let v=10,M=e?.width||0,I=Math.max(T.height,_.height)/2,O=Math.max(d.height+v*2,e?.height||0)+I,G=-M/2,Z=-O/2;f.attr("transform","translate("+(u-M/2)+", "+(-I-d.height/2)+")"),S.attr("transform","translate("+(u-M/2)+", "+(-I+d.height/2)+")"),B.attr("transform","translate("+(u+M/2-_.width-2*a)+", "+(-I+d.height/2)+")");let tt,{rx:it,ry:ht}=e,{cssStyles:lt}=e;if(e.look==="handDrawn"){let st=y.svg(n),D=St(e,{}),Y=it||ht?st.path(Fe(G,Z,M,O,it||0),D):st.rectangle(G,Z,M,O,D);tt=n.insert(()=>Y,":first-child"),tt.attr("class","basic label-container").attr("style",lt?lt:null)}else{tt=n.insert("rect",":first-child"),tt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",it??5).attr("ry",ht??5).attr("x",G).attr("y",Z).attr("width",M).attr("height",O);let st="priority"in e&&e.priority;if(st){let D=n.append("line"),Y=G+2,et=Z+Math.floor((it??0)/2),W=Z+O-Math.floor((it??0)/2);D.attr("x1",Y).attr("y1",et).attr("x2",Y).attr("y2",W).attr("stroke-width","4").attr("stroke",I1(st))}}return H(e,tt),e.height=O,e.intersect=function(st){return N.rect(e,st)},n}t(Cy,"kanbanItem");async function by(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,At(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,b=a.width+20,k=a.height+20,S=Math.max(d,b),T=Math.max(f,k);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
|
|
239
239
|
a${u},${u} 1 0,0 ${S*0.25},${-1*T*0.1}
|
|
240
240
|
a${u},${u} 1 0,0 ${S*0.25},0
|
|
241
241
|
a${u},${u} 1 0,0 ${S*0.25},0
|
|
@@ -253,7 +253,7 @@ ${o.join(`
|
|
|
253
253
|
a${u},${u} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
|
|
254
254
|
a${u*0.8},${u*0.8} 1 0,0 0,${-1*T*0.34}
|
|
255
255
|
a${u},${u} 1 0,0 ${S*0.1},${-1*T*0.33}
|
|
256
|
-
H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),M=St(e,{}),I=v.path(_,M);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",he(m))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),H(e,B),e.calcIntersect=function(v,M){return N.rect(v,M)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(by,"bang");async function ky(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await
|
|
256
|
+
H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),M=St(e,{}),I=v.path(_,M);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",he(m))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),H(e,B),e.calcIntersect=function(v,M){return N.rect(v,M)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(by,"bang");async function ky(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,At(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,m=0.25*d,b=0.35*d,k=0.2*d,{cssStyles:S}=e,T,B=`M0 0
|
|
257
257
|
a${u},${u} 0 0,1 ${d*0.25},${-1*d*0.1}
|
|
258
258
|
a${b},${b} 1 0,1 ${d*0.4},${-1*d*0.1}
|
|
259
259
|
a${m},${m} 1 0,1 ${d*0.35},${d*0.2}
|
|
@@ -267,7 +267,7 @@ ${o.join(`
|
|
|
267
267
|
|
|
268
268
|
a${u},${u} 1 0,1 ${-1*d*0.1},${-1*f*0.35}
|
|
269
269
|
a${k},${k} 1 0,1 ${d*0.1},${-1*f*0.65}
|
|
270
|
-
H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=St(e,{}),M=_.path(B,v);T=o.insert(()=>M,":first-child"),T.attr("class","basic label-container").attr("style",he(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-d/2}, ${-f/2})`),H(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(ky,"cloud");async function wy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await
|
|
270
|
+
H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=St(e,{}),M=_.path(B,v);T=o.insert(()=>M,":first-child"),T.attr("class","basic label-container").attr("style",he(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-d/2}, ${-f/2})`),H(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(ky,"cloud");async function wy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,At(e)),d=a.width+8*c,f=a.height+2*c,u=5,m=e.look==="neo"?`
|
|
271
271
|
M${-d/2} ${f/2-u}
|
|
272
272
|
v${-f+2*u}
|
|
273
273
|
q0,-${u} ${u},-${u}
|
|
@@ -287,16 +287,16 @@ ${o.join(`
|
|
|
287
287
|
h${-(d-2*u)}
|
|
288
288
|
q${-u},0 ${-u},${-u}
|
|
289
289
|
Z
|
|
290
|
-
`;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let b=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),H(e,b),e.calcIntersect=function(k,S){return N.rect(k,S)},e.intersect=function(k){return N.rect(e,k)},o}t(wy,"defaultMindmapNode");async function Sy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(Sy,"mindmapCircle");var O1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ty},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ey},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:sy},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Jg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:nm},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:im},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:pm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:by},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ky},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Gm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Om},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Im},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:cy},{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:Em},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ly},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:om},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Qm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:oy},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:iy},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Sm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:_m},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:cm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:um},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Dm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fy},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:hy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Pm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ym},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:dy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:gy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:uy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:km},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Jm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Um},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:jm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Qg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ny},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ay},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:py},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Vm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Rm}],D1=t(()=>{let e=[...Object.entries({state:ry,choice:sm,note:Xm,composite:am,rectWithTitle:Km,labelRect:$m,block_arrow:rm,collapsedGroup:em,iconSquare:Mm,iconCircle:Lm,icon:vm,iconRounded:Fm,imageSquare:Am,anchor:Xg,kanbanItem:Cy,mindmapCircle:Sy,defaultMindmapNode:wy,classBox:yy,erBox:xc,requirementBox:xy,usecaseActor:qm,usecaseActorHollow:Nm,usecaseActorAwesome:Wm,usecaseActorIcon:zm,usecaseBusiness:Hm,usecaseEllipse:Cm,usecaseJsonTable:Ym}),...O1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Ou=D1();function Jl(r){return r in Ou}t(Jl,"isValidShape");var ma=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),la=new Map;async function fa(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?Ou[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",he(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(fa,"insertNode");var Hg=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),Wg=t(()=>{la.clear()},"clear"),Gr=t((r)=>{let e=la.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var P1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:b,backgroundStyles:k}=Q(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Wn(S,e.colorIndex,s,d);let T=Or(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await on(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),M=v.getBBox();if(T){let et=v.children[0],W=h(v);M=et.getBoundingClientRect(),W.attr("width",M.width),W.attr("height",M.height)}let I=e.padding??0,O=e.width<=M.width+I?M.width+I:e.width;if(e.width<=M.width+I)e.diff=(O-e.width)/2-I;else e.diff=-I;let X=e.height,G=e.y-X/2,tt=e.y+X/2,it=e.x-O/2,ht=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:G+X/3,lt=B?4:0,st=M.height+2*lt,D,Y;if(B){let et=Math.max(st,M.height+2*lt),W=it+et,nt=Math.max(0,O-et);if(e.look==="handDrawn"){let Tt=y.svg(S),Ut=St(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Xt=St(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Kt=Tt.rectangle(it,G,et,X,Ut);D=S.insert(()=>Kt,":first-child").attr("class","swimlane-title");let Zt=Tt.rectangle(W,G,nt,X,Xt);Y=S.insert(()=>Zt,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",b.join(";")),D.select("path").attr("style",k.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),Y=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",it).attr("y",G).attr("width",et).attr("height",X).attr("fill",c).attr("stroke",f),Y.attr("class","swimlane-body").attr("style",m).attr("x",W).attr("y",G).attr("width",nt).attr("height",X).attr("fill","none").attr("stroke",f);let at=it+et/2,wt=e.y;_.attr("transform",`translate(${at}, ${wt}) rotate(-90) translate(${-M.width/2}, ${-M.height/2})`)}else{let et=Math.max(0,ht-G),W=Math.min(st,et),nt=G+W,at=Math.max(0,tt-nt),wt=e.x-O/2;if(e.look==="handDrawn"){let Xt=y.svg(S),Kt=St(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Zt=St(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Et=Xt.rectangle(wt,G,O,W,Kt);D=S.insert(()=>Et,":first-child").attr("class","swimlane-title");let _t=Xt.rectangle(wt,nt,O,at,Zt);Y=S.insert(()=>_t,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",b.join(";")),D.select("path").attr("style",k.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),Y=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",wt).attr("y",G).attr("width",O).attr("height",W).attr("fill",c).attr("stroke",f),Y.attr("class","swimlane-body").attr("style",m).attr("x",wt).attr("y",nt).attr("width",O).attr("height",at).attr("fill","none").attr("stroke",f);let Tt=e.x-M.width/2,Ut=G+(W-M.height)/2;_.attr("transform",`translate(${Tt}, ${Ut})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let et=_.select("span");if(et)et.attr("style",u)}return e.offsetX=0,e.width=O,e.height=X,e.offsetY=M.height-I/2,e.intersect=function(et){return Je(e,et)},{cluster:S,labelBBox:M}},"swimlane"),Ty=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:b}=Q(e),k=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Wn(k,e.colorIndex,s,d);let S=qt(i),T=k.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await on(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await qe(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(qt(i)){let it=B.children[0],ht=h(B);_=it.getBoundingClientRect(),ht.attr("width",_.width),ht.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let M=e.height,I=e.x-v/2,O=e.y-M/2;l.trace("Data ",e,JSON.stringify(e));let X;if(e.look==="handDrawn"){let it=y.svg(k),ht=St(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),lt=it.path(Fe(I,O,v,M,0),ht);X=k.insert(()=>(l.debug("Rough node insert CXC",lt),lt),":first-child"),X.select("path:nth-child(2)").attr("style",m.join(";")),X.select("path").attr("style",b.join(";").replace("fill","stroke"))}else X=k.insert("rect",":first-child"),X.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",I).attr("y",O).attr("width",v).attr("height",M);let{subGraphTitleTopMargin:G}=ma(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+G})`),f){let it=T.select("span");if(it)it.attr("style",f)}let tt=X.node().getBBox();return e.offsetX=0,e.width=tt.width,e.height=tt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(it){return Je(e,it)},{cluster:k,labelBBox:_}},"rect"),R1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),q1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Wn(m,e.colorIndex,s,n);let b=m.insert("g",":first-child"),k=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await qe(k,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(qt(i)){let lt=T.children[0],st=h(T);B=lt.getBoundingClientRect(),st.attr("width",B.width),st.attr("height",B.height)}let _=0*e.padding,v=_/2,M=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(M-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height+_,O=e.height+_-B.height-6,X=e.x-M/2,G=e.y-I/2;e.width=M;let tt=e.y-e.height/2-v+B.height+2,it;if(e.look==="handDrawn"){let lt=e.cssClasses.includes("statediagram-cluster-alt"),st=y.svg(m),D=e.rx||e.ry?st.path(Fe(X,G,M,I,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):st.rectangle(X,G,M,I,{seed:a});it=m.insert(()=>D,":first-child");let Y=st.rectangle(X,tt,M,O,{fill:lt?c:d,fillStyle:lt?"hachure":"solid",stroke:u,seed:a});it=m.insert(()=>D,":first-child"),S=m.insert(()=>Y),it.attr("class","outer"),S.attr("class","inner")}else{it=b.insert("rect",":first-child");let lt="outer";it.attr("class",lt).attr("x",X).attr("y",G).attr("width",M).attr("height",I).attr("data-look",e.look),S.attr("class","inner").attr("x",X).attr("y",tt).attr("width",M).attr("height",O)}k.attr("transform",`translate(${e.x-B.width/2}, ${G+1-(qt(i)?0:3)})`);let ht=it.node().getBBox();return e.height=ht.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(lt){return Je(e,lt)},{cluster:m,labelBBox:B}},"roundedWithTitle"),W1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=qt(i),k=m.insert("g").attr("class","cluster-label "),S=await on(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),T=S.getBBox();if(qt(i)){let G=S.children[0],tt=h(S);T=G.getBoundingClientRect(),tt.attr("width",T.width),tt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,M=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let I;if(e.look==="handDrawn"){let G=y.svg(m),tt=St(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),it=G.path(Fe(v,M,B,_,e.rx),tt);I=m.insert(()=>(l.debug("Rough node insert CXC",it),it),":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=m.insert("rect",":first-child"),I.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",M).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:O}=ma(i);if(k.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+O})`),n){let G=k.select("span");if(G)G.attr("style",n)}let X=I.node().getBBox();return e.offsetX=0,e.width=X.width,e.height=X.height,e.offsetY=T.height-e.padding/2,e.intersect=function(G){return Je(e,G)},{cluster:m,labelBBox:T}},"kanbanSection"),N1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Wn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,b=e.width+m;e.diff=-e.padding;let k=e.height+m,S=e.x-b/2,T=e.y-k/2;e.width=b;let B;if(e.look==="handDrawn"){let M=y.svg(f).rectangle(S,T,b,k,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>M,":first-child").attr("class","divider")}else{B=u.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",b).attr("height",k).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),z1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Wn(u,e.colorIndex,o,n);let m=qt(s),b=u.insert("g").attr("class","cluster-label"),k={width:0,height:0},S=e.label?.trim();if(S){let O;if(e.labelType==="markdown")O=await on(b,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else O=await qe(b,e.label,e.labelStyle||"",!1,!0);if(k=O.getBBox(),m){let X=O.children[0],G=h(O);k=X.getBoundingClientRect(),G.attr("width",k.width),G.attr("height",k.height)}}let T=e.width<=k.width+e.padding?k.width+e.padding:e.width;if(e.width<=k.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,M;if(e.look==="handDrawn"){let O=y.svg(u),X=St(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),G=O.path(Fe(_,v,T,B,i.rx),X);M=u.insert(()=>G,":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";"))}else if(M=u.insert("rect",":first-child"),M.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)M.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:O}=ma(s);if(b.attr("transform",`translate(${e.x-k.width/2}, ${e.y-e.height/2+O})`),d){let X=b.select("span");if(X)X.attr("style",d)}}let I=M.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=k.height-e.padding/2,e.intersect=function(O){return Je(e,O)},{cluster:u,labelBBox:k}},"createContainerGroup"),H1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return z1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),Y1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),j1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ue(e),b=e.boundaryType||"rect",k=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${b} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",b).attr("data-look",e.look);Wn(k,e.colorIndex,s,d);let S=qt(i),T=k.insert("g").attr("class","cluster-label system-boundary-title"),B=await on(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let D=B.children[0],Y=h(B);_=D.getBoundingClientRect(),Y.attr("width",_.width),Y.attr("height",_.height)}let v=Y1(e,_),{width:M,height:I,x:O,y:X,bodyY:G,bodyHeight:tt,tabHeight:it,tabWidth:ht}=v;e.diff=e.width<=_.width+e.padding?(M-e.width)/2-e.padding:-e.padding;let lt=St(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let D=y.svg(k),Y=D.rectangle(O,G,M,tt,lt);if(k.insert(()=>Y,":first-child").attr("class","boundary-body label-container"),b==="package"){let et=D.rectangle(O,X,ht,it,lt);k.insert(()=>et,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(k.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",O).attr("y",G).attr("width",M).attr("height",tt),b==="package")k.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",O).attr("y",X).attr("width",ht).attr("height",it);let{subGraphTitleTopMargin:st}=ma(i);if(b==="package")T.attr("transform",`translate(${O+(ht-_.width)/2}, ${X+(it-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${X+st})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=M,e.height=I,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(D){return Je(e,D)},{cluster:k,labelBBox:_}},"usecaseSystemBoundary"),U1=Ty,X1={rect:Ty,squareRect:U1,roundedWithTitle:q1,noteGroup:R1,divider:N1,kanbanSection:W1,flowGroup:H1,usecaseSystemBoundary:j1,swimlane:P1},G1=new Set(["noteGroup","divider"]),Hf=t((r)=>!G1.has(r??"rect"),"clusterPaintsTitle"),By=new Map,mo=t(async(r,e)=>{let i=e.shape||"rect",s=await X1[i](r,e);return By.set(e.id,s),s},"insertCluster"),Kg=t(()=>{By=new Map},"clear");var Ao=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Ht={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Tp={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=le(r),e=le(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var le=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),V1=t((r)=>({x:t(function(e,i,s){let o=0,a=le(s[0]).x<le(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:k,deltaX:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.cos(k)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:k,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.cos(k)*(S>=0?1:-1)}let c=Math.abs(le(e).x-le(s[s.length-1]).x),n=Math.abs(le(e).y-le(s[s.length-1]).y),d=Math.abs(le(e).x-le(s[0]).x),f=Math.abs(le(e).y-le(s[0]).y),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],b=1;if(c<m&&c>0&&n<m){let k=m+b-c;k*=a==="right"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+b-d;k*=a==="right"?-1:1,o+=k}return le(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=le(s[0]).y<le(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:k,deltaY:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.abs(Math.sin(k))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:k,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.abs(Math.sin(k))*(S>=0?1:-1)}let c=Math.abs(le(e).y-le(s[s.length-1]).y),n=Math.abs(le(e).x-le(s[s.length-1]).x),d=Math.abs(le(e).y-le(s[0]).y),f=Math.abs(le(e).x-le(s[0]).x),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],b=1;if(c<m&&c>0&&n<m){let k=m+b-c;k*=a==="up"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+b-d;k*=a==="up"?-1:1,o+=k}return le(e).y+o},"y")}),"getLineFunctionsWithOffset"),K1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)_y(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)_y(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),Z1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",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}},Q1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_y=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=Z1[i],f=d&&Q1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,k=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${k}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(k);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((M)=>{if(M.setAttribute("stroke",n),d.fill)M.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${k})`)},"addEdgeMarker"),J1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),Ms=new Map,Wt=new Map,Vg=t(()=>{Ms.clear(),Wt.clear()},"clear"),Wf=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),ga=t(async(r,e)=>{let i=p(),s=qt(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await on(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let k=f.children[0],S=h(f);u=await ur.measure(()=>k.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let k=h(f).select("text").node();await ur.measure(()=>{if(u=f.getBBox(),k&&typeof k.getBBox==="function")m=k.getBBox();else m=u})}c.attr("transform",Ao(m,s)),Ms.set(e.id,a),e.width=u.width,e.height=u.height;let b;if(e.startLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startLeft=k,Io(b,e.startLabelLeft)}if(e.startLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startRight=k,Io(b,e.startLabelRight)}if(e.endLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(k,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endLeft=k,Io(b,e.endLabelLeft)}if(e.endLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(k,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endRight=k,Io(b,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(qt(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var Ps=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,Ms.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=ma(s);if(r.label){let a=Ms.get(r.id),{x:c,y:n}=r;if(i){let d=K.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Wt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Wt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Wt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Wt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),t2=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),e2=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),r2=t((r,e,i)=>{l.debug(`intersection calc abc89:
|
|
290
|
+
`;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let b=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),H(e,b),e.calcIntersect=function(k,S){return N.rect(k,S)},e.intersect=function(k){return N.rect(e,k)},o}t(wy,"defaultMindmapNode");async function Sy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(Sy,"mindmapCircle");var O1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ty},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ey},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:sy},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Jg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:nm},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:im},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:pm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:by},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ky},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Gm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Om},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Im},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:cy},{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:Em},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ly},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:om},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Qm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:oy},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:iy},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Sm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:_m},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:cm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:um},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Dm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fy},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:hy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Pm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ym},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:dy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:gy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:uy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:km},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Jm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Um},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:jm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Qg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ny},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ay},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:py},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Vm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Rm}],D1=t(()=>{let e=[...Object.entries({state:ry,choice:sm,note:Xm,composite:am,rectWithTitle:Km,labelRect:$m,block_arrow:rm,collapsedGroup:em,iconSquare:Mm,iconCircle:Lm,icon:vm,iconRounded:Fm,imageSquare:Am,anchor:Xg,kanbanItem:Cy,mindmapCircle:Sy,defaultMindmapNode:wy,classBox:yy,erBox:xc,requirementBox:xy,usecaseActor:qm,usecaseActorHollow:Nm,usecaseActorAwesome:Wm,usecaseActorIcon:zm,usecaseBusiness:Hm,usecaseEllipse:Cm,usecaseJsonTable:Ym}),...O1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Ou=D1();function Jl(r){return r in Ou}t(Jl,"isValidShape");var ma=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),la=new Map;async function fa(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?Ou[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",he(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(fa,"insertNode");var Hg=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),Wg=t(()=>{la.clear()},"clear"),Gr=t((r)=>{let e=la.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var P1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:b,backgroundStyles:k}=Q(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Wn(S,e.colorIndex,s,d);let T=Or(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await on(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),M=v.getBBox();if(T){let et=v.children[0],W=h(v);M=et.getBoundingClientRect(),W.attr("width",M.width),W.attr("height",M.height)}let I=e.padding??0,O=e.width<=M.width+I?M.width+I:e.width;if(e.width<=M.width+I)e.diff=(O-e.width)/2-I;else e.diff=-I;let G=e.height,Z=e.y-G/2,tt=e.y+G/2,it=e.x-O/2,ht=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+G/3,lt=B?4:0,st=M.height+2*lt,D,Y;if(B){let et=Math.max(st,M.height+2*lt),W=it+et,nt=Math.max(0,O-et);if(e.look==="handDrawn"){let Tt=y.svg(S),Ut=St(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Xt=St(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Kt=Tt.rectangle(it,Z,et,G,Ut);D=S.insert(()=>Kt,":first-child").attr("class","swimlane-title");let Zt=Tt.rectangle(W,Z,nt,G,Xt);Y=S.insert(()=>Zt,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",b.join(";")),D.select("path").attr("style",k.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),Y=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",it).attr("y",Z).attr("width",et).attr("height",G).attr("fill",c).attr("stroke",f),Y.attr("class","swimlane-body").attr("style",m).attr("x",W).attr("y",Z).attr("width",nt).attr("height",G).attr("fill","none").attr("stroke",f);let at=it+et/2,wt=e.y;_.attr("transform",`translate(${at}, ${wt}) rotate(-90) translate(${-M.width/2}, ${-M.height/2})`)}else{let et=Math.max(0,ht-Z),W=Math.min(st,et),nt=Z+W,at=Math.max(0,tt-nt),wt=e.x-O/2;if(e.look==="handDrawn"){let Xt=y.svg(S),Kt=St(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Zt=St(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Et=Xt.rectangle(wt,Z,O,W,Kt);D=S.insert(()=>Et,":first-child").attr("class","swimlane-title");let _t=Xt.rectangle(wt,nt,O,at,Zt);Y=S.insert(()=>_t,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",b.join(";")),D.select("path").attr("style",k.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),Y=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",wt).attr("y",Z).attr("width",O).attr("height",W).attr("fill",c).attr("stroke",f),Y.attr("class","swimlane-body").attr("style",m).attr("x",wt).attr("y",nt).attr("width",O).attr("height",at).attr("fill","none").attr("stroke",f);let Tt=e.x-M.width/2,Ut=Z+(W-M.height)/2;_.attr("transform",`translate(${Tt}, ${Ut})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let et=_.select("span");if(et)et.attr("style",u)}return e.offsetX=0,e.width=O,e.height=G,e.offsetY=M.height-I/2,e.intersect=function(et){return Je(e,et)},{cluster:S,labelBBox:M}},"swimlane"),Ty=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:b}=Q(e),k=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Wn(k,e.colorIndex,s,d);let S=qt(i),T=k.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await on(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await qe(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(qt(i)){let it=B.children[0],ht=h(B);_=it.getBoundingClientRect(),ht.attr("width",_.width),ht.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let M=e.height,I=e.x-v/2,O=e.y-M/2;l.trace("Data ",e,JSON.stringify(e));let G;if(e.look==="handDrawn"){let it=y.svg(k),ht=St(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),lt=it.path(Fe(I,O,v,M,0),ht);G=k.insert(()=>(l.debug("Rough node insert CXC",lt),lt),":first-child"),G.select("path:nth-child(2)").attr("style",m.join(";")),G.select("path").attr("style",b.join(";").replace("fill","stroke"))}else G=k.insert("rect",":first-child"),G.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",I).attr("y",O).attr("width",v).attr("height",M);let{subGraphTitleTopMargin:Z}=ma(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),f){let it=T.select("span");if(it)it.attr("style",f)}let tt=G.node().getBBox();return e.offsetX=0,e.width=tt.width,e.height=tt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(it){return Je(e,it)},{cluster:k,labelBBox:_}},"rect"),R1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),q1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Wn(m,e.colorIndex,s,n);let b=m.insert("g",":first-child"),k=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await qe(k,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(qt(i)){let lt=T.children[0],st=h(T);B=lt.getBoundingClientRect(),st.attr("width",B.width),st.attr("height",B.height)}let _=0*e.padding,v=_/2,M=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(M-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height+_,O=e.height+_-B.height-6,G=e.x-M/2,Z=e.y-I/2;e.width=M;let tt=e.y-e.height/2-v+B.height+2,it;if(e.look==="handDrawn"){let lt=e.cssClasses.includes("statediagram-cluster-alt"),st=y.svg(m),D=e.rx||e.ry?st.path(Fe(G,Z,M,I,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):st.rectangle(G,Z,M,I,{seed:a});it=m.insert(()=>D,":first-child");let Y=st.rectangle(G,tt,M,O,{fill:lt?c:d,fillStyle:lt?"hachure":"solid",stroke:u,seed:a});it=m.insert(()=>D,":first-child"),S=m.insert(()=>Y),it.attr("class","outer"),S.attr("class","inner")}else{it=b.insert("rect",":first-child");let lt="outer";it.attr("class",lt).attr("x",G).attr("y",Z).attr("width",M).attr("height",I).attr("data-look",e.look),S.attr("class","inner").attr("x",G).attr("y",tt).attr("width",M).attr("height",O)}k.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(qt(i)?0:3)})`);let ht=it.node().getBBox();return e.height=ht.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(lt){return Je(e,lt)},{cluster:m,labelBBox:B}},"roundedWithTitle"),W1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=qt(i),k=m.insert("g").attr("class","cluster-label "),S=await on(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),T=S.getBBox();if(qt(i)){let Z=S.children[0],tt=h(S);T=Z.getBoundingClientRect(),tt.attr("width",T.width),tt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,M=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let I;if(e.look==="handDrawn"){let Z=y.svg(m),tt=St(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),it=Z.path(Fe(v,M,B,_,e.rx),tt);I=m.insert(()=>(l.debug("Rough node insert CXC",it),it),":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=m.insert("rect",":first-child"),I.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",M).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:O}=ma(i);if(k.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+O})`),n){let Z=k.select("span");if(Z)Z.attr("style",n)}let G=I.node().getBBox();return e.offsetX=0,e.width=G.width,e.height=G.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Je(e,Z)},{cluster:m,labelBBox:T}},"kanbanSection"),N1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Wn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,b=e.width+m;e.diff=-e.padding;let k=e.height+m,S=e.x-b/2,T=e.y-k/2;e.width=b;let B;if(e.look==="handDrawn"){let M=y.svg(f).rectangle(S,T,b,k,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>M,":first-child").attr("class","divider")}else{B=u.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",b).attr("height",k).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),z1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Wn(u,e.colorIndex,o,n);let m=qt(s),b=u.insert("g").attr("class","cluster-label"),k={width:0,height:0},S=e.label?.trim();if(S){let O;if(e.labelType==="markdown")O=await on(b,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else O=await qe(b,e.label,e.labelStyle||"",!1,!0);if(k=O.getBBox(),m){let G=O.children[0],Z=h(O);k=G.getBoundingClientRect(),Z.attr("width",k.width),Z.attr("height",k.height)}}let T=e.width<=k.width+e.padding?k.width+e.padding:e.width;if(e.width<=k.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,M;if(e.look==="handDrawn"){let O=y.svg(u),G=St(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=O.path(Fe(_,v,T,B,i.rx),G);M=u.insert(()=>Z,":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";"))}else if(M=u.insert("rect",":first-child"),M.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)M.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:O}=ma(s);if(b.attr("transform",`translate(${e.x-k.width/2}, ${e.y-e.height/2+O})`),d){let G=b.select("span");if(G)G.attr("style",d)}}let I=M.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=k.height-e.padding/2,e.intersect=function(O){return Je(e,O)},{cluster:u,labelBBox:k}},"createContainerGroup"),H1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return z1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),Y1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),j1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ue(e),b=e.boundaryType||"rect",k=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${b} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",b).attr("data-look",e.look);Wn(k,e.colorIndex,s,d);let S=qt(i),T=k.insert("g").attr("class","cluster-label system-boundary-title"),B=await on(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let D=B.children[0],Y=h(B);_=D.getBoundingClientRect(),Y.attr("width",_.width),Y.attr("height",_.height)}let v=Y1(e,_),{width:M,height:I,x:O,y:G,bodyY:Z,bodyHeight:tt,tabHeight:it,tabWidth:ht}=v;e.diff=e.width<=_.width+e.padding?(M-e.width)/2-e.padding:-e.padding;let lt=St(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let D=y.svg(k),Y=D.rectangle(O,Z,M,tt,lt);if(k.insert(()=>Y,":first-child").attr("class","boundary-body label-container"),b==="package"){let et=D.rectangle(O,G,ht,it,lt);k.insert(()=>et,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(k.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",O).attr("y",Z).attr("width",M).attr("height",tt),b==="package")k.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",O).attr("y",G).attr("width",ht).attr("height",it);let{subGraphTitleTopMargin:st}=ma(i);if(b==="package")T.attr("transform",`translate(${O+(ht-_.width)/2}, ${G+(it-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${G+st})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=M,e.height=I,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(D){return Je(e,D)},{cluster:k,labelBBox:_}},"usecaseSystemBoundary"),U1=Ty,X1={rect:Ty,squareRect:U1,roundedWithTitle:q1,noteGroup:R1,divider:N1,kanbanSection:W1,flowGroup:H1,usecaseSystemBoundary:j1,swimlane:P1},G1=new Set(["noteGroup","divider"]),Hf=t((r)=>!G1.has(r??"rect"),"clusterPaintsTitle"),By=new Map,mo=t(async(r,e)=>{let i=e.shape||"rect",s=await X1[i](r,e);return By.set(e.id,s),s},"insertCluster"),Kg=t(()=>{By=new Map},"clear");var Ao=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Ht={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Tp={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=le(r),e=le(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var le=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),V1=t((r)=>({x:t(function(e,i,s){let o=0,a=le(s[0]).x<le(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:k,deltaX:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.cos(k)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:k,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.cos(k)*(S>=0?1:-1)}let c=Math.abs(le(e).x-le(s[s.length-1]).x),n=Math.abs(le(e).y-le(s[s.length-1]).y),d=Math.abs(le(e).x-le(s[0]).x),f=Math.abs(le(e).y-le(s[0]).y),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],b=1;if(c<m&&c>0&&n<m){let k=m+b-c;k*=a==="right"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+b-d;k*=a==="right"?-1:1,o+=k}return le(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=le(s[0]).y<le(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:k,deltaY:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.abs(Math.sin(k))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:k,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.abs(Math.sin(k))*(S>=0?1:-1)}let c=Math.abs(le(e).y-le(s[s.length-1]).y),n=Math.abs(le(e).x-le(s[s.length-1]).x),d=Math.abs(le(e).y-le(s[0]).y),f=Math.abs(le(e).x-le(s[0]).x),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],b=1;if(c<m&&c>0&&n<m){let k=m+b-c;k*=a==="up"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+b-d;k*=a==="up"?-1:1,o+=k}return le(e).y+o},"y")}),"getLineFunctionsWithOffset"),K1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)_y(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)_y(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),Z1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",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}},Q1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_y=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=Z1[i],f=d&&Q1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,k=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${k}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(k);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((M)=>{if(M.setAttribute("stroke",n),d.fill)M.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${k})`)},"addEdgeMarker"),J1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),Ms=new Map,Wt=new Map,Vg=t(()=>{Ms.clear(),Wt.clear()},"clear"),Wf=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),ga=t(async(r,e)=>{let i=p(),s=qt(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await on(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let k=f.children[0],S=h(f);u=await ur.measure(()=>k.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let k=h(f).select("text").node();await ur.measure(()=>{if(u=f.getBBox(),k&&typeof k.getBBox==="function")m=k.getBBox();else m=u})}c.attr("transform",Ao(m,s)),Ms.set(e.id,a),e.width=u.width,e.height=u.height;let b;if(e.startLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startLeft=k,Io(b,e.startLabelLeft)}if(e.startLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startRight=k,Io(b,e.startLabelRight)}if(e.endLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(k,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endLeft=k,Io(b,e.endLabelLeft)}if(e.endLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),S=k.insert("g").attr("class","inner"),T=await qe(k,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);b=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Ao(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endRight=k,Io(b,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(qt(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var Ps=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,Ms.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=ma(s);if(r.label){let a=Ms.get(r.id),{x:c,y:n}=r;if(i){let d=K.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Wt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Wt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Wt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Wt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=K.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),t2=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),e2=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),r2=t((r,e,i)=>{l.debug(`intersection calc abc89:
|
|
291
291
|
outsidePoint: ${JSON.stringify(e)}
|
|
292
292
|
insidePoint : ${JSON.stringify(i)}
|
|
293
|
-
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let b={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)b.x=e.x,b.y=e.y;if(u===0)b.x=e.x;if(f===0)b.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,b),b}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,b=i.x<e.x?i.x+u-n:i.x-u+n,k=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:b,_y:k}),n===0)b=e.x,k=e.y;if(u===0)b=e.x;if(f===0)k=e.y;return{x:b,y:k}}},"intersection"),vy=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!e2(e,a)&&!o){let c=r2(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function Fy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Fy,"extractCornerPoints");var Ly=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),i2=t(function(r){let{cornerPointPositions:e}=Fy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=Ly(o,c,5),d=Ly(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,b={x:c.x,y:c.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let k=5;if(c.x===n.x)b={x:f<0?n.x-k+m:n.x+k-m,y:u<0?n.y-m:n.y+m};else b={x:f<0?n.x-m:n.x+m,y:u<0?n.y-k+m:n.y+k-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(b,d)}else i.push(r[s]);return i},"fixCorners"),o2=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),fo=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,b=o;var k=a;let S=[];for(let at in e.cssCompiledStyles){if(Ru(at))continue;S.push(e.cssCompiledStyles[at])}if(f==="swimlane"){if(k.intersect&&b.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[b.intersect(u[0]),k.intersect(u[1])];else{let at=u.slice(1,-1),wt=at[0],Tt=at[at.length-1],Ut=0.5,Xt=Math.abs(u[u.length-1].x-Tt.x)<0.5&&Math.abs(u[u.length-1].y-Tt.y)<0.5,Kt=b.intersect(wt),Zt=Xt?Tt:k.intersect(Tt),Et=Math.abs(Zt.x-Tt.x)<0.5&&Math.abs(Zt.y-Tt.y)<0.5,Pt=Math.abs(Kt.x-wt.x)<0.5&&Math.abs(Kt.y-wt.y)<0.5?[]:[Kt],Gt=Et?[]:[Zt];u=[...Pt,...at,...Gt]}u=t2(e,u)}else if(k.intersect&&b.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(b.intersect(u[0])),u.push(k.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=vy(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=vy(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((at)=>!Number.isNaN(at.y)),_=J1(e.curve);if(_!=="rounded")B=i2(B);let v=pa;switch(_){case"linear":v=pa;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=ho;break;case"monotoneY":v=go;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=xo;break;case"stepBefore":v=yo;break;case"rounded":v=pa;break;default:v=vr}let{x:M,y:I}=V1(e),O=Fs().x(M).y(I).curve(v),X;switch(e.thickness){case"normal":X="edge-thickness-normal";break;case"thick":X="edge-thickness-thick";break;case"invisible":X="edge-thickness-invisible";break;default:X="edge-thickness-normal"}switch(e.pattern){case"solid":X+=" edge-pattern-solid";break;case"dotted":X+=" edge-pattern-dotted";break;case"dashed":X+=" edge-pattern-dashed";break;default:X+=" edge-pattern-solid"}let G,tt=_==="rounded"?My(Ay(B,e),5):O(B),it=Array.isArray(e.style)?e.style:[e.style],ht=it.find((at)=>at?.startsWith("stroke:")),lt="";if(e.animate)lt="edge-animation-fast";if(e.animation)lt="edge-animation-"+e.animation;let st=!1;if(e.look==="handDrawn"){let at=y.svg(r);Object.assign([],B);let wt=at.path(tt,{roughness:0.3,seed:d});X+=" transition",G=h(wt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+X+(e.classes?" "+e.classes:"")+(lt?" "+lt:"")).attr("style",it?it.reduce((Ut,Xt)=>Ut+";"+Xt,""):"");let Tt=G.attr("d");G.attr("d",Tt),r.node().appendChild(G.node())}else{let at=S.join(";"),wt=it?it.reduce((Et,_t)=>Et+_t+";",""):"",Tt=(at?at+";"+wt+";":wt)+";"+(it?it.reduce((Et,_t)=>Et+";"+_t,""):"");G=r.append("path").attr("d",tt).attr("id",`${c}-${e.id}`).attr("class"," "+X+(e.classes?" "+e.classes:"")+(lt?" "+lt:"")).attr("style",Tt),ht=Tt.match(/stroke:([^;]+)/)?.[1],st=e.animate===!0||!!e.animation||at.includes("animation");let Ut=G.node(),Xt=typeof Ut.getTotalLength==="function"?Ut.getTotalLength():0,Kt=Tp[e.arrowTypeStart]||0,Zt=Tp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!st){let _t=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?o2(Xt,Kt,Zt):`0 ${Kt} ${Xt-Kt-Zt} ${Zt}`}; stroke-dashoffset: 0;`;G.attr("style",_t+G.attr("style"))}}if(G.attr("data-edge",!0),G.attr("data-et","edge"),G.attr("data-id",e.id),G.attr("data-points",T),G.attr("data-look",he(e.look)),e.showPoints)B.forEach((at)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",at.x).attr("cy",at.y)});let D="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let Y=!st&&e?.look==="neo";K1(G,e,D,c,s,Y,ht);let et=Math.floor(u.length/2),W=u[et];if(!K.isLabelCoordinateInPath(W,G.attr("d")))m=!0;let nt={};if(m)nt.updatedPath=u;return nt.originalPath=e.points,nt},"insertEdge");function My(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,b=d.y-c.y,k=Math.hypot(f,u),S=Math.hypot(m,b);if(k<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/k,B=u/k,_=m/S,v=b/S,M=T*_+B*v,I=Math.max(-1,Math.min(1,M)),O=Math.acos(I);if(O<o||Math.abs(Math.PI-O)<o){i+=`L${c.x},${c.y}`;continue}let X=Math.min(e/Math.sin(O/2),k/2,S/2),G=c.x-T*X,tt=c.y-B*X,it=c.x+_*X,ht=c.y+v*X;i+=`L${G},${tt}`,i+=`Q${c.x},${c.y} ${it},${ht}`}}return i}t(My,"generateRoundedPath");function Cc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Cc,"calculateDeltaAndAngle");function Ay(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ht[e.arrowTypeStart]){let o=Ht[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Ht[e.arrowTypeEnd]){let o=Ht[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(Ay,"applyMarkerOffsetsToPoints");var s2=t((r,e,i,s)=>{e.forEach((o)=>{F2[o](r,i,s)})},"insertMarkers"),a2=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),n2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),l2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),h2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),c2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),u2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),d2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),f2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),p2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),g2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),m2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),y2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),x2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),C2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),b2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),k2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),w2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),S2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),T2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
293
|
+
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let b={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)b.x=e.x,b.y=e.y;if(u===0)b.x=e.x;if(f===0)b.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,b),b}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,b=i.x<e.x?i.x+u-n:i.x-u+n,k=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:b,_y:k}),n===0)b=e.x,k=e.y;if(u===0)b=e.x;if(f===0)k=e.y;return{x:b,y:k}}},"intersection"),vy=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!e2(e,a)&&!o){let c=r2(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function Fy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Fy,"extractCornerPoints");var Ly=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),i2=t(function(r){let{cornerPointPositions:e}=Fy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=Ly(o,c,5),d=Ly(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,b={x:c.x,y:c.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let k=5;if(c.x===n.x)b={x:f<0?n.x-k+m:n.x+k-m,y:u<0?n.y-m:n.y+m};else b={x:f<0?n.x-m:n.x+m,y:u<0?n.y-k+m:n.y+k-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(b,d)}else i.push(r[s]);return i},"fixCorners"),o2=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),fo=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,b=o;var k=a;let S=[];for(let at in e.cssCompiledStyles){if(Ru(at))continue;S.push(e.cssCompiledStyles[at])}if(f==="swimlane"){if(k.intersect&&b.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[b.intersect(u[0]),k.intersect(u[1])];else{let at=u.slice(1,-1),wt=at[0],Tt=at[at.length-1],Ut=0.5,Xt=Math.abs(u[u.length-1].x-Tt.x)<0.5&&Math.abs(u[u.length-1].y-Tt.y)<0.5,Kt=b.intersect(wt),Zt=Xt?Tt:k.intersect(Tt),Et=Math.abs(Zt.x-Tt.x)<0.5&&Math.abs(Zt.y-Tt.y)<0.5,Pt=Math.abs(Kt.x-wt.x)<0.5&&Math.abs(Kt.y-wt.y)<0.5?[]:[Kt],Gt=Et?[]:[Zt];u=[...Pt,...at,...Gt]}u=t2(e,u)}else if(k.intersect&&b.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(b.intersect(u[0])),u.push(k.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=vy(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=vy(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((at)=>!Number.isNaN(at.y)),_=J1(e.curve);if(_!=="rounded")B=i2(B);let v=pa;switch(_){case"linear":v=pa;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=ho;break;case"monotoneY":v=go;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=xo;break;case"stepBefore":v=yo;break;case"rounded":v=pa;break;default:v=vr}let{x:M,y:I}=V1(e),O=Fs().x(M).y(I).curve(v),G;switch(e.thickness){case"normal":G="edge-thickness-normal";break;case"thick":G="edge-thickness-thick";break;case"invisible":G="edge-thickness-invisible";break;default:G="edge-thickness-normal"}switch(e.pattern){case"solid":G+=" edge-pattern-solid";break;case"dotted":G+=" edge-pattern-dotted";break;case"dashed":G+=" edge-pattern-dashed";break;default:G+=" edge-pattern-solid"}let Z,tt=_==="rounded"?My(Ay(B,e),5):O(B),it=Array.isArray(e.style)?e.style:[e.style],ht=it.find((at)=>at?.startsWith("stroke:")),lt="";if(e.animate)lt="edge-animation-fast";if(e.animation)lt="edge-animation-"+e.animation;let st=!1;if(e.look==="handDrawn"){let at=y.svg(r);Object.assign([],B);let wt=at.path(tt,{roughness:0.3,seed:d});G+=" transition",Z=h(wt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(lt?" "+lt:"")).attr("style",it?it.reduce((Ut,Xt)=>Ut+";"+Xt,""):"");let Tt=Z.attr("d");Z.attr("d",Tt),r.node().appendChild(Z.node())}else{let at=S.join(";"),wt=it?it.reduce((Et,_t)=>Et+_t+";",""):"",Tt=(at?at+";"+wt+";":wt)+";"+(it?it.reduce((Et,_t)=>Et+";"+_t,""):"");Z=r.append("path").attr("d",tt).attr("id",`${c}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(lt?" "+lt:"")).attr("style",Tt),ht=Tt.match(/stroke:([^;]+)/)?.[1],st=e.animate===!0||!!e.animation||at.includes("animation");let Ut=Z.node(),Xt=typeof Ut.getTotalLength==="function"?Ut.getTotalLength():0,Kt=Tp[e.arrowTypeStart]||0,Zt=Tp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!st){let _t=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?o2(Xt,Kt,Zt):`0 ${Kt} ${Xt-Kt-Zt} ${Zt}`}; stroke-dashoffset: 0;`;Z.attr("style",_t+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",T),Z.attr("data-look",he(e.look)),e.showPoints)B.forEach((at)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",at.x).attr("cy",at.y)});let D="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let Y=!st&&e?.look==="neo";K1(Z,e,D,c,s,Y,ht);let et=Math.floor(u.length/2),W=u[et];if(!K.isLabelCoordinateInPath(W,Z.attr("d")))m=!0;let nt={};if(m)nt.updatedPath=u;return nt.originalPath=e.points,nt},"insertEdge");function My(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,b=d.y-c.y,k=Math.hypot(f,u),S=Math.hypot(m,b);if(k<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/k,B=u/k,_=m/S,v=b/S,M=T*_+B*v,I=Math.max(-1,Math.min(1,M)),O=Math.acos(I);if(O<o||Math.abs(Math.PI-O)<o){i+=`L${c.x},${c.y}`;continue}let G=Math.min(e/Math.sin(O/2),k/2,S/2),Z=c.x-T*G,tt=c.y-B*G,it=c.x+_*G,ht=c.y+v*G;i+=`L${Z},${tt}`,i+=`Q${c.x},${c.y} ${it},${ht}`}}return i}t(My,"generateRoundedPath");function Cc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Cc,"calculateDeltaAndAngle");function Ay(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ht[e.arrowTypeStart]){let o=Ht[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Ht[e.arrowTypeEnd]){let o=Ht[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(Ay,"applyMarkerOffsetsToPoints");var s2=t((r,e,i,s)=>{e.forEach((o)=>{F2[o](r,i,s)})},"insertMarkers"),a2=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),n2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),l2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),h2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),c2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),u2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),d2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),f2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),p2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),g2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),m2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),y2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),x2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),C2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),b2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),k2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),w2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),S2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),T2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
294
294
|
L20,10
|
|
295
295
|
M20,10
|
|
296
296
|
L0,20`)},"requirement_arrow"),B2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
297
297
|
L20,10
|
|
298
298
|
M20,10
|
|
299
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),_2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),v2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),L2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),F2={extension:a2,composition:n2,aggregation:l2,dependency:h2,lollipop:c2,point:u2,circle:d2,cross:f2,barb:p2,barbNeo:g2,hierarchy:L2,only_one:m2,zero_or_one:y2,one_or_more:x2,zero_or_more:C2,only_one_neo:b2,zero_or_one_neo:k2,one_or_more_neo:w2,zero_or_more_neo:S2,requirement_arrow:T2,requirement_contains:_2,requirement_arrow_neo:B2,requirement_contains_neo:v2},Os=s2;var M2={common:x,getConfig:C,insertCluster:mo,insertEdge:fo,insertEdgeLabel:ga,insertMarkers:Os,insertNode:fa,interpolateToCurve:Ws,labelHelper:
|
|
299
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),_2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),v2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),L2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),F2={extension:a2,composition:n2,aggregation:l2,dependency:h2,lollipop:c2,point:u2,circle:d2,cross:f2,barb:p2,barbNeo:g2,hierarchy:L2,only_one:m2,zero_or_one:y2,one_or_more:x2,zero_or_more:C2,only_one_neo:b2,zero_or_one_neo:k2,one_or_more_neo:w2,zero_or_more_neo:S2,requirement_arrow:T2,requirement_contains:_2,requirement_arrow_neo:B2,requirement_contains_neo:v2},Os=s2;var M2={common:x,getConfig:C,insertCluster:mo,insertEdge:fo,insertEdgeLabel:ga,insertMarkers:Os,insertNode:fa,interpolateToCurve:Ws,labelHelper:X,log:l,positionEdgeLabel:Ps},A2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Oo=Object.create(null),Kf=t((r)=>{for(let e of r)Oo[e.name]=e},"registerLayoutLoaders"),E2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-433rd9fp.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...A2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),$2=t(()=>{Kf([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-kyf5jetf.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-2pyjr946.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-ptdnshzh.js"),"loader")},...E2()])},"registerDefaultLayoutLoaders");$2();var Rt=t(async(r,e)=>{if(!Object.hasOwn(Oo,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=Oo[r.layoutAlgorithm],s=await i.loader();return ip(e,r.config),s.render(r,e,M2,{algorithm:i.algorithm})},"render"),bc="dagre",Ft=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(Oo,r))return r;for(let i of[e,bc])if(Object.hasOwn(Oo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} is registered.`)},"getRegisteredLayoutAlgorithm");var Tn=t(()=>`
|
|
300
300
|
/* Font Awesome icon styling - consolidated */
|
|
301
301
|
.label-icon {
|
|
302
302
|
display: inline-block;
|
|
@@ -311,4 +311,4 @@ ${o.join(`
|
|
|
311
311
|
stroke-width: revert;
|
|
312
312
|
}
|
|
313
313
|
`,"getIconStyles");var Lt=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var gt=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=I2(r,e);te(r,a,o,s);let d=O2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),I2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),O2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
|
|
314
|
-
export{t,lo,ep,l,Tu,mt,ua,Be,Ml,g,A,Rf,Ff,Di,Pl,tp,Lg,Ke,jt,co,V,Lf,Ko,Or,np,Mg,Pg,Og,Mf,Pf,C,$g,Du,zg,qt,Qs,ee,Of,uo,It,Ol,$l,x,te,$r,rp,Ug,ap,R,F,z,P,U,q,j,p,da,Ni,zl,Nu,op,h,Qi,Ul,Ri,Oa,$f,
|
|
314
|
+
export{t,lo,ep,l,Tu,mt,ua,Be,Ml,g,A,Rf,Ff,Di,Pl,tp,Lg,Ke,jt,co,V,Lf,Ko,Or,np,Mg,Pg,Og,Mf,Pf,C,$g,Du,zg,qt,Qs,ee,Of,uo,It,Ol,$l,x,te,$r,rp,Ug,ap,R,F,z,P,U,q,j,p,da,Ni,zl,Nu,op,h,Qi,Ul,Ri,Oa,$f,_n,Gl,Gg,Vo,Rs,wn,jl,po,jn,vt,ql,zr,Qu,pa,Fs,de,ir,sr,ip,Ru,Q,zf,Fi,lr,Ls,Li,Yo,sp,Hl,Wl,Kl,Vl,lp,cp,up,dp,pp,mp,fp,gp,Ap,hp,bp,yp,vp,kp,xp,wp,Cp,Jo,Yl,Fu,Ep,Uf,jg,Bp,Gf,jf,Mi,Lu,qn,Mu,Ip,Sn,se,K,qg,$a,Cn,_p,Sp,qf,on,Pu,ft,Ze,Xe,Ur,Hn,Wn,y,X,H,N,Ou,Jl,ma,fa,Hg,Wg,Gr,Hf,mo,Kg,Ht,Tp,Ms,Wt,Vg,Wf,ga,Ps,fo,Os,Kf,Rt,Ft,Tn,Lt,gt};
|