dreamcontext 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +523 -0
- package/agents/dreamcontext-explore.md +137 -0
- package/agents/dreamcontext-initializer.md +169 -0
- package/agents/sleep-product.md +268 -0
- package/agents/sleep-state.md +270 -0
- package/agents/sleep-tasks.md +134 -0
- package/dist/agents/dreamcontext-explore.md +137 -0
- package/dist/agents/dreamcontext-initializer.md +169 -0
- package/dist/agents/sleep-product.md +268 -0
- package/dist/agents/sleep-state.md +270 -0
- package/dist/agents/sleep-tasks.md +134 -0
- package/dist/dashboard/assets/BrainCanvas3D-BLJ4_SqE.js +5126 -0
- package/dist/dashboard/assets/_baseUniq-DpaDAx_H.js +1 -0
- package/dist/dashboard/assets/arc-JvK3Ik1p.js +1 -0
- package/dist/dashboard/assets/architectureDiagram-Q4EWVU46-CCvw4XFg.js +36 -0
- package/dist/dashboard/assets/blockDiagram-DXYQGD6D-DMobz1n7.js +132 -0
- package/dist/dashboard/assets/c4Diagram-AHTNJAMY-FwcHT5er.js +10 -0
- package/dist/dashboard/assets/channel-D6954IHZ.js +1 -0
- package/dist/dashboard/assets/chunk-4BX2VUAB-B5kYwmBa.js +1 -0
- package/dist/dashboard/assets/chunk-4TB4RGXK-0ot1eS0J.js +206 -0
- package/dist/dashboard/assets/chunk-55IACEB6-24ngcLgH.js +1 -0
- package/dist/dashboard/assets/chunk-EDXVE4YY-DATt1OUl.js +1 -0
- package/dist/dashboard/assets/chunk-FMBD7UC4-BprbGSJw.js +15 -0
- package/dist/dashboard/assets/chunk-OYMX7WX6-CJJhpKWP.js +231 -0
- package/dist/dashboard/assets/chunk-QZHKN3VN-Cisp65Vq.js +1 -0
- package/dist/dashboard/assets/chunk-YZCP3GAM-DtMk33tU.js +1 -0
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Bk4KDqBj.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Bk4KDqBj.js +1 -0
- package/dist/dashboard/assets/clone-C9Yhti5q.js +1 -0
- package/dist/dashboard/assets/cose-bilkent-S5V4N54A-BxYomDLe.js +1 -0
- package/dist/dashboard/assets/cytoscape.esm-D_LviqZs.js +331 -0
- package/dist/dashboard/assets/dagre-KV5264BT-CsX1ZayG.js +4 -0
- package/dist/dashboard/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/dashboard/assets/diagram-5BDNPKRD-B2G4mPPw.js +10 -0
- package/dist/dashboard/assets/diagram-G4DWMVQ6-C8nxN9ZB.js +24 -0
- package/dist/dashboard/assets/diagram-MMDJMWI5-DaYymOrR.js +43 -0
- package/dist/dashboard/assets/diagram-TYMM5635-BpiYFv-I.js +24 -0
- package/dist/dashboard/assets/erDiagram-SMLLAGMA-C6pE7F61.js +85 -0
- package/dist/dashboard/assets/flowDiagram-DWJPFMVM-jdNEPVFq.js +162 -0
- package/dist/dashboard/assets/ganttDiagram-T4ZO3ILL-C8GoRj1C.js +292 -0
- package/dist/dashboard/assets/gitGraphDiagram-UUTBAWPF-SiRn7RJ8.js +106 -0
- package/dist/dashboard/assets/graph-9wbTW7ld.js +1 -0
- package/dist/dashboard/assets/index-BHp63EMw.js +475 -0
- package/dist/dashboard/assets/index-CdnDt_7U.css +1 -0
- package/dist/dashboard/assets/infoDiagram-42DDH7IO-DcDC8M1a.js +2 -0
- package/dist/dashboard/assets/ishikawaDiagram-UXIWVN3A-UjyrPeaS.js +70 -0
- package/dist/dashboard/assets/journeyDiagram-VCZTEJTY-CXJPYMxN.js +139 -0
- package/dist/dashboard/assets/kanban-definition-6JOO6SKY-Cm1n9eat.js +89 -0
- package/dist/dashboard/assets/katex-DkKDou_j.js +257 -0
- package/dist/dashboard/assets/layout-w8zmQGXp.js +1 -0
- package/dist/dashboard/assets/linear-CMNvIisH.js +1 -0
- package/dist/dashboard/assets/min-BqXwiqEr.js +1 -0
- package/dist/dashboard/assets/mindmap-definition-QFDTVHPH-tksxnjhx.js +96 -0
- package/dist/dashboard/assets/pieDiagram-DEJITSTG-lIVvnPyq.js +30 -0
- package/dist/dashboard/assets/quadrantDiagram-34T5L4WZ-DSMB57t5.js +7 -0
- package/dist/dashboard/assets/requirementDiagram-MS252O5E-NG99tgmc.js +84 -0
- package/dist/dashboard/assets/sankeyDiagram-XADWPNL6-C6EkbQKo.js +10 -0
- package/dist/dashboard/assets/sequenceDiagram-FGHM5R23-ASU7Zp6_.js +157 -0
- package/dist/dashboard/assets/stateDiagram-FHFEXIEX-DHklUzce.js +1 -0
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-BZXFb2Fh.js +1 -0
- package/dist/dashboard/assets/timeline-definition-GMOUNBTQ-B37xNhjS.js +120 -0
- package/dist/dashboard/assets/vennDiagram-DHZGUBPP-D28OvWbm.js +34 -0
- package/dist/dashboard/assets/wardley-RL74JXVD-BQdaLyVb.js +162 -0
- package/dist/dashboard/assets/wardleyDiagram-NUSXRM2D-D0vChrnT.js +20 -0
- package/dist/dashboard/assets/xychartDiagram-5P7HB3ND-BzSx7EpJ.js +7 -0
- package/dist/dashboard/favicon.svg +14 -0
- package/dist/dashboard/index.html +18 -0
- package/dist/hooks/marketing-binary-guard.sh +18 -0
- package/dist/index.js +15881 -0
- package/dist/skill-packs/agents/biv-customer-analyst.md +140 -0
- package/dist/skill-packs/agents/biv-decision-gate.md +147 -0
- package/dist/skill-packs/agents/biv-financial-analyst.md +128 -0
- package/dist/skill-packs/agents/biv-market-analyst.md +103 -0
- package/dist/skill-packs/agents/biv-researcher.md +140 -0
- package/dist/skill-packs/agents/biv-strategist.md +164 -0
- package/dist/skill-packs/agents/council-persona.md +142 -0
- package/dist/skill-packs/agents/council-synthesizer.md +208 -0
- package/dist/skill-packs/agents/discover-brand.md +216 -0
- package/dist/skill-packs/agents/goal-implementer.md +70 -0
- package/dist/skill-packs/agents/goal-plan-reviewer.md +68 -0
- package/dist/skill-packs/agents/goal-planner.md +75 -0
- package/dist/skill-packs/agents/goal-validator.md +68 -0
- package/dist/skill-packs/agents/marketing-creative.md +85 -0
- package/dist/skill-packs/agents/marketing-monitor.md +143 -0
- package/dist/skill-packs/agents/marketing-strategy.md +139 -0
- package/dist/skill-packs/agents/review-cloud-functions.md +158 -0
- package/dist/skill-packs/agents/review-edge-cases.md +147 -0
- package/dist/skill-packs/agents/review-frontend.md +134 -0
- package/dist/skill-packs/agents/review-router.md +165 -0
- package/dist/skill-packs/agents/review-security.md +139 -0
- package/dist/skill-packs/agents/reviewer.md +152 -0
- package/dist/skill-packs/brand-voice/SKILL.md +115 -0
- package/dist/skill-packs/brand-voice/discover-brand.md +126 -0
- package/dist/skill-packs/brand-voice/guideline-generation.md +154 -0
- package/dist/skill-packs/brand-voice/references/before-after-examples.md +194 -0
- package/dist/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
- package/dist/skill-packs/brand-voice/references/guideline-template.md +241 -0
- package/dist/skill-packs/brand-voice/references/search-strategies.md +271 -0
- package/dist/skill-packs/brand-voice/references/source-ranking.md +248 -0
- package/dist/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
- package/dist/skill-packs/business-idea-discovery/SKILL.md +452 -0
- package/dist/skill-packs/business-idea-validation/SKILL.md +209 -0
- package/dist/skill-packs/business-idea-validation/stage-definitions.md +658 -0
- package/dist/skill-packs/catalog.json +657 -0
- package/dist/skill-packs/council/SKILL.md +134 -0
- package/dist/skill-packs/council/debate-protocol.md +90 -0
- package/dist/skill-packs/design/SKILL.md +301 -0
- package/dist/skill-packs/design/design-mobile.md +207 -0
- package/dist/skill-packs/design/design-web.md +148 -0
- package/dist/skill-packs/design/frontend-principles.md +157 -0
- package/dist/skill-packs/design/onboarding-design.md +230 -0
- package/dist/skill-packs/engineering/SKILL.md +155 -0
- package/dist/skill-packs/engineering/backend-principles.md +233 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
- package/dist/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
- package/dist/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
- package/dist/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
- package/dist/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
- package/dist/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
- package/dist/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
- package/dist/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
- package/dist/skill-packs/engineering/web-app-frontend.md +187 -0
- package/dist/skill-packs/goal-skill/SKILL.md +203 -0
- package/dist/skill-packs/growth/SKILL.md +480 -0
- package/dist/skill-packs/growth/lean-analytics-experiments.md +341 -0
- package/dist/skill-packs/growth/lean-analytics-metrics.md +295 -0
- package/dist/skill-packs/growth/performance-marketing.md +337 -0
- package/dist/skill-packs/meta-marketing/SKILL.md +423 -0
- package/dist/skill-packs/meta-marketing/account-ops.md +190 -0
- package/dist/skill-packs/meta-marketing/api-reference.md +535 -0
- package/dist/skill-packs/meta-marketing/copy-formulas.md +123 -0
- package/dist/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
- package/dist/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
- package/dist/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
- package/dist/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
- package/dist/skill-packs/meta-marketing/creative-frameworks.md +176 -0
- package/dist/skill-packs/meta-marketing/mistakes.md +154 -0
- package/dist/skill-packs/meta-marketing/platform-state.md +63 -0
- package/dist/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
- package/dist/skill-packs/multi-review/SKILL.md +182 -0
- package/dist/skill-packs/system-prompts/SKILL.md +472 -0
- package/dist/templates/AGENTS.md +84 -0
- package/dist/templates/CLAUDE.md +84 -0
- package/dist/templates/council-debate.md +20 -0
- package/dist/templates/council-final-report.md +34 -0
- package/dist/templates/council-persona.md +10 -0
- package/dist/templates/council-report.md +6 -0
- package/dist/templates/feature.md +38 -0
- package/dist/templates/init/0.soul.md +33 -0
- package/dist/templates/init/1.user.md +29 -0
- package/dist/templates/init/2.memory.md +21 -0
- package/dist/templates/init/3.style_guide_and_branding.md +18 -0
- package/dist/templates/init/4.tech_stack.md +22 -0
- package/dist/templates/init/CHANGELOG.json +1 -0
- package/dist/templates/init/RELEASES.json +1 -0
- package/dist/templates/init/data-structures/default.md +35 -0
- package/dist/templates/knowledge.md +10 -0
- package/dist/templates/obsidian/app.json +15 -0
- package/dist/templates/obsidian/appearance.json +4 -0
- package/dist/templates/obsidian/graph.json +58 -0
- package/dist/templates/task.md +70 -0
- package/install.sh +73 -0
- package/package.json +58 -0
- package/skill/SKILL.md +529 -0
- package/skill-packs/agents/biv-customer-analyst.md +140 -0
- package/skill-packs/agents/biv-decision-gate.md +147 -0
- package/skill-packs/agents/biv-financial-analyst.md +128 -0
- package/skill-packs/agents/biv-market-analyst.md +103 -0
- package/skill-packs/agents/biv-researcher.md +140 -0
- package/skill-packs/agents/biv-strategist.md +164 -0
- package/skill-packs/agents/council-persona.md +142 -0
- package/skill-packs/agents/council-synthesizer.md +208 -0
- package/skill-packs/agents/discover-brand.md +216 -0
- package/skill-packs/agents/goal-implementer.md +70 -0
- package/skill-packs/agents/goal-plan-reviewer.md +68 -0
- package/skill-packs/agents/goal-planner.md +75 -0
- package/skill-packs/agents/goal-validator.md +68 -0
- package/skill-packs/agents/marketing-creative.md +85 -0
- package/skill-packs/agents/marketing-monitor.md +143 -0
- package/skill-packs/agents/marketing-strategy.md +139 -0
- package/skill-packs/agents/review-cloud-functions.md +158 -0
- package/skill-packs/agents/review-edge-cases.md +147 -0
- package/skill-packs/agents/review-frontend.md +134 -0
- package/skill-packs/agents/review-router.md +165 -0
- package/skill-packs/agents/review-security.md +139 -0
- package/skill-packs/agents/reviewer.md +152 -0
- package/skill-packs/brand-voice/SKILL.md +115 -0
- package/skill-packs/brand-voice/discover-brand.md +126 -0
- package/skill-packs/brand-voice/guideline-generation.md +154 -0
- package/skill-packs/brand-voice/references/before-after-examples.md +194 -0
- package/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
- package/skill-packs/brand-voice/references/guideline-template.md +241 -0
- package/skill-packs/brand-voice/references/search-strategies.md +271 -0
- package/skill-packs/brand-voice/references/source-ranking.md +248 -0
- package/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
- package/skill-packs/business-idea-discovery/SKILL.md +452 -0
- package/skill-packs/business-idea-validation/SKILL.md +209 -0
- package/skill-packs/business-idea-validation/stage-definitions.md +658 -0
- package/skill-packs/catalog.json +657 -0
- package/skill-packs/council/SKILL.md +134 -0
- package/skill-packs/council/debate-protocol.md +90 -0
- package/skill-packs/design/SKILL.md +301 -0
- package/skill-packs/design/design-mobile.md +207 -0
- package/skill-packs/design/design-web.md +148 -0
- package/skill-packs/design/frontend-principles.md +157 -0
- package/skill-packs/design/onboarding-design.md +230 -0
- package/skill-packs/engineering/SKILL.md +155 -0
- package/skill-packs/engineering/backend-principles.md +233 -0
- package/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
- package/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
- package/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
- package/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
- package/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
- package/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
- package/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
- package/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
- package/skill-packs/engineering/web-app-frontend.md +187 -0
- package/skill-packs/goal-skill/SKILL.md +203 -0
- package/skill-packs/growth/SKILL.md +480 -0
- package/skill-packs/growth/lean-analytics-experiments.md +341 -0
- package/skill-packs/growth/lean-analytics-metrics.md +295 -0
- package/skill-packs/growth/performance-marketing.md +337 -0
- package/skill-packs/meta-marketing/SKILL.md +423 -0
- package/skill-packs/meta-marketing/account-ops.md +190 -0
- package/skill-packs/meta-marketing/api-reference.md +535 -0
- package/skill-packs/meta-marketing/copy-formulas.md +123 -0
- package/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
- package/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
- package/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
- package/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
- package/skill-packs/meta-marketing/creative-frameworks.md +176 -0
- package/skill-packs/meta-marketing/mistakes.md +154 -0
- package/skill-packs/meta-marketing/platform-state.md +63 -0
- package/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
- package/skill-packs/multi-review/SKILL.md +182 -0
- package/skill-packs/system-prompts/SKILL.md +472 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-CsX1ZayG.js","assets/graph-9wbTW7ld.js","assets/_baseUniq-DpaDAx_H.js","assets/layout-w8zmQGXp.js","assets/min-BqXwiqEr.js","assets/clone-C9Yhti5q.js","assets/cose-bilkent-S5V4N54A-BxYomDLe.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-FwcHT5er.js","assets/chunk-YZCP3GAM-DtMk33tU.js","assets/flowDiagram-DWJPFMVM-jdNEPVFq.js","assets/chunk-FMBD7UC4-BprbGSJw.js","assets/chunk-55IACEB6-24ngcLgH.js","assets/chunk-EDXVE4YY-DATt1OUl.js","assets/channel-D6954IHZ.js","assets/erDiagram-SMLLAGMA-C6pE7F61.js","assets/gitGraphDiagram-UUTBAWPF-SiRn7RJ8.js","assets/chunk-4BX2VUAB-B5kYwmBa.js","assets/chunk-QZHKN3VN-Cisp65Vq.js","assets/wardley-RL74JXVD-BQdaLyVb.js","assets/ganttDiagram-T4ZO3ILL-C8GoRj1C.js","assets/linear-CMNvIisH.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-DcDC8M1a.js","assets/pieDiagram-DEJITSTG-lIVvnPyq.js","assets/arc-JvK3Ik1p.js","assets/quadrantDiagram-34T5L4WZ-DSMB57t5.js","assets/xychartDiagram-5P7HB3ND-BzSx7EpJ.js","assets/requirementDiagram-MS252O5E-NG99tgmc.js","assets/sequenceDiagram-FGHM5R23-ASU7Zp6_.js","assets/classDiagram-6PBFFD2Q-Bk4KDqBj.js","assets/chunk-4TB4RGXK-0ot1eS0J.js","assets/classDiagram-v2-HSJHXN6E-Bk4KDqBj.js","assets/stateDiagram-FHFEXIEX-DHklUzce.js","assets/chunk-OYMX7WX6-CJJhpKWP.js","assets/stateDiagram-v2-QKLJ7IA2-BZXFb2Fh.js","assets/journeyDiagram-VCZTEJTY-CXJPYMxN.js","assets/timeline-definition-GMOUNBTQ-B37xNhjS.js","assets/mindmap-definition-QFDTVHPH-tksxnjhx.js","assets/kanban-definition-6JOO6SKY-Cm1n9eat.js","assets/diagram-TYMM5635-BpiYFv-I.js","assets/diagram-MMDJMWI5-DaYymOrR.js","assets/blockDiagram-DXYQGD6D-DMobz1n7.js","assets/diagram-5BDNPKRD-B2G4mPPw.js","assets/architectureDiagram-Q4EWVU46-CCvw4XFg.js","assets/diagram-G4DWMVQ6-C8nxN9ZB.js","assets/wardleyDiagram-NUSXRM2D-D0vChrnT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var LR=Object.defineProperty;var gk=r=>{throw TypeError(r)};var OR=(r,e,i)=>e in r?LR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var Ut=(r,e,i)=>OR(r,typeof e!="symbol"?e+"":e,i),g0=(r,e,i)=>e.has(r)||gk("Cannot "+i);var Q=(r,e,i)=>(g0(r,e,"read from private field"),i?i.call(r):e.get(r)),Wt=(r,e,i)=>e.has(r)?gk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,i),Mt=(r,e,i,n)=>(g0(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),ce=(r,e,i)=>(g0(r,e,"access private method"),i);var Gd=(r,e,i,n)=>({set _(a){Mt(r,e,a,i)},get _(){return Q(r,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function Og(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function wet(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var a=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,a.get?a:{enumerable:!0,get:function(){return r[n]}})}),i}var m0={exports:{}},Jh={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var mk;function NR(){if(mk)return Jh;mk=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:r,type:n,key:c,ref:a!==void 0?a:null,props:o}}return Jh.Fragment=e,Jh.jsx=i,Jh.jsxs=i,Jh}var yk;function RR(){return yk||(yk=1,m0.exports=NR()),m0.exports}var v=RR(),y0={exports:{}},ne={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var xk;function jR(){if(xk)return ne;xk=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,k={};function w(P,J,nt){this.props=P,this.context=J,this.refs=k,this.updater=nt||b}w.prototype.isReactComponent={},w.prototype.setState=function(P,J){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,J,"setState")},w.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=w.prototype;function B(P,J,nt){this.props=P,this.context=J,this.refs=k,this.updater=nt||b}var E=B.prototype=new T;E.constructor=B,_(E,w.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function j(){}var M={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function Y(P,J,nt){var ut=nt.ref;return{$$typeof:r,type:P,key:J,ref:ut!==void 0?ut:null,props:nt}}function $(P,J){return Y(P.type,J,P.props)}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}function K(P){var J={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(nt){return J[nt]})}var W=/\/+/g;function F(P,J){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):J.toString(36)}function U(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(J){P.status==="pending"&&(P.status="fulfilled",P.value=J)},function(J){P.status==="pending"&&(P.status="rejected",P.reason=J)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function R(P,J,nt,ut,gt){var kt=typeof P;(kt==="undefined"||kt==="boolean")&&(P=null);var Et=!1;if(P===null)Et=!0;else switch(kt){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(P.$$typeof){case r:case e:Et=!0;break;case p:return Et=P._init,R(Et(P._payload),J,nt,ut,gt)}}if(Et)return gt=gt(P),Et=ut===""?"."+F(P,0):ut,O(gt)?(nt="",Et!=null&&(nt=Et.replace(W,"$&/")+"/"),R(gt,J,nt,"",function(mt){return mt})):gt!=null&&(z(gt)&&(gt=$(gt,nt+(gt.key==null||P&&P.key===gt.key?"":(""+gt.key).replace(W,"$&/")+"/")+Et)),J.push(gt)),1;Et=0;var st=ut===""?".":ut+":";if(O(P))for(var Ct=0;Ct<P.length;Ct++)ut=P[Ct],kt=st+F(ut,Ct),Et+=R(ut,J,nt,kt,gt);else if(Ct=y(P),typeof Ct=="function")for(P=Ct.call(P),Ct=0;!(ut=P.next()).done;)ut=ut.value,kt=st+F(ut,Ct++),Et+=R(ut,J,nt,kt,gt);else if(kt==="object"){if(typeof P.then=="function")return R(U(P),J,nt,ut,gt);throw J=String(P),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Et}function I(P,J,nt){if(P==null)return P;var ut=[],gt=0;return R(P,ut,"","",function(kt){return J.call(nt,kt,gt++)}),ut}function H(P){if(P._status===-1){var J=P._result;J=J(),J.then(function(nt){(P._status===0||P._status===-1)&&(P._status=1,P._result=nt)},function(nt){(P._status===0||P._status===-1)&&(P._status=2,P._result=nt)}),P._status===-1&&(P._status=0,P._result=J)}if(P._status===1)return P._result.default;throw P._result}var G=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},Z={map:I,forEach:function(P,J,nt){I(P,function(){J.apply(this,arguments)},nt)},count:function(P){var J=0;return I(P,function(){J++}),J},toArray:function(P){return I(P,function(J){return J})||[]},only:function(P){if(!z(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return ne.Activity=g,ne.Children=Z,ne.Component=w,ne.Fragment=i,ne.Profiler=a,ne.PureComponent=B,ne.StrictMode=n,ne.Suspense=u,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ne.__COMPILER_RUNTIME={__proto__:null,c:function(P){return M.H.useMemoCache(P)}},ne.cache=function(P){return function(){return P.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(P,J,nt){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var ut=_({},P.props),gt=P.key;if(J!=null)for(kt in J.key!==void 0&&(gt=""+J.key),J)!N.call(J,kt)||kt==="key"||kt==="__self"||kt==="__source"||kt==="ref"&&J.ref===void 0||(ut[kt]=J[kt]);var kt=arguments.length-2;if(kt===1)ut.children=nt;else if(1<kt){for(var Et=Array(kt),st=0;st<kt;st++)Et[st]=arguments[st+2];ut.children=Et}return Y(P.type,gt,ut)},ne.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},ne.createElement=function(P,J,nt){var ut,gt={},kt=null;if(J!=null)for(ut in J.key!==void 0&&(kt=""+J.key),J)N.call(J,ut)&&ut!=="key"&&ut!=="__self"&&ut!=="__source"&&(gt[ut]=J[ut]);var Et=arguments.length-2;if(Et===1)gt.children=nt;else if(1<Et){for(var st=Array(Et),Ct=0;Ct<Et;Ct++)st[Ct]=arguments[Ct+2];gt.children=st}if(P&&P.defaultProps)for(ut in Et=P.defaultProps,Et)gt[ut]===void 0&&(gt[ut]=Et[ut]);return Y(P,kt,gt)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(P){return{$$typeof:h,render:P}},ne.isValidElement=z,ne.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:H}},ne.memo=function(P,J){return{$$typeof:d,type:P,compare:J===void 0?null:J}},ne.startTransition=function(P){var J=M.T,nt={};M.T=nt;try{var ut=P(),gt=M.S;gt!==null&>(nt,ut),typeof ut=="object"&&ut!==null&&typeof ut.then=="function"&&ut.then(j,G)}catch(kt){G(kt)}finally{J!==null&&nt.types!==null&&(J.types=nt.types),M.T=J}},ne.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ne.use=function(P){return M.H.use(P)},ne.useActionState=function(P,J,nt){return M.H.useActionState(P,J,nt)},ne.useCallback=function(P,J){return M.H.useCallback(P,J)},ne.useContext=function(P){return M.H.useContext(P)},ne.useDebugValue=function(){},ne.useDeferredValue=function(P,J){return M.H.useDeferredValue(P,J)},ne.useEffect=function(P,J){return M.H.useEffect(P,J)},ne.useEffectEvent=function(P){return M.H.useEffectEvent(P)},ne.useId=function(){return M.H.useId()},ne.useImperativeHandle=function(P,J,nt){return M.H.useImperativeHandle(P,J,nt)},ne.useInsertionEffect=function(P,J){return M.H.useInsertionEffect(P,J)},ne.useLayoutEffect=function(P,J){return M.H.useLayoutEffect(P,J)},ne.useMemo=function(P,J){return M.H.useMemo(P,J)},ne.useOptimistic=function(P,J){return M.H.useOptimistic(P,J)},ne.useReducer=function(P,J,nt){return M.H.useReducer(P,J,nt)},ne.useRef=function(P){return M.H.useRef(P)},ne.useState=function(P){return M.H.useState(P)},ne.useSyncExternalStore=function(P,J,nt){return M.H.useSyncExternalStore(P,J,nt)},ne.useTransition=function(){return M.H.useTransition()},ne.version="19.2.4",ne}var bk;function i1(){return bk||(bk=1,y0.exports=jR()),y0.exports}var et=i1();const DR=Og(et);var x0={exports:{}},tu={},b0={exports:{}},v0={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var vk;function FR(){return vk||(vk=1,(function(r){function e(R,I){var H=R.length;R.push(I);t:for(;0<H;){var G=H-1>>>1,Z=R[G];if(0<a(Z,I))R[G]=I,R[H]=Z,H=G;else break t}}function i(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var I=R[0],H=R.pop();if(H!==I){R[0]=H;t:for(var G=0,Z=R.length,P=Z>>>1;G<P;){var J=2*(G+1)-1,nt=R[J],ut=J+1,gt=R[ut];if(0>a(nt,H))ut<Z&&0>a(gt,nt)?(R[G]=gt,R[ut]=H,G=ut):(R[G]=nt,R[J]=H,G=J);else if(ut<Z&&0>a(gt,H))R[G]=gt,R[ut]=H,G=ut;else break t}}return I}function a(R,I){var H=R.sortIndex-I.sortIndex;return H!==0?H:R.id-I.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();r.unstable_now=function(){return c.now()-h}}var u=[],d=[],p=1,g=null,x=3,y=!1,b=!1,_=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function E(R){for(var I=i(d);I!==null;){if(I.callback===null)n(d);else if(I.startTime<=R)n(d),I.sortIndex=I.expirationTime,e(u,I);else break;I=i(d)}}function O(R){if(_=!1,E(R),!b)if(i(u)!==null)b=!0,j||(j=!0,K());else{var I=i(d);I!==null&&U(O,I.startTime-R)}}var j=!1,M=-1,N=5,Y=-1;function $(){return k?!0:!(r.unstable_now()-Y<N)}function z(){if(k=!1,j){var R=r.unstable_now();Y=R;var I=!0;try{t:{b=!1,_&&(_=!1,T(M),M=-1),y=!0;var H=x;try{e:{for(E(R),g=i(u);g!==null&&!(g.expirationTime>R&&$());){var G=g.callback;if(typeof G=="function"){g.callback=null,x=g.priorityLevel;var Z=G(g.expirationTime<=R);if(R=r.unstable_now(),typeof Z=="function"){g.callback=Z,E(R),I=!0;break e}g===i(u)&&n(u),E(R)}else n(u);g=i(u)}if(g!==null)I=!0;else{var P=i(d);P!==null&&U(O,P.startTime-R),I=!1}}break t}finally{g=null,x=H,y=!1}I=void 0}}finally{I?K():j=!1}}}var K;if(typeof B=="function")K=function(){B(z)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,F=W.port2;W.port1.onmessage=z,K=function(){F.postMessage(null)}}else K=function(){w(z,0)};function U(R,I){M=w(function(){R(r.unstable_now())},I)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(R){R.callback=null},r.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<R?Math.floor(1e3/R):5},r.unstable_getCurrentPriorityLevel=function(){return x},r.unstable_next=function(R){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var H=x;x=I;try{return R()}finally{x=H}},r.unstable_requestPaint=function(){k=!0},r.unstable_runWithPriority=function(R,I){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var H=x;x=R;try{return I()}finally{x=H}},r.unstable_scheduleCallback=function(R,I,H){var G=r.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?G+H:G):H=G,R){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=H+Z,R={id:p++,callback:I,priorityLevel:R,startTime:H,expirationTime:Z,sortIndex:-1},H>G?(R.sortIndex=H,e(d,R),i(u)===null&&R===i(d)&&(_?(T(M),M=-1):_=!0,U(O,H-G))):(R.sortIndex=Z,e(u,R),b||y||(b=!0,j||(j=!0,K()))),R},r.unstable_shouldYield=$,r.unstable_wrapCallback=function(R){var I=x;return function(){var H=x;x=I;try{return R.apply(this,arguments)}finally{x=H}}}})(v0)),v0}var Ck;function $R(){return Ck||(Ck=1,b0.exports=FR()),b0.exports}var C0={exports:{}},Qr={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var _k;function zR(){if(_k)return Qr;_k=1;var r=i1();function e(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var n={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(u,d,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:u,containerInfo:d,implementation:p}}var c=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Qr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Qr.createPortal=function(u,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return o(u,d,null,p)},Qr.flushSync=function(u){var d=c.T,p=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=d,n.p=p,n.d.f()}},Qr.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,n.d.C(u,d))},Qr.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Qr.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var p=d.as,g=h(p,d.crossOrigin),x=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?n.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):p==="script"&&n.d.X(u,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Qr.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=h(d.as,d.crossOrigin);n.d.M(u,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&n.d.M(u)},Qr.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,g=h(p,d.crossOrigin);n.d.L(u,p,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Qr.preloadModule=function(u,d){if(typeof u=="string")if(d){var p=h(d.as,d.crossOrigin);n.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else n.d.m(u)},Qr.requestFormReset=function(u){n.d.r(u)},Qr.unstable_batchedUpdates=function(u,d){return u(d)},Qr.useFormState=function(u,d,p){return c.H.useFormState(u,d,p)},Qr.useFormStatus=function(){return c.H.useHostTransitionStatus()},Qr.version="19.2.4",Qr}var kk;function qR(){if(kk)return C0.exports;kk=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),C0.exports=zR(),C0.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var Sk;function IR(){if(Sk)return tu;Sk=1;var r=$R(),e=i1(),i=qR();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,f=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(f=l.return),s=l.return;while(s)}return l.tag===3?f:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function d(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var f=s,m=l;;){var C=f.return;if(C===null)break;var S=C.alternate;if(S===null){if(m=C.return,m!==null){f=m;continue}break}if(C.child===S.child){for(S=C.child;S;){if(S===f)return u(C),s;if(S===m)return u(C),l;S=S.sibling}throw Error(n(188))}if(f.return!==m.return)f=C,m=S;else{for(var L=!1,q=C.child;q;){if(q===f){L=!0,f=C,m=S;break}if(q===m){L=!0,m=C,f=S;break}q=q.sibling}if(!L){for(q=S.child;q;){if(q===f){L=!0,f=S,m=C;break}if(q===m){L=!0,m=S,f=C;break}q=q.sibling}if(!L)throw Error(n(189))}}if(f.alternate!==m)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?s:l}function p(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=p(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),B=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function K(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var W=Symbol.for("react.client.reference");function F(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===W?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case w:return"Profiler";case k:return"StrictMode";case O:return"Suspense";case j:return"SuspenseList";case Y:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case B:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case E:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return l=s.displayName||null,l!==null?l:F(s.type)||"Memo";case N:l=s._payload,s=s._init;try{return F(s(l))}catch{}}return null}var U=Array.isArray,R=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},G=[],Z=-1;function P(s){return{current:s}}function J(s){0>Z||(s.current=G[Z],G[Z]=null,Z--)}function nt(s,l){Z++,G[Z]=s.current,s.current=l}var ut=P(null),gt=P(null),kt=P(null),Et=P(null);function st(s,l){switch(nt(kt,l),nt(gt,s),nt(ut,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?$_(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=$_(l),s=z_(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(ut),nt(ut,s)}function Ct(){J(ut),J(gt),J(kt)}function mt(s){s.memoizedState!==null&&nt(Et,s);var l=ut.current,f=z_(l,s.type);l!==f&&(nt(gt,s),nt(ut,f))}function Bt(s){gt.current===s&&(J(ut),J(gt)),Et.current===s&&(J(Et),Xh._currentValue=H)}var Yt,qt;function Vt(s){if(Yt===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);Yt=l&&l[1]||"",qt=-1<f.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Yt+s+qt}var At=!1;function Jt(s,l){if(!s||At)return"";At=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(dt){var ct=dt}Reflect.construct(s,[],bt)}else{try{bt.call()}catch(dt){ct=dt}s.call(bt.prototype)}}else{try{throw Error()}catch(dt){ct=dt}(bt=s())&&typeof bt.catch=="function"&&bt.catch(function(){})}}catch(dt){if(dt&&ct&&typeof dt.stack=="string")return[dt.stack,ct.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=m.DetermineComponentFrameRoot(),L=S[0],q=S[1];if(L&&q){var X=L.split(`
|
|
45
|
+
`),lt=q.split(`
|
|
46
|
+
`);for(C=m=0;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;for(;C<lt.length&&!lt[C].includes("DetermineComponentFrameRoot");)C++;if(m===X.length||C===lt.length)for(m=X.length-1,C=lt.length-1;1<=m&&0<=C&&X[m]!==lt[C];)C--;for(;1<=m&&0<=C;m--,C--)if(X[m]!==lt[C]){if(m!==1||C!==1)do if(m--,C--,0>C||X[m]!==lt[C]){var yt=`
|
|
47
|
+
`+X[m].replace(" at new "," at ");return s.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",s.displayName)),yt}while(1<=m&&0<=C);break}}}finally{At=!1,Error.prepareStackTrace=f}return(f=s?s.displayName||s.name:"")?Vt(f):""}function Ae(s,l){switch(s.tag){case 26:case 27:case 5:return Vt(s.type);case 16:return Vt("Lazy");case 13:return s.child!==l&&l!==null?Vt("Suspense Fallback"):Vt("Suspense");case 19:return Vt("SuspenseList");case 0:case 15:return Jt(s.type,!1);case 11:return Jt(s.type.render,!1);case 1:return Jt(s.type,!0);case 31:return Vt("Activity");default:return""}}function ar(s){try{var l="",f=null;do l+=Ae(s,f),f=s,s=s.return;while(s);return l}catch(m){return`
|
|
48
|
+
Error generating stack: `+m.message+`
|
|
49
|
+
`+m.stack}}var Rr=Object.prototype.hasOwnProperty,he=r.unstable_scheduleCallback,Ee=r.unstable_cancelCallback,Pe=r.unstable_shouldYield,Xr=r.unstable_requestPaint,Re=r.unstable_now,jr=r.unstable_getCurrentPriorityLevel,yi=r.unstable_ImmediatePriority,Br=r.unstable_UserBlockingPriority,yn=r.unstable_NormalPriority,kl=r.unstable_LowPriority,ho=r.unstable_IdlePriority,uo=r.log,Sl=r.unstable_setDisableYieldValue,Dr=null,xr=null;function dr(s){if(typeof uo=="function"&&Sl(s),xr&&typeof xr.setStrictMode=="function")try{xr.setStrictMode(Dr,s)}catch{}}var sr=Math.clz32?Math.clz32:ch,fo=Math.log,po=Math.LN2;function ch(s){return s>>>=0,s===0?32:31-(fo(s)/po|0)|0}var zn=256,qn=262144,is=4194304;function ni(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ns(s,l,f){var m=s.pendingLanes;if(m===0)return 0;var C=0,S=s.suspendedLanes,L=s.pingedLanes;s=s.warmLanes;var q=m&134217727;return q!==0?(m=q&~S,m!==0?C=ni(m):(L&=q,L!==0?C=ni(L):f||(f=q&~s,f!==0&&(C=ni(f))))):(q=m&~S,q!==0?C=ni(q):L!==0?C=ni(L):f||(f=m&~s,f!==0&&(C=ni(f)))),C===0?0:l!==0&&l!==C&&(l&S)===0&&(S=C&-C,f=l&-l,S>=f||S===32&&(f&4194048)!==0)?l:C}function xn(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Qe(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fi(){var s=is;return is<<=1,(is&62914560)===0&&(is=4194304),s}function as(s){for(var l=[],f=0;31>f;f++)l.push(s);return l}function In(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function go(s,l,f,m,C,S){var L=s.pendingLanes;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=f,s.entangledLanes&=f,s.errorRecoveryDisabledLanes&=f,s.shellSuspendCounter=0;var q=s.entanglements,X=s.expirationTimes,lt=s.hiddenUpdates;for(f=L&~f;0<f;){var yt=31-sr(f),bt=1<<yt;q[yt]=0,X[yt]=-1;var ct=lt[yt];if(ct!==null)for(lt[yt]=null,yt=0;yt<ct.length;yt++){var dt=ct[yt];dt!==null&&(dt.lane&=-536870913)}f&=~bt}m!==0&&fa(s,m,0),S!==0&&C===0&&s.tag!==0&&(s.suspendedLanes|=S&~(L&~l))}function fa(s,l,f){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-sr(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|f&261930}function ss(s,l){var f=s.entangledLanes|=l;for(s=s.entanglements;f;){var m=31-sr(f),C=1<<m;C&l|s[m]&l&&(s[m]|=l),f&=~C}}function da(s,l){var f=l&-l;return f=(f&42)!==0?1:qr(f),(f&(s.suspendedLanes|l))!==0?0:f}function qr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function $i(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Zi(){var s=I.p;return s!==0?s:(s=window.event,s===void 0?32:lk(s.type))}function mo(s,l){var f=I.p;try{return I.p=s,l()}finally{I.p=f}}var xi=Math.random().toString(36).slice(2),Ze="__reactFiber$"+xi,He="__reactProps$"+xi,bn="__reactContainer$"+xi,os="__reactEvents$"+xi,wl="__reactListeners$"+xi,Tl="__reactHandles$"+xi,ls="__reactResources$"+xi,Pn="__reactMarker$"+xi;function It(s){delete s[Ze],delete s[He],delete s[os],delete s[wl],delete s[Tl]}function V(s){var l=s[Ze];if(l)return l;for(var f=s.parentNode;f;){if(l=f[bn]||f[Ze]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(s=Y_(s);s!==null;){if(f=s[Ze])return f;s=Y_(s)}return l}s=f,f=s.parentNode}return null}function vt(s){if(s=s[Ze]||s[bn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Lt(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function ue(s){var l=s[ls];return l||(l=s[ls]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function fe(s){s[Pn]=!0}var $e=new Set,br={};function ir(s,l){pr(s,l),pr(s+"Capture",l)}function pr(s,l){for(br[s]=l,s=0;s<l.length;s++)$e.add(l[s])}var cs=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ke={},hs={};function yo(s){return Rr.call(hs,s)?!0:Rr.call(Ke,s)?!1:cs.test(s)?hs[s]=!0:(Ke[s]=!0,!1)}function xo(s,l,f){if(yo(l))if(f===null)s.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+f)}}function bi(s,l,f){if(f===null)s.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+f)}}function vi(s,l,f,m){if(m===null)s.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(f);return}s.setAttributeNS(l,f,""+m)}}function Ci(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function us(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Bl(s,l,f){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,S=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return C.call(this)},set:function(L){f=""+L,S.call(this,L)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(L){f=""+L},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function fs(s){if(!s._valueTracker){var l=us(s)?"checked":"value";s._valueTracker=Bl(s,l,""+s[l])}}function hh(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var f=l.getValue(),m="";return s&&(m=us(s)?s.checked?"true":"false":s.value),s=m,s!==f?(l.setValue(s),!0):!1}function bo(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var uh=/[\n"\\]/g;function ai(s){return s.replace(uh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Hn(s,l,f,m,C,S,L,q){s.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?s.type=L:s.removeAttribute("type"),l!=null?L==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Ci(l)):s.value!==""+Ci(l)&&(s.value=""+Ci(l)):L!=="submit"&&L!=="reset"||s.removeAttribute("value"),l!=null?St(s,L,Ci(l)):f!=null?St(s,L,Ci(f)):m!=null&&s.removeAttribute("value"),C==null&&S!=null&&(s.defaultChecked=!!S),C!=null&&(s.checked=C&&typeof C!="function"&&typeof C!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+Ci(q):s.removeAttribute("name")}function ht(s,l,f,m,C,S,L,q){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||f!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){fs(s);return}f=f!=null?""+Ci(f):"",l=l!=null?""+Ci(l):f,q||l===s.value||(s.value=l),s.defaultValue=l}m=m??C,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=q?s.checked:!!m,s.defaultChecked=!!m,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(s.name=L),fs(s)}function St(s,l,f){l==="number"&&bo(s.ownerDocument)===s||s.defaultValue===""+f||(s.defaultValue=""+f)}function wt(s,l,f,m){if(s=s.options,l){l={};for(var C=0;C<f.length;C++)l["$"+f[C]]=!0;for(f=0;f<s.length;f++)C=l.hasOwnProperty("$"+s[f].value),s[f].selected!==C&&(s[f].selected=C),C&&m&&(s[f].defaultSelected=!0)}else{for(f=""+Ci(f),l=null,C=0;C<s.length;C++){if(s[C].value===f){s[C].selected=!0,m&&(s[C].defaultSelected=!0);return}l!==null||s[C].disabled||(l=s[C])}l!==null&&(l.selected=!0)}}function Ot(s,l,f){if(l!=null&&(l=""+Ci(l),l!==s.value&&(s.value=l),f==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=f!=null?""+Ci(f):""}function de(s,l,f,m){if(l==null){if(m!=null){if(f!=null)throw Error(n(92));if(U(m)){if(1<m.length)throw Error(n(93));m=m[0]}f=m}f==null&&(f=""),l=f}f=Ci(l),s.defaultValue=f,m=s.textContent,m===f&&m!==""&&m!==null&&(s.value=m),fs(s)}function _e(s,l){if(l){var f=s.firstChild;if(f&&f===s.lastChild&&f.nodeType===3){f.nodeValue=l;return}}s.textContent=l}var je=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function vr(s,l,f){var m=l.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,f):typeof f!="number"||f===0||je.has(l)?l==="float"?s.cssFloat=f:s[l]=(""+f).trim():s[l]=f+"px"}function pa(s,l,f){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var C in l)m=l[C],l.hasOwnProperty(C)&&f[C]!==m&&vr(s,C,m)}else for(var S in l)l.hasOwnProperty(S)&&vr(s,S,l[S])}function vn(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Df=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ff=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $f(s){return Ff.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function ga(){}var fm=null;function dm(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Al=null,El=null;function Fv(s){var l=vt(s);if(l&&(s=l.stateNode)){var f=s[He]||null;t:switch(s=l.stateNode,l.type){case"input":if(Hn(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),l=f.name,f.type==="radio"&&l!=null){for(f=s;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+ai(""+l)+'"][type="radio"]'),l=0;l<f.length;l++){var m=f[l];if(m!==s&&m.form===s.form){var C=m[He]||null;if(!C)throw Error(n(90));Hn(m,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(l=0;l<f.length;l++)m=f[l],m.form===s.form&&hh(m)}break t;case"textarea":Ot(s,f.value,f.defaultValue);break t;case"select":l=f.value,l!=null&&wt(s,!!f.multiple,l,!1)}}}var pm=!1;function $v(s,l,f){if(pm)return s(l,f);pm=!0;try{var m=s(l);return m}finally{if(pm=!1,(Al!==null||El!==null)&&(wd(),Al&&(l=Al,s=El,El=Al=null,Fv(l),s)))for(l=0;l<s.length;l++)Fv(s[l])}}function fh(s,l){var f=s.stateNode;if(f===null)return null;var m=f[He]||null;if(m===null)return null;f=m[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break t;default:s=!1}if(s)return null;if(f&&typeof f!="function")throw Error(n(231,l,typeof f));return f}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gm=!1;if(ma)try{var dh={};Object.defineProperty(dh,"passive",{get:function(){gm=!0}}),window.addEventListener("test",dh,dh),window.removeEventListener("test",dh,dh)}catch{gm=!1}var ds=null,mm=null,zf=null;function zv(){if(zf)return zf;var s,l=mm,f=l.length,m,C="value"in ds?ds.value:ds.textContent,S=C.length;for(s=0;s<f&&l[s]===C[s];s++);var L=f-s;for(m=1;m<=L&&l[f-m]===C[S-m];m++);return zf=C.slice(s,1<m?1-m:void 0)}function qf(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function If(){return!0}function qv(){return!1}function _i(s){function l(f,m,C,S,L){this._reactName=f,this._targetInst=C,this.type=m,this.nativeEvent=S,this.target=L,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(f=s[q],this[q]=f?f(S):S[q]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?If:qv,this.isPropagationStopped=qv,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=If)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=If)},persist:function(){},isPersistent:If}),l}var vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pf=_i(vo),ph=g({},vo,{view:0,detail:0}),EN=_i(ph),ym,xm,gh,Hf=g({},ph,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==gh&&(gh&&s.type==="mousemove"?(ym=s.screenX-gh.screenX,xm=s.screenY-gh.screenY):xm=ym=0,gh=s),ym)},movementY:function(s){return"movementY"in s?s.movementY:xm}}),Iv=_i(Hf),MN=g({},Hf,{dataTransfer:0}),LN=_i(MN),ON=g({},ph,{relatedTarget:0}),bm=_i(ON),NN=g({},vo,{animationName:0,elapsedTime:0,pseudoElement:0}),RN=_i(NN),jN=g({},vo,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),DN=_i(jN),FN=g({},vo,{data:0}),Pv=_i(FN),$N={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IN(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=qN[s])?!!l[s]:!1}function vm(){return IN}var PN=g({},ph,{key:function(s){if(s.key){var l=$N[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=qf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?zN[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vm,charCode:function(s){return s.type==="keypress"?qf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?qf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),HN=_i(PN),UN=g({},Hf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hv=_i(UN),WN=g({},ph,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vm}),YN=_i(WN),GN=g({},vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),VN=_i(GN),XN=g({},Hf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),QN=_i(XN),ZN=g({},vo,{newState:0,oldState:0}),KN=_i(ZN),JN=[9,13,27,32],Cm=ma&&"CompositionEvent"in window,mh=null;ma&&"documentMode"in document&&(mh=document.documentMode);var t4=ma&&"TextEvent"in window&&!mh,Uv=ma&&(!Cm||mh&&8<mh&&11>=mh),Wv=" ",Yv=!1;function Gv(s,l){switch(s){case"keyup":return JN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vv(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ml=!1;function e4(s,l){switch(s){case"compositionend":return Vv(l);case"keypress":return l.which!==32?null:(Yv=!0,Wv);case"textInput":return s=l.data,s===Wv&&Yv?null:s;default:return null}}function r4(s,l){if(Ml)return s==="compositionend"||!Cm&&Gv(s,l)?(s=zv(),zf=mm=ds=null,Ml=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Uv&&l.locale!=="ko"?null:l.data;default:return null}}var i4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xv(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!i4[s.type]:l==="textarea"}function Qv(s,l,f,m){Al?El?El.push(m):El=[m]:Al=m,l=Od(l,"onChange"),0<l.length&&(f=new Pf("onChange","change",null,f,m),s.push({event:f,listeners:l}))}var yh=null,xh=null;function n4(s){O_(s,0)}function Uf(s){var l=Lt(s);if(hh(l))return s}function Zv(s,l){if(s==="change")return l}var Kv=!1;if(ma){var _m;if(ma){var km="oninput"in document;if(!km){var Jv=document.createElement("div");Jv.setAttribute("oninput","return;"),km=typeof Jv.oninput=="function"}_m=km}else _m=!1;Kv=_m&&(!document.documentMode||9<document.documentMode)}function tC(){yh&&(yh.detachEvent("onpropertychange",eC),xh=yh=null)}function eC(s){if(s.propertyName==="value"&&Uf(xh)){var l=[];Qv(l,xh,s,dm(s)),$v(n4,l)}}function a4(s,l,f){s==="focusin"?(tC(),yh=l,xh=f,yh.attachEvent("onpropertychange",eC)):s==="focusout"&&tC()}function s4(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Uf(xh)}function o4(s,l){if(s==="click")return Uf(l)}function l4(s,l){if(s==="input"||s==="change")return Uf(l)}function c4(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var zi=typeof Object.is=="function"?Object.is:c4;function bh(s,l){if(zi(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var f=Object.keys(s),m=Object.keys(l);if(f.length!==m.length)return!1;for(m=0;m<f.length;m++){var C=f[m];if(!Rr.call(l,C)||!zi(s[C],l[C]))return!1}return!0}function rC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function iC(s,l){var f=rC(s);s=0;for(var m;f;){if(f.nodeType===3){if(m=s+f.textContent.length,s<=l&&m>=l)return{node:f,offset:l-s};s=m}t:{for(;f;){if(f.nextSibling){f=f.nextSibling;break t}f=f.parentNode}f=void 0}f=rC(f)}}function nC(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?nC(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function aC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=bo(s.document);l instanceof s.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)s=l.contentWindow;else break;l=bo(s.document)}return l}function Sm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var h4=ma&&"documentMode"in document&&11>=document.documentMode,Ll=null,wm=null,vh=null,Tm=!1;function sC(s,l,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Tm||Ll==null||Ll!==bo(m)||(m=Ll,"selectionStart"in m&&Sm(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),vh&&bh(vh,m)||(vh=m,m=Od(wm,"onSelect"),0<m.length&&(l=new Pf("onSelect","select",null,l,f),s.push({event:l,listeners:m}),l.target=Ll)))}function Co(s,l){var f={};return f[s.toLowerCase()]=l.toLowerCase(),f["Webkit"+s]="webkit"+l,f["Moz"+s]="moz"+l,f}var Ol={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionrun:Co("Transition","TransitionRun"),transitionstart:Co("Transition","TransitionStart"),transitioncancel:Co("Transition","TransitionCancel"),transitionend:Co("Transition","TransitionEnd")},Bm={},oC={};ma&&(oC=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function _o(s){if(Bm[s])return Bm[s];if(!Ol[s])return s;var l=Ol[s],f;for(f in l)if(l.hasOwnProperty(f)&&f in oC)return Bm[s]=l[f];return s}var lC=_o("animationend"),cC=_o("animationiteration"),hC=_o("animationstart"),u4=_o("transitionrun"),f4=_o("transitionstart"),d4=_o("transitioncancel"),uC=_o("transitionend"),fC=new Map,Am="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Am.push("scrollEnd");function Cn(s,l){fC.set(s,l),ir(l,[s])}var Wf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Ki=[],Nl=0,Em=0;function Yf(){for(var s=Nl,l=Em=Nl=0;l<s;){var f=Ki[l];Ki[l++]=null;var m=Ki[l];Ki[l++]=null;var C=Ki[l];Ki[l++]=null;var S=Ki[l];if(Ki[l++]=null,m!==null&&C!==null){var L=m.pending;L===null?C.next=C:(C.next=L.next,L.next=C),m.pending=C}S!==0&&dC(f,C,S)}}function Gf(s,l,f,m){Ki[Nl++]=s,Ki[Nl++]=l,Ki[Nl++]=f,Ki[Nl++]=m,Em|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function Mm(s,l,f,m){return Gf(s,l,f,m),Vf(s)}function ko(s,l){return Gf(s,null,null,l),Vf(s)}function dC(s,l,f){s.lanes|=f;var m=s.alternate;m!==null&&(m.lanes|=f);for(var C=!1,S=s.return;S!==null;)S.childLanes|=f,m=S.alternate,m!==null&&(m.childLanes|=f),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(C=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,C&&l!==null&&(C=31-sr(f),s=S.hiddenUpdates,m=s[C],m===null?s[C]=[l]:m.push(l),l.lane=f|536870912),S):null}function Vf(s){if(50<Ph)throw Ph=0,zy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Rl={};function p4(s,l,f,m){this.tag=s,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qi(s,l,f,m){return new p4(s,l,f,m)}function Lm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ya(s,l){var f=s.alternate;return f===null?(f=qi(s.tag,l,s.key,s.mode),f.elementType=s.elementType,f.type=s.type,f.stateNode=s.stateNode,f.alternate=s,s.alternate=f):(f.pendingProps=l,f.type=s.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=s.flags&65011712,f.childLanes=s.childLanes,f.lanes=s.lanes,f.child=s.child,f.memoizedProps=s.memoizedProps,f.memoizedState=s.memoizedState,f.updateQueue=s.updateQueue,l=s.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=s.sibling,f.index=s.index,f.ref=s.ref,f.refCleanup=s.refCleanup,f}function pC(s,l){s.flags&=65011714;var f=s.alternate;return f===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=f.childLanes,s.lanes=f.lanes,s.child=f.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=f.memoizedProps,s.memoizedState=f.memoizedState,s.updateQueue=f.updateQueue,s.type=f.type,l=f.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function Xf(s,l,f,m,C,S){var L=0;if(m=s,typeof s=="function")Lm(s)&&(L=1);else if(typeof s=="string")L=bR(s,f,ut.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case Y:return s=qi(31,f,l,C),s.elementType=Y,s.lanes=S,s;case _:return So(f.children,C,S,l);case k:L=8,C|=24;break;case w:return s=qi(12,f,l,C|2),s.elementType=w,s.lanes=S,s;case O:return s=qi(13,f,l,C),s.elementType=O,s.lanes=S,s;case j:return s=qi(19,f,l,C),s.elementType=j,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case B:L=10;break t;case T:L=9;break t;case E:L=11;break t;case M:L=14;break t;case N:L=16,m=null;break t}L=29,f=Error(n(130,s===null?"null":typeof s,"")),m=null}return l=qi(L,f,l,C),l.elementType=s,l.type=m,l.lanes=S,l}function So(s,l,f,m){return s=qi(7,s,m,l),s.lanes=f,s}function Om(s,l,f){return s=qi(6,s,null,l),s.lanes=f,s}function gC(s){var l=qi(18,null,null,0);return l.stateNode=s,l}function Nm(s,l,f){return l=qi(4,s.children!==null?s.children:[],s.key,l),l.lanes=f,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var mC=new WeakMap;function Ji(s,l){if(typeof s=="object"&&s!==null){var f=mC.get(s);return f!==void 0?f:(l={value:s,source:l,stack:ar(l)},mC.set(s,l),l)}return{value:s,source:l,stack:ar(l)}}var jl=[],Dl=0,Qf=null,Ch=0,tn=[],en=0,ps=null,Un=1,Wn="";function xa(s,l){jl[Dl++]=Ch,jl[Dl++]=Qf,Qf=s,Ch=l}function yC(s,l,f){tn[en++]=Un,tn[en++]=Wn,tn[en++]=ps,ps=s;var m=Un;s=Wn;var C=32-sr(m)-1;m&=~(1<<C),f+=1;var S=32-sr(l)+C;if(30<S){var L=C-C%5;S=(m&(1<<L)-1).toString(32),m>>=L,C-=L,Un=1<<32-sr(l)+C|f<<C|m,Wn=S+s}else Un=1<<S|f<<C|m,Wn=s}function Rm(s){s.return!==null&&(xa(s,1),yC(s,1,0))}function jm(s){for(;s===Qf;)Qf=jl[--Dl],jl[Dl]=null,Ch=jl[--Dl],jl[Dl]=null;for(;s===ps;)ps=tn[--en],tn[en]=null,Wn=tn[--en],tn[en]=null,Un=tn[--en],tn[en]=null}function xC(s,l){tn[en++]=Un,tn[en++]=Wn,tn[en++]=ps,Un=l.id,Wn=l.overflow,ps=s}var Ir=null,Ye=null,xe=!1,gs=null,rn=!1,Dm=Error(n(519));function ms(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _h(Ji(l,s)),Dm}function bC(s){var l=s.stateNode,f=s.type,m=s.memoizedProps;switch(l[Ze]=s,l[He]=m,f){case"dialog":ge("cancel",l),ge("close",l);break;case"iframe":case"object":case"embed":ge("load",l);break;case"video":case"audio":for(f=0;f<Uh.length;f++)ge(Uh[f],l);break;case"source":ge("error",l);break;case"img":case"image":case"link":ge("error",l),ge("load",l);break;case"details":ge("toggle",l);break;case"input":ge("invalid",l),ht(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":ge("invalid",l);break;case"textarea":ge("invalid",l),de(l,m.value,m.defaultValue,m.children)}f=m.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||l.textContent===""+f||m.suppressHydrationWarning===!0||D_(l.textContent,f)?(m.popover!=null&&(ge("beforetoggle",l),ge("toggle",l)),m.onScroll!=null&&ge("scroll",l),m.onScrollEnd!=null&&ge("scrollend",l),m.onClick!=null&&(l.onclick=ga),l=!0):l=!1,l||ms(s,!0)}function vC(s){for(Ir=s.return;Ir;)switch(Ir.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:Ir=Ir.return}}function Fl(s){if(s!==Ir)return!1;if(!xe)return vC(s),xe=!0,!1;var l=s.tag,f;if((f=l!==3&&l!==27)&&((f=l===5)&&(f=s.type,f=!(f!=="form"&&f!=="button")||t0(s.type,s.memoizedProps)),f=!f),f&&Ye&&ms(s),vC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ye=W_(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ye=W_(s)}else l===27?(l=Ye,Ms(s.type)?(s=a0,a0=null,Ye=s):Ye=l):Ye=Ir?an(s.stateNode.nextSibling):null;return!0}function wo(){Ye=Ir=null,xe=!1}function Fm(){var s=gs;return s!==null&&(Ti===null?Ti=s:Ti.push.apply(Ti,s),gs=null),s}function _h(s){gs===null?gs=[s]:gs.push(s)}var $m=P(null),To=null,ba=null;function ys(s,l,f){nt($m,l._currentValue),l._currentValue=f}function va(s){s._currentValue=$m.current,J($m)}function zm(s,l,f){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===f)break;s=s.return}}function qm(s,l,f,m){var C=s.child;for(C!==null&&(C.return=s);C!==null;){var S=C.dependencies;if(S!==null){var L=C.child;S=S.firstContext;t:for(;S!==null;){var q=S;S=C;for(var X=0;X<l.length;X++)if(q.context===l[X]){S.lanes|=f,q=S.alternate,q!==null&&(q.lanes|=f),zm(S.return,f,s),m||(L=null);break t}S=q.next}}else if(C.tag===18){if(L=C.return,L===null)throw Error(n(341));L.lanes|=f,S=L.alternate,S!==null&&(S.lanes|=f),zm(L,f,s),L=null}else L=C.child;if(L!==null)L.return=C;else for(L=C;L!==null;){if(L===s){L=null;break}if(C=L.sibling,C!==null){C.return=L.return,L=C;break}L=L.return}C=L}}function $l(s,l,f,m){s=null;for(var C=l,S=!1;C!==null;){if(!S){if((C.flags&524288)!==0)S=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var L=C.alternate;if(L===null)throw Error(n(387));if(L=L.memoizedProps,L!==null){var q=C.type;zi(C.pendingProps.value,L.value)||(s!==null?s.push(q):s=[q])}}else if(C===Et.current){if(L=C.alternate,L===null)throw Error(n(387));L.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(s!==null?s.push(Xh):s=[Xh])}C=C.return}s!==null&&qm(l,s,f,m),l.flags|=262144}function Zf(s){for(s=s.firstContext;s!==null;){if(!zi(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Bo(s){To=s,ba=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Pr(s){return CC(To,s)}function Kf(s,l){return To===null&&Bo(s),CC(s,l)}function CC(s,l){var f=l._currentValue;if(l={context:l,memoizedValue:f,next:null},ba===null){if(s===null)throw Error(n(308));ba=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else ba=ba.next=l;return f}var g4=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(f,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(f){return f()})}},m4=r.unstable_scheduleCallback,y4=r.unstable_NormalPriority,Cr={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Im(){return{controller:new g4,data:new Map,refCount:0}}function kh(s){s.refCount--,s.refCount===0&&m4(y4,function(){s.controller.abort()})}var Sh=null,Pm=0,zl=0,ql=null;function x4(s,l){if(Sh===null){var f=Sh=[];Pm=0,zl=Wy(),ql={status:"pending",value:void 0,then:function(m){f.push(m)}}}return Pm++,l.then(_C,_C),l}function _C(){if(--Pm===0&&Sh!==null){ql!==null&&(ql.status="fulfilled");var s=Sh;Sh=null,zl=0,ql=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function b4(s,l){var f=[],m={status:"pending",value:null,reason:null,then:function(C){f.push(C)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var C=0;C<f.length;C++)(0,f[C])(l)},function(C){for(m.status="rejected",m.reason=C,C=0;C<f.length;C++)(0,f[C])(void 0)}),m}var kC=R.S;R.S=function(s,l){s_=Re(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&x4(s,l),kC!==null&&kC(s,l)};var Ao=P(null);function Hm(){var s=Ao.current;return s!==null?s:Ue.pooledCache}function Jf(s,l){l===null?nt(Ao,Ao.current):nt(Ao,l.pool)}function SC(){var s=Hm();return s===null?null:{parent:Cr._currentValue,pool:s}}var Il=Error(n(460)),Um=Error(n(474)),td=Error(n(542)),ed={then:function(){}};function wC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function TC(s,l,f){switch(f=s[f],f===void 0?s.push(l):f!==l&&(l.then(ga,ga),l=f),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,AC(s),s;default:if(typeof l.status=="string")l.then(ga,ga);else{if(s=Ue,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var C=l;C.status="fulfilled",C.value=m}},function(m){if(l.status==="pending"){var C=l;C.status="rejected",C.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,AC(s),s}throw Mo=l,Il}}function Eo(s){try{var l=s._init;return l(s._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Mo=f,Il):f}}var Mo=null;function BC(){if(Mo===null)throw Error(n(459));var s=Mo;return Mo=null,s}function AC(s){if(s===Il||s===td)throw Error(n(483))}var Pl=null,wh=0;function rd(s){var l=wh;return wh+=1,Pl===null&&(Pl=[]),TC(Pl,s,l)}function Th(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function id(s,l){throw l.$$typeof===x?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function EC(s){function l(at,tt){if(s){var ot=at.deletions;ot===null?(at.deletions=[tt],at.flags|=16):ot.push(tt)}}function f(at,tt){if(!s)return null;for(;tt!==null;)l(at,tt),tt=tt.sibling;return null}function m(at){for(var tt=new Map;at!==null;)at.key!==null?tt.set(at.key,at):tt.set(at.index,at),at=at.sibling;return tt}function C(at,tt){return at=ya(at,tt),at.index=0,at.sibling=null,at}function S(at,tt,ot){return at.index=ot,s?(ot=at.alternate,ot!==null?(ot=ot.index,ot<tt?(at.flags|=67108866,tt):ot):(at.flags|=67108866,tt)):(at.flags|=1048576,tt)}function L(at){return s&&at.alternate===null&&(at.flags|=67108866),at}function q(at,tt,ot,xt){return tt===null||tt.tag!==6?(tt=Om(ot,at.mode,xt),tt.return=at,tt):(tt=C(tt,ot),tt.return=at,tt)}function X(at,tt,ot,xt){var Gt=ot.type;return Gt===_?yt(at,tt,ot.props.children,xt,ot.key):tt!==null&&(tt.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===N&&Eo(Gt)===tt.type)?(tt=C(tt,ot.props),Th(tt,ot),tt.return=at,tt):(tt=Xf(ot.type,ot.key,ot.props,null,at.mode,xt),Th(tt,ot),tt.return=at,tt)}function lt(at,tt,ot,xt){return tt===null||tt.tag!==4||tt.stateNode.containerInfo!==ot.containerInfo||tt.stateNode.implementation!==ot.implementation?(tt=Nm(ot,at.mode,xt),tt.return=at,tt):(tt=C(tt,ot.children||[]),tt.return=at,tt)}function yt(at,tt,ot,xt,Gt){return tt===null||tt.tag!==7?(tt=So(ot,at.mode,xt,Gt),tt.return=at,tt):(tt=C(tt,ot),tt.return=at,tt)}function bt(at,tt,ot){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return tt=Om(""+tt,at.mode,ot),tt.return=at,tt;if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case y:return ot=Xf(tt.type,tt.key,tt.props,null,at.mode,ot),Th(ot,tt),ot.return=at,ot;case b:return tt=Nm(tt,at.mode,ot),tt.return=at,tt;case N:return tt=Eo(tt),bt(at,tt,ot)}if(U(tt)||K(tt))return tt=So(tt,at.mode,ot,null),tt.return=at,tt;if(typeof tt.then=="function")return bt(at,rd(tt),ot);if(tt.$$typeof===B)return bt(at,Kf(at,tt),ot);id(at,tt)}return null}function ct(at,tt,ot,xt){var Gt=tt!==null?tt.key:null;if(typeof ot=="string"&&ot!==""||typeof ot=="number"||typeof ot=="bigint")return Gt!==null?null:q(at,tt,""+ot,xt);if(typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case y:return ot.key===Gt?X(at,tt,ot,xt):null;case b:return ot.key===Gt?lt(at,tt,ot,xt):null;case N:return ot=Eo(ot),ct(at,tt,ot,xt)}if(U(ot)||K(ot))return Gt!==null?null:yt(at,tt,ot,xt,null);if(typeof ot.then=="function")return ct(at,tt,rd(ot),xt);if(ot.$$typeof===B)return ct(at,tt,Kf(at,ot),xt);id(at,ot)}return null}function dt(at,tt,ot,xt,Gt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return at=at.get(ot)||null,q(tt,at,""+xt,Gt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case y:return at=at.get(xt.key===null?ot:xt.key)||null,X(tt,at,xt,Gt);case b:return at=at.get(xt.key===null?ot:xt.key)||null,lt(tt,at,xt,Gt);case N:return xt=Eo(xt),dt(at,tt,ot,xt,Gt)}if(U(xt)||K(xt))return at=at.get(ot)||null,yt(tt,at,xt,Gt,null);if(typeof xt.then=="function")return dt(at,tt,ot,rd(xt),Gt);if(xt.$$typeof===B)return dt(at,tt,ot,Kf(tt,xt),Gt);id(tt,xt)}return null}function Rt(at,tt,ot,xt){for(var Gt=null,ke=null,$t=tt,oe=tt=0,ye=null;$t!==null&&oe<ot.length;oe++){$t.index>oe?(ye=$t,$t=null):ye=$t.sibling;var Se=ct(at,$t,ot[oe],xt);if(Se===null){$t===null&&($t=ye);break}s&&$t&&Se.alternate===null&&l(at,$t),tt=S(Se,tt,oe),ke===null?Gt=Se:ke.sibling=Se,ke=Se,$t=ye}if(oe===ot.length)return f(at,$t),xe&&xa(at,oe),Gt;if($t===null){for(;oe<ot.length;oe++)$t=bt(at,ot[oe],xt),$t!==null&&(tt=S($t,tt,oe),ke===null?Gt=$t:ke.sibling=$t,ke=$t);return xe&&xa(at,oe),Gt}for($t=m($t);oe<ot.length;oe++)ye=dt($t,at,oe,ot[oe],xt),ye!==null&&(s&&ye.alternate!==null&&$t.delete(ye.key===null?oe:ye.key),tt=S(ye,tt,oe),ke===null?Gt=ye:ke.sibling=ye,ke=ye);return s&&$t.forEach(function(js){return l(at,js)}),xe&&xa(at,oe),Gt}function Zt(at,tt,ot,xt){if(ot==null)throw Error(n(151));for(var Gt=null,ke=null,$t=tt,oe=tt=0,ye=null,Se=ot.next();$t!==null&&!Se.done;oe++,Se=ot.next()){$t.index>oe?(ye=$t,$t=null):ye=$t.sibling;var js=ct(at,$t,Se.value,xt);if(js===null){$t===null&&($t=ye);break}s&&$t&&js.alternate===null&&l(at,$t),tt=S(js,tt,oe),ke===null?Gt=js:ke.sibling=js,ke=js,$t=ye}if(Se.done)return f(at,$t),xe&&xa(at,oe),Gt;if($t===null){for(;!Se.done;oe++,Se=ot.next())Se=bt(at,Se.value,xt),Se!==null&&(tt=S(Se,tt,oe),ke===null?Gt=Se:ke.sibling=Se,ke=Se);return xe&&xa(at,oe),Gt}for($t=m($t);!Se.done;oe++,Se=ot.next())Se=dt($t,at,oe,Se.value,xt),Se!==null&&(s&&Se.alternate!==null&&$t.delete(Se.key===null?oe:Se.key),tt=S(Se,tt,oe),ke===null?Gt=Se:ke.sibling=Se,ke=Se);return s&&$t.forEach(function(MR){return l(at,MR)}),xe&&xa(at,oe),Gt}function Ie(at,tt,ot,xt){if(typeof ot=="object"&&ot!==null&&ot.type===_&&ot.key===null&&(ot=ot.props.children),typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case y:t:{for(var Gt=ot.key;tt!==null;){if(tt.key===Gt){if(Gt=ot.type,Gt===_){if(tt.tag===7){f(at,tt.sibling),xt=C(tt,ot.props.children),xt.return=at,at=xt;break t}}else if(tt.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===N&&Eo(Gt)===tt.type){f(at,tt.sibling),xt=C(tt,ot.props),Th(xt,ot),xt.return=at,at=xt;break t}f(at,tt);break}else l(at,tt);tt=tt.sibling}ot.type===_?(xt=So(ot.props.children,at.mode,xt,ot.key),xt.return=at,at=xt):(xt=Xf(ot.type,ot.key,ot.props,null,at.mode,xt),Th(xt,ot),xt.return=at,at=xt)}return L(at);case b:t:{for(Gt=ot.key;tt!==null;){if(tt.key===Gt)if(tt.tag===4&&tt.stateNode.containerInfo===ot.containerInfo&&tt.stateNode.implementation===ot.implementation){f(at,tt.sibling),xt=C(tt,ot.children||[]),xt.return=at,at=xt;break t}else{f(at,tt);break}else l(at,tt);tt=tt.sibling}xt=Nm(ot,at.mode,xt),xt.return=at,at=xt}return L(at);case N:return ot=Eo(ot),Ie(at,tt,ot,xt)}if(U(ot))return Rt(at,tt,ot,xt);if(K(ot)){if(Gt=K(ot),typeof Gt!="function")throw Error(n(150));return ot=Gt.call(ot),Zt(at,tt,ot,xt)}if(typeof ot.then=="function")return Ie(at,tt,rd(ot),xt);if(ot.$$typeof===B)return Ie(at,tt,Kf(at,ot),xt);id(at,ot)}return typeof ot=="string"&&ot!==""||typeof ot=="number"||typeof ot=="bigint"?(ot=""+ot,tt!==null&&tt.tag===6?(f(at,tt.sibling),xt=C(tt,ot),xt.return=at,at=xt):(f(at,tt),xt=Om(ot,at.mode,xt),xt.return=at,at=xt),L(at)):f(at,tt)}return function(at,tt,ot,xt){try{wh=0;var Gt=Ie(at,tt,ot,xt);return Pl=null,Gt}catch($t){if($t===Il||$t===td)throw $t;var ke=qi(29,$t,null,at.mode);return ke.lanes=xt,ke.return=at,ke}finally{}}}var Lo=EC(!0),MC=EC(!1),xs=!1;function Wm(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ym(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function vs(s,l,f){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Be&2)!==0){var C=m.pending;return C===null?l.next=l:(l.next=C.next,C.next=l),m.pending=l,l=Vf(s),dC(s,null,f),l}return Gf(s,m,l,f),Vf(s)}function Bh(s,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,f|=m,l.lanes=f,ss(s,f)}}function Gm(s,l){var f=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var C=null,S=null;if(f=f.firstBaseUpdate,f!==null){do{var L={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};S===null?C=S=L:S=S.next=L,f=f.next}while(f!==null);S===null?C=S=l:S=S.next=l}else C=S=l;f={baseState:m.baseState,firstBaseUpdate:C,lastBaseUpdate:S,shared:m.shared,callbacks:m.callbacks},s.updateQueue=f;return}s=f.lastBaseUpdate,s===null?f.firstBaseUpdate=l:s.next=l,f.lastBaseUpdate=l}var Vm=!1;function Ah(){if(Vm){var s=ql;if(s!==null)throw s}}function Eh(s,l,f,m){Vm=!1;var C=s.updateQueue;xs=!1;var S=C.firstBaseUpdate,L=C.lastBaseUpdate,q=C.shared.pending;if(q!==null){C.shared.pending=null;var X=q,lt=X.next;X.next=null,L===null?S=lt:L.next=lt,L=X;var yt=s.alternate;yt!==null&&(yt=yt.updateQueue,q=yt.lastBaseUpdate,q!==L&&(q===null?yt.firstBaseUpdate=lt:q.next=lt,yt.lastBaseUpdate=X))}if(S!==null){var bt=C.baseState;L=0,yt=lt=X=null,q=S;do{var ct=q.lane&-536870913,dt=ct!==q.lane;if(dt?(me&ct)===ct:(m&ct)===ct){ct!==0&&ct===zl&&(Vm=!0),yt!==null&&(yt=yt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var Rt=s,Zt=q;ct=l;var Ie=f;switch(Zt.tag){case 1:if(Rt=Zt.payload,typeof Rt=="function"){bt=Rt.call(Ie,bt,ct);break t}bt=Rt;break t;case 3:Rt.flags=Rt.flags&-65537|128;case 0:if(Rt=Zt.payload,ct=typeof Rt=="function"?Rt.call(Ie,bt,ct):Rt,ct==null)break t;bt=g({},bt,ct);break t;case 2:xs=!0}}ct=q.callback,ct!==null&&(s.flags|=64,dt&&(s.flags|=8192),dt=C.callbacks,dt===null?C.callbacks=[ct]:dt.push(ct))}else dt={lane:ct,tag:q.tag,payload:q.payload,callback:q.callback,next:null},yt===null?(lt=yt=dt,X=bt):yt=yt.next=dt,L|=ct;if(q=q.next,q===null){if(q=C.shared.pending,q===null)break;dt=q,q=dt.next,dt.next=null,C.lastBaseUpdate=dt,C.shared.pending=null}}while(!0);yt===null&&(X=bt),C.baseState=X,C.firstBaseUpdate=lt,C.lastBaseUpdate=yt,S===null&&(C.shared.lanes=0),ws|=L,s.lanes=L,s.memoizedState=bt}}function LC(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function OC(s,l){var f=s.callbacks;if(f!==null)for(s.callbacks=null,s=0;s<f.length;s++)LC(f[s],l)}var Hl=P(null),nd=P(0);function NC(s,l){s=Ea,nt(nd,s),nt(Hl,l),Ea=s|l.baseLanes}function Xm(){nt(nd,Ea),nt(Hl,Hl.current)}function Qm(){Ea=nd.current,J(Hl),J(nd)}var Ii=P(null),nn=null;function Cs(s){var l=s.alternate;nt(gr,gr.current&1),nt(Ii,s),nn===null&&(l===null||Hl.current!==null||l.memoizedState!==null)&&(nn=s)}function Zm(s){nt(gr,gr.current),nt(Ii,s),nn===null&&(nn=s)}function RC(s){s.tag===22?(nt(gr,gr.current),nt(Ii,s),nn===null&&(nn=s)):_s()}function _s(){nt(gr,gr.current),nt(Ii,Ii.current)}function Pi(s){J(Ii),nn===s&&(nn=null),J(gr)}var gr=P(0);function ad(s){for(var l=s;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||i0(f)||n0(f)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ca=0,se=null,ze=null,_r=null,sd=!1,Ul=!1,Oo=!1,od=0,Mh=0,Wl=null,v4=0;function or(){throw Error(n(321))}function Km(s,l){if(l===null)return!1;for(var f=0;f<l.length&&f<s.length;f++)if(!zi(s[f],l[f]))return!1;return!0}function Jm(s,l,f,m,C,S){return Ca=S,se=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,R.H=s===null||s.memoizedState===null?y2:py,Oo=!1,S=f(m,C),Oo=!1,Ul&&(S=DC(l,f,m,C)),jC(s),S}function jC(s){R.H=Nh;var l=ze!==null&&ze.next!==null;if(Ca=0,_r=ze=se=null,sd=!1,Mh=0,Wl=null,l)throw Error(n(300));s===null||kr||(s=s.dependencies,s!==null&&Zf(s)&&(kr=!0))}function DC(s,l,f,m){se=s;var C=0;do{if(Ul&&(Wl=null),Mh=0,Ul=!1,25<=C)throw Error(n(301));if(C+=1,_r=ze=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}R.H=x2,S=l(f,m)}while(Ul);return S}function C4(){var s=R.H,l=s.useState()[0];return l=typeof l.then=="function"?Lh(l):l,s=s.useState()[0],(ze!==null?ze.memoizedState:null)!==s&&(se.flags|=1024),l}function ty(){var s=od!==0;return od=0,s}function ey(s,l,f){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~f}function ry(s){if(sd){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}sd=!1}Ca=0,_r=ze=se=null,Ul=!1,Mh=od=0,Wl=null}function si(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _r===null?se.memoizedState=_r=s:_r=_r.next=s,_r}function mr(){if(ze===null){var s=se.alternate;s=s!==null?s.memoizedState:null}else s=ze.next;var l=_r===null?se.memoizedState:_r.next;if(l!==null)_r=l,ze=s;else{if(s===null)throw se.alternate===null?Error(n(467)):Error(n(310));ze=s,s={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},_r===null?se.memoizedState=_r=s:_r=_r.next=s}return _r}function ld(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lh(s){var l=Mh;return Mh+=1,Wl===null&&(Wl=[]),s=TC(Wl,s,l),l=se,(_r===null?l.memoizedState:_r.next)===null&&(l=l.alternate,R.H=l===null||l.memoizedState===null?y2:py),s}function cd(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Lh(s);if(s.$$typeof===B)return Pr(s)}throw Error(n(438,String(s)))}function iy(s){var l=null,f=se.updateQueue;if(f!==null&&(l=f.memoCache),l==null){var m=se.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(C){return C.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),f===null&&(f=ld(),se.updateQueue=f),f.memoCache=l,f=l.data[l.index],f===void 0)for(f=l.data[l.index]=Array(s),m=0;m<s;m++)f[m]=$;return l.index++,f}function _a(s,l){return typeof l=="function"?l(s):l}function hd(s){var l=mr();return ny(l,ze,s)}function ny(s,l,f){var m=s.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=f;var C=s.baseQueue,S=m.pending;if(S!==null){if(C!==null){var L=C.next;C.next=S.next,S.next=L}l.baseQueue=C=S,m.pending=null}if(S=s.baseState,C===null)s.memoizedState=S;else{l=C.next;var q=L=null,X=null,lt=l,yt=!1;do{var bt=lt.lane&-536870913;if(bt!==lt.lane?(me&bt)===bt:(Ca&bt)===bt){var ct=lt.revertLane;if(ct===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null}),bt===zl&&(yt=!0);else if((Ca&ct)===ct){lt=lt.next,ct===zl&&(yt=!0);continue}else bt={lane:0,revertLane:lt.revertLane,gesture:null,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null},X===null?(q=X=bt,L=S):X=X.next=bt,se.lanes|=ct,ws|=ct;bt=lt.action,Oo&&f(S,bt),S=lt.hasEagerState?lt.eagerState:f(S,bt)}else ct={lane:bt,revertLane:lt.revertLane,gesture:lt.gesture,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null},X===null?(q=X=ct,L=S):X=X.next=ct,se.lanes|=bt,ws|=bt;lt=lt.next}while(lt!==null&<!==l);if(X===null?L=S:X.next=q,!zi(S,s.memoizedState)&&(kr=!0,yt&&(f=ql,f!==null)))throw f;s.memoizedState=S,s.baseState=L,s.baseQueue=X,m.lastRenderedState=S}return C===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function ay(s){var l=mr(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=s;var m=f.dispatch,C=f.pending,S=l.memoizedState;if(C!==null){f.pending=null;var L=C=C.next;do S=s(S,L.action),L=L.next;while(L!==C);zi(S,l.memoizedState)||(kr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),f.lastRenderedState=S}return[S,m]}function FC(s,l,f){var m=se,C=mr(),S=xe;if(S){if(f===void 0)throw Error(n(407));f=f()}else f=l();var L=!zi((ze||C).memoizedState,f);if(L&&(C.memoizedState=f,kr=!0),C=C.queue,ly(qC.bind(null,m,C,s),[s]),C.getSnapshot!==l||L||_r!==null&&_r.memoizedState.tag&1){if(m.flags|=2048,Yl(9,{destroy:void 0},zC.bind(null,m,C,f,l),null),Ue===null)throw Error(n(349));S||(Ca&127)!==0||$C(m,l,f)}return f}function $C(s,l,f){s.flags|=16384,s={getSnapshot:l,value:f},l=se.updateQueue,l===null?(l=ld(),se.updateQueue=l,l.stores=[s]):(f=l.stores,f===null?l.stores=[s]:f.push(s))}function zC(s,l,f,m){l.value=f,l.getSnapshot=m,IC(l)&&PC(s)}function qC(s,l,f){return f(function(){IC(l)&&PC(s)})}function IC(s){var l=s.getSnapshot;s=s.value;try{var f=l();return!zi(s,f)}catch{return!0}}function PC(s){var l=ko(s,2);l!==null&&Bi(l,s,2)}function sy(s){var l=si();if(typeof s=="function"){var f=s;if(s=f(),Oo){dr(!0);try{f()}finally{dr(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:s},l}function HC(s,l,f,m){return s.baseState=f,ny(s,ze,typeof m=="function"?m:_a)}function _4(s,l,f,m,C){if(dd(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:C,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){S.listeners.push(L)}};R.T!==null?f(!0):S.isTransition=!1,m(S),f=l.pending,f===null?(S.next=l.pending=S,UC(l,S)):(S.next=f.next,l.pending=f.next=S)}}function UC(s,l){var f=l.action,m=l.payload,C=s.state;if(l.isTransition){var S=R.T,L={};R.T=L;try{var q=f(C,m),X=R.S;X!==null&&X(L,q),WC(s,l,q)}catch(lt){oy(s,l,lt)}finally{S!==null&&L.types!==null&&(S.types=L.types),R.T=S}}else try{S=f(C,m),WC(s,l,S)}catch(lt){oy(s,l,lt)}}function WC(s,l,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){YC(s,l,m)},function(m){return oy(s,l,m)}):YC(s,l,f)}function YC(s,l,f){l.status="fulfilled",l.value=f,GC(l),s.state=f,l=s.pending,l!==null&&(f=l.next,f===l?s.pending=null:(f=f.next,l.next=f,UC(s,f)))}function oy(s,l,f){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=f,GC(l),l=l.next;while(l!==m)}s.action=null}function GC(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function VC(s,l){return l}function XC(s,l){if(xe){var f=Ue.formState;if(f!==null){t:{var m=se;if(xe){if(Ye){e:{for(var C=Ye,S=rn;C.nodeType!==8;){if(!S){C=null;break e}if(C=an(C.nextSibling),C===null){C=null;break e}}S=C.data,C=S==="F!"||S==="F"?C:null}if(C){Ye=an(C.nextSibling),m=C.data==="F!";break t}}ms(m)}m=!1}m&&(l=f[0])}}return f=si(),f.memoizedState=f.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:VC,lastRenderedState:l},f.queue=m,f=p2.bind(null,se,m),m.dispatch=f,m=sy(!1),S=dy.bind(null,se,!1,m.queue),m=si(),C={state:l,dispatch:null,action:s,pending:null},m.queue=C,f=_4.bind(null,se,C,S,f),C.dispatch=f,m.memoizedState=s,[l,f,!1]}function QC(s){var l=mr();return ZC(l,ze,s)}function ZC(s,l,f){if(l=ny(s,l,VC)[0],s=hd(_a)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Lh(l)}catch(L){throw L===Il?td:L}else m=l;l=mr();var C=l.queue,S=C.dispatch;return f!==l.memoizedState&&(se.flags|=2048,Yl(9,{destroy:void 0},k4.bind(null,C,f),null)),[m,S,s]}function k4(s,l){s.action=l}function KC(s){var l=mr(),f=ze;if(f!==null)return ZC(l,f,s);mr(),l=l.memoizedState,f=mr();var m=f.queue.dispatch;return f.memoizedState=s,[l,m,!1]}function Yl(s,l,f,m){return s={tag:s,create:f,deps:m,inst:l,next:null},l=se.updateQueue,l===null&&(l=ld(),se.updateQueue=l),f=l.lastEffect,f===null?l.lastEffect=s.next=s:(m=f.next,f.next=s,s.next=m,l.lastEffect=s),s}function JC(){return mr().memoizedState}function ud(s,l,f,m){var C=si();se.flags|=s,C.memoizedState=Yl(1|l,{destroy:void 0},f,m===void 0?null:m)}function fd(s,l,f,m){var C=mr();m=m===void 0?null:m;var S=C.memoizedState.inst;ze!==null&&m!==null&&Km(m,ze.memoizedState.deps)?C.memoizedState=Yl(l,S,f,m):(se.flags|=s,C.memoizedState=Yl(1|l,S,f,m))}function t2(s,l){ud(8390656,8,s,l)}function ly(s,l){fd(2048,8,s,l)}function S4(s){se.flags|=4;var l=se.updateQueue;if(l===null)l=ld(),se.updateQueue=l,l.events=[s];else{var f=l.events;f===null?l.events=[s]:f.push(s)}}function e2(s){var l=mr().memoizedState;return S4({ref:l,nextImpl:s}),function(){if((Be&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function r2(s,l){return fd(4,2,s,l)}function i2(s,l){return fd(4,4,s,l)}function n2(s,l){if(typeof l=="function"){s=s();var f=l(s);return function(){typeof f=="function"?f():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function a2(s,l,f){f=f!=null?f.concat([s]):null,fd(4,4,n2.bind(null,l,s),f)}function cy(){}function s2(s,l){var f=mr();l=l===void 0?null:l;var m=f.memoizedState;return l!==null&&Km(l,m[1])?m[0]:(f.memoizedState=[s,l],s)}function o2(s,l){var f=mr();l=l===void 0?null:l;var m=f.memoizedState;if(l!==null&&Km(l,m[1]))return m[0];if(m=s(),Oo){dr(!0);try{s()}finally{dr(!1)}}return f.memoizedState=[m,l],m}function hy(s,l,f){return f===void 0||(Ca&1073741824)!==0&&(me&261930)===0?s.memoizedState=l:(s.memoizedState=f,s=l_(),se.lanes|=s,ws|=s,f)}function l2(s,l,f,m){return zi(f,l)?f:Hl.current!==null?(s=hy(s,f,m),zi(s,l)||(kr=!0),s):(Ca&42)===0||(Ca&1073741824)!==0&&(me&261930)===0?(kr=!0,s.memoizedState=f):(s=l_(),se.lanes|=s,ws|=s,l)}function c2(s,l,f,m,C){var S=I.p;I.p=S!==0&&8>S?S:8;var L=R.T,q={};R.T=q,dy(s,!1,l,f);try{var X=C(),lt=R.S;if(lt!==null&<(q,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var yt=b4(X,m);Oh(s,l,yt,Wi(s))}else Oh(s,l,m,Wi(s))}catch(bt){Oh(s,l,{then:function(){},status:"rejected",reason:bt},Wi())}finally{I.p=S,L!==null&&q.types!==null&&(L.types=q.types),R.T=L}}function w4(){}function uy(s,l,f,m){if(s.tag!==5)throw Error(n(476));var C=h2(s).queue;c2(s,C,l,H,f===null?w4:function(){return u2(s),f(m)})}function h2(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:H},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:f},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function u2(s){var l=h2(s);l.next===null&&(l=s.alternate.memoizedState),Oh(s,l.next.queue,{},Wi())}function fy(){return Pr(Xh)}function f2(){return mr().memoizedState}function d2(){return mr().memoizedState}function T4(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var f=Wi();s=bs(f);var m=vs(l,s,f);m!==null&&(Bi(m,l,f),Bh(m,l,f)),l={cache:Im()},s.payload=l;return}l=l.return}}function B4(s,l,f){var m=Wi();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},dd(s)?g2(l,f):(f=Mm(s,l,f,m),f!==null&&(Bi(f,s,m),m2(f,l,m)))}function p2(s,l,f){var m=Wi();Oh(s,l,f,m)}function Oh(s,l,f,m){var C={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(dd(s))g2(l,C);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var L=l.lastRenderedState,q=S(L,f);if(C.hasEagerState=!0,C.eagerState=q,zi(q,L))return Gf(s,l,C,0),Ue===null&&Yf(),!1}catch{}finally{}if(f=Mm(s,l,C,m),f!==null)return Bi(f,s,m),m2(f,l,m),!0}return!1}function dy(s,l,f,m){if(m={lane:2,revertLane:Wy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},dd(s)){if(l)throw Error(n(479))}else l=Mm(s,f,m,2),l!==null&&Bi(l,s,2)}function dd(s){var l=s.alternate;return s===se||l!==null&&l===se}function g2(s,l){Ul=sd=!0;var f=s.pending;f===null?l.next=l:(l.next=f.next,f.next=l),s.pending=l}function m2(s,l,f){if((f&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,f|=m,l.lanes=f,ss(s,f)}}var Nh={readContext:Pr,use:cd,useCallback:or,useContext:or,useEffect:or,useImperativeHandle:or,useLayoutEffect:or,useInsertionEffect:or,useMemo:or,useReducer:or,useRef:or,useState:or,useDebugValue:or,useDeferredValue:or,useTransition:or,useSyncExternalStore:or,useId:or,useHostTransitionStatus:or,useFormState:or,useActionState:or,useOptimistic:or,useMemoCache:or,useCacheRefresh:or};Nh.useEffectEvent=or;var y2={readContext:Pr,use:cd,useCallback:function(s,l){return si().memoizedState=[s,l===void 0?null:l],s},useContext:Pr,useEffect:t2,useImperativeHandle:function(s,l,f){f=f!=null?f.concat([s]):null,ud(4194308,4,n2.bind(null,l,s),f)},useLayoutEffect:function(s,l){return ud(4194308,4,s,l)},useInsertionEffect:function(s,l){ud(4,2,s,l)},useMemo:function(s,l){var f=si();l=l===void 0?null:l;var m=s();if(Oo){dr(!0);try{s()}finally{dr(!1)}}return f.memoizedState=[m,l],m},useReducer:function(s,l,f){var m=si();if(f!==void 0){var C=f(l);if(Oo){dr(!0);try{f(l)}finally{dr(!1)}}}else C=l;return m.memoizedState=m.baseState=C,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:C},m.queue=s,s=s.dispatch=B4.bind(null,se,s),[m.memoizedState,s]},useRef:function(s){var l=si();return s={current:s},l.memoizedState=s},useState:function(s){s=sy(s);var l=s.queue,f=p2.bind(null,se,l);return l.dispatch=f,[s.memoizedState,f]},useDebugValue:cy,useDeferredValue:function(s,l){var f=si();return hy(f,s,l)},useTransition:function(){var s=sy(!1);return s=c2.bind(null,se,s.queue,!0,!1),si().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,f){var m=se,C=si();if(xe){if(f===void 0)throw Error(n(407));f=f()}else{if(f=l(),Ue===null)throw Error(n(349));(me&127)!==0||$C(m,l,f)}C.memoizedState=f;var S={value:f,getSnapshot:l};return C.queue=S,t2(qC.bind(null,m,S,s),[s]),m.flags|=2048,Yl(9,{destroy:void 0},zC.bind(null,m,S,f,l),null),f},useId:function(){var s=si(),l=Ue.identifierPrefix;if(xe){var f=Wn,m=Un;f=(m&~(1<<32-sr(m)-1)).toString(32)+f,l="_"+l+"R_"+f,f=od++,0<f&&(l+="H"+f.toString(32)),l+="_"}else f=v4++,l="_"+l+"r_"+f.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:fy,useFormState:XC,useActionState:XC,useOptimistic:function(s){var l=si();l.memoizedState=l.baseState=s;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=f,l=dy.bind(null,se,!0,f),f.dispatch=l,[s,l]},useMemoCache:iy,useCacheRefresh:function(){return si().memoizedState=T4.bind(null,se)},useEffectEvent:function(s){var l=si(),f={impl:s};return l.memoizedState=f,function(){if((Be&2)!==0)throw Error(n(440));return f.impl.apply(void 0,arguments)}}},py={readContext:Pr,use:cd,useCallback:s2,useContext:Pr,useEffect:ly,useImperativeHandle:a2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:o2,useReducer:hd,useRef:JC,useState:function(){return hd(_a)},useDebugValue:cy,useDeferredValue:function(s,l){var f=mr();return l2(f,ze.memoizedState,s,l)},useTransition:function(){var s=hd(_a)[0],l=mr().memoizedState;return[typeof s=="boolean"?s:Lh(s),l]},useSyncExternalStore:FC,useId:f2,useHostTransitionStatus:fy,useFormState:QC,useActionState:QC,useOptimistic:function(s,l){var f=mr();return HC(f,ze,s,l)},useMemoCache:iy,useCacheRefresh:d2};py.useEffectEvent=e2;var x2={readContext:Pr,use:cd,useCallback:s2,useContext:Pr,useEffect:ly,useImperativeHandle:a2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:o2,useReducer:ay,useRef:JC,useState:function(){return ay(_a)},useDebugValue:cy,useDeferredValue:function(s,l){var f=mr();return ze===null?hy(f,s,l):l2(f,ze.memoizedState,s,l)},useTransition:function(){var s=ay(_a)[0],l=mr().memoizedState;return[typeof s=="boolean"?s:Lh(s),l]},useSyncExternalStore:FC,useId:f2,useHostTransitionStatus:fy,useFormState:KC,useActionState:KC,useOptimistic:function(s,l){var f=mr();return ze!==null?HC(f,ze,s,l):(f.baseState=s,[s,f.queue.dispatch])},useMemoCache:iy,useCacheRefresh:d2};x2.useEffectEvent=e2;function gy(s,l,f,m){l=s.memoizedState,f=f(m,l),f=f==null?l:g({},l,f),s.memoizedState=f,s.lanes===0&&(s.updateQueue.baseState=f)}var my={enqueueSetState:function(s,l,f){s=s._reactInternals;var m=Wi(),C=bs(m);C.payload=l,f!=null&&(C.callback=f),l=vs(s,C,m),l!==null&&(Bi(l,s,m),Bh(l,s,m))},enqueueReplaceState:function(s,l,f){s=s._reactInternals;var m=Wi(),C=bs(m);C.tag=1,C.payload=l,f!=null&&(C.callback=f),l=vs(s,C,m),l!==null&&(Bi(l,s,m),Bh(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var f=Wi(),m=bs(f);m.tag=2,l!=null&&(m.callback=l),l=vs(s,m,f),l!==null&&(Bi(l,s,f),Bh(l,s,f))}};function b2(s,l,f,m,C,S,L){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,S,L):l.prototype&&l.prototype.isPureReactComponent?!bh(f,m)||!bh(C,S):!0}function v2(s,l,f,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,m),l.state!==s&&my.enqueueReplaceState(l,l.state,null)}function No(s,l){var f=l;if("ref"in l){f={};for(var m in l)m!=="ref"&&(f[m]=l[m])}if(s=s.defaultProps){f===l&&(f=g({},f));for(var C in s)f[C]===void 0&&(f[C]=s[C])}return f}function C2(s){Wf(s)}function _2(s){console.error(s)}function k2(s){Wf(s)}function pd(s,l){try{var f=s.onUncaughtError;f(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function S2(s,l,f){try{var m=s.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function yy(s,l,f){return f=bs(f),f.tag=3,f.payload={element:null},f.callback=function(){pd(s,l)},f}function w2(s){return s=bs(s),s.tag=3,s}function T2(s,l,f,m){var C=f.type.getDerivedStateFromError;if(typeof C=="function"){var S=m.value;s.payload=function(){return C(S)},s.callback=function(){S2(l,f,m)}}var L=f.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(s.callback=function(){S2(l,f,m),typeof C!="function"&&(Ts===null?Ts=new Set([this]):Ts.add(this));var q=m.stack;this.componentDidCatch(m.value,{componentStack:q!==null?q:""})})}function A4(s,l,f,m,C){if(f.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=f.alternate,l!==null&&$l(l,f,C,!0),f=Ii.current,f!==null){switch(f.tag){case 31:case 13:return nn===null?Td():f.alternate===null&&lr===0&&(lr=3),f.flags&=-257,f.flags|=65536,f.lanes=C,m===ed?f.flags|=16384:(l=f.updateQueue,l===null?f.updateQueue=new Set([m]):l.add(m),Py(s,m,C)),!1;case 22:return f.flags|=65536,m===ed?f.flags|=16384:(l=f.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},f.updateQueue=l):(f=l.retryQueue,f===null?l.retryQueue=new Set([m]):f.add(m)),Py(s,m,C)),!1}throw Error(n(435,f.tag))}return Py(s,m,C),Td(),!1}if(xe)return l=Ii.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=C,m!==Dm&&(s=Error(n(422),{cause:m}),_h(Ji(s,f)))):(m!==Dm&&(l=Error(n(423),{cause:m}),_h(Ji(l,f))),s=s.current.alternate,s.flags|=65536,C&=-C,s.lanes|=C,m=Ji(m,f),C=yy(s.stateNode,m,C),Gm(s,C),lr!==4&&(lr=2)),!1;var S=Error(n(520),{cause:m});if(S=Ji(S,f),Ih===null?Ih=[S]:Ih.push(S),lr!==4&&(lr=2),l===null)return!0;m=Ji(m,f),f=l;do{switch(f.tag){case 3:return f.flags|=65536,s=C&-C,f.lanes|=s,s=yy(f.stateNode,m,s),Gm(f,s),!1;case 1:if(l=f.type,S=f.stateNode,(f.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Ts===null||!Ts.has(S))))return f.flags|=65536,C&=-C,f.lanes|=C,C=w2(C),T2(C,s,f,m),Gm(f,C),!1}f=f.return}while(f!==null);return!1}var xy=Error(n(461)),kr=!1;function Hr(s,l,f,m){l.child=s===null?MC(l,null,f,m):Lo(l,s.child,f,m)}function B2(s,l,f,m,C){f=f.render;var S=l.ref;if("ref"in m){var L={};for(var q in m)q!=="ref"&&(L[q]=m[q])}else L=m;return Bo(l),m=Jm(s,l,f,L,S,C),q=ty(),s!==null&&!kr?(ey(s,l,C),ka(s,l,C)):(xe&&q&&Rm(l),l.flags|=1,Hr(s,l,m,C),l.child)}function A2(s,l,f,m,C){if(s===null){var S=f.type;return typeof S=="function"&&!Lm(S)&&S.defaultProps===void 0&&f.compare===null?(l.tag=15,l.type=S,E2(s,l,S,m,C)):(s=Xf(f.type,null,m,l,l.mode,C),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Ty(s,C)){var L=S.memoizedProps;if(f=f.compare,f=f!==null?f:bh,f(L,m)&&s.ref===l.ref)return ka(s,l,C)}return l.flags|=1,s=ya(S,m),s.ref=l.ref,s.return=l,l.child=s}function E2(s,l,f,m,C){if(s!==null){var S=s.memoizedProps;if(bh(S,m)&&s.ref===l.ref)if(kr=!1,l.pendingProps=m=S,Ty(s,C))(s.flags&131072)!==0&&(kr=!0);else return l.lanes=s.lanes,ka(s,l,C)}return by(s,l,f,m,C)}function M2(s,l,f,m){var C=m.children,S=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|f:f,s!==null){for(m=l.child=s.child,C=0;m!==null;)C=C|m.lanes|m.childLanes,m=m.sibling;m=C&~S}else m=0,l.child=null;return L2(s,l,S,f,m)}if((f&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Jf(l,S!==null?S.cachePool:null),S!==null?NC(l,S):Xm(),RC(l);else return m=l.lanes=536870912,L2(s,l,S!==null?S.baseLanes|f:f,f,m)}else S!==null?(Jf(l,S.cachePool),NC(l,S),_s(),l.memoizedState=null):(s!==null&&Jf(l,null),Xm(),_s());return Hr(s,l,C,f),l.child}function Rh(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function L2(s,l,f,m,C){var S=Hm();return S=S===null?null:{parent:Cr._currentValue,pool:S},l.memoizedState={baseLanes:f,cachePool:S},s!==null&&Jf(l,null),Xm(),RC(l),s!==null&&$l(s,l,m,!0),l.childLanes=C,null}function gd(s,l){return l=yd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function O2(s,l,f){return Lo(l,s.child,null,f),s=gd(l,l.pendingProps),s.flags|=2,Pi(l),l.memoizedState=null,s}function E4(s,l,f){var m=l.pendingProps,C=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(xe){if(m.mode==="hidden")return s=gd(l,m),l.lanes=536870912,Rh(null,s);if(Zm(l),(s=Ye)?(s=U_(s,rn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:ps!==null?{id:Un,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},f=gC(s),f.return=l,l.child=f,Ir=l,Ye=null)):s=null,s===null)throw ms(l);return l.lanes=536870912,null}return gd(l,m)}var S=s.memoizedState;if(S!==null){var L=S.dehydrated;if(Zm(l),C)if(l.flags&256)l.flags&=-257,l=O2(s,l,f);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(kr||$l(s,l,f,!1),C=(f&s.childLanes)!==0,kr||C){if(m=Ue,m!==null&&(L=da(m,f),L!==0&&L!==S.retryLane))throw S.retryLane=L,ko(s,L),Bi(m,s,L),xy;Td(),l=O2(s,l,f)}else s=S.treeContext,Ye=an(L.nextSibling),Ir=l,xe=!0,gs=null,rn=!1,s!==null&&xC(l,s),l=gd(l,m),l.flags|=4096;return l}return s=ya(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function md(s,l){var f=l.ref;if(f===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(n(284));(s===null||s.ref!==f)&&(l.flags|=4194816)}}function by(s,l,f,m,C){return Bo(l),f=Jm(s,l,f,m,void 0,C),m=ty(),s!==null&&!kr?(ey(s,l,C),ka(s,l,C)):(xe&&m&&Rm(l),l.flags|=1,Hr(s,l,f,C),l.child)}function N2(s,l,f,m,C,S){return Bo(l),l.updateQueue=null,f=DC(l,m,f,C),jC(s),m=ty(),s!==null&&!kr?(ey(s,l,S),ka(s,l,S)):(xe&&m&&Rm(l),l.flags|=1,Hr(s,l,f,S),l.child)}function R2(s,l,f,m,C){if(Bo(l),l.stateNode===null){var S=Rl,L=f.contextType;typeof L=="object"&&L!==null&&(S=Pr(L)),S=new f(m,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=my,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=m,S.state=l.memoizedState,S.refs={},Wm(l),L=f.contextType,S.context=typeof L=="object"&&L!==null?Pr(L):Rl,S.state=l.memoizedState,L=f.getDerivedStateFromProps,typeof L=="function"&&(gy(l,f,L,m),S.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(L=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),L!==S.state&&my.enqueueReplaceState(S,S.state,null),Eh(l,m,S,C),Ah(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){S=l.stateNode;var q=l.memoizedProps,X=No(f,q);S.props=X;var lt=S.context,yt=f.contextType;L=Rl,typeof yt=="object"&&yt!==null&&(L=Pr(yt));var bt=f.getDerivedStateFromProps;yt=typeof bt=="function"||typeof S.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,yt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(q||lt!==L)&&v2(l,S,m,L),xs=!1;var ct=l.memoizedState;S.state=ct,Eh(l,m,S,C),Ah(),lt=l.memoizedState,q||ct!==lt||xs?(typeof bt=="function"&&(gy(l,f,bt,m),lt=l.memoizedState),(X=xs||b2(l,f,X,m,ct,lt,L))?(yt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=lt),S.props=m,S.state=lt,S.context=L,m=X):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{S=l.stateNode,Ym(s,l),L=l.memoizedProps,yt=No(f,L),S.props=yt,bt=l.pendingProps,ct=S.context,lt=f.contextType,X=Rl,typeof lt=="object"&<!==null&&(X=Pr(lt)),q=f.getDerivedStateFromProps,(lt=typeof q=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==bt||ct!==X)&&v2(l,S,m,X),xs=!1,ct=l.memoizedState,S.state=ct,Eh(l,m,S,C),Ah();var dt=l.memoizedState;L!==bt||ct!==dt||xs||s!==null&&s.dependencies!==null&&Zf(s.dependencies)?(typeof q=="function"&&(gy(l,f,q,m),dt=l.memoizedState),(yt=xs||b2(l,f,yt,m,ct,dt,X)||s!==null&&s.dependencies!==null&&Zf(s.dependencies))?(lt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(m,dt,X),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(m,dt,X)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ct===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ct===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=dt),S.props=m,S.state=dt,S.context=X,m=yt):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ct===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ct===s.memoizedState||(l.flags|=1024),m=!1)}return S=m,md(s,l),m=(l.flags&128)!==0,S||m?(S=l.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&m?(l.child=Lo(l,s.child,null,C),l.child=Lo(l,null,f,C)):Hr(s,l,f,C),l.memoizedState=S.state,s=l.child):s=ka(s,l,C),s}function j2(s,l,f,m){return wo(),l.flags|=256,Hr(s,l,f,m),l.child}var vy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cy(s){return{baseLanes:s,cachePool:SC()}}function _y(s,l,f){return s=s!==null?s.childLanes&~f:0,l&&(s|=Ui),s}function D2(s,l,f){var m=l.pendingProps,C=!1,S=(l.flags&128)!==0,L;if((L=S)||(L=s!==null&&s.memoizedState===null?!1:(gr.current&2)!==0),L&&(C=!0,l.flags&=-129),L=(l.flags&32)!==0,l.flags&=-33,s===null){if(xe){if(C?Cs(l):_s(),(s=Ye)?(s=U_(s,rn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:ps!==null?{id:Un,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},f=gC(s),f.return=l,l.child=f,Ir=l,Ye=null)):s=null,s===null)throw ms(l);return n0(s)?l.lanes=32:l.lanes=536870912,null}var q=m.children;return m=m.fallback,C?(_s(),C=l.mode,q=yd({mode:"hidden",children:q},C),m=So(m,C,f,null),q.return=l,m.return=l,q.sibling=m,l.child=q,m=l.child,m.memoizedState=Cy(f),m.childLanes=_y(s,L,f),l.memoizedState=vy,Rh(null,m)):(Cs(l),ky(l,q))}var X=s.memoizedState;if(X!==null&&(q=X.dehydrated,q!==null)){if(S)l.flags&256?(Cs(l),l.flags&=-257,l=Sy(s,l,f)):l.memoizedState!==null?(_s(),l.child=s.child,l.flags|=128,l=null):(_s(),q=m.fallback,C=l.mode,m=yd({mode:"visible",children:m.children},C),q=So(q,C,f,null),q.flags|=2,m.return=l,q.return=l,m.sibling=q,l.child=m,Lo(l,s.child,null,f),m=l.child,m.memoizedState=Cy(f),m.childLanes=_y(s,L,f),l.memoizedState=vy,l=Rh(null,m));else if(Cs(l),n0(q)){if(L=q.nextSibling&&q.nextSibling.dataset,L)var lt=L.dgst;L=lt,m=Error(n(419)),m.stack="",m.digest=L,_h({value:m,source:null,stack:null}),l=Sy(s,l,f)}else if(kr||$l(s,l,f,!1),L=(f&s.childLanes)!==0,kr||L){if(L=Ue,L!==null&&(m=da(L,f),m!==0&&m!==X.retryLane))throw X.retryLane=m,ko(s,m),Bi(L,s,m),xy;i0(q)||Td(),l=Sy(s,l,f)}else i0(q)?(l.flags|=192,l.child=s.child,l=null):(s=X.treeContext,Ye=an(q.nextSibling),Ir=l,xe=!0,gs=null,rn=!1,s!==null&&xC(l,s),l=ky(l,m.children),l.flags|=4096);return l}return C?(_s(),q=m.fallback,C=l.mode,X=s.child,lt=X.sibling,m=ya(X,{mode:"hidden",children:m.children}),m.subtreeFlags=X.subtreeFlags&65011712,lt!==null?q=ya(lt,q):(q=So(q,C,f,null),q.flags|=2),q.return=l,m.return=l,m.sibling=q,l.child=m,Rh(null,m),m=l.child,q=s.child.memoizedState,q===null?q=Cy(f):(C=q.cachePool,C!==null?(X=Cr._currentValue,C=C.parent!==X?{parent:X,pool:X}:C):C=SC(),q={baseLanes:q.baseLanes|f,cachePool:C}),m.memoizedState=q,m.childLanes=_y(s,L,f),l.memoizedState=vy,Rh(s.child,m)):(Cs(l),f=s.child,s=f.sibling,f=ya(f,{mode:"visible",children:m.children}),f.return=l,f.sibling=null,s!==null&&(L=l.deletions,L===null?(l.deletions=[s],l.flags|=16):L.push(s)),l.child=f,l.memoizedState=null,f)}function ky(s,l){return l=yd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function yd(s,l){return s=qi(22,s,null,l),s.lanes=0,s}function Sy(s,l,f){return Lo(l,s.child,null,f),s=ky(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function F2(s,l,f){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),zm(s.return,l,f)}function wy(s,l,f,m,C,S){var L=s.memoizedState;L===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:C,treeForkCount:S}:(L.isBackwards=l,L.rendering=null,L.renderingStartTime=0,L.last=m,L.tail=f,L.tailMode=C,L.treeForkCount=S)}function $2(s,l,f){var m=l.pendingProps,C=m.revealOrder,S=m.tail;m=m.children;var L=gr.current,q=(L&2)!==0;if(q?(L=L&1|2,l.flags|=128):L&=1,nt(gr,L),Hr(s,l,m,f),m=xe?Ch:0,!q&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&F2(s,f,l);else if(s.tag===19)F2(s,f,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(C){case"forwards":for(f=l.child,C=null;f!==null;)s=f.alternate,s!==null&&ad(s)===null&&(C=f),f=f.sibling;f=C,f===null?(C=l.child,l.child=null):(C=f.sibling,f.sibling=null),wy(l,!1,C,f,S,m);break;case"backwards":case"unstable_legacy-backwards":for(f=null,C=l.child,l.child=null;C!==null;){if(s=C.alternate,s!==null&&ad(s)===null){l.child=C;break}s=C.sibling,C.sibling=f,f=C,C=s}wy(l,!0,f,null,S,m);break;case"together":wy(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function ka(s,l,f){if(s!==null&&(l.dependencies=s.dependencies),ws|=l.lanes,(f&l.childLanes)===0)if(s!==null){if($l(s,l,f,!1),(f&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,f=ya(s,s.pendingProps),l.child=f,f.return=l;s.sibling!==null;)s=s.sibling,f=f.sibling=ya(s,s.pendingProps),f.return=l;f.sibling=null}return l.child}function Ty(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Zf(s)))}function M4(s,l,f){switch(l.tag){case 3:st(l,l.stateNode.containerInfo),ys(l,Cr,s.memoizedState.cache),wo();break;case 27:case 5:mt(l);break;case 4:st(l,l.stateNode.containerInfo);break;case 10:ys(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Zm(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(Cs(l),l.flags|=128,null):(f&l.child.childLanes)!==0?D2(s,l,f):(Cs(l),s=ka(s,l,f),s!==null?s.sibling:null);Cs(l);break;case 19:var C=(s.flags&128)!==0;if(m=(f&l.childLanes)!==0,m||($l(s,l,f,!1),m=(f&l.childLanes)!==0),C){if(m)return $2(s,l,f);l.flags|=128}if(C=l.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),nt(gr,gr.current),m)break;return null;case 22:return l.lanes=0,M2(s,l,f,l.pendingProps);case 24:ys(l,Cr,s.memoizedState.cache)}return ka(s,l,f)}function z2(s,l,f){if(s!==null)if(s.memoizedProps!==l.pendingProps)kr=!0;else{if(!Ty(s,f)&&(l.flags&128)===0)return kr=!1,M4(s,l,f);kr=(s.flags&131072)!==0}else kr=!1,xe&&(l.flags&1048576)!==0&&yC(l,Ch,l.index);switch(l.lanes=0,l.tag){case 16:t:{var m=l.pendingProps;if(s=Eo(l.elementType),l.type=s,typeof s=="function")Lm(s)?(m=No(s,m),l.tag=1,l=R2(null,l,s,m,f)):(l.tag=0,l=by(null,l,s,m,f));else{if(s!=null){var C=s.$$typeof;if(C===E){l.tag=11,l=B2(null,l,s,m,f);break t}else if(C===M){l.tag=14,l=A2(null,l,s,m,f);break t}}throw l=F(s)||s,Error(n(306,l,""))}}return l;case 0:return by(s,l,l.type,l.pendingProps,f);case 1:return m=l.type,C=No(m,l.pendingProps),R2(s,l,m,C,f);case 3:t:{if(st(l,l.stateNode.containerInfo),s===null)throw Error(n(387));m=l.pendingProps;var S=l.memoizedState;C=S.element,Ym(s,l),Eh(l,m,null,f);var L=l.memoizedState;if(m=L.cache,ys(l,Cr,m),m!==S.cache&&qm(l,[Cr],f,!0),Ah(),m=L.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:L.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=j2(s,l,m,f);break t}else if(m!==C){C=Ji(Error(n(424)),l),_h(C),l=j2(s,l,m,f);break t}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Ye=an(s.firstChild),Ir=l,xe=!0,gs=null,rn=!0,f=MC(l,null,m,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(wo(),m===C){l=ka(s,l,f);break t}Hr(s,l,m,f)}l=l.child}return l;case 26:return md(s,l),s===null?(f=Q_(l.type,null,l.pendingProps,null))?l.memoizedState=f:xe||(f=l.type,s=l.pendingProps,m=Nd(kt.current).createElement(f),m[Ze]=l,m[He]=s,Ur(m,f,s),fe(m),l.stateNode=m):l.memoizedState=Q_(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return mt(l),s===null&&xe&&(m=l.stateNode=G_(l.type,l.pendingProps,kt.current),Ir=l,rn=!0,C=Ye,Ms(l.type)?(a0=C,Ye=an(m.firstChild)):Ye=C),Hr(s,l,l.pendingProps.children,f),md(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&xe&&((C=m=Ye)&&(m=sR(m,l.type,l.pendingProps,rn),m!==null?(l.stateNode=m,Ir=l,Ye=an(m.firstChild),rn=!1,C=!0):C=!1),C||ms(l)),mt(l),C=l.type,S=l.pendingProps,L=s!==null?s.memoizedProps:null,m=S.children,t0(C,S)?m=null:L!==null&&t0(C,L)&&(l.flags|=32),l.memoizedState!==null&&(C=Jm(s,l,C4,null,null,f),Xh._currentValue=C),md(s,l),Hr(s,l,m,f),l.child;case 6:return s===null&&xe&&((s=f=Ye)&&(f=oR(f,l.pendingProps,rn),f!==null?(l.stateNode=f,Ir=l,Ye=null,s=!0):s=!1),s||ms(l)),null;case 13:return D2(s,l,f);case 4:return st(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Lo(l,null,m,f):Hr(s,l,m,f),l.child;case 11:return B2(s,l,l.type,l.pendingProps,f);case 7:return Hr(s,l,l.pendingProps,f),l.child;case 8:return Hr(s,l,l.pendingProps.children,f),l.child;case 12:return Hr(s,l,l.pendingProps.children,f),l.child;case 10:return m=l.pendingProps,ys(l,l.type,m.value),Hr(s,l,m.children,f),l.child;case 9:return C=l.type._context,m=l.pendingProps.children,Bo(l),C=Pr(C),m=m(C),l.flags|=1,Hr(s,l,m,f),l.child;case 14:return A2(s,l,l.type,l.pendingProps,f);case 15:return E2(s,l,l.type,l.pendingProps,f);case 19:return $2(s,l,f);case 31:return E4(s,l,f);case 22:return M2(s,l,f,l.pendingProps);case 24:return Bo(l),m=Pr(Cr),s===null?(C=Hm(),C===null&&(C=Ue,S=Im(),C.pooledCache=S,S.refCount++,S!==null&&(C.pooledCacheLanes|=f),C=S),l.memoizedState={parent:m,cache:C},Wm(l),ys(l,Cr,C)):((s.lanes&f)!==0&&(Ym(s,l),Eh(l,null,null,f),Ah()),C=s.memoizedState,S=l.memoizedState,C.parent!==m?(C={parent:m,cache:m},l.memoizedState=C,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=C),ys(l,Cr,m)):(m=S.cache,ys(l,Cr,m),m!==C.cache&&qm(l,[Cr],f,!0))),Hr(s,l,l.pendingProps.children,f),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function Sa(s){s.flags|=4}function By(s,l,f,m,C){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(C&335544128)===C)if(s.stateNode.complete)s.flags|=8192;else if(f_())s.flags|=8192;else throw Mo=ed,Um}else s.flags&=-16777217}function q2(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!ek(l))if(f_())s.flags|=8192;else throw Mo=ed,Um}function xd(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?Fi():536870912,s.lanes|=l,Ql|=l)}function jh(s,l){if(!xe)switch(s.tailMode){case"hidden":l=s.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s.tail=null:f.sibling=null;break;case"collapsed":f=s.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Ge(s){var l=s.alternate!==null&&s.alternate.child===s.child,f=0,m=0;if(l)for(var C=s.child;C!==null;)f|=C.lanes|C.childLanes,m|=C.subtreeFlags&65011712,m|=C.flags&65011712,C.return=s,C=C.sibling;else for(C=s.child;C!==null;)f|=C.lanes|C.childLanes,m|=C.subtreeFlags,m|=C.flags,C.return=s,C=C.sibling;return s.subtreeFlags|=m,s.childLanes=f,l}function L4(s,l,f){var m=l.pendingProps;switch(jm(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(l),null;case 1:return Ge(l),null;case 3:return f=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),va(Cr),Ct(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(Fl(l)?Sa(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Fm())),Ge(l),null;case 26:var C=l.type,S=l.memoizedState;return s===null?(Sa(l),S!==null?(Ge(l),q2(l,S)):(Ge(l),By(l,C,null,m,f))):S?S!==s.memoizedState?(Sa(l),Ge(l),q2(l,S)):(Ge(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&Sa(l),Ge(l),By(l,C,s,m,f)),null;case 27:if(Bt(l),f=kt.current,C=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Sa(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ge(l),null}s=ut.current,Fl(l)?bC(l):(s=G_(C,m,f),l.stateNode=s,Sa(l))}return Ge(l),null;case 5:if(Bt(l),C=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Sa(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ge(l),null}if(S=ut.current,Fl(l))bC(l);else{var L=Nd(kt.current);switch(S){case 1:S=L.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:S=L.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":S=L.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":S=L.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":S=L.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof m.is=="string"?L.createElement("select",{is:m.is}):L.createElement("select"),m.multiple?S.multiple=!0:m.size&&(S.size=m.size);break;default:S=typeof m.is=="string"?L.createElement(C,{is:m.is}):L.createElement(C)}}S[Ze]=l,S[He]=m;t:for(L=l.child;L!==null;){if(L.tag===5||L.tag===6)S.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===l)break t;for(;L.sibling===null;){if(L.return===null||L.return===l)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}l.stateNode=S;t:switch(Ur(S,C,m),C){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&Sa(l)}}return Ge(l),By(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,f),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&Sa(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(n(166));if(s=kt.current,Fl(l)){if(s=l.stateNode,f=l.memoizedProps,m=null,C=Ir,C!==null)switch(C.tag){case 27:case 5:m=C.memoizedProps}s[Ze]=l,s=!!(s.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||D_(s.nodeValue,f)),s||ms(l,!0)}else s=Nd(s).createTextNode(m),s[Ze]=l,l.stateNode=s}return Ge(l),null;case 31:if(f=l.memoizedState,s===null||s.memoizedState!==null){if(m=Fl(l),f!==null){if(s===null){if(!m)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[Ze]=l}else wo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ge(l),s=!1}else f=Fm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=f),s=!0;if(!s)return l.flags&256?(Pi(l),l):(Pi(l),null);if((l.flags&128)!==0)throw Error(n(558))}return Ge(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(C=Fl(l),m!==null&&m.dehydrated!==null){if(s===null){if(!C)throw Error(n(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[Ze]=l}else wo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ge(l),C=!1}else C=Fm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=C),C=!0;if(!C)return l.flags&256?(Pi(l),l):(Pi(l),null)}return Pi(l),(l.flags&128)!==0?(l.lanes=f,l):(f=m!==null,s=s!==null&&s.memoizedState!==null,f&&(m=l.child,C=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(C=m.alternate.memoizedState.cachePool.pool),S=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),S!==C&&(m.flags|=2048)),f!==s&&f&&(l.child.flags|=8192),xd(l,l.updateQueue),Ge(l),null);case 4:return Ct(),s===null&&Xy(l.stateNode.containerInfo),Ge(l),null;case 10:return va(l.type),Ge(l),null;case 19:if(J(gr),m=l.memoizedState,m===null)return Ge(l),null;if(C=(l.flags&128)!==0,S=m.rendering,S===null)if(C)jh(m,!1);else{if(lr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=ad(s),S!==null){for(l.flags|=128,jh(m,!1),s=S.updateQueue,l.updateQueue=s,xd(l,s),l.subtreeFlags=0,s=f,f=l.child;f!==null;)pC(f,s),f=f.sibling;return nt(gr,gr.current&1|2),xe&&xa(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&Re()>kd&&(l.flags|=128,C=!0,jh(m,!1),l.lanes=4194304)}else{if(!C)if(s=ad(S),s!==null){if(l.flags|=128,C=!0,s=s.updateQueue,l.updateQueue=s,xd(l,s),jh(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!xe)return Ge(l),null}else 2*Re()-m.renderingStartTime>kd&&f!==536870912&&(l.flags|=128,C=!0,jh(m,!1),l.lanes=4194304);m.isBackwards?(S.sibling=l.child,l.child=S):(s=m.last,s!==null?s.sibling=S:l.child=S,m.last=S)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=Re(),s.sibling=null,f=gr.current,nt(gr,C?f&1|2:f&1),xe&&xa(l,m.treeForkCount),s):(Ge(l),null);case 22:case 23:return Pi(l),Qm(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(f&536870912)!==0&&(l.flags&128)===0&&(Ge(l),l.subtreeFlags&6&&(l.flags|=8192)):Ge(l),f=l.updateQueue,f!==null&&xd(l,f.retryQueue),f=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048),s!==null&&J(Ao),null;case 24:return f=null,s!==null&&(f=s.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),va(Cr),Ge(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function O4(s,l){switch(jm(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return va(Cr),Ct(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Bt(l),null;case 31:if(l.memoizedState!==null){if(Pi(l),l.alternate===null)throw Error(n(340));wo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Pi(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));wo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(gr),null;case 4:return Ct(),null;case 10:return va(l.type),null;case 22:case 23:return Pi(l),Qm(),s!==null&&J(Ao),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return va(Cr),null;case 25:return null;default:return null}}function I2(s,l){switch(jm(l),l.tag){case 3:va(Cr),Ct();break;case 26:case 27:case 5:Bt(l);break;case 4:Ct();break;case 31:l.memoizedState!==null&&Pi(l);break;case 13:Pi(l);break;case 19:J(gr);break;case 10:va(l.type);break;case 22:case 23:Pi(l),Qm(),s!==null&&J(Ao);break;case 24:va(Cr)}}function Dh(s,l){try{var f=l.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var C=m.next;f=C;do{if((f.tag&s)===s){m=void 0;var S=f.create,L=f.inst;m=S(),L.destroy=m}f=f.next}while(f!==C)}}catch(q){Fe(l,l.return,q)}}function ks(s,l,f){try{var m=l.updateQueue,C=m!==null?m.lastEffect:null;if(C!==null){var S=C.next;m=S;do{if((m.tag&s)===s){var L=m.inst,q=L.destroy;if(q!==void 0){L.destroy=void 0,C=l;var X=f,lt=q;try{lt()}catch(yt){Fe(C,X,yt)}}}m=m.next}while(m!==S)}}catch(yt){Fe(l,l.return,yt)}}function P2(s){var l=s.updateQueue;if(l!==null){var f=s.stateNode;try{OC(l,f)}catch(m){Fe(s,s.return,m)}}}function H2(s,l,f){f.props=No(s.type,s.memoizedProps),f.state=s.memoizedState;try{f.componentWillUnmount()}catch(m){Fe(s,l,m)}}function Fh(s,l){try{var f=s.ref;if(f!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof f=="function"?s.refCleanup=f(m):f.current=m}}catch(C){Fe(s,l,C)}}function Yn(s,l){var f=s.ref,m=s.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(C){Fe(s,l,C)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(C){Fe(s,l,C)}else f.current=null}function U2(s){var l=s.type,f=s.memoizedProps,m=s.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break t;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(C){Fe(s,s.return,C)}}function Ay(s,l,f){try{var m=s.stateNode;tR(m,s.type,f,l),m[He]=l}catch(C){Fe(s,s.return,C)}}function W2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ms(s.type)||s.tag===4}function Ey(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||W2(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ms(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function My(s,l,f){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(s,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(s),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=ga));else if(m!==4&&(m===27&&Ms(s.type)&&(f=s.stateNode,l=null),s=s.child,s!==null))for(My(s,l,f),s=s.sibling;s!==null;)My(s,l,f),s=s.sibling}function bd(s,l,f){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?f.insertBefore(s,l):f.appendChild(s);else if(m!==4&&(m===27&&Ms(s.type)&&(f=s.stateNode),s=s.child,s!==null))for(bd(s,l,f),s=s.sibling;s!==null;)bd(s,l,f),s=s.sibling}function Y2(s){var l=s.stateNode,f=s.memoizedProps;try{for(var m=s.type,C=l.attributes;C.length;)l.removeAttributeNode(C[0]);Ur(l,m,f),l[Ze]=s,l[He]=f}catch(S){Fe(s,s.return,S)}}var wa=!1,Sr=!1,Ly=!1,G2=typeof WeakSet=="function"?WeakSet:Set,Fr=null;function N4(s,l){if(s=s.containerInfo,Ky=qd,s=aC(s),Sm(s)){if("selectionStart"in s)var f={start:s.selectionStart,end:s.selectionEnd};else t:{f=(f=s.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var C=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{f.nodeType,S.nodeType}catch{f=null;break t}var L=0,q=-1,X=-1,lt=0,yt=0,bt=s,ct=null;e:for(;;){for(var dt;bt!==f||C!==0&&bt.nodeType!==3||(q=L+C),bt!==S||m!==0&&bt.nodeType!==3||(X=L+m),bt.nodeType===3&&(L+=bt.nodeValue.length),(dt=bt.firstChild)!==null;)ct=bt,bt=dt;for(;;){if(bt===s)break e;if(ct===f&&++lt===C&&(q=L),ct===S&&++yt===m&&(X=L),(dt=bt.nextSibling)!==null)break;bt=ct,ct=bt.parentNode}bt=dt}f=q===-1||X===-1?null:{start:q,end:X}}else f=null}f=f||{start:0,end:0}}else f=null;for(Jy={focusedElem:s,selectionRange:f},qd=!1,Fr=l;Fr!==null;)if(l=Fr,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Fr=s;else for(;Fr!==null;){switch(l=Fr,S=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(f=0;f<s.length;f++)C=s[f],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,f=l,C=S.memoizedProps,S=S.memoizedState,m=f.stateNode;try{var Rt=No(f.type,C);s=m.getSnapshotBeforeUpdate(Rt,S),m.__reactInternalSnapshotBeforeUpdate=s}catch(Zt){Fe(f,f.return,Zt)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,f=s.nodeType,f===9)r0(s);else if(f===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":r0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Fr=s;break}Fr=l.return}}function V2(s,l,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:Ba(s,f),m&4&&Dh(5,f);break;case 1:if(Ba(s,f),m&4)if(s=f.stateNode,l===null)try{s.componentDidMount()}catch(L){Fe(f,f.return,L)}else{var C=No(f.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(C,l,s.__reactInternalSnapshotBeforeUpdate)}catch(L){Fe(f,f.return,L)}}m&64&&P2(f),m&512&&Fh(f,f.return);break;case 3:if(Ba(s,f),m&64&&(s=f.updateQueue,s!==null)){if(l=null,f.child!==null)switch(f.child.tag){case 27:case 5:l=f.child.stateNode;break;case 1:l=f.child.stateNode}try{OC(s,l)}catch(L){Fe(f,f.return,L)}}break;case 27:l===null&&m&4&&Y2(f);case 26:case 5:Ba(s,f),l===null&&m&4&&U2(f),m&512&&Fh(f,f.return);break;case 12:Ba(s,f);break;case 31:Ba(s,f),m&4&&Z2(s,f);break;case 13:Ba(s,f),m&4&&K2(s,f),m&64&&(s=f.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(f=P4.bind(null,f),lR(s,f))));break;case 22:if(m=f.memoizedState!==null||wa,!m){l=l!==null&&l.memoizedState!==null||Sr,C=wa;var S=Sr;wa=m,(Sr=l)&&!S?Aa(s,f,(f.subtreeFlags&8772)!==0):Ba(s,f),wa=C,Sr=S}break;case 30:break;default:Ba(s,f)}}function X2(s){var l=s.alternate;l!==null&&(s.alternate=null,X2(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&It(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Je=null,ki=!1;function Ta(s,l,f){for(f=f.child;f!==null;)Q2(s,l,f),f=f.sibling}function Q2(s,l,f){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Dr,f)}catch{}switch(f.tag){case 26:Sr||Yn(f,l),Ta(s,l,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Sr||Yn(f,l);var m=Je,C=ki;Ms(f.type)&&(Je=f.stateNode,ki=!1),Ta(s,l,f),Yh(f.stateNode),Je=m,ki=C;break;case 5:Sr||Yn(f,l);case 6:if(m=Je,C=ki,Je=null,Ta(s,l,f),Je=m,ki=C,Je!==null)if(ki)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(f.stateNode)}catch(S){Fe(f,l,S)}else try{Je.removeChild(f.stateNode)}catch(S){Fe(f,l,S)}break;case 18:Je!==null&&(ki?(s=Je,P_(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,f.stateNode),nc(s)):P_(Je,f.stateNode));break;case 4:m=Je,C=ki,Je=f.stateNode.containerInfo,ki=!0,Ta(s,l,f),Je=m,ki=C;break;case 0:case 11:case 14:case 15:ks(2,f,l),Sr||ks(4,f,l),Ta(s,l,f);break;case 1:Sr||(Yn(f,l),m=f.stateNode,typeof m.componentWillUnmount=="function"&&H2(f,l,m)),Ta(s,l,f);break;case 21:Ta(s,l,f);break;case 22:Sr=(m=Sr)||f.memoizedState!==null,Ta(s,l,f),Sr=m;break;default:Ta(s,l,f)}}function Z2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{nc(s)}catch(f){Fe(l,l.return,f)}}}function K2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{nc(s)}catch(f){Fe(l,l.return,f)}}function R4(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new G2),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new G2),l;default:throw Error(n(435,s.tag))}}function vd(s,l){var f=R4(s);l.forEach(function(m){if(!f.has(m)){f.add(m);var C=H4.bind(null,s,m);m.then(C,C)}})}function Si(s,l){var f=l.deletions;if(f!==null)for(var m=0;m<f.length;m++){var C=f[m],S=s,L=l,q=L;t:for(;q!==null;){switch(q.tag){case 27:if(Ms(q.type)){Je=q.stateNode,ki=!1;break t}break;case 5:Je=q.stateNode,ki=!1;break t;case 3:case 4:Je=q.stateNode.containerInfo,ki=!0;break t}q=q.return}if(Je===null)throw Error(n(160));Q2(S,L,C),Je=null,ki=!1,S=C.alternate,S!==null&&(S.return=null),C.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)J2(l,s),l=l.sibling}var _n=null;function J2(s,l){var f=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Si(l,s),wi(s),m&4&&(ks(3,s,s.return),Dh(3,s),ks(5,s,s.return));break;case 1:Si(l,s),wi(s),m&512&&(Sr||f===null||Yn(f,f.return)),m&64&&wa&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(f=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var C=_n;if(Si(l,s),wi(s),m&512&&(Sr||f===null||Yn(f,f.return)),m&4){var S=f!==null?f.memoizedState:null;if(m=s.memoizedState,f===null)if(m===null)if(s.stateNode===null){t:{m=s.type,f=s.memoizedProps,C=C.ownerDocument||C;e:switch(m){case"title":S=C.getElementsByTagName("title")[0],(!S||S[Pn]||S[Ze]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=C.createElement(m),C.head.insertBefore(S,C.querySelector("head > title"))),Ur(S,m,f),S[Ze]=s,fe(S),m=S;break t;case"link":var L=J_("link","href",C).get(m+(f.href||""));if(L){for(var q=0;q<L.length;q++)if(S=L[q],S.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&S.getAttribute("rel")===(f.rel==null?null:f.rel)&&S.getAttribute("title")===(f.title==null?null:f.title)&&S.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){L.splice(q,1);break e}}S=C.createElement(m),Ur(S,m,f),C.head.appendChild(S);break;case"meta":if(L=J_("meta","content",C).get(m+(f.content||""))){for(q=0;q<L.length;q++)if(S=L[q],S.getAttribute("content")===(f.content==null?null:""+f.content)&&S.getAttribute("name")===(f.name==null?null:f.name)&&S.getAttribute("property")===(f.property==null?null:f.property)&&S.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&S.getAttribute("charset")===(f.charSet==null?null:f.charSet)){L.splice(q,1);break e}}S=C.createElement(m),Ur(S,m,f),C.head.appendChild(S);break;default:throw Error(n(468,m))}S[Ze]=s,fe(S),m=S}s.stateNode=m}else tk(C,s.type,s.stateNode);else s.stateNode=K_(C,m,s.memoizedProps);else S!==m?(S===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):S.count--,m===null?tk(C,s.type,s.stateNode):K_(C,m,s.memoizedProps)):m===null&&s.stateNode!==null&&Ay(s,s.memoizedProps,f.memoizedProps)}break;case 27:Si(l,s),wi(s),m&512&&(Sr||f===null||Yn(f,f.return)),f!==null&&m&4&&Ay(s,s.memoizedProps,f.memoizedProps);break;case 5:if(Si(l,s),wi(s),m&512&&(Sr||f===null||Yn(f,f.return)),s.flags&32){C=s.stateNode;try{_e(C,"")}catch(Rt){Fe(s,s.return,Rt)}}m&4&&s.stateNode!=null&&(C=s.memoizedProps,Ay(s,C,f!==null?f.memoizedProps:C)),m&1024&&(Ly=!0);break;case 6:if(Si(l,s),wi(s),m&4){if(s.stateNode===null)throw Error(n(162));m=s.memoizedProps,f=s.stateNode;try{f.nodeValue=m}catch(Rt){Fe(s,s.return,Rt)}}break;case 3:if(Dd=null,C=_n,_n=Rd(l.containerInfo),Si(l,s),_n=C,wi(s),m&4&&f!==null&&f.memoizedState.isDehydrated)try{nc(l.containerInfo)}catch(Rt){Fe(s,s.return,Rt)}Ly&&(Ly=!1,t_(s));break;case 4:m=_n,_n=Rd(s.stateNode.containerInfo),Si(l,s),wi(s),_n=m;break;case 12:Si(l,s),wi(s);break;case 31:Si(l,s),wi(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,vd(s,m)));break;case 13:Si(l,s),wi(s),s.child.flags&8192&&s.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(_d=Re()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,vd(s,m)));break;case 22:C=s.memoizedState!==null;var X=f!==null&&f.memoizedState!==null,lt=wa,yt=Sr;if(wa=lt||C,Sr=yt||X,Si(l,s),Sr=yt,wa=lt,wi(s),m&8192)t:for(l=s.stateNode,l._visibility=C?l._visibility&-2:l._visibility|1,C&&(f===null||X||wa||Sr||Ro(s)),f=null,l=s;;){if(l.tag===5||l.tag===26){if(f===null){X=f=l;try{if(S=X.stateNode,C)L=S.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{q=X.stateNode;var bt=X.memoizedProps.style,ct=bt!=null&&bt.hasOwnProperty("display")?bt.display:null;q.style.display=ct==null||typeof ct=="boolean"?"":(""+ct).trim()}}catch(Rt){Fe(X,X.return,Rt)}}}else if(l.tag===6){if(f===null){X=l;try{X.stateNode.nodeValue=C?"":X.memoizedProps}catch(Rt){Fe(X,X.return,Rt)}}}else if(l.tag===18){if(f===null){X=l;try{var dt=X.stateNode;C?H_(dt,!0):H_(X.stateNode,!1)}catch(Rt){Fe(X,X.return,Rt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;f===l&&(f=null),l=l.return}f===l&&(f=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=s.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,vd(s,f))));break;case 19:Si(l,s),wi(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,vd(s,m)));break;case 30:break;case 21:break;default:Si(l,s),wi(s)}}function wi(s){var l=s.flags;if(l&2){try{for(var f,m=s.return;m!==null;){if(W2(m)){f=m;break}m=m.return}if(f==null)throw Error(n(160));switch(f.tag){case 27:var C=f.stateNode,S=Ey(s);bd(s,S,C);break;case 5:var L=f.stateNode;f.flags&32&&(_e(L,""),f.flags&=-33);var q=Ey(s);bd(s,q,L);break;case 3:case 4:var X=f.stateNode.containerInfo,lt=Ey(s);My(s,lt,X);break;default:throw Error(n(161))}}catch(yt){Fe(s,s.return,yt)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function t_(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;t_(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ba(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)V2(s,l.alternate,l),l=l.sibling}function Ro(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:ks(4,l,l.return),Ro(l);break;case 1:Yn(l,l.return);var f=l.stateNode;typeof f.componentWillUnmount=="function"&&H2(l,l.return,f),Ro(l);break;case 27:Yh(l.stateNode);case 26:case 5:Yn(l,l.return),Ro(l);break;case 22:l.memoizedState===null&&Ro(l);break;case 30:Ro(l);break;default:Ro(l)}s=s.sibling}}function Aa(s,l,f){for(f=f&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,C=s,S=l,L=S.flags;switch(S.tag){case 0:case 11:case 15:Aa(C,S,f),Dh(4,S);break;case 1:if(Aa(C,S,f),m=S,C=m.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(lt){Fe(m,m.return,lt)}if(m=S,C=m.updateQueue,C!==null){var q=m.stateNode;try{var X=C.shared.hiddenCallbacks;if(X!==null)for(C.shared.hiddenCallbacks=null,C=0;C<X.length;C++)LC(X[C],q)}catch(lt){Fe(m,m.return,lt)}}f&&L&64&&P2(S),Fh(S,S.return);break;case 27:Y2(S);case 26:case 5:Aa(C,S,f),f&&m===null&&L&4&&U2(S),Fh(S,S.return);break;case 12:Aa(C,S,f);break;case 31:Aa(C,S,f),f&&L&4&&Z2(C,S);break;case 13:Aa(C,S,f),f&&L&4&&K2(C,S);break;case 22:S.memoizedState===null&&Aa(C,S,f),Fh(S,S.return);break;case 30:break;default:Aa(C,S,f)}l=l.sibling}}function Oy(s,l){var f=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==f&&(s!=null&&s.refCount++,f!=null&&kh(f))}function Ny(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&kh(s))}function kn(s,l,f,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)e_(s,l,f,m),l=l.sibling}function e_(s,l,f,m){var C=l.flags;switch(l.tag){case 0:case 11:case 15:kn(s,l,f,m),C&2048&&Dh(9,l);break;case 1:kn(s,l,f,m);break;case 3:kn(s,l,f,m),C&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&kh(s)));break;case 12:if(C&2048){kn(s,l,f,m),s=l.stateNode;try{var S=l.memoizedProps,L=S.id,q=S.onPostCommit;typeof q=="function"&&q(L,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(X){Fe(l,l.return,X)}}else kn(s,l,f,m);break;case 31:kn(s,l,f,m);break;case 13:kn(s,l,f,m);break;case 23:break;case 22:S=l.stateNode,L=l.alternate,l.memoizedState!==null?S._visibility&2?kn(s,l,f,m):$h(s,l):S._visibility&2?kn(s,l,f,m):(S._visibility|=2,Gl(s,l,f,m,(l.subtreeFlags&10256)!==0||!1)),C&2048&&Oy(L,l);break;case 24:kn(s,l,f,m),C&2048&&Ny(l.alternate,l);break;default:kn(s,l,f,m)}}function Gl(s,l,f,m,C){for(C=C&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,L=l,q=f,X=m,lt=L.flags;switch(L.tag){case 0:case 11:case 15:Gl(S,L,q,X,C),Dh(8,L);break;case 23:break;case 22:var yt=L.stateNode;L.memoizedState!==null?yt._visibility&2?Gl(S,L,q,X,C):$h(S,L):(yt._visibility|=2,Gl(S,L,q,X,C)),C&<&2048&&Oy(L.alternate,L);break;case 24:Gl(S,L,q,X,C),C&<&2048&&Ny(L.alternate,L);break;default:Gl(S,L,q,X,C)}l=l.sibling}}function $h(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var f=s,m=l,C=m.flags;switch(m.tag){case 22:$h(f,m),C&2048&&Oy(m.alternate,m);break;case 24:$h(f,m),C&2048&&Ny(m.alternate,m);break;default:$h(f,m)}l=l.sibling}}var zh=8192;function Vl(s,l,f){if(s.subtreeFlags&zh)for(s=s.child;s!==null;)r_(s,l,f),s=s.sibling}function r_(s,l,f){switch(s.tag){case 26:Vl(s,l,f),s.flags&zh&&s.memoizedState!==null&&vR(f,_n,s.memoizedState,s.memoizedProps);break;case 5:Vl(s,l,f);break;case 3:case 4:var m=_n;_n=Rd(s.stateNode.containerInfo),Vl(s,l,f),_n=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=zh,zh=16777216,Vl(s,l,f),zh=m):Vl(s,l,f));break;default:Vl(s,l,f)}}function i_(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function qh(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var m=l[f];Fr=m,a_(m,s)}i_(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)n_(s),s=s.sibling}function n_(s){switch(s.tag){case 0:case 11:case 15:qh(s),s.flags&2048&&ks(9,s,s.return);break;case 3:qh(s);break;case 12:qh(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Cd(s)):qh(s);break;default:qh(s)}}function Cd(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var m=l[f];Fr=m,a_(m,s)}i_(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:ks(8,l,l.return),Cd(l);break;case 22:f=l.stateNode,f._visibility&2&&(f._visibility&=-3,Cd(l));break;default:Cd(l)}s=s.sibling}}function a_(s,l){for(;Fr!==null;){var f=Fr;switch(f.tag){case 0:case 11:case 15:ks(8,f,l);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var m=f.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:kh(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,Fr=m;else t:for(f=s;Fr!==null;){m=Fr;var C=m.sibling,S=m.return;if(X2(m),m===f){Fr=null;break t}if(C!==null){C.return=S,Fr=C;break t}Fr=S}}}var j4={getCacheForType:function(s){var l=Pr(Cr),f=l.data.get(s);return f===void 0&&(f=s(),l.data.set(s,f)),f},cacheSignal:function(){return Pr(Cr).controller.signal}},D4=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ue=null,pe=null,me=0,De=0,Hi=null,Ss=!1,Xl=!1,Ry=!1,Ea=0,lr=0,ws=0,jo=0,jy=0,Ui=0,Ql=0,Ih=null,Ti=null,Dy=!1,_d=0,s_=0,kd=1/0,Sd=null,Ts=null,Ar=0,Bs=null,Zl=null,Ma=0,Fy=0,$y=null,o_=null,Ph=0,zy=null;function Wi(){return(Be&2)!==0&&me!==0?me&-me:R.T!==null?Wy():Zi()}function l_(){if(Ui===0)if((me&536870912)===0||xe){var s=qn;qn<<=1,(qn&3932160)===0&&(qn=262144),Ui=s}else Ui=536870912;return s=Ii.current,s!==null&&(s.flags|=32),Ui}function Bi(s,l,f){(s===Ue&&(De===2||De===9)||s.cancelPendingCommit!==null)&&(Kl(s,0),As(s,me,Ui,!1)),In(s,f),((Be&2)===0||s!==Ue)&&(s===Ue&&((Be&2)===0&&(jo|=f),lr===4&&As(s,me,Ui,!1)),Gn(s))}function c_(s,l,f){if((Be&6)!==0)throw Error(n(327));var m=!f&&(l&127)===0&&(l&s.expiredLanes)===0||xn(s,l),C=m?z4(s,l):Iy(s,l,!0),S=m;do{if(C===0){Xl&&!m&&As(s,l,0,!1);break}else{if(f=s.current.alternate,S&&!F4(f)){C=Iy(s,l,!1),S=!1;continue}if(C===2){if(S=l,s.errorRecoveryDisabledLanes&S)var L=0;else L=s.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){l=L;t:{var q=s;C=Ih;var X=q.current.memoizedState.isDehydrated;if(X&&(Kl(q,L).flags|=256),L=Iy(q,L,!1),L!==2){if(Ry&&!X){q.errorRecoveryDisabledLanes|=S,jo|=S,C=4;break t}S=Ti,Ti=C,S!==null&&(Ti===null?Ti=S:Ti.push.apply(Ti,S))}C=L}if(S=!1,C!==2)continue}}if(C===1){Kl(s,0),As(s,l,0,!0);break}t:{switch(m=s,S=C,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:As(m,l,Ui,!Ss);break t;case 2:Ti=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(C=_d+300-Re(),10<C)){if(As(m,l,Ui,!Ss),ns(m,0,!0)!==0)break t;Ma=l,m.timeoutHandle=q_(h_.bind(null,m,f,Ti,Sd,Dy,l,Ui,jo,Ql,Ss,S,"Throttled",-0,0),C);break t}h_(m,f,Ti,Sd,Dy,l,Ui,jo,Ql,Ss,S,null,-0,0)}}break}while(!0);Gn(s)}function h_(s,l,f,m,C,S,L,q,X,lt,yt,bt,ct,dt){if(s.timeoutHandle=-1,bt=l.subtreeFlags,bt&8192||(bt&16785408)===16785408){bt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},r_(l,S,bt);var Rt=(S&62914560)===S?_d-Re():(S&4194048)===S?s_-Re():0;if(Rt=CR(bt,Rt),Rt!==null){Ma=S,s.cancelPendingCommit=Rt(x_.bind(null,s,l,S,f,m,C,L,q,X,yt,bt,null,ct,dt)),As(s,S,L,!lt);return}}x_(s,l,S,f,m,C,L,q,X)}function F4(s){for(var l=s;;){var f=l.tag;if((f===0||f===11||f===15)&&l.flags&16384&&(f=l.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var m=0;m<f.length;m++){var C=f[m],S=C.getSnapshot;C=C.value;try{if(!zi(S(),C))return!1}catch{return!1}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function As(s,l,f,m){l&=~jy,l&=~jo,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var C=l;0<C;){var S=31-sr(C),L=1<<S;m[S]=-1,C&=~L}f!==0&&fa(s,f,l)}function wd(){return(Be&6)===0?(Hh(0),!1):!0}function qy(){if(pe!==null){if(De===0)var s=pe.return;else s=pe,ba=To=null,ry(s),Pl=null,wh=0,s=pe;for(;s!==null;)I2(s.alternate,s),s=s.return;pe=null}}function Kl(s,l){var f=s.timeoutHandle;f!==-1&&(s.timeoutHandle=-1,iR(f)),f=s.cancelPendingCommit,f!==null&&(s.cancelPendingCommit=null,f()),Ma=0,qy(),Ue=s,pe=f=ya(s.current,null),me=l,De=0,Hi=null,Ss=!1,Xl=xn(s,l),Ry=!1,Ql=Ui=jy=jo=ws=lr=0,Ti=Ih=null,Dy=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var C=31-sr(m),S=1<<C;l|=s[C],m&=~S}return Ea=l,Yf(),f}function u_(s,l){se=null,R.H=Nh,l===Il||l===td?(l=BC(),De=3):l===Um?(l=BC(),De=4):De=l===xy?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Hi=l,pe===null&&(lr=1,pd(s,Ji(l,s.current)))}function f_(){var s=Ii.current;return s===null?!0:(me&4194048)===me?nn===null:(me&62914560)===me||(me&536870912)!==0?s===nn:!1}function d_(){var s=R.H;return R.H=Nh,s===null?Nh:s}function p_(){var s=R.A;return R.A=j4,s}function Td(){lr=4,Ss||(me&4194048)!==me&&Ii.current!==null||(Xl=!0),(ws&134217727)===0&&(jo&134217727)===0||Ue===null||As(Ue,me,Ui,!1)}function Iy(s,l,f){var m=Be;Be|=2;var C=d_(),S=p_();(Ue!==s||me!==l)&&(Sd=null,Kl(s,l)),l=!1;var L=lr;t:do try{if(De!==0&&pe!==null){var q=pe,X=Hi;switch(De){case 8:qy(),L=6;break t;case 3:case 2:case 9:case 6:Ii.current===null&&(l=!0);var lt=De;if(De=0,Hi=null,Jl(s,q,X,lt),f&&Xl){L=0;break t}break;default:lt=De,De=0,Hi=null,Jl(s,q,X,lt)}}$4(),L=lr;break}catch(yt){u_(s,yt)}while(!0);return l&&s.shellSuspendCounter++,ba=To=null,Be=m,R.H=C,R.A=S,pe===null&&(Ue=null,me=0,Yf()),L}function $4(){for(;pe!==null;)g_(pe)}function z4(s,l){var f=Be;Be|=2;var m=d_(),C=p_();Ue!==s||me!==l?(Sd=null,kd=Re()+500,Kl(s,l)):Xl=xn(s,l);t:do try{if(De!==0&&pe!==null){l=pe;var S=Hi;e:switch(De){case 1:De=0,Hi=null,Jl(s,l,S,1);break;case 2:case 9:if(wC(S)){De=0,Hi=null,m_(l);break}l=function(){De!==2&&De!==9||Ue!==s||(De=7),Gn(s)},S.then(l,l);break t;case 3:De=7;break t;case 4:De=5;break t;case 7:wC(S)?(De=0,Hi=null,m_(l)):(De=0,Hi=null,Jl(s,l,S,7));break;case 5:var L=null;switch(pe.tag){case 26:L=pe.memoizedState;case 5:case 27:var q=pe;if(L?ek(L):q.stateNode.complete){De=0,Hi=null;var X=q.sibling;if(X!==null)pe=X;else{var lt=q.return;lt!==null?(pe=lt,Bd(lt)):pe=null}break e}}De=0,Hi=null,Jl(s,l,S,5);break;case 6:De=0,Hi=null,Jl(s,l,S,6);break;case 8:qy(),lr=6;break t;default:throw Error(n(462))}}q4();break}catch(yt){u_(s,yt)}while(!0);return ba=To=null,R.H=m,R.A=C,Be=f,pe!==null?0:(Ue=null,me=0,Yf(),lr)}function q4(){for(;pe!==null&&!Pe();)g_(pe)}function g_(s){var l=z2(s.alternate,s,Ea);s.memoizedProps=s.pendingProps,l===null?Bd(s):pe=l}function m_(s){var l=s,f=l.alternate;switch(l.tag){case 15:case 0:l=N2(f,l,l.pendingProps,l.type,void 0,me);break;case 11:l=N2(f,l,l.pendingProps,l.type.render,l.ref,me);break;case 5:ry(l);default:I2(f,l),l=pe=pC(l,Ea),l=z2(f,l,Ea)}s.memoizedProps=s.pendingProps,l===null?Bd(s):pe=l}function Jl(s,l,f,m){ba=To=null,ry(l),Pl=null,wh=0;var C=l.return;try{if(A4(s,C,l,f,me)){lr=1,pd(s,Ji(f,s.current)),pe=null;return}}catch(S){if(C!==null)throw pe=C,S;lr=1,pd(s,Ji(f,s.current)),pe=null;return}l.flags&32768?(xe||m===1?s=!0:Xl||(me&536870912)!==0?s=!1:(Ss=s=!0,(m===2||m===9||m===3||m===6)&&(m=Ii.current,m!==null&&m.tag===13&&(m.flags|=16384))),y_(l,s)):Bd(l)}function Bd(s){var l=s;do{if((l.flags&32768)!==0){y_(l,Ss);return}s=l.return;var f=L4(l.alternate,l,Ea);if(f!==null){pe=f;return}if(l=l.sibling,l!==null){pe=l;return}pe=l=s}while(l!==null);lr===0&&(lr=5)}function y_(s,l){do{var f=O4(s.alternate,s);if(f!==null){f.flags&=32767,pe=f;return}if(f=s.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!l&&(s=s.sibling,s!==null)){pe=s;return}pe=s=f}while(s!==null);lr=6,pe=null}function x_(s,l,f,m,C,S,L,q,X){s.cancelPendingCommit=null;do Ad();while(Ar!==0);if((Be&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Em,go(s,f,S,L,q,X),s===Ue&&(pe=Ue=null,me=0),Zl=l,Bs=s,Ma=f,Fy=S,$y=C,o_=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,U4(yn,function(){return k_(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=R.T,R.T=null,C=I.p,I.p=2,L=Be,Be|=4;try{N4(s,l,f)}finally{Be=L,I.p=C,R.T=m}}Ar=1,b_(),v_(),C_()}}function b_(){if(Ar===1){Ar=0;var s=Bs,l=Zl,f=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||f){f=R.T,R.T=null;var m=I.p;I.p=2;var C=Be;Be|=4;try{J2(l,s);var S=Jy,L=aC(s.containerInfo),q=S.focusedElem,X=S.selectionRange;if(L!==q&&q&&q.ownerDocument&&nC(q.ownerDocument.documentElement,q)){if(X!==null&&Sm(q)){var lt=X.start,yt=X.end;if(yt===void 0&&(yt=lt),"selectionStart"in q)q.selectionStart=lt,q.selectionEnd=Math.min(yt,q.value.length);else{var bt=q.ownerDocument||document,ct=bt&&bt.defaultView||window;if(ct.getSelection){var dt=ct.getSelection(),Rt=q.textContent.length,Zt=Math.min(X.start,Rt),Ie=X.end===void 0?Zt:Math.min(X.end,Rt);!dt.extend&&Zt>Ie&&(L=Ie,Ie=Zt,Zt=L);var at=iC(q,Zt),tt=iC(q,Ie);if(at&&tt&&(dt.rangeCount!==1||dt.anchorNode!==at.node||dt.anchorOffset!==at.offset||dt.focusNode!==tt.node||dt.focusOffset!==tt.offset)){var ot=bt.createRange();ot.setStart(at.node,at.offset),dt.removeAllRanges(),Zt>Ie?(dt.addRange(ot),dt.extend(tt.node,tt.offset)):(ot.setEnd(tt.node,tt.offset),dt.addRange(ot))}}}}for(bt=[],dt=q;dt=dt.parentNode;)dt.nodeType===1&&bt.push({element:dt,left:dt.scrollLeft,top:dt.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<bt.length;q++){var xt=bt[q];xt.element.scrollLeft=xt.left,xt.element.scrollTop=xt.top}}qd=!!Ky,Jy=Ky=null}finally{Be=C,I.p=m,R.T=f}}s.current=l,Ar=2}}function v_(){if(Ar===2){Ar=0;var s=Bs,l=Zl,f=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||f){f=R.T,R.T=null;var m=I.p;I.p=2;var C=Be;Be|=4;try{V2(s,l.alternate,l)}finally{Be=C,I.p=m,R.T=f}}Ar=3}}function C_(){if(Ar===4||Ar===3){Ar=0,Xr();var s=Bs,l=Zl,f=Ma,m=o_;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ar=5:(Ar=0,Zl=Bs=null,__(s,s.pendingLanes));var C=s.pendingLanes;if(C===0&&(Ts=null),$i(f),l=l.stateNode,xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Dr,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=R.T,C=I.p,I.p=2,R.T=null;try{for(var S=s.onRecoverableError,L=0;L<m.length;L++){var q=m[L];S(q.value,{componentStack:q.stack})}}finally{R.T=l,I.p=C}}(Ma&3)!==0&&Ad(),Gn(s),C=s.pendingLanes,(f&261930)!==0&&(C&42)!==0?s===zy?Ph++:(Ph=0,zy=s):Ph=0,Hh(0)}}function __(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,kh(l)))}function Ad(){return b_(),v_(),C_(),k_()}function k_(){if(Ar!==5)return!1;var s=Bs,l=Fy;Fy=0;var f=$i(Ma),m=R.T,C=I.p;try{I.p=32>f?32:f,R.T=null,f=$y,$y=null;var S=Bs,L=Ma;if(Ar=0,Zl=Bs=null,Ma=0,(Be&6)!==0)throw Error(n(331));var q=Be;if(Be|=4,n_(S.current),e_(S,S.current,L,f),Be=q,Hh(0,!1),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Dr,S)}catch{}return!0}finally{I.p=C,R.T=m,__(s,l)}}function S_(s,l,f){l=Ji(f,l),l=yy(s.stateNode,l,2),s=vs(s,l,2),s!==null&&(In(s,2),Gn(s))}function Fe(s,l,f){if(s.tag===3)S_(s,s,f);else for(;l!==null;){if(l.tag===3){S_(l,s,f);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Ts===null||!Ts.has(m))){s=Ji(f,s),f=w2(2),m=vs(l,f,2),m!==null&&(T2(f,m,l,s),In(m,2),Gn(m));break}}l=l.return}}function Py(s,l,f){var m=s.pingCache;if(m===null){m=s.pingCache=new D4;var C=new Set;m.set(l,C)}else C=m.get(l),C===void 0&&(C=new Set,m.set(l,C));C.has(f)||(Ry=!0,C.add(f),s=I4.bind(null,s,l,f),l.then(s,s))}function I4(s,l,f){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&f,s.warmLanes&=~f,Ue===s&&(me&f)===f&&(lr===4||lr===3&&(me&62914560)===me&&300>Re()-_d?(Be&2)===0&&Kl(s,0):jy|=f,Ql===me&&(Ql=0)),Gn(s)}function w_(s,l){l===0&&(l=Fi()),s=ko(s,l),s!==null&&(In(s,l),Gn(s))}function P4(s){var l=s.memoizedState,f=0;l!==null&&(f=l.retryLane),w_(s,f)}function H4(s,l){var f=0;switch(s.tag){case 31:case 13:var m=s.stateNode,C=s.memoizedState;C!==null&&(f=C.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(l),w_(s,f)}function U4(s,l){return he(s,l)}var Ed=null,tc=null,Hy=!1,Md=!1,Uy=!1,Es=0;function Gn(s){s!==tc&&s.next===null&&(tc===null?Ed=tc=s:tc=tc.next=s),Md=!0,Hy||(Hy=!0,Y4())}function Hh(s,l){if(!Uy&&Md){Uy=!0;do for(var f=!1,m=Ed;m!==null;){if(s!==0){var C=m.pendingLanes;if(C===0)var S=0;else{var L=m.suspendedLanes,q=m.pingedLanes;S=(1<<31-sr(42|s)+1)-1,S&=C&~(L&~q),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(f=!0,E_(m,S))}else S=me,S=ns(m,m===Ue?S:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(S&3)===0||xn(m,S)||(f=!0,E_(m,S));m=m.next}while(f);Uy=!1}}function W4(){T_()}function T_(){Md=Hy=!1;var s=0;Es!==0&&rR()&&(s=Es);for(var l=Re(),f=null,m=Ed;m!==null;){var C=m.next,S=B_(m,l);S===0?(m.next=null,f===null?Ed=C:f.next=C,C===null&&(tc=f)):(f=m,(s!==0||(S&3)!==0)&&(Md=!0)),m=C}Ar!==0&&Ar!==5||Hh(s),Es!==0&&(Es=0)}function B_(s,l){for(var f=s.suspendedLanes,m=s.pingedLanes,C=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var L=31-sr(S),q=1<<L,X=C[L];X===-1?((q&f)===0||(q&m)!==0)&&(C[L]=Qe(q,l)):X<=l&&(s.expiredLanes|=q),S&=~q}if(l=Ue,f=me,f=ns(s,s===l?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,f===0||s===l&&(De===2||De===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&Ee(m),s.callbackNode=null,s.callbackPriority=0;if((f&3)===0||xn(s,f)){if(l=f&-f,l===s.callbackPriority)return l;switch(m!==null&&Ee(m),$i(f)){case 2:case 8:f=Br;break;case 32:f=yn;break;case 268435456:f=ho;break;default:f=yn}return m=A_.bind(null,s),f=he(f,m),s.callbackPriority=l,s.callbackNode=f,l}return m!==null&&m!==null&&Ee(m),s.callbackPriority=2,s.callbackNode=null,2}function A_(s,l){if(Ar!==0&&Ar!==5)return s.callbackNode=null,s.callbackPriority=0,null;var f=s.callbackNode;if(Ad()&&s.callbackNode!==f)return null;var m=me;return m=ns(s,s===Ue?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(c_(s,m,l),B_(s,Re()),s.callbackNode!=null&&s.callbackNode===f?A_.bind(null,s):null)}function E_(s,l){if(Ad())return null;c_(s,l,!0)}function Y4(){nR(function(){(Be&6)!==0?he(yi,W4):T_()})}function Wy(){if(Es===0){var s=zl;s===0&&(s=zn,zn<<=1,(zn&261888)===0&&(zn=256)),Es=s}return Es}function M_(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:$f(""+s)}function L_(s,l){var f=l.ownerDocument.createElement("input");return f.name=l.name,f.value=l.value,s.id&&f.setAttribute("form",s.id),l.parentNode.insertBefore(f,l),s=new FormData(s),f.parentNode.removeChild(f),s}function G4(s,l,f,m,C){if(l==="submit"&&f&&f.stateNode===C){var S=M_((C[He]||null).action),L=m.submitter;L&&(l=(l=L[He]||null)?M_(l.formAction):L.getAttribute("formAction"),l!==null&&(S=l,L=null));var q=new Pf("action","action",null,m,C);s.push({event:q,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Es!==0){var X=L?L_(C,L):new FormData(C);uy(f,{pending:!0,data:X,method:C.method,action:S},null,X)}}else typeof S=="function"&&(q.preventDefault(),X=L?L_(C,L):new FormData(C),uy(f,{pending:!0,data:X,method:C.method,action:S},S,X))},currentTarget:C}]})}}for(var Yy=0;Yy<Am.length;Yy++){var Gy=Am[Yy],V4=Gy.toLowerCase(),X4=Gy[0].toUpperCase()+Gy.slice(1);Cn(V4,"on"+X4)}Cn(lC,"onAnimationEnd"),Cn(cC,"onAnimationIteration"),Cn(hC,"onAnimationStart"),Cn("dblclick","onDoubleClick"),Cn("focusin","onFocus"),Cn("focusout","onBlur"),Cn(u4,"onTransitionRun"),Cn(f4,"onTransitionStart"),Cn(d4,"onTransitionCancel"),Cn(uC,"onTransitionEnd"),pr("onMouseEnter",["mouseout","mouseover"]),pr("onMouseLeave",["mouseout","mouseover"]),pr("onPointerEnter",["pointerout","pointerover"]),pr("onPointerLeave",["pointerout","pointerover"]),ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ir("onBeforeInput",["compositionend","keypress","textInput","paste"]),ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Q4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uh));function O_(s,l){l=(l&4)!==0;for(var f=0;f<s.length;f++){var m=s[f],C=m.event;m=m.listeners;t:{var S=void 0;if(l)for(var L=m.length-1;0<=L;L--){var q=m[L],X=q.instance,lt=q.currentTarget;if(q=q.listener,X!==S&&C.isPropagationStopped())break t;S=q,C.currentTarget=lt;try{S(C)}catch(yt){Wf(yt)}C.currentTarget=null,S=X}else for(L=0;L<m.length;L++){if(q=m[L],X=q.instance,lt=q.currentTarget,q=q.listener,X!==S&&C.isPropagationStopped())break t;S=q,C.currentTarget=lt;try{S(C)}catch(yt){Wf(yt)}C.currentTarget=null,S=X}}}}function ge(s,l){var f=l[os];f===void 0&&(f=l[os]=new Set);var m=s+"__bubble";f.has(m)||(N_(l,s,2,!1),f.add(m))}function Vy(s,l,f){var m=0;l&&(m|=4),N_(f,s,m,l)}var Ld="_reactListening"+Math.random().toString(36).slice(2);function Xy(s){if(!s[Ld]){s[Ld]=!0,$e.forEach(function(f){f!=="selectionchange"&&(Q4.has(f)||Vy(f,!1,s),Vy(f,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Ld]||(l[Ld]=!0,Vy("selectionchange",!1,l))}}function N_(s,l,f,m){switch(lk(l)){case 2:var C=SR;break;case 8:C=wR;break;default:C=h0}f=C.bind(null,l,f,s),C=void 0,!gm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(C=!0),m?C!==void 0?s.addEventListener(l,f,{capture:!0,passive:C}):s.addEventListener(l,f,!0):C!==void 0?s.addEventListener(l,f,{passive:C}):s.addEventListener(l,f,!1)}function Qy(s,l,f,m,C){var S=m;if((l&1)===0&&(l&2)===0&&m!==null)t:for(;;){if(m===null)return;var L=m.tag;if(L===3||L===4){var q=m.stateNode.containerInfo;if(q===C)break;if(L===4)for(L=m.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===C)return;L=L.return}for(;q!==null;){if(L=V(q),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){m=S=L;continue t}q=q.parentNode}}m=m.return}$v(function(){var lt=S,yt=dm(f),bt=[];t:{var ct=fC.get(s);if(ct!==void 0){var dt=Pf,Rt=s;switch(s){case"keypress":if(qf(f)===0)break t;case"keydown":case"keyup":dt=HN;break;case"focusin":Rt="focus",dt=bm;break;case"focusout":Rt="blur",dt=bm;break;case"beforeblur":case"afterblur":dt=bm;break;case"click":if(f.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":dt=Iv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":dt=LN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":dt=YN;break;case lC:case cC:case hC:dt=RN;break;case uC:dt=VN;break;case"scroll":case"scrollend":dt=EN;break;case"wheel":dt=QN;break;case"copy":case"cut":case"paste":dt=DN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":dt=Hv;break;case"toggle":case"beforetoggle":dt=KN}var Zt=(l&4)!==0,Ie=!Zt&&(s==="scroll"||s==="scrollend"),at=Zt?ct!==null?ct+"Capture":null:ct;Zt=[];for(var tt=lt,ot;tt!==null;){var xt=tt;if(ot=xt.stateNode,xt=xt.tag,xt!==5&&xt!==26&&xt!==27||ot===null||at===null||(xt=fh(tt,at),xt!=null&&Zt.push(Wh(tt,xt,ot))),Ie)break;tt=tt.return}0<Zt.length&&(ct=new dt(ct,Rt,null,f,yt),bt.push({event:ct,listeners:Zt}))}}if((l&7)===0){t:{if(ct=s==="mouseover"||s==="pointerover",dt=s==="mouseout"||s==="pointerout",ct&&f!==fm&&(Rt=f.relatedTarget||f.fromElement)&&(V(Rt)||Rt[bn]))break t;if((dt||ct)&&(ct=yt.window===yt?yt:(ct=yt.ownerDocument)?ct.defaultView||ct.parentWindow:window,dt?(Rt=f.relatedTarget||f.toElement,dt=lt,Rt=Rt?V(Rt):null,Rt!==null&&(Ie=o(Rt),Zt=Rt.tag,Rt!==Ie||Zt!==5&&Zt!==27&&Zt!==6)&&(Rt=null)):(dt=null,Rt=lt),dt!==Rt)){if(Zt=Iv,xt="onMouseLeave",at="onMouseEnter",tt="mouse",(s==="pointerout"||s==="pointerover")&&(Zt=Hv,xt="onPointerLeave",at="onPointerEnter",tt="pointer"),Ie=dt==null?ct:Lt(dt),ot=Rt==null?ct:Lt(Rt),ct=new Zt(xt,tt+"leave",dt,f,yt),ct.target=Ie,ct.relatedTarget=ot,xt=null,V(yt)===lt&&(Zt=new Zt(at,tt+"enter",Rt,f,yt),Zt.target=ot,Zt.relatedTarget=Ie,xt=Zt),Ie=xt,dt&&Rt)e:{for(Zt=Z4,at=dt,tt=Rt,ot=0,xt=at;xt;xt=Zt(xt))ot++;xt=0;for(var Gt=tt;Gt;Gt=Zt(Gt))xt++;for(;0<ot-xt;)at=Zt(at),ot--;for(;0<xt-ot;)tt=Zt(tt),xt--;for(;ot--;){if(at===tt||tt!==null&&at===tt.alternate){Zt=at;break e}at=Zt(at),tt=Zt(tt)}Zt=null}else Zt=null;dt!==null&&R_(bt,ct,dt,Zt,!1),Rt!==null&&Ie!==null&&R_(bt,Ie,Rt,Zt,!0)}}t:{if(ct=lt?Lt(lt):window,dt=ct.nodeName&&ct.nodeName.toLowerCase(),dt==="select"||dt==="input"&&ct.type==="file")var ke=Zv;else if(Xv(ct))if(Kv)ke=l4;else{ke=s4;var $t=a4}else dt=ct.nodeName,!dt||dt.toLowerCase()!=="input"||ct.type!=="checkbox"&&ct.type!=="radio"?lt&&vn(lt.elementType)&&(ke=Zv):ke=o4;if(ke&&(ke=ke(s,lt))){Qv(bt,ke,f,yt);break t}$t&&$t(s,ct,lt),s==="focusout"&<&&ct.type==="number"&<.memoizedProps.value!=null&&St(ct,"number",ct.value)}switch($t=lt?Lt(lt):window,s){case"focusin":(Xv($t)||$t.contentEditable==="true")&&(Ll=$t,wm=lt,vh=null);break;case"focusout":vh=wm=Ll=null;break;case"mousedown":Tm=!0;break;case"contextmenu":case"mouseup":case"dragend":Tm=!1,sC(bt,f,yt);break;case"selectionchange":if(h4)break;case"keydown":case"keyup":sC(bt,f,yt)}var oe;if(Cm)t:{switch(s){case"compositionstart":var ye="onCompositionStart";break t;case"compositionend":ye="onCompositionEnd";break t;case"compositionupdate":ye="onCompositionUpdate";break t}ye=void 0}else Ml?Gv(s,f)&&(ye="onCompositionEnd"):s==="keydown"&&f.keyCode===229&&(ye="onCompositionStart");ye&&(Uv&&f.locale!=="ko"&&(Ml||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&Ml&&(oe=zv()):(ds=yt,mm="value"in ds?ds.value:ds.textContent,Ml=!0)),$t=Od(lt,ye),0<$t.length&&(ye=new Pv(ye,s,null,f,yt),bt.push({event:ye,listeners:$t}),oe?ye.data=oe:(oe=Vv(f),oe!==null&&(ye.data=oe)))),(oe=t4?e4(s,f):r4(s,f))&&(ye=Od(lt,"onBeforeInput"),0<ye.length&&($t=new Pv("onBeforeInput","beforeinput",null,f,yt),bt.push({event:$t,listeners:ye}),$t.data=oe)),G4(bt,s,lt,f,yt)}O_(bt,l)})}function Wh(s,l,f){return{instance:s,listener:l,currentTarget:f}}function Od(s,l){for(var f=l+"Capture",m=[];s!==null;){var C=s,S=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||S===null||(C=fh(s,f),C!=null&&m.unshift(Wh(s,C,S)),C=fh(s,l),C!=null&&m.push(Wh(s,C,S))),s.tag===3)return m;s=s.return}return[]}function Z4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function R_(s,l,f,m,C){for(var S=l._reactName,L=[];f!==null&&f!==m;){var q=f,X=q.alternate,lt=q.stateNode;if(q=q.tag,X!==null&&X===m)break;q!==5&&q!==26&&q!==27||lt===null||(X=lt,C?(lt=fh(f,S),lt!=null&&L.unshift(Wh(f,lt,X))):C||(lt=fh(f,S),lt!=null&&L.push(Wh(f,lt,X)))),f=f.return}L.length!==0&&s.push({event:l,listeners:L})}var K4=/\r\n?/g,J4=/\u0000|\uFFFD/g;function j_(s){return(typeof s=="string"?s:""+s).replace(K4,`
|
|
50
|
+
`).replace(J4,"")}function D_(s,l){return l=j_(l),j_(s)===l}function qe(s,l,f,m,C,S){switch(f){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||_e(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&_e(s,""+m);break;case"className":bi(s,"class",m);break;case"tabIndex":bi(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(s,f,m);break;case"style":pa(s,m,S);break;case"data":if(l!=="object"){bi(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||f!=="href")){s.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(f);break}m=$f(""+m),s.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){s.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(f==="formAction"?(l!=="input"&&qe(s,l,"name",C.name,C,null),qe(s,l,"formEncType",C.formEncType,C,null),qe(s,l,"formMethod",C.formMethod,C,null),qe(s,l,"formTarget",C.formTarget,C,null)):(qe(s,l,"encType",C.encType,C,null),qe(s,l,"method",C.method,C,null),qe(s,l,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(f);break}m=$f(""+m),s.setAttribute(f,m);break;case"onClick":m!=null&&(s.onclick=ga);break;case"onScroll":m!=null&&ge("scroll",s);break;case"onScrollEnd":m!=null&&ge("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(f=m.__html,f!=null){if(C.children!=null)throw Error(n(60));s.innerHTML=f}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}f=$f(""+m),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(f,""+m):s.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(f,""):s.removeAttribute(f);break;case"capture":case"download":m===!0?s.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(f,m):s.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(f,m):s.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(f):s.setAttribute(f,m);break;case"popover":ge("beforetoggle",s),ge("toggle",s),xo(s,"popover",m);break;case"xlinkActuate":vi(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":vi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":vi(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":vi(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":vi(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":vi(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":vi(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":vi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":vi(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":xo(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Df.get(f)||f,xo(s,f,m))}}function Zy(s,l,f,m,C,S){switch(f){case"style":pa(s,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(f=m.__html,f!=null){if(C.children!=null)throw Error(n(60));s.innerHTML=f}}break;case"children":typeof m=="string"?_e(s,m):(typeof m=="number"||typeof m=="bigint")&&_e(s,""+m);break;case"onScroll":m!=null&&ge("scroll",s);break;case"onScrollEnd":m!=null&&ge("scrollend",s);break;case"onClick":m!=null&&(s.onclick=ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!br.hasOwnProperty(f))t:{if(f[0]==="o"&&f[1]==="n"&&(C=f.endsWith("Capture"),l=f.slice(2,C?f.length-7:void 0),S=s[He]||null,S=S!=null?S[f]:null,typeof S=="function"&&s.removeEventListener(l,S,C),typeof m=="function")){typeof S!="function"&&S!==null&&(f in s?s[f]=null:s.hasAttribute(f)&&s.removeAttribute(f)),s.addEventListener(l,m,C);break t}f in s?s[f]=m:m===!0?s.setAttribute(f,""):xo(s,f,m)}}}function Ur(s,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",s),ge("load",s);var m=!1,C=!1,S;for(S in f)if(f.hasOwnProperty(S)){var L=f[S];if(L!=null)switch(S){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:qe(s,l,S,L,f,null)}}C&&qe(s,l,"srcSet",f.srcSet,f,null),m&&qe(s,l,"src",f.src,f,null);return;case"input":ge("invalid",s);var q=S=L=C=null,X=null,lt=null;for(m in f)if(f.hasOwnProperty(m)){var yt=f[m];if(yt!=null)switch(m){case"name":C=yt;break;case"type":L=yt;break;case"checked":X=yt;break;case"defaultChecked":lt=yt;break;case"value":S=yt;break;case"defaultValue":q=yt;break;case"children":case"dangerouslySetInnerHTML":if(yt!=null)throw Error(n(137,l));break;default:qe(s,l,m,yt,f,null)}}ht(s,S,q,X,lt,L,C,!1);return;case"select":ge("invalid",s),m=L=S=null;for(C in f)if(f.hasOwnProperty(C)&&(q=f[C],q!=null))switch(C){case"value":S=q;break;case"defaultValue":L=q;break;case"multiple":m=q;default:qe(s,l,C,q,f,null)}l=S,f=L,s.multiple=!!m,l!=null?wt(s,!!m,l,!1):f!=null&&wt(s,!!m,f,!0);return;case"textarea":ge("invalid",s),S=C=m=null;for(L in f)if(f.hasOwnProperty(L)&&(q=f[L],q!=null))switch(L){case"value":m=q;break;case"defaultValue":C=q;break;case"children":S=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(n(91));break;default:qe(s,l,L,q,f,null)}de(s,m,C,S);return;case"option":for(X in f)if(f.hasOwnProperty(X)&&(m=f[X],m!=null))switch(X){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:qe(s,l,X,m,f,null)}return;case"dialog":ge("beforetoggle",s),ge("toggle",s),ge("cancel",s),ge("close",s);break;case"iframe":case"object":ge("load",s);break;case"video":case"audio":for(m=0;m<Uh.length;m++)ge(Uh[m],s);break;case"image":ge("error",s),ge("load",s);break;case"details":ge("toggle",s);break;case"embed":case"source":case"link":ge("error",s),ge("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(lt in f)if(f.hasOwnProperty(lt)&&(m=f[lt],m!=null))switch(lt){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:qe(s,l,lt,m,f,null)}return;default:if(vn(l)){for(yt in f)f.hasOwnProperty(yt)&&(m=f[yt],m!==void 0&&Zy(s,l,yt,m,f,void 0));return}}for(q in f)f.hasOwnProperty(q)&&(m=f[q],m!=null&&qe(s,l,q,m,f,null))}function tR(s,l,f,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,S=null,L=null,q=null,X=null,lt=null,yt=null;for(dt in f){var bt=f[dt];if(f.hasOwnProperty(dt)&&bt!=null)switch(dt){case"checked":break;case"value":break;case"defaultValue":X=bt;default:m.hasOwnProperty(dt)||qe(s,l,dt,null,m,bt)}}for(var ct in m){var dt=m[ct];if(bt=f[ct],m.hasOwnProperty(ct)&&(dt!=null||bt!=null))switch(ct){case"type":S=dt;break;case"name":C=dt;break;case"checked":lt=dt;break;case"defaultChecked":yt=dt;break;case"value":L=dt;break;case"defaultValue":q=dt;break;case"children":case"dangerouslySetInnerHTML":if(dt!=null)throw Error(n(137,l));break;default:dt!==bt&&qe(s,l,ct,dt,m,bt)}}Hn(s,L,q,X,lt,yt,S,C);return;case"select":dt=L=q=ct=null;for(S in f)if(X=f[S],f.hasOwnProperty(S)&&X!=null)switch(S){case"value":break;case"multiple":dt=X;default:m.hasOwnProperty(S)||qe(s,l,S,null,m,X)}for(C in m)if(S=m[C],X=f[C],m.hasOwnProperty(C)&&(S!=null||X!=null))switch(C){case"value":ct=S;break;case"defaultValue":q=S;break;case"multiple":L=S;default:S!==X&&qe(s,l,C,S,m,X)}l=q,f=L,m=dt,ct!=null?wt(s,!!f,ct,!1):!!m!=!!f&&(l!=null?wt(s,!!f,l,!0):wt(s,!!f,f?[]:"",!1));return;case"textarea":dt=ct=null;for(q in f)if(C=f[q],f.hasOwnProperty(q)&&C!=null&&!m.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:qe(s,l,q,null,m,C)}for(L in m)if(C=m[L],S=f[L],m.hasOwnProperty(L)&&(C!=null||S!=null))switch(L){case"value":ct=C;break;case"defaultValue":dt=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(n(91));break;default:C!==S&&qe(s,l,L,C,m,S)}Ot(s,ct,dt);return;case"option":for(var Rt in f)if(ct=f[Rt],f.hasOwnProperty(Rt)&&ct!=null&&!m.hasOwnProperty(Rt))switch(Rt){case"selected":s.selected=!1;break;default:qe(s,l,Rt,null,m,ct)}for(X in m)if(ct=m[X],dt=f[X],m.hasOwnProperty(X)&&ct!==dt&&(ct!=null||dt!=null))switch(X){case"selected":s.selected=ct&&typeof ct!="function"&&typeof ct!="symbol";break;default:qe(s,l,X,ct,m,dt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Zt in f)ct=f[Zt],f.hasOwnProperty(Zt)&&ct!=null&&!m.hasOwnProperty(Zt)&&qe(s,l,Zt,null,m,ct);for(lt in m)if(ct=m[lt],dt=f[lt],m.hasOwnProperty(lt)&&ct!==dt&&(ct!=null||dt!=null))switch(lt){case"children":case"dangerouslySetInnerHTML":if(ct!=null)throw Error(n(137,l));break;default:qe(s,l,lt,ct,m,dt)}return;default:if(vn(l)){for(var Ie in f)ct=f[Ie],f.hasOwnProperty(Ie)&&ct!==void 0&&!m.hasOwnProperty(Ie)&&Zy(s,l,Ie,void 0,m,ct);for(yt in m)ct=m[yt],dt=f[yt],!m.hasOwnProperty(yt)||ct===dt||ct===void 0&&dt===void 0||Zy(s,l,yt,ct,m,dt);return}}for(var at in f)ct=f[at],f.hasOwnProperty(at)&&ct!=null&&!m.hasOwnProperty(at)&&qe(s,l,at,null,m,ct);for(bt in m)ct=m[bt],dt=f[bt],!m.hasOwnProperty(bt)||ct===dt||ct==null&&dt==null||qe(s,l,bt,ct,m,dt)}function F_(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eR(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var C=f[m],S=C.transferSize,L=C.initiatorType,q=C.duration;if(S&&q&&F_(L)){for(L=0,q=C.responseEnd,m+=1;m<f.length;m++){var X=f[m],lt=X.startTime;if(lt>q)break;var yt=X.transferSize,bt=X.initiatorType;yt&&F_(bt)&&(X=X.responseEnd,L+=yt*(X<q?1:(q-lt)/(X-lt)))}if(--m,l+=8*(S+L)/(C.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Ky=null,Jy=null;function Nd(s){return s.nodeType===9?s:s.ownerDocument}function $_(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function z_(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function t0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var e0=null;function rR(){var s=window.event;return s&&s.type==="popstate"?s===e0?!1:(e0=s,!0):(e0=null,!1)}var q_=typeof setTimeout=="function"?setTimeout:void 0,iR=typeof clearTimeout=="function"?clearTimeout:void 0,I_=typeof Promise=="function"?Promise:void 0,nR=typeof queueMicrotask=="function"?queueMicrotask:typeof I_<"u"?function(s){return I_.resolve(null).then(s).catch(aR)}:q_;function aR(s){setTimeout(function(){throw s})}function Ms(s){return s==="head"}function P_(s,l){var f=l,m=0;do{var C=f.nextSibling;if(s.removeChild(f),C&&C.nodeType===8)if(f=C.data,f==="/$"||f==="/&"){if(m===0){s.removeChild(C),nc(l);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")Yh(s.ownerDocument.documentElement);else if(f==="head"){f=s.ownerDocument.head,Yh(f);for(var S=f.firstChild;S;){var L=S.nextSibling,q=S.nodeName;S[Pn]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&S.rel.toLowerCase()==="stylesheet"||f.removeChild(S),S=L}}else f==="body"&&Yh(s.ownerDocument.body);f=C}while(f);nc(l)}function H_(s,l){var f=s;s=0;do{var m=f.nextSibling;if(f.nodeType===1?l?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(l?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),m&&m.nodeType===8)if(f=m.data,f==="/$"){if(s===0)break;s--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||s++;f=m}while(f)}function r0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":r0(f),It(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}s.removeChild(f)}}function sR(s,l,f,m){for(;s.nodeType===1;){var C=f;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[Pn])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==C.rel||s.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||s.getAttribute("title")!==(C.title==null?null:C.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(C.src==null?null:C.src)||s.getAttribute("type")!==(C.type==null?null:C.type)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=C.name==null?null:""+C.name;if(C.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=an(s.nextSibling),s===null)break}return null}function oR(s,l,f){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!f||(s=an(s.nextSibling),s===null))return null;return s}function U_(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=an(s.nextSibling),s===null))return null;return s}function i0(s){return s.data==="$?"||s.data==="$~"}function n0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function lR(s,l){var f=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||f.readyState!=="loading")l();else{var m=function(){l(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function an(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var a0=null;function W_(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var f=s.data;if(f==="/$"||f==="/&"){if(l===0)return an(s.nextSibling);l--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||l++}s=s.nextSibling}return null}function Y_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var f=s.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(l===0)return s;l--}else f!=="/$"&&f!=="/&"||l++}s=s.previousSibling}return null}function G_(s,l,f){switch(l=Nd(f),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function Yh(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);It(s)}var sn=new Map,V_=new Set;function Rd(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var La=I.d;I.d={f:cR,r:hR,D:uR,C:fR,L:dR,m:pR,X:mR,S:gR,M:yR};function cR(){var s=La.f(),l=wd();return s||l}function hR(s){var l=vt(s);l!==null&&l.tag===5&&l.type==="form"?u2(l):La.r(s)}var ec=typeof document>"u"?null:document;function X_(s,l,f){var m=ec;if(m&&typeof l=="string"&&l){var C=ai(l);C='link[rel="'+s+'"][href="'+C+'"]',typeof f=="string"&&(C+='[crossorigin="'+f+'"]'),V_.has(C)||(V_.add(C),s={rel:s,crossOrigin:f,href:l},m.querySelector(C)===null&&(l=m.createElement("link"),Ur(l,"link",s),fe(l),m.head.appendChild(l)))}}function uR(s){La.D(s),X_("dns-prefetch",s,null)}function fR(s,l){La.C(s,l),X_("preconnect",s,l)}function dR(s,l,f){La.L(s,l,f);var m=ec;if(m&&s&&l){var C='link[rel="preload"][as="'+ai(l)+'"]';l==="image"&&f&&f.imageSrcSet?(C+='[imagesrcset="'+ai(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(C+='[imagesizes="'+ai(f.imageSizes)+'"]')):C+='[href="'+ai(s)+'"]';var S=C;switch(l){case"style":S=rc(s);break;case"script":S=ic(s)}sn.has(S)||(s=g({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:s,as:l},f),sn.set(S,s),m.querySelector(C)!==null||l==="style"&&m.querySelector(Gh(S))||l==="script"&&m.querySelector(Vh(S))||(l=m.createElement("link"),Ur(l,"link",s),fe(l),m.head.appendChild(l)))}}function pR(s,l){La.m(s,l);var f=ec;if(f&&s){var m=l&&typeof l.as=="string"?l.as:"script",C='link[rel="modulepreload"][as="'+ai(m)+'"][href="'+ai(s)+'"]',S=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=ic(s)}if(!sn.has(S)&&(s=g({rel:"modulepreload",href:s},l),sn.set(S,s),f.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Vh(S)))return}m=f.createElement("link"),Ur(m,"link",s),fe(m),f.head.appendChild(m)}}}function gR(s,l,f){La.S(s,l,f);var m=ec;if(m&&s){var C=ue(m).hoistableStyles,S=rc(s);l=l||"default";var L=C.get(S);if(!L){var q={loading:0,preload:null};if(L=m.querySelector(Gh(S)))q.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},f),(f=sn.get(S))&&s0(s,f);var X=L=m.createElement("link");fe(X),Ur(X,"link",s),X._p=new Promise(function(lt,yt){X.onload=lt,X.onerror=yt}),X.addEventListener("load",function(){q.loading|=1}),X.addEventListener("error",function(){q.loading|=2}),q.loading|=4,jd(L,l,m)}L={type:"stylesheet",instance:L,count:1,state:q},C.set(S,L)}}}function mR(s,l){La.X(s,l);var f=ec;if(f&&s){var m=ue(f).hoistableScripts,C=ic(s),S=m.get(C);S||(S=f.querySelector(Vh(C)),S||(s=g({src:s,async:!0},l),(l=sn.get(C))&&o0(s,l),S=f.createElement("script"),fe(S),Ur(S,"link",s),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(C,S))}}function yR(s,l){La.M(s,l);var f=ec;if(f&&s){var m=ue(f).hoistableScripts,C=ic(s),S=m.get(C);S||(S=f.querySelector(Vh(C)),S||(s=g({src:s,async:!0,type:"module"},l),(l=sn.get(C))&&o0(s,l),S=f.createElement("script"),fe(S),Ur(S,"link",s),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(C,S))}}function Q_(s,l,f,m){var C=(C=kt.current)?Rd(C):null;if(!C)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=rc(f.href),f=ue(C).hoistableStyles,m=f.get(l),m||(m={type:"style",instance:null,count:0,state:null},f.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){s=rc(f.href);var S=ue(C).hoistableStyles,L=S.get(s);if(L||(C=C.ownerDocument||C,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,L),(S=C.querySelector(Gh(s)))&&!S._p&&(L.instance=S,L.state.loading=5),sn.has(s)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},sn.set(s,f),S||xR(C,s,f,L.state))),l&&m===null)throw Error(n(528,""));return L}if(l&&m!==null)throw Error(n(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ic(f),f=ue(C).hoistableScripts,m=f.get(l),m||(m={type:"script",instance:null,count:0,state:null},f.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function rc(s){return'href="'+ai(s)+'"'}function Gh(s){return'link[rel="stylesheet"]['+s+"]"}function Z_(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function xR(s,l,f,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),Ur(l,"link",f),fe(l),s.head.appendChild(l))}function ic(s){return'[src="'+ai(s)+'"]'}function Vh(s){return"script[async]"+s}function K_(s,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+ai(f.href)+'"]');if(m)return l.instance=m,fe(m),m;var C=g({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),fe(m),Ur(m,"style",C),jd(m,f.precedence,s),l.instance=m;case"stylesheet":C=rc(f.href);var S=s.querySelector(Gh(C));if(S)return l.state.loading|=4,l.instance=S,fe(S),S;m=Z_(f),(C=sn.get(C))&&s0(m,C),S=(s.ownerDocument||s).createElement("link"),fe(S);var L=S;return L._p=new Promise(function(q,X){L.onload=q,L.onerror=X}),Ur(S,"link",m),l.state.loading|=4,jd(S,f.precedence,s),l.instance=S;case"script":return S=ic(f.src),(C=s.querySelector(Vh(S)))?(l.instance=C,fe(C),C):(m=f,(C=sn.get(S))&&(m=g({},f),o0(m,C)),s=s.ownerDocument||s,C=s.createElement("script"),fe(C),Ur(C,"link",m),s.head.appendChild(C),l.instance=C);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,jd(m,f.precedence,s));return l.instance}function jd(s,l,f){for(var m=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,S=C,L=0;L<m.length;L++){var q=m[L];if(q.dataset.precedence===l)S=q;else if(S!==C)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(s,l.firstChild))}function s0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function o0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Dd=null;function J_(s,l,f){if(Dd===null){var m=new Map,C=Dd=new Map;C.set(f,m)}else C=Dd,m=C.get(f),m||(m=new Map,C.set(f,m));if(m.has(s))return m;for(m.set(s,null),f=f.getElementsByTagName(s),C=0;C<f.length;C++){var S=f[C];if(!(S[Pn]||S[Ze]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var L=S.getAttribute(l)||"";L=s+L;var q=m.get(L);q?q.push(S):m.set(L,[S])}}return m}function tk(s,l,f){s=s.ownerDocument||s,s.head.insertBefore(f,l==="title"?s.querySelector("head > title"):null)}function bR(s,l,f){if(f===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function ek(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function vR(s,l,f,m){if(f.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var C=rc(m.href),S=l.querySelector(Gh(C));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Fd.bind(s),l.then(s,s)),f.state.loading|=4,f.instance=S,fe(S);return}S=l.ownerDocument||l,m=Z_(m),(C=sn.get(C))&&s0(m,C),S=S.createElement("link"),fe(S);var L=S;L._p=new Promise(function(q,X){L.onload=q,L.onerror=X}),Ur(S,"link",m),f.instance=S}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(f,l),(l=f.state.preload)&&(f.state.loading&3)===0&&(s.count++,f=Fd.bind(s),l.addEventListener("load",f),l.addEventListener("error",f))}}var l0=0;function CR(s,l){return s.stylesheets&&s.count===0&&zd(s,s.stylesheets),0<s.count||0<s.imgCount?function(f){var m=setTimeout(function(){if(s.stylesheets&&zd(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&l0===0&&(l0=62500*eR());var C=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&zd(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>l0?50:800)+l);return s.unsuspend=f,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function Fd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var $d=null;function zd(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,$d=new Map,l.forEach(_R,s),$d=null,Fd.call(s))}function _R(s,l){if(!(l.state.loading&4)){var f=$d.get(s);if(f)var m=f.get(null);else{f=new Map,$d.set(s,f);for(var C=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<C.length;S++){var L=C[S];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(f.set(L.dataset.precedence,L),m=L)}m&&f.set(null,m)}C=l.instance,L=C.getAttribute("data-precedence"),S=f.get(L)||m,S===m&&f.set(null,C),f.set(L,C),this.count++,m=Fd.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),S?S.parentNode.insertBefore(C,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(C,s.firstChild)),l.state.loading|=4}}var Xh={$$typeof:B,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function kR(s,l,f,m,C,S,L,q,X){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=as(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=as(0),this.hiddenUpdates=as(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=S,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function rk(s,l,f,m,C,S,L,q,X,lt,yt,bt){return s=new kR(s,l,f,L,X,lt,yt,bt,q),l=1,S===!0&&(l|=24),S=qi(3,null,null,l),s.current=S,S.stateNode=s,l=Im(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:m,isDehydrated:f,cache:l},Wm(S),s}function ik(s){return s?(s=Rl,s):Rl}function nk(s,l,f,m,C,S){C=ik(C),m.context===null?m.context=C:m.pendingContext=C,m=bs(l),m.payload={element:f},S=S===void 0?null:S,S!==null&&(m.callback=S),f=vs(s,m,l),f!==null&&(Bi(f,s,l),Bh(f,s,l))}function ak(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var f=s.retryLane;s.retryLane=f!==0&&f<l?f:l}}function c0(s,l){ak(s,l),(s=s.alternate)&&ak(s,l)}function sk(s){if(s.tag===13||s.tag===31){var l=ko(s,67108864);l!==null&&Bi(l,s,67108864),c0(s,67108864)}}function ok(s){if(s.tag===13||s.tag===31){var l=Wi();l=qr(l);var f=ko(s,l);f!==null&&Bi(f,s,l),c0(s,l)}}var qd=!0;function SR(s,l,f,m){var C=R.T;R.T=null;var S=I.p;try{I.p=2,h0(s,l,f,m)}finally{I.p=S,R.T=C}}function wR(s,l,f,m){var C=R.T;R.T=null;var S=I.p;try{I.p=8,h0(s,l,f,m)}finally{I.p=S,R.T=C}}function h0(s,l,f,m){if(qd){var C=u0(m);if(C===null)Qy(s,l,m,Id,f),ck(s,m);else if(BR(C,s,l,f,m))m.stopPropagation();else if(ck(s,m),l&4&&-1<TR.indexOf(s)){for(;C!==null;){var S=vt(C);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var L=ni(S.pendingLanes);if(L!==0){var q=S;for(q.pendingLanes|=2,q.entangledLanes|=2;L;){var X=1<<31-sr(L);q.entanglements[1]|=X,L&=~X}Gn(S),(Be&6)===0&&(kd=Re()+500,Hh(0))}}break;case 31:case 13:q=ko(S,2),q!==null&&Bi(q,S,2),wd(),c0(S,2)}if(S=u0(m),S===null&&Qy(s,l,m,Id,f),S===C)break;C=S}C!==null&&m.stopPropagation()}else Qy(s,l,m,null,f)}}function u0(s){return s=dm(s),f0(s)}var Id=null;function f0(s){if(Id=null,s=V(s),s!==null){var l=o(s);if(l===null)s=null;else{var f=l.tag;if(f===13){if(s=c(l),s!==null)return s;s=null}else if(f===31){if(s=h(l),s!==null)return s;s=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Id=s,null}function lk(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(jr()){case yi:return 2;case Br:return 8;case yn:case kl:return 32;case ho:return 268435456;default:return 32}default:return 32}}var d0=!1,Ls=null,Os=null,Ns=null,Qh=new Map,Zh=new Map,Rs=[],TR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ck(s,l){switch(s){case"focusin":case"focusout":Ls=null;break;case"dragenter":case"dragleave":Os=null;break;case"mouseover":case"mouseout":Ns=null;break;case"pointerover":case"pointerout":Qh.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zh.delete(l.pointerId)}}function Kh(s,l,f,m,C,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:f,eventSystemFlags:m,nativeEvent:S,targetContainers:[C]},l!==null&&(l=vt(l),l!==null&&sk(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,C!==null&&l.indexOf(C)===-1&&l.push(C),s)}function BR(s,l,f,m,C){switch(l){case"focusin":return Ls=Kh(Ls,s,l,f,m,C),!0;case"dragenter":return Os=Kh(Os,s,l,f,m,C),!0;case"mouseover":return Ns=Kh(Ns,s,l,f,m,C),!0;case"pointerover":var S=C.pointerId;return Qh.set(S,Kh(Qh.get(S)||null,s,l,f,m,C)),!0;case"gotpointercapture":return S=C.pointerId,Zh.set(S,Kh(Zh.get(S)||null,s,l,f,m,C)),!0}return!1}function hk(s){var l=V(s.target);if(l!==null){var f=o(l);if(f!==null){if(l=f.tag,l===13){if(l=c(f),l!==null){s.blockedOn=l,mo(s.priority,function(){ok(f)});return}}else if(l===31){if(l=h(f),l!==null){s.blockedOn=l,mo(s.priority,function(){ok(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){s.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Pd(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var f=u0(s.nativeEvent);if(f===null){f=s.nativeEvent;var m=new f.constructor(f.type,f);fm=m,f.target.dispatchEvent(m),fm=null}else return l=vt(f),l!==null&&sk(l),s.blockedOn=f,!1;l.shift()}return!0}function uk(s,l,f){Pd(s)&&f.delete(l)}function AR(){d0=!1,Ls!==null&&Pd(Ls)&&(Ls=null),Os!==null&&Pd(Os)&&(Os=null),Ns!==null&&Pd(Ns)&&(Ns=null),Qh.forEach(uk),Zh.forEach(uk)}function Hd(s,l){s.blockedOn===l&&(s.blockedOn=null,d0||(d0=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,AR)))}var Ud=null;function fk(s){Ud!==s&&(Ud=s,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ud===s&&(Ud=null);for(var l=0;l<s.length;l+=3){var f=s[l],m=s[l+1],C=s[l+2];if(typeof m!="function"){if(f0(m||f)===null)continue;break}var S=vt(f);S!==null&&(s.splice(l,3),l-=3,uy(S,{pending:!0,data:C,method:f.method,action:m},m,C))}}))}function nc(s){function l(X){return Hd(X,s)}Ls!==null&&Hd(Ls,s),Os!==null&&Hd(Os,s),Ns!==null&&Hd(Ns,s),Qh.forEach(l),Zh.forEach(l);for(var f=0;f<Rs.length;f++){var m=Rs[f];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Rs.length&&(f=Rs[0],f.blockedOn===null);)hk(f),f.blockedOn===null&&Rs.shift();if(f=(s.ownerDocument||s).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var C=f[m],S=f[m+1],L=C[He]||null;if(typeof S=="function")L||fk(f);else if(L){var q=null;if(S&&S.hasAttribute("formAction")){if(C=S,L=S[He]||null)q=L.formAction;else if(f0(C)!==null)continue}else q=L.action;typeof q=="function"?f[m+1]=q:(f.splice(m,3),m-=3),fk(f)}}}function dk(){function s(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(L){return C=L})},focusReset:"manual",scroll:"manual"})}function l(){C!==null&&(C(),C=null),m||setTimeout(f,20)}function f(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),C!==null&&(C(),C=null)}}}function p0(s){this._internalRoot=s}Wd.prototype.render=p0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var f=l.current,m=Wi();nk(f,m,s,l,null,null)},Wd.prototype.unmount=p0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;nk(s.current,2,null,s,null,null),wd(),l[bn]=null}};function Wd(s){this._internalRoot=s}Wd.prototype.unstable_scheduleHydration=function(s){if(s){var l=Zi();s={blockedOn:null,target:s,priority:l};for(var f=0;f<Rs.length&&l!==0&&l<Rs[f].priority;f++);Rs.splice(f,0,s),f===0&&hk(s)}};var pk=e.version;if(pk!=="19.2.4")throw Error(n(527,pk,"19.2.4"));I.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=d(l),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var ER={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yd.isDisabled&&Yd.supportsFiber)try{Dr=Yd.inject(ER),xr=Yd}catch{}}return tu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var f=!1,m="",C=C2,S=_2,L=k2;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(C=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError)),l=rk(s,1,!1,null,null,f,m,null,C,S,L,dk),s[bn]=l.current,Xy(s),new p0(l)},tu.hydrateRoot=function(s,l,f){if(!a(s))throw Error(n(299));var m=!1,C="",S=C2,L=_2,q=k2,X=null;return f!=null&&(f.unstable_strictMode===!0&&(m=!0),f.identifierPrefix!==void 0&&(C=f.identifierPrefix),f.onUncaughtError!==void 0&&(S=f.onUncaughtError),f.onCaughtError!==void 0&&(L=f.onCaughtError),f.onRecoverableError!==void 0&&(q=f.onRecoverableError),f.formState!==void 0&&(X=f.formState)),l=rk(s,1,!0,l,f??null,m,C,X,S,L,q,dk),l.context=ik(null),f=l.current,m=Wi(),m=qr(m),C=bs(m),C.callback=null,vs(f,C,m),f=m,l.current.lanes=f,In(l,f),Gn(l),s[bn]=l.current,Xy(s),new Wd(l)},tu.version="19.2.4",tu}var wk;function PR(){if(wk)return x0.exports;wk=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),x0.exports=IR(),x0.exports}var HR=PR(),ih=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},UR={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},Hs,r1,pB,WR=(pB=class{constructor(){Wt(this,Hs,UR);Wt(this,r1,!1)}setTimeoutProvider(r){Mt(this,Hs,r)}setTimeout(r,e){return Q(this,Hs).setTimeout(r,e)}clearTimeout(r){Q(this,Hs).clearTimeout(r)}setInterval(r,e){return Q(this,Hs).setInterval(r,e)}clearInterval(r){Q(this,Hs).clearInterval(r)}},Hs=new WeakMap,r1=new WeakMap,pB),Ho=new WR;function YR(r){setTimeout(r,0)}var sl=typeof window>"u"||"Deno"in globalThis;function ci(){}function GR(r,e){return typeof r=="function"?r(e):r}function yx(r){return typeof r=="number"&&r>=0&&r!==1/0}function wB(r,e){return Math.max(r+(e||0)-Date.now(),0)}function to(r,e){return typeof r=="function"?r(e):r}function fn(r,e){return typeof r=="function"?r(e):r}function Tk(r,e){const{type:i="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=r;if(c){if(n){if(e.queryHash!==n1(c,e.options))return!1}else if(!Ku(e.queryKey,c))return!1}if(i!=="all"){const u=e.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function Bk(r,e){const{exact:i,status:n,predicate:a,mutationKey:o}=r;if(o){if(!e.options.mutationKey)return!1;if(i){if(ol(e.options.mutationKey)!==ol(o))return!1}else if(!Ku(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function n1(r,e){return((e==null?void 0:e.queryKeyHashFn)||ol)(r)}function ol(r){return JSON.stringify(r,(e,i)=>xx(i)?Object.keys(i).sort().reduce((n,a)=>(n[a]=i[a],n),{}):i)}function Ku(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>Ku(r[i],e[i])):!1}var VR=Object.prototype.hasOwnProperty;function TB(r,e,i=0){if(r===e)return r;if(i>500)return e;const n=Ak(r)&&Ak(e);if(!n&&!(xx(r)&&xx(e)))return e;const o=(n?r:Object.keys(r)).length,c=n?e:Object.keys(e),h=c.length,u=n?new Array(h):{};let d=0;for(let p=0;p<h;p++){const g=n?p:c[p],x=r[g],y=e[g];if(x===y){u[g]=x,(n?p<o:VR.call(r,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const b=TB(x,y,i+1);u[g]=b,b===x&&d++}return o===h&&d===o?r:u}function $p(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(r[i]!==e[i])return!1;return!0}function Ak(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function xx(r){if(!Ek(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!Ek(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function Ek(r){return Object.prototype.toString.call(r)==="[object Object]"}function XR(r){return new Promise(e=>{Ho.setTimeout(e,r)})}function bx(r,e,i){return typeof i.structuralSharing=="function"?i.structuralSharing(r,e):i.structuralSharing!==!1?TB(r,e):e}function QR(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function ZR(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var a1=Symbol();function BB(r,e){return!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===a1?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function s1(r,e){return typeof r=="function"?r(...e):!!r}function KR(r,e,i){let n=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?i():a.addEventListener("abort",i,{once:!0})),a)}),r}var Vo,Us,_c,gB,JR=(gB=class extends ih{constructor(){super();Wt(this,Vo);Wt(this,Us);Wt(this,_c);Mt(this,_c,e=>{if(!sl&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){Q(this,Us)||this.setEventListener(Q(this,_c))}onUnsubscribe(){var e;this.hasListeners()||((e=Q(this,Us))==null||e.call(this),Mt(this,Us,void 0))}setEventListener(e){var i;Mt(this,_c,e),(i=Q(this,Us))==null||i.call(this),Mt(this,Us,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){Q(this,Vo)!==e&&(Mt(this,Vo,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof Q(this,Vo)=="boolean"?Q(this,Vo):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Vo=new WeakMap,Us=new WeakMap,_c=new WeakMap,gB),o1=new JR;function vx(){let r,e;const i=new Promise((a,o)=>{r=a,e=o});i.status="pending",i.catch(()=>{});function n(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{n({status:"fulfilled",value:a}),r(a)},i.reject=a=>{n({status:"rejected",reason:a}),e(a)},i}var tj=YR;function ej(){let r=[],e=0,i=h=>{h()},n=h=>{h()},a=tj;const o=h=>{e?r.push(h):a(()=>{i(h)})},c=()=>{const h=r;r=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{i(u)})})})};return{batch:h=>{let u;e++;try{u=h()}finally{e--,e||c()}return u},batchCalls:h=>(...u)=>{o(()=>{h(...u)})},schedule:o,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var Mr=ej(),kc,Ws,Sc,mB,rj=(mB=class extends ih{constructor(){super();Wt(this,kc,!0);Wt(this,Ws);Wt(this,Sc);Mt(this,Sc,e=>{if(!sl&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){Q(this,Ws)||this.setEventListener(Q(this,Sc))}onUnsubscribe(){var e;this.hasListeners()||((e=Q(this,Ws))==null||e.call(this),Mt(this,Ws,void 0))}setEventListener(e){var i;Mt(this,Sc,e),(i=Q(this,Ws))==null||i.call(this),Mt(this,Ws,e(this.setOnline.bind(this)))}setOnline(e){Q(this,kc)!==e&&(Mt(this,kc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return Q(this,kc)}},kc=new WeakMap,Ws=new WeakMap,Sc=new WeakMap,mB),zp=new rj;function ij(r){return Math.min(1e3*2**r,3e4)}function AB(r){return(r??"online")==="online"?zp.isOnline():!0}var Cx=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function EB(r){let e=!1,i=0,n;const a=vx(),o=()=>a.status!=="pending",c=_=>{var k;if(!o()){const w=new Cx(_);x(w),(k=r.onCancel)==null||k.call(r,w)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>o1.isFocused()&&(r.networkMode==="always"||zp.isOnline())&&r.canRun(),p=()=>AB(r.networkMode)&&r.canRun(),g=_=>{o()||(n==null||n(),a.resolve(_))},x=_=>{o()||(n==null||n(),a.reject(_))},y=()=>new Promise(_=>{var k;n=w=>{(o()||d())&&_(w)},(k=r.onPause)==null||k.call(r)}).then(()=>{var _;n=void 0,o()||(_=r.onContinue)==null||_.call(r)}),b=()=>{if(o())return;let _;const k=i===0?r.initialPromise:void 0;try{_=k??r.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(g).catch(w=>{var j;if(o())return;const T=r.retry??(sl?0:3),B=r.retryDelay??ij,E=typeof B=="function"?B(i,w):B,O=T===!0||typeof T=="number"&&i<T||typeof T=="function"&&T(i,w);if(e||!O){x(w);return}i++,(j=r.onFail)==null||j.call(r,i,w),XR(E).then(()=>d()?void 0:y()).then(()=>{e?x(w):b()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:p,start:()=>(p()?b():y().then(b),a)}}var Xo,yB,MB=(yB=class{constructor(){Wt(this,Xo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yx(this.gcTime)&&Mt(this,Xo,Ho.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(sl?1/0:300*1e3))}clearGcTimeout(){Q(this,Xo)&&(Ho.clearTimeout(Q(this,Xo)),Mt(this,Xo,void 0))}},Xo=new WeakMap,yB),Qo,wc,un,Zo,$r,mf,Ko,wn,Fa,xB,nj=(xB=class extends MB{constructor(e){super();Wt(this,wn);Wt(this,Qo);Wt(this,wc);Wt(this,un);Wt(this,Zo);Wt(this,$r);Wt(this,mf);Wt(this,Ko);Mt(this,Ko,!1),Mt(this,mf,e.defaultOptions),this.setOptions(e.options),this.observers=[],Mt(this,Zo,e.client),Mt(this,un,Q(this,Zo).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Mt(this,Qo,Lk(this.options)),this.state=e.state??Q(this,Qo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Q(this,$r))==null?void 0:e.promise}setOptions(e){if(this.options={...Q(this,mf),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Lk(this.options);i.data!==void 0&&(this.setState(Mk(i.data,i.dataUpdatedAt)),Mt(this,Qo,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,un).remove(this)}setData(e,i){const n=bx(this.state.data,e,this.options);return ce(this,wn,Fa).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){ce(this,wn,Fa).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,a;const i=(n=Q(this,$r))==null?void 0:n.promise;return(a=Q(this,$r))==null||a.cancel(e),i?i.then(ci).catch(ci):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Qo))}isActive(){return this.observers.some(e=>fn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===a1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>to(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!wB(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=Q(this,$r))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=Q(this,$r))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Q(this,un).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(Q(this,$r)&&(Q(this,Ko)?Q(this,$r).cancel({revert:!0}):Q(this,$r).cancelRetry()),this.scheduleGc()),Q(this,un).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ce(this,wn,Fa).call(this,{type:"invalidate"})}async fetch(e,i){var u,d,p,g,x,y,b,_,k,w,T,B;if(this.state.fetchStatus!=="idle"&&((u=Q(this,$r))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(Q(this,$r))return Q(this,$r).continueRetry(),Q(this,$r).promise}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(O=>O.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,a=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Mt(this,Ko,!0),n.signal)})},o=()=>{const E=BB(this.options,i),j=(()=>{const M={client:Q(this,Zo),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return Mt(this,Ko,!1),this.options.persister?this.options.persister(E,j,this):E(j)},h=(()=>{const E={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:Q(this,Zo),state:this.state,fetchFn:o};return a(E),E})();(d=this.options.behavior)==null||d.onFetch(h,this),Mt(this,wc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=h.fetchOptions)==null?void 0:p.meta))&&ce(this,wn,Fa).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Mt(this,$r,EB({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,onCancel:E=>{E instanceof Cx&&E.revert&&this.setState({...Q(this,wc),fetchStatus:"idle"}),n.abort()},onFail:(E,O)=>{ce(this,wn,Fa).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{ce(this,wn,Fa).call(this,{type:"pause"})},onContinue:()=>{ce(this,wn,Fa).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const E=await Q(this,$r).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(y=(x=Q(this,un).config).onSuccess)==null||y.call(x,E,this),(_=(b=Q(this,un).config).onSettled)==null||_.call(b,E,this.state.error,this),E}catch(E){if(E instanceof Cx){if(E.silent)return Q(this,$r).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw ce(this,wn,Fa).call(this,{type:"error",error:E}),(w=(k=Q(this,un).config).onError)==null||w.call(k,E,this),(B=(T=Q(this,un).config).onSettled)==null||B.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},Qo=new WeakMap,wc=new WeakMap,un=new WeakMap,Zo=new WeakMap,$r=new WeakMap,mf=new WeakMap,Ko=new WeakMap,wn=new WeakSet,Fa=function(e){const i=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LB(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...Mk(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Mt(this,wc,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),Mr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Q(this,un).notify({query:this,type:"updated",action:e})})},xB);function LB(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AB(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Mk(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lk(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Mi,be,yf,li,Jo,Tc,qa,Ys,xf,Bc,Ac,tl,el,Gs,Ec,Oe,Au,_x,kx,Sx,wx,Tx,Bx,Ax,OB,bB,aj=(bB=class extends ih{constructor(e,i){super();Wt(this,Oe);Wt(this,Mi);Wt(this,be);Wt(this,yf);Wt(this,li);Wt(this,Jo);Wt(this,Tc);Wt(this,qa);Wt(this,Ys);Wt(this,xf);Wt(this,Bc);Wt(this,Ac);Wt(this,tl);Wt(this,el);Wt(this,Gs);Wt(this,Ec,new Set);this.options=i,Mt(this,Mi,e),Mt(this,Ys,null),Mt(this,qa,vx()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,be).addObserver(this),Ok(Q(this,be),this.options)?ce(this,Oe,Au).call(this):this.updateResult(),ce(this,Oe,wx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ex(Q(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ex(Q(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ce(this,Oe,Tx).call(this),ce(this,Oe,Bx).call(this),Q(this,be).removeObserver(this)}setOptions(e){const i=this.options,n=Q(this,be);if(this.options=Q(this,Mi).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fn(this.options.enabled,Q(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ce(this,Oe,Ax).call(this),Q(this,be).setOptions(this.options),i._defaulted&&!$p(this.options,i)&&Q(this,Mi).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,be),observer:this});const a=this.hasListeners();a&&Nk(Q(this,be),n,this.options,i)&&ce(this,Oe,Au).call(this),this.updateResult(),a&&(Q(this,be)!==n||fn(this.options.enabled,Q(this,be))!==fn(i.enabled,Q(this,be))||to(this.options.staleTime,Q(this,be))!==to(i.staleTime,Q(this,be)))&&ce(this,Oe,_x).call(this);const o=ce(this,Oe,kx).call(this);a&&(Q(this,be)!==n||fn(this.options.enabled,Q(this,be))!==fn(i.enabled,Q(this,be))||o!==Q(this,Gs))&&ce(this,Oe,Sx).call(this,o)}getOptimisticResult(e){const i=Q(this,Mi).getQueryCache().build(Q(this,Mi),e),n=this.createResult(i,e);return oj(this,n)&&(Mt(this,li,n),Mt(this,Tc,this.options),Mt(this,Jo,Q(this,be).state)),n}getCurrentResult(){return Q(this,li)}trackResult(e,i){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),i==null||i(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,qa).status==="pending"&&Q(this,qa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){Q(this,Ec).add(e)}getCurrentQuery(){return Q(this,be)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const i=Q(this,Mi).defaultQueryOptions(e),n=Q(this,Mi).getQueryCache().build(Q(this,Mi),i);return n.fetch().then(()=>this.createResult(n,i))}fetch(e){return ce(this,Oe,Au).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,li)))}createResult(e,i){var Y;const n=Q(this,be),a=this.options,o=Q(this,li),c=Q(this,Jo),h=Q(this,Tc),d=e!==n?e.state:Q(this,yf),{state:p}=e;let g={...p},x=!1,y;if(i._optimisticResults){const $=this.hasListeners(),z=!$&&Ok(e,i),K=$&&Nk(e,n,i,a);(z||K)&&(g={...g,...LB(p.data,e.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:_,status:k}=g;y=g.data;let w=!1;if(i.placeholderData!==void 0&&y===void 0&&k==="pending"){let $;o!=null&&o.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?($=o.data,w=!0):$=typeof i.placeholderData=="function"?i.placeholderData((Y=Q(this,Ac))==null?void 0:Y.state.data,Q(this,Ac)):i.placeholderData,$!==void 0&&(k="success",y=bx(o==null?void 0:o.data,$,i),x=!0)}if(i.select&&y!==void 0&&!w)if(o&&y===(c==null?void 0:c.data)&&i.select===Q(this,xf))y=Q(this,Bc);else try{Mt(this,xf,i.select),y=i.select(y),y=bx(o==null?void 0:o.data,y,i),Mt(this,Bc,y),Mt(this,Ys,null)}catch($){Mt(this,Ys,$)}Q(this,Ys)&&(b=Q(this,Ys),y=Q(this,Bc),_=Date.now(),k="error");const T=g.fetchStatus==="fetching",B=k==="pending",E=k==="error",O=B&&T,j=y!==void 0,N={status:k,fetchStatus:g.fetchStatus,isPending:B,isSuccess:k==="success",isError:E,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!B,isLoadingError:E&&!j,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:E&&j,isStale:l1(e,i),refetch:this.refetch,promise:Q(this,qa),isEnabled:fn(i.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=N.data!==void 0,z=N.status==="error"&&!$,K=U=>{z?U.reject(N.error):$&&U.resolve(N.data)},W=()=>{const U=Mt(this,qa,N.promise=vx());K(U)},F=Q(this,qa);switch(F.status){case"pending":e.queryHash===n.queryHash&&K(F);break;case"fulfilled":(z||N.data!==F.value)&&W();break;case"rejected":(!z||N.error!==F.reason)&&W();break}}return N}updateResult(){const e=Q(this,li),i=this.createResult(Q(this,be),this.options);if(Mt(this,Jo,Q(this,be).state),Mt(this,Tc,this.options),Q(this,Jo).data!==void 0&&Mt(this,Ac,Q(this,be)),$p(i,e))return;Mt(this,li,i);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Q(this,Ec).size)return!0;const c=new Set(o??Q(this,Ec));return this.options.throwOnError&&c.add("error"),Object.keys(Q(this,li)).some(h=>{const u=h;return Q(this,li)[u]!==e[u]&&c.has(u)})};ce(this,Oe,OB).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ce(this,Oe,wx).call(this)}},Mi=new WeakMap,be=new WeakMap,yf=new WeakMap,li=new WeakMap,Jo=new WeakMap,Tc=new WeakMap,qa=new WeakMap,Ys=new WeakMap,xf=new WeakMap,Bc=new WeakMap,Ac=new WeakMap,tl=new WeakMap,el=new WeakMap,Gs=new WeakMap,Ec=new WeakMap,Oe=new WeakSet,Au=function(e){ce(this,Oe,Ax).call(this);let i=Q(this,be).fetch(this.options,e);return e!=null&&e.throwOnError||(i=i.catch(ci)),i},_x=function(){ce(this,Oe,Tx).call(this);const e=to(this.options.staleTime,Q(this,be));if(sl||Q(this,li).isStale||!yx(e))return;const n=wB(Q(this,li).dataUpdatedAt,e)+1;Mt(this,tl,Ho.setTimeout(()=>{Q(this,li).isStale||this.updateResult()},n))},kx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,be)):this.options.refetchInterval)??!1},Sx=function(e){ce(this,Oe,Bx).call(this),Mt(this,Gs,e),!(sl||fn(this.options.enabled,Q(this,be))===!1||!yx(Q(this,Gs))||Q(this,Gs)===0)&&Mt(this,el,Ho.setInterval(()=>{(this.options.refetchIntervalInBackground||o1.isFocused())&&ce(this,Oe,Au).call(this)},Q(this,Gs)))},wx=function(){ce(this,Oe,_x).call(this),ce(this,Oe,Sx).call(this,ce(this,Oe,kx).call(this))},Tx=function(){Q(this,tl)&&(Ho.clearTimeout(Q(this,tl)),Mt(this,tl,void 0))},Bx=function(){Q(this,el)&&(Ho.clearInterval(Q(this,el)),Mt(this,el,void 0))},Ax=function(){const e=Q(this,Mi).getQueryCache().build(Q(this,Mi),this.options);if(e===Q(this,be))return;const i=Q(this,be);Mt(this,be,e),Mt(this,yf,e.state),this.hasListeners()&&(i==null||i.removeObserver(this),e.addObserver(this))},OB=function(e){Mr.batch(()=>{e.listeners&&this.listeners.forEach(i=>{i(Q(this,li))}),Q(this,Mi).getQueryCache().notify({query:Q(this,be),type:"observerResultsUpdated"})})},bB);function sj(r,e){return fn(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function Ok(r,e){return sj(r,e)||r.state.data!==void 0&&Ex(r,e,e.refetchOnMount)}function Ex(r,e,i){if(fn(e.enabled,r)!==!1&&to(e.staleTime,r)!=="static"){const n=typeof i=="function"?i(r):i;return n==="always"||n!==!1&&l1(r,e)}return!1}function Nk(r,e,i,n){return(r!==e||fn(n.enabled,r)===!1)&&(!i.suspense||r.state.status!=="error")&&l1(r,i)}function l1(r,e){return fn(e.enabled,r)!==!1&&r.isStaleByTime(to(e.staleTime,r))}function oj(r,e){return!$p(r.getCurrentResult(),e)}function Rk(r){return{onFetch:(e,i)=>{var p,g,x,y,b;const n=e.options,a=(x=(g=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((b=e.state.data)==null?void 0:b.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const d=async()=>{let _=!1;const k=B=>{KR(B,()=>e.signal,()=>_=!0)},w=BB(e.options,e.fetchOptions),T=async(B,E,O)=>{if(_)return Promise.reject();if(E==null&&B.pages.length)return Promise.resolve(B);const M=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:E,direction:O?"backward":"forward",meta:e.options.meta};return k(z),z})(),N=await w(M),{maxPages:Y}=e.options,$=O?ZR:QR;return{pages:$(B.pages,N,Y),pageParams:$(B.pageParams,E,Y)}};if(a&&o.length){const B=a==="backward",E=B?lj:jk,O={pages:o,pageParams:c},j=E(n,O);h=await T(O,j,B)}else{const B=r??o.length;do{const E=u===0?c[0]??n.initialPageParam:jk(n,h);if(u>0&&E==null)break;h=await T(h,E),u++}while(u<B)}return h};e.options.persister?e.fetchFn=()=>{var _,k;return(k=(_=e.options).persister)==null?void 0:k.call(_,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=d}}}function jk(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function lj(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var bf,ta,Jr,rl,ea,zs,vB,cj=(vB=class extends MB{constructor(e){super();Wt(this,ea);Wt(this,bf);Wt(this,ta);Wt(this,Jr);Wt(this,rl);Mt(this,bf,e.client),this.mutationId=e.mutationId,Mt(this,Jr,e.mutationCache),Mt(this,ta,[]),this.state=e.state||NB(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Q(this,ta).includes(e)||(Q(this,ta).push(e),this.clearGcTimeout(),Q(this,Jr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Mt(this,ta,Q(this,ta).filter(i=>i!==e)),this.scheduleGc(),Q(this,Jr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Q(this,ta).length||(this.state.status==="pending"?this.scheduleGc():Q(this,Jr).remove(this))}continue(){var e;return((e=Q(this,rl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j,M;const i=()=>{ce(this,ea,zs).call(this,{type:"continue"})},n={client:Q(this,bf),meta:this.options.meta,mutationKey:this.options.mutationKey};Mt(this,rl,EB({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,Y)=>{ce(this,ea,zs).call(this,{type:"failed",failureCount:N,error:Y})},onPause:()=>{ce(this,ea,zs).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,Jr).canRun(this)}));const a=this.state.status==="pending",o=!Q(this,rl).canStart();try{if(a)i();else{ce(this,ea,zs).call(this,{type:"pending",variables:e,isPaused:o}),Q(this,Jr).config.onMutate&&await Q(this,Jr).config.onMutate(e,this,n);const Y=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));Y!==this.state.context&&ce(this,ea,zs).call(this,{type:"pending",context:Y,variables:e,isPaused:o})}const N=await Q(this,rl).start();return await((d=(u=Q(this,Jr).config).onSuccess)==null?void 0:d.call(u,N,e,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,N,e,this.state.context,n)),await((y=(x=Q(this,Jr).config).onSettled)==null?void 0:y.call(x,N,null,this.state.variables,this.state.context,this,n)),await((_=(b=this.options).onSettled)==null?void 0:_.call(b,N,null,e,this.state.context,n)),ce(this,ea,zs).call(this,{type:"success",data:N}),N}catch(N){try{await((w=(k=Q(this,Jr).config).onError)==null?void 0:w.call(k,N,e,this.state.context,this,n))}catch(Y){Promise.reject(Y)}try{await((B=(T=this.options).onError)==null?void 0:B.call(T,N,e,this.state.context,n))}catch(Y){Promise.reject(Y)}try{await((O=(E=Q(this,Jr).config).onSettled)==null?void 0:O.call(E,void 0,N,this.state.variables,this.state.context,this,n))}catch(Y){Promise.reject(Y)}try{await((M=(j=this.options).onSettled)==null?void 0:M.call(j,void 0,N,e,this.state.context,n))}catch(Y){Promise.reject(Y)}throw ce(this,ea,zs).call(this,{type:"error",error:N}),N}finally{Q(this,Jr).runNext(this)}}},bf=new WeakMap,ta=new WeakMap,Jr=new WeakMap,rl=new WeakMap,ea=new WeakSet,zs=function(e){const i=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Mr.batch(()=>{Q(this,ta).forEach(n=>{n.onMutationUpdate(e)}),Q(this,Jr).notify({mutation:this,type:"updated",action:e})})},vB);function NB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ia,Tn,vf,CB,hj=(CB=class extends ih{constructor(e={}){super();Wt(this,Ia);Wt(this,Tn);Wt(this,vf);this.config=e,Mt(this,Ia,new Set),Mt(this,Tn,new Map),Mt(this,vf,0)}build(e,i,n){const a=new cj({client:e,mutationCache:this,mutationId:++Gd(this,vf)._,options:e.defaultMutationOptions(i),state:n});return this.add(a),a}add(e){Q(this,Ia).add(e);const i=Vd(e);if(typeof i=="string"){const n=Q(this,Tn).get(i);n?n.push(e):Q(this,Tn).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Q(this,Ia).delete(e)){const i=Vd(e);if(typeof i=="string"){const n=Q(this,Tn).get(i);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&Q(this,Tn).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=Vd(e);if(typeof i=="string"){const n=Q(this,Tn).get(i),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const i=Vd(e);if(typeof i=="string"){const a=(n=Q(this,Tn).get(i))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Mr.batch(()=>{Q(this,Ia).forEach(e=>{this.notify({type:"removed",mutation:e})}),Q(this,Ia).clear(),Q(this,Tn).clear()})}getAll(){return Array.from(Q(this,Ia))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>Bk(i,n))}findAll(e={}){return this.getAll().filter(i=>Bk(e,i))}notify(e){Mr.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return Mr.batch(()=>Promise.all(e.map(i=>i.continue().catch(ci))))}},Ia=new WeakMap,Tn=new WeakMap,vf=new WeakMap,CB);function Vd(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Pa,Vs,Li,Ha,Qa,Cp,Mx,_B,uj=(_B=class extends ih{constructor(i,n){super();Wt(this,Qa);Wt(this,Pa);Wt(this,Vs);Wt(this,Li);Wt(this,Ha);Mt(this,Pa,i),this.setOptions(n),this.bindMethods(),ce(this,Qa,Cp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var a;const n=this.options;this.options=Q(this,Pa).defaultMutationOptions(i),$p(this.options,n)||Q(this,Pa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,Li),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&ol(n.mutationKey)!==ol(this.options.mutationKey)?this.reset():((a=Q(this,Li))==null?void 0:a.state.status)==="pending"&&Q(this,Li).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=Q(this,Li))==null||i.removeObserver(this)}onMutationUpdate(i){ce(this,Qa,Cp).call(this),ce(this,Qa,Mx).call(this,i)}getCurrentResult(){return Q(this,Vs)}reset(){var i;(i=Q(this,Li))==null||i.removeObserver(this),Mt(this,Li,void 0),ce(this,Qa,Cp).call(this),ce(this,Qa,Mx).call(this)}mutate(i,n){var a;return Mt(this,Ha,n),(a=Q(this,Li))==null||a.removeObserver(this),Mt(this,Li,Q(this,Pa).getMutationCache().build(Q(this,Pa),this.options)),Q(this,Li).addObserver(this),Q(this,Li).execute(i)}},Pa=new WeakMap,Vs=new WeakMap,Li=new WeakMap,Ha=new WeakMap,Qa=new WeakSet,Cp=function(){var n;const i=((n=Q(this,Li))==null?void 0:n.state)??NB();Mt(this,Vs,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Mx=function(i){Mr.batch(()=>{var n,a,o,c,h,u,d,p;if(Q(this,Ha)&&this.hasListeners()){const g=Q(this,Vs).variables,x=Q(this,Vs).context,y={client:Q(this,Pa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(a=(n=Q(this,Ha)).onSuccess)==null||a.call(n,i.data,g,x,y)}catch(b){Promise.reject(b)}try{(c=(o=Q(this,Ha)).onSettled)==null||c.call(o,i.data,null,g,x,y)}catch(b){Promise.reject(b)}}else if((i==null?void 0:i.type)==="error"){try{(u=(h=Q(this,Ha)).onError)==null||u.call(h,i.error,g,x,y)}catch(b){Promise.reject(b)}try{(p=(d=Q(this,Ha)).onSettled)==null||p.call(d,void 0,i.error,g,x,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(g=>{g(Q(this,Vs))})})},_B),ra,kB,fj=(kB=class extends ih{constructor(e={}){super();Wt(this,ra);this.config=e,Mt(this,ra,new Map)}build(e,i,n){const a=i.queryKey,o=i.queryHash??n1(a,i);let c=this.get(o);return c||(c=new nj({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){Q(this,ra).has(e.queryHash)||(Q(this,ra).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=Q(this,ra).get(e.queryHash);i&&(e.destroy(),i===e&&Q(this,ra).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Mr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Q(this,ra).get(e)}getAll(){return[...Q(this,ra).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>Tk(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>Tk(e,n)):i}notify(e){Mr.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){Mr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Mr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ra=new WeakMap,kB),ur,Xs,Qs,Mc,Lc,Zs,Oc,Nc,SB,dj=(SB=class{constructor(r={}){Wt(this,ur);Wt(this,Xs);Wt(this,Qs);Wt(this,Mc);Wt(this,Lc);Wt(this,Zs);Wt(this,Oc);Wt(this,Nc);Mt(this,ur,r.queryCache||new fj),Mt(this,Xs,r.mutationCache||new hj),Mt(this,Qs,r.defaultOptions||{}),Mt(this,Mc,new Map),Mt(this,Lc,new Map),Mt(this,Zs,0)}mount(){Gd(this,Zs)._++,Q(this,Zs)===1&&(Mt(this,Oc,o1.subscribe(async r=>{r&&(await this.resumePausedMutations(),Q(this,ur).onFocus())})),Mt(this,Nc,zp.subscribe(async r=>{r&&(await this.resumePausedMutations(),Q(this,ur).onOnline())})))}unmount(){var r,e;Gd(this,Zs)._--,Q(this,Zs)===0&&((r=Q(this,Oc))==null||r.call(this),Mt(this,Oc,void 0),(e=Q(this,Nc))==null||e.call(this),Mt(this,Nc,void 0))}isFetching(r){return Q(this,ur).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return Q(this,Xs).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=Q(this,ur).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=Q(this,ur).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(to(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return Q(this,ur).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),a=Q(this,ur).get(n.queryHash),o=a==null?void 0:a.state.data,c=GR(e,o);if(c!==void 0)return Q(this,ur).build(this,n).setData(c,{...i,manual:!0})}setQueriesData(r,e,i){return Mr.batch(()=>Q(this,ur).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=Q(this,ur).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=Q(this,ur);Mr.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=Q(this,ur);return Mr.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=Mr.batch(()=>Q(this,ur).findAll(r).map(a=>a.cancel(i)));return Promise.all(n).then(ci).catch(ci)}invalidateQueries(r,e={}){return Mr.batch(()=>(Q(this,ur).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=Mr.batch(()=>Q(this,ur).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,i);return i.throwOnError||(o=o.catch(ci)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(ci)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=Q(this,ur).build(this,e);return i.isStaleByTime(to(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(ci).catch(ci)}fetchInfiniteQuery(r){return r.behavior=Rk(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(ci).catch(ci)}ensureInfiniteQueryData(r){return r.behavior=Rk(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return zp.isOnline()?Q(this,Xs).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,ur)}getMutationCache(){return Q(this,Xs)}getDefaultOptions(){return Q(this,Qs)}setDefaultOptions(r){Mt(this,Qs,r)}setQueryDefaults(r,e){Q(this,Mc).set(ol(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...Q(this,Mc).values()],i={};return e.forEach(n=>{Ku(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){Q(this,Lc).set(ol(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...Q(this,Lc).values()],i={};return e.forEach(n=>{Ku(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...Q(this,Qs).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=n1(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===a1&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...Q(this,Qs).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){Q(this,ur).clear(),Q(this,Xs).clear()}},ur=new WeakMap,Xs=new WeakMap,Qs=new WeakMap,Mc=new WeakMap,Lc=new WeakMap,Zs=new WeakMap,Oc=new WeakMap,Nc=new WeakMap,SB),RB=et.createContext(void 0),la=r=>{const e=et.useContext(RB);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},pj=({client:r,children:e})=>(et.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),v.jsx(RB.Provider,{value:r,children:e})),jB=et.createContext(!1),gj=()=>et.useContext(jB);jB.Provider;function mj(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var yj=et.createContext(mj()),xj=()=>et.useContext(yj),bj=(r,e,i)=>{const n=i!=null&&i.state.error&&typeof r.throwOnError=="function"?s1(r.throwOnError,[i.state.error,i]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},vj=r=>{et.useEffect(()=>{r.clearReset()},[r])},Cj=({result:r,errorResetBoundary:e,throwOnError:i,query:n,suspense:a})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(a&&r.data===void 0||s1(i,[r.error,n])),_j=r=>{if(r.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...a)=>i(n(...a)):i(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},kj=(r,e)=>r.isLoading&&r.isFetching&&!e,Sj=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,Dk=(r,e,i)=>e.fetchOptimistic(r).catch(()=>{i.clearReset()});function wj(r,e,i){var x,y,b,_;const n=gj(),a=xj(),o=la(),c=o.defaultQueryOptions(r);(y=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||y.call(x,c);const h=o.getQueryCache().get(c.queryHash);c._optimisticResults=n?"isRestoring":"optimistic",_j(c),bj(c,a,h),vj(a);const u=!o.getQueryCache().get(c.queryHash),[d]=et.useState(()=>new e(o,c)),p=d.getOptimisticResult(c),g=!n&&r.subscribed!==!1;if(et.useSyncExternalStore(et.useCallback(k=>{const w=g?d.subscribe(Mr.batchCalls(k)):ci;return d.updateResult(),w},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),et.useEffect(()=>{d.setOptions(c)},[c,d]),Sj(c,p))throw Dk(c,d,a);if(Cj({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw p.error;if((_=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||_.call(b,c,p),c.experimental_prefetchInRender&&!sl&&kj(p,n)){const k=u?Dk(c,d,a):h==null?void 0:h.promise;k==null||k.catch(ci).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?p:d.trackResult(p)}function ji(r,e){return wj(r,aj)}function yl(r,e){const i=la(),[n]=et.useState(()=>new uj(i,r));et.useEffect(()=>{n.setOptions(r)},[n,r]);const a=et.useSyncExternalStore(et.useCallback(c=>n.subscribe(Mr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=et.useCallback((c,h)=>{n.mutate(c,h).catch(ci)},[n]);if(a.error&&s1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const DB=et.createContext(null);function FB(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fk(r){return r==="system"?FB():r}function Tj({children:r}){const[e,i]=et.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=et.useState(()=>Fk(e)),o=c=>{i(c),localStorage.setItem("dreamcontext-theme",c)};return et.useEffect(()=>{const c=Fk(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),et.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=FB();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),v.jsx(DB.Provider,{value:{theme:e,resolved:n,setTheme:o},children:r})}function Ng(){const r=et.useContext(DB);if(!r)throw new Error("useTheme must be used within ThemeProvider");return r}const Bj={en:{"nav.brain":"Brain","nav.tasks":"Tasks","nav.core":"Core Files","nav.knowledge":"Knowledge","nav.features":"Features","nav.sleep":"Sleep State","nav.council":"Council","council.title":"Council","council.tab.verdict":"Verdict","council.tab.matrix":"Matrix","council.tab.transcript":"Transcript","council.search.placeholder":"Search sessions…","council.search.matrix":"Filter cells by text…","council.search.transcript":"Search transcript…","council.filter.all":"All","council.filter.status":"Status","council.inspector.empty":"Select a persona or cell to inspect.","council.inspector.selectCell":"Select a cell in the matrix for round details.","council.verdict.awaitingSynthesis":"Awaiting synthesis","council.verdict.synthPending":"The final report will appear here once the synthesizer runs.","council.empty.list":"No council sessions yet.","council.empty.detail":"Select a council session from the list.","tasks.title":"Tasks","tasks.create":"New Task","tasks.filter":"Filter","tasks.todo":"To Do","tasks.in_progress":"In Progress","tasks.in_review":"In Review","tasks.completed":"Completed","tasks.name":"Task Name","tasks.description":"Description","tasks.priority":"Priority","tasks.tags":"Tags","tasks.save":"Create Task","tasks.cancel":"Cancel","tasks.changelog":"Changelog","tasks.add_entry":"Add Entry","rice.title":"RICE","rice.reach":"Reach","rice.impact":"Impact","rice.confidence":"Confidence","rice.effort":"Effort","rice.score":"Score","rice.clear":"Clear RICE","rice.tooltip.reach":"How many people / sessions / units affected (1–10)","rice.tooltip.impact":"How much per affected unit (1=minimal, 5=massive)","rice.tooltip.confidence":"How sure are you? (25, 50, 75, 100)","rice.tooltip.effort":"Person-weeks (0.5–8 typical, max 52)","rice.empty":"Not rated","sort.rice":"RICE score","filter.min_rice":"Min RICE","priority.critical":"Critical","priority.high":"High","priority.medium":"Medium","priority.low":"Low","sleep.title":"Sleep State","sleep.debt":"Debt","sleep.level":"Level","sleep.last_sleep":"Last Sleep","sleep.sessions":"Sessions","sleep.alert":"Alert","sleep.drowsy":"Drowsy","sleep.sleepy":"Sleepy","sleep.must_sleep":"Must Sleep","core.title":"Core Files","knowledge.title":"Knowledge","knowledge.pin":"Pin","knowledge.unpin":"Unpin","knowledge.search":"Search knowledge...","features.title":"Features","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},$B=et.createContext(null);function Aj({children:r}){const[e,i]=et.useState("en"),n=a=>{var o;return((o=Bj[e])==null?void 0:o[a])??a};return v.jsx($B.Provider,{value:{locale:e,setLocale:i,t:n},children:r})}function ri(){const r=et.useContext($B);if(!r)throw new Error("useI18n must be used within I18nProvider");return r}const Ej="/api";class Mj{async request(e,i){const n=await fetch(`${Ej}${e}`,{...i,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}});if(!n.ok){let a=`Request failed: ${n.status}`;try{const o=await n.json();o.message&&(a=o.message)}catch{}throw new Error(a)}return await n.json()}get(e){return this.request(e)}post(e,i){return this.request(e,{method:"POST",body:JSON.stringify(i)})}patch(e,i){return this.request(e,{method:"PATCH",body:JSON.stringify(i)})}put(e,i){return this.request(e,{method:"PUT",body:JSON.stringify(i)})}}const fr=new Mj,zB=et.createContext({projectId:"",contextRoot:""});function Lj(r){let e=0;for(let i=0;i<r.length;i++)e=(e<<5)-e+r.charCodeAt(i)|0;return Math.abs(e).toString(36)}function Oj({children:r}){const[e,i]=et.useState({kind:"loading"});return et.useEffect(()=>{fr.get("/health").then(n=>{i({kind:"ready",value:{contextRoot:n.contextRoot,projectId:Lj(n.contextRoot)}})}).catch(()=>{i({kind:"ready",value:{projectId:"",contextRoot:""}})})},[]),e.kind==="loading"?v.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--color-text-secondary, #888)",fontSize:"14px"},children:"Loading project…"}):v.jsx(zB.Provider,{value:e.value,children:r})}function qB(){return et.useContext(zB)}function IB(r){return r<=3?"Alert":r<=6?"Drowsy":r<=9?"Sleepy":"Must Sleep"}function PB(r){return r<=3?"alert":r<=6?"drowsy":r<=9?"sleepy":"must_sleep"}function HB(){return ji({queryKey:["sleep"],queryFn:()=>fr.get("/sleep")})}const Eu=[.85,.9,1,1.1,1.2],UB="dreamcontext-zoom";function Nj(){try{const r=localStorage.getItem(UB);if(r!==null){const e=parseFloat(r);if(Eu.includes(e))return e}}catch{}return 1}function Rj(r){document.documentElement.style.setProperty("--zoom",String(r))}function jj(){const{theme:r,setTheme:e,resolved:i}=Ng(),{data:n}=HB(),[a,o]=et.useState(Nj);et.useEffect(()=>{Rj(a)},[a]);const c=(n==null?void 0:n.debt)??0,h=IB(c),u=PB(c),d=()=>{e(r==="system"?"light":r==="light"?"dark":"system")},p=r==="system"?`System (${i})`:i==="dark"?"Dark":"Light",g=Eu.indexOf(a),x=g>0,y=g<Eu.length-1,b=_=>{const k=g+_;if(k<0||k>=Eu.length)return;const w=Eu[k];o(w);try{localStorage.setItem(UB,String(w))}catch{}};return v.jsxs("header",{className:"header",children:[v.jsxs("div",{className:"header-left",children:[v.jsxs("div",{className:`agent-avatar agent-avatar--${u}`,children:[v.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{d:"M14 2L24 14L14 26L4 14L14 2Z",fill:"url(#diamond-gradient)",opacity:u==="must_sleep"?.4:u==="sleepy"?.6:u==="drowsy"?.8:1}),v.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:u==="must_sleep"?.3:.7}),v.jsxs("defs",{children:[v.jsxs("linearGradient",{id:"diamond-gradient",x1:"4",y1:"2",x2:"24",y2:"26",gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{stopColor:"hsl(287, 100%, 33%)"}),v.jsx("stop",{offset:"1",stopColor:"hsl(311, 97%, 43%)"})]}),v.jsxs("linearGradient",{id:"diamond-inner",x1:"9",y1:"8",x2:"19",y2:"20",gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{stopColor:"hsl(276, 74%, 50%)"}),v.jsx("stop",{offset:"1",stopColor:"hsl(287, 100%, 45%)"})]})]})]}),u==="must_sleep"&&v.jsx("span",{className:"zzz",children:"zzz"})]}),v.jsxs("div",{className:"header-brand",children:[v.jsx("span",{className:"brand-name",children:"dreamcontext"}),v.jsxs("span",{className:`sleep-badge sleep-badge--${u}`,children:[h," (",c,")"]})]})]}),v.jsxs("div",{className:"header-right",children:[v.jsxs("div",{className:"zoom-controls",children:[v.jsx("button",{className:"zoom-btn",onClick:()=>b(-1),disabled:!x,title:"Zoom out",children:"-"}),v.jsxs("span",{className:"zoom-label",children:[Math.round(a*100),"%"]}),v.jsx("button",{className:"zoom-btn",onClick:()=>b(1),disabled:!y,title:"Zoom in",children:"+"})]}),v.jsx("button",{className:"theme-toggle",onClick:d,title:`Theme: ${p}`,children:i==="dark"?v.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):v.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:v.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const Dj=[{page:"brain",icon:"◉",labelKey:"nav.brain"},{page:"tasks",icon:"▦",labelKey:"nav.tasks"},{page:"core",icon:"◈",labelKey:"nav.core"},{page:"knowledge",icon:"✦",labelKey:"nav.knowledge"},{page:"features",icon:"⚑",labelKey:"nav.features"},{page:"council",icon:"⚔",labelKey:"nav.council"},{page:"sleep",icon:"◑",labelKey:"nav.sleep"}];function Fj({activePage:r,onNavigate:e}){const{t:i}=ri();return v.jsx("nav",{className:"sidebar",children:v.jsx("ul",{className:"sidebar-nav",children:Dj.map(({page:n,icon:a,labelKey:o},c)=>v.jsx("li",{className:`animate-stagger animate-stagger-${c+1}`,children:v.jsxs("button",{className:`sidebar-item ${r===n?"sidebar-item--active":""}`,onClick:()=>e(n),children:[v.jsx("span",{className:"sidebar-icon",children:a}),v.jsx("span",{className:"sidebar-label",children:i(o)})]})},n))})})}const WB="dreamcontext.dashboard.activePage",$j=["tasks","core","knowledge","features","sleep","brain","council"];function zj(){if(typeof window>"u")return"brain";try{const r=window.localStorage.getItem(WB);if(r&&$j.includes(r))return r}catch{}return"brain"}function qj({children:r}){const[e,i]=et.useState(zj),[n,a]=et.useState(null),[o,c]=et.useState(0),h=et.useCallback((p,g)=>{i(p),a(g),c(x=>x+1);try{window.localStorage.setItem(WB,p)}catch{}},[]),u=et.useCallback(p=>{h(p,null)},[h]),d=et.useCallback(()=>a(null),[]);return v.jsxs("div",{className:"shell",children:[v.jsx(jj,{}),v.jsxs("div",{className:"shell-body",children:[v.jsx(Fj,{activePage:e,onNavigate:u}),v.jsx("main",{className:"shell-main",children:r({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function Ij(){return ji({queryKey:["tasks"],queryFn:()=>fr.get("/tasks"),select:r=>r.tasks})}function Pj(){const r=la();return yl({mutationFn:e=>fr.post("/tasks",e),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function YB(){const r=la();return yl({mutationFn:({slug:e,updates:i})=>fr.patch(`/tasks/${e}`,i),onSuccess:(e,i)=>{r.invalidateQueries({queryKey:["tasks"]}),r.invalidateQueries({queryKey:["tasks",i.slug]})}})}function Hj(){const r=la();return yl({mutationFn:({slug:e,content:i})=>fr.post(`/tasks/${e}/changelog`,{content:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function GB(){return ji({queryKey:["releases"],queryFn:()=>fr.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"}))})}function VB(){return ji({queryKey:["releases"],queryFn:()=>fr.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function Uj(){const r=la();return yl({mutationFn:e=>fr.post("/releases",{...e,status:"planning"}),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}function Wj(){const r=la();return yl({mutationFn:({version:e,updates:i})=>fr.patch(`/releases/${encodeURIComponent(e)}`,i),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}const XB="dreamcontext:",QB="kanban-presets",Lx=`${XB}${QB}`;function ZB(r){return r?`${XB}${r}:${QB}`:Lx}function Yj(r){const e=ZB(r);try{const i=localStorage.getItem(e);if(i!==null){const n=JSON.parse(i);return Array.isArray(n)?n:[]}if(r){const n=localStorage.getItem(Lx);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(Lx);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function KB(r,e){try{localStorage.setItem(ZB(r),JSON.stringify(e))}catch{}}const qp=new Map;function c1(r){let e=qp.get(r);return e===void 0&&(e=Yj(r),qp.set(r,e)),e}const Ox=new Set;function Gj(r){return Ox.add(r),()=>{Ox.delete(r)}}function JB(){for(const r of Ox)r()}function Vj(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function Xj(r){return et.useSyncExternalStore(Gj,()=>c1(r))}function Qj(r,e,i){const n={id:Vj(),name:e,filters:i},o=[...c1(r),n];return qp.set(r,o),KB(r,o),JB(),n}function Zj(r,e){const i=c1(r),n=i.filter(a=>a.id!==e);n.length!==i.length&&(qp.set(r,n),KB(r,n),JB())}const Kj=10;function Rg(r){let e=2166136261;for(let i=0;i<r.length;i++)e^=r.charCodeAt(i),e=Math.imul(e,16777619);return(e>>>0)%Kj}function Cf({task:r,onClick:e,onDragStart:i}){return v.jsxs("div",{className:"task-card",draggable:!0,onDragStart:i,onClick:e,role:"button",tabIndex:0,onKeyDown:n=>{n.key==="Enter"&&e()},children:[v.jsxs("div",{className:"task-card-header",children:[v.jsx("span",{className:`priority-dot priority-dot--${r.priority}`,title:`Priority: ${r.priority}`}),r.urgency&&r.urgency!=="medium"&&v.jsx("span",{className:`urgency-bar urgency-bar--${r.urgency}`,title:`Urgency: ${r.urgency}`}),v.jsx("span",{className:"task-card-name",children:r.name})]}),r.description&&v.jsxs("p",{className:"task-card-desc",children:[r.description.slice(0,100),r.description.length>100?"...":""]}),v.jsxs("div",{className:"task-card-footer",children:[r.tags.length>0&&v.jsx("div",{className:"task-card-tags",children:r.tags.slice(0,3).map(n=>v.jsx("span",{className:"task-tag","data-hue":Rg(n),children:n},n))}),v.jsx("span",{className:"task-card-date",children:r.updated_at})]})]})}function Jj({label:r,color:e,tasks:i,onTaskClick:n,onDragStart:a}){const[o,c]=et.useState(!1);return v.jsxs("div",{className:"sub-group",children:[v.jsxs("button",{className:"sub-group-header",onClick:()=>c(h=>!h),children:[v.jsx("svg",{className:`sub-group-chevron ${o?"":"sub-group-chevron--open"}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:v.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),e&&v.jsx("span",{className:"sub-group-dot",style:{background:e}}),v.jsx("span",{className:"sub-group-label",children:r}),v.jsx("span",{className:"sub-group-count",children:i.length})]}),!o&&v.jsx("div",{className:"sub-group-cards",children:i.map(h=>v.jsx(Cf,{task:h,onClick:()=>n(h),onDragStart:u=>a(u,h)},h.slug))})]})}function $k({title:r,status:e,tasks:i,count:n,colorVar:a,onTaskClick:o,onDrop:c,subGroups:h}){const[u,d]=et.useState(!1),p=b=>{b.preventDefault(),b.dataTransfer.dropEffect="move",d(!0)},g=()=>{d(!1)},x=b=>{b.preventDefault(),d(!1);const _=b.dataTransfer.getData("text/plain");_&&c(_,e)},y=(b,_)=>{b.dataTransfer.setData("text/plain",_.slug),b.dataTransfer.effectAllowed="move"};return v.jsxs("div",{className:`kanban-column ${u?"kanban-column--dragover":""}`,onDragOver:p,onDragLeave:g,onDrop:x,children:[v.jsxs("div",{className:"kanban-column-header",children:[v.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),v.jsx("span",{className:"kanban-column-title",children:r}),v.jsx("span",{className:"kanban-column-count",children:n})]}),v.jsx("div",{className:"kanban-column-cards",children:h&&h.length>0?h.map(b=>v.jsx(Jj,{label:b.label,color:b.color,tasks:b.tasks,onTaskClick:o,onDragStart:y},b.key)):i.map(b=>v.jsx(Cf,{task:b,onClick:()=>o(b),onDragStart:_=>y(_,b)},b.slug))})]})}function uc({trigger:r,content:e,isOpen:i,onClose:n,align:a="left",width:o}){const c=et.useRef(null),h=et.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=et.useCallback(d=>{d.key==="Escape"&&n()},[n]);return et.useEffect(()=>{if(i)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[i,h,u]),v.jsxs("div",{className:"filter-popover",ref:c,children:[r,i&&v.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function tD({open:r}){return v.jsx("svg",{className:`filter-chip-chevron ${r?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:v.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function eu({label:r,options:e,selected:i,onChange:n,isOpen:a,onToggle:o,onClose:c}){var w,T;const h=i.length>0,[u,d]=et.useState(""),p=et.useRef(null);et.useEffect(()=>{a?requestAnimationFrame(()=>{var B;return(B=p.current)==null?void 0:B.focus()}):d("")},[a]);const g=u.trim()?e.filter(B=>B.label.toLowerCase().includes(u.trim().toLowerCase())):e,x=B=>{i.includes(B)?n(i.filter(E=>E!==B)):n([...i,B])},y=()=>n(e.map(B=>B.value)),b=()=>n([]),_=h?i.length<=2?i.map(B=>{var E;return((E=e.find(O=>O.value===B))==null?void 0:E.label)??B}).join(", "):`${((w=e.find(B=>B.value===i[0]))==null?void 0:w.label)??i[0]} +${i.length-1}`:r,k=e.length>5;return v.jsx(uc,{isOpen:a,onClose:c,trigger:v.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&i.length===1&&v.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(B=>B.value===i[0]))==null?void 0:T.color}}),v.jsx("span",{className:"filter-chip-label",children:_}),v.jsx(tD,{open:a})]}),content:v.jsxs("div",{className:"multi-select-list",children:[k&&v.jsx("div",{className:"multi-select-search-wrap",children:v.jsx("input",{ref:p,className:"multi-select-search",placeholder:"Search...",value:u,onChange:B=>d(B.target.value)})}),v.jsxs("div",{className:"multi-select-actions",children:[v.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),v.jsx("button",{className:"multi-select-action",onClick:b,children:"None"})]}),v.jsxs("div",{className:"multi-select-options",children:[g.map(B=>v.jsxs("label",{className:"multi-select-option",children:[v.jsx("input",{type:"checkbox",checked:i.includes(B.value),onChange:()=>x(B.value)}),B.color&&v.jsx("span",{className:"filter-option-dot",style:{background:B.color}}),v.jsx("span",{className:"filter-option-label",children:B.label})]},B.value)),g.length===0&&v.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function zk(r){return String(r).padStart(2,"0")}function eo(r){return`${r.getFullYear()}-${zk(r.getMonth()+1)}-${zk(r.getDate())}`}function tA(){return eo(new Date)}function Xd(r){const e=new Date;return e.setDate(e.getDate()-r),eo(e)}function eD(){const r=new Date,e=r.getDay();return r.setDate(r.getDate()-(e===0?6:e-1)),eo(r)}function rD(){const r=new Date;return r.setDate(1),eo(r)}function iD(){const r=new Date;return r.setMonth(0,1),eo(r)}function qk(r){return new Date(r+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function nD(){const r=tA();return[{label:"Today",from:r,to:r},{label:"Yesterday",from:Xd(1),to:Xd(1)},{label:"This week",from:eD(),to:r},{label:"Last 7 days",from:Xd(6),to:r},{label:"This month",from:rD(),to:r},{label:"Last 30 days",from:Xd(29),to:r},{label:"This year",from:iD(),to:r}]}const aD=["January","February","March","April","May","June","July","August","September","October","November","December"],sD=["Mo","Tu","We","Th","Fr","Sa","Su"];function oD({dateField:r,dateFrom:e,dateTo:i,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=et.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,p]=et.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=et.useMemo(nD,[]),x=et.useMemo(()=>{const E=new Date(h,d+1,0).getDate(),O=new Date(h,d,1).getDay(),j=O===0?6:O-1,M=[],N=new Date(h,d,0).getDate();for(let $=j-1;$>=0;$--){const z=N-$,K=d===0?11:d-1,W=d===0?h-1:h;M.push({date:eo(new Date(W,K,z)),day:z,isCurrentMonth:!1})}for(let $=1;$<=E;$++)M.push({date:eo(new Date(h,d,$)),day:$,isCurrentMonth:!0});const Y=42-M.length;for(let $=1;$<=Y;$++){const z=d===11?0:d+1,K=d===11?h+1:h;M.push({date:eo(new Date(K,z,$)),day:$,isCurrentMonth:!1})}return M},[h,d]),y=E=>{!e||e&&i?(a(E),o("")):E<e?(o(e),a(E)):o(E)},b=E=>{a(E.from),o(E.to);const O=new Date(E.from+"T00:00:00");u(O.getFullYear()),p(O.getMonth())},_=()=>{a(""),o("")},k=()=>{d===0?(p(11),u(E=>E-1)):p(E=>E-1)},w=()=>{d===11?(p(0),u(E=>E+1)):p(E=>E+1)},T=tA(),B=g.find(E=>E.from===e&&E.to===i);return v.jsxs("div",{className:"mini-cal",children:[v.jsxs("div",{className:"mini-cal-field-toggle",children:[v.jsx("button",{className:`mini-cal-field-btn ${r==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),v.jsx("button",{className:`mini-cal-field-btn ${r==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),v.jsx("div",{className:"mini-cal-presets",children:g.map(E=>v.jsx("button",{className:`mini-cal-preset ${(B==null?void 0:B.label)===E.label?"mini-cal-preset--active":""}`,onClick:()=>b(E),children:E.label},E.label))}),v.jsx("div",{className:"mini-cal-divider"}),v.jsxs("div",{className:"mini-cal-nav-row",children:[v.jsx("button",{className:"mini-cal-nav-btn",onClick:k,"aria-label":"Previous month",children:v.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v.jsxs("span",{className:"mini-cal-month-label",children:[aD[d]," ",h]}),v.jsx("button",{className:"mini-cal-nav-btn",onClick:w,"aria-label":"Next month",children:v.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),v.jsxs("div",{className:"mini-cal-grid",children:[sD.map(E=>v.jsx("div",{className:"mini-cal-day-label",children:E},E)),x.map((E,O)=>{const j=E.date===e,M=E.date===i,N=e&&i&&E.date>e&&E.date<i,Y=j&&!i,$=j||M,z=["mini-cal-day",!E.isCurrentMonth&&"mini-cal-day--outside",E.date===T&&"mini-cal-day--today",$&&"mini-cal-day--selected",j&&i&&"mini-cal-day--range-start",M&&e&&"mini-cal-day--range-end",N&&"mini-cal-day--in-range",Y&&"mini-cal-day--single"].filter(Boolean).join(" ");return v.jsx("button",{className:z,onClick:()=>y(E.date),children:E.day},O)})]}),(e||i)&&v.jsxs("div",{className:"mini-cal-footer",children:[v.jsxs("span",{className:"mini-cal-range-text",children:[e&&v.jsx("span",{children:qk(e)}),e&&i&&e!==i&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"mini-cal-arrow",children:"→"}),v.jsx("span",{children:qk(i)})]}),e&&!i&&v.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),v.jsx("button",{className:"mini-cal-clear-btn",onClick:_,children:"Clear"})]})]})}const Ip={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function lD(){return v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),v.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function Qd({open:r}){return v.jsx("svg",{className:`filter-chip-chevron ${r?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:v.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function _0(){return v.jsx("svg",{className:"filter-option-check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M3 7L6 10L11 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ik(){return v.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:v.jsx("path",{d:"M2.5 2.5L7.5 7.5M7.5 2.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function cD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("path",{d:"M1.5 5.5H12.5",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("path",{d:"M4.5 1V3.5M9.5 1V3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function hD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("path",{d:"M4 1.5V5H10V1.5",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"4",y:"7.5",width:"6",height:"3.5",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"})]})}function uD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("rect",{x:"1",y:"1",width:"3.5",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"5.25",y:"1",width:"3.5",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"9.5",y:"1",width:"3.5",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function fD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("rect",{x:"1",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"7.5",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"1",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"7.5",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function dD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("circle",{cx:"3",cy:"11",r:"1.4",fill:"currentColor"}),v.jsx("circle",{cx:"6",cy:"6",r:"1.6",fill:"currentColor"}),v.jsx("circle",{cx:"10",cy:"8",r:"1.2",fill:"currentColor"}),v.jsx("circle",{cx:"11",cy:"3",r:"1",fill:"currentColor"})]})}function pD(){return v.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M2 3.5H12M2 7H12M2 10.5H12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function gD(){return v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("path",{d:"M2 2V12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),v.jsx("path",{d:"M2 3H9L7 5.5L9 8H2",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}const mD=[{value:"todo",label:"To Do",color:"var(--color-status-todo)"},{value:"in_progress",label:"In Progress",color:"var(--color-status-in-progress)"},{value:"in_review",label:"In Review",color:"var(--color-status-in-review)"},{value:"completed",label:"Completed",color:"var(--color-status-completed)"}],yD=[{value:"critical",label:"Critical",color:"var(--color-priority-critical)"},{value:"high",label:"High",color:"var(--color-priority-high)"},{value:"medium",label:"Medium",color:"var(--color-priority-medium)"},{value:"low",label:"Low",color:"var(--color-priority-low)"}],xD=[{value:"critical",label:"Critical",color:"var(--color-urgency-critical)"},{value:"high",label:"High",color:"var(--color-urgency-high)"},{value:"medium",label:"Medium",color:"var(--color-urgency-medium)"},{value:"low",label:"Low",color:"var(--color-urgency-low)"}],Pk=[{value:"updated_at",label:"Last updated"},{value:"created_at",label:"Date created"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"rice",label:"RICE score"},{value:"name",label:"Name"}],k0=[{value:"status",label:"Status"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"tags",label:"Tags"},{value:"version",label:"Version"},{value:"none",label:"No grouping"}];function bD(r){let e=0;return r.priorityFilter.length>0&&e++,r.statusFilter.length>0&&e++,r.urgencyFilter.length>0&&e++,r.tagFilter.length>0&&e++,r.versionFilter.length>0&&e++,r.searchQuery.trim()&&e++,(r.dateFrom||r.dateTo)&&e++,r.minRice!==null&&r.minRice!==void 0&&e++,e}function vD(r){if(!r.dateFrom&&!r.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(r.dateFrom===e&&r.dateTo===e)return"Today";const i=new Date;i.setDate(i.getDate()-1);const n=i.toISOString().slice(0,10);if(r.dateFrom===n&&r.dateTo===n)return"Yesterday";if(r.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),r.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),r.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function CD({filters:r,onFilterChange:e,onClearFilters:i,onCreateClick:n,presets:a,onSavePreset:o,onLoadPreset:c,onDeletePreset:h,allTags:u,allVersions:d,onVersionManagerClick:p}){var Y,$;const{t:g}=ri(),[x,y]=et.useState(null),[b,_]=et.useState(""),k=bD(r),w=et.useMemo(()=>vD(r),[r]),T=z=>y(K=>K===z?null:z),B=()=>y(null),E=(Y=Pk.find(z=>z.value===r.sortField))==null?void 0:Y.label,O=($=k0.find(z=>z.value===r.groupBy))==null?void 0:$.label,j=et.useMemo(()=>u.map(z=>({value:z,label:z})),[u]),M=et.useMemo(()=>d.map(z=>({value:z,label:z})),[d]),N=et.useMemo(()=>k0.filter(z=>z.value!==r.groupBy&&z.value!=="none").concat({value:"none",label:"No sub-group"}),[r.groupBy]);return v.jsxs("div",{className:"filter-bar",children:[v.jsxs("div",{className:"filter-search",children:[v.jsx(lD,{}),v.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:r.searchQuery,onChange:z=>e("searchQuery",z.target.value)}),r.searchQuery&&v.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:v.jsx(Ik,{})})]}),v.jsx("div",{className:"filter-bar-divider"}),v.jsx(eu,{id:"status",label:"Status",options:mD,selected:r.statusFilter,onChange:z=>e("statusFilter",z),isOpen:x==="status",onToggle:()=>T("status"),onClose:B}),v.jsx(eu,{id:"priority",label:"Priority",options:yD,selected:r.priorityFilter,onChange:z=>e("priorityFilter",z),isOpen:x==="priority",onToggle:()=>T("priority"),onClose:B}),v.jsx(eu,{id:"urgency",label:"Urgency",options:xD,selected:r.urgencyFilter,onChange:z=>e("urgencyFilter",z),isOpen:x==="urgency",onToggle:()=>T("urgency"),onClose:B}),j.length>0&&v.jsx(eu,{id:"tags",label:"Tags",options:j,selected:r.tagFilter,onChange:z=>e("tagFilter",z),isOpen:x==="tags",onToggle:()=>T("tags"),onClose:B}),M.length>0&&v.jsx(eu,{id:"version",label:"Version",options:M,selected:r.versionFilter,onChange:z=>e("versionFilter",z),isOpen:x==="version",onToggle:()=>T("version"),onClose:B}),v.jsx(uc,{isOpen:x==="date",onClose:B,width:320,trigger:v.jsxs("button",{className:`filter-chip ${w?"filter-chip--active":""}`,onClick:()=>T("date"),children:[v.jsx(cD,{}),v.jsx("span",{className:"filter-chip-label",children:w??"Date"}),v.jsx(Qd,{open:x==="date"})]}),content:v.jsx(oD,{dateField:r.dateField,dateFrom:r.dateFrom,dateTo:r.dateTo,onDateFieldChange:z=>e("dateField",z),onDateFromChange:z=>e("dateFrom",z),onDateToChange:z=>e("dateTo",z)})}),v.jsx(uc,{isOpen:x==="minRice",onClose:B,width:220,trigger:v.jsxs("button",{className:`filter-chip ${r.minRice!==null?"filter-chip--active":""}`,onClick:()=>T("minRice"),children:[v.jsx("span",{className:"filter-chip-label",children:r.minRice!==null?`${g("filter.min_rice")} ≥ ${r.minRice}`:g("filter.min_rice")}),v.jsx(Qd,{open:x==="minRice"})]}),content:v.jsxs("div",{className:"filter-min-rice",children:[v.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:g("filter.min_rice")}),v.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:r.minRice??"",placeholder:"e.g. 5",onChange:z=>{const K=z.target.value.trim();if(K===""){e("minRice",null);return}const W=Number(K);e("minRice",Number.isFinite(W)?W:null)}}),r.minRice!==null&&v.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),k>0&&v.jsxs("button",{className:"filter-clear-all",onClick:i,children:["Clear ",v.jsx("span",{className:"filter-clear-count",children:k})]}),v.jsx("div",{className:"filter-bar-spacer"}),v.jsxs("div",{className:"filter-view-toggle",children:[v.jsx("button",{className:`filter-view-btn ${r.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:v.jsx(uD,{})}),v.jsx("button",{className:`filter-view-btn ${r.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:v.jsx(fD,{})}),v.jsx("button",{className:`filter-view-btn ${r.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:v.jsx(dD,{})}),v.jsx("button",{className:`filter-view-btn ${r.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:v.jsx(pD,{})})]}),v.jsx("div",{className:"filter-bar-divider"}),v.jsx(uc,{isOpen:x==="sort",onClose:B,align:"right",trigger:v.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("sort"),children:[v.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),v.jsx("span",{className:"filter-chip-label",children:E}),v.jsx(Qd,{open:x==="sort"})]}),content:v.jsxs("div",{className:"filter-option-list",children:[v.jsx("div",{className:"filter-popover-section",children:"Sort by"}),Pk.map(z=>v.jsxs("button",{className:`filter-option ${r.sortField===z.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",z.value),B()},children:[v.jsx("span",{className:"filter-option-label",children:z.label}),r.sortField===z.value&&v.jsx(_0,{})]},z.value))]})}),v.jsx(uc,{isOpen:x==="group",onClose:B,align:"right",trigger:v.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("group"),children:[v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[v.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),v.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),v.jsx("span",{className:"filter-chip-label",children:O}),v.jsx(Qd,{open:x==="group"})]}),content:v.jsxs("div",{className:"filter-option-list",children:[v.jsx("div",{className:"filter-popover-section",children:"Group by"}),k0.map(z=>v.jsxs("button",{className:`filter-option ${r.groupBy===z.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",z.value),B()},children:[v.jsx("span",{className:"filter-option-label",children:z.label}),r.groupBy===z.value&&v.jsx(_0,{})]},z.value)),r.groupBy!=="none"&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),N.map(z=>v.jsxs("button",{className:`filter-option ${r.subGroupBy===z.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",z.value),B()},children:[v.jsx("span",{className:"filter-option-label",children:z.label}),r.subGroupBy===z.value&&v.jsx(_0,{})]},`sub-${z.value}`))]})]})}),v.jsx("div",{className:"filter-bar-divider"}),v.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:p,title:"Manage versions",children:v.jsx(gD,{})}),v.jsx(uc,{isOpen:x==="views",onClose:B,align:"right",width:220,trigger:v.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("views"),children:[v.jsx(hD,{}),v.jsx("span",{className:"filter-chip-label",children:"Views"}),a.length>0&&v.jsx("span",{className:"filter-chip-badge",children:a.length})]}),content:v.jsxs("div",{className:"filter-views",children:[a.length===0?v.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):v.jsx("div",{className:"filter-views-list",children:a.map(z=>v.jsxs("div",{className:"filter-views-item",children:[v.jsx("button",{className:"filter-views-load",onClick:()=>{c(z),B()},children:z.name}),v.jsx("button",{className:"filter-views-delete",onClick:()=>h(z.id),children:v.jsx(Ik,{})})]},z.id))}),v.jsx("div",{className:"filter-popover-divider"}),v.jsxs("div",{className:"filter-views-save",children:[v.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:b,onChange:z=>_(z.target.value),onKeyDown:z=>{z.key==="Enter"&&b.trim()&&(o(b.trim()),_(""))}}),v.jsx("button",{className:"filter-views-save-btn",disabled:!b.trim(),onClick:()=>{b.trim()&&(o(b.trim()),_(""))},children:"Save"})]})]})}),v.jsxs("button",{className:"filter-create-btn",onClick:n,children:[v.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:v.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),g("tasks.create")]})]})}function _D({onClose:r}){const{t:e}=ri(),i=Pj(),{data:n}=VB(),[a,o]=et.useState(""),[c,h]=et.useState(""),[u,d]=et.useState("medium"),[p,g]=et.useState("medium"),[x,y]=et.useState(""),[b,_]=et.useState(""),[k,w]=et.useState(""),T=B=>{if(B.preventDefault(),!a.trim())return;const E=x.split(",").map(O=>O.trim()).filter(Boolean);i.mutate({name:a.trim(),description:c,priority:u,tags:E,urgency:p!=="medium"?p:void 0,why:b.trim()||void 0,version:k||void 0},{onSuccess:()=>r()})};return v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal",onClick:B=>B.stopPropagation(),children:[v.jsxs("div",{className:"modal-header",children:[v.jsx("h2",{className:"modal-title",children:e("tasks.create")}),v.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),v.jsxs("form",{onSubmit:T,className:"modal-body",children:[v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:e("tasks.name")}),v.jsx("input",{className:"field-input",value:a,onChange:B=>o(B.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:e("tasks.description")}),v.jsx("textarea",{className:"field-textarea",value:c,onChange:B=>h(B.target.value),placeholder:"What needs to be done?",rows:3})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:e("tasks.priority")}),v.jsxs("select",{className:"field-select",value:u,onChange:B=>d(B.target.value),children:[v.jsx("option",{value:"low",children:e("priority.low")}),v.jsx("option",{value:"medium",children:e("priority.medium")}),v.jsx("option",{value:"high",children:e("priority.high")}),v.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:"Urgency"}),v.jsxs("select",{className:"field-select",value:p,onChange:B=>g(B.target.value),children:[v.jsx("option",{value:"low",children:e("priority.low")}),v.jsx("option",{value:"medium",children:e("priority.medium")}),v.jsx("option",{value:"high",children:e("priority.high")}),v.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:"Version"}),v.jsxs("select",{className:"field-select",value:k,onChange:B=>w(B.target.value),children:[v.jsx("option",{value:"",children:"No version"}),(n??[]).map(B=>v.jsx("option",{value:B.version,children:B.version},B.version))]})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:"Why"}),v.jsx("textarea",{className:"field-textarea",value:b,onChange:B=>_(B.target.value),placeholder:"Why is this task needed?",rows:2})]}),v.jsxs("label",{className:"field",children:[v.jsx("span",{className:"field-label",children:e("tasks.tags")}),v.jsx("input",{className:"field-input",value:x,onChange:B=>y(B.target.value),placeholder:"Comma-separated tags"})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"btn btn--ghost",onClick:r,children:e("tasks.cancel")}),v.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||i.isPending,children:i.isPending?"...":e("tasks.save")})]})]})]})})}function h1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xl=h1();function eA(r){xl=r}var qu={exec:()=>null};function Ne(r,e=""){let i=typeof r=="string"?r:r.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(ui.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var ui={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")},kD=/^(?:[ \t]*(?:\n|$))+/,SD=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,wD=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,TD=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,u1=/(?:[*+-]|\d{1,9}[.)])/,rA=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iA=Ne(rA).replace(/bull/g,u1).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(),BD=Ne(rA).replace(/bull/g,u1).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(),f1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,AD=/^[^\n]+/,d1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ED=Ne(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MD=Ne(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,u1).getRegex(),jg="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",p1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,LD=Ne("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",p1).replace("tag",jg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nA=Ne(f1).replace("hr",_f).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",jg).getRegex(),OD=Ne(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nA).getRegex(),g1={blockquote:OD,code:SD,def:ED,fences:wD,heading:TD,hr:_f,html:LD,lheading:iA,list:MD,newline:kD,paragraph:nA,table:qu,text:AD},Hk=Ne("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jg).getRegex(),ND={...g1,lheading:BD,table:Hk,paragraph:Ne(f1).replace("hr",_f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hk).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",jg).getRegex()},RD={...g1,html:Ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",p1).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:qu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ne(f1).replace("hr",_f).replace("heading",` *#{1,6} *[^
|
|
51
|
+
]`).replace("lheading",iA).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jD=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,DD=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aA=/^( {2,}|\\)\n(?!\s*$)/,FD=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dg=/[\p{P}\p{S}]/u,m1=/[\s\p{P}\p{S}]/u,sA=/[^\s\p{P}\p{S}]/u,$D=Ne(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m1).getRegex(),oA=/(?!~)[\p{P}\p{S}]/u,zD=/(?!~)[\s\p{P}\p{S}]/u,qD=/(?:[^\s\p{P}\p{S}]|~)/u,ID=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lA=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PD=Ne(lA,"u").replace(/punct/g,Dg).getRegex(),HD=Ne(lA,"u").replace(/punct/g,oA).getRegex(),cA="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",UD=Ne(cA,"gu").replace(/notPunctSpace/g,sA).replace(/punctSpace/g,m1).replace(/punct/g,Dg).getRegex(),WD=Ne(cA,"gu").replace(/notPunctSpace/g,qD).replace(/punctSpace/g,zD).replace(/punct/g,oA).getRegex(),YD=Ne("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,sA).replace(/punctSpace/g,m1).replace(/punct/g,Dg).getRegex(),GD=Ne(/\\(punct)/,"gu").replace(/punct/g,Dg).getRegex(),VD=Ne(/^<(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(),XD=Ne(p1).replace("(?:-->|$)","-->").getRegex(),QD=Ne("^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",XD).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ZD=Ne(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Pp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hA=Ne(/^!?\[(label)\]\[(ref)\]/).replace("label",Pp).replace("ref",d1).getRegex(),uA=Ne(/^!?\[(ref)\](?:\[\])?/).replace("ref",d1).getRegex(),KD=Ne("reflink|nolink(?!\\()","g").replace("reflink",hA).replace("nolink",uA).getRegex(),y1={_backpedal:qu,anyPunctuation:GD,autolink:VD,blockSkip:ID,br:aA,code:DD,del:qu,emStrongLDelim:PD,emStrongRDelimAst:UD,emStrongRDelimUnd:YD,escape:jD,link:ZD,nolink:uA,punctuation:$D,reflink:hA,reflinkSearch:KD,tag:QD,text:FD,url:qu},JD={...y1,link:Ne(/^!?\[(label)\]\((.*?)\)/).replace("label",Pp).getRegex(),reflink:Ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pp).getRegex()},Nx={...y1,emStrongRDelimAst:WD,emStrongLDelim:HD,url:Ne(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tF={...Nx,br:Ne(aA).replace("{2,}","*").getRegex(),text:Ne(Nx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zd={normal:g1,gfm:ND,pedantic:RD},ru={normal:y1,gfm:Nx,breaks:tF,pedantic:JD},eF={"&":"&","<":"<",">":">",'"':""","'":"'"},Uk=r=>eF[r];function Vn(r,e){if(e){if(ui.escapeTest.test(r))return r.replace(ui.escapeReplace,Uk)}else if(ui.escapeTestNoEncode.test(r))return r.replace(ui.escapeReplaceNoEncode,Uk);return r}function Wk(r){try{r=encodeURI(r).replace(ui.percentDecode,"%")}catch{return null}return r}function Yk(r,e){var o;const i=r.replace(ui.findPipe,(c,h,u)=>{let d=!1,p=h;for(;--p>=0&&u[p]==="\\";)d=!d;return d?"|":" |"}),n=i.split(ui.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(ui.slashPipe,"|");return n}function iu(r,e,i){const n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function rF(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function Gk(r,e,i,n,a){const o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function iF(r,e,i){const n=r.match(i.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
|
|
52
|
+
`).map(o=>{const c=o.match(i.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
53
|
+
`)}var Hp=class{constructor(r){Ut(this,"options");Ut(this,"rules");Ut(this,"lexer");this.options=r||xl}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:iu(i,`
|
|
54
|
+
`)}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const i=e[0],n=iF(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){const n=iu(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:iu(e[0],`
|
|
55
|
+
`)}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let i=iu(e[0],`
|
|
56
|
+
`).split(`
|
|
57
|
+
`),n="",a="";const o=[];for(;i.length>0;){let c=!1;const h=[];let u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))h.push(i[u]),c=!0;else if(!c)h.push(i[u]);else break;i=i.slice(u);const d=h.join(`
|
|
58
|
+
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
59
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
60
|
+
${d}`:d,a=a?`${a}
|
|
61
|
+
${p}`:p;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=g,i.length===0)break;const x=o.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const y=x,b=y.raw+`
|
|
62
|
+
`+i.join(`
|
|
63
|
+
`),_=this.blockquote(b);o[o.length-1]=_,n=n.substring(0,n.length-y.raw.length)+_.raw,a=a.substring(0,a.length-y.text.length)+_.text;break}else if((x==null?void 0:x.type)==="list"){const y=x,b=y.raw+`
|
|
64
|
+
`+i.join(`
|
|
65
|
+
`),_=this.list(b);o[o.length-1]=_,n=n.substring(0,n.length-x.raw.length)+_.raw,a=a.substring(0,a.length-y.raw.length)+_.raw,i=b.substring(o.at(-1).raw.length).split(`
|
|
66
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim();const n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=this.rules.other.listItemRegex(i);let c=!1;for(;r;){let u=!1,d="",p="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;d=e[0],r=r.substring(d.length);let g=e[2].split(`
|
|
67
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),x=r.split(`
|
|
68
|
+
`,1)[0],y=!g.trim(),b=0;if(this.options.pedantic?(b=2,p=g.trimStart()):y?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,p=g.slice(b),b+=e[1].length),y&&this.rules.other.blankLine.test(x)&&(d+=x+`
|
|
69
|
+
`,r=r.substring(x.length+1),u=!0),!u){const w=this.rules.other.nextBulletRegex(b),T=this.rules.other.hrRegex(b),B=this.rules.other.fencesBeginRegex(b),E=this.rules.other.headingBeginRegex(b),O=this.rules.other.htmlBeginRegex(b);for(;r;){const j=r.split(`
|
|
70
|
+
`,1)[0];let M;if(x=j,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),M=x):M=x.replace(this.rules.other.tabCharGlobal," "),B.test(x)||E.test(x)||O.test(x)||w.test(x)||T.test(x))break;if(M.search(this.rules.other.nonSpaceChar)>=b||!x.trim())p+=`
|
|
71
|
+
`+M.slice(b);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(g)||E.test(g)||T.test(g))break;p+=`
|
|
72
|
+
`+x}!y&&!x.trim()&&(y=!0),d+=j+`
|
|
73
|
+
`,r=r.substring(j.length+1),g=M.slice(b)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let _=null,k;this.options.gfm&&(_=this.rules.other.listIsTask.exec(p),_&&(k=_[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!_,checked:k,loose:!1,text:p,tokens:[]}),a.raw+=d}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const d=a.items[u].tokens.filter(g=>g.type==="space"),p=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=p}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(r){const 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){const e=this.rules.block.def.exec(r);if(e){const i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:n,title:a}}}table(r){var c;const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const i=Yk(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
74
|
+
`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<i.length;h++)o.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(Yk(h,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(r){const 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){const e=this.rules.block.paragraph.exec(r);if(e){const i=e[1].charAt(e[1].length-1)===`
|
|
75
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){const 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){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const 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){const e=this.rules.inline.link.exec(r);if(e){const i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const o=iu(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=rF(e[2],"()");if(o===-2)return;if(o>-1){const h=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Gk(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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))){const n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Gk(i,a,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=[...n[0]].length-1;let c,h,u=o,d=0;const p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*r.length+o);(n=p.exec(e))!=null;){if(c=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!c)continue;if(h=[...c].length,n[3]||n[4]){u+=h;continue}else if((n[5]||n[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);const g=[...n[0]][0].length,x=r.slice(0,o+n.index+g+h);if(Math.min(o,h)%2){const b=x.slice(1,-1);return{type:"em",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}const y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(r){const e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const 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){const e=this.rules.inline.autolink.exec(r);if(e){let i,n;return e[2]==="@"?(i=e[1],n="mailto:"+i):(i=e[1],n=i),{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(r){var i;let e;if(e=this.rules.inline.url.exec(r)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((i=this.rules.inline._backpedal.exec(e[0]))==null?void 0:i[0])??"";while(o!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){const e=this.rules.inline.text.exec(r);if(e){const i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Ua=class Rx{constructor(e){Ut(this,"tokens");Ut(this,"options");Ut(this,"state");Ut(this,"tokenizer");Ut(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||xl,this.options.tokenizer=this.options.tokenizer||new Hp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:ui,block:Zd.normal,inline:ru.normal};this.options.pedantic?(i.block=Zd.pedantic,i.inline=ru.pedantic):this.options.gfm&&(i.block=Zd.gfm,this.options.breaks?i.inline=ru.breaks:i.inline=ru.gfm),this.tokenizer.rules=i}static get rules(){return{block:Zd,inline:ru}}static lex(e,i){return new Rx(i).lex(e)}static lexInline(e,i){return new Rx(i).inlineTokens(e)}lex(e){e=e.replace(ui.carriageReturn,`
|
|
76
|
+
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(ui.tabCharGlobal," ").replace(ui.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
77
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
78
|
+
`+h.raw,d.text+=`
|
|
79
|
+
`+h.text,this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
80
|
+
`+h.raw,d.text+=`
|
|
81
|
+
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const p=e.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const d=i.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
82
|
+
`+h.raw,d.text+=`
|
|
83
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
84
|
+
`+h.raw,d.text+=`
|
|
85
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){var h,u,d;let n=e,a=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let p;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(x=>(p=x.call({lexer:this},e,i))?(e=e.substring(p.raw.length),i.push(p),!0):!1))continue;if(p=this.tokenizer.escape(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.tag(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.link(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(p.raw.length);const x=i.at(-1);p.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):i.push(p);continue}if(p=this.tokenizer.emStrong(e,n,c)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.codespan(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.br(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.del(e)){e=e.substring(p.raw.length),i.push(p);continue}if(p=this.tokenizer.autolink(e)){e=e.substring(p.raw.length),i.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(e))){e=e.substring(p.raw.length),i.push(p);continue}let g=e;if((d=this.options.extensions)!=null&&d.startInline){let x=1/0;const y=e.slice(1);let b;this.options.extensions.startInline.forEach(_=>{b=_.call({lexer:this},y),typeof b=="number"&&b>=0&&(x=Math.min(x,b))}),x<1/0&&x>=0&&(g=e.substring(0,x+1))}if(p=this.tokenizer.inlineText(g)){e=e.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=p.raw.slice(-1)),o=!0;const x=i.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):i.push(p);continue}if(e){const x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return i}},Up=class{constructor(r){Ut(this,"options");Ut(this,"parser");this.options=r||xl}space(r){return""}code({text:r,lang:e,escaped:i}){var o;const n=(o=(e||"").match(ui.notSpaceStart))==null?void 0:o[0],a=r.replace(ui.endingNewline,"")+`
|
|
86
|
+
`;return n?'<pre><code class="language-'+Vn(n)+'">'+(i?a:Vn(a,!0))+`</code></pre>
|
|
87
|
+
`:"<pre><code>"+(i?a:Vn(a,!0))+`</code></pre>
|
|
88
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
89
|
+
${this.parser.parse(r)}</blockquote>
|
|
90
|
+
`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
91
|
+
`}hr(r){return`<hr>
|
|
92
|
+
`}list(r){const e=r.ordered,i=r.start;let n="";for(let c=0;c<r.items.length;c++){const h=r.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
93
|
+
`+n+"</"+a+`>
|
|
94
|
+
`}listitem(r){var i;let e="";if(r.task){const n=this.checkbox({checked:!!r.checked});r.loose?((i=r.tokens[0])==null?void 0:i.type)==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+Vn(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
|
|
95
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
96
|
+
`}table(r){let e="",i="";for(let a=0;a<r.header.length;a++)i+=this.tablecell(r.header[a]);e+=this.tablerow({text:i});let n="";for(let a=0;a<r.rows.length;a++){const o=r.rows[a];i="";for(let c=0;c<o.length;c++)i+=this.tablecell(o[c]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
97
|
+
<thead>
|
|
98
|
+
`+e+`</thead>
|
|
99
|
+
`+n+`</table>
|
|
100
|
+
`}tablerow({text:r}){return`<tr>
|
|
101
|
+
${r}</tr>
|
|
102
|
+
`}tablecell(r){const e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
|
|
103
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Vn(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){const n=this.parser.parseInline(i),a=Wk(r);if(a===null)return n;r=a;let o='<a href="'+r+'"';return e&&(o+=' title="'+Vn(e)+'"'),o+=">"+n+"</a>",o}image({href:r,title:e,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));const a=Wk(r);if(a===null)return Vn(i);r=a;let o=`<img src="${r}" alt="${i}"`;return e&&(o+=` title="${Vn(e)}"`),o+=">",o}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Vn(r.text)}},x1=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Wa=class jx{constructor(e){Ut(this,"options");Ut(this,"renderer");Ut(this,"textRenderer");this.options=e||xl,this.options.renderer=this.options.renderer||new Up,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new x1}static parse(e,i){return new jx(i).parse(e)}static parseInline(e,i){return new jx(i).parseInline(e)}parse(e,i=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=h,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=p||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,p=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],p+=`
|
|
104
|
+
`+this.renderer.text(d);i?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,i=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}const u=h;switch(u.type){case"escape":{n+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.text(u);break}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},mx,_p=(mx=class{constructor(r){Ut(this,"options");Ut(this,"block");this.options=r||xl}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?Ua.lex:Ua.lexInline}provideParser(){return this.block?Wa.parse:Wa.parseInline}},Ut(mx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),mx),nF=class{constructor(...r){Ut(this,"defaults",h1());Ut(this,"options",this.setOptions);Ut(this,"parse",this.parseMarkdown(!0));Ut(this,"parseInline",this.parseMarkdown(!1));Ut(this,"Parser",Wa);Ut(this,"Renderer",Up);Ut(this,"TextRenderer",x1);Ut(this,"Lexer",Ua);Ut(this,"Tokenizer",Hp);Ut(this,"Hooks",_p);this.use(...r)}walkTokens(r,e){var n,a;let i=[];for(const o of r)switch(i=i.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)i=i.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)i=i.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;i=i.concat(this.walkTokens(c.items,e));break}default:{const c=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{const u=c[h].flat(1/0);i=i.concat(this.walkTokens(u,e))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,e)))}}return i}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=e.renderers[a.name];o?e.renderers[a.name]=function(...c){let h=a.renderer.apply(this,c);return h===!1&&(h=o.apply(this,c)),h}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),i.renderer){const a=this.defaults.renderer||new Up(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=i.renderer[c],u=a[c];a[c]=(...d)=>{let p=h.apply(a,d);return p===!1&&(p=u.apply(a,d)),p||""}}n.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new Hp(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=i.tokenizer[c],u=a[c];a[c]=(...d)=>{let p=h.apply(a,d);return p===!1&&(p=u.apply(a,d)),p}}n.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new _p;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=i.hooks[c],u=a[c];_p.passThroughHooks.has(o)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(h.call(a,d)).then(g=>u.call(a,g));const p=h.call(a,d);return u.call(a,p)}:a[c]=(...d)=>{let p=h.apply(a,d);return p===!1&&(p=u.apply(a,d)),p}}n.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(c){let h=[];return h.push(o.call(this,c)),a&&(h=h.concat(a.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Ua.lex(r,e??this.defaults)}parser(r,e){return Wa.parse(r,e??this.defaults)}parseMarkdown(r){return(i,n)=>{const a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=r);const h=o.hooks?o.hooks.provideLexer():r?Ua.lex:Ua.lexInline,u=o.hooks?o.hooks.provideParser():r?Wa.parse:Wa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).then(d=>h(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(c);try{o.hooks&&(i=o.hooks.preprocess(i));let d=h(i,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let p=u(d,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(d){return c(d)}}}onError(r,e){return i=>{if(i.message+=`
|
|
105
|
+
Please report this to https://github.com/markedjs/marked.`,r){const n="<p>An error occurred:</p><pre>"+Vn(i.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(i);throw i}}},ll=new nF;function ae(r,e){return ll.parse(r,e)}ae.options=ae.setOptions=function(r){return ll.setOptions(r),ae.defaults=ll.defaults,eA(ae.defaults),ae};ae.getDefaults=h1;ae.defaults=xl;ae.use=function(...r){return ll.use(...r),ae.defaults=ll.defaults,eA(ae.defaults),ae};ae.walkTokens=function(r,e){return ll.walkTokens(r,e)};ae.parseInline=ll.parseInline;ae.Parser=Wa;ae.parser=Wa.parse;ae.Renderer=Up;ae.TextRenderer=x1;ae.Lexer=Ua;ae.lexer=Ua.lex;ae.Tokenizer=Hp;ae.Hooks=_p;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;Wa.parse;Ua.lex;const aF="modulepreload",sF=function(r){return"/"+r},Vk={},Ce=function(e,i,n){let a=Promise.resolve();if(i&&i.length>0){let c=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(i.map(d=>{if(d=sF(d),d in Vk)return;Vk[d]=!0;const p=d.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":aF,p||(x.as="script"),x.crossOrigin="",x.href=d,u&&x.setAttribute("nonce",u),document.head.appendChild(x),p)return new Promise((y,b)=>{x.addEventListener("load",y),x.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};var kp={exports:{}},oF=kp.exports,Xk;function lF(){return Xk||(Xk=1,(function(r,e){(function(i,n){r.exports=n()})(oF,(function(){var i=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",p="week",g="month",x="quarter",y="year",b="date",_="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={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(F){var U=["th","st","nd","rd"],R=F%100;return"["+F+(U[(R-20)%10]||U[R]||U[0])+"]"}},B=function(F,U,R){var I=String(F);return!I||I.length>=U?F:""+Array(U+1-I.length).join(R)+F},E={s:B,z:function(F){var U=-F.utcOffset(),R=Math.abs(U),I=Math.floor(R/60),H=R%60;return(U<=0?"+":"-")+B(I,2,"0")+":"+B(H,2,"0")},m:function F(U,R){if(U.date()<R.date())return-F(R,U);var I=12*(R.year()-U.year())+(R.month()-U.month()),H=U.clone().add(I,g),G=R-H<0,Z=U.clone().add(I+(G?-1:1),g);return+(-(I+(R-H)/(G?H-Z:Z-H))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:g,y,w:p,d,D:b,h:u,m:h,s:c,ms:o,Q:x}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},O="en",j={};j[O]=T;var M="$isDayjsObject",N=function(F){return F instanceof K||!(!F||!F[M])},Y=function F(U,R,I){var H;if(!U)return O;if(typeof U=="string"){var G=U.toLowerCase();j[G]&&(H=G),R&&(j[G]=R,H=G);var Z=U.split("-");if(!H&&Z.length>1)return F(Z[0])}else{var P=U.name;j[P]=U,H=P}return!I&&H&&(O=H),H||!I&&O},$=function(F,U){if(N(F))return F.clone();var R=typeof U=="object"?U:{};return R.date=F,R.args=arguments,new K(R)},z=E;z.l=Y,z.i=N,z.w=function(F,U){return $(F,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var K=(function(){function F(R){this.$L=Y(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[M]=!0}var U=F.prototype;return U.parse=function(R){this.$d=(function(I){var H=I.date,G=I.utc;if(H===null)return new Date(NaN);if(z.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var Z=H.match(k);if(Z){var P=Z[2]-1||0,J=(Z[7]||"0").substring(0,3);return G?new Date(Date.UTC(Z[1],P,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,J)):new Date(Z[1],P,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,J)}}return new Date(H)})(R),this.init()},U.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},U.$utils=function(){return z},U.isValid=function(){return this.$d.toString()!==_},U.isSame=function(R,I){var H=$(R);return this.startOf(I)<=H&&H<=this.endOf(I)},U.isAfter=function(R,I){return $(R)<this.startOf(I)},U.isBefore=function(R,I){return this.endOf(I)<$(R)},U.$g=function(R,I,H){return z.u(R)?this[I]:this.set(H,R)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(R,I){var H=this,G=!!z.u(I)||I,Z=z.p(R),P=function(Ct,mt){var Bt=z.w(H.$u?Date.UTC(H.$y,mt,Ct):new Date(H.$y,mt,Ct),H);return G?Bt:Bt.endOf(d)},J=function(Ct,mt){return z.w(H.toDate()[Ct].apply(H.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(mt)),H)},nt=this.$W,ut=this.$M,gt=this.$D,kt="set"+(this.$u?"UTC":"");switch(Z){case y:return G?P(1,0):P(31,11);case g:return G?P(1,ut):P(0,ut+1);case p:var Et=this.$locale().weekStart||0,st=(nt<Et?nt+7:nt)-Et;return P(G?gt-st:gt+(6-st),ut);case d:case b:return J(kt+"Hours",0);case u:return J(kt+"Minutes",1);case h:return J(kt+"Seconds",2);case c:return J(kt+"Milliseconds",3);default:return this.clone()}},U.endOf=function(R){return this.startOf(R,!1)},U.$set=function(R,I){var H,G=z.p(R),Z="set"+(this.$u?"UTC":""),P=(H={},H[d]=Z+"Date",H[b]=Z+"Date",H[g]=Z+"Month",H[y]=Z+"FullYear",H[u]=Z+"Hours",H[h]=Z+"Minutes",H[c]=Z+"Seconds",H[o]=Z+"Milliseconds",H)[G],J=G===d?this.$D+(I-this.$W):I;if(G===g||G===y){var nt=this.clone().set(b,1);nt.$d[P](J),nt.init(),this.$d=nt.set(b,Math.min(this.$D,nt.daysInMonth())).$d}else P&&this.$d[P](J);return this.init(),this},U.set=function(R,I){return this.clone().$set(R,I)},U.get=function(R){return this[z.p(R)]()},U.add=function(R,I){var H,G=this;R=Number(R);var Z=z.p(I),P=function(ut){var gt=$(G);return z.w(gt.date(gt.date()+Math.round(ut*R)),G)};if(Z===g)return this.set(g,this.$M+R);if(Z===y)return this.set(y,this.$y+R);if(Z===d)return P(1);if(Z===p)return P(7);var J=(H={},H[h]=n,H[u]=a,H[c]=i,H)[Z]||1,nt=this.$d.getTime()+R*J;return z.w(nt,this)},U.subtract=function(R,I){return this.add(-1*R,I)},U.format=function(R){var I=this,H=this.$locale();if(!this.isValid())return H.invalidDate||_;var G=R||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),P=this.$H,J=this.$m,nt=this.$M,ut=H.weekdays,gt=H.months,kt=H.meridiem,Et=function(mt,Bt,Yt,qt){return mt&&(mt[Bt]||mt(I,G))||Yt[Bt].slice(0,qt)},st=function(mt){return z.s(P%12||12,mt,"0")},Ct=kt||function(mt,Bt,Yt){var qt=mt<12?"AM":"PM";return Yt?qt.toLowerCase():qt};return G.replace(w,(function(mt,Bt){return Bt||(function(Yt){switch(Yt){case"YY":return String(I.$y).slice(-2);case"YYYY":return z.s(I.$y,4,"0");case"M":return nt+1;case"MM":return z.s(nt+1,2,"0");case"MMM":return Et(H.monthsShort,nt,gt,3);case"MMMM":return Et(gt,nt);case"D":return I.$D;case"DD":return z.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Et(H.weekdaysMin,I.$W,ut,2);case"ddd":return Et(H.weekdaysShort,I.$W,ut,3);case"dddd":return ut[I.$W];case"H":return String(P);case"HH":return z.s(P,2,"0");case"h":return st(1);case"hh":return st(2);case"a":return Ct(P,J,!0);case"A":return Ct(P,J,!1);case"m":return String(J);case"mm":return z.s(J,2,"0");case"s":return String(I.$s);case"ss":return z.s(I.$s,2,"0");case"SSS":return z.s(I.$ms,3,"0");case"Z":return Z}return null})(mt)||Z.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(R,I,H){var G,Z=this,P=z.p(I),J=$(R),nt=(J.utcOffset()-this.utcOffset())*n,ut=this-J,gt=function(){return z.m(Z,J)};switch(P){case y:G=gt()/12;break;case g:G=gt();break;case x:G=gt()/3;break;case p:G=(ut-nt)/6048e5;break;case d:G=(ut-nt)/864e5;break;case u:G=ut/a;break;case h:G=ut/n;break;case c:G=ut/i;break;default:G=ut}return H?G:z.a(G)},U.daysInMonth=function(){return this.endOf(g).$D},U.$locale=function(){return j[this.$L]},U.locale=function(R,I){if(!R)return this.$L;var H=this.clone(),G=Y(R,I,!0);return G&&(H.$L=G),H},U.clone=function(){return z.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},F})(),W=K.prototype;return $.prototype=W,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",b]].forEach((function(F){W[F[1]]=function(U){return this.$g(U,F[0],F[1])}})),$.extend=function(F,U){return F.$i||(F(U,K,$),F.$i=!0),$},$.locale=Y,$.isDayjs=N,$.unix=function(F){return $(1e3*F)},$.en=j[O],$.Ls=j,$.p={},$}))})(kp)),kp.exports}var cF=lF();const hF=Og(cF);var fA=Object.defineProperty,A=(r,e)=>fA(r,"name",{value:e,configurable:!0}),uF=(r,e)=>{for(var i in e)fA(r,i,{get:e[i],enumerable:!0})},Oa={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},_t={trace:A((...r)=>{},"trace"),debug:A((...r)=>{},"debug"),info:A((...r)=>{},"info"),warn:A((...r)=>{},"warn"),error:A((...r)=>{},"error"),fatal:A((...r)=>{},"fatal")},b1=A(function(r="fatal"){let e=Oa.fatal;typeof r=="string"?r.toLowerCase()in Oa&&(e=Oa[r]):typeof r=="number"&&(e=r),_t.trace=()=>{},_t.debug=()=>{},_t.info=()=>{},_t.warn=()=>{},_t.error=()=>{},_t.fatal=()=>{},e<=Oa.fatal&&(_t.fatal=console.error?console.error.bind(console,on("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",on("FATAL"))),e<=Oa.error&&(_t.error=console.error?console.error.bind(console,on("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",on("ERROR"))),e<=Oa.warn&&(_t.warn=console.warn?console.warn.bind(console,on("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",on("WARN"))),e<=Oa.info&&(_t.info=console.info?console.info.bind(console,on("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",on("INFO"))),e<=Oa.debug&&(_t.debug=console.debug?console.debug.bind(console,on("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",on("DEBUG"))),e<=Oa.trace&&(_t.trace=console.debug?console.debug.bind(console,on("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",on("TRACE")))},"setLogLevel"),on=A(r=>`%c${hF().format("ss.SSS")} : ${r} : `,"format");const Sp={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=>{const e=r/255;return r>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?r+(e-r)*6*i:i<1/2?e:i<2/3?r+(e-r)*(2/3-i)*6:r),hsl2rgb:({h:r,s:e,l:i},n)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;const a=i<.5?i*(1+e):i+e-i*e,o=2*i-a;switch(n){case"r":return Sp.hue2rgb(o,a,r+1/3)*255;case"g":return Sp.hue2rgb(o,a,r)*255;case"b":return Sp.hue2rgb(o,a,r-1/3)*255}},rgb2hsl:({r,g:e,b:i},n)=>{r/=255,e/=255,i/=255;const a=Math.max(r,e,i),o=Math.min(r,e,i),c=(a+o)/2;if(n==="l")return c*100;if(a===o)return 0;const h=a-o,u=c>.5?h/(2-a-o):h/(a+o);if(n==="s")return u*100;switch(a){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},fF={clamp:(r,e,i)=>e>i?Math.min(e,Math.max(i,r)):Math.min(i,Math.max(e,r)),round:r=>Math.round(r*1e10)/1e10},dF={dec2hex:r=>{const e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},ie={channel:Sp,lang:fF,unit:dF},qs={};for(let r=0;r<=255;r++)qs[r]=ie.unit.dec2hex(r);const Kr={ALL:0,RGB:1,HSL:2};class pF{constructor(){this.type=Kr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Kr.ALL}is(e){return this.type===e}}class gF{constructor(e,i){this.color=i,this.changed=!1,this.data=e,this.type=new pF}set(e,i){return this.color=i,this.changed=!1,this.data=e,this.type.type=Kr.ALL,this}_ensureHSL(){const e=this.data,{h:i,s:n,l:a}=e;i===void 0&&(e.h=ie.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ie.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=ie.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:i,g:n,b:a}=e;i===void 0&&(e.r=ie.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ie.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=ie.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,i=e.r;return!this.type.is(Kr.HSL)&&i!==void 0?i:(this._ensureHSL(),ie.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,i=e.g;return!this.type.is(Kr.HSL)&&i!==void 0?i:(this._ensureHSL(),ie.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,i=e.b;return!this.type.is(Kr.HSL)&&i!==void 0?i:(this._ensureHSL(),ie.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,i=e.h;return!this.type.is(Kr.RGB)&&i!==void 0?i:(this._ensureRGB(),ie.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,i=e.s;return!this.type.is(Kr.RGB)&&i!==void 0?i:(this._ensureRGB(),ie.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,i=e.l;return!this.type.is(Kr.RGB)&&i!==void 0?i:(this._ensureRGB(),ie.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Kr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Kr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Kr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Kr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Kr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Kr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Fg=new gF({r:0,g:0,b:0,a:0},"transparent"),xc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:r=>{if(r.charCodeAt(0)!==35)return;const e=r.match(xc.re);if(!e)return;const i=e[1],n=parseInt(i,16),a=i.length,o=a%4===0,c=a>4,h=c?1:17,u=c?8:4,d=o?0:-1,p=c?255:15;return Fg.set({r:(n>>u*(d+3)&p)*h,g:(n>>u*(d+2)&p)*h,b:(n>>u*(d+1)&p)*h,a:o?(n&p)*h/255:1},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`#${qs[Math.round(e)]}${qs[Math.round(i)]}${qs[Math.round(n)]}${qs[Math.round(a*255)]}`:`#${qs[Math.round(e)]}${qs[Math.round(i)]}${qs[Math.round(n)]}`}},Uo={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=>{const e=r.match(Uo.hueRe);if(e){const[,i,n]=e;switch(n){case"grad":return ie.channel.clamp.h(parseFloat(i)*.9);case"rad":return ie.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return ie.channel.clamp.h(parseFloat(i)*360)}}return ie.channel.clamp.h(parseFloat(r))},parse:r=>{const e=r.charCodeAt(0);if(e!==104&&e!==72)return;const i=r.match(Uo.re);if(!i)return;const[,n,a,o,c,h]=i;return Fg.set({h:Uo._hue2deg(n),s:ie.channel.clamp.s(parseFloat(a)),l:ie.channel.clamp.l(parseFloat(o)),a:c?ie.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:r=>{const{h:e,s:i,l:n,a}=r;return a<1?`hsla(${ie.lang.round(e)}, ${ie.lang.round(i)}%, ${ie.lang.round(n)}%, ${a})`:`hsl(${ie.lang.round(e)}, ${ie.lang.round(i)}%, ${ie.lang.round(n)}%)`}},Iu={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();const e=Iu.colors[r];if(e)return xc.parse(e)},stringify:r=>{const e=xc.stringify(r);for(const i in Iu.colors)if(Iu.colors[i]===e)return i}},Mu={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=>{const e=r.charCodeAt(0);if(e!==114&&e!==82)return;const i=r.match(Mu.re);if(!i)return;const[,n,a,o,c,h,u,d,p]=i;return Fg.set({r:ie.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:ie.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:ie.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?ie.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`rgba(${ie.lang.round(e)}, ${ie.lang.round(i)}, ${ie.lang.round(n)}, ${ie.lang.round(a)})`:`rgb(${ie.lang.round(e)}, ${ie.lang.round(i)}, ${ie.lang.round(n)})`}},aa={format:{keyword:Iu,hex:xc,rgb:Mu,rgba:Mu,hsl:Uo,hsla:Uo},parse:r=>{if(typeof r!="string")return r;const e=xc.parse(r)||Mu.parse(r)||Uo.parse(r)||Iu.parse(r);if(e)return e;throw new Error(`Unsupported color format: "${r}"`)},stringify:r=>!r.changed&&r.color?r.color:r.type.is(Kr.HSL)||r.data.r===void 0?Uo.stringify(r):r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b)?Mu.stringify(r):xc.stringify(r)},dA=(r,e)=>{const i=aa.parse(r);for(const n in e)i[n]=ie.channel.clamp[n](e[n]);return aa.stringify(i)},ro=(r,e,i=0,n=1)=>{if(typeof r!="number")return dA(r,{a:e});const a=Fg.set({r:ie.channel.clamp.r(r),g:ie.channel.clamp.g(e),b:ie.channel.clamp.b(i),a:ie.channel.clamp.a(n)});return aa.stringify(a)},mF=r=>{const{r:e,g:i,b:n}=aa.parse(r),a=.2126*ie.channel.toLinear(e)+.7152*ie.channel.toLinear(i)+.0722*ie.channel.toLinear(n);return ie.lang.round(a)},yF=r=>mF(r)>=.5,Dn=r=>!yF(r),pA=(r,e,i)=>{const n=aa.parse(r),a=n[e],o=ie.channel.clamp[e](a+i);return a!==o&&(n[e]=o),aa.stringify(n)},pt=(r,e)=>pA(r,"l",e),ft=(r,e)=>pA(r,"l",-e),D=(r,e)=>{const i=aa.parse(r),n={};for(const a in e)e[a]&&(n[a]=i[a]+e[a]);return dA(r,n)},xF=(r,e,i=50)=>{const{r:n,g:a,b:o,a:c}=aa.parse(r),{r:h,g:u,b:d,a:p}=aa.parse(e),g=i/100,x=g*2-1,y=c-p,_=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,k=1-_,w=n*_+h*k,T=a*_+u*k,B=o*_+d*k,E=c*g+p*(1-g);return ro(w,T,B,E)},it=(r,e=100)=>{const i=aa.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,xF(i,r,e)};/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */const{entries:gA,setPrototypeOf:Qk,isFrozen:bF,getPrototypeOf:vF,getOwnPropertyDescriptor:CF}=Object;let{freeze:pi,seal:gn,create:fc}=Object,{apply:Dx,construct:Fx}=typeof Reflect<"u"&&Reflect;pi||(pi=function(e){return e});gn||(gn=function(e){return e});Dx||(Dx=function(e,i){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];return e.apply(i,a)});Fx||(Fx=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return new e(...n)});const nu=Tr(Array.prototype.forEach),_F=Tr(Array.prototype.lastIndexOf),Zk=Tr(Array.prototype.pop),au=Tr(Array.prototype.push),kF=Tr(Array.prototype.splice),oi=Array.isArray,Lu=Tr(String.prototype.toLowerCase),S0=Tr(String.prototype.toString),Kk=Tr(String.prototype.match),ac=Tr(String.prototype.replace),Jk=Tr(String.prototype.indexOf),SF=Tr(String.prototype.trim),wF=Tr(Number.prototype.toString),TF=Tr(Boolean.prototype.toString),tS=typeof BigInt>"u"?null:Tr(BigInt.prototype.toString),eS=typeof Symbol>"u"?null:Tr(Symbol.prototype.toString),hr=Tr(Object.prototype.hasOwnProperty),su=Tr(Object.prototype.toString),Wr=Tr(RegExp.prototype.test),Kd=BF(TypeError);function Tr(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return Dx(r,e,n)}}function BF(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return Fx(r,i)}}function le(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Lu;if(Qk&&Qk(r,null),!oi(e))return r;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=i(a);o!==a&&(bF(e)||(e[n]=o),a=o)}r[a]=!0}return r}function AF(r){for(let e=0;e<r.length;e++)hr(r,e)||(r[e]=null);return r}function Ei(r){const e=fc(null);for(const[i,n]of gA(r))hr(r,i)&&(oi(n)?e[i]=AF(n):n&&typeof n=="object"&&n.constructor===Object?e[i]=Ei(n):e[i]=n);return e}function EF(r){switch(typeof r){case"string":return r;case"number":return wF(r);case"boolean":return TF(r);case"bigint":return tS?tS(r):"0";case"symbol":return eS?eS(r):"Symbol()";case"undefined":return su(r);case"function":case"object":{if(r===null)return su(r);const e=r,i=dc(e,"toString");if(typeof i=="function"){const n=i(e);return typeof n=="string"?n:su(n)}return su(r)}default:return su(r)}}function dc(r,e){for(;r!==null;){const n=CF(r,e);if(n){if(n.get)return Tr(n.get);if(typeof n.value=="function")return Tr(n.value)}r=vF(r)}function i(){return null}return i}function MF(r){try{return Wr(r,""),!0}catch{return!1}}const rS=pi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),w0=pi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T0=pi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),LF=pi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),B0=pi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),OF=pi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),iS=pi(["#text"]),nS=pi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),A0=pi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),aS=pi(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jd=pi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),NF=gn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),RF=gn(/<%[\w\W]*|[\w\W]*%>/gm),jF=gn(/\$\{[\w\W]*/gm),DF=gn(/^data-[\-\w.\u00B7-\uFFFF]+$/),FF=gn(/^aria-[\-\w]+$/),mA=gn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$F=gn(/^(?:\w+script|data):/i),zF=gn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yA=gn(/^html$/i),qF=gn(/^[a-z][.\w]*(-[.\w]+)+$/i);var sS=Object.freeze({__proto__:null,ARIA_ATTR:FF,ATTR_WHITESPACE:zF,CUSTOM_ELEMENT:qF,DATA_ATTR:DF,DOCTYPE_NAME:yA,ERB_EXPR:RF,IS_ALLOWED_URI:mA,IS_SCRIPT_OR_DATA:$F,MUSTACHE_EXPR:NF,TMPLIT_EXPR:jF});const ou={element:1,text:3,progressingInstruction:7,comment:8,document:9},IF=function(){return typeof window>"u"?null:window},PF=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";i&&i.hasAttribute(a)&&(n=i.getAttribute(a));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},oS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xA(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IF();const e=It=>xA(It);if(e.version="3.4.2",e.removed=[],!r||!r.document||r.document.nodeType!==ou.document||!r.Element)return e.isSupported=!1,e;let{document:i}=r;const n=i,a=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:c,Node:h,Element:u,NodeFilter:d,NamedNodeMap:p=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:g,DOMParser:x,trustedTypes:y}=r,b=u.prototype,_=dc(b,"cloneNode"),k=dc(b,"remove"),w=dc(b,"nextSibling"),T=dc(b,"childNodes"),B=dc(b,"parentNode");if(typeof c=="function"){const It=i.createElement("template");It.content&&It.content.ownerDocument&&(i=It.content.ownerDocument)}let E,O="";const{implementation:j,createNodeIterator:M,createDocumentFragment:N,getElementsByTagName:Y}=i,{importNode:$}=n;let z=oS();e.isSupported=typeof gA=="function"&&typeof B=="function"&&j&&j.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:H,CUSTOM_ELEMENT:G}=sS;let{IS_ALLOWED_URI:Z}=sS,P=null;const J=le({},[...rS,...w0,...T0,...B0,...iS]);let nt=null;const ut=le({},[...nS,...A0,...aS,...Jd]);let gt=Object.seal(fc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),kt=null,Et=null;const st=Object.seal(fc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ct=!0,mt=!0,Bt=!1,Yt=!0,qt=!1,Vt=!0,At=!1,Jt=!1,Ae=!1,ar=!1,Rr=!1,he=!1,Ee=!0,Pe=!1;const Xr="user-content-";let Re=!0,jr=!1,yi={},Br=null;const yn=le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let kl=null;const ho=le({},["audio","video","img","source","image","track"]);let uo=null;const Sl=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Dr="http://www.w3.org/1998/Math/MathML",xr="http://www.w3.org/2000/svg",dr="http://www.w3.org/1999/xhtml";let sr=dr,fo=!1,po=null;const ch=le({},[Dr,xr,dr],S0);let zn=le({},["mi","mo","mn","ms","mtext"]),qn=le({},["annotation-xml"]);const is=le({},["title","style","font","a","script"]);let ni=null;const ns=["application/xhtml+xml","text/html"],xn="text/html";let Qe=null,Fi=null;const as=i.createElement("form"),In=function(V){return V instanceof RegExp||V instanceof Function},go=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fi&&Fi===V)return;(!V||typeof V!="object")&&(V={}),V=Ei(V),ni=ns.indexOf(V.PARSER_MEDIA_TYPE)===-1?xn:V.PARSER_MEDIA_TYPE,Qe=ni==="application/xhtml+xml"?S0:Lu,P=hr(V,"ALLOWED_TAGS")&&oi(V.ALLOWED_TAGS)?le({},V.ALLOWED_TAGS,Qe):J,nt=hr(V,"ALLOWED_ATTR")&&oi(V.ALLOWED_ATTR)?le({},V.ALLOWED_ATTR,Qe):ut,po=hr(V,"ALLOWED_NAMESPACES")&&oi(V.ALLOWED_NAMESPACES)?le({},V.ALLOWED_NAMESPACES,S0):ch,uo=hr(V,"ADD_URI_SAFE_ATTR")&&oi(V.ADD_URI_SAFE_ATTR)?le(Ei(Sl),V.ADD_URI_SAFE_ATTR,Qe):Sl,kl=hr(V,"ADD_DATA_URI_TAGS")&&oi(V.ADD_DATA_URI_TAGS)?le(Ei(ho),V.ADD_DATA_URI_TAGS,Qe):ho,Br=hr(V,"FORBID_CONTENTS")&&oi(V.FORBID_CONTENTS)?le({},V.FORBID_CONTENTS,Qe):yn,kt=hr(V,"FORBID_TAGS")&&oi(V.FORBID_TAGS)?le({},V.FORBID_TAGS,Qe):Ei({}),Et=hr(V,"FORBID_ATTR")&&oi(V.FORBID_ATTR)?le({},V.FORBID_ATTR,Qe):Ei({}),yi=hr(V,"USE_PROFILES")?V.USE_PROFILES&&typeof V.USE_PROFILES=="object"?Ei(V.USE_PROFILES):V.USE_PROFILES:!1,Ct=V.ALLOW_ARIA_ATTR!==!1,mt=V.ALLOW_DATA_ATTR!==!1,Bt=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Yt=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=V.SAFE_FOR_TEMPLATES||!1,Vt=V.SAFE_FOR_XML!==!1,At=V.WHOLE_DOCUMENT||!1,ar=V.RETURN_DOM||!1,Rr=V.RETURN_DOM_FRAGMENT||!1,he=V.RETURN_TRUSTED_TYPE||!1,Ae=V.FORCE_BODY||!1,Ee=V.SANITIZE_DOM!==!1,Pe=V.SANITIZE_NAMED_PROPS||!1,Re=V.KEEP_CONTENT!==!1,jr=V.IN_PLACE||!1,Z=MF(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:mA,sr=typeof V.NAMESPACE=="string"?V.NAMESPACE:dr,zn=hr(V,"MATHML_TEXT_INTEGRATION_POINTS")&&V.MATHML_TEXT_INTEGRATION_POINTS&&typeof V.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ei(V.MATHML_TEXT_INTEGRATION_POINTS):le({},["mi","mo","mn","ms","mtext"]),qn=hr(V,"HTML_INTEGRATION_POINTS")&&V.HTML_INTEGRATION_POINTS&&typeof V.HTML_INTEGRATION_POINTS=="object"?Ei(V.HTML_INTEGRATION_POINTS):le({},["annotation-xml"]);const vt=hr(V,"CUSTOM_ELEMENT_HANDLING")&&V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING=="object"?Ei(V.CUSTOM_ELEMENT_HANDLING):fc(null);if(gt=fc(null),hr(vt,"tagNameCheck")&&In(vt.tagNameCheck)&&(gt.tagNameCheck=vt.tagNameCheck),hr(vt,"attributeNameCheck")&&In(vt.attributeNameCheck)&&(gt.attributeNameCheck=vt.attributeNameCheck),hr(vt,"allowCustomizedBuiltInElements")&&typeof vt.allowCustomizedBuiltInElements=="boolean"&&(gt.allowCustomizedBuiltInElements=vt.allowCustomizedBuiltInElements),qt&&(mt=!1),Rr&&(ar=!0),yi&&(P=le({},iS),nt=fc(null),yi.html===!0&&(le(P,rS),le(nt,nS)),yi.svg===!0&&(le(P,w0),le(nt,A0),le(nt,Jd)),yi.svgFilters===!0&&(le(P,T0),le(nt,A0),le(nt,Jd)),yi.mathMl===!0&&(le(P,B0),le(nt,aS),le(nt,Jd))),st.tagCheck=null,st.attributeCheck=null,hr(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?st.tagCheck=V.ADD_TAGS:oi(V.ADD_TAGS)&&(P===J&&(P=Ei(P)),le(P,V.ADD_TAGS,Qe))),hr(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?st.attributeCheck=V.ADD_ATTR:oi(V.ADD_ATTR)&&(nt===ut&&(nt=Ei(nt)),le(nt,V.ADD_ATTR,Qe))),hr(V,"ADD_URI_SAFE_ATTR")&&oi(V.ADD_URI_SAFE_ATTR)&&le(uo,V.ADD_URI_SAFE_ATTR,Qe),hr(V,"FORBID_CONTENTS")&&oi(V.FORBID_CONTENTS)&&(Br===yn&&(Br=Ei(Br)),le(Br,V.FORBID_CONTENTS,Qe)),hr(V,"ADD_FORBID_CONTENTS")&&oi(V.ADD_FORBID_CONTENTS)&&(Br===yn&&(Br=Ei(Br)),le(Br,V.ADD_FORBID_CONTENTS,Qe)),Re&&(P["#text"]=!0),At&&le(P,["html","head","body"]),P.table&&(le(P,["tbody"]),delete kt.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw Kd('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Kd('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=V.TRUSTED_TYPES_POLICY,O=E.createHTML("")}else E===void 0&&(E=PF(y,a)),E!==null&&typeof O=="string"&&(O=E.createHTML(""));pi&&pi(V),Fi=V},fa=le({},[...w0,...T0,...LF]),ss=le({},[...B0,...OF]),da=function(V){let vt=B(V);(!vt||!vt.tagName)&&(vt={namespaceURI:sr,tagName:"template"});const Lt=Lu(V.tagName),ue=Lu(vt.tagName);return po[V.namespaceURI]?V.namespaceURI===xr?vt.namespaceURI===dr?Lt==="svg":vt.namespaceURI===Dr?Lt==="svg"&&(ue==="annotation-xml"||zn[ue]):!!fa[Lt]:V.namespaceURI===Dr?vt.namespaceURI===dr?Lt==="math":vt.namespaceURI===xr?Lt==="math"&&qn[ue]:!!ss[Lt]:V.namespaceURI===dr?vt.namespaceURI===xr&&!qn[ue]||vt.namespaceURI===Dr&&!zn[ue]?!1:!ss[Lt]&&(is[Lt]||!fa[Lt]):!!(ni==="application/xhtml+xml"&&po[V.namespaceURI]):!1},qr=function(V){au(e.removed,{element:V});try{B(V).removeChild(V)}catch{k(V)}},$i=function(V,vt){try{au(e.removed,{attribute:vt.getAttributeNode(V),from:vt})}catch{au(e.removed,{attribute:null,from:vt})}if(vt.removeAttribute(V),V==="is")if(ar||Rr)try{qr(vt)}catch{}else try{vt.setAttribute(V,"")}catch{}},Zi=function(V){let vt=null,Lt=null;if(Ae)V="<remove></remove>"+V;else{const $e=Kk(V,/^[\r\n\t ]+/);Lt=$e&&$e[0]}ni==="application/xhtml+xml"&&sr===dr&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const ue=E?E.createHTML(V):V;if(sr===dr)try{vt=new x().parseFromString(ue,ni)}catch{}if(!vt||!vt.documentElement){vt=j.createDocument(sr,"template",null);try{vt.documentElement.innerHTML=fo?O:ue}catch{}}const fe=vt.body||vt.documentElement;return V&&Lt&&fe.insertBefore(i.createTextNode(Lt),fe.childNodes[0]||null),sr===dr?Y.call(vt,At?"html":"body")[0]:At?vt.documentElement:fe},mo=function(V){return M.call(V.ownerDocument||V,V,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},xi=function(V){return V instanceof g&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof p)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},Ze=function(V){return typeof h=="function"&&V instanceof h};function He(It,V,vt){nu(It,Lt=>{Lt.call(e,V,vt,Fi)})}const bn=function(V){let vt=null;if(He(z.beforeSanitizeElements,V,null),xi(V))return qr(V),!0;const Lt=Qe(V.nodeName);if(He(z.uponSanitizeElement,V,{tagName:Lt,allowedTags:P}),Vt&&V.hasChildNodes()&&!Ze(V.firstElementChild)&&Wr(/<[/\w!]/g,V.innerHTML)&&Wr(/<[/\w!]/g,V.textContent)||Vt&&V.namespaceURI===dr&&Lt==="style"&&Ze(V.firstElementChild)||V.nodeType===ou.progressingInstruction||Vt&&V.nodeType===ou.comment&&Wr(/<[/\w]/g,V.data))return qr(V),!0;if(kt[Lt]||!(st.tagCheck instanceof Function&&st.tagCheck(Lt))&&!P[Lt]){if(!kt[Lt]&&Tl(Lt)&&(gt.tagNameCheck instanceof RegExp&&Wr(gt.tagNameCheck,Lt)||gt.tagNameCheck instanceof Function&>.tagNameCheck(Lt)))return!1;if(Re&&!Br[Lt]){const ue=B(V)||V.parentNode,fe=T(V)||V.childNodes;if(fe&&ue){const $e=fe.length;for(let br=$e-1;br>=0;--br){const ir=_(fe[br],!0);ue.insertBefore(ir,w(V))}}}return qr(V),!0}return V instanceof u&&!da(V)||(Lt==="noscript"||Lt==="noembed"||Lt==="noframes")&&Wr(/<\/no(script|embed|frames)/i,V.innerHTML)?(qr(V),!0):(qt&&V.nodeType===ou.text&&(vt=V.textContent,nu([K,W,F],ue=>{vt=ac(vt,ue," ")}),V.textContent!==vt&&(au(e.removed,{element:V.cloneNode()}),V.textContent=vt)),He(z.afterSanitizeElements,V,null),!1)},os=function(V,vt,Lt){if(Et[vt]||Ee&&(vt==="id"||vt==="name")&&(Lt in i||Lt in as))return!1;const ue=nt[vt]||st.attributeCheck instanceof Function&&st.attributeCheck(vt,V);if(!(mt&&!Et[vt]&&Wr(U,vt))){if(!(Ct&&Wr(R,vt))){if(!ue||Et[vt]){if(!(Tl(V)&&(gt.tagNameCheck instanceof RegExp&&Wr(gt.tagNameCheck,V)||gt.tagNameCheck instanceof Function&>.tagNameCheck(V))&&(gt.attributeNameCheck instanceof RegExp&&Wr(gt.attributeNameCheck,vt)||gt.attributeNameCheck instanceof Function&>.attributeNameCheck(vt,V))||vt==="is"&>.allowCustomizedBuiltInElements&&(gt.tagNameCheck instanceof RegExp&&Wr(gt.tagNameCheck,Lt)||gt.tagNameCheck instanceof Function&>.tagNameCheck(Lt))))return!1}else if(!uo[vt]){if(!Wr(Z,ac(Lt,H,""))){if(!((vt==="src"||vt==="xlink:href"||vt==="href")&&V!=="script"&&Jk(Lt,"data:")===0&&kl[V])){if(!(Bt&&!Wr(I,ac(Lt,H,"")))){if(Lt)return!1}}}}}}return!0},wl=le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tl=function(V){return!wl[Lu(V)]&&Wr(G,V)},ls=function(V){He(z.beforeSanitizeAttributes,V,null);const{attributes:vt}=V;if(!vt||xi(V))return;const Lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let ue=vt.length;for(;ue--;){const fe=vt[ue],{name:$e,namespaceURI:br,value:ir}=fe,pr=Qe($e),cs=ir;let Ke=$e==="value"?cs:SF(cs);if(Lt.attrName=pr,Lt.attrValue=Ke,Lt.keepAttr=!0,Lt.forceKeepAttr=void 0,He(z.uponSanitizeAttribute,V,Lt),Ke=Lt.attrValue,Pe&&(pr==="id"||pr==="name")&&Jk(Ke,Xr)!==0&&($i($e,V),Ke=Xr+Ke),Vt&&Wr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ke)){$i($e,V);continue}if(pr==="attributename"&&Kk(Ke,"href")){$i($e,V);continue}if(Lt.forceKeepAttr)continue;if(!Lt.keepAttr){$i($e,V);continue}if(!Yt&&Wr(/\/>/i,Ke)){$i($e,V);continue}qt&&nu([K,W,F],yo=>{Ke=ac(Ke,yo," ")});const hs=Qe(V.nodeName);if(!os(hs,pr,Ke)){$i($e,V);continue}if(E&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!br)switch(y.getAttributeType(hs,pr)){case"TrustedHTML":{Ke=E.createHTML(Ke);break}case"TrustedScriptURL":{Ke=E.createScriptURL(Ke);break}}if(Ke!==cs)try{br?V.setAttributeNS(br,$e,Ke):V.setAttribute($e,Ke),xi(V)?qr(V):Zk(e.removed)}catch{$i($e,V)}}He(z.afterSanitizeAttributes,V,null)},Pn=function(V){let vt=null;const Lt=mo(V);for(He(z.beforeSanitizeShadowDOM,V,null);vt=Lt.nextNode();)He(z.uponSanitizeShadowNode,vt,null),bn(vt),ls(vt),vt.content instanceof o&&Pn(vt.content);He(z.afterSanitizeShadowDOM,V,null)};return e.sanitize=function(It){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vt=null,Lt=null,ue=null,fe=null;if(fo=!It,fo&&(It="<!-->"),typeof It!="string"&&!Ze(It)&&(It=EF(It),typeof It!="string"))throw Kd("dirty is not a string, aborting");if(!e.isSupported)return It;if(Jt||go(V),e.removed=[],typeof It=="string"&&(jr=!1),jr){const ir=It.nodeName;if(typeof ir=="string"){const pr=Qe(ir);if(!P[pr]||kt[pr])throw Kd("root node is forbidden and cannot be sanitized in-place")}}else if(It instanceof h)vt=Zi("<!---->"),Lt=vt.ownerDocument.importNode(It,!0),Lt.nodeType===ou.element&&Lt.nodeName==="BODY"||Lt.nodeName==="HTML"?vt=Lt:vt.appendChild(Lt);else{if(!ar&&!qt&&!At&&It.indexOf("<")===-1)return E&&he?E.createHTML(It):It;if(vt=Zi(It),!vt)return ar?null:he?O:""}vt&&Ae&&qr(vt.firstChild);const $e=mo(jr?It:vt);for(;ue=$e.nextNode();)bn(ue),ls(ue),ue.content instanceof o&&Pn(ue.content);if(jr)return It;if(ar){if(qt){vt.normalize();let ir=vt.innerHTML;nu([K,W,F],pr=>{ir=ac(ir,pr," ")}),vt.innerHTML=ir}if(Rr)for(fe=N.call(vt.ownerDocument);vt.firstChild;)fe.appendChild(vt.firstChild);else fe=vt;return(nt.shadowroot||nt.shadowrootmode)&&(fe=$.call(n,fe,!0)),fe}let br=At?vt.outerHTML:vt.innerHTML;return At&&P["!doctype"]&&vt.ownerDocument&&vt.ownerDocument.doctype&&vt.ownerDocument.doctype.name&&Wr(yA,vt.ownerDocument.doctype.name)&&(br="<!DOCTYPE "+vt.ownerDocument.doctype.name+`>
|
|
106
|
+
`+br),qt&&nu([K,W,F],ir=>{br=ac(br,ir," ")}),E&&he?E.createHTML(br):br},e.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};go(It),Jt=!0},e.clearConfig=function(){Fi=null,Jt=!1},e.isValidAttribute=function(It,V,vt){Fi||go({});const Lt=Qe(It),ue=Qe(V);return os(Lt,ue,vt)},e.addHook=function(It,V){typeof V=="function"&&au(z[It],V)},e.removeHook=function(It,V){if(V!==void 0){const vt=_F(z[It],V);return vt===-1?void 0:kF(z[It],vt,1)[0]}return Zk(z[It])},e.removeHooks=function(It){z[It]=[]},e.removeAllHooks=function(){z=oS()},e}var Vc=xA(),bA=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Pu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,HF=/\s*%%.*\n/gm,Rc,vA=(Rc=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},A(Rc,"UnknownDiagramError"),Rc),cl={},v1=A(function(r,e){r=r.replace(bA,"").replace(Pu,"").replace(HF,`
|
|
107
|
+
`);for(const[i,{detector:n}]of Object.entries(cl))if(n(r,e))return i;throw new vA(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),$x=A((...r)=>{for(const{id:e,detector:i,loader:n}of r)CA(e,i,n)},"registerLazyLoadedDiagrams"),CA=A((r,e,i)=>{cl[r]&&_t.warn(`Detector with key ${r} already exists. Overwriting.`),cl[r]={detector:e,loader:i},_t.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),UF=A(r=>cl[r].loader,"getDiagramLoader"),zx=A((r,e,{depth:i=2,clobber:n=!1}={})=>{const a={depth:i,clobber:n};return Array.isArray(e)&&!Array.isArray(r)?(e.forEach(o=>zx(r,o,a)),r):Array.isArray(e)&&Array.isArray(r)?(e.forEach(o=>{r.includes(o)||r.push(o)}),r):r===void 0||i<=0?r!=null&&typeof r=="object"&&typeof e=="object"?Object.assign(r,e):e:(e!==void 0&&typeof r=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(r[o]===void 0||typeof r[o]=="object")?(r[o]===void 0&&(r[o]=Array.isArray(e[o])?[]:{}),r[o]=zx(r[o],e[o],{depth:i-1,clobber:n})):(n||typeof r[o]!="object"&&typeof e[o]!="object")&&(r[o]=e[o])}),r)},"assignWithDepth"),Lr=zx,ca="#ffffff",ha="#f2f2f2",ee=A((r,e)=>e?D(r,{s:-40,l:10}):D(r,{s:-40,l:-10}),"mkBorder"),jc,WF=(jc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var i,n,a,o,c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j,M;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(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?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(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||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=ft(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=ft(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||it(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||pt(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||ft(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||D(this.mainBkg,{h:180,s:-15,l:e*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||D(this.mainBkg,{h:180,s:-15,l:e*(8+N*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((i=this.radar)==null?void 0:i.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((p=this.radar)==null?void 0:p.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_=this.xyChart)==null?void 0:_.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((k=this.xyChart)==null?void 0:k.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((w=this.xyChart)==null?void 0:w.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((B=this.xyChart)==null?void 0:B.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((j=this.xyChart)==null?void 0:j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.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?ft(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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(jc,"Theme"),jc),YF=A(r=>{const e=new WF;return e.calculate(r),e},"getThemeVariables"),Dc,GF=(Dc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.lineColor=it(this.background),this.textColor=it(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(it("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ro(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=ro(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ro(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||pt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var e,i,n,a,o,c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j;this.secondBkg=pt(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=pt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=pt(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=it(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(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||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||it(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,s:-30,l:-(-7+M*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??pt(this["cScale"+M],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((j=this.radar)==null?void 0:j.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pt(this.secondaryColor,20),this.git1=pt(this.pie2||this.secondaryColor,20),this.git2=pt(this.pie3||this.tertiaryColor,20),this.git3=pt(this.pie4||D(this.primaryColor,{h:-30}),20),this.git4=pt(this.pie5||D(this.primaryColor,{h:-60}),20),this.git5=pt(this.pie6||D(this.primaryColor,{h:-90}),10),this.git6=pt(this.pie7||D(this.primaryColor,{h:60}),10),this.git7=pt(this.pie8||D(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||it(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||it(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||pt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Dc,"Theme"),Dc),VF=A(r=>{const e=new GF;return e.calculate(r),e},"getThemeVariables"),Fc,XF=(Fc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=D(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.lineColor=it(this.background),this.textColor=it(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ee(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=ro(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,i,n,a,o,c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||D(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,l:-(7+M*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||it(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||it(this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||pt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||pt(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||D(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-30}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||D(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((b=this.xyChart)==null?void 0:b.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((j=this.xyChart)==null?void 0:j.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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(it(this.git0),25),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||it(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||it(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Fc,"Theme"),Fc),QF=A(r=>{const e=new XF;return e.calculate(r),e},"getThemeVariables"),$c,ZF=($c=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=pt("#cde498",10),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.primaryColor),this.lineColor=it(this.background),this.textColor=it(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,i,n,a,o,c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j;this.actorBorder=ft(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||D(this["cScale"+M],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,s:-30,l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(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||D(this.primaryColor,{l:-30}),this.pie5=this.pie5||D(this.secondaryColor,{l:-30}),this.pie6=this.pie6||D(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((b=this.xyChart)==null?void 0:b.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((j=this.xyChart)==null?void 0:j.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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||it(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||it(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A($c,"Theme"),$c),KF=A(r=>{const e=new ZF;return e.calculate(r),e},"getThemeVariables"),zc,JF=(zc=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=pt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.lineColor=it(this.background),this.textColor=it(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||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var e,i,n,a,o,c,h,u,d,p,g,x,y,b,_,k,w,T,B,E,O,j;this.secondBkg=pt(this.contrast,55),this.border2=this.contrast,this.actorBorder=pt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||it(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=pt(this.contrast,30),this.sectionBkgColor2=pt(this.contrast,30),this.taskBorderColor=ft(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=pt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(this.secondaryColor,{h:128});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??this["cScale"+M];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((j=this.radar)==null?void 0:j.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||D(this.primaryColor,{h:-30}),this.git4=this.pie5||D(this.primaryColor,{h:-60}),this.git5=this.pie6||D(this.primaryColor,{h:-90}),this.git6=this.pie7||D(this.primaryColor,{h:60}),this.git7=this.pie8||D(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(zc,"Theme"),zc),t6=A(r=>{const e=new JF;return e.calculate(r),e},"getThemeVariables"),qc,e6=(qc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,c,h,u,d,p,g,x,y,b,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(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?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=D(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,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||e,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||D(e,{h:30}),this.cScale4=this.cScale4||D(e,{h:60}),this.cScale5=this.cScale5||D(e,{h:90}),this.cScale6=this.cScale6||D(e,{h:120}),this.cScale7=this.cScale7||D(e,{h:150}),this.cScale8=this.cScale8||D(e,{h:210,l:150}),this.cScale9=this.cScale9||D(e,{h:270}),this.cScale10=this.cScale10||D(e,{h:300}),this.cScale11=this.cScale11||D(e,{h:330}),this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=ft(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=ft(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||it(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||pt(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||ft(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(i,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(i,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(i,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((b=this.xyChart)==null?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(qc,"Theme"),qc),r6=A(r=>{const e=new e6;return e.calculate(r),e},"getThemeVariables"),Ic,i6=(Ic=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(it("#323D47"),10),this.border1="#ccc",this.border2=ro(255,255,255,.25),this.arrowheadColor=it(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var i,n,a,o,c,h,u,d,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||it(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?ft(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=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Ic,"Theme"),Ic),n6=A(r=>{const e=new i6;return e.calculate(r),e},"getThemeVariables"),Pc,a6=(Pc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,c,h,u,d,p,g,x,y,b,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(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?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=D(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,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 k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=this.mainBkg;if(this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=ft(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=ft(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||it(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||pt(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||ft(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(i,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(i,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(i,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((b=this.xyChart)==null?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Pc,"Theme"),Pc),s6=A(r=>{const e=new a6;return e.calculate(r),e},"getThemeVariables"),Hc,o6=(Hc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(it("#323D47"),10),this.border1="#ccc",this.border2=ro(255,255,255,.25),this.arrowheadColor=it(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var i,n,a,o,c,h,u,d,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||it(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?ft(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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Hc,"Theme"),Hc),l6=A(r=>{const e=new o6;return e.calculate(r),e},"getThemeVariables"),Uc,c6=(Uc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,c,h,u,d,p,g,x,y,b,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(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?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=D(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||it(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||pt(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||ft(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||D(this.mainBkg,{h:180,s:-15,l:a*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(i,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(i,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(i,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((b=this.xyChart)==null?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Uc,"Theme"),Uc),h6=A(r=>{const e=new c6;return e.calculate(r),e},"getThemeVariables"),Wc,u6=(Wc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=it(this.primaryColor),this.secondaryTextColor=it(this.secondaryColor),this.tertiaryTextColor=it(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(it("#323D47"),10),this.border1="#ccc",this.border2=ro(255,255,255,.25),this.arrowheadColor=it(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var i,n,a,o,c,h,u,d,p,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||it(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||it(this.tertiaryColor),this.lineColor=this.lineColor||it(this.background),this.arrowheadColor=this.arrowheadColor||it(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||it(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||it(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=ft(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Dn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?ft(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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||it(this.git0),this.gitInv1=this.gitInv1||it(this.git1),this.gitInv2=this.gitInv2||it(this.git2),this.gitInv3=this.gitInv3||it(this.git3),this.gitInv4=this.gitInv4||it(this.git4),this.gitInv5=this.gitInv5||it(this.git5),this.gitInv6=this.gitInv6||it(this.git6),this.gitInv7=this.gitInv7||it(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||ca,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ha}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},A(Wc,"Theme"),Wc),f6=A(r=>{const e=new u6;return e.calculate(r),e},"getThemeVariables"),Ga={base:{getThemeVariables:YF},dark:{getThemeVariables:VF},default:{getThemeVariables:QF},forest:{getThemeVariables:KF},neutral:{getThemeVariables:t6},neo:{getThemeVariables:r6},"neo-dark":{getThemeVariables:n6},redux:{getThemeVariables:s6},"redux-dark":{getThemeVariables:l6},"redux-color":{getThemeVariables:h6},"redux-dark-color":{getThemeVariables:f6}},Yi={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},_A={...Yi,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ga.default.getThemeVariables(),sequence:{...Yi.sequence,messageFont:A(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:A(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:A(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Yi.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yi.c4,useWidth:void 0,personFont:A(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yi.flowchart,inheritDir:!1},external_personFont:A(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:A(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:A(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:A(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:A(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:A(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:A(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:A(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:A(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:A(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:A(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:A(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:A(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:A(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:A(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:A(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:A(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:A(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:A(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:A(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:A(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yi.pie,useWidth:984},xyChart:{...Yi.xyChart,useWidth:void 0},requirement:{...Yi.requirement,useWidth:void 0},packet:{...Yi.packet},treeView:{...Yi.treeView,useWidth:void 0},radar:{...Yi.radar},ishikawa:{...Yi.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yi.venn}},kA=A((r,e="")=>Object.keys(r).reduce((i,n)=>Array.isArray(r[n])?i:typeof r[n]=="object"&&r[n]!==null?[...i,e+n,...kA(r[n],"")]:[...i,e+n],[]),"keyify"),d6=new Set(kA(_A,"")),SA=_A,Wp=A(r=>{if(_t.debug("sanitizeDirective called with",r),!(typeof r!="object"||r==null)){if(Array.isArray(r)){r.forEach(e=>Wp(e));return}for(const e of Object.keys(r)){if(_t.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!d6.has(e)||r[e]==null){_t.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]=="object"){_t.debug("sanitizing object",e),Wp(r[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const n of i)e.includes(n)&&(_t.debug("sanitizing css option",e),r[e]=p6(r[e]))}if(r.themeVariables)for(const e of Object.keys(r.themeVariables)){const i=r.themeVariables[e];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(r.themeVariables[e]="")}_t.debug("After sanitization",r)}},"sanitizeDirective"),p6=A(r=>{let e=0,i=0;for(const n of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":r},"sanitizeCss"),Xc=Object.freeze(SA),Ja=A(r=>!(r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())),"evaluate"),Oi=Lr({},Xc),Yp,hl=[],Hu=Lr({},Xc),$g=A((r,e)=>{let i=Lr({},r),n={};for(const a of e)BA(a),n=Lr(n,a);if(i=Lr(i,n),n.theme&&n.theme in Ga){const a=Lr({},Yp),o=Lr(a.themeVariables||{},n.themeVariables);i.theme&&i.theme in Ga&&(i.themeVariables=Ga[i.theme].getThemeVariables(o))}return Hu=i,EA(Hu),Hu},"updateCurrentConfig"),g6=A(r=>(Oi=Lr({},Xc),Oi=Lr(Oi,r),r.theme&&Ga[r.theme]&&(Oi.themeVariables=Ga[r.theme].getThemeVariables(r.themeVariables)),$g(Oi,hl),Oi),"setSiteConfig"),m6=A(r=>{Yp=Lr({},r)},"saveConfigFromInitialize"),y6=A(r=>(Oi=Lr(Oi,r),$g(Oi,hl),Oi),"updateSiteConfig"),wA=A(()=>Lr({},Oi),"getSiteConfig"),TA=A(r=>(EA(r),Lr(Hu,r),nr()),"setConfig"),nr=A(()=>Lr({},Hu),"getConfig"),BA=A(r=>{r&&(["secure",...Oi.secure??[]].forEach(e=>{Object.hasOwn(r,e)&&(_t.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e])}),Object.keys(r).forEach(e=>{e.startsWith("__")&&delete r[e]}),Object.keys(r).forEach(e=>{typeof r[e]=="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:"))&&delete r[e],typeof r[e]=="object"&&BA(r[e])}))},"sanitize"),x6=A(r=>{var e;Wp(r),r.fontFamily&&!((e=r.themeVariables)!=null&&e.fontFamily)&&(r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily}),hl.push(r),$g(Oi,hl)},"addDirective"),Gp=A((r=Oi)=>{hl=[],$g(r,hl)},"reset"),b6={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."},lS={},AA=A(r=>{lS[r]||(_t.warn(b6[r]),lS[r]=!0)},"issueWarning"),EA=A(r=>{r&&(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)&&AA("LAZY_LOAD_DEPRECATED")},"checkConfig"),Bet=A(()=>{let r={};Yp&&(r=Lr(r,Yp));for(const e of hl)r=Lr(r,e);return r},"getUserDefinedConfig"),gi=A(r=>{var e,i;return((e=r.flowchart)==null?void 0:e.htmlLabels)!=null&&AA("FLOWCHART_HTML_LABELS_DEPRECATED"),Ja(r.htmlLabels??((i=r.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),kf=/<br\s*\/?>/gi,v6=A(r=>r?OA(r).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),C6=(()=>{let r=!1;return()=>{r||(MA(),r=!0)}})();function MA(){const r="data-temp-href-target";Vc.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(r,e.getAttribute("target")??"")}),Vc.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(r)&&(e.setAttribute("target",e.getAttribute(r)??""),e.removeAttribute(r),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}A(MA,"setupDompurifyHooks");var LA=A(r=>(C6(),Vc.sanitize(r)),"removeScript"),cS=A((r,e)=>{if(gi(e)){const i=e.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?r=LA(r):i!=="loose"&&(r=OA(r),r=r.replace(/</g,"<").replace(/>/g,">"),r=r.replace(/=/g,"="),r=w6(r))}return r},"sanitizeMore"),Rn=A((r,e)=>r&&(e.dompurifyConfig?r=Vc.sanitize(cS(r,e),e.dompurifyConfig).toString():r=Vc.sanitize(cS(r,e),{FORBID_TAGS:["style"]}).toString(),r),"sanitizeText"),_6=A((r,e)=>typeof r=="string"?Rn(r,e):r.flat().map(i=>Rn(i,e)),"sanitizeTextOrArray"),k6=A(r=>kf.test(r),"hasBreaks"),S6=A(r=>r.split(kf),"splitBreaks"),w6=A(r=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),OA=A(r=>r.replace(kf,"#br#"),"breakToPlaceholder"),T6=A(r=>{let e="";return r&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),B6=A(function(...r){const e=r.filter(i=>!isNaN(i));return Math.max(...e)},"getMax"),A6=A(function(...r){const e=r.filter(i=>!isNaN(i));return Math.min(...e)},"getMin"),hS=A(function(r){const e=r.split(/(,)/),i=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];E6(o,c)&&(a=o+","+c,n++,i.pop())}i.push(M6(a))}return i.join("")},"parseGenericTypes"),qx=A((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),E6=A((r,e)=>{const i=qx(r,"~"),n=qx(e,"~");return i===1&&n===1},"shouldCombineSets"),M6=A(r=>{const e=qx(r,"~");let i=!1;if(e<=1)return r;e%2!==0&&r.startsWith("~")&&(r=r.substring(1),i=!0);const n=[...r];let a=n.indexOf("~"),o=n.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)n[a]="<",n[o]=">",a=n.indexOf("~"),o=n.lastIndexOf("~");return i&&n.unshift("~"),n.join("")},"processSet"),uS=A(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ix=/\$\$(.*)\$\$/g,Ju=A(r=>{var e;return(((e=r.match(Ix))==null?void 0:e.length)??0)>0},"hasKatex"),Aet=A(async(r,e)=>{const i=document.createElement("div");i.innerHTML=await NA(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",i);const a={width:i.clientWidth,height:i.clientHeight};return i.remove(),a},"calculateMathMLDimensions"),L6=A(async(r,e)=>{if(!Ju(r))return r;if(!(uS()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Ix,"MathML is unsupported in this environment.");{const{default:i}=await Ce(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!uS()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(kf).map(a=>Ju(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ix,(a,o)=>i.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),NA=A(async(r,e)=>Rn(await L6(r,e),e),"renderKatexSanitized"),Sf={getRows:v6,sanitizeText:Rn,sanitizeTextOrArray:_6,hasBreaks:k6,splitBreaks:S6,lineBreakRegex:kf,removeScript:LA,getUrl:T6,evaluate:Ja,getMax:B6,getMin:A6},O6=A(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),N6=A(function(r,e,i){let n=new Map;return i?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",r),n.set("width",e)),n},"calculateSvgSizeAttrs"),RA=A(function(r,e,i,n){const a=N6(e,i,n);O6(r,a)},"configureSvgSize"),R6=A(function(r,e,i,n){const a=e.node().getBBox(),o=a.width,c=a.height;_t.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;_t.info(`Graph bounds: ${h}x${u}`,r),h=o+i*2,u=c+i*2,_t.info(`Calculated bounds: ${h}x${u}`),RA(e,u,h,n);const d=`${a.x-i} ${a.y-i} ${a.width+2*i} ${a.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),wp={},j6=A((r,e,i,n)=>{let a="";return r in wp&&wp[r]?a=wp[r]({...i,svgId:n}):_t.warn(`No theme found for ${r}`),` & {
|
|
108
|
+
font-family: ${i.fontFamily};
|
|
109
|
+
font-size: ${i.fontSize};
|
|
110
|
+
fill: ${i.textColor}
|
|
111
|
+
}
|
|
112
|
+
@keyframes edge-animation-frame {
|
|
113
|
+
from {
|
|
114
|
+
stroke-dashoffset: 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
@keyframes dash {
|
|
118
|
+
to {
|
|
119
|
+
stroke-dashoffset: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
& .edge-animation-slow {
|
|
123
|
+
stroke-dasharray: 9,5 !important;
|
|
124
|
+
stroke-dashoffset: 900;
|
|
125
|
+
animation: dash 50s linear infinite;
|
|
126
|
+
stroke-linecap: round;
|
|
127
|
+
}
|
|
128
|
+
& .edge-animation-fast {
|
|
129
|
+
stroke-dasharray: 9,5 !important;
|
|
130
|
+
stroke-dashoffset: 900;
|
|
131
|
+
animation: dash 20s linear infinite;
|
|
132
|
+
stroke-linecap: round;
|
|
133
|
+
}
|
|
134
|
+
/* Classes common for multiple diagrams */
|
|
135
|
+
|
|
136
|
+
& .error-icon {
|
|
137
|
+
fill: ${i.errorBkgColor};
|
|
138
|
+
}
|
|
139
|
+
& .error-text {
|
|
140
|
+
fill: ${i.errorTextColor};
|
|
141
|
+
stroke: ${i.errorTextColor};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
& .edge-thickness-normal {
|
|
145
|
+
stroke-width: ${i.strokeWidth??1}px;
|
|
146
|
+
}
|
|
147
|
+
& .edge-thickness-thick {
|
|
148
|
+
stroke-width: 3.5px
|
|
149
|
+
}
|
|
150
|
+
& .edge-pattern-solid {
|
|
151
|
+
stroke-dasharray: 0;
|
|
152
|
+
}
|
|
153
|
+
& .edge-thickness-invisible {
|
|
154
|
+
stroke-width: 0;
|
|
155
|
+
fill: none;
|
|
156
|
+
}
|
|
157
|
+
& .edge-pattern-dashed{
|
|
158
|
+
stroke-dasharray: 3;
|
|
159
|
+
}
|
|
160
|
+
.edge-pattern-dotted {
|
|
161
|
+
stroke-dasharray: 2;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
& .marker {
|
|
165
|
+
fill: ${i.lineColor};
|
|
166
|
+
stroke: ${i.lineColor};
|
|
167
|
+
}
|
|
168
|
+
& .marker.cross {
|
|
169
|
+
stroke: ${i.lineColor};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
& svg {
|
|
173
|
+
font-family: ${i.fontFamily};
|
|
174
|
+
font-size: ${i.fontSize};
|
|
175
|
+
}
|
|
176
|
+
& p {
|
|
177
|
+
margin: 0
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
${a}
|
|
181
|
+
.node .neo-node {
|
|
182
|
+
stroke: ${i.nodeBorder};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
186
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
187
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
[data-look="neo"].node path {
|
|
192
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
193
|
+
stroke-width: ${i.strokeWidth??1}px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[data-look="neo"].node .outer-path {
|
|
197
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-look="neo"].node .neo-line path {
|
|
201
|
+
stroke: ${i.nodeBorder};
|
|
202
|
+
filter: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
[data-look="neo"].node circle{
|
|
206
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
207
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-look="neo"].node circle .state-start{
|
|
211
|
+
fill: #000000;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
[data-look="neo"].icon-shape .icon {
|
|
215
|
+
fill: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
216
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
220
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
221
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
${e}
|
|
225
|
+
`},"getStyles"),D6=A((r,e)=>{e!==void 0&&(wp[r]=e)},"addStylesForDiagram"),F6=j6,jA={};uF(jA,{clear:()=>$6,getAccDescription:()=>P6,getAccTitle:()=>q6,getDiagramTitle:()=>U6,setAccDescription:()=>I6,setAccTitle:()=>z6,setDiagramTitle:()=>H6});var C1="",_1="",k1="",S1=A(r=>Rn(r,nr()),"sanitizeText"),$6=A(()=>{C1="",k1="",_1=""},"clear"),z6=A(r=>{C1=S1(r).replace(/^\s+/g,"")},"setAccTitle"),q6=A(()=>C1,"getAccTitle"),I6=A(r=>{k1=S1(r).replace(/\n\s+/g,`
|
|
226
|
+
`)},"setAccDescription"),P6=A(()=>k1,"getAccDescription"),H6=A(r=>{_1=S1(r)},"setDiagramTitle"),U6=A(()=>_1,"getDiagramTitle"),fS=_t,W6=b1,we=nr,Eet=TA,Met=Xc,w1=A(r=>Rn(r,we()),"sanitizeText"),Y6=R6,G6=A(()=>jA,"getCommonDb"),Vp={},Xp=A((r,e,i)=>{var n;Vp[r]&&fS.warn(`Diagram with id ${r} already registered. Overwriting.`),Vp[r]=e,i&&CA(r,i),D6(r,e.styles),(n=e.injectUtils)==null||n.call(e,fS,W6,we,w1,Y6,G6(),()=>{})},"registerDiagram"),Px=A(r=>{if(r in Vp)return Vp[r];throw new V6(r)},"getDiagram"),Yc,V6=(Yc=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},A(Yc,"DiagramNotFoundError"),Yc);class dS extends Map{constructor(e,i=Z6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(pS(this,e))}has(e){return super.has(pS(this,e))}set(e,i){return super.set(X6(this,e),i)}delete(e){return super.delete(Q6(this,e))}}function pS({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):i}function X6({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):(r.set(n,i),i)}function Q6({_intern:r,_key:e},i){const n=e(i);return r.has(n)&&(i=r.get(n),r.delete(n)),i}function Z6(r){return r!==null&&typeof r=="object"?r.valueOf():r}function gS(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i<n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function mS(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i>n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function K6(r,e){let i=0;for(let n of r)(n=+n)&&(i+=n);return i}var J6={value:()=>{}};function wf(){for(var r=0,e=arguments.length,i={},n;r<e;++r){if(!(n=arguments[r]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new Tp(i)}function Tp(r){this._=r}function t8(r,e){return r.trim().split(/^|\s+/).map(function(i){var n="",a=i.indexOf(".");if(a>=0&&(n=i.slice(a+1),i=i.slice(0,a)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}Tp.prototype=wf.prototype={constructor:Tp,on:function(r,e){var i=this._,n=t8(r+"",i),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(r=n[o]).type)&&(a=e8(i[a],r.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(r=n[o]).type)i[a]=yS(i[a],r.name,e);else if(e==null)for(a in i)i[a]=yS(i[a],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Tp(r)},call:function(r,e){if((a=arguments.length-2)>0)for(var i=new Array(a),n=0,a,o;n<a;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(o=this._[r],n=0,a=o.length;n<a;++n)o[n].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],a=0,o=n.length;a<o;++a)n[a].value.apply(e,i)}};function e8(r,e){for(var i=0,n=r.length,a;i<n;++i)if((a=r[i]).name===e)return a.value}function yS(r,e,i){for(var n=0,a=r.length;n<a;++n)if(r[n].name===e){r[n]=J6,r=r.slice(0,n).concat(r.slice(n+1));break}return i!=null&&r.push({name:e,value:i}),r}var Hx="http://www.w3.org/1999/xhtml";const xS={svg:"http://www.w3.org/2000/svg",xhtml:Hx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zg(r){var e=r+="",i=e.indexOf(":");return i>=0&&(e=r.slice(0,i))!=="xmlns"&&(r=r.slice(i+1)),xS.hasOwnProperty(e)?{space:xS[e],local:r}:r}function r8(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Hx&&e.documentElement.namespaceURI===Hx?e.createElement(r):e.createElementNS(i,r)}}function i8(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function DA(r){var e=zg(r);return(e.local?i8:r8)(e)}function n8(){}function T1(r){return r==null?n8:function(){return this.querySelector(r)}}function a8(r){typeof r!="function"&&(r=T1(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=new Array(c),u,d,p=0;p<c;++p)(u=o[p])&&(d=r.call(u,u.__data__,p,o))&&("__data__"in u&&(d.__data__=u.__data__),h[p]=d);return new Qi(n,this._parents)}function s8(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function o8(){return[]}function FA(r){return r==null?o8:function(){return this.querySelectorAll(r)}}function l8(r){return function(){return s8(r.apply(this,arguments))}}function c8(r){typeof r=="function"?r=l8(r):r=FA(r);for(var e=this._groups,i=e.length,n=[],a=[],o=0;o<i;++o)for(var c=e[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&(n.push(r.call(u,u.__data__,d,c)),a.push(u));return new Qi(n,a)}function $A(r){return function(){return this.matches(r)}}function zA(r){return function(e){return e.matches(r)}}var h8=Array.prototype.find;function u8(r){return function(){return h8.call(this.children,r)}}function f8(){return this.firstElementChild}function d8(r){return this.select(r==null?f8:u8(typeof r=="function"?r:zA(r)))}var p8=Array.prototype.filter;function g8(){return Array.from(this.children)}function m8(r){return function(){return p8.call(this.children,r)}}function y8(r){return this.selectAll(r==null?g8:m8(typeof r=="function"?r:zA(r)))}function x8(r){typeof r!="function"&&(r=$A(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new Qi(n,this._parents)}function qA(r){return new Array(r.length)}function b8(){return new Qi(this._enter||this._groups.map(qA),this._parents)}function Qp(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Qp.prototype={constructor:Qp,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 v8(r){return function(){return r}}function C8(r,e,i,n,a,o){for(var c=0,h,u=e.length,d=o.length;c<d;++c)(h=e[c])?(h.__data__=o[c],n[c]=h):i[c]=new Qp(r,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function _8(r,e,i,n,a,o,c){var h,u,d=new Map,p=e.length,g=o.length,x=new Array(p),y;for(h=0;h<p;++h)(u=e[h])&&(x[h]=y=c.call(u,u.__data__,h,e)+"",d.has(y)?a[h]=u:d.set(y,u));for(h=0;h<g;++h)y=c.call(r,o[h],h,o)+"",(u=d.get(y))?(n[h]=u,u.__data__=o[h],d.delete(y)):i[h]=new Qp(r,o[h]);for(h=0;h<p;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function k8(r){return r.__data__}function S8(r,e){if(!arguments.length)return Array.from(this,k8);var i=e?_8:C8,n=this._parents,a=this._groups;typeof r!="function"&&(r=v8(r));for(var o=a.length,c=new Array(o),h=new Array(o),u=new Array(o),d=0;d<o;++d){var p=n[d],g=a[d],x=g.length,y=w8(r.call(p,p&&p.__data__,d,n)),b=y.length,_=h[d]=new Array(b),k=c[d]=new Array(b),w=u[d]=new Array(x);i(p,g,_,k,w,y,e);for(var T=0,B=0,E,O;T<b;++T)if(E=_[T]){for(T>=B&&(B=T+1);!(O=k[B])&&++B<b;);E._next=O||null}}return c=new Qi(c,n),c._enter=h,c._exit=u,c}function w8(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function T8(){return new Qi(this._exit||this._groups.map(qA),this._parents)}function B8(r,e,i){var n=this.enter(),a=this,o=this.exit();return typeof r=="function"?(n=r(n),n&&(n=n.selection())):n=n.append(r+""),e!=null&&(a=e(a),a&&(a=a.selection())),i==null?o.remove():i(o),n&&a?n.merge(a).order():a}function A8(r){for(var e=r.selection?r.selection():r,i=this._groups,n=e._groups,a=i.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var d=i[u],p=n[u],g=d.length,x=h[u]=new Array(g),y,b=0;b<g;++b)(y=d[b]||p[b])&&(x[b]=y);for(;u<a;++u)h[u]=i[u];return new Qi(h,this._parents)}function E8(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var n=r[e],a=n.length-1,o=n[a],c;--a>=0;)(c=n[a])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function M8(r){r||(r=L8);function e(g,x){return g&&x?r(g.__data__,x.__data__):!g-!x}for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o){for(var c=i[o],h=c.length,u=a[o]=new Array(h),d,p=0;p<h;++p)(d=c[p])&&(u[p]=d);u.sort(e)}return new Qi(a,this._parents).order()}function L8(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function O8(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function N8(){return Array.from(this)}function R8(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function j8(){let r=0;for(const e of this)++r;return r}function D8(){return!this.node()}function F8(r){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var a=e[i],o=0,c=a.length,h;o<c;++o)(h=a[o])&&r.call(h,h.__data__,o,a);return this}function $8(r){return function(){this.removeAttribute(r)}}function z8(r){return function(){this.removeAttributeNS(r.space,r.local)}}function q8(r,e){return function(){this.setAttribute(r,e)}}function I8(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function P8(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttribute(r):this.setAttribute(r,i)}}function H8(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttributeNS(r.space,r.local):this.setAttributeNS(r.space,r.local,i)}}function U8(r,e){var i=zg(r);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((e==null?i.local?z8:$8:typeof e=="function"?i.local?H8:P8:i.local?I8:q8)(i,e))}function IA(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function W8(r){return function(){this.style.removeProperty(r)}}function Y8(r,e,i){return function(){this.style.setProperty(r,e,i)}}function G8(r,e,i){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(r):this.style.setProperty(r,n,i)}}function V8(r,e,i){return arguments.length>1?this.each((e==null?W8:typeof e=="function"?G8:Y8)(r,e,i??"")):Qc(this.node(),r)}function Qc(r,e){return r.style.getPropertyValue(e)||IA(r).getComputedStyle(r,null).getPropertyValue(e)}function X8(r){return function(){delete this[r]}}function Q8(r,e){return function(){this[r]=e}}function Z8(r,e){return function(){var i=e.apply(this,arguments);i==null?delete this[r]:this[r]=i}}function K8(r,e){return arguments.length>1?this.each((e==null?X8:typeof e=="function"?Z8:Q8)(r,e)):this.node()[r]}function PA(r){return r.trim().split(/^|\s+/)}function B1(r){return r.classList||new HA(r)}function HA(r){this._node=r,this._names=PA(r.getAttribute("class")||"")}HA.prototype={add:function(r){var e=this._names.indexOf(r);e<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var e=this._names.indexOf(r);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function UA(r,e){for(var i=B1(r),n=-1,a=e.length;++n<a;)i.add(e[n])}function WA(r,e){for(var i=B1(r),n=-1,a=e.length;++n<a;)i.remove(e[n])}function J8(r){return function(){UA(this,r)}}function t$(r){return function(){WA(this,r)}}function e$(r,e){return function(){(e.apply(this,arguments)?UA:WA)(this,r)}}function r$(r,e){var i=PA(r+"");if(arguments.length<2){for(var n=B1(this.node()),a=-1,o=i.length;++a<o;)if(!n.contains(i[a]))return!1;return!0}return this.each((typeof e=="function"?e$:e?J8:t$)(i,e))}function i$(){this.textContent=""}function n$(r){return function(){this.textContent=r}}function a$(r){return function(){var e=r.apply(this,arguments);this.textContent=e??""}}function s$(r){return arguments.length?this.each(r==null?i$:(typeof r=="function"?a$:n$)(r)):this.node().textContent}function o$(){this.innerHTML=""}function l$(r){return function(){this.innerHTML=r}}function c$(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e??""}}function h$(r){return arguments.length?this.each(r==null?o$:(typeof r=="function"?c$:l$)(r)):this.node().innerHTML}function u$(){this.nextSibling&&this.parentNode.appendChild(this)}function f$(){return this.each(u$)}function d$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function p$(){return this.each(d$)}function g$(r){var e=typeof r=="function"?r:DA(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function m$(){return null}function y$(r,e){var i=typeof r=="function"?r:DA(r),n=e==null?m$:typeof e=="function"?e:T1(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})}function x$(){var r=this.parentNode;r&&r.removeChild(this)}function b$(){return this.each(x$)}function v$(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function C$(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function _$(r){return this.select(r?C$:v$)}function k$(r){return arguments.length?this.property("__data__",r):this.node().__data__}function S$(r){return function(e){r.call(this,e,this.__data__)}}function w$(r){return r.trim().split(/^|\s+/).map(function(e){var i="",n=e.indexOf(".");return n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),{type:e,name:i}})}function T$(r){return function(){var e=this.__on;if(e){for(var i=0,n=-1,a=e.length,o;i<a;++i)o=e[i],(!r.type||o.type===r.type)&&o.name===r.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function B$(r,e,i){return function(){var n=this.__on,a,o=S$(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===r.type&&a.name===r.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=i),a.value=e;return}}this.addEventListener(r.type,o,i),a={type:r.type,name:r.name,value:e,listener:o,options:i},n?n.push(a):this.__on=[a]}}function A$(r,e,i){var n=w$(r+""),a,o=n.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,d=h.length,p;u<d;++u)for(a=0,p=h[u];a<o;++a)if((c=n[a]).type===p.type&&c.name===p.name)return p.value}return}for(h=e?B$:T$,a=0;a<o;++a)this.each(h(n[a],e,i));return this}function YA(r,e,i){var n=IA(r),a=n.CustomEvent;typeof a=="function"?a=new a(e,i):(a=n.document.createEvent("Event"),i?(a.initEvent(e,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(e,!1,!1)),r.dispatchEvent(a)}function E$(r,e){return function(){return YA(this,r,e)}}function M$(r,e){return function(){return YA(this,r,e.apply(this,arguments))}}function L$(r,e){return this.each((typeof e=="function"?M$:E$)(r,e))}function*O$(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var GA=[null];function Qi(r,e){this._groups=r,this._parents=e}function Tf(){return new Qi([[document.documentElement]],GA)}function N$(){return this}Qi.prototype=Tf.prototype={constructor:Qi,select:a8,selectAll:c8,selectChild:d8,selectChildren:y8,filter:x8,data:S8,enter:b8,exit:T8,join:B8,merge:A8,selection:N$,order:E8,sort:M8,call:O8,nodes:N8,node:R8,size:j8,empty:D8,each:F8,attr:U8,style:V8,property:K8,classed:r$,text:s$,html:h$,raise:f$,lower:p$,append:g$,insert:y$,remove:b$,clone:_$,datum:k$,on:A$,dispatch:L$,[Symbol.iterator]:O$};function Xt(r){return typeof r=="string"?new Qi([[document.querySelector(r)]],[document.documentElement]):new Qi([[r]],GA)}function R$(r){let e;for(;e=r.sourceEvent;)r=e;return r}function Kn(r,e){if(r=R$(r),e===void 0&&(e=r.currentTarget),e){var i=e.ownerSVGElement||e;if(i.createSVGPoint){var n=i.createSVGPoint();return n.x=r.clientX,n.y=r.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[r.clientX-a.left-e.clientLeft,r.clientY-a.top-e.clientTop]}}return[r.pageX,r.pageY]}const j$={passive:!1},tf={capture:!0,passive:!1};function E0(r){r.stopImmediatePropagation()}function bc(r){r.preventDefault(),r.stopImmediatePropagation()}function VA(r){var e=r.document.documentElement,i=Xt(r).on("dragstart.drag",bc,tf);"onselectstart"in e?i.on("selectstart.drag",bc,tf):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function XA(r,e){var i=r.document.documentElement,n=Xt(r).on("dragstart.drag",null);e&&(n.on("click.drag",bc,tf),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in i?n.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const tp=r=>()=>r;function Ux(r,{sourceEvent:e,subject:i,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:d,dispatch:p}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:p}})}Ux.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function D$(r){return!r.ctrlKey&&!r.button}function F$(){return this.parentNode}function $$(r,e){return e??{x:r.x,y:r.y}}function z$(){return navigator.maxTouchPoints||"ontouchstart"in this}function q$(){var r=D$,e=F$,i=$$,n=z$,a={},o=wf("start","drag","end"),c=0,h,u,d,p,g=0;function x(E){E.on("mousedown.drag",y).filter(n).on("touchstart.drag",k).on("touchmove.drag",w,j$).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(E,O){if(!(p||!r.call(this,E,O))){var j=B(this,e.call(this,E,O),E,O,"mouse");j&&(Xt(E.view).on("mousemove.drag",b,tf).on("mouseup.drag",_,tf),VA(E.view),E0(E),d=!1,h=E.clientX,u=E.clientY,j("start",E))}}function b(E){if(bc(E),!d){var O=E.clientX-h,j=E.clientY-u;d=O*O+j*j>g}a.mouse("drag",E)}function _(E){Xt(E.view).on("mousemove.drag mouseup.drag",null),XA(E.view,d),bc(E),a.mouse("end",E)}function k(E,O){if(r.call(this,E,O)){var j=E.changedTouches,M=e.call(this,E,O),N=j.length,Y,$;for(Y=0;Y<N;++Y)($=B(this,M,E,O,j[Y].identifier,j[Y]))&&(E0(E),$("start",E,j[Y]))}}function w(E){var O=E.changedTouches,j=O.length,M,N;for(M=0;M<j;++M)(N=a[O[M].identifier])&&(bc(E),N("drag",E,O[M]))}function T(E){var O=E.changedTouches,j=O.length,M,N;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),M=0;M<j;++M)(N=a[O[M].identifier])&&(E0(E),N("end",E,O[M]))}function B(E,O,j,M,N,Y){var $=o.copy(),z=Kn(Y||j,O),K,W,F;if((F=i.call(E,new Ux("beforestart",{sourceEvent:j,target:x,identifier:N,active:c,x:z[0],y:z[1],dx:0,dy:0,dispatch:$}),M))!=null)return K=F.x-z[0]||0,W=F.y-z[1]||0,function U(R,I,H){var G=z,Z;switch(R){case"start":a[N]=U,Z=c++;break;case"end":delete a[N],--c;case"drag":z=Kn(H||I,O),Z=c;break}$.call(R,E,new Ux(R,{sourceEvent:I,subject:F,target:x,identifier:N,active:Z,x:z[0]+K,y:z[1]+W,dx:z[0]-G[0],dy:z[1]-G[1],dispatch:$}),M)}}return x.filter=function(E){return arguments.length?(r=typeof E=="function"?E:tp(!!E),x):r},x.container=function(E){return arguments.length?(e=typeof E=="function"?E:tp(E),x):e},x.subject=function(E){return arguments.length?(i=typeof E=="function"?E:tp(E),x):i},x.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:tp(!!E),x):n},x.on=function(){var E=o.on.apply(o,arguments);return E===o?x:E},x.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,x):Math.sqrt(g)},x}function A1(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function QA(r,e){var i=Object.create(r.prototype);for(var n in e)i[n]=e[n];return i}function Bf(){}var ef=.7,Zp=1/ef,vc="\\s*([+-]?\\d+)\\s*",rf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",na="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",I$=/^#([0-9a-f]{3,8})$/,P$=new RegExp(`^rgb\\(${vc},${vc},${vc}\\)$`),H$=new RegExp(`^rgb\\(${na},${na},${na}\\)$`),U$=new RegExp(`^rgba\\(${vc},${vc},${vc},${rf}\\)$`),W$=new RegExp(`^rgba\\(${na},${na},${na},${rf}\\)$`),Y$=new RegExp(`^hsl\\(${rf},${na},${na}\\)$`),G$=new RegExp(`^hsla\\(${rf},${na},${na},${rf}\\)$`),bS={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};A1(Bf,nf,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:vS,formatHex:vS,formatHex8:V$,formatHsl:X$,formatRgb:CS,toString:CS});function vS(){return this.rgb().formatHex()}function V$(){return this.rgb().formatHex8()}function X$(){return ZA(this).formatHsl()}function CS(){return this.rgb().formatRgb()}function nf(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=I$.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?_S(e):i===3?new Ri(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?ep(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?ep(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=P$.exec(r))?new Ri(e[1],e[2],e[3],1):(e=H$.exec(r))?new Ri(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=U$.exec(r))?ep(e[1],e[2],e[3],e[4]):(e=W$.exec(r))?ep(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Y$.exec(r))?wS(e[1],e[2]/100,e[3]/100,1):(e=G$.exec(r))?wS(e[1],e[2]/100,e[3]/100,e[4]):bS.hasOwnProperty(r)?_S(bS[r]):r==="transparent"?new Ri(NaN,NaN,NaN,0):null}function _S(r){return new Ri(r>>16&255,r>>8&255,r&255,1)}function ep(r,e,i,n){return n<=0&&(r=e=i=NaN),new Ri(r,e,i,n)}function Q$(r){return r instanceof Bf||(r=nf(r)),r?(r=r.rgb(),new Ri(r.r,r.g,r.b,r.opacity)):new Ri}function Wx(r,e,i,n){return arguments.length===1?Q$(r):new Ri(r,e,i,n??1)}function Ri(r,e,i,n){this.r=+r,this.g=+e,this.b=+i,this.opacity=+n}A1(Ri,Wx,QA(Bf,{brighter(r){return r=r==null?Zp:Math.pow(Zp,r),new Ri(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?ef:Math.pow(ef,r),new Ri(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Ri(il(this.r),il(this.g),il(this.b),Kp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kS,formatHex:kS,formatHex8:Z$,formatRgb:SS,toString:SS}));function kS(){return`#${Wo(this.r)}${Wo(this.g)}${Wo(this.b)}`}function Z$(){return`#${Wo(this.r)}${Wo(this.g)}${Wo(this.b)}${Wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){const r=Kp(this.opacity);return`${r===1?"rgb(":"rgba("}${il(this.r)}, ${il(this.g)}, ${il(this.b)}${r===1?")":`, ${r})`}`}function Kp(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function il(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Wo(r){return r=il(r),(r<16?"0":"")+r.toString(16)}function wS(r,e,i,n){return n<=0?r=e=i=NaN:i<=0||i>=1?r=e=NaN:e<=0&&(r=NaN),new En(r,e,i,n)}function ZA(r){if(r instanceof En)return new En(r.h,r.s,r.l,r.opacity);if(r instanceof Bf||(r=nf(r)),!r)return new En;if(r instanceof En)return r;r=r.rgb();var e=r.r/255,i=r.g/255,n=r.b/255,a=Math.min(e,i,n),o=Math.max(e,i,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(i-n)/h+(i<n)*6:i===o?c=(n-e)/h+2:c=(e-i)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new En(c,h,u,r.opacity)}function K$(r,e,i,n){return arguments.length===1?ZA(r):new En(r,e,i,n??1)}function En(r,e,i,n){this.h=+r,this.s=+e,this.l=+i,this.opacity=+n}A1(En,K$,QA(Bf,{brighter(r){return r=r==null?Zp:Math.pow(Zp,r),new En(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?ef:Math.pow(ef,r),new En(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,n=i+(i<.5?i:1-i)*e,a=2*i-n;return new Ri(M0(r>=240?r-240:r+120,a,n),M0(r,a,n),M0(r<120?r+240:r-120,a,n),this.opacity)},clamp(){return new En(TS(this.h),rp(this.s),rp(this.l),Kp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Kp(this.opacity);return`${r===1?"hsl(":"hsla("}${TS(this.h)}, ${rp(this.s)*100}%, ${rp(this.l)*100}%${r===1?")":`, ${r})`}`}}));function TS(r){return r=(r||0)%360,r<0?r+360:r}function rp(r){return Math.max(0,Math.min(1,r||0))}function M0(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}const E1=r=>()=>r;function KA(r,e){return function(i){return r+i*e}}function J$(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(n){return Math.pow(r+n*e,i)}}function Let(r,e){var i=e-r;return i?KA(r,i>180||i<-180?i-360*Math.round(i/360):i):E1(isNaN(r)?e:r)}function tz(r){return(r=+r)==1?JA:function(e,i){return i-e?J$(e,i,r):E1(isNaN(e)?i:e)}}function JA(r,e){var i=e-r;return i?KA(r,i):E1(isNaN(r)?e:r)}const BS=(function r(e){var i=tz(e);function n(a,o){var c=i((a=Wx(a)).r,(o=Wx(o)).r),h=i(a.g,o.g),u=i(a.b,o.b),d=JA(a.opacity,o.opacity);return function(p){return a.r=c(p),a.g=h(p),a.b=u(p),a.opacity=d(p),a+""}}return n.gamma=r,n})(1);function Is(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Yx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L0=new RegExp(Yx.source,"g");function ez(r){return function(){return r}}function rz(r){return function(e){return r(e)+""}}function iz(r,e){var i=Yx.lastIndex=L0.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(r=r+"",e=e+"";(n=Yx.exec(r))&&(a=L0.exec(e));)(o=a.index)>i&&(o=e.slice(i,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:Is(n,a)})),i=L0.lastIndex;return i<e.length&&(o=e.slice(i),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?rz(u[0].x):ez(e):(e=u.length,function(d){for(var p=0,g;p<e;++p)h[(g=u[p]).i]=g.x(d);return h.join("")})}var AS=180/Math.PI,Gx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tE(r,e,i,n,a,o){var c,h,u;return(c=Math.sqrt(r*r+e*e))&&(r/=c,e/=c),(u=r*i+e*n)&&(i-=r*u,n-=e*u),(h=Math.sqrt(i*i+n*n))&&(i/=h,n/=h,u/=h),r*n<e*i&&(r=-r,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,r)*AS,skewX:Math.atan(u)*AS,scaleX:c,scaleY:h}}var ip;function nz(r){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Gx:tE(e.a,e.b,e.c,e.d,e.e,e.f)}function az(r){return r==null||(ip||(ip=document.createElementNS("http://www.w3.org/2000/svg","g")),ip.setAttribute("transform",r),!(r=ip.transform.baseVal.consolidate()))?Gx:(r=r.matrix,tE(r.a,r.b,r.c,r.d,r.e,r.f))}function eE(r,e,i,n){function a(d){return d.length?d.pop()+" ":""}function o(d,p,g,x,y,b){if(d!==g||p!==x){var _=y.push("translate(",null,e,null,i);b.push({i:_-4,x:Is(d,g)},{i:_-2,x:Is(p,x)})}else(g||x)&&y.push("translate("+g+e+x+i)}function c(d,p,g,x){d!==p?(d-p>180?p+=360:p-d>180&&(d+=360),x.push({i:g.push(a(g)+"rotate(",null,n)-2,x:Is(d,p)})):p&&g.push(a(g)+"rotate("+p+n)}function h(d,p,g,x){d!==p?x.push({i:g.push(a(g)+"skewX(",null,n)-2,x:Is(d,p)}):p&&g.push(a(g)+"skewX("+p+n)}function u(d,p,g,x,y,b){if(d!==g||p!==x){var _=y.push(a(y)+"scale(",null,",",null,")");b.push({i:_-4,x:Is(d,g)},{i:_-2,x:Is(p,x)})}else(g!==1||x!==1)&&y.push(a(y)+"scale("+g+","+x+")")}return function(d,p){var g=[],x=[];return d=r(d),p=r(p),o(d.translateX,d.translateY,p.translateX,p.translateY,g,x),c(d.rotate,p.rotate,g,x),h(d.skewX,p.skewX,g,x),u(d.scaleX,d.scaleY,p.scaleX,p.scaleY,g,x),d=p=null,function(y){for(var b=-1,_=x.length,k;++b<_;)g[(k=x[b]).i]=k.x(y);return g.join("")}}}var sz=eE(nz,"px, ","px)","deg)"),oz=eE(az,", ",")",")"),lz=1e-12;function ES(r){return((r=Math.exp(r))+1/r)/2}function cz(r){return((r=Math.exp(r))-1/r)/2}function hz(r){return((r=Math.exp(2*r))-1)/(r+1)}const uz=(function r(e,i,n){function a(o,c){var h=o[0],u=o[1],d=o[2],p=c[0],g=c[1],x=c[2],y=p-h,b=g-u,_=y*y+b*b,k,w;if(_<lz)w=Math.log(x/d)/e,k=function(M){return[h+M*y,u+M*b,d*Math.exp(e*M*w)]};else{var T=Math.sqrt(_),B=(x*x-d*d+n*_)/(2*d*i*T),E=(x*x-d*d-n*_)/(2*x*i*T),O=Math.log(Math.sqrt(B*B+1)-B),j=Math.log(Math.sqrt(E*E+1)-E);w=(j-O)/e,k=function(M){var N=M*w,Y=ES(O),$=d/(i*T)*(Y*hz(e*N+O)-cz(O));return[h+$*y,u+$*b,d*Y/ES(e*N+O)]}}return k.duration=w*1e3*e/Math.SQRT2,k}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return r(c,h,u)},a})(Math.SQRT2,2,4);var Zc=0,Ou=0,lu=0,rE=1e3,Jp,Nu,tg=0,ul=0,qg=0,af=typeof performance=="object"&&performance.now?performance:Date,iE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function M1(){return ul||(iE(fz),ul=af.now()+qg)}function fz(){ul=0}function eg(){this._call=this._time=this._next=null}eg.prototype=L1.prototype={constructor:eg,restart:function(r,e,i){if(typeof r!="function")throw new TypeError("callback is not a function");i=(i==null?M1():+i)+(e==null?0:+e),!this._next&&Nu!==this&&(Nu?Nu._next=this:Jp=this,Nu=this),this._call=r,this._time=i,Vx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vx())}};function L1(r,e,i){var n=new eg;return n.restart(r,e,i),n}function dz(){M1(),++Zc;for(var r=Jp,e;r;)(e=ul-r._time)>=0&&r._call.call(void 0,e),r=r._next;--Zc}function MS(){ul=(tg=af.now())+qg,Zc=Ou=0;try{dz()}finally{Zc=0,gz(),ul=0}}function pz(){var r=af.now(),e=r-tg;e>rE&&(qg-=e,tg=r)}function gz(){for(var r,e=Jp,i,n=1/0;e;)e._call?(n>e._time&&(n=e._time),r=e,e=e._next):(i=e._next,e._next=null,e=r?r._next=i:Jp=i);Nu=r,Vx(n)}function Vx(r){if(!Zc){Ou&&(Ou=clearTimeout(Ou));var e=r-ul;e>24?(r<1/0&&(Ou=setTimeout(MS,r-af.now()-qg)),lu&&(lu=clearInterval(lu))):(lu||(tg=af.now(),lu=setInterval(pz,rE)),Zc=1,iE(MS))}}function LS(r,e,i){var n=new eg;return e=e==null?0:+e,n.restart(a=>{n.stop(),r(a+e)},e,i),n}var mz=wf("start","end","cancel","interrupt"),yz=[],nE=0,OS=1,Xx=2,Bp=3,NS=4,Qx=5,Ap=6;function Ig(r,e,i,n,a,o){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;xz(r,i,{name:e,index:n,group:a,on:mz,tween:yz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:nE})}function O1(r,e){var i=Fn(r,e);if(i.state>nE)throw new Error("too late; already scheduled");return i}function ua(r,e){var i=Fn(r,e);if(i.state>Bp)throw new Error("too late; already running");return i}function Fn(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function xz(r,e,i){var n=r.__transition,a;n[e]=i,i.timer=L1(o,0,i.time);function o(d){i.state=OS,i.timer.restart(c,i.delay,i.time),i.delay<=d&&c(d-i.delay)}function c(d){var p,g,x,y;if(i.state!==OS)return u();for(p in n)if(y=n[p],y.name===i.name){if(y.state===Bp)return LS(c);y.state===NS?(y.state=Ap,y.timer.stop(),y.on.call("interrupt",r,r.__data__,y.index,y.group),delete n[p]):+p<e&&(y.state=Ap,y.timer.stop(),y.on.call("cancel",r,r.__data__,y.index,y.group),delete n[p])}if(LS(function(){i.state===Bp&&(i.state=NS,i.timer.restart(h,i.delay,i.time),h(d))}),i.state=Xx,i.on.call("start",r,r.__data__,i.index,i.group),i.state===Xx){for(i.state=Bp,a=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(y=i.tween[p].value.call(r,r.__data__,i.index,i.group))&&(a[++g]=y);a.length=g+1}}function h(d){for(var p=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=Qx,1),g=-1,x=a.length;++g<x;)a[g].call(r,p);i.state===Qx&&(i.on.call("end",r,r.__data__,i.index,i.group),u())}function u(){i.state=Ap,i.timer.stop(),delete n[e];for(var d in n)return;delete r.__transition}}function Ep(r,e){var i=r.__transition,n,a,o=!0,c;if(i){e=e==null?null:e+"";for(c in i){if((n=i[c]).name!==e){o=!1;continue}a=n.state>Xx&&n.state<Qx,n.state=Ap,n.timer.stop(),n.on.call(a?"interrupt":"cancel",r,r.__data__,n.index,n.group),delete i[c]}o&&delete r.__transition}}function bz(r){return this.each(function(){Ep(this,r)})}function vz(r,e){var i,n;return function(){var a=ua(this,r),o=a.tween;if(o!==i){n=i=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function Cz(r,e,i){var n,a;if(typeof i!="function")throw new Error;return function(){var o=ua(this,r),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:i},u=0,d=a.length;u<d;++u)if(a[u].name===e){a[u]=h;break}u===d&&a.push(h)}o.tween=a}}function _z(r,e){var i=this._id;if(r+="",arguments.length<2){for(var n=Fn(this.node(),i).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===r)return c.value;return null}return this.each((e==null?vz:Cz)(i,r,e))}function N1(r,e,i){var n=r._id;return r.each(function(){var a=ua(this,n);(a.value||(a.value={}))[e]=i.apply(this,arguments)}),function(a){return Fn(a,n).value[e]}}function aE(r,e){var i;return(typeof e=="number"?Is:e instanceof nf?BS:(i=nf(e))?(e=i,BS):iz)(r,e)}function kz(r){return function(){this.removeAttribute(r)}}function Sz(r){return function(){this.removeAttributeNS(r.space,r.local)}}function wz(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttribute(r);return c===a?null:c===n?o:o=e(n=c,i)}}function Tz(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttributeNS(r.space,r.local);return c===a?null:c===n?o:o=e(n=c,i)}}function Bz(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttribute(r):(c=this.getAttribute(r),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Az(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttributeNS(r.space,r.local):(c=this.getAttributeNS(r.space,r.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Ez(r,e){var i=zg(r),n=i==="transform"?oz:aE;return this.attrTween(r,typeof e=="function"?(i.local?Az:Bz)(i,n,N1(this,"attr."+r,e)):e==null?(i.local?Sz:kz)(i):(i.local?Tz:wz)(i,n,e))}function Mz(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function Lz(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function Oz(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&Lz(r,o)),i}return a._value=e,a}function Nz(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&Mz(r,o)),i}return a._value=e,a}function Rz(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 new Error;var n=zg(r);return this.tween(i,(n.local?Oz:Nz)(n,e))}function jz(r,e){return function(){O1(this,r).delay=+e.apply(this,arguments)}}function Dz(r,e){return e=+e,function(){O1(this,r).delay=e}}function Fz(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?jz:Dz)(e,r)):Fn(this.node(),e).delay}function $z(r,e){return function(){ua(this,r).duration=+e.apply(this,arguments)}}function zz(r,e){return e=+e,function(){ua(this,r).duration=e}}function qz(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?$z:zz)(e,r)):Fn(this.node(),e).duration}function Iz(r,e){if(typeof e!="function")throw new Error;return function(){ua(this,r).ease=e}}function Pz(r){var e=this._id;return arguments.length?this.each(Iz(e,r)):Fn(this.node(),e).ease}function Hz(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!="function")throw new Error;ua(this,r).ease=i}}function Uz(r){if(typeof r!="function")throw new Error;return this.each(Hz(this._id,r))}function Wz(r){typeof r!="function"&&(r=$A(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new Za(n,this._parents,this._name,this._id)}function Yz(r){if(r._id!==this._id)throw new Error;for(var e=this._groups,i=r._groups,n=e.length,a=i.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],d=i[h],p=u.length,g=c[h]=new Array(p),x,y=0;y<p;++y)(x=u[y]||d[y])&&(g[y]=x);for(;h<n;++h)c[h]=e[h];return new Za(c,this._parents,this._name,this._id)}function Gz(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");return i>=0&&(e=e.slice(0,i)),!e||e==="start"})}function Vz(r,e,i){var n,a,o=Gz(e)?O1:ua;return function(){var c=o(this,r),h=c.on;h!==n&&(a=(n=h).copy()).on(e,i),c.on=a}}function Xz(r,e){var i=this._id;return arguments.length<2?Fn(this.node(),i).on.on(r):this.each(Vz(i,r,e))}function Qz(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;e&&e.removeChild(this)}}function Zz(){return this.on("end.remove",Qz(this._id))}function Kz(r){var e=this._name,i=this._id;typeof r!="function"&&(r=T1(r));for(var n=this._groups,a=n.length,o=new Array(a),c=0;c<a;++c)for(var h=n[c],u=h.length,d=o[c]=new Array(u),p,g,x=0;x<u;++x)(p=h[x])&&(g=r.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),d[x]=g,Ig(d[x],e,i,x,d,Fn(p,i)));return new Za(o,this._parents,e,i)}function Jz(r){var e=this._name,i=this._id;typeof r!="function"&&(r=FA(r));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],d=u.length,p,g=0;g<d;++g)if(p=u[g]){for(var x=r.call(p,p.__data__,g,u),y,b=Fn(p,i),_=0,k=x.length;_<k;++_)(y=x[_])&&Ig(y,e,i,_,x,b);o.push(x),c.push(p)}return new Za(o,c,e,i)}var t7=Tf.prototype.constructor;function e7(){return new t7(this._groups,this._parents)}function r7(r,e){var i,n,a;return function(){var o=Qc(this,r),c=(this.style.removeProperty(r),Qc(this,r));return o===c?null:o===i&&c===n?a:a=e(i=o,n=c)}}function sE(r){return function(){this.style.removeProperty(r)}}function i7(r,e,i){var n,a=i+"",o;return function(){var c=Qc(this,r);return c===a?null:c===n?o:o=e(n=c,i)}}function n7(r,e,i){var n,a,o;return function(){var c=Qc(this,r),h=i(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(r),Qc(this,r))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function a7(r,e){var i,n,a,o="style."+e,c="end."+o,h;return function(){var u=ua(this,r),d=u.on,p=u.value[o]==null?h||(h=sE(e)):void 0;(d!==i||a!==p)&&(n=(i=d).copy()).on(c,a=p),u.on=n}}function s7(r,e,i){var n=(r+="")=="transform"?sz:aE;return e==null?this.styleTween(r,r7(r,n)).on("end.style."+r,sE(r)):typeof e=="function"?this.styleTween(r,n7(r,n,N1(this,"style."+r,e))).each(a7(this._id,r)):this.styleTween(r,i7(r,n,e),i).on("end.style."+r,null)}function o7(r,e,i){return function(n){this.style.setProperty(r,e.call(this,n),i)}}function l7(r,e,i){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&o7(r,c,i)),n}return o._value=e,o}function c7(r,e,i){var n="style."+(r+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,l7(r,e,i??""))}function h7(r){return function(){this.textContent=r}}function u7(r){return function(){var e=r(this);this.textContent=e??""}}function f7(r){return this.tween("text",typeof r=="function"?u7(N1(this,"text",r)):h7(r==null?"":r+""))}function d7(r){return function(e){this.textContent=r.call(this,e)}}function p7(r){var e,i;function n(){var a=r.apply(this,arguments);return a!==i&&(e=(i=a)&&d7(a)),e}return n._value=r,n}function g7(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 new Error;return this.tween(e,p7(r))}function m7(){for(var r=this._name,e=this._id,i=oE(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)if(u=c[d]){var p=Fn(u,e);Ig(u,r,i,d,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Za(n,this._parents,r,i)}function y7(){var r,e,i=this,n=i._id,a=i.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};i.each(function(){var d=ua(this,n),p=d.on;p!==r&&(e=(r=p).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),d.on=e}),a===0&&o()})}var x7=0;function Za(r,e,i,n){this._groups=r,this._parents=e,this._name=i,this._id=n}function oE(){return++x7}var Na=Tf.prototype;Za.prototype={constructor:Za,select:Kz,selectAll:Jz,selectChild:Na.selectChild,selectChildren:Na.selectChildren,filter:Wz,merge:Yz,selection:e7,transition:m7,call:Na.call,nodes:Na.nodes,node:Na.node,size:Na.size,empty:Na.empty,each:Na.each,on:Xz,attr:Ez,attrTween:Rz,style:s7,styleTween:c7,text:f7,textTween:g7,remove:Zz,tween:_z,delay:Fz,duration:qz,ease:Pz,easeVarying:Uz,end:y7,[Symbol.iterator]:Na[Symbol.iterator]};function b7(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var v7={time:null,delay:0,duration:250,ease:b7};function C7(r,e){for(var i;!(i=r.__transition)||!(i=i[e]);)if(!(r=r.parentNode))throw new Error(`transition ${e} not found`);return i}function _7(r){var e,i;r instanceof Za?(e=r._id,r=r._name):(e=oE(),(i=v7).time=M1(),r=r==null?null:r+"");for(var n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&Ig(u,r,e,d,c,i||C7(u,e));return new Za(n,this._parents,r,e)}Tf.prototype.interrupt=bz;Tf.prototype.transition=_7;const Zx=Math.PI,Kx=2*Zx,qo=1e-6,k7=Kx-qo;function lE(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function S7(r){let e=Math.floor(r);if(!(e>=0))throw new Error(`invalid digits: ${r}`);if(e>15)return lE;const i=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*i)/i+n[a]}}class w7{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?lE:S7(e)}moveTo(e,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,i){this._append`L${this._x1=+e},${this._y1=+i}`}quadraticCurveTo(e,i,n,a){this._append`Q${+e},${+i},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,i,n,a,o,c){this._append`C${+e},${+i},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,i,n,a,o){if(e=+e,i=+i,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,d=a-i,p=c-e,g=h-i,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=i}`;else if(x>qo)if(!(Math.abs(g*u-d*p)>qo)||!o)this._append`L${this._x1=e},${this._y1=i}`;else{let y=n-c,b=a-h,_=u*u+d*d,k=y*y+b*b,w=Math.sqrt(_),T=Math.sqrt(x),B=o*Math.tan((Zx-Math.acos((_+x-k)/(2*w*T)))/2),E=B/T,O=B/w;Math.abs(E-1)>qo&&this._append`L${e+E*p},${i+E*g}`,this._append`A${o},${o},0,0,${+(g*y>p*b)},${this._x1=e+O*u},${this._y1=i+O*d}`}}arc(e,i,n,a,o,c){if(e=+e,i=+i,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),d=e+h,p=i+u,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${d},${p}`:(Math.abs(this._x1-d)>qo||Math.abs(this._y1-p)>qo)&&this._append`L${d},${p}`,n&&(x<0&&(x=x%Kx+Kx),x>k7?this._append`A${n},${n},0,1,${g},${e-h},${i-u}A${n},${n},0,1,${g},${this._x1=d},${this._y1=p}`:x>qo&&this._append`A${n},${n},0,${+(x>=Zx)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=i+n*Math.sin(o)}`)}rect(e,i,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function T7(r){const e=+this._x.call(null,r),i=+this._y.call(null,r);return cE(this.cover(e,i),e,i,r)}function cE(r,e,i,n){if(isNaN(e)||isNaN(i))return r;var a,o=r._root,c={data:n},h=r._x0,u=r._y0,d=r._x1,p=r._y1,g,x,y,b,_,k,w,T;if(!o)return r._root=c,r;for(;o.length;)if((_=e>=(g=(h+d)/2))?h=g:d=g,(k=i>=(x=(u+p)/2))?u=x:p=x,a=o,!(o=o[w=k<<1|_]))return a[w]=c,r;if(y=+r._x.call(null,o.data),b=+r._y.call(null,o.data),e===y&&i===b)return c.next=o,a?a[w]=c:r._root=c,r;do a=a?a[w]=new Array(4):r._root=new Array(4),(_=e>=(g=(h+d)/2))?h=g:d=g,(k=i>=(x=(u+p)/2))?u=x:p=x;while((w=k<<1|_)===(T=(b>=x)<<1|y>=g));return a[T]=o,a[w]=c,r}function B7(r){var e,i,n=r.length,a,o,c=new Array(n),h=new Array(n),u=1/0,d=1/0,p=-1/0,g=-1/0;for(i=0;i<n;++i)isNaN(a=+this._x.call(null,e=r[i]))||isNaN(o=+this._y.call(null,e))||(c[i]=a,h[i]=o,a<u&&(u=a),a>p&&(p=a),o<d&&(d=o),o>g&&(g=o));if(u>p||d>g)return this;for(this.cover(u,d).cover(p,g),i=0;i<n;++i)cE(this,c[i],h[i],r[i]);return this}function A7(r,e){if(isNaN(r=+r)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(i))a=(i=Math.floor(r))+1,o=(n=Math.floor(e))+1;else{for(var c=a-i||1,h=this._root,u,d;i>r||r>=a||n>e||e>=o;)switch(d=(e<n)<<1|r<i,u=new Array(4),u[d]=h,h=u,c*=2,d){case 0:a=i+c,o=n+c;break;case 1:i=a-c,o=n+c;break;case 2:a=i+c,n=o-c;break;case 3:i=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=a,this._y1=o,this}function E7(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function M7(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function hi(r,e,i,n,a){this.node=r,this.x0=e,this.y0=i,this.x1=n,this.y1=a}function L7(r,e,i){var n,a=this._x0,o=this._y0,c,h,u,d,p=this._x1,g=this._y1,x=[],y=this._root,b,_;for(y&&x.push(new hi(y,a,o,p,g)),i==null?i=1/0:(a=r-i,o=e-i,p=r+i,g=e+i,i*=i);b=x.pop();)if(!(!(y=b.node)||(c=b.x0)>p||(h=b.y0)>g||(u=b.x1)<a||(d=b.y1)<o))if(y.length){var k=(c+u)/2,w=(h+d)/2;x.push(new hi(y[3],k,w,u,d),new hi(y[2],c,w,k,d),new hi(y[1],k,h,u,w),new hi(y[0],c,h,k,w)),(_=(e>=w)<<1|r>=k)&&(b=x[x.length-1],x[x.length-1]=x[x.length-1-_],x[x.length-1-_]=b)}else{var T=r-+this._x.call(null,y.data),B=e-+this._y.call(null,y.data),E=T*T+B*B;if(E<i){var O=Math.sqrt(i=E);a=r-O,o=e-O,p=r+O,g=e+O,n=y.data}}return n}function O7(r){if(isNaN(p=+this._x.call(null,r))||isNaN(g=+this._y.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,d=this._y1,p,g,x,y,b,_,k,w;if(!i)return this;if(i.length)for(;;){if((b=p>=(x=(c+u)/2))?c=x:u=x,(_=g>=(y=(h+d)/2))?h=y:d=y,e=i,!(i=i[k=_<<1|b]))return this;if(!i.length)break;(e[k+1&3]||e[k+2&3]||e[k+3&3])&&(n=e,w=k)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[k]=o:delete e[k],(i=e[0]||e[1]||e[2]||e[3])&&i===(e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[w]=i:this._root=i),this):(this._root=o,this)}function N7(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function R7(){return this._root}function j7(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function D7(r){var e=[],i,n=this._root,a,o,c,h,u;for(n&&e.push(new hi(n,this._x0,this._y0,this._x1,this._y1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.x1,u=i.y1)&&n.length){var d=(o+h)/2,p=(c+u)/2;(a=n[3])&&e.push(new hi(a,d,p,h,u)),(a=n[2])&&e.push(new hi(a,o,p,d,u)),(a=n[1])&&e.push(new hi(a,d,c,h,p)),(a=n[0])&&e.push(new hi(a,o,c,d,p))}return this}function F7(r){var e=[],i=[],n;for(this._root&&e.push(new hi(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.x1,d=n.y1,p=(c+u)/2,g=(h+d)/2;(o=a[0])&&e.push(new hi(o,c,h,p,g)),(o=a[1])&&e.push(new hi(o,p,h,u,g)),(o=a[2])&&e.push(new hi(o,c,g,p,d)),(o=a[3])&&e.push(new hi(o,p,g,u,d))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function $7(r){return r[0]}function z7(r){return arguments.length?(this._x=r,this):this._x}function q7(r){return r[1]}function I7(r){return arguments.length?(this._y=r,this):this._y}function R1(r,e,i){var n=new j1(e??$7,i??q7,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function j1(r,e,i,n,a,o){this._x=r,this._y=e,this._x0=i,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function RS(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var mi=R1.prototype=j1.prototype;mi.copy=function(){var r=new j1(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=RS(e),r;for(i=[{source:e,target:r._root=new Array(4)}];e=i.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=RS(n));return r};mi.add=T7;mi.addAll=B7;mi.cover=A7;mi.data=E7;mi.extent=M7;mi.find=L7;mi.remove=O7;mi.removeAll=N7;mi.root=R7;mi.size=j7;mi.visit=D7;mi.visitAfter=F7;mi.x=z7;mi.y=I7;function P7(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}const jS=Symbol("implicit");function hE(){var r=new dS,e=[],i=[],n=jS;function a(o){let c=r.get(o);if(c===void 0){if(n!==jS)return n;r.set(o,c=e.push(o)-1)}return i[c%i.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],r=new dS;for(const c of o)r.has(c)||r.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(i=Array.from(o),a):i.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return hE(e,i).unknown(n)},P7.apply(a,arguments),a}function H7(r){for(var e=r.length/6|0,i=new Array(e),n=0;n<e;)i[n]="#"+r.slice(n*6,++n*6);return i}const U7=H7("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function sc(r){return function(){return r}}const Oet=Math.abs,Net=Math.atan2,Ret=Math.cos,jet=Math.max,Det=Math.min,Fet=Math.sin,$et=Math.sqrt,DS=1e-12,D1=Math.PI,FS=D1/2,zet=2*D1;function qet(r){return r>1?0:r<-1?D1:Math.acos(r)}function Iet(r){return r>=1?FS:r<=-1?-FS:Math.asin(r)}function W7(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);e=n}return r},()=>new w7(e)}function Y7(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function uE(r){this._context=r}uE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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 Uu(r){return new uE(r)}function G7(r){return r[0]}function V7(r){return r[1]}function X7(r,e){var i=sc(!0),n=null,a=Uu,o=null,c=W7(h);r=typeof r=="function"?r:r===void 0?G7:sc(r),e=typeof e=="function"?e:e===void 0?V7:sc(e);function h(u){var d,p=(u=Y7(u)).length,g,x=!1,y;for(n==null&&(o=a(y=c())),d=0;d<=p;++d)!(d<p&&i(g=u[d],d,u))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+r(g,d,u),+e(g,d,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(r=typeof u=="function"?u:sc(+u),h):r},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:sc(+u),h):e},h.defined=function(u){return arguments.length?(i=typeof u=="function"?u:sc(!!u),h):i},h.curve=function(u){return arguments.length?(a=u,n!=null&&(o=a(n)),h):a},h.context=function(u){return arguments.length?(u==null?n=o=null:o=a(n=u),h):n},h}class fE{constructor(e,i){this._context=e,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,i){switch(e=+e,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,i,e,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,e,this._y0,e,i);break}}this._x0=e,this._y0=i}}function dE(r){return new fE(r,!0)}function pE(r){return new fE(r,!1)}function no(){}function rg(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 Pg(r){this._context=r}Pg.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:rg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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:rg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Jx(r){return new Pg(r)}function gE(r){this._context=r}gE.prototype={areaStart:no,areaEnd:no,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:rg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Q7(r){return new gE(r)}function mE(r){this._context=r}mE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:rg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Z7(r){return new mE(r)}function yE(r,e){this._basis=new Pg(r),this._beta=e}yE.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)for(var n=r[0],a=e[0],o=r[i]-n,c=e[i]-a,h=-1,u;++h<=i;)u=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(n+u*o),this._beta*e[h]+(1-this._beta)*(a+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};const K7=(function r(e){function i(n){return e===1?new Pg(n):new yE(n,e)}return i.beta=function(n){return r(+n)},i})(.85);function ig(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 F1(r,e){this._context=r,this._k=(1-e)/6}F1.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:ig(this,this._x1,this._y1);break}(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:ig(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}};const xE=(function r(e){function i(n){return new F1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function $1(r,e){this._context=r,this._k=(1-e)/6}$1.prototype={areaStart:no,areaEnd:no,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:ig(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}};const J7=(function r(e){function i(n){return new $1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function z1(r,e){this._context=r,this._k=(1-e)/6}z1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(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:ig(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}};const t9=(function r(e){function i(n){return new z1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function q1(r,e,i){var n=r._x1,a=r._y1,o=r._x2,c=r._y2;if(r._l01_a>DS){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);n=(n*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,a=(a*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>DS){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,p=3*r._l23_a*(r._l23_a+r._l12_a);o=(o*d+r._x1*r._l23_2a-e*r._l12_2a)/p,c=(c*d+r._y1*r._l23_2a-i*r._l12_2a)/p}r._context.bezierCurveTo(n,a,o,c,r._x2,r._y2)}function bE(r,e){this._context=r,this._alpha=e}bE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,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:q1(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}};const vE=(function r(e){function i(n){return e?new bE(n,e):new F1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function CE(r,e){this._context=r,this._alpha=e}CE.prototype={areaStart:no,areaEnd:no,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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,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:q1(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}};const e9=(function r(e){function i(n){return e?new CE(n,e):new $1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function _E(r,e){this._context=r,this._alpha=e}_E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,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:q1(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}};const r9=(function r(e){function i(n){return e?new _E(n,e):new z1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function kE(r){this._context=r}kE.prototype={areaStart:no,areaEnd:no,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(r,e){r=+r,e=+e,this._point?this._context.lineTo(r,e):(this._point=1,this._context.moveTo(r,e))}};function i9(r){return new kE(r)}function $S(r){return r<0?-1:1}function zS(r,e,i){var n=r._x1-r._x0,a=e-r._x1,o=(r._y1-r._y0)/(n||a<0&&-0),c=(i-r._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return($S(o)+$S(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function qS(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function O0(r,e,i){var n=r._x0,a=r._y0,o=r._x1,c=r._y1,h=(o-n)/3;r._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*i,o,c)}function ng(r){this._context=r}ng.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:O0(this,this._t0,qS(this,this._t0));break}(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)){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,O0(this,qS(this,i=zS(this,r,e)),i);break;default:O0(this,this._t0,i=zS(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}}};function SE(r){this._context=new wE(r)}(SE.prototype=Object.create(ng.prototype)).point=function(r,e){ng.prototype.point.call(this,e,r)};function wE(r){this._context=r}wE.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,n,a,o){this._context.bezierCurveTo(e,r,n,i,o,a)}};function TE(r){return new ng(r)}function BE(r){return new SE(r)}function AE(r){this._context=r}AE.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 for(var n=IS(r),a=IS(e),o=0,c=1;c<i;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],r[c],e[c]);(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 IS(r){var e,i=r.length-1,n,a=new Array(i),o=new Array(i),c=new Array(i);for(a[0]=0,o[0]=2,c[0]=r[0]+2*r[1],e=1;e<i-1;++e)a[e]=1,o[e]=4,c[e]=4*r[e]+2*r[e+1];for(a[i-1]=2,o[i-1]=7,c[i-1]=8*r[i-1]+r[i],e=1;e<i;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[i-1]=c[i-1]/o[i-1],e=i-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[i-1]=(r[i]+a[i-1])/2,e=0;e<i-1;++e)o[e]=2*r[e+1]-a[e+1];return[a,o]}function EE(r){return new AE(r)}function Hg(r,e){this._context=r,this._t=e}Hg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(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 ME(r){return new Hg(r,.5)}function LE(r){return new Hg(r,0)}function OE(r){return new Hg(r,1)}const np=r=>()=>r;function n9(r,{sourceEvent:e,target:i,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function Ya(r,e,i){this.k=r,this.x=e,this.y=i}Ya.prototype={constructor:Ya,scale:function(r){return r===1?this:new Ya(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Ya(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 I1=new Ya(1,0,0);Zn.prototype=Ya.prototype;function Zn(r){for(;!r.__zoom;)if(!(r=r.parentNode))return I1;return r.__zoom}function N0(r){r.stopImmediatePropagation()}function cu(r){r.preventDefault(),r.stopImmediatePropagation()}function a9(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function s9(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function PS(){return this.__zoom||I1}function o9(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function l9(){return navigator.maxTouchPoints||"ontouchstart"in this}function c9(r,e,i){var n=r.invertX(e[0][0])-i[0][0],a=r.invertX(e[1][0])-i[1][0],o=r.invertY(e[0][1])-i[0][1],c=r.invertY(e[1][1])-i[1][1];return r.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function h9(){var r=a9,e=s9,i=c9,n=o9,a=l9,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=uz,d=wf("start","zoom","end"),p,g,x,y=500,b=150,_=0,k=10;function w(F){F.property("__zoom",PS).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",Y).on("dblclick.zoom",$).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(F,U,R,I){var H=F.selection?F.selection():F;H.property("__zoom",PS),F!==H?O(F,U,R,I):H.interrupt().each(function(){j(this,arguments).event(I).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},w.scaleBy=function(F,U,R,I){w.scaleTo(F,function(){var H=this.__zoom.k,G=typeof U=="function"?U.apply(this,arguments):U;return H*G},R,I)},w.scaleTo=function(F,U,R,I){w.transform(F,function(){var H=e.apply(this,arguments),G=this.__zoom,Z=R==null?E(H):typeof R=="function"?R.apply(this,arguments):R,P=G.invert(Z),J=typeof U=="function"?U.apply(this,arguments):U;return i(B(T(G,J),Z,P),H,c)},R,I)},w.translateBy=function(F,U,R,I){w.transform(F,function(){return i(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof R=="function"?R.apply(this,arguments):R),e.apply(this,arguments),c)},null,I)},w.translateTo=function(F,U,R,I,H){w.transform(F,function(){var G=e.apply(this,arguments),Z=this.__zoom,P=I==null?E(G):typeof I=="function"?I.apply(this,arguments):I;return i(I1.translate(P[0],P[1]).scale(Z.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof R=="function"?-R.apply(this,arguments):-R),G,c)},I,H)};function T(F,U){return U=Math.max(o[0],Math.min(o[1],U)),U===F.k?F:new Ya(U,F.x,F.y)}function B(F,U,R){var I=U[0]-R[0]*F.k,H=U[1]-R[1]*F.k;return I===F.x&&H===F.y?F:new Ya(F.k,I,H)}function E(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function O(F,U,R,I){F.on("start.zoom",function(){j(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(I).end()}).tween("zoom",function(){var H=this,G=arguments,Z=j(H,G).event(I),P=e.apply(H,G),J=R==null?E(P):typeof R=="function"?R.apply(H,G):R,nt=Math.max(P[1][0]-P[0][0],P[1][1]-P[0][1]),ut=H.__zoom,gt=typeof U=="function"?U.apply(H,G):U,kt=u(ut.invert(J).concat(nt/ut.k),gt.invert(J).concat(nt/gt.k));return function(Et){if(Et===1)Et=gt;else{var st=kt(Et),Ct=nt/st[2];Et=new Ya(Ct,J[0]-st[0]*Ct,J[1]-st[1]*Ct)}Z.zoom(null,Et)}})}function j(F,U,R){return!R&&F.__zooming||new M(F,U)}function M(F,U){this.that=F,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(F,U),this.taps=0}M.prototype={event:function(F){return F&&(this.sourceEvent=F),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(F,U){return this.mouse&&F!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(F){var U=Xt(this.that).datum();d.call(F,this.that,new n9(F,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),U)}};function N(F,...U){if(!r.apply(this,arguments))return;var R=j(this,U).event(F),I=this.__zoom,H=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,n.apply(this,arguments)))),G=Kn(F);if(R.wheel)(R.mouse[0][0]!==G[0]||R.mouse[0][1]!==G[1])&&(R.mouse[1]=I.invert(R.mouse[0]=G)),clearTimeout(R.wheel);else{if(I.k===H)return;R.mouse=[G,I.invert(G)],Ep(this),R.start()}cu(F),R.wheel=setTimeout(Z,b),R.zoom("mouse",i(B(T(I,H),R.mouse[0],R.mouse[1]),R.extent,c));function Z(){R.wheel=null,R.end()}}function Y(F,...U){if(x||!r.apply(this,arguments))return;var R=F.currentTarget,I=j(this,U,!0).event(F),H=Xt(F.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",nt,!0),G=Kn(F,R),Z=F.clientX,P=F.clientY;VA(F.view),N0(F),I.mouse=[G,this.__zoom.invert(G)],Ep(this),I.start();function J(ut){if(cu(ut),!I.moved){var gt=ut.clientX-Z,kt=ut.clientY-P;I.moved=gt*gt+kt*kt>_}I.event(ut).zoom("mouse",i(B(I.that.__zoom,I.mouse[0]=Kn(ut,R),I.mouse[1]),I.extent,c))}function nt(ut){H.on("mousemove.zoom mouseup.zoom",null),XA(ut.view,I.moved),cu(ut),I.event(ut).end()}}function $(F,...U){if(r.apply(this,arguments)){var R=this.__zoom,I=Kn(F.changedTouches?F.changedTouches[0]:F,this),H=R.invert(I),G=R.k*(F.shiftKey?.5:2),Z=i(B(T(R,G),I,H),e.apply(this,U),c);cu(F),h>0?Xt(this).transition().duration(h).call(O,Z,I,F):Xt(this).call(w.transform,Z,I,F)}}function z(F,...U){if(r.apply(this,arguments)){var R=F.touches,I=R.length,H=j(this,U,F.changedTouches.length===I).event(F),G,Z,P,J;for(N0(F),Z=0;Z<I;++Z)P=R[Z],J=Kn(P,this),J=[J,this.__zoom.invert(J),P.identifier],H.touch0?!H.touch1&&H.touch0[2]!==J[2]&&(H.touch1=J,H.taps=0):(H.touch0=J,G=!0,H.taps=1+!!p);p&&(p=clearTimeout(p)),G&&(H.taps<2&&(g=J[0],p=setTimeout(function(){p=null},y)),Ep(this),H.start())}}function K(F,...U){if(this.__zooming){var R=j(this,U).event(F),I=F.changedTouches,H=I.length,G,Z,P,J;for(cu(F),G=0;G<H;++G)Z=I[G],P=Kn(Z,this),R.touch0&&R.touch0[2]===Z.identifier?R.touch0[0]=P:R.touch1&&R.touch1[2]===Z.identifier&&(R.touch1[0]=P);if(Z=R.that.__zoom,R.touch1){var nt=R.touch0[0],ut=R.touch0[1],gt=R.touch1[0],kt=R.touch1[1],Et=(Et=gt[0]-nt[0])*Et+(Et=gt[1]-nt[1])*Et,st=(st=kt[0]-ut[0])*st+(st=kt[1]-ut[1])*st;Z=T(Z,Math.sqrt(Et/st)),P=[(nt[0]+gt[0])/2,(nt[1]+gt[1])/2],J=[(ut[0]+kt[0])/2,(ut[1]+kt[1])/2]}else if(R.touch0)P=R.touch0[0],J=R.touch0[1];else return;R.zoom("touch",i(B(Z,P,J),R.extent,c))}}function W(F,...U){if(this.__zooming){var R=j(this,U).event(F),I=F.changedTouches,H=I.length,G,Z;for(N0(F),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),G=0;G<H;++G)Z=I[G],R.touch0&&R.touch0[2]===Z.identifier?delete R.touch0:R.touch1&&R.touch1[2]===Z.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(Z=Kn(Z,this),Math.hypot(g[0]-Z[0],g[1]-Z[1])<k)){var P=Xt(this).on("dblclick.zoom");P&&P.apply(this,arguments)}}}return w.wheelDelta=function(F){return arguments.length?(n=typeof F=="function"?F:np(+F),w):n},w.filter=function(F){return arguments.length?(r=typeof F=="function"?F:np(!!F),w):r},w.touchable=function(F){return arguments.length?(a=typeof F=="function"?F:np(!!F),w):a},w.extent=function(F){return arguments.length?(e=typeof F=="function"?F:np([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),w):e},w.scaleExtent=function(F){return arguments.length?(o[0]=+F[0],o[1]=+F[1],w):[o[0],o[1]]},w.translateExtent=function(F){return arguments.length?(c[0][0]=+F[0][0],c[1][0]=+F[1][0],c[0][1]=+F[0][1],c[1][1]=+F[1][1],w):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},w.constrain=function(F){return arguments.length?(i=F,w):i},w.duration=function(F){return arguments.length?(h=+F,w):h},w.interpolate=function(F){return arguments.length?(u=F,w):u},w.on=function(){var F=d.on.apply(d,arguments);return F===d?w:F},w.clickDistance=function(F){return arguments.length?(_=(F=+F)*F,w):Math.sqrt(_)},w.tapDistance=function(F){return arguments.length?(k=+F,w):k},w}var u9=A(r=>{var a;const{securityLevel:e}=we();let i=Xt("body");if(e==="sandbox"){const c=((a=Xt(`#i${r}`).node())==null?void 0:a.contentDocument)??document;i=Xt(c.body)}return i.select(`#${r}`)},"selectSvgElement");function P1(r){return typeof r>"u"||r===null}A(P1,"isNothing");function NE(r){return typeof r=="object"&&r!==null}A(NE,"isObject");function RE(r){return Array.isArray(r)?r:P1(r)?[]:[r]}A(RE,"toArray");function jE(r,e){var i,n,a,o;if(e)for(o=Object.keys(e),i=0,n=o.length;i<n;i+=1)a=o[i],r[a]=e[a];return r}A(jE,"extend");function DE(r,e){var i="",n;for(n=0;n<e;n+=1)i+=r;return i}A(DE,"repeat");function FE(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}A(FE,"isNegativeZero");var f9=P1,d9=NE,p9=RE,g9=DE,m9=FE,y9=jE,Or={isNothing:f9,isObject:d9,toArray:p9,repeat:g9,isNegativeZero:m9,extend:y9};function H1(r,e){var i="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!e&&r.mark.snippet&&(i+=`
|
|
227
|
+
|
|
228
|
+
`+r.mark.snippet),n+" "+i):n}A(H1,"formatError");function Kc(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=H1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}A(Kc,"YAMLException$1");Kc.prototype=Object.create(Error.prototype);Kc.prototype.constructor=Kc;Kc.prototype.toString=A(function(e){return this.name+": "+H1(this,e)},"toString");var Ni=Kc;function Mp(r,e,i,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),i-n>h&&(c=" ...",i=n+h-c.length),{str:o+r.slice(e,i).replace(/\t/g,"→")+c,pos:n-e+o.length}}A(Mp,"getLine");function Lp(r,e){return Or.repeat(" ",e-r.length)+r}A(Lp,"padStart");function $E(r,e){if(e=Object.create(e||null),!r.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=i.exec(r.buffer);)a.push(o.index),n.push(o.index+o[0].length),r.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,d,p=Math.min(r.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=Mp(r.buffer,n[c-u],a[c-u],r.position-(n[c]-n[c-u]),g),h=Or.repeat(" ",e.indent)+Lp((r.line-u+1).toString(),p)+" | "+d.str+`
|
|
229
|
+
`+h;for(d=Mp(r.buffer,n[c],a[c],r.position,g),h+=Or.repeat(" ",e.indent)+Lp((r.line+1).toString(),p)+" | "+d.str+`
|
|
230
|
+
`,h+=Or.repeat("-",e.indent+p+3+d.pos)+`^
|
|
231
|
+
`,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=Mp(r.buffer,n[c+u],a[c+u],r.position-(n[c]-n[c+u]),g),h+=Or.repeat(" ",e.indent)+Lp((r.line+u+1).toString(),p)+" | "+d.str+`
|
|
232
|
+
`;return h.replace(/\n$/,"")}A($E,"makeSnippet");var x9=$E,b9=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],v9=["scalar","sequence","mapping"];function zE(r){var e={};return r!==null&&Object.keys(r).forEach(function(i){r[i].forEach(function(n){e[String(n)]=i})}),e}A(zE,"compileStyleAliases");function qE(r,e){if(e=e||{},Object.keys(e).forEach(function(i){if(b9.indexOf(i)===-1)throw new Ni('Unknown option "'+i+'" is met in definition of "'+r+'" YAML type.')}),this.options=e,this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=zE(e.styleAliases||null),v9.indexOf(this.kind)===-1)throw new Ni('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}A(qE,"Type$1");var ei=qE;function tb(r,e){var i=[];return r[e].forEach(function(n){var a=i.length;i.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),i[a]=n}),i}A(tb,"compileList");function IE(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function n(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(A(n,"collectType"),e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(n);return r}A(IE,"compileMap");function ag(r){return this.extend(r)}A(ag,"Schema$1");ag.prototype.extend=A(function(e){var i=[],n=[];if(e instanceof ei)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Ni("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof ei))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Ni("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Ni("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof ei))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ag.prototype);return a.implicit=(this.implicit||[]).concat(i),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=tb(a,"implicit"),a.compiledExplicit=tb(a,"explicit"),a.compiledTypeMap=IE(a.compiledImplicit,a.compiledExplicit),a},"extend");var C9=ag,_9=new ei("tag:yaml.org,2002:str",{kind:"scalar",construct:A(function(r){return r!==null?r:""},"construct")}),k9=new ei("tag:yaml.org,2002:seq",{kind:"sequence",construct:A(function(r){return r!==null?r:[]},"construct")}),S9=new ei("tag:yaml.org,2002:map",{kind:"mapping",construct:A(function(r){return r!==null?r:{}},"construct")}),w9=new C9({explicit:[_9,k9,S9]});function PE(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}A(PE,"resolveYamlNull");function HE(){return null}A(HE,"constructYamlNull");function UE(r){return r===null}A(UE,"isNull");var T9=new ei("tag:yaml.org,2002:null",{kind:"scalar",resolve:PE,construct:HE,predicate:UE,represent:{canonical:A(function(){return"~"},"canonical"),lowercase:A(function(){return"null"},"lowercase"),uppercase:A(function(){return"NULL"},"uppercase"),camelcase:A(function(){return"Null"},"camelcase"),empty:A(function(){return""},"empty")},defaultStyle:"lowercase"});function WE(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}A(WE,"resolveYamlBoolean");function YE(r){return r==="true"||r==="True"||r==="TRUE"}A(YE,"constructYamlBoolean");function GE(r){return Object.prototype.toString.call(r)==="[object Boolean]"}A(GE,"isBoolean");var B9=new ei("tag:yaml.org,2002:bool",{kind:"scalar",resolve:WE,construct:YE,predicate:GE,represent:{lowercase:A(function(r){return r?"true":"false"},"lowercase"),uppercase:A(function(r){return r?"TRUE":"FALSE"},"uppercase"),camelcase:A(function(r){return r?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function VE(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}A(VE,"isHexCode");function XE(r){return 48<=r&&r<=55}A(XE,"isOctCode");function QE(r){return 48<=r&&r<=57}A(QE,"isDecCode");function ZE(r){if(r===null)return!1;var e=r.length,i=0,n=!1,a;if(!e)return!1;if(a=r[i],(a==="-"||a==="+")&&(a=r[++i]),a==="0"){if(i+1===e)return!0;if(a=r[++i],a==="b"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!VE(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!XE(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;i<e;i++)if(a=r[i],a!=="_"){if(!QE(r.charCodeAt(i)))return!1;n=!0}return!(!n||a==="_")}A(ZE,"resolveYamlInteger");function KE(r){var e=r,i=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}A(KE,"constructYamlInteger");function JE(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!Or.isNegativeZero(r)}A(JE,"isInteger");var A9=new ei("tag:yaml.org,2002:int",{kind:"scalar",resolve:ZE,construct:KE,predicate:JE,represent:{binary:A(function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},"binary"),octal:A(function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},"octal"),decimal:A(function(r){return r.toString(10)},"decimal"),hexadecimal:A(function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),E9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function t3(r){return!(r===null||!E9.test(r)||r[r.length-1]==="_")}A(t3,"resolveYamlFloat");function e3(r){var e,i;return e=r.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}A(e3,"constructYamlFloat");var M9=/^[-+]?[0-9]+e/;function r3(r,e){var i;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Or.isNegativeZero(r))return"-0.0";return i=r.toString(10),M9.test(i)?i.replace("e",".e"):i}A(r3,"representYamlFloat");function i3(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||Or.isNegativeZero(r))}A(i3,"isFloat");var L9=new ei("tag:yaml.org,2002:float",{kind:"scalar",resolve:t3,construct:e3,predicate:i3,represent:r3,defaultStyle:"lowercase"}),n3=w9.extend({implicit:[T9,B9,A9,L9]}),O9=n3,a3=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),s3=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 o3(r){return r===null?!1:a3.exec(r)!==null||s3.exec(r)!==null}A(o3,"resolveYamlTimestamp");function l3(r){var e,i,n,a,o,c,h,u=0,d=null,p,g,x;if(e=a3.exec(r),e===null&&(e=s3.exec(r)),e===null)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(i,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],g=+(e[11]||0),d=(p*60+g)*6e4,e[9]==="-"&&(d=-d)),x=new Date(Date.UTC(i,n,a,o,c,h,u)),d&&x.setTime(x.getTime()-d),x}A(l3,"constructYamlTimestamp");function c3(r){return r.toISOString()}A(c3,"representYamlTimestamp");var N9=new ei("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o3,construct:l3,instanceOf:Date,represent:c3});function h3(r){return r==="<<"||r===null}A(h3,"resolveYamlMerge");var R9=new ei("tag:yaml.org,2002:merge",{kind:"scalar",resolve:h3}),U1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
233
|
+
\r`;function u3(r){if(r===null)return!1;var e,i,n=0,a=r.length,o=U1;for(i=0;i<a;i++)if(e=o.indexOf(r.charAt(i)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}A(u3,"resolveYamlBinary");function f3(r){var e,i,n=r.replace(/[\r\n=]/g,""),a=n.length,o=U1,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return i=a%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}A(f3,"constructYamlBinary");function d3(r){var e="",i=0,n,a,o=r.length,c=U1;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]),i=(i<<8)+r[n];return a=o%3,a===0?(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]):a===2?(e+=c[i>>10&63],e+=c[i>>4&63],e+=c[i<<2&63],e+=c[64]):a===1&&(e+=c[i>>2&63],e+=c[i<<4&63],e+=c[64],e+=c[64]),e}A(d3,"representYamlBinary");function p3(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}A(p3,"isBinary");var j9=new ei("tag:yaml.org,2002:binary",{kind:"scalar",resolve:u3,construct:f3,predicate:p3,represent:d3}),D9=Object.prototype.hasOwnProperty,F9=Object.prototype.toString;function g3(r){if(r===null)return!0;var e=[],i,n,a,o,c,h=r;for(i=0,n=h.length;i<n;i+=1){if(a=h[i],c=!1,F9.call(a)!=="[object Object]")return!1;for(o in a)if(D9.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}A(g3,"resolveYamlOmap");function m3(r){return r!==null?r:[]}A(m3,"constructYamlOmap");var $9=new ei("tag:yaml.org,2002:omap",{kind:"sequence",resolve:g3,construct:m3}),z9=Object.prototype.toString;function y3(r){if(r===null)return!0;var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1){if(n=c[e],z9.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}A(y3,"resolveYamlPairs");function x3(r){if(r===null)return[];var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}A(x3,"constructYamlPairs");var q9=new ei("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:y3,construct:x3}),I9=Object.prototype.hasOwnProperty;function b3(r){if(r===null)return!0;var e,i=r;for(e in i)if(I9.call(i,e)&&i[e]!==null)return!1;return!0}A(b3,"resolveYamlSet");function v3(r){return r!==null?r:{}}A(v3,"constructYamlSet");var P9=new ei("tag:yaml.org,2002:set",{kind:"mapping",resolve:b3,construct:v3}),C3=O9.extend({implicit:[N9,R9],explicit:[j9,$9,q9,P9]}),ao=Object.prototype.hasOwnProperty,sg=1,_3=2,k3=3,og=4,R0=1,H9=2,HS=3,U9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,W9=/[\x85\u2028\u2029]/,Y9=/[,\[\]\{\}]/,S3=/^(?:!|!!|![a-z\-]+!)$/i,w3=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function eb(r){return Object.prototype.toString.call(r)}A(eb,"_class");function On(r){return r===10||r===13}A(On,"is_EOL");function io(r){return r===9||r===32}A(io,"is_WHITE_SPACE");function fi(r){return r===9||r===32||r===10||r===13}A(fi,"is_WS_OR_EOL");function Yo(r){return r===44||r===91||r===93||r===123||r===125}A(Yo,"is_FLOW_INDICATOR");function T3(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}A(T3,"fromHexCode");function B3(r){return r===120?2:r===117?4:r===85?8:0}A(B3,"escapedHexLen");function A3(r){return 48<=r&&r<=57?r-48:-1}A(A3,"fromDecimalCode");function rb(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
|
|
234
|
+
`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"
":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}A(rb,"simpleEscapeSequence");function E3(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}A(E3,"charFromCodepoint");function W1(r,e,i){e==="__proto__"?Object.defineProperty(r,e,{configurable:!0,enumerable:!0,writable:!0,value:i}):r[e]=i}A(W1,"setProperty");var M3=new Array(256),L3=new Array(256);for(Do=0;Do<256;Do++)M3[Do]=rb(Do)?1:0,L3[Do]=rb(Do);var Do;function O3(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||C3,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}A(O3,"State$1");function Y1(r,e){var i={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};return i.snippet=x9(i),new Ni(e,i)}A(Y1,"generateError");function Pt(r,e){throw Y1(r,e)}A(Pt,"throwError");function sf(r,e){r.onWarning&&r.onWarning.call(null,Y1(r,e))}A(sf,"throwWarning");var US={YAML:A(function(e,i,n){var a,o,c;e.version!==null&&Pt(e,"duplication of %YAML directive"),n.length!==1&&Pt(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&Pt(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&Pt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&sf(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:A(function(e,i,n){var a,o;n.length!==2&&Pt(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],S3.test(a)||Pt(e,"ill-formed tag handle (first argument) of the TAG directive"),ao.call(e.tagMap,a)&&Pt(e,'there is a previously declared suffix for "'+a+'" tag handle'),w3.test(o)||Pt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Pt(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Va(r,e,i,n){var a,o,c,h;if(e<i){if(h=r.input.slice(e,i),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||Pt(r,"expected valid JSON character");else U9.test(h)&&Pt(r,"the stream contains non-printable characters");r.result+=h}}A(Va,"captureSegment");function ib(r,e,i,n){var a,o,c,h;for(Or.isObject(i)||Pt(r,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(i),c=0,h=a.length;c<h;c+=1)o=a[c],ao.call(e,o)||(W1(e,o,i[o]),n[o]=!0)}A(ib,"mergeMappings");function Go(r,e,i,n,a,o,c,h,u){var d,p;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,p=a.length;d<p;d+=1)Array.isArray(a[d])&&Pt(r,"nested arrays are not supported inside keys"),typeof a=="object"&&eb(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&eb(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(d=0,p=o.length;d<p;d+=1)ib(r,e,o[d],i);else ib(r,e,o,i);else!r.json&&!ao.call(i,a)&&ao.call(e,a)&&(r.line=c||r.line,r.lineStart=h||r.lineStart,r.position=u||r.position,Pt(r,"duplicated mapping key")),W1(e,a,o),delete i[a];return e}A(Go,"storeMappingPair");function Ug(r){var e;e=r.input.charCodeAt(r.position),e===10?r.position++:e===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):Pt(r,"a line break is expected"),r.line+=1,r.lineStart=r.position,r.firstTabInLine=-1}A(Ug,"readLineBreak");function yr(r,e,i){for(var n=0,a=r.input.charCodeAt(r.position);a!==0;){for(;io(a);)a===9&&r.firstTabInLine===-1&&(r.firstTabInLine=r.position),a=r.input.charCodeAt(++r.position);if(e&&a===35)do a=r.input.charCodeAt(++r.position);while(a!==10&&a!==13&&a!==0);if(On(a))for(Ug(r),a=r.input.charCodeAt(r.position),n++,r.lineIndent=0;a===32;)r.lineIndent++,a=r.input.charCodeAt(++r.position);else break}return i!==-1&&n!==0&&r.lineIndent<i&&sf(r,"deficient indentation"),n}A(yr,"skipSeparationSpace");function Af(r){var e=r.position,i;return i=r.input.charCodeAt(e),!!((i===45||i===46)&&i===r.input.charCodeAt(e+1)&&i===r.input.charCodeAt(e+2)&&(e+=3,i=r.input.charCodeAt(e),i===0||fi(i)))}A(Af,"testDocumentSeparator");function Wg(r,e){e===1?r.result+=" ":e>1&&(r.result+=Or.repeat(`
|
|
235
|
+
`,e-1))}A(Wg,"writeFoldedLines");function N3(r,e,i){var n,a,o,c,h,u,d,p,g=r.kind,x=r.result,y;if(y=r.input.charCodeAt(r.position),fi(y)||Yo(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=r.input.charCodeAt(r.position+1),fi(a)||i&&Yo(a)))return!1;for(r.kind="scalar",r.result="",o=c=r.position,h=!1;y!==0;){if(y===58){if(a=r.input.charCodeAt(r.position+1),fi(a)||i&&Yo(a))break}else if(y===35){if(n=r.input.charCodeAt(r.position-1),fi(n))break}else{if(r.position===r.lineStart&&Af(r)||i&&Yo(y))break;if(On(y))if(u=r.line,d=r.lineStart,p=r.lineIndent,yr(r,!1,-1),r.lineIndent>=e){h=!0,y=r.input.charCodeAt(r.position);continue}else{r.position=c,r.line=u,r.lineStart=d,r.lineIndent=p;break}}h&&(Va(r,o,c,!1),Wg(r,r.line-u),o=c=r.position,h=!1),io(y)||(c=r.position+1),y=r.input.charCodeAt(++r.position)}return Va(r,o,c,!1),r.result?!0:(r.kind=g,r.result=x,!1)}A(N3,"readPlainScalar");function R3(r,e){var i,n,a;if(i=r.input.charCodeAt(r.position),i!==39)return!1;for(r.kind="scalar",r.result="",r.position++,n=a=r.position;(i=r.input.charCodeAt(r.position))!==0;)if(i===39)if(Va(r,n,r.position,!0),i=r.input.charCodeAt(++r.position),i===39)n=r.position,r.position++,a=r.position;else return!0;else On(i)?(Va(r,n,a,!0),Wg(r,yr(r,!1,e)),n=a=r.position):r.position===r.lineStart&&Af(r)?Pt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,a=r.position);Pt(r,"unexpected end of the stream within a single quoted scalar")}A(R3,"readSingleQuotedScalar");function j3(r,e){var i,n,a,o,c,h;if(h=r.input.charCodeAt(r.position),h!==34)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(h=r.input.charCodeAt(r.position))!==0;){if(h===34)return Va(r,i,r.position,!0),r.position++,!0;if(h===92){if(Va(r,i,r.position,!0),h=r.input.charCodeAt(++r.position),On(h))yr(r,!1,e);else if(h<256&&M3[h])r.result+=L3[h],r.position++;else if((c=B3(h))>0){for(a=c,o=0;a>0;a--)h=r.input.charCodeAt(++r.position),(c=T3(h))>=0?o=(o<<4)+c:Pt(r,"expected hexadecimal character");r.result+=E3(o),r.position++}else Pt(r,"unknown escape sequence");i=n=r.position}else On(h)?(Va(r,i,n,!0),Wg(r,yr(r,!1,e)),i=n=r.position):r.position===r.lineStart&&Af(r)?Pt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,n=r.position)}Pt(r,"unexpected end of the stream within a double quoted scalar")}A(j3,"readDoubleQuotedScalar");function D3(r,e){var i=!0,n,a,o,c=r.tag,h,u=r.anchor,d,p,g,x,y,b=Object.create(null),_,k,w,T;if(T=r.input.charCodeAt(r.position),T===91)p=93,y=!1,h=[];else if(T===123)p=125,y=!0,h={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=h),T=r.input.charCodeAt(++r.position);T!==0;){if(yr(r,!0,e),T=r.input.charCodeAt(r.position),T===p)return r.position++,r.tag=c,r.anchor=u,r.kind=y?"mapping":"sequence",r.result=h,!0;i?T===44&&Pt(r,"expected the node content, but found ','"):Pt(r,"missed comma between flow collection entries"),k=_=w=null,g=x=!1,T===63&&(d=r.input.charCodeAt(r.position+1),fi(d)&&(g=x=!0,r.position++,yr(r,!0,e))),n=r.line,a=r.lineStart,o=r.position,fl(r,e,sg,!1,!0),k=r.tag,_=r.result,yr(r,!0,e),T=r.input.charCodeAt(r.position),(x||r.line===n)&&T===58&&(g=!0,T=r.input.charCodeAt(++r.position),yr(r,!0,e),fl(r,e,sg,!1,!0),w=r.result),y?Go(r,h,b,k,_,w,n,a,o):g?h.push(Go(r,null,b,k,_,w,n,a,o)):h.push(_),yr(r,!0,e),T=r.input.charCodeAt(r.position),T===44?(i=!0,T=r.input.charCodeAt(++r.position)):i=!1}Pt(r,"unexpected end of the stream within a flow collection")}A(D3,"readFlowCollection");function F3(r,e){var i,n,a=R0,o=!1,c=!1,h=e,u=0,d=!1,p,g;if(g=r.input.charCodeAt(r.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)R0===a?a=g===43?HS:H9:Pt(r,"repeat of a chomping mode identifier");else if((p=A3(g))>=0)p===0?Pt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Pt(r,"repeat of an indentation width identifier"):(h=e+p-1,c=!0);else break;if(io(g)){do g=r.input.charCodeAt(++r.position);while(io(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!On(g)&&g!==0)}for(;g!==0;){for(Ug(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!c||r.lineIndent<h)&&g===32;)r.lineIndent++,g=r.input.charCodeAt(++r.position);if(!c&&r.lineIndent>h&&(h=r.lineIndent),On(g)){u++;continue}if(r.lineIndent<h){a===HS?r.result+=Or.repeat(`
|
|
236
|
+
`,o?1+u:u):a===R0&&o&&(r.result+=`
|
|
237
|
+
`);break}for(n?io(g)?(d=!0,r.result+=Or.repeat(`
|
|
238
|
+
`,o?1+u:u)):d?(d=!1,r.result+=Or.repeat(`
|
|
239
|
+
`,u+1)):u===0?o&&(r.result+=" "):r.result+=Or.repeat(`
|
|
240
|
+
`,u):r.result+=Or.repeat(`
|
|
241
|
+
`,o?1+u:u),o=!0,c=!0,u=0,i=r.position;!On(g)&&g!==0;)g=r.input.charCodeAt(++r.position);Va(r,i,r.position,!1)}return!0}A(F3,"readBlockScalar");function nb(r,e){var i,n=r.tag,a=r.anchor,o=[],c,h=!1,u;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=o),u=r.input.charCodeAt(r.position);u!==0&&(r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,Pt(r,"tab characters must not be used in indentation")),!(u!==45||(c=r.input.charCodeAt(r.position+1),!fi(c))));){if(h=!0,r.position++,yr(r,!0,-1)&&r.lineIndent<=e){o.push(null),u=r.input.charCodeAt(r.position);continue}if(i=r.line,fl(r,e,k3,!1,!0),o.push(r.result),yr(r,!0,-1),u=r.input.charCodeAt(r.position),(r.line===i||r.lineIndent>e)&&u!==0)Pt(r,"bad indentation of a sequence entry");else if(r.lineIndent<e)break}return h?(r.tag=n,r.anchor=a,r.kind="sequence",r.result=o,!0):!1}A(nb,"readBlockSequence");function $3(r,e,i){var n,a,o,c,h,u,d=r.tag,p=r.anchor,g={},x=Object.create(null),y=null,b=null,_=null,k=!1,w=!1,T;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=g),T=r.input.charCodeAt(r.position);T!==0;){if(!k&&r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,Pt(r,"tab characters must not be used in indentation")),n=r.input.charCodeAt(r.position+1),o=r.line,(T===63||T===58)&&fi(n))T===63?(k&&(Go(r,g,x,y,b,null,c,h,u),y=b=_=null),w=!0,k=!0,a=!0):k?(k=!1,a=!0):Pt(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,T=n;else{if(c=r.line,h=r.lineStart,u=r.position,!fl(r,i,_3,!1,!0))break;if(r.line===o){for(T=r.input.charCodeAt(r.position);io(T);)T=r.input.charCodeAt(++r.position);if(T===58)T=r.input.charCodeAt(++r.position),fi(T)||Pt(r,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(Go(r,g,x,y,b,null,c,h,u),y=b=_=null),w=!0,k=!1,a=!1,y=r.tag,b=r.result;else if(w)Pt(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=d,r.anchor=p,!0}else if(w)Pt(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=d,r.anchor=p,!0}if((r.line===o||r.lineIndent>e)&&(k&&(c=r.line,h=r.lineStart,u=r.position),fl(r,e,og,!0,a)&&(k?b=r.result:_=r.result),k||(Go(r,g,x,y,b,_,c,h,u),y=b=_=null),yr(r,!0,-1),T=r.input.charCodeAt(r.position)),(r.line===o||r.lineIndent>e)&&T!==0)Pt(r,"bad indentation of a mapping entry");else if(r.lineIndent<e)break}return k&&Go(r,g,x,y,b,null,c,h,u),w&&(r.tag=d,r.anchor=p,r.kind="mapping",r.result=g),w}A($3,"readBlockMapping");function z3(r){var e,i=!1,n=!1,a,o,c;if(c=r.input.charCodeAt(r.position),c!==33)return!1;if(r.tag!==null&&Pt(r,"duplication of a tag property"),c=r.input.charCodeAt(++r.position),c===60?(i=!0,c=r.input.charCodeAt(++r.position)):c===33?(n=!0,a="!!",c=r.input.charCodeAt(++r.position)):a="!",e=r.position,i){do c=r.input.charCodeAt(++r.position);while(c!==0&&c!==62);r.position<r.length?(o=r.input.slice(e,r.position),c=r.input.charCodeAt(++r.position)):Pt(r,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!fi(c);)c===33&&(n?Pt(r,"tag suffix cannot contain exclamation marks"):(a=r.input.slice(e-1,r.position+1),S3.test(a)||Pt(r,"named tag handle cannot contain such characters"),n=!0,e=r.position+1)),c=r.input.charCodeAt(++r.position);o=r.input.slice(e,r.position),Y9.test(o)&&Pt(r,"tag suffix cannot contain flow indicator characters")}o&&!w3.test(o)&&Pt(r,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Pt(r,"tag name is malformed: "+o)}return i?r.tag=o:ao.call(r.tagMap,a)?r.tag=r.tagMap[a]+o:a==="!"?r.tag="!"+o:a==="!!"?r.tag="tag:yaml.org,2002:"+o:Pt(r,'undeclared tag handle "'+a+'"'),!0}A(z3,"readTagProperty");function q3(r){var e,i;if(i=r.input.charCodeAt(r.position),i!==38)return!1;for(r.anchor!==null&&Pt(r,"duplication of an anchor property"),i=r.input.charCodeAt(++r.position),e=r.position;i!==0&&!fi(i)&&!Yo(i);)i=r.input.charCodeAt(++r.position);return r.position===e&&Pt(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(e,r.position),!0}A(q3,"readAnchorProperty");function I3(r){var e,i,n;if(n=r.input.charCodeAt(r.position),n!==42)return!1;for(n=r.input.charCodeAt(++r.position),e=r.position;n!==0&&!fi(n)&&!Yo(n);)n=r.input.charCodeAt(++r.position);return r.position===e&&Pt(r,"name of an alias node must contain at least one character"),i=r.input.slice(e,r.position),ao.call(r.anchorMap,i)||Pt(r,'unidentified alias "'+i+'"'),r.result=r.anchorMap[i],yr(r,!0,-1),!0}A(I3,"readAlias");function fl(r,e,i,n,a){var o,c,h,u=1,d=!1,p=!1,g,x,y,b,_,k;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,o=c=h=og===i||k3===i,n&&yr(r,!0,-1)&&(d=!0,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)),u===1)for(;z3(r)||q3(r);)yr(r,!0,-1)?(d=!0,h=o,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=d||a),(u===1||og===i)&&(sg===i||_3===i?_=e:_=e+1,k=r.position-r.lineStart,u===1?h&&(nb(r,k)||$3(r,k,_))||D3(r,_)?p=!0:(c&&F3(r,_)||R3(r,_)||j3(r,_)?p=!0:I3(r)?(p=!0,(r.tag!==null||r.anchor!==null)&&Pt(r,"alias node should not have any properties")):N3(r,_,sg===i)&&(p=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):u===0&&(p=h&&nb(r,k))),r.tag===null)r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);else if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&Pt(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),g=0,x=r.implicitTypes.length;g<x;g+=1)if(b=r.implicitTypes[g],b.resolve(r.result)){r.result=b.construct(r.result),r.tag=b.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else if(r.tag!=="!"){if(ao.call(r.typeMap[r.kind||"fallback"],r.tag))b=r.typeMap[r.kind||"fallback"][r.tag];else for(b=null,y=r.typeMap.multi[r.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(r.tag.slice(0,y[g].tag.length)===y[g].tag){b=y[g];break}b||Pt(r,"unknown tag !<"+r.tag+">"),r.result!==null&&b.kind!==r.kind&&Pt(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+b.kind+'", not "'+r.kind+'"'),b.resolve(r.result,r.tag)?(r.result=b.construct(r.result,r.tag),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):Pt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||p}A(fl,"composeNode");function P3(r){var e=r.position,i,n,a,o=!1,c;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap=Object.create(null),r.anchorMap=Object.create(null);(c=r.input.charCodeAt(r.position))!==0&&(yr(r,!0,-1),c=r.input.charCodeAt(r.position),!(r.lineIndent>0||c!==37));){for(o=!0,c=r.input.charCodeAt(++r.position),i=r.position;c!==0&&!fi(c);)c=r.input.charCodeAt(++r.position);for(n=r.input.slice(i,r.position),a=[],n.length<1&&Pt(r,"directive name must not be less than one character in length");c!==0;){for(;io(c);)c=r.input.charCodeAt(++r.position);if(c===35){do c=r.input.charCodeAt(++r.position);while(c!==0&&!On(c));break}if(On(c))break;for(i=r.position;c!==0&&!fi(c);)c=r.input.charCodeAt(++r.position);a.push(r.input.slice(i,r.position))}c!==0&&Ug(r),ao.call(US,n)?US[n](r,n,a):sf(r,'unknown document directive "'+n+'"')}if(yr(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,yr(r,!0,-1)):o&&Pt(r,"directives end mark is expected"),fl(r,r.lineIndent-1,og,!1,!0),yr(r,!0,-1),r.checkLineBreaks&&W9.test(r.input.slice(e,r.position))&&sf(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Af(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,yr(r,!0,-1));return}if(r.position<r.length-1)Pt(r,"end of the stream or a document separator is expected");else return}A(P3,"readDocument");function G1(r,e){r=String(r),e=e||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
242
|
+
`),r.charCodeAt(0)===65279&&(r=r.slice(1)));var i=new O3(r,e),n=r.indexOf("\0");for(n!==-1&&(i.position=n,Pt(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)P3(i);return i.documents}A(G1,"loadDocuments");function G9(r,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var n=G1(r,i);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}A(G9,"loadAll$1");function H3(r,e){var i=G1(r,e);if(i.length!==0){if(i.length===1)return i[0];throw new Ni("expected a single document in the stream, but found more")}}A(H3,"load$1");var V9=H3,X9={load:V9},U3=Object.prototype.toString,W3=Object.prototype.hasOwnProperty,V1=65279,Q9=9,of=10,Z9=13,K9=32,J9=33,tq=34,ab=35,eq=37,rq=38,iq=39,nq=42,Y3=44,aq=45,lg=58,sq=61,oq=62,lq=63,cq=64,G3=91,V3=93,hq=96,X3=123,uq=124,Q3=125,ii={};ii[0]="\\0";ii[7]="\\a";ii[8]="\\b";ii[9]="\\t";ii[10]="\\n";ii[11]="\\v";ii[12]="\\f";ii[13]="\\r";ii[27]="\\e";ii[34]='\\"';ii[92]="\\\\";ii[133]="\\N";ii[160]="\\_";ii[8232]="\\L";ii[8233]="\\P";var fq=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],dq=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Z3(r,e){var i,n,a,o,c,h,u;if(e===null)return{};for(i={},n=Object.keys(e),a=0,o=n.length;a<o;a+=1)c=n[a],h=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=r.compiledTypeMap.fallback[c],u&&W3.call(u.styleAliases,h)&&(h=u.styleAliases[h]),i[c]=h;return i}A(Z3,"compileStyleMap");function K3(r){var e,i,n;if(e=r.toString(16).toUpperCase(),r<=255)i="x",n=2;else if(r<=65535)i="u",n=4;else if(r<=4294967295)i="U",n=8;else throw new Ni("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Or.repeat("0",n-e.length)+e}A(K3,"encodeHex");var pq=1,lf=2;function J3(r){this.schema=r.schema||C3,this.indent=Math.max(1,r.indent||2),this.noArrayIndent=r.noArrayIndent||!1,this.skipInvalid=r.skipInvalid||!1,this.flowLevel=Or.isNothing(r.flowLevel)?-1:r.flowLevel,this.styleMap=Z3(this.schema,r.styles||null),this.sortKeys=r.sortKeys||!1,this.lineWidth=r.lineWidth||80,this.noRefs=r.noRefs||!1,this.noCompatMode=r.noCompatMode||!1,this.condenseFlow=r.condenseFlow||!1,this.quotingType=r.quotingType==='"'?lf:pq,this.forceQuotes=r.forceQuotes||!1,this.replacer=typeof r.replacer=="function"?r.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}A(J3,"State");function sb(r,e){for(var i=Or.repeat(" ",e),n=0,a=-1,o="",c,h=r.length;n<h;)a=r.indexOf(`
|
|
243
|
+
`,n),a===-1?(c=r.slice(n),n=h):(c=r.slice(n,a+1),n=a+1),c.length&&c!==`
|
|
244
|
+
`&&(o+=i),o+=c;return o}A(sb,"indentString");function cg(r,e){return`
|
|
245
|
+
`+Or.repeat(" ",r.indent*e)}A(cg,"generateNextLine");function t5(r,e){var i,n,a;for(i=0,n=r.implicitTypes.length;i<n;i+=1)if(a=r.implicitTypes[i],a.resolve(e))return!0;return!1}A(t5,"testImplicitResolving");function cf(r){return r===K9||r===Q9}A(cf,"isWhitespace");function Jc(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==V1||65536<=r&&r<=1114111}A(Jc,"isPrintable");function ob(r){return Jc(r)&&r!==V1&&r!==Z9&&r!==of}A(ob,"isNsCharOrWhitespace");function lb(r,e,i){var n=ob(r),a=n&&!cf(r);return(i?n:n&&r!==Y3&&r!==G3&&r!==V3&&r!==X3&&r!==Q3)&&r!==ab&&!(e===lg&&!a)||ob(e)&&!cf(e)&&r===ab||e===lg&&a}A(lb,"isPlainSafe");function e5(r){return Jc(r)&&r!==V1&&!cf(r)&&r!==aq&&r!==lq&&r!==lg&&r!==Y3&&r!==G3&&r!==V3&&r!==X3&&r!==Q3&&r!==ab&&r!==rq&&r!==nq&&r!==J9&&r!==uq&&r!==sq&&r!==oq&&r!==iq&&r!==tq&&r!==eq&&r!==cq&&r!==hq}A(e5,"isPlainSafeFirst");function r5(r){return!cf(r)&&r!==lg}A(r5,"isPlainSafeLast");function yc(r,e){var i=r.charCodeAt(e),n;return i>=55296&&i<=56319&&e+1<r.length&&(n=r.charCodeAt(e+1),n>=56320&&n<=57343)?(i-55296)*1024+n-56320+65536:i}A(yc,"codePointAt");function X1(r){var e=/^\n* /;return e.test(r)}A(X1,"needIndentIndicator");var i5=1,cb=2,n5=3,a5=4,pc=5;function s5(r,e,i,n,a,o,c,h){var u,d=0,p=null,g=!1,x=!1,y=n!==-1,b=-1,_=e5(yc(r,0))&&r5(yc(r,r.length-1));if(e||c)for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=yc(r,u),!Jc(d))return pc;_=_&&lb(d,p,h),p=d}else{for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=yc(r,u),d===of)g=!0,y&&(x=x||u-b-1>n&&r[b+1]!==" ",b=u);else if(!Jc(d))return pc;_=_&&lb(d,p,h),p=d}x=x||y&&u-b-1>n&&r[b+1]!==" "}return!g&&!x?_&&!c&&!a(r)?i5:o===lf?pc:cb:i>9&&X1(r)?pc:c?o===lf?pc:cb:x?a5:n5}A(s5,"chooseScalarStyle");function o5(r,e,i,n,a){r.dump=(function(){if(e.length===0)return r.quotingType===lf?'""':"''";if(!r.noCompatMode&&(fq.indexOf(e)!==-1||dq.test(e)))return r.quotingType===lf?'"'+e+'"':"'"+e+"'";var o=r.indent*Math.max(1,i),c=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-o),h=n||r.flowLevel>-1&&i>=r.flowLevel;function u(d){return t5(r,d)}switch(A(u,"testAmbiguity"),s5(e,h,r.indent,c,u,r.quotingType,r.forceQuotes&&!n,a)){case i5:return e;case cb:return"'"+e.replace(/'/g,"''")+"'";case n5:return"|"+hb(e,r.indent)+ub(sb(e,o));case a5:return">"+hb(e,r.indent)+ub(sb(l5(e,c),o));case pc:return'"'+c5(e)+'"';default:throw new Ni("impossible error: invalid scalar style")}})()}A(o5,"writeScalar");function hb(r,e){var i=X1(r)?String(e):"",n=r[r.length-1]===`
|
|
246
|
+
`,a=n&&(r[r.length-2]===`
|
|
247
|
+
`||r===`
|
|
248
|
+
`),o=a?"+":n?"":"-";return i+o+`
|
|
249
|
+
`}A(hb,"blockHeader");function ub(r){return r[r.length-1]===`
|
|
250
|
+
`?r.slice(0,-1):r}A(ub,"dropEndingNewline");function l5(r,e){for(var i=/(\n+)([^\n]*)/g,n=(function(){var d=r.indexOf(`
|
|
251
|
+
`);return d=d!==-1?d:r.length,i.lastIndex=d,fb(r.slice(0,d),e)})(),a=r[0]===`
|
|
252
|
+
`||r[0]===" ",o,c;c=i.exec(r);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
|
|
253
|
+
`:"")+fb(u,e),a=o}return n}A(l5,"foldString");function fb(r,e){if(r===""||r[0]===" ")return r;for(var i=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=i.exec(r);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
|
|
254
|
+
`+r.slice(a,o),a=o+1),c=h;return u+=`
|
|
255
|
+
`,r.length-a>e&&c>a?u+=r.slice(a,c)+`
|
|
256
|
+
`+r.slice(c+1):u+=r.slice(a),u.slice(1)}A(fb,"foldLine");function c5(r){for(var e="",i=0,n,a=0;a<r.length;i>=65536?a+=2:a++)i=yc(r,a),n=ii[i],!n&&Jc(i)?(e+=r[a],i>=65536&&(e+=r[a+1])):e+=n||K3(i);return e}A(c5,"escapeString");function h5(r,e,i){var n="",a=r.tag,o,c,h;for(o=0,c=i.length;o<c;o+=1)h=i[o],r.replacer&&(h=r.replacer.call(i,String(o),h)),(sa(r,e,h,!1,!1)||typeof h>"u"&&sa(r,e,null,!1,!1))&&(n!==""&&(n+=","+(r.condenseFlow?"":" ")),n+=r.dump);r.tag=a,r.dump="["+n+"]"}A(h5,"writeFlowSequence");function db(r,e,i,n){var a="",o=r.tag,c,h,u;for(c=0,h=i.length;c<h;c+=1)u=i[c],r.replacer&&(u=r.replacer.call(i,String(c),u)),(sa(r,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&sa(r,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=cg(r,e)),r.dump&&of===r.dump.charCodeAt(0)?a+="-":a+="- ",a+=r.dump);r.tag=o,r.dump=a||"[]"}A(db,"writeBlockSequence");function u5(r,e,i){var n="",a=r.tag,o=Object.keys(i),c,h,u,d,p;for(c=0,h=o.length;c<h;c+=1)p="",n!==""&&(p+=", "),r.condenseFlow&&(p+='"'),u=o[c],d=i[u],r.replacer&&(d=r.replacer.call(i,u,d)),sa(r,e,u,!1,!1)&&(r.dump.length>1024&&(p+="? "),p+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),sa(r,e,d,!1,!1)&&(p+=r.dump,n+=p));r.tag=a,r.dump="{"+n+"}"}A(u5,"writeFlowMapping");function f5(r,e,i,n){var a="",o=r.tag,c=Object.keys(i),h,u,d,p,g,x;if(r.sortKeys===!0)c.sort();else if(typeof r.sortKeys=="function")c.sort(r.sortKeys);else if(r.sortKeys)throw new Ni("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!n||a!=="")&&(x+=cg(r,e)),d=c[h],p=i[d],r.replacer&&(p=r.replacer.call(i,d,p)),sa(r,e+1,d,!0,!0,!0)&&(g=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024,g&&(r.dump&&of===r.dump.charCodeAt(0)?x+="?":x+="? "),x+=r.dump,g&&(x+=cg(r,e)),sa(r,e+1,p,!0,g)&&(r.dump&&of===r.dump.charCodeAt(0)?x+=":":x+=": ",x+=r.dump,a+=x));r.tag=o,r.dump=a||"{}"}A(f5,"writeBlockMapping");function pb(r,e,i){var n,a,o,c,h,u;for(a=i?r.explicitTypes:r.implicitTypes,o=0,c=a.length;o<c;o+=1)if(h=a[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof e=="object"&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(i?h.multi&&h.representName?r.tag=h.representName(e):r.tag=h.tag:r.tag="?",h.represent){if(u=r.styleMap[h.tag]||h.defaultStyle,U3.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(W3.call(h.represent,u))n=h.represent[u](e,u);else throw new Ni("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');r.dump=n}return!0}return!1}A(pb,"detectType");function sa(r,e,i,n,a,o,c){r.tag=null,r.dump=i,pb(r,i,!1)||pb(r,i,!0);var h=U3.call(r.dump),u=n,d;n&&(n=r.flowLevel<0||r.flowLevel>e);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=r.duplicates.indexOf(i),x=g!==-1),(r.tag!==null&&r.tag!=="?"||x||r.indent!==2&&e>0)&&(a=!1),x&&r.usedDuplicates[g])r.dump="*ref_"+g;else{if(p&&x&&!r.usedDuplicates[g]&&(r.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(r.dump).length!==0?(f5(r,e,r.dump,a),x&&(r.dump="&ref_"+g+r.dump)):(u5(r,e,r.dump),x&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object Array]")n&&r.dump.length!==0?(r.noArrayIndent&&!c&&e>0?db(r,e-1,r.dump,a):db(r,e,r.dump,a),x&&(r.dump="&ref_"+g+r.dump)):(h5(r,e,r.dump),x&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object String]")r.tag!=="?"&&o5(r,r.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(r.skipInvalid)return!1;throw new Ni("unacceptable kind of an object to dump "+h)}r.tag!==null&&r.tag!=="?"&&(d=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21"),r.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",r.dump=d+" "+r.dump)}return!0}A(sa,"writeNode");function d5(r,e){var i=[],n=[],a,o;for(hg(r,i,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(i[n[a]]);e.usedDuplicates=new Array(o)}A(d5,"getDuplicateReferences");function hg(r,e,i){var n,a,o;if(r!==null&&typeof r=="object")if(a=e.indexOf(r),a!==-1)i.indexOf(a)===-1&&i.push(a);else if(e.push(r),Array.isArray(r))for(a=0,o=r.length;a<o;a+=1)hg(r[a],e,i);else for(n=Object.keys(r),a=0,o=n.length;a<o;a+=1)hg(r[n[a]],e,i)}A(hg,"inspectNode");function gq(r,e){e=e||{};var i=new J3(e);i.noRefs||d5(r,i);var n=r;return i.replacer&&(n=i.replacer.call({"":n},"",n)),sa(i,0,n,!0,!0)?i.dump+`
|
|
257
|
+
`:""}A(gq,"dump$1");function mq(r,e){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}A(mq,"renamed");var yq=n3,xq=X9.load;/*! Bundled license information:
|
|
258
|
+
|
|
259
|
+
js-yaml/dist/js-yaml.mjs:
|
|
260
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
261
|
+
*/var hu=A((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";const i=r.x??0,n=r.y??0;return"translate("+-(i+r.width/2)+", "+-(n+r.height/2)+")"},"computeLabelTransform"),ti={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},WS={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ru(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=tr(r),e=tr(e);const[i,n]=[r.x,r.y],[a,o]=[e.x,e.y],c=a-i,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}A(Ru,"calculateDeltaAndAngle");var tr=A(r=>Array.isArray(r)?{x:r[0],y:r[1]}:r,"pointTransformer"),bq=A(r=>({x:A(function(e,i,n){let a=0;const o=tr(n[0]).x<tr(n[n.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(ti,r.arrowTypeStart)){const{angle:y,deltaX:b}=Ru(n[0],n[1]);a=ti[r.arrowTypeStart]*Math.cos(y)*(b>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(ti,r.arrowTypeEnd)){const{angle:y,deltaX:b}=Ru(n[n.length-1],n[n.length-2]);a=ti[r.arrowTypeEnd]*Math.cos(y)*(b>=0?1:-1)}const c=Math.abs(tr(e).x-tr(n[n.length-1]).x),h=Math.abs(tr(e).y-tr(n[n.length-1]).y),u=Math.abs(tr(e).x-tr(n[0]).x),d=Math.abs(tr(e).y-tr(n[0]).y),p=ti[r.arrowTypeStart],g=ti[r.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="right"?-1:1,a-=y}if(u<p&&u>0&&d<p){let y=p+x-u;y*=o==="right"?-1:1,a+=y}return tr(e).x+a},"x"),y:A(function(e,i,n){let a=0;const o=tr(n[0]).y<tr(n[n.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(ti,r.arrowTypeStart)){const{angle:y,deltaY:b}=Ru(n[0],n[1]);a=ti[r.arrowTypeStart]*Math.abs(Math.sin(y))*(b>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(ti,r.arrowTypeEnd)){const{angle:y,deltaY:b}=Ru(n[n.length-1],n[n.length-2]);a=ti[r.arrowTypeEnd]*Math.abs(Math.sin(y))*(b>=0?1:-1)}const c=Math.abs(tr(e).y-tr(n[n.length-1]).y),h=Math.abs(tr(e).x-tr(n[n.length-1]).x),u=Math.abs(tr(e).y-tr(n[0]).y),d=Math.abs(tr(e).x-tr(n[0]).x),p=ti[r.arrowTypeStart],g=ti[r.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="up"?-1:1,a-=y}if(u<p&&u>0&&d<p){let y=p+x-u;y*=o==="up"?-1:1,a+=y}return tr(e).y+a},"y")}),"getLineFunctionsWithOffset"),ap={},Er={},YS;function vq(){return YS||(YS=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.BLANK_URL=Er.relativeFirstCharacters=Er.whitespaceEscapeCharsRegex=Er.urlSchemeRegex=Er.ctrlCharactersRegex=Er.htmlCtrlEntityRegex=Er.htmlEntitiesRegex=Er.invalidProtocolRegex=void 0,Er.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Er.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Er.htmlCtrlEntityRegex=/&(newline|tab);/gi,Er.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Er.urlSchemeRegex=/^.+(:|:)/gim,Er.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Er.relativeFirstCharacters=[".","/"],Er.BLANK_URL="about:blank"),Er}var GS;function Cq(){if(GS)return ap;GS=1,Object.defineProperty(ap,"__esModule",{value:!0}),ap.sanitizeUrl=o;var r=vq();function e(c){return r.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(r.ctrlCharactersRegex,"");return h.replace(r.htmlEntitiesRegex,function(u,d){return String.fromCharCode(d)})}function n(c){return URL.canParse(c)}function a(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return r.BLANK_URL;var h,u=a(c.trim());do u=i(u).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(r.ctrlCharactersRegex)||u.match(r.htmlEntitiesRegex)||u.match(r.htmlCtrlEntityRegex)||u.match(r.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=u;if(!d)return r.BLANK_URL;if(e(d))return d;var p=d.trimStart(),g=p.match(r.urlSchemeRegex);if(!g)return d;var x=g[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(x))return r.BLANK_URL;var y=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!n(y))return r.BLANK_URL;var b=new URL(y);return b.protocol=b.protocol.toLowerCase(),b.hostname=b.hostname.toLowerCase(),b.toString()}return y}return ap}var _q=Cq(),p5=typeof global=="object"&&global&&global.Object===Object&&global,kq=typeof self=="object"&&self&&self.Object===Object&&self,$n=p5||kq||Function("return this")(),ug=$n.Symbol,g5=Object.prototype,Sq=g5.hasOwnProperty,wq=g5.toString,uu=ug?ug.toStringTag:void 0;function Tq(r){var e=Sq.call(r,uu),i=r[uu];try{r[uu]=void 0;var n=!0}catch{}var a=wq.call(r);return n&&(e?r[uu]=i:delete r[uu]),a}var Bq=Object.prototype,Aq=Bq.toString;function Eq(r){return Aq.call(r)}var Mq="[object Null]",Lq="[object Undefined]",VS=ug?ug.toStringTag:void 0;function bl(r){return r==null?r===void 0?Lq:Mq:VS&&VS in Object(r)?Tq(r):Eq(r)}function jn(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Oq="[object AsyncFunction]",Nq="[object Function]",Rq="[object GeneratorFunction]",jq="[object Proxy]";function Q1(r){if(!jn(r))return!1;var e=bl(r);return e==Nq||e==Rq||e==Oq||e==jq}var j0=$n["__core-js_shared__"],XS=(function(){var r=/[^.]+$/.exec(j0&&j0.keys&&j0.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Dq(r){return!!XS&&XS in r}var Fq=Function.prototype,$q=Fq.toString;function vl(r){if(r!=null){try{return $q.call(r)}catch{}try{return r+""}catch{}}return""}var zq=/[\\^$.*+?()[\]{}|]/g,qq=/^\[object .+?Constructor\]$/,Iq=Function.prototype,Pq=Object.prototype,Hq=Iq.toString,Uq=Pq.hasOwnProperty,Wq=RegExp("^"+Hq.call(Uq).replace(zq,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yq(r){if(!jn(r)||Dq(r))return!1;var e=Q1(r)?Wq:qq;return e.test(vl(r))}function Gq(r,e){return r==null?void 0:r[e]}function Cl(r,e){var i=Gq(r,e);return Yq(i)?i:void 0}var hf=Cl(Object,"create");function Vq(){this.__data__=hf?hf(null):{},this.size=0}function Xq(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Qq="__lodash_hash_undefined__",Zq=Object.prototype,Kq=Zq.hasOwnProperty;function Jq(r){var e=this.__data__;if(hf){var i=e[r];return i===Qq?void 0:i}return Kq.call(e,r)?e[r]:void 0}var tI=Object.prototype,eI=tI.hasOwnProperty;function rI(r){var e=this.__data__;return hf?e[r]!==void 0:eI.call(e,r)}var iI="__lodash_hash_undefined__";function nI(r,e){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=hf&&e===void 0?iI:e,this}function dl(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}dl.prototype.clear=Vq;dl.prototype.delete=Xq;dl.prototype.get=Jq;dl.prototype.has=rI;dl.prototype.set=nI;function aI(){this.__data__=[],this.size=0}function Yg(r,e){return r===e||r!==r&&e!==e}function Gg(r,e){for(var i=r.length;i--;)if(Yg(r[i][0],e))return i;return-1}var sI=Array.prototype,oI=sI.splice;function lI(r){var e=this.__data__,i=Gg(e,r);if(i<0)return!1;var n=e.length-1;return i==n?e.pop():oI.call(e,i,1),--this.size,!0}function cI(r){var e=this.__data__,i=Gg(e,r);return i<0?void 0:e[i][1]}function hI(r){return Gg(this.__data__,r)>-1}function uI(r,e){var i=this.__data__,n=Gg(i,r);return n<0?(++this.size,i.push([r,e])):i[n][1]=e,this}function ts(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}ts.prototype.clear=aI;ts.prototype.delete=lI;ts.prototype.get=cI;ts.prototype.has=hI;ts.prototype.set=uI;var uf=Cl($n,"Map");function fI(){this.size=0,this.__data__={hash:new dl,map:new(uf||ts),string:new dl}}function dI(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Vg(r,e){var i=r.__data__;return dI(e)?i[typeof e=="string"?"string":"hash"]:i.map}function pI(r){var e=Vg(this,r).delete(r);return this.size-=e?1:0,e}function gI(r){return Vg(this,r).get(r)}function mI(r){return Vg(this,r).has(r)}function yI(r,e){var i=Vg(this,r),n=i.size;return i.set(r,e),this.size+=i.size==n?0:1,this}function lo(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}lo.prototype.clear=fI;lo.prototype.delete=pI;lo.prototype.get=gI;lo.prototype.has=mI;lo.prototype.set=yI;var xI="Expected a function";function Ef(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(xI);var i=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=i.cache;if(o.has(a))return o.get(a);var c=r.apply(this,n);return i.cache=o.set(a,c)||o,c};return i.cache=new(Ef.Cache||lo),i}Ef.Cache=lo;function bI(){this.__data__=new ts,this.size=0}function vI(r){var e=this.__data__,i=e.delete(r);return this.size=e.size,i}function CI(r){return this.__data__.get(r)}function _I(r){return this.__data__.has(r)}var kI=200;function SI(r,e){var i=this.__data__;if(i instanceof ts){var n=i.__data__;if(!uf||n.length<kI-1)return n.push([r,e]),this.size=++i.size,this;i=this.__data__=new lo(n)}return i.set(r,e),this.size=i.size,this}function nh(r){var e=this.__data__=new ts(r);this.size=e.size}nh.prototype.clear=bI;nh.prototype.delete=vI;nh.prototype.get=CI;nh.prototype.has=_I;nh.prototype.set=SI;var fg=(function(){try{var r=Cl(Object,"defineProperty");return r({},"",{}),r}catch{}})();function Z1(r,e,i){e=="__proto__"&&fg?fg(r,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[e]=i}function gb(r,e,i){(i!==void 0&&!Yg(r[e],i)||i===void 0&&!(e in r))&&Z1(r,e,i)}function wI(r){return function(e,i,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(i(o[u],u,o)===!1)break}return e}}var TI=wI(),m5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,QS=m5&&typeof module=="object"&&module&&!module.nodeType&&module,BI=QS&&QS.exports===m5,ZS=BI?$n.Buffer:void 0,KS=ZS?ZS.allocUnsafe:void 0;function AI(r,e){if(e)return r.slice();var i=r.length,n=KS?KS(i):new r.constructor(i);return r.copy(n),n}var JS=$n.Uint8Array;function EI(r){var e=new r.constructor(r.byteLength);return new JS(e).set(new JS(r)),e}function MI(r,e){var i=e?EI(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}function LI(r,e){var i=-1,n=r.length;for(e||(e=Array(n));++i<n;)e[i]=r[i];return e}var tw=Object.create,OI=(function(){function r(){}return function(e){if(!jn(e))return{};if(tw)return tw(e);r.prototype=e;var i=new r;return r.prototype=void 0,i}})();function y5(r,e){return function(i){return r(e(i))}}var x5=y5(Object.getPrototypeOf,Object),NI=Object.prototype;function Xg(r){var e=r&&r.constructor,i=typeof e=="function"&&e.prototype||NI;return r===i}function RI(r){return typeof r.constructor=="function"&&!Xg(r)?OI(x5(r)):{}}function ah(r){return r!=null&&typeof r=="object"}var jI="[object Arguments]";function ew(r){return ah(r)&&bl(r)==jI}var b5=Object.prototype,DI=b5.hasOwnProperty,FI=b5.propertyIsEnumerable,dg=ew((function(){return arguments})())?ew:function(r){return ah(r)&&DI.call(r,"callee")&&!FI.call(r,"callee")},pg=Array.isArray,$I=9007199254740991;function v5(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=$I}function Qg(r){return r!=null&&v5(r.length)&&!Q1(r)}function zI(r){return ah(r)&&Qg(r)}function qI(){return!1}var C5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rw=C5&&typeof module=="object"&&module&&!module.nodeType&&module,II=rw&&rw.exports===C5,iw=II?$n.Buffer:void 0,PI=iw?iw.isBuffer:void 0,K1=PI||qI,HI="[object Object]",UI=Function.prototype,WI=Object.prototype,_5=UI.toString,YI=WI.hasOwnProperty,GI=_5.call(Object);function VI(r){if(!ah(r)||bl(r)!=HI)return!1;var e=x5(r);if(e===null)return!0;var i=YI.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&_5.call(i)==GI}var XI="[object Arguments]",QI="[object Array]",ZI="[object Boolean]",KI="[object Date]",JI="[object Error]",tP="[object Function]",eP="[object Map]",rP="[object Number]",iP="[object Object]",nP="[object RegExp]",aP="[object Set]",sP="[object String]",oP="[object WeakMap]",lP="[object ArrayBuffer]",cP="[object DataView]",hP="[object Float32Array]",uP="[object Float64Array]",fP="[object Int8Array]",dP="[object Int16Array]",pP="[object Int32Array]",gP="[object Uint8Array]",mP="[object Uint8ClampedArray]",yP="[object Uint16Array]",xP="[object Uint32Array]",Xe={};Xe[hP]=Xe[uP]=Xe[fP]=Xe[dP]=Xe[pP]=Xe[gP]=Xe[mP]=Xe[yP]=Xe[xP]=!0;Xe[XI]=Xe[QI]=Xe[lP]=Xe[ZI]=Xe[cP]=Xe[KI]=Xe[JI]=Xe[tP]=Xe[eP]=Xe[rP]=Xe[iP]=Xe[nP]=Xe[aP]=Xe[sP]=Xe[oP]=!1;function bP(r){return ah(r)&&v5(r.length)&&!!Xe[bl(r)]}function vP(r){return function(e){return r(e)}}var k5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wu=k5&&typeof module=="object"&&module&&!module.nodeType&&module,CP=Wu&&Wu.exports===k5,D0=CP&&p5.process,nw=(function(){try{var r=Wu&&Wu.require&&Wu.require("util").types;return r||D0&&D0.binding&&D0.binding("util")}catch{}})(),aw=nw&&nw.isTypedArray,J1=aw?vP(aw):bP;function mb(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var _P=Object.prototype,kP=_P.hasOwnProperty;function SP(r,e,i){var n=r[e];(!(kP.call(r,e)&&Yg(n,i))||i===void 0&&!(e in r))&&Z1(r,e,i)}function wP(r,e,i,n){var a=!i;i||(i={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=r[h]),a?Z1(i,h,u):SP(i,h,u)}return i}function TP(r,e){for(var i=-1,n=Array(r);++i<r;)n[i]=e(i);return n}var BP=9007199254740991,AP=/^(?:0|[1-9]\d*)$/;function S5(r,e){var i=typeof r;return e=e??BP,!!e&&(i=="number"||i!="symbol"&&AP.test(r))&&r>-1&&r%1==0&&r<e}var EP=Object.prototype,MP=EP.hasOwnProperty;function LP(r,e){var i=pg(r),n=!i&&dg(r),a=!i&&!n&&K1(r),o=!i&&!n&&!a&&J1(r),c=i||n||a||o,h=c?TP(r.length,String):[],u=h.length;for(var d in r)(e||MP.call(r,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||S5(d,u)))&&h.push(d);return h}function OP(r){var e=[];if(r!=null)for(var i in Object(r))e.push(i);return e}var NP=Object.prototype,RP=NP.hasOwnProperty;function jP(r){if(!jn(r))return OP(r);var e=Xg(r),i=[];for(var n in r)n=="constructor"&&(e||!RP.call(r,n))||i.push(n);return i}function w5(r){return Qg(r)?LP(r,!0):jP(r)}function DP(r){return wP(r,w5(r))}function FP(r,e,i,n,a,o,c){var h=mb(r,i),u=mb(e,i),d=c.get(u);if(d){gb(r,i,d);return}var p=o?o(h,u,i+"",r,e,c):void 0,g=p===void 0;if(g){var x=pg(u),y=!x&&K1(u),b=!x&&!y&&J1(u);p=u,x||y||b?pg(h)?p=h:zI(h)?p=LI(h):y?(g=!1,p=AI(u,!0)):b?(g=!1,p=MI(u,!0)):p=[]:VI(u)||dg(u)?(p=h,dg(h)?p=DP(h):(!jn(h)||Q1(h))&&(p=RI(u))):g=!1}g&&(c.set(u,p),a(p,u,n,o,c),c.delete(u)),gb(r,i,p)}function T5(r,e,i,n,a){r!==e&&TI(e,function(o,c){if(a||(a=new nh),jn(o))FP(r,e,c,i,T5,n,a);else{var h=n?n(mb(r,c),o,c+"",r,e,a):void 0;h===void 0&&(h=o),gb(r,c,h)}},w5)}function B5(r){return r}function $P(r,e,i){switch(i.length){case 0:return r.call(e);case 1:return r.call(e,i[0]);case 2:return r.call(e,i[0],i[1]);case 3:return r.call(e,i[0],i[1],i[2])}return r.apply(e,i)}var sw=Math.max;function zP(r,e,i){return e=sw(e===void 0?r.length-1:e,0),function(){for(var n=arguments,a=-1,o=sw(n.length-e,0),c=Array(o);++a<o;)c[a]=n[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=n[a];return h[e]=i(c),$P(r,this,h)}}function qP(r){return function(){return r}}var IP=fg?function(r,e){return fg(r,"toString",{configurable:!0,enumerable:!1,value:qP(e),writable:!0})}:B5,PP=800,HP=16,UP=Date.now;function WP(r){var e=0,i=0;return function(){var n=UP(),a=HP-(n-i);if(i=n,a>0){if(++e>=PP)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var YP=WP(IP);function GP(r,e){return YP(zP(r,e,B5),r+"")}function VP(r,e,i){if(!jn(i))return!1;var n=typeof e;return(n=="number"?Qg(i)&&S5(e,i.length):n=="string"&&e in i)?Yg(i[e],r):!1}function XP(r){return GP(function(e,i){var n=-1,a=i.length,o=a>1?i[a-1]:void 0,c=a>2?i[2]:void 0;for(o=r.length>3&&typeof o=="function"?(a--,o):void 0,c&&VP(i[0],i[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=i[n];h&&r(e,h,n,o)}return e})}var QP=XP(function(r,e,i){T5(r,e,i)}),ZP="",KP={curveBasis:Jx,curveBasisClosed:Q7,curveBasisOpen:Z7,curveBumpX:dE,curveBumpY:pE,curveBundle:K7,curveCardinalClosed:J7,curveCardinalOpen:t9,curveCardinal:xE,curveCatmullRomClosed:e9,curveCatmullRomOpen:r9,curveCatmullRom:vE,curveLinear:Uu,curveLinearClosed:i9,curveMonotoneX:TE,curveMonotoneY:BE,curveNatural:EE,curveStep:ME,curveStepAfter:OE,curveStepBefore:LE},JP=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tH=A(function(r,e){const i=A5(r,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(i)){const c=i.map(h=>h.args);Wp(c),n=Lr(n,[...c])}else n=i.args;if(!n)return;let a=v1(r,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),A5=A(function(r,e=null){var i,n;try{const a=new RegExp(`[%]{2}(?![{]${JP.source})(?=[}][%]{2}).*
|
|
262
|
+
`,"ig");r=r.trim().replace(a,"").replace(/'/gm,'"'),_t.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let o;const c=[];for(;(o=Pu.exec(r))!==null;)if(o.index===Pu.lastIndex&&Pu.lastIndex++,o&&!e||e&&((i=o[1])!=null&&i.match(e))||e&&((n=o[2])!=null&&n.match(e))){const h=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:r,args:null}:c.length===1?c[0]:c}catch(a){return _t.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),eH=A(function(r){return r.replace(Pu,"")},"removeDirectives"),rH=A(function(r,e){for(const[i,n]of e.entries())if(n.match(r))return i;return-1},"isSubstringInArray");function tv(r,e){if(!r)return e;const i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return KP[i]??e}A(tv,"interpolateToCurve");function E5(r,e){const i=r.trim();if(i)return e.securityLevel!=="loose"?_q.sanitizeUrl(i):i}A(E5,"formatUrl");var iH=A((r,...e)=>{const i=r.split("."),n=i.length-1,a=i[n];let o=window;for(let c=0;c<n;c++)if(o=o[i[c]],!o){_t.error(`Function name: ${r} not found in window`);return}o[a](...e)},"runFunc");function ev(r,e){return!r||!e?0:Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}A(ev,"distance");function M5(r){let e,i=0;r.forEach(a=>{i+=ev(a,e),e=a});const n=i/2;return rv(r,n)}A(M5,"traverseEdge");function L5(r){return r.length===1?r[0]:M5(r)}A(L5,"calcLabelPosition");var ow=A((r,e=2)=>{const i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),rv=A((r,e)=>{let i,n=e;for(const a of r){if(i){const o=ev(a,i);if(o===0)return i;if(o<n)n-=o;else{const c=n/o;if(c<=0)return i;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:ow((1-c)*i.x+c*a.x,5),y:ow((1-c)*i.y+c*a.y,5)}}}i=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),nH=A((r,e,i)=>{_t.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const a=rv(e,25),o=r?10:5,c=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*o+(e[0].x+a.x)/2,h.y=-Math.cos(c)*o+(e[0].y+a.y)/2,h},"calcCardinalityPosition");function O5(r,e,i){const n=structuredClone(i);_t.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+r,o=rv(n,a),c=10+r*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}A(O5,"calcTerminalLabelPosition");function N5(r){let e="",i="";for(const n of r)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?i=i+n+";":e=e+n+";");return{style:e,labelStyle:i}}A(N5,"getStylesFromArray");var lw=0,aH=A(()=>(lw++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lw),"generateId");function R5(r){let e="";const i="0123456789abcdef",n=i.length;for(let a=0;a<r;a++)e+=i.charAt(Math.floor(Math.random()*n));return e}A(R5,"makeRandomHex");var sH=A(r=>R5(r.length),"random"),oH=A(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"),lH=A(function(r,e){const i=e.text.replace(Sf.lineBreakRegex," "),[,n]=Zg(e.fontSize),a=r.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(i),a},"drawSimpleText"),cH=Ef((r,e,i)=>{if(!r||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Sf.lineBreakRegex.test(r)))return r;const n=r.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=Ka(`${c} `,i),d=Ka(o,i);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=hH(c,e,"-",i);a.push(o,...x),o=y}else d+u>=e?(a.push(o),o=c):o=[o,c].filter(Boolean).join(" ");h+1===n.length&&a.push(o)}),a.filter(c=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),hH=Ef((r,e,i="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...r],o=[];let c="";return a.forEach((h,u)=>{const d=`${c}${h}`;if(Ka(d,n)>=e){const g=u+1,x=a.length===g,y=`${d}${i}`;o.push(x?d:y),c=""}else c=d}),{hyphenatedStrings:o,remainingWord:c}},(r,e,i="-",n)=>`${r}${e}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function j5(r,e){return iv(r,e).height}A(j5,"calculateTextHeight");function Ka(r,e){return iv(r,e).width}A(Ka,"calculateTextWidth");var iv=Ef((r,e)=>{const{fontSize:i=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!r)return{width:0,height:0};const[,o]=Zg(i),c=["sans-serif",n],h=r.split(Sf.lineBreakRegex),u=[],d=Xt("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const x of c){let y=0;const b={width:0,height:0,lineHeight:0};for(const _ of h){const k=oH();k.text=_||ZP;const w=lH(p,k).style("font-size",o).style("font-weight",a).style("font-family",x),T=(w._groups||w)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");b.width=Math.round(Math.max(b.width,T.width)),y=Math.round(T.height),b.height+=y,b.lineHeight=Math.round(Math.max(b.lineHeight,y))}u.push(b)}p.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Gc,uH=(Gc=class{constructor(e=!1,i){this.count=0,this.count=i?i.length:0,this.next=e?()=>this.count++:()=>Date.now()}},A(Gc,"InitIDGenerator"),Gc),sp,fH=A(function(r){return sp=sp||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),sp.innerHTML=r,unescape(sp.textContent)},"entityDecode");function nv(r){return"str"in r}A(nv,"isDetailedError");var dH=A((r,e,i,n)=>{var o;if(!n)return;const a=(o=r.node())==null?void 0:o.getBBox();a&&r.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Zg=A(r=>{if(typeof r=="number")return[r,r+"px"];const e=parseInt(r??"",10);return Number.isNaN(e)?[void 0,void 0]:r===String(e)?[e,r+"px"]:[e,r]},"parseFontSize");function av(r,e){return QP({},r,e)}A(av,"cleanAndMerge");var Mn={assignWithDepth:Lr,wrapLabel:cH,calculateTextHeight:j5,calculateTextWidth:Ka,calculateTextDimensions:iv,cleanAndMerge:av,detectInit:tH,detectDirective:A5,isSubstringInArray:rH,interpolateToCurve:tv,calcLabelPosition:L5,calcCardinalityPosition:nH,calcTerminalLabelPosition:O5,formatUrl:E5,getStylesFromArray:N5,generateId:aH,random:sH,runFunc:iH,entityDecode:fH,insertTitle:dH,isLabelCoordinateInPath:D5,parseFontSize:Zg,InitIDGenerator:uH},pH=A(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){const n=i.substring(1,i.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),pl=A(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Pet=A((r,e,{counter:i=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${r}_${e}_${i}${a?`_${a}`:""}`,"getEdgeId");function zr(r){return r??null}A(zr,"handleUndefinedAttr");function D5(r,e){const i=Math.round(r.x),n=Math.round(r.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(i.toString())||a.includes(n.toString())}A(D5,"isLabelCoordinateInPath");var sv=A(({flowchart:r})=>{var a,o;const e=((a=r==null?void 0:r.subGraphTitleMargin)==null?void 0:a.top)??0,i=((o=r==null?void 0:r.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function F5(r,e){const i=r.getElementsByTagName("img");if(!i||i.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=we().fontSize?we().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=SA.fontSize]=Zg(h),p=d*u+"px";a.style.minWidth=p,a.style.maxWidth=p}else a.style.width="100%";o(a)}A(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}A(F5,"configureLabelImages");var gH=A(r=>{const{handDrawnSeed:e}=we();return{fill:r,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:r,seed:e}},"solidStateFill"),sh=A(r=>{const e=mH([...r.cssCompiledStyles||[],...r.cssStyles||[],...r.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),mH=A(r=>{const e=new Map;return r.forEach(i=>{const[n,a]=i.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),$5=A(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"),Ft=A(r=>{const{stylesArray:e}=sh(r),i=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];$5(h)?i.push(c.join(":")+" !important"):(n.push(c.join(":")+" !important"),h.includes("stroke")&&a.push(c.join(":")+" !important"),h==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),Dt=A((r,e)=>{var u;const{themeVariables:i,handDrawnSeed:n}=we(),{nodeBorder:a,mainBkg:o}=i,{stylesMap:c}=sh(r);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||a,seed:n,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:yH(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),yH=A(r=>{if(!r)return[0,0];const e=r.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const i=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[i,n]},"getStrokeDashArray");const xH=Object.freeze({left:0,top:0,width:16,height:16}),gg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),z5=Object.freeze({...xH,...gg}),bH=Object.freeze({...z5,body:"",hidden:!1}),vH=Object.freeze({width:null,height:null}),CH=Object.freeze({...vH,...gg}),_H=(r,e,i,n="")=>{const a=r.split(":");if(r.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const h=a.pop(),u=a.pop(),d={provider:a.length>0?a[0]:n,prefix:u,name:h};return F0(d)?d:null}const o=a[0],c=o.split("-");if(c.length>1){const h={provider:n,prefix:c.shift(),name:c.join("-")};return F0(h)?h:null}if(i&&n===""){const h={provider:n,prefix:"",name:o};return F0(h,i)?h:null}return null},F0=(r,e)=>r?!!((e&&r.prefix===""||r.prefix)&&r.name):!1;function kH(r,e){const i={};!r.hFlip!=!e.hFlip&&(i.hFlip=!0),!r.vFlip!=!e.vFlip&&(i.vFlip=!0);const n=((r.rotate||0)+(e.rotate||0))%4;return n&&(i.rotate=n),i}function cw(r,e){const i=kH(r,e);for(const n in bH)n in gg?n in r&&!(n in i)&&(i[n]=gg[n]):n in e?i[n]=e[n]:n in r&&(i[n]=r[n]);return i}function SH(r,e){const i=r.icons,n=r.aliases||Object.create(null),a=Object.create(null);function o(c){if(i[c])return a[c]=[];if(!(c in a)){a[c]=null;const h=n[c]&&n[c].parent,u=h&&o(h);u&&(a[c]=[h].concat(u))}return a[c]}return(e||Object.keys(i).concat(Object.keys(n))).forEach(o),a}function hw(r,e,i){const n=r.icons,a=r.aliases||Object.create(null);let o={};function c(h){o=cw(n[h]||a[h],o)}return c(e),i.forEach(c),cw(r,o)}function wH(r,e){if(r.icons[e])return hw(r,e,[]);const i=SH(r,[e])[e];return i?hw(r,e,i):null}const TH=/(-?[0-9.]*[0-9]+[0-9.]*)/g,BH=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function uw(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;const n=r.split(TH);if(n===null||!n.length)return r;const a=[];let o=n.shift(),c=BH.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*i)/i)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function AH(r,e="defs"){let i="";const n=r.indexOf("<"+e);for(;n>=0;){const a=r.indexOf(">",n),o=r.indexOf("</"+e);if(a===-1||o===-1)break;const c=r.indexOf(">",o);if(c===-1)break;i+=r.slice(a+1,o).trim(),r=r.slice(0,n).trim()+r.slice(c+1)}return{defs:i,content:r}}function EH(r,e){return r?"<defs>"+r+"</defs>"+e:e}function MH(r,e,i){const n=AH(r);return EH(n.defs,e+n.content+i)}const LH=r=>r==="unset"||r==="undefined"||r==="none";function OH(r,e){const i={...z5,...r},n={...CH,...e},a={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,n].forEach(_=>{const k=[],w=_.hFlip,T=_.vFlip;let B=_.rotate;w?T?B+=2:(k.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),k.push("scale(-1 1)"),a.top=a.left=0):T&&(k.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),k.push("scale(1 -1)"),a.top=a.left=0);let E;switch(B<0&&(B-=Math.floor(B/4)*4),B=B%4,B){case 1:E=a.height/2+a.top,k.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:k.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:E=a.width/2+a.left,k.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}B%2===1&&(a.left!==a.top&&(E=a.left,a.left=a.top,a.top=E),a.width!==a.height&&(E=a.width,a.width=a.height,a.height=E)),k.length&&(o=MH(o,'<g transform="'+k.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,d=a.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?d:h,p=uw(g,u/d)):(p=c==="auto"?u:c,g=h===null?uw(p,d/u):h==="auto"?d:h);const x={},y=(_,k)=>{LH(k)||(x[_]=k.toString())};y("width",p),y("height",g);const b=[a.left,a.top,u,d];return x.viewBox=b.join(" "),{attributes:x,viewBox:b,body:o}}const NH=/\sid="(\S+)"/g,fw=new Map;function RH(r){r=r.replace(/[0-9]+$/,"")||"a";const e=fw.get(r)||0;return fw.set(r,e+1),e?`${r}${e}`:r}function jH(r){const e=[];let i;for(;i=NH.exec(r);)e.push(i[1]);if(!e.length)return r;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=RH(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),r=r.replace(new RegExp(n,"g"),""),r}function DH(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)i+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}function ov(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _l=ov();function q5(r){_l=r}var Yu={exec:()=>null};function Te(r,e=""){let i=typeof r=="string"?r:r.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(di.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var FH=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),di={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")},$H=/^(?:[ \t]*(?:\n|$))+/,zH=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qH=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,IH=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lv=/(?:[*+-]|\d{1,9}[.)])/,I5=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,P5=Te(I5).replace(/bull/g,lv).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(),PH=Te(I5).replace(/bull/g,lv).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(),cv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,HH=/^[^\n]+/,hv=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,UH=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",hv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),WH=Te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lv).getRegex(),Kg="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",uv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,YH=Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",uv).replace("tag",Kg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H5=Te(cv).replace("hr",Mf).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",Kg).getRegex(),GH=Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",H5).getRegex(),fv={blockquote:GH,code:zH,def:UH,fences:qH,heading:IH,hr:Mf,html:YH,lheading:P5,list:WH,newline:$H,paragraph:H5,table:Yu,text:HH},dw=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kg).getRegex(),VH={...fv,lheading:PH,table:dw,paragraph:Te(cv).replace("hr",Mf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dw).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",Kg).getRegex()},XH={...fv,html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",uv).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:Yu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(cv).replace("hr",Mf).replace("heading",` *#{1,6} *[^
|
|
263
|
+
]`).replace("lheading",P5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},QH=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ZH=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,U5=/^( {2,}|\\)\n(?!\s*$)/,KH=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jg=/[\p{P}\p{S}]/u,dv=/[\s\p{P}\p{S}]/u,W5=/[^\s\p{P}\p{S}]/u,JH=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dv).getRegex(),Y5=/(?!~)[\p{P}\p{S}]/u,tU=/(?!~)[\s\p{P}\p{S}]/u,eU=/(?:[^\s\p{P}\p{S}]|~)/u,rU=Te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",FH?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),G5=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,iU=Te(G5,"u").replace(/punct/g,Jg).getRegex(),nU=Te(G5,"u").replace(/punct/g,Y5).getRegex(),V5="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",aU=Te(V5,"gu").replace(/notPunctSpace/g,W5).replace(/punctSpace/g,dv).replace(/punct/g,Jg).getRegex(),sU=Te(V5,"gu").replace(/notPunctSpace/g,eU).replace(/punctSpace/g,tU).replace(/punct/g,Y5).getRegex(),oU=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,W5).replace(/punctSpace/g,dv).replace(/punct/g,Jg).getRegex(),lU=Te(/\\(punct)/,"gu").replace(/punct/g,Jg).getRegex(),cU=Te(/^<(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(),hU=Te(uv).replace("(?:-->|$)","-->").getRegex(),uU=Te("^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",hU).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,fU=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),X5=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",mg).replace("ref",hv).getRegex(),Q5=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",hv).getRegex(),dU=Te("reflink|nolink(?!\\()","g").replace("reflink",X5).replace("nolink",Q5).getRegex(),pw=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pv={_backpedal:Yu,anyPunctuation:lU,autolink:cU,blockSkip:rU,br:U5,code:ZH,del:Yu,emStrongLDelim:iU,emStrongRDelimAst:aU,emStrongRDelimUnd:oU,escape:QH,link:fU,nolink:Q5,punctuation:JH,reflink:X5,reflinkSearch:dU,tag:uU,text:KH,url:Yu},pU={...pv,link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",mg).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mg).getRegex()},yb={...pv,emStrongRDelimAst:sU,emStrongLDelim:nU,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",pw).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:Te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",pw).getRegex()},gU={...yb,br:Te(U5).replace("{2,}","*").getRegex(),text:Te(yb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},op={normal:fv,gfm:VH,pedantic:XH},fu={normal:pv,gfm:yb,breaks:gU,pedantic:pU},mU={"&":"&","<":"<",">":">",'"':""","'":"'"},gw=r=>mU[r];function Xn(r,e){if(e){if(di.escapeTest.test(r))return r.replace(di.escapeReplace,gw)}else if(di.escapeTestNoEncode.test(r))return r.replace(di.escapeReplaceNoEncode,gw);return r}function mw(r){try{r=encodeURI(r).replace(di.percentDecode,"%")}catch{return null}return r}function yw(r,e){var o;let i=r.replace(di.findPipe,(c,h,u)=>{let d=!1,p=h;for(;--p>=0&&u[p]==="\\";)d=!d;return d?"|":" |"}),n=i.split(di.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(di.slashPipe,"|");return n}function du(r,e,i){let n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function yU(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function xw(r,e,i,n,a){let o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function xU(r,e,i){let n=r.match(i.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
|
264
|
+
`).map(o=>{let c=o.match(i.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
265
|
+
`)}var yg=class{constructor(e){Ut(this,"options");Ut(this,"rules");Ut(this,"lexer");this.options=e||_l}space(e){let i=this.rules.block.newline.exec(e);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(e){let i=this.rules.block.code.exec(e);if(i){let n=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?n:du(n,`
|
|
266
|
+
`)}}}fences(e){let i=this.rules.block.fences.exec(e);if(i){let n=i[0],a=xU(n,i[3]||"",this.rules);return{type:"code",raw:n,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(e){let i=this.rules.block.heading.exec(e);if(i){let n=i[2].trim();if(this.rules.other.endingHash.test(n)){let a=du(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let i=this.rules.block.hr.exec(e);if(i)return{type:"hr",raw:du(i[0],`
|
|
267
|
+
`)}}blockquote(e){let i=this.rules.block.blockquote.exec(e);if(i){let n=du(i[0],`
|
|
268
|
+
`).split(`
|
|
269
|
+
`),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))u.push(n[d]),h=!0;else if(!h)u.push(n[d]);else break;n=n.slice(d);let p=u.join(`
|
|
270
|
+
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
271
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
272
|
+
${p}`:p,o=o?`${o}
|
|
273
|
+
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,n.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let b=y,_=b.raw+`
|
|
274
|
+
`+n.join(`
|
|
275
|
+
`),k=this.blockquote(_);c[c.length-1]=k,a=a.substring(0,a.length-b.raw.length)+k.raw,o=o.substring(0,o.length-b.text.length)+k.text;break}else if((y==null?void 0:y.type)==="list"){let b=y,_=b.raw+`
|
|
276
|
+
`+n.join(`
|
|
277
|
+
`),k=this.list(_);c[c.length-1]=k,a=a.substring(0,a.length-y.raw.length)+k.raw,o=o.substring(0,o.length-b.raw.length)+k.raw,n=_.substring(c.at(-1).raw.length).split(`
|
|
278
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let i=this.rules.block.list.exec(e);if(i){let n=i[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let d=!1,p="",g="";if(!(i=c.exec(e))||this.rules.block.hr.test(e))break;p=i[0],e=e.substring(p.length);let x=i[2].split(`
|
|
279
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
|
|
280
|
+
`,1)[0],b=!x.trim(),_=0;if(this.options.pedantic?(_=2,g=x.trimStart()):b?_=i[1].length+1:(_=i[2].search(this.rules.other.nonSpaceChar),_=_>4?1:_,g=x.slice(_),_+=i[1].length),b&&this.rules.other.blankLine.test(y)&&(p+=y+`
|
|
281
|
+
`,e=e.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(_),B=this.rules.other.hrRegex(_),E=this.rules.other.fencesBeginRegex(_),O=this.rules.other.headingBeginRegex(_),j=this.rules.other.htmlBeginRegex(_);for(;e;){let M=e.split(`
|
|
282
|
+
`,1)[0],N;if(y=M,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),N=y):N=y.replace(this.rules.other.tabCharGlobal," "),E.test(y)||O.test(y)||j.test(y)||T.test(y)||B.test(y))break;if(N.search(this.rules.other.nonSpaceChar)>=_||!y.trim())g+=`
|
|
283
|
+
`+N.slice(_);else{if(b||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(x)||O.test(x)||B.test(x))break;g+=`
|
|
284
|
+
`+y}!b&&!y.trim()&&(b=!0),p+=M+`
|
|
285
|
+
`,e=e.substring(M.length+1),x=N.slice(_)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let k=null,w;this.options.gfm&&(k=this.rules.other.listIsTask.exec(g),k&&(w=k[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:p,task:!!k,checked:w,loose:!1,text:g,tokens:[]}),o.raw+=p}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.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 p=o.items[d].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(e){let i=this.rules.block.html.exec(e);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(e){let i=this.rules.block.def.exec(e);if(i){let n=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:n,raw:i[0],href:a,title:o}}}table(e){var h;let i=this.rules.block.table.exec(e);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let n=yw(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
286
|
+
`):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(yw(u,c.header.length).map((d,p)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[p]})));return c}}lheading(e){let i=this.rules.block.lheading.exec(e);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(e){let i=this.rules.block.paragraph.exec(e);if(i){let n=i[1].charAt(i[1].length-1)===`
|
|
287
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let i=this.rules.block.text.exec(e);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(e){let i=this.rules.inline.escape.exec(e);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(e){let i=this.rules.inline.tag.exec(e);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(e){let i=this.rules.inline.link.exec(e);if(i){let n=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=du(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=yU(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let a=i[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=i[3]?i[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),xw(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(e,i){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=i[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return xw(n,o,n[0],this.lexer,this.rules)}}emStrong(e,i,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...a[0]].length-1,c,h,u=o,d=0,p=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*e.length+o);(a=p.exec(i))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(h=[...c].length,a[3]||a[4]){u+=h;continue}else if((a[5]||a[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);let g=[...a[0]][0].length,x=e.slice(0,o+a.index+g+h);if(Math.min(o,h)%2){let b=x.slice(1,-1);return{type:"em",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let i=this.rules.inline.code.exec(e);if(i){let n=i[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:i[0],text:n}}}br(e){let i=this.rules.inline.br.exec(e);if(i)return{type:"br",raw:i[0]}}del(e){let i=this.rules.inline.del.exec(e);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(e){let i=this.rules.inline.autolink.exec(e);if(i){let n,a;return i[2]==="@"?(n=i[1],a="mailto:"+n):(n=i[1],a=n),{type:"link",raw:i[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let i;if(i=this.rules.inline.url.exec(e)){let a,o;if(i[2]==="@")a=i[0],o="mailto:"+a;else{let c;do c=i[0],i[0]=((n=this.rules.inline._backpedal.exec(i[0]))==null?void 0:n[0])??"";while(c!==i[0]);a=i[0],i[1]==="www."?o="http://"+i[0]:o=i[0]}return{type:"link",raw:i[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let i=this.rules.inline.text.exec(e);if(i){let n=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:n}}}},Bn=class xb{constructor(e){Ut(this,"tokens");Ut(this,"options");Ut(this,"state");Ut(this,"tokenizer");Ut(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_l,this.options.tokenizer=this.options.tokenizer||new yg,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:di,block:op.normal,inline:fu.normal};this.options.pedantic?(i.block=op.pedantic,i.inline=fu.pedantic):this.options.gfm&&(i.block=op.gfm,this.options.breaks?i.inline=fu.breaks:i.inline=fu.gfm),this.tokenizer.rules=i}static get rules(){return{block:op,inline:fu}}static lex(e,i){return new xb(i).lex(e)}static lexInline(e,i){return new xb(i).inlineTokens(e)}lex(e){e=e.replace(di.carriageReturn,`
|
|
288
|
+
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(di.tabCharGlobal," ").replace(di.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
289
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
290
|
+
`)?"":`
|
|
291
|
+
`)+h.raw,d.text+=`
|
|
292
|
+
`+h.text,this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
293
|
+
`)?"":`
|
|
294
|
+
`)+h.raw,d.text+=`
|
|
295
|
+
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},i.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let d=i.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
296
|
+
`)?"":`
|
|
297
|
+
`)+h.raw,d.text+=`
|
|
298
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
299
|
+
`)?"":`
|
|
300
|
+
`)+h.raw,d.text+=`
|
|
301
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){var u,d,p,g,x;let n=e,a=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let y;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(_=>(y=_.call({lexer:this},e,i))?(e=e.substring(y.raw.length),i.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let _=i.at(-1);y.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=y.raw,_.text+=y.text):i.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),i.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),i.push(y);continue}let b=e;if((x=this.options.extensions)!=null&&x.startInline){let _=1/0,k=e.slice(1),w;this.options.extensions.startInline.forEach(T=>{w=T.call({lexer:this},k),typeof w=="number"&&w>=0&&(_=Math.min(_,w))}),_<1/0&&_>=0&&(b=e.substring(0,_+1))}if(y=this.tokenizer.inlineText(b)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let _=i.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=y.raw,_.text+=y.text):i.push(y);continue}if(e){let _="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return i}},xg=class{constructor(e){Ut(this,"options");Ut(this,"parser");this.options=e||_l}space(e){return""}code({text:e,lang:i,escaped:n}){var c;let a=(c=(i||"").match(di.notSpaceStart))==null?void 0:c[0],o=e.replace(di.endingNewline,"")+`
|
|
302
|
+
`;return a?'<pre><code class="language-'+Xn(a)+'">'+(n?o:Xn(o,!0))+`</code></pre>
|
|
303
|
+
`:"<pre><code>"+(n?o:Xn(o,!0))+`</code></pre>
|
|
304
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
305
|
+
${this.parser.parse(e)}</blockquote>
|
|
306
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:i}){return`<h${i}>${this.parser.parseInline(e)}</h${i}>
|
|
307
|
+
`}hr(e){return`<hr>
|
|
308
|
+
`}list(e){let i=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=i?"ol":"ul",c=i&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
|
|
309
|
+
`+a+"</"+o+`>
|
|
310
|
+
`}listitem(e){var n;let i="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+Xn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(e.tokens,!!e.loose),`<li>${i}</li>
|
|
311
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
312
|
+
`}table(e){let i="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);i+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
313
|
+
<thead>
|
|
314
|
+
`+i+`</thead>
|
|
315
|
+
`+a+`</table>
|
|
316
|
+
`}tablerow({text:e}){return`<tr>
|
|
317
|
+
${e}</tr>
|
|
318
|
+
`}tablecell(e){let i=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+i+`</${n}>
|
|
319
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:i,tokens:n}){let a=this.parser.parseInline(n),o=mw(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return i&&(c+=' title="'+Xn(i)+'"'),c+=">"+a+"</a>",c}image({href:e,title:i,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=mw(e);if(o===null)return Xn(n);e=o;let c=`<img src="${e}" alt="${n}"`;return i&&(c+=` title="${Xn(i)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xn(e.text)}},gv=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},An=class bb{constructor(e){Ut(this,"options");Ut(this,"renderer");Ut(this,"textRenderer");this.options=e||_l,this.options.renderer=this.options.renderer||new xg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gv}static parse(e,i){return new bb(i).parse(e)}static parseInline(e,i){return new bb(i).parseInline(e)}parse(e,i=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=h,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=p||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,p=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],p+=`
|
|
320
|
+
`+this.renderer.text(d);i?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,i=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}let u=h;switch(u.type){case"escape":{n+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},vp,ju=(vp=class{constructor(e){Ut(this,"options");Ut(this,"block");this.options=e||_l}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Bn.lex:Bn.lexInline}provideParser(){return this.block?An.parse:An.parseInline}},Ut(vp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ut(vp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),vp),bU=class{constructor(...e){Ut(this,"defaults",ov());Ut(this,"options",this.setOptions);Ut(this,"parse",this.parseMarkdown(!0));Ut(this,"parseInline",this.parseMarkdown(!1));Ut(this,"Parser",An);Ut(this,"Renderer",xg);Ut(this,"TextRenderer",gv);Ut(this,"Lexer",Bn);Ut(this,"Tokenizer",yg);Ut(this,"Hooks",ju);this.use(...e)}walkTokens(e,i){var a,o;let n=[];for(let c of e)switch(n=n.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let d of u)n=n.concat(this.walkTokens(d.tokens,i));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,i));break}default:{let h=c;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let d=h[u].flat(1/0);n=n.concat(this.walkTokens(d,i))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,i)))}}return n}use(...e){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=i.renderers[o.name];c?i.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[o.level];c?c.unshift(o.tokenizer):i[o.level]=[o.tokenizer],o.start&&(o.level==="block"?i.startBlock?i.startBlock.push(o.start):i.startBlock=[o.start]:o.level==="inline"&&(i.startInline?i.startInline.push(o.start):i.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(i.childTokens[o.name]=o.childTokens)}),a.extensions=i),n.renderer){let o=this.defaults.renderer||new xg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],d=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=d.apply(o,p)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new yg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],d=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=d.apply(o,p)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new ju;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],d=o[h];ju.passThroughHooks.has(c)?o[h]=p=>{if(this.defaults.async&&ju.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(o,p);return d.call(o,x)})();let g=u.call(o,p);return d.call(o,g)}:o[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(o,p);return x===!1&&(x=await d.apply(o,p)),x})();let g=u.apply(o,p);return g===!1&&(g=d.apply(o,p)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,i){return Bn.lex(e,i??this.defaults)}parser(e,i){return An.parse(e,i??this.defaults)}parseMarkdown(e){return(i,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(i):i,u=await(o.hooks?await o.hooks.provideLexer():e?Bn.lex:Bn.lexInline)(h,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser():e?An.parse:An.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(c);try{o.hooks&&(i=o.hooks.preprocess(i));let h=(o.hooks?o.hooks.provideLexer():e?Bn.lex:Bn.lexInline)(i,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?An.parse:An.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,i){return n=>{if(n.message+=`
|
|
321
|
+
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Xn(n.message+"",!0)+"</pre>";return i?Promise.resolve(a):a}if(i)return Promise.reject(n);throw n}}},gl=new bU;function Le(r,e){return gl.parse(r,e)}Le.options=Le.setOptions=function(r){return gl.setOptions(r),Le.defaults=gl.defaults,q5(Le.defaults),Le};Le.getDefaults=ov;Le.defaults=_l;Le.use=function(...r){return gl.use(...r),Le.defaults=gl.defaults,q5(Le.defaults),Le};Le.walkTokens=function(r,e){return gl.walkTokens(r,e)};Le.parseInline=gl.parseInline;Le.Parser=An;Le.parser=An.parse;Le.Renderer=xg;Le.TextRenderer=gv;Le.Lexer=Bn;Le.lexer=Bn.lex;Le.Tokenizer=yg;Le.Hooks=ju;Le.parse=Le;Le.options;Le.setOptions;Le.use;Le.walkTokens;Le.parseInline;An.parse;Bn.lex;function Z5(r){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=Array.from(typeof r=="string"?[r]:r);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);return d?h.concat(d.map(function(p){var g,x;return(x=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(a.length){var o=new RegExp(`
|
|
322
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
|
|
323
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var d=c.match(/(?:^|\n)( *)$/),p=d?d[1]:"",g=h;typeof h=="string"&&h.includes(`
|
|
324
|
+
`)&&(g=String(h).split(`
|
|
325
|
+
`).map(function(x,y){return y===0?x:""+p+x}).join(`
|
|
326
|
+
`)),c+=g+n[u+1]}),c}var vU={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},vb=new Map,K5=new Map,CU=A(r=>{for(const e of r){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(_t.debug("Registering icon pack:",e.name),"loader"in e)K5.set(e.name,e.loader);else if("icons"in e)vb.set(e.name,e.icons);else throw _t.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),J5=A(async(r,e)=>{const i=_H(r,!0,e!==void 0);if(!i)throw new Error(`Invalid icon name: ${r}`);const n=i.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${r}`);let a=vb.get(n);if(!a){const c=K5.get(n);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{a={...await c(),prefix:n},vb.set(n,a)}catch(h){throw _t.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const o=wH(a,i.name);if(!o)throw new Error(`Icon not found: ${r}`);return o},"getRegisteredIconData"),_U=A(async r=>{try{return await J5(r),!0}catch{return!1}},"isIconAvailable"),Lf=A(async(r,e,i)=>{let n;try{n=await J5(r,e==null?void 0:e.fallbackPrefix)}catch(c){_t.error(c),n=vU}const a=OH(n,e),o=DH(jH(a.body),{...a.attributes,...i});return Rn(o,nr())},"getIconSVG");function tM(r,{markdownAutoWrap:e}){const n=r.replace(/<br\/>/g,`
|
|
327
|
+
`).replace(/\n{2,}/g,`
|
|
328
|
+
`);return Z5(n)}A(tM,"preprocessMarkdown");function eM(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var i;return((i=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(n=>({content:n,type:"normal"})))??[]})}A(eM,"nonMarkdownToLines");function rM(r,e={}){const i=tM(r,e),n=Le.lexer(i),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
329
|
+
`).forEach((p,g)=>{g!==0&&(o++,a.push([])),p.split(" ").forEach(x=>{x=x.replace(/'/g,"'"),x&&a[o].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return A(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(d=>{c(d)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}A(rM,"markdownToLines");function iM(r){return r?`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`:""}A(iM,"nonMarkdownToHTML");function nM(r,{markdownAutoWrap:e}={}){const i=Le.lexer(r);function n(a){var o,c,h;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(n).join("")}</strong>`:a.type==="em"?`<em>${(c=a.tokens)==null?void 0:c.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(h=a.tokens)==null?void 0:h.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(_t.warn(`Unsupported markdown: ${a.type}`),a.raw)}return A(n,"output"),i.map(n).join("")}A(nM,"markdownToHTML");function aM(r){return Intl.Segmenter?[...new Intl.Segmenter().segment(r)].map(e=>e.segment):[...r]}A(aM,"splitTextToChars");function sM(r,e){const i=aM(e.content);return mv(r,[],i,e.type)}A(sM,"splitWordToFitWidth");function mv(r,e,i,n){if(i.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=i,c=[...e,a];return r([{content:c.join(""),type:n}])?mv(r,c,o,n):(e.length===0&&a&&(e.push(a),i.shift()),[{content:e.join(""),type:n},{content:i.join(""),type:n}])}A(mv,"splitWordToFitWidthRecursion");function oM(r,e){if(r.some(({content:i})=>i.includes(`
|
|
330
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return bg(r,e)}A(oM,"splitLineToFitWidth");function bg(r,e,i=[],n=[]){if(r.length===0)return n.length>0&&i.push(n),i.length>0?i:[];let a="";r[0].content===" "&&(a=" ",r.shift());const o=r.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return bg(r,e,i,c);if(n.length>0)i.push(n),r.unshift(o);else if(o.content){const[h,u]=sM(e,o);i.push([h]),u.content&&r.unshift(u)}return bg(r,e,i)}A(bg,"splitLineToFitWidthRecursion");function Cb(r,e){e&&r.attr("style",e)}A(Cb,"applyStyle");var bw=16384;async function lM(r,e,i,n,a=!1,o=nr()){const c=r.append("foreignObject");c.attr("width",`${Math.min(10*i,bw)}px`),c.attr("height",`${Math.min(10*i,bw)}px`);const h=c.append("xhtml:div"),u=Ju(e.label)?await NA(e.label.replace(Sf.lineBreakRegex,`
|
|
331
|
+
`),o):Rn(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(u),Cb(p,e.labelStyle),p.attr("class",`${d} ${n}`),Cb(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}A(lM,"addHtmlSpan");function tm(r,e,i,n=!1){const a=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-.1+"em").attr("dy",i+"em");return n&&a.attr("text-anchor","middle"),a}A(tm,"createTspan");function cM(r,e,i){const n=r.append("text"),a=tm(n,1,e);em(a,i);const o=a.node().getComputedTextLength();return n.remove(),o}A(cM,"computeWidthOfText");function kU(r,e,i){var c;const n=r.append("text"),a=tm(n,1,e);em(a,[{content:i,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}A(kU,"computeDimensionOfText");function hM(r,e,i,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let d=0;for(const p of i){const g=A(y=>cM(c,1.1,y)<=r,"checkWidth"),x=g(p)?[p]:oM(p,g);for(const y of x){const b=tm(u,d,1.1,a);em(b,y),d++}}if(n){const p=u.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return u.node()}A(hM,"createFormattedText");function _b(r){const e=/&(amp|lt|gt);/g;return r.replace(e,(i,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}A(_b,"decodeHTMLEntities");function em(r,e){r.text(""),e.forEach((i,n)=>{const a=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");n===0?a.text(_b(i.content)):a.text(" "+_b(i.content))})}A(em,"updateTextContentAndStyles");async function uM(r,e={}){const i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(i.push((async()=>{const h=`${o}:${c}`;return await _U(h)?await Lf(h,void 0,{class:"label-icon"}):`<i class='${Rn(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}A(uM,"replaceIconSubstring");var es=A(async(r,e="",{style:i="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},p)=>{if(_t.debug("XYZ createText",e,i,n,a,o,h,"addSvgBackground: ",d),o){const g=c?nM(e,p):iM(e),x=await uM(pl(g),p),y=e.replace(/\\\\/g,"\\"),b={isNode:h,label:Ju(e)?y:x,labelStyle:i.replace("fill:","color:")};return await lM(r,b,u,a,d,p)}else{const g=pl(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?rM(g.replace("<br>","<br/>"),p):eM(g),y=hM(u,r,x,e?d:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const b=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).attr("style",b)}else{const b=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(y).select("rect").attr("style",b.replace(/background:/g,"fill:"));const _=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).select("text").attr("style",_)}return n?Xt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function $0(r,e,i){if(r&&r.length){const[n,a]=e,o=Math.PI/180*i,c=Math.cos(o),h=Math.sin(o);for(const u of r){const[d,p]=u;u[0]=(d-n)*c-(p-a)*h+n,u[1]=(d-n)*h+(p-a)*c+a}}}function SU(r,e){return r[0]===e[0]&&r[1]===e[1]}function wU(r,e,i,n=1){const a=i,o=Math.max(e,.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(a)for(const d of c)$0(d,h,a);const u=(function(d,p,g){const x=[];for(const T of d){const B=[...T];SU(B[0],B[B.length-1])||B.push([B[0][0],B[0][1]]),B.length>2&&x.push(B)}const y=[];p=Math.max(p,.1);const b=[];for(const T of x)for(let B=0;B<T.length-1;B++){const E=T[B],O=T[B+1];if(E[1]!==O[1]){const j=Math.min(E[1],O[1]);b.push({ymin:j,ymax:Math.max(E[1],O[1]),x:j===E[1]?E[0]:O[0],islope:(O[0]-E[0])/(O[1]-E[1])})}}if(b.sort(((T,B)=>T.ymin<B.ymin?-1:T.ymin>B.ymin?1:T.x<B.x?-1:T.x>B.x?1:T.ymax===B.ymax?0:(T.ymax-B.ymax)/Math.abs(T.ymax-B.ymax))),!b.length)return y;let _=[],k=b[0].ymin,w=0;for(;_.length||b.length;){if(b.length){let T=-1;for(let B=0;B<b.length&&!(b[B].ymin>k);B++)T=B;b.splice(0,T+1).forEach((B=>{_.push({s:k,edge:B})}))}if(_=_.filter((T=>!(T.edge.ymax<=k))),_.sort(((T,B)=>T.edge.x===B.edge.x?0:(T.edge.x-B.edge.x)/Math.abs(T.edge.x-B.edge.x))),(g!==1||w%p==0)&&_.length>1)for(let T=0;T<_.length;T+=2){const B=T+1;if(B>=_.length)break;const E=_[T].edge,O=_[B].edge;y.push([[Math.round(E.x),k],[Math.round(O.x),k]])}k+=g,_.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),w++}return y})(c,o,n);if(a){for(const d of c)$0(d,h,-a);(function(d,p,g){const x=[];d.forEach((y=>x.push(...y))),$0(x,p,g)})(u,h,-a)}return u}function Of(r,e){var i;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(o=a),wU(r,a,n,o||1)}let yv=class{constructor(e){this.helper=e}fillPolygons(e,i){return this._fillPolygons(e,i)}_fillPolygons(e,i){const n=Of(e,i);return{type:"fillSketch",ops:this.renderLines(n,i)}}renderLines(e,i){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],i));return n}};function rm(r){const e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}let TU=class extends yv{fillPolygons(e,i){let n=i.hachureGap;n<0&&(n=4*i.strokeWidth),n=Math.max(n,.1);const a=Of(e,Object.assign({},i,{hachureGap:n})),o=Math.PI/180*i.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[d,p]of a)rm([d,p])&&c.push([[d[0]-h,d[1]+u],[...p]],[[d[0]+h,d[1]-u],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}},BU=class extends yv{fillPolygons(e,i){const n=this._fillPolygons(e,i),a=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}},AU=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=Of(e,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(n,i)}dotsOnLines(e,i){const n=[];let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const c=a/4;for(const h of e){const u=rm(h),d=u/a,p=Math.ceil(d)-1,g=u-p*a,x=(h[0][0]+h[1][0])/2-a/4,y=Math.min(h[0][1],h[1][1]);for(let b=0;b<p;b++){const _=y+g+b*a,k=x-c+2*Math.random()*c,w=_-c+2*Math.random()*c,T=this.helper.ellipse(k,w,o,o,i);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}},EU=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=Of(e,i);return{type:"fillSketch",ops:this.dashedLine(n,i)}}dashedLine(e,i){const n=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,a=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,o=[];return e.forEach((c=>{const h=rm(c),u=Math.floor(h/(n+a)),d=(h+a-u*(n+a))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<u;y++){const b=y*(n+a),_=b+n,k=[p[0]+b*Math.cos(x)+d*Math.cos(x),p[1]+b*Math.sin(x)+d*Math.sin(x)],w=[p[0]+_*Math.cos(x)+d*Math.cos(x),p[1]+_*Math.sin(x)+d*Math.sin(x)];o.push(...this.helper.doubleLineOps(k[0],k[1],w[0],w[1],i))}})),o}},MU=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,a=i.zigzagOffset<0?n:i.zigzagOffset,o=Of(e,i=Object.assign({},i,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,i)}}zigzagLines(e,i,n){const a=[];return e.forEach((o=>{const c=rm(o),h=Math.round(c/(2*i));let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const p=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*i,y=2*(g+1)*i,b=Math.sqrt(2*Math.pow(i,2)),_=[u[0]+x*Math.cos(p),u[1]+x*Math.sin(p)],k=[u[0]+y*Math.cos(p),u[1]+y*Math.sin(p)],w=[_[0]+b*Math.cos(p+Math.PI/4),_[1]+b*Math.sin(p+Math.PI/4)];a.push(...this.helper.doubleLineOps(_[0],_[1],w[0],w[1],n),...this.helper.doubleLineOps(w[0],w[1],k[0],k[1],n))}})),a}};const Ai={};let LU=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const OU=0,z0=1,vw=2,lp={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 q0(r,e){return r.type===e}function xv(r){const e=[],i=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:OU,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:z0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:vw,text:""},h})(r);let n="BOD",a=0,o=i[a];for(;!q0(o,vw);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return xv("M0,0"+r);a++,c=lp[o.text],n=o.text}else q0(o,z0)?c=lp[n]:(a++,c=lp[o.text],n=o.text);if(!(a+c<i.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const d=i[u];if(!q0(d,z0))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof lp[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=i[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function fM(r){let e=0,i=0,n=0,a=0;const o=[];for(const{key:c,data:h}of r)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,i]=h,[n,a]=h;break;case"m":e+=h[0],i+=h[1],o.push({key:"M",data:[e,i]}),n=e,a=i;break;case"L":o.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],o.push({key:"L",data:[e,i]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{const u=h.map(((d,p)=>p%2?d+i:d+e));o.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{const u=h.map(((d,p)=>p%2?d+i:d+e));o.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":o.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],o.push({key:"V",data:[i]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{const u=h.map(((d,p)=>p%2?d+i:d+e));o.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],o.push({key:"T",data:[e,i]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,i=a}return o}function dM(r){const e=[];let i="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:d,data:p}of r){switch(d){case"M":e.push({key:"M",data:[...p]}),[n,a]=p,[o,c]=p;break;case"C":e.push({key:"C",data:[...p]}),n=p[4],a=p[5],h=p[2],u=p[3];break;case"L":e.push({key:"L",data:[...p]}),[n,a]=p;break;case"H":n=p[0],e.push({key:"L",data:[n,a]});break;case"V":a=p[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=n+(n-h),x=a+(a-u)):(g=n,x=a),e.push({key:"C",data:[g,x,...p]}),h=p[0],u=p[1],n=p[2],a=p[3];break}case"T":{const[g,x]=p;let y=0,b=0;i==="Q"||i==="T"?(y=n+(n-h),b=a+(a-u)):(y=n,b=a);const _=n+2*(y-n)/3,k=a+2*(b-a)/3,w=g+2*(y-g)/3,T=x+2*(b-x)/3;e.push({key:"C",data:[_,k,w,T,g,x]}),h=y,u=b,n=g,a=x;break}case"Q":{const[g,x,y,b]=p,_=n+2*(g-n)/3,k=a+2*(x-a)/3,w=y+2*(g-y)/3,T=b+2*(x-b)/3;e.push({key:"C",data:[_,k,w,T,y,b]}),h=g,u=x,n=y,a=b;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),y=p[2],b=p[3],_=p[4],k=p[5],w=p[6];g===0||x===0?(e.push({key:"C",data:[n,a,k,w,k,w]}),n=k,a=w):(n!==k||a!==w)&&(pM(n,a,k,w,g,x,y,b,_).forEach((function(T){e.push({key:"C",data:T})})),n=k,a=w);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}i=d}return e}function pu(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function pM(r,e,i,n,a,o,c,h,u,d){const p=(g=c,Math.PI*g/180);var g;let x=[],y=0,b=0,_=0,k=0;if(d)[y,b,_,k]=d;else{[r,e]=pu(r,e,-p),[i,n]=pu(i,n,-p);const W=(r-i)/2,F=(e-n)/2;let U=W*W/(a*a)+F*F/(o*o);U>1&&(U=Math.sqrt(U),a*=U,o*=U);const R=a*a,I=o*o,H=R*I-R*F*F-I*W*W,G=R*F*F+I*W*W,Z=(h===u?-1:1)*Math.sqrt(Math.abs(H/G));_=Z*a*F/o+(r+i)/2,k=Z*-o*W/a+(e+n)/2,y=Math.asin(parseFloat(((e-k)/o).toFixed(9))),b=Math.asin(parseFloat(((n-k)/o).toFixed(9))),r<_&&(y=Math.PI-y),i<_&&(b=Math.PI-b),y<0&&(y=2*Math.PI+y),b<0&&(b=2*Math.PI+b),u&&y>b&&(y-=2*Math.PI),!u&&b>y&&(b-=2*Math.PI)}let w=b-y;if(Math.abs(w)>120*Math.PI/180){const W=b,F=i,U=n;b=u&&b>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=pM(i=_+a*Math.cos(b),n=k+o*Math.sin(b),F,U,a,o,c,0,u,[b,W,_,k])}w=b-y;const T=Math.cos(y),B=Math.sin(y),E=Math.cos(b),O=Math.sin(b),j=Math.tan(w/4),M=4/3*a*j,N=4/3*o*j,Y=[r,e],$=[r+M*B,e-N*T],z=[i+M*O,n-N*E],K=[i,n];if($[0]=2*Y[0]-$[0],$[1]=2*Y[1]-$[1],d)return[$,z,K].concat(x);{x=[$,z,K].concat(x);const W=[];for(let F=0;F<x.length;F+=3){const U=pu(x[F][0],x[F][1],p),R=pu(x[F+1][0],x[F+1][1],p),I=pu(x[F+2][0],x[F+2][1],p);W.push([U[0],U[1],R[0],R[1],I[0],I[1]])}return W}}const NU={randOffset:function(r,e){return te(r,e)},randOffsetWithRange:function(r,e,i){return vg(r,e,i)},ellipse:function(r,e,i,n,a){const o=mM(i,n,a);return kb(r,e,a,o).opset},doubleLineOps:function(r,e,i,n,a){return so(r,e,i,n,a,!0)}};function gM(r,e,i,n,a){return{type:"path",ops:so(r,e,i,n,a)}}function Op(r,e,i){const n=(r||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...so(r[o][0],r[o][1],r[o+1][0],r[o+1][1],i));return e&&a.push(...so(r[n-1][0],r[n-1][1],r[0][0],r[0][1],i)),{type:"path",ops:a}}return n===2?gM(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function RU(r,e,i,n,a){return(function(o,c){return Op(o,!0,c)})([[r,e],[r+i,e],[r+i,e+n],[r,e+n]],a)}function Cw(r,e){if(r.length){const i=typeof r[0][0]=="number"?[r]:r,n=cp(i[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:cp(i[0],1.5*(1+.22*e.roughness),Sw(e));for(let o=1;o<i.length;o++){const c=i[o];if(c.length){const h=cp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:cp(c,1.5*(1+.22*e.roughness),Sw(e));for(const d of h)d.op!=="move"&&n.push(d);for(const d of u)d.op!=="move"&&a.push(d)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}function mM(r,e,i){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(r/2),h=Math.abs(e/2);const u=1-i.curveFitting;return c+=te(c*u,i),h+=te(h*u,i),{increment:o,rx:c,ry:h}}function kb(r,e,i,n){const[a,o]=ww(n.increment,r,e,n.rx,n.ry,1,n.increment*vg(.1,vg(.4,1,i),i),i);let c=Cg(a,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=ww(n.increment,r,e,n.rx,n.ry,1.5,0,i),u=Cg(h,null,i);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function _w(r,e,i,n,a,o,c,h,u){const d=r,p=e;let g=Math.abs(i/2),x=Math.abs(n/2);g+=te(.01*g,u),x+=te(.01*x,u);let y=a,b=o;for(;y<0;)y+=2*Math.PI,b+=2*Math.PI;b-y>2*Math.PI&&(y=0,b=2*Math.PI);const _=2*Math.PI/u.curveStepCount,k=Math.min(_/2,(b-y)/2),w=Tw(k,d,p,g,x,y,b,1,u);if(!u.disableMultiStroke){const T=Tw(k,d,p,g,x,y,b,1.5,u);w.push(...T)}return c&&(h?w.push(...so(d,p,d+g*Math.cos(y),p+x*Math.sin(y),u),...so(d,p,d+g*Math.cos(b),p+x*Math.sin(b),u)):w.push({op:"lineTo",data:[d,p]},{op:"lineTo",data:[d+g*Math.cos(y),p+x*Math.sin(y)]})),{type:"path",ops:w}}function kw(r,e){const i=dM(fM(xv(r))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...so(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,d,p,g,x,y]=h;n.push(...jU(u,d,p,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...so(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function I0(r,e){const i=[];for(const n of r)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){i.push({op:"move",data:[n[0][0]+te(a,e),n[0][1]+te(a,e)]});for(let c=1;c<o;c++)i.push({op:"lineTo",data:[n[c][0]+te(a,e),n[c][1]+te(a,e)]})}}return{type:"fillPath",ops:i}}function oc(r,e){return(function(i,n){let a=i.fillStyle||"hachure";if(!Ai[a])switch(a){case"zigzag":Ai[a]||(Ai[a]=new TU(n));break;case"cross-hatch":Ai[a]||(Ai[a]=new BU(n));break;case"dots":Ai[a]||(Ai[a]=new AU(n));break;case"dashed":Ai[a]||(Ai[a]=new EU(n));break;case"zigzag-line":Ai[a]||(Ai[a]=new MU(n));break;default:a="hachure",Ai[a]||(Ai[a]=new yv(n))}return Ai[a]})(e,NU).fillPolygons(r,e)}function Sw(r){const e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function yM(r){return r.randomizer||(r.randomizer=new LU(r.seed||0)),r.randomizer.next()}function vg(r,e,i,n=1){return i.roughness*n*(yM(i)*(e-r)+r)}function te(r,e,i=1){return vg(-r,r,e,i)}function so(r,e,i,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Sb(r,e,i,n,a,!0,!1);if(c)return h;const u=Sb(r,e,i,n,a,!0,!0);return h.concat(u)}function Sb(r,e,i,n,a,o,c){const h=Math.pow(r-i,2)+Math.pow(e-n,2),u=Math.sqrt(h);let d=1;d=u<200?1:u>500?.4:-.0016668*u+1.233334;let p=a.maxRandomnessOffset||0;p*p*100>h&&(p=u/10);const g=p/2,x=.2+.2*yM(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,b=a.bowing*a.maxRandomnessOffset*(r-i)/200;y=te(y,a,d),b=te(b,a,d);const _=[],k=()=>te(g,a,d),w=()=>te(p,a,d),T=a.preserveVertices;return c?_.push({op:"move",data:[r+(T?0:k()),e+(T?0:k())]}):_.push({op:"move",data:[r+(T?0:te(p,a,d)),e+(T?0:te(p,a,d))]}),c?_.push({op:"bcurveTo",data:[y+r+(i-r)*x+k(),b+e+(n-e)*x+k(),y+r+2*(i-r)*x+k(),b+e+2*(n-e)*x+k(),i+(T?0:k()),n+(T?0:k())]}):_.push({op:"bcurveTo",data:[y+r+(i-r)*x+w(),b+e+(n-e)*x+w(),y+r+2*(i-r)*x+w(),b+e+2*(n-e)*x+w(),i+(T?0:w()),n+(T?0:w())]}),_}function cp(r,e,i){if(!r.length)return[];const n=[];n.push([r[0][0]+te(e,i),r[0][1]+te(e,i)]),n.push([r[0][0]+te(e,i),r[0][1]+te(e,i)]);for(let a=1;a<r.length;a++)n.push([r[a][0]+te(e,i),r[a][1]+te(e,i)]),a===r.length-1&&n.push([r[a][0]+te(e,i),r[a][1]+te(e,i)]);return Cg(n,null,i)}function Cg(r,e,i){const n=r.length,a=[];if(n>3){const o=[],c=1-i.curveTightness;a.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<n;h++){const u=r[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*r[h+1][0]-c*r[h-1][0])/6,u[1]+(c*r[h+1][1]-c*r[h-1][1])/6],o[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],o[3]=[r[h+1][0],r[h+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(a.push({op:"move",data:[r[1][0],r[1][1]]}),a.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):n===2&&a.push(...Sb(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return a}function ww(r,e,i,n,a,o,c,h){const u=[],d=[];if(h.roughness===0){r/=4,d.push([e+n*Math.cos(-r),i+a*Math.sin(-r)]);for(let p=0;p<=2*Math.PI;p+=r){const g=[e+n*Math.cos(p),i+a*Math.sin(p)];u.push(g),d.push(g)}d.push([e+n*Math.cos(0),i+a*Math.sin(0)]),d.push([e+n*Math.cos(r),i+a*Math.sin(r)])}else{const p=te(.5,h)-Math.PI/2;d.push([te(o,h)+e+.9*n*Math.cos(p-r),te(o,h)+i+.9*a*Math.sin(p-r)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=r){const y=[te(o,h)+e+n*Math.cos(x),te(o,h)+i+a*Math.sin(x)];u.push(y),d.push(y)}d.push([te(o,h)+e+n*Math.cos(p+2*Math.PI+.5*c),te(o,h)+i+a*Math.sin(p+2*Math.PI+.5*c)]),d.push([te(o,h)+e+.98*n*Math.cos(p+c),te(o,h)+i+.98*a*Math.sin(p+c)]),d.push([te(o,h)+e+.9*n*Math.cos(p+.5*c),te(o,h)+i+.9*a*Math.sin(p+.5*c)])}return[d,u]}function Tw(r,e,i,n,a,o,c,h,u){const d=o+te(.1,u),p=[];p.push([te(h,u)+e+.9*n*Math.cos(d-r),te(h,u)+i+.9*a*Math.sin(d-r)]);for(let g=d;g<=c;g+=r)p.push([te(h,u)+e+n*Math.cos(g),te(h,u)+i+a*Math.sin(g)]);return p.push([e+n*Math.cos(c),i+a*Math.sin(c)]),p.push([e+n*Math.cos(c),i+a*Math.sin(c)]),Cg(p,null,u)}function jU(r,e,i,n,a,o,c,h){const u=[],d=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(x?0:te(d[0],h)),c[1]+(x?0:te(d[0],h))]}),p=x?[a,o]:[a+te(d[y],h),o+te(d[y],h)],u.push({op:"bcurveTo",data:[r+te(d[y],h),e+te(d[y],h),i+te(d[y],h),n+te(d[y],h),p[0],p[1]]});return u}function gu(r){return[...r]}function Bw(r,e=0){const i=r.length;if(i<3)throw new Error("A curve must have at least three points.");const n=[];if(i===3)n.push(gu(r[0]),gu(r[1]),gu(r[2]),gu(r[2]));else{const a=[];a.push(r[0],r[0]);for(let h=1;h<r.length;h++)a.push(r[h]),h===r.length-1&&a.push(r[h]);const o=[],c=1-e;n.push(gu(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function Np(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function DU(r,e,i){const n=Np(e,i);if(n===0)return Np(r,e);let a=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),Np(r,Io(e,i,a))}function Io(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function wb(r,e,i,n){const a=n||[];if((function(h,u){const d=h[u+0],p=h[u+1],g=h[u+2],x=h[u+3];let y=3*p[0]-2*d[0]-x[0];y*=y;let b=3*p[1]-2*d[1]-x[1];b*=b;let _=3*g[0]-2*x[0]-d[0];_*=_;let k=3*g[1]-2*x[1]-d[1];return k*=k,y<_&&(y=_),b<k&&(b=k),y+b})(r,e)<i){const h=r[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(Np(o,c))>1&&a.push(h)):a.push(h),a.push(r[e+3])}else{const u=r[e+0],d=r[e+1],p=r[e+2],g=r[e+3],x=Io(u,d,.5),y=Io(d,p,.5),b=Io(p,g,.5),_=Io(x,y,.5),k=Io(y,b,.5),w=Io(_,k,.5);wb([u,x,_,w],0,i,a),wb([w,k,b,g],0,i,a)}var o,c;return a}function FU(r,e){return _g(r,0,r.length,e)}function _g(r,e,i,n,a){const o=a||[],c=r[e],h=r[i-1];let u=0,d=1;for(let p=e+1;p<i-1;++p){const g=DU(r[p],c,h);g>u&&(u=g,d=p)}return Math.sqrt(u)>n?(_g(r,e,d+1,n,o),_g(r,d,i,n,o)):(o.length||o.push(c),o.push(h)),o}function P0(r,e=.15,i){const n=[],a=(r.length-1)/3;for(let o=0;o<a;o++)wb(r,3*o,e,n);return i&&i>0?_g(n,0,n.length,i):n}const Gi="none";class kg{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,i,n){return{shape:e,sets:i||[],options:n||this.defaultOptions}}line(e,i,n,a,o){const c=this._o(o);return this._d("line",[gM(e,i,n,a,c)],c)}rectangle(e,i,n,a,o){const c=this._o(o),h=[],u=RU(e,i,n,a,c);if(c.fill){const d=[[e,i],[e+n,i],[e+n,i+a],[e,i+a]];c.fillStyle==="solid"?h.push(I0([d],c)):h.push(oc([d],c))}return c.stroke!==Gi&&h.push(u),this._d("rectangle",h,c)}ellipse(e,i,n,a,o){const c=this._o(o),h=[],u=mM(n,a,c),d=kb(e,i,c,u);if(c.fill)if(c.fillStyle==="solid"){const p=kb(e,i,c,u).opset;p.type="fillPath",h.push(p)}else h.push(oc([d.estimatedPoints],c));return c.stroke!==Gi&&h.push(d.opset),this._d("ellipse",h,c)}circle(e,i,n,a){const o=this.ellipse(e,i,n,n,a);return o.shape="circle",o}linearPath(e,i){const n=this._o(i);return this._d("linearPath",[Op(e,!1,n)],n)}arc(e,i,n,a,o,c,h=!1,u){const d=this._o(u),p=[],g=_w(e,i,n,a,o,c,h,!0,d);if(h&&d.fill)if(d.fillStyle==="solid"){const x=Object.assign({},d);x.disableMultiStroke=!0;const y=_w(e,i,n,a,o,c,!0,!1,x);y.type="fillPath",p.push(y)}else p.push((function(x,y,b,_,k,w,T){const B=x,E=y;let O=Math.abs(b/2),j=Math.abs(_/2);O+=te(.01*O,T),j+=te(.01*j,T);let M=k,N=w;for(;M<0;)M+=2*Math.PI,N+=2*Math.PI;N-M>2*Math.PI&&(M=0,N=2*Math.PI);const Y=(N-M)/T.curveStepCount,$=[];for(let z=M;z<=N;z+=Y)$.push([B+O*Math.cos(z),E+j*Math.sin(z)]);return $.push([B+O*Math.cos(N),E+j*Math.sin(N)]),$.push([B,E]),oc([$],T)})(e,i,n,a,o,c,d));return d.stroke!==Gi&&p.push(g),this._d("arc",p,d)}curve(e,i){const n=this._o(i),a=[],o=Cw(e,n);if(n.fill&&n.fill!==Gi)if(n.fillStyle==="solid"){const c=Cw(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=e;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const d of u)d.length<3?c.push(...d):d.length===3?c.push(...P0(Bw([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...P0(Bw(d),10,(1+n.roughness)/2))}c.length&&a.push(oc([c],n))}return n.stroke!==Gi&&a.push(o),this._d("curve",a,n)}polygon(e,i){const n=this._o(i),a=[],o=Op(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(I0([e],n)):a.push(oc([e],n))),n.stroke!==Gi&&a.push(o),this._d("polygon",a,n)}path(e,i){const n=this._o(i),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==Gi,c=n.stroke!==Gi,h=!!(n.simplification&&n.simplification<1),u=(function(p,g,x){const y=dM(fM(xv(p))),b=[];let _=[],k=[0,0],w=[];const T=()=>{w.length>=4&&_.push(...P0(w,g)),w=[]},B=()=>{T(),_.length&&(b.push(_),_=[])};for(const{key:O,data:j}of y)switch(O){case"M":B(),k=[j[0],j[1]],_.push(k);break;case"L":T(),_.push([j[0],j[1]]);break;case"C":if(!w.length){const M=_.length?_[_.length-1]:k;w.push([M[0],M[1]])}w.push([j[0],j[1]]),w.push([j[2],j[3]]),w.push([j[4],j[5]]);break;case"Z":T(),_.push([k[0],k[1]])}if(B(),!x)return b;const E=[];for(const O of b){const j=FU(O,x);j.length&&E.push(j)}return E})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=kw(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const p=kw(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else a.push(I0(u,n));else a.push(oc(u,n));return c&&(h?u.forEach((p=>{a.push(Op(p,!1,n))})):a.push(d)),this._d("path",a,n)}opsToPath(e,i){let n="";for(const a of e.ops){const o=typeof i=="number"&&i>=0?a.data.map((c=>+c.toFixed(i))):a.data;switch(a.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const i=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of i){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Gi};break;case"fillPath":c={d:this.opsToPath(o),stroke:Gi,strokeWidth:0,fill:n.fill||Gi};break;case"fillSketch":c=this.fillSketch(o,n)}c&&a.push(c)}return a}fillSketch(e,i){let n=i.fillWeight;return n<0&&(n=i.strokeWidth/2),{d:this.opsToPath(e),stroke:i.fill||Gi,strokeWidth:n,fill:Gi}}_mergedShape(e){return e.filter(((i,n)=>n===0||i.op!=="move"))}}class $U{constructor(e,i){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new kg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,c,o),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const h=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,c,o,h),a.restore();break}case"fillSketch":this.fillSketch(a,c,n)}}fillSketch(e,i,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,i,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,i,n,a="nonzero"){e.beginPath();for(const o of i.ops){const c=typeof n=="number"&&n>=0?o.data.map((h=>+h.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(c[0],c[1]);break;case"bcurveTo":e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":e.lineTo(c[0],c[1])}}i.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c),c}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c),c}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c),c}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o),o}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n),n}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n),n}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d),d}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n),n}path(e,i){const n=this.gen.path(e,i);return this.draw(n),n}}const hp="http://www.w3.org/2000/svg";class zU{constructor(e,i){this.svg=e,this.gen=new kg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(hp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of i){let u=null;switch(h.type){case"path":u=a.createElementNS(hp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(hp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,i,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(hp,"path");return o.setAttribute("d",this.opsToPath(i,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,i){return this.gen.opsToPath(e,i)}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c)}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c)}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c)}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o)}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n)}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n)}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d)}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n)}path(e,i){const n=this.gen.path(e,i);return this.draw(n)}}var jt={canvas:(r,e)=>new $U(r,e),svg:(r,e)=>new zU(r,e),generator:r=>new kg(r),newSeed:()=>kg.newSeed()},Kt=A(async(r,e,i)=>{var y,b;let n;const a=e.useHtmlLabels||Ja((y=we())==null?void 0:y.htmlLabels);i?n=i:n="node default";const o=r.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",zr(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,d=e.labelType==="markdown",p=await es(c,Rn(pl(h),we()),{useHtmlLabels:a,width:e.width||((b=we().flowchart)==null?void 0:b.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},we());let g=p.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const _=p.children[0],k=Xt(p);await F5(_,h),g=_.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:x,label:c}},"labelHelper"),H0=A(async(r,e,i)=>{var u,d;const n=i.useHtmlLabels??gi(we()),a=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),o=await es(a,Rn(pl(e),we()),{useHtmlLabels:n,width:i.width||((d=(u=we())==null?void 0:u.flowchart)==null?void 0:d.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=o.getBBox();const h=i.padding/2;if(gi(we())){const p=o.children[0],g=Xt(o);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:r,bbox:c,halfPadding:h,label:a}},"insertLabel"),zt=A((r,e)=>{const i=e.node().getBBox();r.width=i.width,r.height=i.height},"updateNodeBounds"),Qt=A((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function ve(r){const e=r.map((i,n)=>`${n===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}A(ve,"createPathFromPoints");function oo(r,e,i,n,a,o){const c=[],u=i-r,d=n-e,p=u/o,g=2*Math.PI/p,x=e+d/2;for(let y=0;y<=50;y++){const b=y/50,_=r+b*u,k=x+a*Math.sin(g*(_-r));c.push({x:_,y:k})}return c}A(oo,"generateFullSineWavePoints");function ff(r,e,i,n,a,o){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=r+i*Math.cos(x),b=e+i*Math.sin(x);c.push({x:-y,y:-b})}return c}A(ff,"generateCirclePoints");function Tb(r){const e=Array.from(r.childNodes).filter(u=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");i.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=A((u,d)=>(u==null?void 0:u.getAttribute(d))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([d,p])=>{p&&i.setAttribute(d,p)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,p])=>{p&&i.setAttribute(d,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}A(Tb,"mergePaths");var qU=A((r,e)=>{var i=r.x,n=r.y,a=e.x-i,o=e.y-n,c=r.width/2,h=r.height/2,u,d;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,d=h):(a<0&&(c=-c),u=c,d=a===0?0:c*o/a),{x:i+u,y:n+d}},"intersectRect"),oh=qU,IU=A(async(r,e,i,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=we(),h=gi(c);return await es(r,o,{style:i,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ks=IU,co=A((r,e,i,n,a)=>["M",r+a,e,"H",r+i-a,"A",a,a,0,0,1,r+i,e+a,"V",e+n-a,"A",a,a,0,0,1,r+i-a,e+n,"H",r+a,"A",a,a,0,0,1,r,e+n-a,"V",e+a,"A",a,a,0,0,1,r+a,e,"Z"].join(" "),"createRoundedRectPathD"),xM=A(async(r,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const i=we(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:p}=Ft(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=gi(i),y=g.insert("g").attr("class","cluster-label ");let b;e.labelType==="markdown"?b=await es(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}):b=await Ks(y,e.label,e.labelStyle||"",!1,!0);let _=b.getBBox();if(gi(i)){const M=b.children[0],N=Xt(b);_=M.getBoundingClientRect(),N.attr("width",_.width),N.attr("height",_.height)}const k=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-k/2,B=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=jt.svg(g),N=Dt(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),Y=M.path(co(T,B,k,w,0),N);E=g.insert(()=>(_t.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",k).attr("height",w);const{subGraphTitleTopMargin:O}=sv(i);if(y.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+O})`),h){const M=y.select("span");M&&M.attr("style",h)}const j=E.node().getBBox();return e.offsetX=0,e.width=j.width,e.height=j.height,e.offsetY=_.height-e.padding/2,e.intersect=function(M){return oh(e,M)},{cluster:g,labelBBox:_}},"rect"),PU=A((r,e)=>{const i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),n=i.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return oh(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),HU=A(async(r,e)=>{const i=we(),{themeVariables:n,handDrawnSeed:a}=i,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let x=d.append("rect");const y=await Ks(g,e.label,e.labelStyle,void 0,!0);let b=y.getBBox();if(gi(i)){const Y=y.children[0],$=Xt(y);b=Y.getBoundingClientRect(),$.attr("width",b.width),$.attr("height",b.height)}const _=0*e.padding,k=_/2,w=(e.width<=b.width+e.padding?b.width+e.padding:e.width)+_;e.width<=b.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+_,B=e.height+_-b.height-6,E=e.x-w/2,O=e.y-T/2;e.width=w;const j=e.y-e.height/2-k+b.height+2;let M;if(e.look==="handDrawn"){const Y=e.cssClasses.includes("statediagram-cluster-alt"),$=jt.svg(d),z=e.rx||e.ry?$.path(co(E,O,w,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):$.rectangle(E,O,w,T,{seed:a});M=d.insert(()=>z,":first-child");const K=$.rectangle(E,j,w,B,{fill:Y?o:c,fillStyle:Y?"hachure":"solid",stroke:u,seed:a});M=d.insert(()=>z,":first-child"),x=d.insert(()=>K)}else M=p.insert("rect",":first-child"),M.attr("class","outer").attr("x",E).attr("y",O).attr("width",w).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",E).attr("y",j).attr("width",w).attr("height",B);g.attr("transform",`translate(${e.x-b.width/2}, ${O+1-(gi(i)?0:3)})`);const N=M.node().getBBox();return e.height=N.height,e.offsetX=0,e.offsetY=b.height-e.padding/2,e.labelBBox=b,e.intersect=function(Y){return oh(e,Y)},{cluster:d,labelBBox:b}},"roundedWithTitle"),UU=A(async(r,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const i=we(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:p}=Ft(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=gi(i),y=g.insert("g").attr("class","cluster-label "),b=await es(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let _=b.getBBox();if(gi(i)){const M=b.children[0],N=Xt(b);_=M.getBoundingClientRect(),N.attr("width",_.width),N.attr("height",_.height)}const k=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-k/2,B=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=jt.svg(g),N=Dt(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),Y=M.path(co(T,B,k,w,e.rx),N);E=g.insert(()=>(_t.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",k).attr("height",w);const{subGraphTitleTopMargin:O}=sv(i);if(y.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+O})`),h){const M=y.select("span");M&&M.attr("style",h)}const j=E.node().getBBox();return e.offsetX=0,e.width=j.width,e.height=j.height,e.offsetY=_.height-e.padding/2,e.intersect=function(M){return oh(e,M)},{cluster:g,labelBBox:_}},"kanbanSection"),WU=A((r,e)=>{const i=we(),{themeVariables:n,handDrawnSeed:a}=i,{nodeBorder:o}=n,c=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=c.insert("g",":first-child"),u=0*e.padding,d=e.width+u;e.diff=-e.padding;const p=e.height+u,g=e.x-d/2,x=e.y-p/2;e.width=d;let y;if(e.look==="handDrawn"){const k=jt.svg(c).rectangle(g,x,d,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>k,":first-child")}else{y=h.insert("rect",":first-child");let _="outer";e.look,_="divider",y.attr("class",_).attr("x",g).attr("y",x).attr("width",d).attr("height",p).attr("data-look",e.look)}const b=y.node().getBBox();return e.height=b.height,e.offsetX=0,e.offsetY=0,e.intersect=function(_){return oh(e,_)},{cluster:c,labelBBox:{}}},"divider"),YU=xM,GU={rect:xM,squareRect:YU,roundedWithTitle:HU,noteGroup:PU,divider:WU,kanbanSection:UU},bM=new Map,VU=A(async(r,e)=>{const i=e.shape||"rect",n=await GU[i](r,e);return bM.set(e.id,n),n},"insertCluster"),ert=A(()=>{bM=new Map},"clear");function vM(r,e){return r.intersect(e)}A(vM,"intersectNode");var XU=vM;function CM(r,e,i,n){var a=r.x,o=r.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+i*i*c*c),d=Math.abs(e*i*c/u);n.x<a&&(d=-d);var p=Math.abs(e*i*h/u);return n.y<o&&(p=-p),{x:a+d,y:o+p}}A(CM,"intersectEllipse");var _M=CM;function kM(r,e,i){return _M(r,e,e,i)}A(kM,"intersectCircle");var QU=kM;function SM(r,e,i,n){{const a=e.y-r.y,o=r.x-e.x,c=e.x*r.y-r.x*e.y,h=a*i.x+o*i.y+c,u=a*n.x+o*n.y+c,d=1e-6;if(h!==0&&u!==0&&Bb(h,u))return;const p=n.y-i.y,g=i.x-n.x,x=n.x*i.y-i.x*n.y,y=p*r.x+g*r.y+x,b=p*e.x+g*e.y+x;if(Math.abs(y)<d&&Math.abs(b)<d&&Bb(y,b))return;const _=a*g-p*o;if(_===0)return;const k=Math.abs(_/2);let w=o*x-g*c;const T=w<0?(w-k)/_:(w+k)/_;w=p*c-a*x;const B=w<0?(w-k)/_:(w+k)/_;return{x:T,y:B}}}A(SM,"intersectLine");function Bb(r,e){return r*e>0}A(Bb,"sameSign");var ZU=SM;function wM(r,e,i){let n=r.x,a=r.y,o=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,e.x),h=Math.min(h,e.y));let u=n-r.width/2-c,d=a-r.height/2-h;for(let p=0;p<e.length;p++){let g=e[p],x=e[p<e.length-1?p+1:0],y=ZU(r,i,{x:u+g.x,y:d+g.y},{x:u+x.x,y:d+x.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(p,g){let x=p.x-i.x,y=p.y-i.y,b=Math.sqrt(x*x+y*y),_=g.x-i.x,k=g.y-i.y,w=Math.sqrt(_*_+k*k);return b<w?-1:b===w?0:1}),o[0]):r}A(wM,"intersectPolygon");var KU=wM,Nt={node:XU,circle:QU,ellipse:_M,polygon:KU,rect:oh};function TM(r,e){const{labelStyles:i}=Ft(e);e.labelStyle=i;const n=Qt(e);let a=n;n||(a="anchor");const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=jt.svg(o),d=Dt(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const p=u.circle(0,0,c*2,d),g=o.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",zr(h)),zt(e,g),e.intersect=function(x){return _t.info("Circle intersect",e,c,x),Nt.circle(e,c,x)},o}A(TM,"anchor");function Ab(r,e,i,n,a,o,c){const u=(r+i)/2,d=(e+n)/2,p=Math.atan2(n-e,i-r),g=(i-r)/2,x=(n-e)/2,y=g/a,b=x/o,_=Math.sqrt(y**2+b**2);if(_>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-_**2),w=u+k*o*Math.sin(p)*(c?-1:1),T=d-k*a*Math.cos(p)*(c?-1:1),B=Math.atan2((e-T)/o,(r-w)/a);let O=Math.atan2((n-T)/o,(i-w)/a)-B;c&&O<0&&(O+=2*Math.PI),!c&&O>0&&(O-=2*Math.PI);const j=[];for(let M=0;M<20;M++){const N=M/19,Y=B+N*O,$=w+a*Math.cos(Y),z=T+o*Math.sin(Y);j.push({x:$,y:z})}return j}A(Ab,"generateArcPoints");function BM(r,e,i){const[n,a]=[e,i].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(r/n/2)**2))}A(BM,"calculateArcSagitta");async function AM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=A(Y=>Y+c,"calcTotalHeight"),u=A(Y=>{const $=Y/2;return[$/(2.5+Y/50),$]},"calcEllipseRadius"),{shapeSvg:d,bbox:p}=await Kt(r,e,Qt(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:p.height),[x,y]=u(g),b=BM(g,x,y),k=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2+b-b,w=g,{cssStyles:T}=e,B=[{x:k/2,y:-w/2},{x:-k/2,y:-w/2},...Ab(-k/2,-w/2,-k/2,w/2,x,y,!1),{x:k/2,y:w/2},...Ab(k/2,w/2,k/2,-w/2,x,y,!0)],E=jt.svg(d),O=Dt(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const j=ve(B),M=E.path(j,O),N=d.insert(()=>M,":first-child");return N.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(${x/2}, 0)`),zt(e,N),e.intersect=function(Y){return Nt.polygon(e,B,Y)},d}A(AM,"bowTieRect");function rs(r,e,i,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}A(rs,"insertPolygonShape");var up=12;async function EM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+up),p=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=d,y=-p,b=0,_=[{x:g+up,y},{x,y},{x,y:b},{x:g,y:b},{x:g,y:y+up},{x:g+up,y}];let k;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=jt.svg(h),B=Dt(e,{}),E=ve(_),O=T.path(E,B);k=h.insert(()=>O,":first-child").attr("transform",`translate(${-d/2}, ${p/2})`),w&&k.attr("style",w)}else k=rs(h,d,p,_);return n&&k.attr("style",n),zt(e,k),e.intersect=function(T){return Nt.polygon(e,_,T)},h}A(EM,"card");function MM(r,e){const{nodeStyles:i}=Ft(e);e.label="";const n=r.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],h=jt.svg(n),u=Dt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ve(c),p=h.path(d,u),g=n.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),e.width=28,e.height=28,e.intersect=function(x){return Nt.polygon(e,c,x)},n}A(MM,"choice");async function bv(r,e,i){const{labelStyles:n,nodeStyles:a}=Ft(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await Kt(r,e,Qt(e)),u=16,d=(i==null?void 0:i.padding)??h,p=e.look==="neo"?c.width/2+u*2:c.width/2+d;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=jt.svg(o),b=Dt(e,{}),_=y.circle(0,0,p*2,b);g=o.insert(()=>_,":first-child"),g.attr("class","basic label-container").attr("style",zr(x))}else g=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0);return zt(e,g),e.calcIntersect=function(y,b){const _=y.width/2;return Nt.circle(y,_,b)},e.intersect=function(y){return _t.info("Circle intersect",e,p,y),Nt.circle(e,p,y)},o}A(bv,"circle");function LM(r){const e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),n=r*2,a={x:n/2*e,y:n/2*i},o={x:-(n/2)*e,y:n/2*i},c={x:-(n/2)*e,y:-(n/2)*i},h={x:n/2*e,y:-(n/2)*i};return`M ${o.x},${o.y} L ${h.x},${h.y}
|
|
332
|
+
M ${a.x},${a.y} L ${c.x},${c.y}`}A(LM,"createLine");function OM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i,e.label="";const a=r.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=jt.svg(a),u=Dt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),p=LM(o),g=h.path(p,u),x=a.insert(()=>d,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),zt(e,x),e.intersect=function(y){return _t.info("crossedCircle intersect",e,{radius:o,point:y}),Nt.circle(e,o,y)},a}A(OM,"crossedCircle");function $a(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=r+i*Math.cos(x),b=e+i*Math.sin(x);c.push({x:-y,y:-b})}return c}A($a,"generateCirclePoints");async function NM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Kt(r,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+h,p=o.height+u,g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...$a(d/2,-p/2,g,30,-90,0),{x:-d/2-g,y:g},...$a(d/2+g*2,-g,g,20,-180,-270),...$a(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-p/2},...$a(d/2,p/2,g,20,0,90)],b=[{x:d/2,y:-p/2-g},{x:-d/2,y:-p/2-g},...$a(d/2,-p/2,g,20,-90,0),{x:-d/2-g,y:-g},...$a(d/2+d*.1,-g,g,20,-180,-270),...$a(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:p/2},...$a(d/2,p/2,g,20,0,90),{x:-d/2,y:p/2+g},{x:d/2,y:p/2+g}],_=jt.svg(a),k=Dt(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ve(y).replace("Z",""),B=_.path(T,k),E=ve(b),O=_.path(E,{...k}),j=a.insert("g",":first-child");return j.insert(()=>O,":first-child").attr("stroke-opacity",0),j.insert(()=>B,":first-child"),j.attr("class","text"),x&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-d/2+g-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),zt(e,j),e.intersect=function(M){return Nt.polygon(e,b,M)},a}A(NM,"curlyBraceLeft");function za(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=r+i*Math.cos(x),b=e+i*Math.sin(x);c.push({x:y,y:b})}return c}A(za,"generateCirclePoints");async function RM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Kt(r,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...za(d/2,-p/2,g,20,-90,0),{x:d/2+g,y:-g},...za(d/2+g*2,-g,g,20,-180,-270),...za(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:p/2},...za(d/2,p/2,g,20,0,90)],b=[{x:-d/2,y:-p/2-g},{x:d/2,y:-p/2-g},...za(d/2,-p/2,g,20,-90,0),{x:d/2+g,y:-g},...za(d/2+g*2,-g,g,20,-180,-270),...za(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:p/2},...za(d/2,p/2,g,20,0,90),{x:d/2,y:p/2+g},{x:-d/2,y:p/2+g}],_=jt.svg(a),k=Dt(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ve(y).replace("Z",""),B=_.path(T,k),E=ve(b),O=_.path(E,{...k}),j=a.insert("g",":first-child");return j.insert(()=>O,":first-child").attr("stroke-opacity",0),j.insert(()=>B,":first-child"),j.attr("class","text"),x&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),zt(e,j),e.intersect=function(M){return Nt.polygon(e,b,M)},a}A(RM,"curlyBraceRight");function Yr(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=r+i*Math.cos(x),b=e+i*Math.sin(x);c.push({x:-y,y:-b})}return c}A(Yr,"generateCirclePoints");async function jM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Kt(r,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...Yr(d/2,-p/2,g,30,-90,0),{x:-d/2-g,y:g},...Yr(d/2+g*2,-g,g,20,-180,-270),...Yr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-p/2},...Yr(d/2,p/2,g,20,0,90)],b=[...Yr(-d/2+g+g/2,-p/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Yr(-d/2-g/2,-g,g,20,0,90),...Yr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Yr(-d/2+g+g/2,p/2,g,30,-180,-270)],_=[{x:d/2,y:-p/2-g},{x:-d/2,y:-p/2-g},...Yr(d/2,-p/2,g,20,-90,0),{x:-d/2-g,y:-g},...Yr(d/2+g*2,-g,g,20,-180,-270),...Yr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:p/2},...Yr(d/2,p/2,g,20,0,90),{x:-d/2,y:p/2+g},{x:d/2-g-g/2,y:p/2+g},...Yr(-d/2+g+g/2,-p/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Yr(-d/2-g/2,-g,g,20,0,90),...Yr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Yr(-d/2+g+g/2,p/2,g,30,-180,-270)],k=jt.svg(a),w=Dt(e,{fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=ve(y).replace("Z",""),E=k.path(B,w),j=ve(b).replace("Z",""),M=k.path(j,w),N=ve(_),Y=k.path(N,{...w}),$=a.insert("g",":first-child");return $.insert(()=>Y,":first-child").attr("stroke-opacity",0),$.insert(()=>E,":first-child"),$.insert(()=>M,":first-child"),$.attr("class","text"),x&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),zt(e,$),e.intersect=function(z){return Nt.polygon(e,_,z)},a}A(jM,"curlyBraces");async function DM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=20,u=5,{shapeSvg:d,bbox:p}=await Kt(r,e,Qt(e)),g=Math.max(h,(p.width+o*2)*1.25,(e==null?void 0:e.width)??0),x=Math.max(u,p.height+c*2,(e==null?void 0:e.height)??0),y=x/2,{cssStyles:b}=e,_=jt.svg(d),k=Dt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=g,T=x,B=w-y,E=T/4,O=[{x:B,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:B,y:T},...ff(-B,-T/2,y,50,270,90)],j=ve(O),M=_.path(j,k),N=d.insert(()=>M,":first-child");return N.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",b),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),N.attr("transform",`translate(${-g/2}, ${-x/2})`),zt(e,N),e.intersect=function(Y){return Nt.polygon(e,O,Y)},d}A(DM,"curvedTrapezoid");var JU=A((r,e,i,n,a,o)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),tW=A((r,e,i,n,a,o)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),eW=A((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Aw=8,Ew=8;async function FM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const k=e.width??0;e.width=(e.width??0)-c,e.width<Ew&&(e.width=Ew);const T=k/2/(2.5+k/50);e.height=(e.height??0)-o-T*3,e.height<Aw&&(e.height=Aw)}const{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=(e.width?e.width:u.width)+c,g=p/2,x=g/(2.5+p/50),y=(e.height?e.height:u.height)+o+x;let b;const{cssStyles:_}=e;if(e.look==="handDrawn"){const k=jt.svg(h),w=tW(0,0,p,y,g,x),T=eW(0,x,p,y,g,x),B=Dt(e,{}),E=k.path(w,B),O=k.path(T,Dt(e,{fill:"none"}));b=h.insert(()=>O,":first-child"),b=h.insert(()=>E,":first-child"),b.attr("class","basic label-container"),_&&b.attr("style",_)}else{const k=JU(0,0,p,y,g,x);b=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",zr(_)).attr("style",n)}return b.attr("label-offset-y",x),b.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),zt(e,b),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(k){const w=Nt.rect(e,k),T=w.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(w.y-(e.y??0))>(e.height??0)/2-x)){let B=x*x*(1-T*T/(g*g));B>0&&(B=Math.sqrt(B)),B=x-B,k.y-(e.y??0)>0&&(B=-B),w.y+=B}return w},h}A(FM,"cylinder");async function $M(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=h.width+a,p=h.height+o,g=p*.2,x=-d/2,y=-p/2-g/2,{cssStyles:b}=e,_=jt.svg(c),k=Dt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],T=_.polygon(w.map(E=>[E.x,E.y]),k),B=c.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),u.attr("transform",`translate(${x+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),zt(e,B),e.intersect=function(E){return Nt.rect(e,E)},c}A($M,"dividedRectangle");async function zM(r,e){var y,b;const{labelStyles:i,nodeStyles:n}=Ft(e),a=e.look==="neo"?12:5;e.labelStyle=i;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(c??0),p=d-a;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const _=jt.svg(h),k=Dt(e,{roughness:.2,strokeWidth:2.5}),w=Dt(e,{roughness:.2,strokeWidth:1.5}),T=_.circle(0,0,d*2,k),B=_.circle(0,0,p*2,w);g=h.insert("g",":first-child"),g.attr("class",zr(e.cssClasses)).attr("style",zr(x)),(y=g.node())==null||y.appendChild(T),(b=g.node())==null||b.appendChild(B)}else{g=h.insert("g",":first-child");const _=g.insert("circle",":first-child"),k=g.insert("circle");g.attr("class","basic label-container").attr("style",n),_.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),k.attr("class","inner-circle").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0)}return zt(e,g),e.intersect=function(_){return _t.info("DoubleCircle intersect",e,d,_),Nt.circle(e,d,_)},h}A(zM,"doublecircle");function qM(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=Ft(e);e.label="",e.labelStyle=n;const o=r.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=jt.svg(o),{nodeBorder:d}=i,p=Dt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(p.roughness=0);const g=u.circle(0,0,c*2,p),x=o.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${d} !important;`),h&&h.length>0&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",a),zt(e,x),e.intersect=function(y){return _t.info("filledCircle intersect",e,{radius:c,point:y}),Nt.circle(e,c,y)},o}A(qM,"filledCircle");var Mw=10,Lw=10;async function IM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<Mw&&(e.height=Mw),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<Lw&&(e.width=Lw));const{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(o??0),p=e!=null&&e.height?e==null?void 0:e.height:d+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:y}=e,b=jt.svg(c),_=Dt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=ve(x),w=b.path(k,_),T=c.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=d,e.height=p,zt(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(B){return _t.info("Triangle intersect",e,x,B),Nt.polygon(e,x,B)},c}A(IM,"flippedTriangle");function PM(r,e,{dir:i,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=Ft(e);e.label="";const c=r.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:h}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),d=Math.max(10,(e==null?void 0:e.height)??0);i==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),d=Math.max(70,(e==null?void 0:e.height)??0));const p=-1*u/2,g=-1*d/2,x=jt.svg(c),y=Dt(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=x.rectangle(p,g,u,d,y),_=c.insert(()=>b,":first-child");h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",o),zt(e,_);const k=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=k/2||0,e.height+=k/2||0),e.intersect=function(w){return Nt.rect(e,w)},c}A(PM,"forkJoin");async function HM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=15,o=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-h*2,e.height<o&&(e.height=o),e.width=((e==null?void 0:e.width)??0)-c*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:d}=await Kt(r,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,d.width))+c*2,g=(e!=null&&e.height?e==null?void 0:e.height:Math.max(o,d.height))+h*2,x=g/2,{cssStyles:y}=e,b=jt.svg(u),_=Dt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...ff(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],w=ve(k),T=b.path(w,_),B=u.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),zt(e,B),e.intersect=function(E){return _t.info("Pill intersect",e,{radius:x,point:E}),Nt.polygon(e,k,E)},u}A(HM,"halfRoundedRectangle");var rW=A((r,e,i,n,a)=>[`M${r+a},${e}`,`L${r+i-a},${e}`,`L${r+i},${e-n/2}`,`L${r+i-a},${e-n}`,`L${r+a},${e-n}`,`L${r},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function UM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e),a=e.look==="neo"?3.5:4;e.labelStyle=i;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,d=e.look==="neo"?h:o;if(e.width||e.height){const B=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*B-d,e.height=(e.height??0)-u}const{shapeSvg:p,bbox:g}=await Kt(r,e,Qt(e)),x=(e!=null&&e.height?e==null?void 0:e.height:g.height)+u,y=x/a,b=(e!=null&&e.width?e==null?void 0:e.width:g.width)+2*y+d,_=[{x:y,y:0},{x:b-y,y:0},{x:b,y:-x/2},{x:b-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let k;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=jt.svg(p),B=Dt(e,{}),E=rW(0,0,b,x,y),O=T.path(E,B);k=p.insert(()=>O,":first-child").attr("transform",`translate(${-b/2}, ${x/2})`),w&&k.attr("style",w)}else k=rs(p,b,x,_);return n&&k.attr("style",n),e.width=b,e.height=x,zt(e,k),e.intersect=function(T){return Nt.polygon(e,_,T)},p}A(UM,"hexagon");async function WM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.label="",e.labelStyle=i;const{shapeSvg:a}=await Kt(r,e,Qt(e)),o=Math.max(30,(e==null?void 0:e.width)??0),c=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=jt.svg(a),d=Dt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=ve(p),x=u.path(g,d),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-o/2}, ${-c/2})`),zt(e,y),e.intersect=function(b){return _t.info("Pill intersect",e,{points:p}),Nt.polygon(e,p,b)},a}A(WM,"hourglass");async function YM(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Ft(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:p,label:g}=await Kt(r,e,"icon-shape default"),x=e.pos==="t",y=h,b=h,{nodeBorder:_}=i,{stylesMap:k}=sh(e),w=-b/2,T=-y/2,B=e.label?8:0,E=jt.svg(d),O=Dt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const j=E.rectangle(w,T,b,y,O),M=Math.max(b,p.width),N=y+p.height+B,Y=E.rectangle(-M/2,-N/2,M,N,{...O,fill:"transparent",stroke:"none"}),$=d.insert(()=>j,":first-child"),z=d.insert(()=>Y);if(e.icon){const K=d.append("g");K.html(`<g>${await Lf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const W=K.node().getBBox(),F=W.width,U=W.height,R=W.x,I=W.y;K.attr("transform",`translate(${-F/2-R},${x?p.height/2+B/2-U/2-I:-p.height/2-B/2-U/2-I})`),K.attr("style",`color: ${k.get("stroke")??_};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-N/2:N/2-p.height})`),$.attr("transform",`translate(0,${x?p.height/2+B/2:-p.height/2-B/2})`),zt(e,z),e.intersect=function(K){if(_t.info("iconSquare intersect",e,K),!e.label)return Nt.rect(e,K);const W=e.x??0,F=e.y??0,U=e.height??0;let R=[];return x?R=[{x:W-p.width/2,y:F-U/2},{x:W+p.width/2,y:F-U/2},{x:W+p.width/2,y:F-U/2+p.height+B},{x:W+b/2,y:F-U/2+p.height+B},{x:W+b/2,y:F+U/2},{x:W-b/2,y:F+U/2},{x:W-b/2,y:F-U/2+p.height+B},{x:W-p.width/2,y:F-U/2+p.height+B}]:R=[{x:W-b/2,y:F-U/2},{x:W+b/2,y:F-U/2},{x:W+b/2,y:F-U/2+y},{x:W+p.width/2,y:F-U/2+y},{x:W+p.width/2/2,y:F+U/2},{x:W-p.width/2,y:F+U/2},{x:W-p.width/2,y:F-U/2+y},{x:W-b/2,y:F-U/2+y}],Nt.polygon(e,R,K)},d}A(YM,"icon");async function GM(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Ft(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:p,label:g}=await Kt(r,e,"icon-shape default"),x=20,y=e.label?8:0,b=e.pos==="t",{nodeBorder:_,mainBkg:k}=i,{stylesMap:w}=sh(e),T=jt.svg(d),B=Dt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const E=w.get("fill");B.stroke=E??k;const O=d.append("g");e.icon&&O.html(`<g>${await Lf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=O.node().getBBox(),M=j.width,N=j.height,Y=j.x,$=j.y,z=Math.max(M,N)*Math.SQRT2+x*2,K=T.circle(0,0,z,B),W=Math.max(z,p.width),F=z+p.height+y,U=T.rectangle(-W/2,-F/2,W,F,{...B,fill:"transparent",stroke:"none"}),R=d.insert(()=>K,":first-child"),I=d.insert(()=>U);return O.attr("transform",`translate(${-M/2-Y},${b?p.height/2+y/2-N/2-$:-p.height/2-y/2-N/2-$})`),O.attr("style",`color: ${w.get("stroke")??_};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${b?-F/2:F/2-p.height})`),R.attr("transform",`translate(0,${b?p.height/2+y/2:-p.height/2-y/2})`),zt(e,I),e.intersect=function(H){return _t.info("iconSquare intersect",e,H),Nt.rect(e,H)},d}A(GM,"iconCircle");async function VM(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Ft(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:p,halfPadding:g,label:x}=await Kt(r,e,"icon-shape default"),y=e.pos==="t",b=h+g*2,_=h+g*2,{nodeBorder:k,mainBkg:w}=i,{stylesMap:T}=sh(e),B=-_/2,E=-b/2,O=e.label?8:0,j=jt.svg(d),M=Dt(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const N=T.get("fill");M.stroke=N??w;const Y=j.path(co(B,E,_,b,5),M),$=Math.max(_,p.width),z=b+p.height+O,K=j.rectangle(-$/2,-z/2,$,z,{...M,fill:"transparent",stroke:"none"}),W=d.insert(()=>Y,":first-child").attr("class","icon-shape2"),F=d.insert(()=>K);if(e.icon){const U=d.append("g");U.html(`<g>${await Lf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const R=U.node().getBBox(),I=R.width,H=R.height,G=R.x,Z=R.y;U.attr("transform",`translate(${-I/2-G},${y?p.height/2+O/2-H/2-Z:-p.height/2-O/2-H/2-Z})`),U.attr("style",`color: ${T.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-z/2:z/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+O/2:-p.height/2-O/2})`),zt(e,F),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return Nt.rect(e,U);const R=e.x??0,I=e.y??0,H=e.height??0;let G=[];return y?G=[{x:R-p.width/2,y:I-H/2},{x:R+p.width/2,y:I-H/2},{x:R+p.width/2,y:I-H/2+p.height+O},{x:R+_/2,y:I-H/2+p.height+O},{x:R+_/2,y:I+H/2},{x:R-_/2,y:I+H/2},{x:R-_/2,y:I-H/2+p.height+O},{x:R-p.width/2,y:I-H/2+p.height+O}]:G=[{x:R-_/2,y:I-H/2},{x:R+_/2,y:I-H/2},{x:R+_/2,y:I-H/2+b},{x:R+p.width/2,y:I-H/2+b},{x:R+p.width/2/2,y:I+H/2},{x:R-p.width/2,y:I+H/2},{x:R-p.width/2,y:I-H/2+b},{x:R-_/2,y:I-H/2+b}],Nt.polygon(e,G,U)},d}A(VM,"iconRounded");async function XM(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Ft(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:p,halfPadding:g,label:x}=await Kt(r,e,"icon-shape default"),y=e.pos==="t",b=h+g*2,_=h+g*2,{nodeBorder:k,mainBkg:w}=i,{stylesMap:T}=sh(e),B=-_/2,E=-b/2,O=e.label?8:0,j=jt.svg(d),M=Dt(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const N=T.get("fill");M.stroke=N??w;const Y=j.path(co(B,E,_,b,.1),M),$=Math.max(_,p.width),z=b+p.height+O,K=j.rectangle(-$/2,-z/2,$,z,{...M,fill:"transparent",stroke:"none"}),W=d.insert(()=>Y,":first-child"),F=d.insert(()=>K);if(e.icon){const U=d.append("g");U.html(`<g>${await Lf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const R=U.node().getBBox(),I=R.width,H=R.height,G=R.x,Z=R.y;U.attr("transform",`translate(${-I/2-G},${y?p.height/2+O/2-H/2-Z:-p.height/2-O/2-H/2-Z})`),U.attr("style",`color: ${T.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-z/2:z/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+O/2:-p.height/2-O/2})`),zt(e,F),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return Nt.rect(e,U);const R=e.x??0,I=e.y??0,H=e.height??0;let G=[];return y?G=[{x:R-p.width/2,y:I-H/2},{x:R+p.width/2,y:I-H/2},{x:R+p.width/2,y:I-H/2+p.height+O},{x:R+_/2,y:I-H/2+p.height+O},{x:R+_/2,y:I+H/2},{x:R-_/2,y:I+H/2},{x:R-_/2,y:I-H/2+p.height+O},{x:R-p.width/2,y:I-H/2+p.height+O}]:G=[{x:R-_/2,y:I-H/2},{x:R+_/2,y:I-H/2},{x:R+_/2,y:I-H/2+b},{x:R+p.width/2,y:I-H/2+b},{x:R+p.width/2/2,y:I+H/2},{x:R-p.width/2,y:I+H/2},{x:R-p.width/2,y:I-H/2+b},{x:R-_/2,y:I-H/2+b}],Nt.polygon(e,G,U)},d}A(XM,"iconSquare");async function QM(r,e,{config:{flowchart:i}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:c}=Ft(e);e.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;e.defaultWidth=i==null?void 0:i.wrappingWidth;const u=Math.max(e.label?h??0:0,(e==null?void 0:e.assetWidth)??a),d=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,p=e.constraint==="on"?d/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(d,h??0);const{shapeSvg:g,bbox:x,label:y}=await Kt(r,e,"image-shape default"),b=e.pos==="t",_=-d/2,k=-p/2,w=e.label?8:0,T=jt.svg(g),B=Dt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const E=T.rectangle(_,k,d,p,B),O=Math.max(d,x.width),j=p+x.height+w,M=T.rectangle(-O/2,-j/2,O,j,{...B,fill:"none",stroke:"none"}),N=g.insert(()=>E,":first-child"),Y=g.insert(()=>M);if(e.img){const $=g.append("image");$.attr("href",e.img),$.attr("width",d),$.attr("height",p),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-d/2},${b?j/2-p:-j/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${b?-p/2-x.height/2-w/2:p/2-x.height/2+w/2})`),N.attr("transform",`translate(0,${b?x.height/2+w/2:-x.height/2-w/2})`),zt(e,Y),e.intersect=function($){if(_t.info("iconSquare intersect",e,$),!e.label)return Nt.rect(e,$);const z=e.x??0,K=e.y??0,W=e.height??0;let F=[];return b?F=[{x:z-x.width/2,y:K-W/2},{x:z+x.width/2,y:K-W/2},{x:z+x.width/2,y:K-W/2+x.height+w},{x:z+d/2,y:K-W/2+x.height+w},{x:z+d/2,y:K+W/2},{x:z-d/2,y:K+W/2},{x:z-d/2,y:K-W/2+x.height+w},{x:z-x.width/2,y:K-W/2+x.height+w}]:F=[{x:z-d/2,y:K-W/2},{x:z+d/2,y:K-W/2},{x:z+d/2,y:K-W/2+p},{x:z+x.width/2,y:K-W/2+p},{x:z+x.width/2/2,y:K+W/2},{x:z-x.width/2,y:K+W/2},{x:z-x.width/2,y:K-W/2+p},{x:z-d/2,y:K-W/2+p}],Nt.polygon(e,F,$)},g}A(QM,"imageSquare");async function ZM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=Math.max(u.width+(c??0)*2,(e==null?void 0:e.width)??0),p=Math.max(u.height+(o??0)*2,(e==null?void 0:e.height)??0),g=[{x:0,y:0},{x:d,y:0},{x:d+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const b=jt.svg(h),_=Dt(e,{}),k=ve(g),w=b.path(k,_);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${p/2})`),y&&x.attr("style",y)}else x=rs(h,d,p,g);return n&&x.attr("style",n),e.width=d,e.height=p,zt(e,x),e.intersect=function(b){return Nt.polygon(e,g,b)},h}A(ZM,"inv_trapezoid");async function Nf(r,e,i){const{labelStyles:n,nodeStyles:a}=Ft(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await Kt(r,e,Qt(e)),h=Math.max(c.width+i.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+i.labelPaddingY*2,(e==null?void 0:e.height)||0),d=-h/2,p=-u/2;let g,{rx:x,ry:y}=e;const{cssStyles:b}=e;if(i!=null&&i.rx&&i.ry&&(x=i.rx,y=i.ry),e.look==="handDrawn"){const _=jt.svg(o),k=Dt(e,{}),w=x||y?_.path(co(d,p,h,u,x||0),k):_.rectangle(d,p,h,u,k);g=o.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",zr(b))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",zr(x)).attr("ry",zr(y)).attr("x",d).attr("y",p).attr("width",h).attr("height",u);return zt(e,g),e.calcIntersect=function(_,k){return Nt.rect(_,k)},e.intersect=function(_){return Nt.rect(e,_)},o}A(Nf,"drawRect");async function KM(r,e){const{shapeSvg:i,bbox:n,label:a}=await Kt(r,e,"label"),o=i.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),zt(e,o),e.intersect=function(u){return Nt.rect(e,u)},i}A(KM,"labelRect");async function JM(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:0,y:0},{x:p+3*d/6,y:0},{x:p,y:-d},{x:-(3*d)/6,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const b=jt.svg(h),_=Dt(e,{}),k=ve(g),w=b.path(k,_);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),y&&x.attr("style",y)}else x=rs(h,p,d,g);return n&&x.attr("style",n),e.width=p,e.height=d,zt(e,x),e.intersect=function(b){return Nt.polygon(e,g,b)},h}A(JM,"lean_left");async function tL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:p,y:0},{x:p+3*d/6,y:-d},{x:0,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const b=jt.svg(h),_=Dt(e,{}),k=ve(g),w=b.path(k,_);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),y&&x.attr("style",y)}else x=rs(h,p,d,g);return n&&x.attr("style",n),e.width=p,e.height=d,zt(e,x),e.intersect=function(b){return Nt.polygon(e,g,b)},h}A(tL,"lean_right");function eL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.label="",e.labelStyle=i;const a=r.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(35,(e==null?void 0:e.width)??0),h=Math.max(35,(e==null?void 0:e.height)??0),u=7,d=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],p=jt.svg(a),g=Dt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ve(d),y=p.path(x,g),b=a.insert(()=>y,":first-child");return b.attr("class","outer-path"),o&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(-${c/2},${-h})`),zt(e,b),e.intersect=function(_){return _t.info("lightningBolt intersect",e,_),Nt.polygon(e,d,_)},a}A(eL,"lightningBolt");var iW=A((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),nW=A((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),aW=A((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Ow=10,Nw=10;async function rL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?24:a;if(e.width||e.height){const w=e.width??0;e.width=(e.width??0)-o,e.width<Nw&&(e.width=Nw);const B=w/2/(2.5+w/50);e.height=(e.height??0)-c-B*3,e.height<Ow&&(e.height=Ow)}const{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=p/2,x=g/(2.5+p/50),y=(e!=null&&e.height?e==null?void 0:e.height:u.height)+x+c*2,b=y*.1;let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const w=jt.svg(h),T=nW(0,0,p,y,g,x,b),B=aW(0,x,p,y,g,x),E=Dt(e,{}),O=w.path(T,E),j=w.path(B,E);h.insert(()=>j,":first-child").attr("class","line"),_=h.insert(()=>O,":first-child"),_.attr("class","basic label-container"),k&&_.attr("style",k)}else{const w=iW(0,0,p,y,g,x,b);_=h.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",zr(k)).attr("style",n)}return _.attr("label-offset-y",x),_.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),zt(e,_),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(w){const T=Nt.rect(e,w),B=T.x-(e.x??0);if(g!=0&&(Math.abs(B)<(e.width??0)/2||Math.abs(B)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-x)){let E=x*x*(1-B*B/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,w.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},h}A(rL,"linedCylinder");async function iL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(o??0)*2,g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(c??0)*2,x=e.look==="neo"?g/4:g/8,y=g+x,{cssStyles:b}=e,_=jt.svg(h),k=Dt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},...oo(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,x,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],T=_.polygon(w.map(E=>[E.x,E.y]),k),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(0,${-x/2})`),d.attr("transform",`translate(${-p/2+(e.padding??0)+p/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-x/2-(u.y-(u.top??0))})`),zt(e,B),e.intersect=function(E){return Nt.polygon(e,w,E)},h}A(iL,"linedWaveEdgedRect");async function nL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-2*h,10),e.height=Math.max(((e==null?void 0:e.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:d,label:p}=await Kt(r,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+o*2+2*h,x=(e!=null&&e.height?e==null?void 0:e.height:d.height)+c*2+2*h,y=g-2*h,b=x-2*h,_=-y/2,k=-b/2,{cssStyles:w}=e,T=jt.svg(u),B=Dt(e,{}),E=[{x:_-h,y:k+h},{x:_-h,y:k+b+h},{x:_+y-h,y:k+b+h},{x:_+y-h,y:k+b},{x:_+y,y:k+b},{x:_+y,y:k+b-h},{x:_+y+h,y:k+b-h},{x:_+y+h,y:k-h},{x:_+h,y:k-h},{x:_+h,y:k},{x:_,y:k},{x:_,y:k+h}],O=[{x:_,y:k+h},{x:_+y-h,y:k+h},{x:_+y-h,y:k+b},{x:_+y,y:k+b},{x:_+y,y:k},{x:_,y:k}];e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const j=ve(E);let M=T.path(j,B);const N=ve(O);let Y=T.path(N,B);e.look!=="handDrawn"&&(M=Tb(M),Y=Tb(Y));const $=u.insert("g",":first-child");return $.insert(()=>M),$.insert(()=>Y),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),p.attr("transform",`translate(${-(d.width/2)-h-(d.x-(d.left??0))}, ${-(d.height/2)+h-(d.y-(d.top??0))})`),zt(e,$),e.intersect=function(z){return Nt.polygon(e,E,z)},u}A(nL,"multiRect");async function aL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Kt(r,e,Qt(e)),h=e.padding??0,u=e.look==="neo"?16:h,d=e.look==="neo"?12:h;let p=!0;(e.width||e.height)&&(p=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-d*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,x=Math.max(o.height,(e==null?void 0:e.height)??0)+d*3,y=e.look==="neo"?x/4:x/8,b=x+(p?y/2:-y/2),_=-g/2,k=-b/2,w=10,{cssStyles:T}=e,B=oo(_-w,k+b+w,_+g-w,k+b+w,y,.8),E=B==null?void 0:B[B.length-1],O=[{x:_-w,y:k+w},{x:_-w,y:k+b+w},...B,{x:_+g-w,y:E.y-w},{x:_+g,y:E.y-w},{x:_+g,y:E.y-2*w},{x:_+g+w,y:E.y-2*w},{x:_+g+w,y:k-w},{x:_+w,y:k-w},{x:_+w,y:k},{x:_,y:k},{x:_,y:k+w}],j=[{x:_,y:k+w},{x:_+g-w,y:k+w},{x:_+g-w,y:E.y-w},{x:_+g,y:E.y-w},{x:_+g,y:k},{x:_,y:k}],M=jt.svg(a),N=Dt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const Y=ve(O),$=M.path(Y,N),z=ve(j),K=M.path(z,N),W=a.insert(()=>$,":first-child");return W.insert(()=>K),W.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",n),W.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(o.width/2)-w-(o.x-(o.left??0))}, ${-(o.height/2)+w-y/2-(o.y-(o.top??0))})`),zt(e,W),e.intersect=function(F){return Nt.polygon(e,O,F)},a}A(aL,"multiWaveEdgedRectangle");async function sL(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=Ft(e);e.labelStyle=n,e.useHtmlLabels||gi(nr())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=Math.max(h.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),p=Math.max(h.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),g=-d/2,x=-p/2,{cssStyles:y}=e,b=jt.svg(c),_=Dt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(g,x,d,p,_),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),a&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),zt(e,w),e.intersect=function(T){return Nt.rect(e,T)},c}A(sL,"note");var sW=A((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 oL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await Kt(r,e,Qt(e)),c=o.width+(e.padding??0),h=o.height+(e.padding??0),u=c+h,d=.5,p=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=jt.svg(a),b=Dt(e,{}),_=sW(0,0,u),k=y.path(_,b);g=a.insert(()=>k,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),x&&g.attr("style",x)}else g=rs(a,u,u,p),g.attr("transform",`translate(${-u/2+d}, ${u/2})`);return n&&g.attr("style",n),zt(e,g),e.calcIntersect=function(y,b){const _=y.width,k=[{x:_/2,y:0},{x:_,y:-_/2},{x:_/2,y:-_},{x:0,y:-_/2}],w=Nt.polygon(y,k,b);return{x:w.x-.5,y:w.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}A(oL,"question");async function lL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?21:a??0,c=e.look==="neo"?12:a??0,{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o),g=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),x=-p/2,y=-g/2,b=y/2,_=[{x:x+b,y},{x,y:0},{x:x+b,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:k}=e,w=jt.svg(h),T=Dt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=ve(_),E=w.path(B,T),O=h.insert(()=>E,":first-child");return O.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",k),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${-b/2},0)`),d.attr("transform",`translate(${-b/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),zt(e,O),e.intersect=function(j){return Nt.polygon(e,_,j)},h}A(lL,"rect_left_inv_arrow");async function cL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,d=e.label,p=await Ks(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(gi(we())){const N=p.children[0],Y=Xt(p);g=N.getBoundingClientRect(),Y.attr("width",g.width),Y.attr("height",g.height)}_t.info("Text 2",u);const x=u||[],y=p.getBBox(),b=await Ks(h,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),_=b.children[0],k=Xt(b);g=_.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height);const w=(e.padding||0)/2;Xt(b).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+w+5)+")"),Xt(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-w+3)+")");const T=g.width+(e.padding||0),B=g.height+(e.padding||0),E=-g.width/2-w,O=-g.height/2-w;let j,M;if(e.look==="handDrawn"){const N=jt.svg(o),Y=Dt(e,{}),$=N.path(co(E,O,T,B,e.rx||0),Y),z=N.line(-g.width/2-w,-g.height/2-w+y.height+w,g.width/2+w,-g.height/2-w+y.height+w,Y);M=o.insert(()=>(_t.debug("Rough node insert CXC",$),z),":first-child"),j=o.insert(()=>(_t.debug("Rough node insert CXC",$),$),":first-child")}else j=c.insert("rect",":first-child"),M=c.insert("line"),j.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-w).attr("y",-g.height/2-w).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),M.attr("class","divider").attr("x1",-g.width/2-w).attr("x2",g.width/2+w).attr("y1",-g.height/2-w+y.height+w).attr("y2",-g.height/2-w+y.height+w);return zt(e,j),e.intersect=function(N){return Nt.rect(e,N)},o}A(cL,"rectWithTitle");async function hL(r,e,{config:{themeVariables:i}}){const n=(i==null?void 0:i.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return Nf(r,e,a)}A(hL,"roundedRect");var Fo=8;async function uL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?Fo:Fo*2),p=((e==null?void 0:e.height)??h.height)+o*2,g=d-Fo,x=p,y=Fo-d/2,b=-p/2,{cssStyles:_}=e,k=jt.svg(c),w=Dt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=[{x:y,y:b},{x:y+g,y:b},{x:y+g,y:b+x},{x:y-Fo,y:b+x},{x:y-Fo,y:b},{x:y,y:b},{x:y,y:b+x}],B=k.polygon(T.map(O=>[O.x,O.y]),w),E=c.insert(()=>B,":first-child");return E.attr("class","basic label-container outer-path").attr("style",zr(_)),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),_&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${Fo/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),zt(e,E),e.intersect=function(O){return Nt.rect(e,O)},c}A(uL,"shadedProcess");async function fL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=((e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2)*1.5,x=p,y=g/1.5,b=-x/2,_=-y/2,{cssStyles:k}=e,w=jt.svg(h),T=Dt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:b,y:_},{x:b,y:_+y},{x:b+x,y:_+y},{x:b+x,y:_-y/2}],E=ve(B),O=w.path(E,T),j=h.insert(()=>O,":first-child");return j.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",k),n&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",n),j.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-x/2+(e.padding??0)-(u.x-(u.left??0))}, ${-y/4+(e.padding??0)-(u.y-(u.top??0))})`),zt(e,j),e.intersect=function(M){return Nt.polygon(e,B,M)},h}A(fL,"slopedRect");async function dL(r,e){const i=e.padding??0,n=e.look==="neo"?16:i*2,a=e.look==="neo"?12:i,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return Nf(r,e,o)}A(dL,"squareRect");async function pL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=u.height+(e.look==="neo"?c*2:c),p=u.width+d/4+(e.look==="neo"?o*2:o),g=d/2,{cssStyles:x}=e,y=jt.svg(h),b=Dt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const _=[{x:-p/2+g,y:-d/2},{x:p/2-g,y:-d/2},...ff(-p/2+g,0,g,50,90,270),{x:p/2-g,y:d/2},...ff(p/2-g,0,g,50,270,450)],k=ve(_),w=y.path(k,b),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",x),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),zt(e,T),e.intersect=function(B){return Nt.polygon(e,_,B)},h}A(pL,"stadium");async function gL(r,e){const i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Nf(r,e,i)}A(gL,"state");function mL(r,e,{config:{themeVariables:i}}){var T,B;const{labelStyles:n,nodeStyles:a}=Ft(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:d}=i;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const p=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=jt.svg(p),x=Dt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),b=h??u,_=(e.width??0)*5/14,k=g.circle(0,0,_,{...x,fill:b,stroke:b,strokeWidth:2,fillStyle:"solid"}),w=p.insert(()=>y,":first-child");if(w.insert(()=>k),e.look!=="handDrawn"&&w.attr("class","outer-path"),o&&w.selectAll("path").attr("style",o),a&&w.selectAll("path").attr("style",a),e.width<25&&d&&e.look!=="handDrawn"){const E=((B=(T=r.node())==null?void 0:T.ownerSVGElement)==null?void 0:B.id)??"",O=E?`${E}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${O})`)}return zt(e,w),e.intersect=function(E){return Nt.circle(e,(e.width??0)/2,E)},p}A(mL,"stateEnd");function yL(r,e,{config:{themeVariables:i}}){var h,u;const{lineColor:n,nodeShadow:a}=i;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=r.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const p=jt.svg(o).circle(0,0,e.width,gH(n));c=o.insert(()=>p),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=o.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&&a&&e.look!=="handDrawn"){const d=((u=(h=r.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",p=d?`${d}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return zt(e,c),e.intersect=function(d){return Nt.circle(e,(e.width??7)/2,d)},o}A(yL,"stateStart");var lc=8;async function xL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=(e==null?void 0:e.padding)??8,o=e.look==="neo"?28:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.width)??u.width)+2*lc+o,p=((e==null?void 0:e.height)??u.height)+c,g=d-2*lc,x=p,y=-d/2,b=-p/2,_=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){const k=jt.svg(h),w=Dt(e,{}),T=k.rectangle(y,b,g+16,x,w),B=k.line(y+lc,b,y+lc,b+x,w),E=k.line(y+lc+g,b,y+lc+g,b+x,w);h.insert(()=>B,":first-child"),h.insert(()=>E,":first-child");const O=h.insert(()=>T,":first-child"),{cssStyles:j}=e;O.attr("class","basic label-container").attr("style",zr(j)),zt(e,O)}else{const k=rs(h,g,x,_);n&&k.attr("style",n),zt(e,k)}return e.intersect=function(k){return Nt.polygon(e,_,k)},h}A(xL,"subroutine");var U0=.2;async function bL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-c*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-U0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,p=U0*d,g=U0*d,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+p-p,b=d,_=-y/2,k=-b/2,{cssStyles:w}=e,T=jt.svg(h),B=Dt(e,{}),E=[{x:_-p/2,y:k},{x:_+y+p/2,y:k},{x:_+y+p/2,y:k+b},{x:_-p/2,y:k+b}],O=[{x:_+y-p/2,y:k+b},{x:_+y+p/2,y:k+b},{x:_+y+p/2,y:k+b-g}];e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const j=ve(E),M=T.path(j,B),N=ve(O),Y=T.path(N,{...B,fillStyle:"solid"}),$=h.insert(()=>Y,":first-child");return $.insert(()=>M,":first-child"),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),zt(e,$),e.intersect=function(z){return Nt.polygon(e,E,z)},h}A(bL,"taggedRect");async function vL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Kt(r,e,Qt(e)),h=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=u/8,p=.2*h,g=.2*u,x=u+d,{cssStyles:y}=e,b=jt.svg(a),_=Dt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-h/2-h/2*.1,y:x/2},...oo(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],w=-h/2+h/2*.1,T=-x/2-g*.4,B=[{x:w+h-p,y:(T+u)*1.3},{x:w+h,y:T+u-g},{x:w+h,y:(T+u)*.9},...oo(w+h,(T+u)*1.25,w+h-p,(T+u)*1.3,-u*.02,.5)],E=ve(k),O=b.path(E,_),j=ve(B),M=b.path(j,{..._,fillStyle:"solid"}),N=a.insert(()=>M,":first-child");return N.insert(()=>O,":first-child"),N.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),zt(e,N),e.intersect=function(Y){return Nt.polygon(e,k,Y)},a}A(vL,"taggedWaveEdgedRectangle");async function CL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await Kt(r,e,Qt(e)),c=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)||0),h=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-c/2,d=-h/2,p=a.insert("rect",":first-child");return p.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",c).attr("height",h),zt(e,p),e.intersect=function(g){return Nt.rect(e,g)},a}A(CL,"text");var oW=A((r,e,i,n,a,o)=>`M${r},${e}
|
|
333
|
+
a${a},${o} 0,0,1 0,${-n}
|
|
334
|
+
l${i},0
|
|
335
|
+
a${a},${o} 0,0,1 0,${n}
|
|
336
|
+
M${i},${-n}
|
|
337
|
+
a${a},${o} 0,0,0 0,${n}
|
|
338
|
+
l${-i},0`,"createCylinderPathD"),lW=A((r,e,i,n,a,o)=>[`M${r},${e}`,`M${r+i},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-i},0`,`a${a},${o} 0,0,0 0,${n}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),cW=A((r,e,i,n,a,o)=>[`M${r+i/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),Rw=5,jw=10;async function _L(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const _=e.height??0;e.height=(e.height??0)-o,e.height<Rw&&(e.height=Rw);const w=_/2/(2.5+_/50);e.width=(e.width??0)-o-w*3,e.width<jw&&(e.width=jw)}const{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=(e.height?e.height:h.height)+o,p=d/2,g=p/(2.5+d/50),x=(e.width?e.width:h.width)+g+o,{cssStyles:y}=e;let b;if(e.look==="handDrawn"){const _=jt.svg(c),k=lW(0,0,x,d,g,p),w=cW(0,0,x,d,g,p),T=_.path(k,Dt(e,{})),B=_.path(w,Dt(e,{fill:"none"}));b=c.insert(()=>B,":first-child"),b=c.insert(()=>T,":first-child"),b.attr("class","basic label-container"),y&&b.attr("style",y)}else{const _=oW(0,0,x,d,g,p);b=c.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",zr(y)).attr("style",n),b.attr("class","basic label-container outer-path"),y&&b.selectAll("path").attr("style",y),n&&b.selectAll("path").attr("style",n)}return b.attr("label-offset-x",g),b.attr("transform",`translate(${-x/2}, ${d/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),zt(e,b),e.intersect=function(_){const k=Nt.rect(e,_),w=k.y-(e.y??0);if(p!=0&&(Math.abs(w)<(e.height??0)/2||Math.abs(w)==(e.height??0)/2&&Math.abs(k.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-w*w/(p*p));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,_.x-(e.x??0)>0&&(T=-T),k.x+=T}return k},c}A(_L,"tiltedCylinder");async function kL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:p+3*d/6,y:0},{x:p,y:-d},{x:0,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const b=jt.svg(h),_=Dt(e,{}),k=ve(g),w=b.path(k,_);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),y&&x.attr("style",y)}else x=rs(h,p,d,g);return n&&x.attr("style",n),e.width=p,e.height=d,zt(e,x),e.intersect=function(b){return Nt.polygon(e,g,b)},h}A(kL,"trapezoid");async function SL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-c*2,e.height<u&&(e.height=u),e.width=(e.width??0)-o*2,e.width<h&&(e.width=h));const{shapeSvg:d,bbox:p}=await Kt(r,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2,x=(e!=null&&e.height?e==null?void 0:e.height:p.height)+c*2,{cssStyles:y}=e,b=jt.svg(d),_=Dt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],w=ve(k),T=b.path(w,_),B=d.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),zt(e,B),e.intersect=function(E){return Nt.polygon(e,k,E)},d}A(SL,"trapezoidalPentagon");var Dw=10,Fw=10;async function wL(r,e){var E;const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-o)/2,e.width<Fw&&(e.width=Fw),e.height=(e==null?void 0:e.height)??0,e.height<Dw&&(e.height=Dw));const{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=Ja((E=we().flowchart)==null?void 0:E.htmlLabels),p=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:p+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:b}=e,_=jt.svg(c),k=Dt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=ve(y),T=_.path(w,k),B=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return b&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",b),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),e.width=p,e.height=g,zt(e,B),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(O){return _t.info("Triangle intersect",e,y,O),Nt.polygon(e,y,O)},c}A(wL,"triangle");async function TL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;let h=!0;(e.width||e.height)&&(h=!1,e.width=((e==null?void 0:e.width)??0)-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:d,label:p}=await Kt(r,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+(o??0)*2,x=(e!=null&&e.height?e==null?void 0:e.height:d.height)+(c??0)*2,y=e.look==="neo"?x/4:x/8,b=x+(h?y:-y),{cssStyles:_}=e,w=14-g,T=w>0?w/2:0,B=jt.svg(u),E=Dt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const O=[{x:-g/2-T,y:b/2},...oo(-g/2-T,b/2,g/2+T,b/2,y,.8),{x:g/2+T,y:-b/2},{x:-g/2-T,y:-b/2}],j=ve(O),M=B.path(j,E),N=u.insert(()=>M,":first-child");return N.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(e.padding??0)-(d.x-(d.left??0))},${-x/2+(e.padding??0)-y-(d.y-(d.top??0))})`),zt(e,N),e.intersect=function(Y){return Nt.polygon(e,O,Y)},u}A(TL,"waveEdgedRectangle");async function BL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-E*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await Kt(r,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,p=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c,g=p/8,x=p+g*2,{cssStyles:y}=e,b=jt.svg(h),_=Dt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-d/2,y:x/2},...oo(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...oo(d/2,-x/2,-d/2,-x/2,g,-1)],w=ve(k),T=b.path(w,_),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),zt(e,B),e.intersect=function(E){return Nt.polygon(e,k,E)},h}A(BL,"waveRectangle");var cr=10;async function AL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-a*2-cr,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-cr,10));const{shapeSvg:c,bbox:h,label:u}=await Kt(r,e,Qt(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+cr,p=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+cr,g=d-cr,x=p-cr,y=-g/2,b=-x/2,{cssStyles:_}=e,k=jt.svg(c),w=Dt(e,{}),T=[{x:y-cr,y:b-cr},{x:y-cr,y:b+x},{x:y+g,y:b+x},{x:y+g,y:b-cr}],B=`M${y-cr},${b-cr} L${y+g},${b-cr} L${y+g},${b+x} L${y-cr},${b+x} L${y-cr},${b-cr}
|
|
339
|
+
M${y-cr},${b} L${y+g},${b}
|
|
340
|
+
M${y},${b-cr} L${y},${b+x}`;e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const E=k.path(B,w),O=c.insert(()=>E,":first-child");return O.attr("transform",`translate(${cr/2}, ${cr/2})`),O.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+cr/2-(h.x-(h.left??0))}, ${-(h.height/2)+cr/2-(h.y-(h.top??0))})`),zt(e,O),e.intersect=function(j){return Nt.polygon(e,T,j)},c}A(AL,"windowPane");var $w=new Set(["redux-color","redux-dark-color"]),hW=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function vv(r,e){var kt,Et,st,Ct;const i=e;i.alias&&(e.label=i.alias);const{theme:n,themeVariables:a}=nr(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:mt}=nr(),{background:Bt}=mt,Yt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Bt}`]};await vv(r,Yt)}const d=nr();e.useHtmlLabels=d.htmlLabels;let p=((kt=d.er)==null?void 0:kt.diagramPadding)??10,g=((Et=d.er)==null?void 0:Et.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:b}=Ft(e);if(i.attributes.length===0&&e.label){const mt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};Ka(e.label,d)+mt.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const Bt=await Nf(r,e,mt);if(n!=null&&$w.has(n)){const Yt=i.colorIndex??0;Bt.attr("data-color-id",`color-${Yt%u.length}`)}if(!Ja(d.htmlLabels)){const Yt=Bt.select("text"),qt=(st=Yt.node())==null?void 0:st.getBBox();Yt.attr("transform",`translate(${-qt.width/2}, 0)`)}return Bt}d.htmlLabels||(p*=1.25,g*=1.25);let _=Qt(e);_||(_="node default");const k=r.insert("g").attr("class",_).attr("id",e.domId||e.id),w=await gc(k,e.label??"",d,0,0,["name"],y);w.height+=g;let T=0;const B=[],E=[];let O=0,j=0,M=0,N=0,Y=!0,$=!0;for(const mt of i.attributes){const Bt=await gc(k,mt.type,d,0,T,["attribute-type"],y);O=Math.max(O,Bt.width+p);const Yt=await gc(k,mt.name,d,0,T,["attribute-name"],y);j=Math.max(j,Yt.width+p);const qt=await gc(k,mt.keys.join(),d,0,T,["attribute-keys"],y);M=Math.max(M,qt.width+p);const Vt=await gc(k,mt.comment,d,0,T,["attribute-comment"],y);N=Math.max(N,Vt.width+p);const At=Math.max(Bt.height,Yt.height,qt.height,Vt.height)+g;E.push({yOffset:T,rowHeight:At}),T+=At}let z=4;M<=p&&(Y=!1,M=0,z--),N<=p&&($=!1,N=0,z--);const K=k.node().getBBox();if(w.width+p*2-(O+j+M+N)>0){const mt=w.width+p*2-(O+j+M+N);O+=mt/z,j+=mt/z,M>0&&(M+=mt/z),N>0&&(N+=mt/z)}const W=O+j+M+N,F=jt.svg(k),U=Dt(e,{});e.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");let R=0;E.length>0&&(R=E.reduce((mt,Bt)=>mt+((Bt==null?void 0:Bt.rowHeight)??0),0));const I=Math.max(K.width+p*2,(e==null?void 0:e.width)||0,W),H=Math.max((R??0)+w.height,(e==null?void 0:e.height)||0),G=-I/2,Z=-H/2;if(k.selectAll("g:not(:first-child)").each((mt,Bt,Yt)=>{const qt=Xt(Yt[Bt]),Vt=qt.attr("transform");let At=0,Jt=0;if(Vt){const ar=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Vt);ar&&(At=parseFloat(ar[1]),Jt=parseFloat(ar[2]),qt.attr("class").includes("attribute-name")?At+=O:qt.attr("class").includes("attribute-keys")?At+=O+j:qt.attr("class").includes("attribute-comment")&&(At+=O+j+M))}qt.attr("transform",`translate(${G+p/2+At}, ${Jt+Z+w.height+g/2})`)}),k.select(".name").attr("transform","translate("+-w.width/2+", "+(Z+g/2)+")"),n!=null&&$w.has(n)){const mt=i.colorIndex??0;k.attr("data-color-id",`color-${mt%u.length}`)}const P=F.rectangle(G,Z,I,H,U),J=k.insert(()=>P,":first-child").attr("class","outer-path").attr("style",x.join(""));B.push(0);for(const[mt,Bt]of E.entries()){const qt=(mt+1)%2===0&&Bt.yOffset!==0,Vt=F.rectangle(G,w.height+Z+(Bt==null?void 0:Bt.yOffset),I,Bt==null?void 0:Bt.rowHeight,{...U,fill:qt?o:c,stroke:h});k.insert(()=>Vt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${qt?"even":"odd"}`)}const nt=1e-4;let ut=mc(G,w.height+Z,I+G,w.height+Z,nt),gt=F.polygon(ut.map(mt=>[mt.x,mt.y]),U);if(k.insert(()=>gt).attr("class","divider"),ut=mc(O+G,w.height+Z,O+G,H+Z,nt),gt=F.polygon(ut.map(mt=>[mt.x,mt.y]),U),k.insert(()=>gt).attr("class","divider"),Y){const mt=O+j+G;ut=mc(mt,w.height+Z,mt,H+Z,nt),gt=F.polygon(ut.map(Bt=>[Bt.x,Bt.y]),U),k.insert(()=>gt).attr("class","divider")}if($){const mt=O+j+M+G;ut=mc(mt,w.height+Z,mt,H+Z,nt),gt=F.polygon(ut.map(Bt=>[Bt.x,Bt.y]),U),k.insert(()=>gt).attr("class","divider")}for(const mt of B){const Bt=w.height+Z+mt;ut=mc(G,Bt,I+G,Bt,nt),gt=F.polygon(ut.map(Yt=>[Yt.x,Yt.y]),U),k.insert(()=>gt).attr("class","divider")}if(zt(e,J),b&&e.look!=="handDrawn")if(n!=null&&hW.has(n))k.selectAll("path").attr("style",b);else{const mt=b.split(";"),Bt=(Ct=mt==null?void 0:mt.filter(Yt=>Yt.includes("stroke")))==null?void 0:Ct.map(Yt=>`${Yt}`).join("; ");k.selectAll("path").attr("style",Bt??""),k.selectAll(".row-rect-even path").attr("style",b)}return e.intersect=function(mt){return Nt.rect(e,mt)},k}A(vv,"erBox");async function gc(r,e,i,n=0,a=0,o=[],c=""){const h=r.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==hS(e)&&(e=hS(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await es(h,e,{width:Ka(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("<")||e.includes(">")){let p=u.children[0];for(p.textContent=p.textContent.replaceAll("<","<").replaceAll(">",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("<","<").replaceAll(">",">")}let d=u.getBBox();if(Ja(i.htmlLabels)){const p=u.children[0];p.style.textAlign="start";const g=Xt(u);d=p.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}A(gc,"addText");function mc(r,e,i,n,a){return r===i?[{x:r-a/2,y:e},{x:r+a/2,y:e},{x:i+a/2,y:n},{x:i-a/2,y:n}]:[{x:r,y:e-a/2},{x:r,y:e+a/2},{x:i,y:n+a/2},{x:i,y:n-a/2}]}A(mc,"lineToPolygon");async function EL(r,e,i,n,a=i.class.padding??12){const o=n?0:3,c=r.insert("g").attr("class",Qt(e)).attr("id",e.domId||e.id);let h=null,u=null,d=null,p=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await Du(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Du(u,e,0,["font-weight: bolder"]);const b=u.node().getBBox();x=b.height,d=c.insert("g").attr("class","members-group text");let _=0;for(const T of e.members){const B=await Du(d,T,_,[T.parseClassifier()]);_+=B+o}y=d.node().getBBox().height,y<=0&&(y=a/2),p=c.insert("g").attr("class","methods-group text");let k=0;for(const T of e.methods){const B=await Du(p,T,k,[T.parseClassifier()]);k+=B+o}let w=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-b.width/2}, ${g})`),w=c.node().getBBox(),d.attr("transform",`translate(0, ${g+x+a*2})`),w=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(y?y+a*4:a*2)})`),w=c.node().getBBox(),{shapeSvg:c,bbox:w}}A(EL,"textHelper");async function Du(r,e,i,n=[]){const a=r.insert("g").attr("class","label").attr("style",n.join("; ")),o=nr();let c="useHtmlLabels"in e?e.useHtmlLabels:Ja(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Ju(h)&&(c=!0);const u=await es(a,w1(pl(h)),{width:Ka(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,p=1;if(c){const g=u.children[0],x=Xt(u);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const b=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(_=>new Promise(k=>{function w(){var T;if(_.style.display="flex",_.style.flexDirection="column",b){const B=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,O=parseInt(B,10)*5+"px";_.style.minWidth=O,_.style.maxWidth=O}else _.style.width="100%";k(_)}A(w,"setupImage"),setTimeout(()=>{_.complete&&w()}),_.addEventListener("error",w),_.addEventListener("load",w)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{n.includes("font-weight: bolder")&&Xt(u).selectAll("tspan").attr("font-weight",""),p=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(g.textContent=h[0]+h.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),d=u.getBBox()}return a.attr("transform","translate(0,"+(-d.height/(2*p)+i)+")"),d.height}A(Du,"addText");async function ML(r,e){var F,U;const i=we(),{themeVariables:n}=i,{useGradient:a}=n,o=i.class.padding??12,c=o,h=e.useHtmlLabels??Ja(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:p}=await EL(r,e,i,h,c),{labelStyles:g,nodeStyles:x}=Ft(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((F=u.styles)==null?void 0:F.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const b=u.members.length===0&&u.methods.length===0&&!((U=i.class)!=null&&U.hideEmptyMembersBox),_=jt.svg(d),k=Dt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=Math.max(e.width??0,p.width);let T=Math.max(e.height??0,p.height);const B=(e.height??0)>p.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const E=-w/2,O=-T/2;let j=b?o*2:u.members.length===0&&u.methods.length===0?-o:0;B&&(j=o*2);const M=_.rectangle(E-o,O-o-(b?o:u.members.length===0&&u.methods.length===0?-o/2:0),w+2*o,T+2*o+j,k),N=d.insert(()=>M,":first-child");N.attr("class","basic label-container outer-path");const Y=N.node().getBBox(),$=d.select(".annotation-group").node().getBBox().height-(b?o/2:0)||0,z=d.select(".label-group").node().getBBox().height-(b?o/2:0)||0,K=d.select(".members-group").node().getBBox().height-(b?o/2:0)||0,W=($+z+O+o-(O-o-(b?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((R,I,H)=>{var ut,gt;const G=Xt(H[I]),Z=G.attr("transform");let P=0;if(Z){const Et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);Et&&(P=parseFloat(Et[2]))}let J=P+O+o-(b?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(G.attr("class").includes("methods-group")){const kt=Math.max(K,c/2);B?J=Math.max(W,$+z+kt+O+c*2+o)+c*2:J=$+z+kt+O+c*4+o}u.members.length===0&&u.methods.length===0&&((ut=i.class)!=null&&ut.hideEmptyMembersBox)&&(u.annotations.length>0?J=P-c:J=P),h||(J-=4);let nt=E;(G.attr("class").includes("label-group")||G.attr("class").includes("annotation-group"))&&(nt=-((gt=G.node())==null?void 0:gt.getBBox().width)/2||0,d.selectAll("text").each(function(kt,Et,st){window.getComputedStyle(st[Et]).textAnchor==="middle"&&(nt=0)})),G.attr("transform",`translate(${nt}, ${J})`)}),u.members.length>0||u.methods.length>0||b){const R=$+z+O+o,I=_.line(Y.x,R,Y.x+Y.width,R+.001,k);d.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(b||u.members.length>0||u.methods.length>0){const R=$+z+K+O+c*2+o,I=_.line(Y.x,B?Math.max(W,R):R,Y.x+Y.width,(B?Math.max(W,R):R)+.001,k);d.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(u.look!=="handDrawn"&&d.selectAll("path").attr("style",y),N.select(":nth-child(2)").attr("style",y),d.selectAll(".divider").select("path").attr("style",y),e.labelStyle?d.selectAll("span").attr("style",e.labelStyle):d.selectAll("span").attr("style",y),!h){const R=RegExp(/color\s*:\s*([^;]*)/),I=R.exec(y);if(I){const H=I[0].replace("color","fill");d.selectAll("tspan").attr("style",H)}else if(g){const H=R.exec(g);if(H){const G=H[0].replace("color","fill");d.selectAll("tspan").attr("style",G)}}}return zt(e,N),e.intersect=function(R){return Nt.rect(e,R)},d}A(ML,"classBox");async function LL(r,e){var Y,$;const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=Qt(e),{themeVariables:p}=we(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,y=r.insert("g").attr("class",d).attr("id",e.domId??e.id);let b;u?b=await Qn(y,`<<${a.type}>>`,0,e.labelStyle):b=await Qn(y,"<<Element>>",0,e.labelStyle);let _=b;const k=await Qn(y,a.name,_,e.labelStyle+"; font-weight: bold;");if(_+=k+h,u){const z=await Qn(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,_,e.labelStyle);_+=z;const K=await Qn(y,`${a.text?`Text: ${a.text}`:""}`,_,e.labelStyle);_+=K;const W=await Qn(y,`${a.risk?`Risk: ${a.risk}`:""}`,_,e.labelStyle);_+=W,await Qn(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,_,e.labelStyle)}else{const z=await Qn(y,`${o.type?`Type: ${o.type}`:""}`,_,e.labelStyle);_+=z,await Qn(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,_,e.labelStyle)}const w=(((Y=y.node())==null?void 0:Y.getBBox().width)??200)+c,T=((($=y.node())==null?void 0:$.getBBox().height)??200)+c,B=-w/2,E=-T/2,O=jt.svg(y),j=Dt(e,{});e.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const M=O.rectangle(B,E,w,T,j),N=y.insert(()=>M,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const z=e.colorIndex??0;y.attr("data-color-id",`color-${z%g.length}`)}if(y.selectAll(".label").each((z,K,W)=>{const F=Xt(W[K]),U=F.attr("transform");let R=0,I=0;if(U){const P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);P&&(R=parseFloat(P[1]),I=parseFloat(P[2]))}const H=I-T/2;let G=B+c/2;(K===0||K===1)&&(G=R),F.attr("transform",`translate(${G}, ${H+c})`)}),_>b+k+h){const z=E+b+k+h;let K;if(e.look==="neo"){const U=[[B,z],[B+w,z],[B+w,z+.001],[B,z+.001]];K=O.polygon(U,j)}else K=O.line(B,z,B+w,z,j);y.insert(()=>K).attr("class","divider")}return zt(e,N),e.intersect=function(z){return Nt.rect(e,z)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}A(LL,"requirementBox");async function Qn(r,e,i,n=""){if(e==="")return 0;const a=r.insert("g").attr("class","label").attr("style",n),o=we(),c=o.htmlLabels??!0,h=await es(a,w1(pl(e)),{width:Ka(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const d=h.children[0],p=Xt(h);u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}else{const d=h.children[0];for(const p of d.children)n&&p.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+i})`),u.height}A(Qn,"addText");var uW=A(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 OL(r,e,{config:i}){var K,W;const{labelStyles:n,nodeStyles:a}=Ft(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await Kt(r,e,Qt(e)),p=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((K=i==null?void 0:i.kanban)!=null&&K.ticketBaseUrl)&&(g=(W=i==null?void 0:i.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",e.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,_;x?{label:b,bbox:_}=await H0(x,"ticket"in e&&e.ticket||"",y):{label:b,bbox:_}=await H0(h,"ticket"in e&&e.ticket||"",y);const{label:k,bbox:w}=await H0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,B=(e==null?void 0:e.width)||0,E=Math.max(_.height,w.height)/2,O=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,j=-B/2,M=-O/2;d.attr("transform","translate("+(p-B/2)+", "+(-E-u.height/2)+")"),b.attr("transform","translate("+(p-B/2)+", "+(-E+u.height/2)+")"),k.attr("transform","translate("+(p+B/2-w.width-2*o)+", "+(-E+u.height/2)+")");let N;const{rx:Y,ry:$}=e,{cssStyles:z}=e;if(e.look==="handDrawn"){const F=jt.svg(h),U=Dt(e,{}),R=Y||$?F.path(co(j,M,B,O,Y||0),U):F.rectangle(j,M,B,O,U);N=h.insert(()=>R,":first-child"),N.attr("class","basic label-container").attr("style",z||null)}else{N=h.insert("rect",":first-child"),N.attr("class","basic label-container __APA__").attr("style",a).attr("rx",Y??5).attr("ry",$??5).attr("x",j).attr("y",M).attr("width",B).attr("height",O);const F="priority"in e&&e.priority;if(F){const U=h.append("line"),R=j+2,I=M+Math.floor((Y??0)/2),H=M+O-Math.floor((Y??0)/2);U.attr("x1",R).attr("y1",I).attr("x2",R).attr("y2",H).attr("stroke-width","4").attr("stroke",uW(F))}}return zt(e,N),e.height=O,e.intersect=function(F){return Nt.rect(e,F)},h}A(OL,"kanbanItem");async function NL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Kt(r,e,Qt(e)),u=o.width+10*c,d=o.height+8*c,p=.15*u,{cssStyles:g}=e,x=o.width+20,y=o.height+20,b=Math.max(u,x),_=Math.max(d,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let k;const w=`M0 0
|
|
341
|
+
a${p},${p} 1 0,0 ${b*.25},${-1*_*.1}
|
|
342
|
+
a${p},${p} 1 0,0 ${b*.25},0
|
|
343
|
+
a${p},${p} 1 0,0 ${b*.25},0
|
|
344
|
+
a${p},${p} 1 0,0 ${b*.25},${_*.1}
|
|
345
|
+
|
|
346
|
+
a${p},${p} 1 0,0 ${b*.15},${_*.33}
|
|
347
|
+
a${p*.8},${p*.8} 1 0,0 0,${_*.34}
|
|
348
|
+
a${p},${p} 1 0,0 ${-1*b*.15},${_*.33}
|
|
349
|
+
|
|
350
|
+
a${p},${p} 1 0,0 ${-1*b*.25},${_*.15}
|
|
351
|
+
a${p},${p} 1 0,0 ${-1*b*.25},0
|
|
352
|
+
a${p},${p} 1 0,0 ${-1*b*.25},0
|
|
353
|
+
a${p},${p} 1 0,0 ${-1*b*.25},${-1*_*.15}
|
|
354
|
+
|
|
355
|
+
a${p},${p} 1 0,0 ${-1*b*.1},${-1*_*.33}
|
|
356
|
+
a${p*.8},${p*.8} 1 0,0 0,${-1*_*.34}
|
|
357
|
+
a${p},${p} 1 0,0 ${b*.1},${-1*_*.33}
|
|
358
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const T=jt.svg(a),B=Dt(e,{}),E=T.path(w,B);k=a.insert(()=>E,":first-child"),k.attr("class","basic label-container").attr("style",zr(g))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return k.attr("transform",`translate(${-b/2}, ${-_/2})`),zt(e,k),e.calcIntersect=function(T,B){return Nt.rect(T,B)},e.intersect=function(T){return _t.info("Bang intersect",e,T),Nt.rect(e,T)},a}A(NL,"bang");async function RL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Kt(r,e,Qt(e)),u=o.width+2*c,d=o.height+2*c,p=.15*u,g=.25*u,x=.35*u,y=.2*u,{cssStyles:b}=e;let _;const k=`M0 0
|
|
359
|
+
a${p},${p} 0 0,1 ${u*.25},${-1*u*.1}
|
|
360
|
+
a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
|
|
361
|
+
a${g},${g} 1 0,1 ${u*.35},${u*.2}
|
|
362
|
+
|
|
363
|
+
a${p},${p} 1 0,1 ${u*.15},${d*.35}
|
|
364
|
+
a${y},${y} 1 0,1 ${-1*u*.15},${d*.65}
|
|
365
|
+
|
|
366
|
+
a${g},${p} 1 0,1 ${-1*u*.25},${u*.15}
|
|
367
|
+
a${x},${x} 1 0,1 ${-1*u*.5},0
|
|
368
|
+
a${p},${p} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
369
|
+
|
|
370
|
+
a${p},${p} 1 0,1 ${-1*u*.1},${-1*d*.35}
|
|
371
|
+
a${y},${y} 1 0,1 ${u*.1},${-1*d*.65}
|
|
372
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const w=jt.svg(a),T=Dt(e,{}),B=w.path(k,T);_=a.insert(()=>B,":first-child"),_.attr("class","basic label-container").attr("style",zr(b))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),_.attr("transform",`translate(${-u/2}, ${-d/2})`),zt(e,_),e.calcIntersect=function(w,T){return Nt.rect(w,T)},e.intersect=function(w){return _t.info("Cloud intersect",e,w),Nt.rect(e,w)},a}A(RL,"cloud");async function jL(r,e){const{labelStyles:i,nodeStyles:n}=Ft(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Kt(r,e,Qt(e)),u=o.width+8*c,d=o.height+2*c,p=5,g=e.look==="neo"?`
|
|
373
|
+
M${-u/2} ${d/2-p}
|
|
374
|
+
v${-d+2*p}
|
|
375
|
+
q0,-${p} ${p},-${p}
|
|
376
|
+
h${u-2*p}
|
|
377
|
+
q${p},0 ${p},${p}
|
|
378
|
+
v${d-p}
|
|
379
|
+
H${-u/2}
|
|
380
|
+
Z
|
|
381
|
+
`:`
|
|
382
|
+
M${-u/2} ${d/2-p}
|
|
383
|
+
v${-d+2*p}
|
|
384
|
+
q0,-${p} ${p},-${p}
|
|
385
|
+
h${u-2*p}
|
|
386
|
+
q${p},0 ${p},${p}
|
|
387
|
+
v${d-2*p}
|
|
388
|
+
q0,${p} ${-p},${p}
|
|
389
|
+
h${-(u-2*p)}
|
|
390
|
+
q${-p},0 ${-p},${-p}
|
|
391
|
+
Z
|
|
392
|
+
`;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),zt(e,x),e.calcIntersect=function(y,b){return Nt.rect(y,b)},e.intersect=function(y){return Nt.rect(e,y)},a}A(jL,"defaultMindmapNode");async function DL(r,e){const i={padding:e.padding??0};return bv(r,e,i)}A(DL,"mindmapCircle");var fW=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:dL},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:hL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:pL},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:xL},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:FM},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:bv},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:NL},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:RL},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:oL},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:UM},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tL},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:JM},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:kL},{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:ZM},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:zM},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:CL},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:EM},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:uL},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:yL},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:mL},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:PM},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:WM},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:NM},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:RM},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:jM},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:eL},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:TL},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:HM},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:_L},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:rL},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:DM},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:$M},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:wL},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:AL},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:qM},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:SL},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:IM},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:fL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:aL},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:nL},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:AM},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:OM},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:vL},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:bL},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:BL},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:lL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:iL}],dW=A(()=>{const e=[...Object.entries({state:gL,choice:MM,note:sL,rectWithTitle:cL,labelRect:KM,iconSquare:XM,iconCircle:GM,icon:YM,iconRounded:VM,imageSquare:QM,anchor:TM,kanbanItem:OL,mindmapCircle:DL,defaultMindmapNode:jL,classBox:ML,erBox:vv,requirementBox:LL}),...fW.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(a=>[a,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),FL=dW();function pW(r){return r in FL}A(pW,"isValidShape");var im=new Map;async function $L(r,e,i){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?FL[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;i.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,i)}else a=await o(r,e,i),n=a;return n.attr("data-look",zr(e.look)),e.tooltip&&a.attr("title",e.tooltip),im.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}A($L,"insertNode");var rrt=A((r,e)=>{im.set(e.id,r)},"setNodeElem"),irt=A(()=>{im.clear()},"clear"),nrt=A(r=>{const e=im.get(r.id);_t.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");const i=8,n=r.diff||0;return r.clusterNode?e.attr("transform","translate("+(r.x+n-r.width/2)+", "+(r.y-r.height/2-i)+")"):e.attr("transform","translate("+r.x+", "+r.y+")"),n},"positionNode"),gW=A((r,e,i,n,a,o=!1,c)=>{e.arrowTypeStart&&zw(r,"start",e.arrowTypeStart,i,n,a,o,c),e.arrowTypeEnd&&zw(r,"end",e.arrowTypeEnd,i,n,a,o,c)},"addEdgeMarkers"),mW={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},yW=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],zw=A((r,e,i,n,a,o,c=!1,h)=>{var b;const u=mW[i],d=u&&yW.includes(u.type);if(!u){_t.warn(`Unknown arrow type: ${i}`);return}const p=u.type,y=`${a}_${o}-${p}${e==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const _=h.replace(/[^\dA-Za-z]/g,"_"),k=`${y}_${_}`;if(!document.getElementById(k)){const w=document.getElementById(y);if(w){const T=w.cloneNode(!0);T.id=k,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),u.fill&&E.setAttribute("fill",h)}),(b=w.parentNode)==null||b.appendChild(T)}}r.attr(`marker-${e}`,`url(${n}#${k})`)}else r.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),xW=A(r=>{var e,i;return typeof r=="string"?r:(i=(e=we())==null?void 0:e.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),Sg=new Map,Gr=new Map,art=A(()=>{Sg.clear(),Gr.clear()},"clear"),mu=A(r=>r?typeof r=="string"?r:r.reduce((e,i)=>e+";"+i,""):"","getLabelStyles"),bW=A(async(r,e)=>{const i=we();let n=gi(i);const{labelStyles:a}=Ft(e);e.labelStyle=a;const o=r.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",d=await es(r,e.label,{style:mu(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(d),_t.info("abc82",e,e.labelType);let p=d.getBBox(),g=p;if(n){const y=d.children[0],b=Xt(d);p=y.getBoundingClientRect(),g=p,b.attr("width",p.width),b.attr("height",p.height)}else{const y=Xt(d).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",hu(g,n)),Sg.set(e.id,o),e.width=p.width,e.height=p.height;let x;if(e.startLabelLeft){const y=r.insert("g").attr("class","edgeTerminals"),b=y.insert("g").attr("class","inner"),_=await Ks(b,e.startLabelLeft,mu(e.labelStyle)||"",!1,!1);x=_;let k=_.getBBox();if(n){const w=_.children[0],T=Xt(_);k=w.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}b.attr("transform",hu(k,n)),Gr.get(e.id)||Gr.set(e.id,{}),Gr.get(e.id).startLeft=y,Fu(x,e.startLabelLeft)}if(e.startLabelRight){const y=r.insert("g").attr("class","edgeTerminals"),b=y.insert("g").attr("class","inner"),_=await Ks(b,e.startLabelRight,mu(e.labelStyle)||"",!1,!1);x=_,b.node().appendChild(_);let k=_.getBBox();if(n){const w=_.children[0],T=Xt(_);k=w.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}b.attr("transform",hu(k,n)),Gr.get(e.id)||Gr.set(e.id,{}),Gr.get(e.id).startRight=y,Fu(x,e.startLabelRight)}if(e.endLabelLeft){const y=r.insert("g").attr("class","edgeTerminals"),b=y.insert("g").attr("class","inner"),_=await Ks(b,e.endLabelLeft,mu(e.labelStyle)||"",!1,!1);x=_;let k=_.getBBox();if(n){const w=_.children[0],T=Xt(_);k=w.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}b.attr("transform",hu(k,n)),y.node().appendChild(_),Gr.get(e.id)||Gr.set(e.id,{}),Gr.get(e.id).endLeft=y,Fu(x,e.endLabelLeft)}if(e.endLabelRight){const y=r.insert("g").attr("class","edgeTerminals"),b=y.insert("g").attr("class","inner"),_=await Ks(b,e.endLabelRight,mu(e.labelStyle)||"",!1,!1);x=_;let k=_.getBBox();if(n){const w=_.children[0],T=Xt(_);k=w.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}b.attr("transform",hu(k,n)),y.node().appendChild(_),Gr.get(e.id)||Gr.set(e.id,{}),Gr.get(e.id).endRight=y,Fu(x,e.endLabelRight)}return d},"insertEdgeLabel");function Fu(r,e){gi(we())&&r&&(r.style.width=e.length*9+"px",r.style.height="12px")}A(Fu,"setTerminalWidth");var vW=A((r,e)=>{_t.debug("Moving label abc88 ",r.id,r.label,Sg.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath;const n=we(),{subGraphTitleTotalMargin:a}=sv(n);if(r.label){const o=Sg.get(r.id);let c=r.x,h=r.y;if(i){const u=Mn.calcLabelPosition(i);_t.debug("Moving label "+r.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(c=u.x,h=u.y)}o.attr("transform",`translate(${c}, ${h+a/2})`)}if(r.startLabelLeft){const o=Gr.get(r.id).startLeft;let c=r.x,h=r.y;if(i){const u=Mn.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){const o=Gr.get(r.id).startRight;let c=r.x,h=r.y;if(i){const u=Mn.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){const o=Gr.get(r.id).endLeft;let c=r.x,h=r.y;if(i){const u=Mn.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){const o=Gr.get(r.id).endRight;let c=r.x,h=r.y;if(i){const u=Mn.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),CW=A((r,e)=>{const i=r.x,n=r.y,a=Math.abs(e.x-i),o=Math.abs(e.y-n),c=r.width/2,h=r.height/2;return a>=c||o>=h},"outsideNode"),_W=A((r,e,i)=>{_t.debug(`intersection calc abc89:
|
|
393
|
+
outsidePoint: ${JSON.stringify(e)}
|
|
394
|
+
insidePoint : ${JSON.stringify(i)}
|
|
395
|
+
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);const n=r.x,a=r.y,o=Math.abs(n-i.x),c=r.width/2;let h=i.x<e.x?c-o:c+o;const u=r.height/2,d=Math.abs(e.y-i.y),p=Math.abs(e.x-i.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=i.y<e.y?e.y-u-a:a-u-e.y;h=p*g/d;const x={x:i.x<e.x?i.x+h:i.x-p+h,y:i.y<e.y?i.y+d-g:i.y-d+g};return h===0&&(x.x=e.x,x.y=e.y),p===0&&(x.x=e.x),d===0&&(x.y=e.y),_t.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${p}, r ${h}`,x),x}else{i.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=d*h/p,x=i.x<e.x?i.x+p-h:i.x-p+h,y=i.y<e.y?i.y+g:i.y-g;return _t.debug(`sides calc abc89, Q ${d}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:y}),h===0&&(x=e.x,y=e.y),p===0&&(x=e.x),d===0&&(y=e.y),{x,y}}},"intersection"),qw=A((r,e)=>{_t.warn("abc88 cutPathAtIntersect",r,e);let i=[],n=r[0],a=!1;return r.forEach(o=>{if(_t.info("abc88 checking point",o,e),!CW(e,o)&&!a){const c=_W(e,n,o);_t.debug("abc88 inside",o,n,c),_t.debug("abc88 intersection",c,e);let h=!1;i.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),i.some(u=>u.x===c.x&&u.y===c.y)?_t.warn("abc88 no intersect",c,i):i.push(c),a=!0}else _t.warn("abc88 outside",o,n),n=o,a||i.push(o)}),_t.debug("returning points",i),i},"cutPathAtIntersect");function zL(r){const e=[],i=[];for(let n=1;n<r.length-1;n++){const a=r[n-1],o=r[n],c=r[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),i.push(n))}return{cornerPoints:e,cornerPointPositions:i}}A(zL,"extractCornerPoints");var Iw=A(function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=Math.sqrt(n*n+a*a),c=i/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),kW=A(function(r){const{cornerPointPositions:e}=zL(r),i=[];for(let n=0;n<r.length;n++)if(e.includes(n)){const a=r[n-1],o=r[n+1],c=r[n],h=Iw(a,c,5),u=Iw(o,c,5),d=u.x-h.x,p=u.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){_t.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const y=5;c.x===h.x?x={x:d<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:x={x:d<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else _t.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));i.push(x,u)}else i.push(r[n]);return i},"fixCorners"),SW=A((r,e,i)=>{const n=r-e-i,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${i}`},"generateDashArray"),wW=A(function(r,e,i,n,a,o,c,h=!1){var I;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=we();let d=e.points,p=!1;const g=a;var x=o;const y=[];for(const H in e.cssCompiledStyles)$5(H)||y.push(e.cssCompiledStyles[H]);_t.debug("UIO intersect check",e.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(d=d.slice(1,e.points.length-1),d.unshift(g.intersect(d[0])),_t.debug("Last point UIO",e.start,"-->",e.end,d[d.length-1],x,x.intersect(d[d.length-1])),d.push(x.intersect(d[d.length-1])));const b=btoa(JSON.stringify(d));e.toCluster&&(_t.info("to cluster abc88",i.get(e.toCluster)),d=qw(e.points,i.get(e.toCluster).node),p=!0),e.fromCluster&&(_t.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(d,null,2)),d=qw(d.reverse(),i.get(e.fromCluster).node).reverse(),p=!0);let _=d.filter(H=>!Number.isNaN(H.y));const k=xW(e.curve);k!=="rounded"&&(_=kW(_));let w=Uu;switch(k){case"linear":w=Uu;break;case"basis":w=Jx;break;case"cardinal":w=xE;break;case"bumpX":w=dE;break;case"bumpY":w=pE;break;case"catmullRom":w=vE;break;case"monotoneX":w=TE;break;case"monotoneY":w=BE;break;case"natural":w=EE;break;case"step":w=ME;break;case"stepAfter":w=OE;break;case"stepBefore":w=LE;break;case"rounded":w=Uu;break;default:w=Jx}const{x:T,y:B}=bq(e),E=X7().x(T).y(B).curve(w);let O;switch(e.thickness){case"normal":O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible";break;default:O="edge-thickness-normal"}switch(e.pattern){case"solid":O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed";break;default:O+=" edge-pattern-solid"}let j,M=k==="rounded"?qL(IL(_,e),5):E(_);const N=Array.isArray(e.style)?e.style:[e.style];let Y=N.find(H=>H==null?void 0:H.startsWith("stroke:")),$="";e.animate&&($="edge-animation-fast"),e.animation&&($="edge-animation-"+e.animation);let z=!1;if(e.look==="handDrawn"){const H=jt.svg(r);Object.assign([],_);const G=H.path(M,{roughness:.3,seed:u});O+=" transition",j=Xt(G).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",N?N.reduce((P,J)=>P+";"+J,""):"");let Z=j.attr("d");j.attr("d",Z),r.node().appendChild(j.node())}else{const H=y.join(";"),G=N?N.reduce((gt,kt)=>gt+kt+";",""):"",Z=(H?H+";"+G+";":G)+";"+(N?N.reduce((gt,kt)=>gt+";"+kt,""):"");j=r.append("path").attr("d",M).attr("id",`${c}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",Z),Y=(I=Z.match(/stroke:([^;]+)/))==null?void 0:I[1],z=e.animate===!0||!!e.animation||H.includes("animation");const P=j.node(),J=typeof P.getTotalLength=="function"?P.getTotalLength():0,nt=WS[e.arrowTypeStart]||0,ut=WS[e.arrowTypeEnd]||0;if(e.look==="neo"&&!z){const kt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?SW(J,nt,ut):`0 ${nt} ${J-nt-ut} ${ut}`}; stroke-dashoffset: 0;`;j.attr("style",kt+j.attr("style"))}}j.attr("data-edge",!0),j.attr("data-et","edge"),j.attr("data-id",e.id),j.attr("data-points",b),j.attr("data-look",zr(e.look)),e.showPoints&&_.forEach(H=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let K="";(we().flowchart.arrowMarkerAbsolute||we().state.arrowMarkerAbsolute)&&(K=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,K=K.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),_t.info("arrowTypeStart",e.arrowTypeStart),_t.info("arrowTypeEnd",e.arrowTypeEnd);const W=!z&&(e==null?void 0:e.look)==="neo";gW(j,e,K,c,n,W,Y);const F=Math.floor(d.length/2),U=d[F];Mn.isLabelCoordinateInPath(U,j.attr("d"))||(p=!0);let R={};return p&&(R.updatedPath=d),R.originalPath=e.points,R},"insertEdge");function qL(r,e){if(r.length<2)return"";let i="";const n=r.length,a=1e-5;for(let o=0;o<n;o++){const c=r[o],h=r[o-1],u=r[o+1];if(o===0)i+=`M${c.x},${c.y}`;else if(o===n-1)i+=`L${c.x},${c.y}`;else{const d=c.x-h.x,p=c.y-h.y,g=u.x-c.x,x=u.y-c.y,y=Math.hypot(d,p),b=Math.hypot(g,x);if(y<a||b<a){i+=`L${c.x},${c.y}`;continue}const _=d/y,k=p/y,w=g/b,T=x/b,B=_*w+k*T,E=Math.max(-1,Math.min(1,B)),O=Math.acos(E);if(O<a||Math.abs(Math.PI-O)<a){i+=`L${c.x},${c.y}`;continue}const j=Math.min(e/Math.sin(O/2),y/2,b/2),M=c.x-_*j,N=c.y-k*j,Y=c.x+w*j,$=c.y+T*j;i+=`L${M},${N}`,i+=`Q${c.x},${c.y} ${Y},${$}`}}return i}A(qL,"generateRoundedPath");function Eb(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};const i=e.x-r.x,n=e.y-r.y;return{angle:Math.atan2(n,i),deltaX:i,deltaY:n}}A(Eb,"calculateDeltaAndAngle");function IL(r,e){const i=r.map(a=>({...a}));if(r.length>=2&&ti[e.arrowTypeStart]){const a=ti[e.arrowTypeStart],o=r[0],c=r[1],{angle:h}=Eb(o,c),u=a*Math.cos(h),d=a*Math.sin(h);i[0].x=o.x+u,i[0].y=o.y+d}const n=r.length;if(n>=2&&ti[e.arrowTypeEnd]){const a=ti[e.arrowTypeEnd],o=r[n-1],c=r[n-2],{angle:h}=Eb(c,o),u=a*Math.cos(h),d=a*Math.sin(h);i[n-1].x=o.x-u,i[n-1].y=o.y-d}return i}A(IL,"applyMarkerOffsetsToPoints");var TW=A((r,e,i,n)=>{e.forEach(a=>{XW[a](r,i,n)})},"insertMarkers"),BW=A((r,e,i)=>{_t.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",190).attr("markerHeight",240).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").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"),AW=A((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").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").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"),EW=A((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").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").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"),MW=A((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").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").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"),LW=A((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").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").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"),OW=A((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"),NW=A((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"),RW=A((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"),jW=A((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"),DW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{transitionColor:o}=a;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",`${o}`)},"barbNeo"),FW=A((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"),$W=A((r,e,i)=>{const 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");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),zW=A((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"),qW=A((r,e,i)=>{const 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("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),IW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o}=a;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",`${o}`),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",`${o}`)},"only_one_neo"),PW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=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");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const u=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");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),HW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o}=a;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",`${o}`),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",`${o}`)},"one_or_more_neo"),UW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=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");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const u=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");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),WW=A((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
|
|
396
|
+
L20,10
|
|
397
|
+
M20,10
|
|
398
|
+
L0,20`)},"requirement_arrow"),YW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o}=a;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",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
399
|
+
L20,10
|
|
400
|
+
M20,10
|
|
401
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),GW=A((r,e,i)=>{const n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),VW=A((r,e,i)=>{const n=nr(),{themeVariables:a}=n,{strokeWidth:o}=a,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",`${o}`)},"requirement_contains_neo"),XW={extension:BW,composition:AW,aggregation:EW,dependency:MW,lollipop:LW,point:OW,circle:NW,cross:RW,barb:jW,barbNeo:DW,only_one:FW,zero_or_one:$W,one_or_more:zW,zero_or_more:qW,only_one_neo:IW,zero_or_one_neo:PW,one_or_more_neo:HW,zero_or_more_neo:UW,requirement_arrow:WW,requirement_contains:GW,requirement_arrow_neo:YW,requirement_contains_neo:VW},QW=TW,ZW={common:Sf,getConfig:nr,insertCluster:VU,insertEdge:wW,insertEdgeLabel:bW,insertMarkers:QW,insertNode:$L,interpolateToCurve:tv,labelHelper:Kt,log:_t,positionEdgeLabel:vW},df={},PL=A(r=>{for(const e of r)df[e.name]=e},"registerLayoutLoaders"),KW=A(()=>{PL([{name:"dagre",loader:A(async()=>await Ce(()=>import("./dagre-KV5264BT-CsX1ZayG.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:A(async()=>await Ce(()=>import("./cose-bilkent-S5V4N54A-BxYomDLe.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");KW();var srt=A(async(r,e)=>{if(!(r.layoutAlgorithm in df))throw new Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(const p of r.nodes){const g=p.domId||p.id;p.domId=`${r.diagramId}-${g}`}const i=df[r.layoutAlgorithm],n=await i.loader(),{theme:a,themeVariables:o}=r.config,{useGradient:c,gradientStart:h,gradientStop:u}=o,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(r,e,ZW,{algorithm:i.algorithm})},"render"),ort=A((r="",{fallback:e="dagre"}={})=>{if(r in df)return r;if(e in df)return _t.warn(`Layout algorithm ${r} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${r} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),HL="comm",UL="rule",WL="decl",JW="@import",tY="@namespace",eY="@keyframes",rY="@layer",iY=Math.abs,Gu=String.fromCharCode;function YL(r){return r.trim()}function Mb(r,e,i){return r.replace(e,i)}function Cc(r,e){return r.charCodeAt(e)|0}function th(r,e,i){return r.slice(e,i)}function Jn(r){return r.length}function nY(r){return r.length}function fp(r,e){return e.push(r),r}var nm=1,eh=1,GL=0,mn=0,wr=0,lh="";function Cv(r,e,i,n,a,o,c,h){return{value:r,root:e,parent:i,type:n,props:a,children:o,line:nm,column:eh,length:c,return:"",siblings:h}}function aY(){return wr}function sY(){return wr=mn>0?Cc(lh,--mn):0,eh--,wr===10&&(eh=1,nm--),wr}function Nn(){return wr=mn<GL?Cc(lh,mn++):0,eh++,wr===10&&(eh=1,nm++),wr}function Js(){return Cc(lh,mn)}function Rp(){return mn}function am(r,e){return th(lh,r,e)}function pf(r){switch(r){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oY(r){return nm=eh=1,GL=Jn(lh=r),mn=0,[]}function lY(r){return lh="",r}function W0(r){return YL(am(mn-1,Lb(r===91?r+2:r===40?r+1:r)))}function cY(r){for(;(wr=Js())&&wr<33;)Nn();return pf(r)>2||pf(wr)>3?"":" "}function hY(r,e){for(;--e&&Nn()&&!(wr<48||wr>102||wr>57&&wr<65||wr>70&&wr<97););return am(r,Rp()+(e<6&&Js()==32&&Nn()==32))}function Lb(r){for(;Nn();)switch(wr){case r:return mn;case 34:case 39:r!==34&&r!==39&&Lb(wr);break;case 40:r===41&&Lb(r);break;case 92:Nn();break}return mn}function uY(r,e){for(;Nn()&&r+wr!==57;)if(r+wr===84&&Js()===47)break;return"/*"+am(e,mn-1)+"*"+Gu(r===47?r:Nn())}function fY(r){for(;!pf(Js());)Nn();return am(r,mn)}function dY(r){return lY(jp("",null,null,null,[""],r=oY(r),0,[0],r))}function jp(r,e,i,n,a,o,c,h,u){for(var d=0,p=0,g=c,x=0,y=0,b=0,_=1,k=1,w=1,T=0,B=0,E="",O=a,j=o,M=n,N=E;k;)switch(b=B,B=Nn()){case 40:b!=108&&Cc(N,g-1)==58?(T++,N+="("):N+=W0(B);break;case 41:T--,N+=")";break;case 34:case 39:case 91:N+=W0(B);break;case 9:case 10:case 13:case 32:if(T>0){N+=Gu(B);break}N+=cY(b);break;case 92:N+=hY(Rp()-1,7);continue;case 47:switch(Js()){case 42:case 47:fp(pY(uY(Nn(),Rp()),e,i,u),u),(pf(b||1)==5||pf(Js()||1)==5)&&Jn(N)&&th(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*_:h[d++]=Jn(N)*w;case 125*_:case 59:case 0:if(T>0&&B){N+=Gu(B);break}switch(B){case 0:case 125:k=0;case 59+p:w==-1&&(N=Mb(N,/\f/g,"")),y>0&&(Jn(N)-g||_===0)&&fp(y>32?Hw(N+";",n,i,g-1,u):Hw(Mb(N," ","")+";",n,i,g-2,u),u);break;case 59:N+=";";default:if(fp(M=Pw(N,e,i,d,p,a,h,E,O=[],j=[],g,o),o),B===123)if(p===0)jp(N,e,M,M,O,o,g,h,j);else{switch(x){case 99:if(Cc(N,3)===110)break;case 108:if(Cc(N,2)===97)break;default:p=0;case 100:case 109:case 115:}p?jp(r,M,M,n&&fp(Pw(r,M,M,0,0,a,h,E,a,O=[],g,j),j),a,j,g,h,n?O:j):jp(N,M,M,M,[""],j,0,h,j)}}d=p=y=0,_=w=1,E=N="",g=c;break;case 58:g=1+Jn(N),y=b;default:if(_<1){if(B==123)--_;else if(B==125&&_++==0&&sY()==125)continue}switch(N+=Gu(B),B*_){case 38:w=p>0?1:(N+="\f",-1);break;case 44:if(T>0)break;h[d++]=(Jn(N)-1)*w,w=1;break;case 64:Js()===45&&(N+=W0(Nn())),x=Js(),p=g=Jn(E=N+=fY(Rp())),B++;break;case 45:b===45&&Jn(N)==2&&(_=0)}}return o}function Pw(r,e,i,n,a,o,c,h,u,d,p,g){for(var x=a-1,y=a===0?o:[""],b=nY(y),_=0,k=0,w=0;_<n;++_)for(var T=0,B=th(r,x+1,x=iY(k=c[_])),E=r;T<b;++T)(E=YL(k>0?y[T]+" "+B:Mb(B,/&\f/g,y[T])))&&(u[w++]=E);return Cv(r,e,i,a===0?UL:h,u,d,p,g)}function pY(r,e,i,n){return Cv(r,e,i,HL,Gu(aY()),th(r,2,-2),0,n)}function Hw(r,e,i,n,a){return Cv(r,e,i,WL,th(r,0,n),th(r,n+1,-1),n,a)}function Ob(r,e){for(var i="",n=0;n<r.length;n++)i+=e(r[n],n,r,e)||"";return i}function gY(r,e,i,n){switch(r.type){case rY:if(r.children.length)break;case JW:case tY:case WL:return r.return=r.return||r.value;case HL:return"";case eY:return r.return=r.value+"{"+Ob(r.children,n)+"}";case UL:if(!Jn(r.value=r.props.join(",")))return""}return Jn(i=Ob(r.children,n))?r.return=r.value+"{"+i+"}":""}var mY=y5(Object.keys,Object),yY=Object.prototype,xY=yY.hasOwnProperty;function bY(r){if(!Xg(r))return mY(r);var e=[];for(var i in Object(r))xY.call(r,i)&&i!="constructor"&&e.push(i);return e}var Nb=Cl($n,"DataView"),Rb=Cl($n,"Promise"),jb=Cl($n,"Set"),Db=Cl($n,"WeakMap"),Uw="[object Map]",vY="[object Object]",Ww="[object Promise]",Yw="[object Set]",Gw="[object WeakMap]",Vw="[object DataView]",CY=vl(Nb),_Y=vl(uf),kY=vl(Rb),SY=vl(jb),wY=vl(Db),Po=bl;(Nb&&Po(new Nb(new ArrayBuffer(1)))!=Vw||uf&&Po(new uf)!=Uw||Rb&&Po(Rb.resolve())!=Ww||jb&&Po(new jb)!=Yw||Db&&Po(new Db)!=Gw)&&(Po=function(r){var e=bl(r),i=e==vY?r.constructor:void 0,n=i?vl(i):"";if(n)switch(n){case CY:return Vw;case _Y:return Uw;case kY:return Ww;case SY:return Yw;case wY:return Gw}return e});var TY="[object Map]",BY="[object Set]",AY=Object.prototype,EY=AY.hasOwnProperty;function Xw(r){if(r==null)return!0;if(Qg(r)&&(pg(r)||typeof r=="string"||typeof r.splice=="function"||K1(r)||J1(r)||dg(r)))return!r.length;var e=Po(r);if(e==TY||e==BY)return!r.size;if(Xg(r))return!bY(r).length;for(var i in r)if(EY.call(r,i))return!1;return!0}var VL="c4",MY=A(r=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(r),"detector"),LY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-FwcHT5er.js");return{diagram:e}},__vite__mapDeps([8,9]));return{id:VL,diagram:r}},"loader"),OY={id:VL,detector:MY,loader:LY},NY=OY,XL="flowchart",RY=A((r,e)=>{var i,n;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(r)},"detector"),jY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-jdNEPVFq.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:XL,diagram:r}},"loader"),DY={id:XL,detector:RY,loader:jY},FY=DY,QL="flowchart-v2",$Y=A((r,e)=>{var i,n,a;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(r)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(r))},"detector"),zY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-jdNEPVFq.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:QL,diagram:r}},"loader"),qY={id:QL,detector:$Y,loader:zY},IY=qY,ZL="er",PY=A(r=>/^\s*erDiagram/.test(r),"detector"),HY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-C6pE7F61.js");return{diagram:e}},__vite__mapDeps([15,12,13,14]));return{id:ZL,diagram:r}},"loader"),UY={id:ZL,detector:PY,loader:HY},WY=UY,KL="gitGraph",YY=A(r=>/^\s*gitGraph/.test(r),"detector"),GY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-SiRn7RJ8.js");return{diagram:e}},__vite__mapDeps([16,17,18,19,4,2]));return{id:KL,diagram:r}},"loader"),VY={id:KL,detector:YY,loader:GY},XY=VY,JL="gantt",QY=A(r=>/^\s*gantt/.test(r),"detector"),ZY=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-C8GoRj1C.js");return{diagram:e}},__vite__mapDeps([20,21,22]));return{id:JL,diagram:r}},"loader"),KY={id:JL,detector:QY,loader:ZY},JY=KY,tO="info",tG=A(r=>/^\s*info/.test(r),"detector"),eG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-DcDC8M1a.js");return{diagram:e}},__vite__mapDeps([23,19,4,2]));return{id:tO,diagram:r}},"loader"),rG={id:tO,detector:tG,loader:eG},eO="pie",iG=A(r=>/^\s*pie/.test(r),"detector"),nG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-lIVvnPyq.js");return{diagram:e}},__vite__mapDeps([24,17,19,4,2,25]));return{id:eO,diagram:r}},"loader"),aG={id:eO,detector:iG,loader:nG},rO="quadrantChart",sG=A(r=>/^\s*quadrantChart/.test(r),"detector"),oG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-DSMB57t5.js");return{diagram:e}},__vite__mapDeps([26,21,22]));return{id:rO,diagram:r}},"loader"),lG={id:rO,detector:sG,loader:oG},cG=lG,iO="xychart",hG=A(r=>/^\s*xychart(-beta)?/.test(r),"detector"),uG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-BzSx7EpJ.js");return{diagram:e}},__vite__mapDeps([27,21,22]));return{id:iO,diagram:r}},"loader"),fG={id:iO,detector:hG,loader:uG},dG=fG,nO="requirement",pG=A(r=>/^\s*requirement(Diagram)?/.test(r),"detector"),gG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-NG99tgmc.js");return{diagram:e}},__vite__mapDeps([28,12,13]));return{id:nO,diagram:r}},"loader"),mG={id:nO,detector:pG,loader:gG},yG=mG,aO="sequence",xG=A(r=>/^\s*sequenceDiagram/.test(r),"detector"),bG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-ASU7Zp6_.js");return{diagram:e}},__vite__mapDeps([29,9,18]));return{id:aO,diagram:r}},"loader"),vG={id:aO,detector:xG,loader:bG},CG=vG,sO="class",_G=A((r,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(r)},"detector"),kG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-Bk4KDqBj.js");return{diagram:e}},__vite__mapDeps([30,31,11,9,12,13]));return{id:sO,diagram:r}},"loader"),SG={id:sO,detector:_G,loader:kG},wG=SG,oO="classDiagram",TG=A((r,e)=>{var i;return/^\s*classDiagram/.test(r)&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(r)},"detector"),BG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-Bk4KDqBj.js");return{diagram:e}},__vite__mapDeps([32,31,11,9,12,13]));return{id:oO,diagram:r}},"loader"),AG={id:oO,detector:TG,loader:BG},EG=AG,lO="state",MG=A((r,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(r)},"detector"),LG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-DHklUzce.js");return{diagram:e}},__vite__mapDeps([33,34,12,13,1,2,3,4]));return{id:lO,diagram:r}},"loader"),OG={id:lO,detector:MG,loader:LG},NG=OG,cO="stateDiagram",RG=A((r,e)=>{var i;return!!(/^\s*stateDiagram-v2/.test(r)||/^\s*stateDiagram/.test(r)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),jG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-BZXFb2Fh.js");return{diagram:e}},__vite__mapDeps([35,34,12,13]));return{id:cO,diagram:r}},"loader"),DG={id:cO,detector:RG,loader:jG},FG=DG,hO="journey",$G=A(r=>/^\s*journey/.test(r),"detector"),zG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-CXJPYMxN.js");return{diagram:e}},__vite__mapDeps([36,11,9,25]));return{id:hO,diagram:r}},"loader"),qG={id:hO,detector:$G,loader:zG},IG=qG,PG=A((r,e,i)=>{_t.debug(`rendering svg for syntax error
|
|
402
|
+
`);const n=u9(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),RA(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),uO={draw:PG},HG=uO,UG={db:{},renderer:uO,parser:{parse:A(()=>{},"parse")}},WG=UG,fO="flowchart-elk",YG=A((r,e={})=>{var i;return/^\s*flowchart-elk/.test(r)||/^\s*(flowchart|graph)/.test(r)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),GG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-jdNEPVFq.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:fO,diagram:r}},"loader"),VG={id:fO,detector:YG,loader:GG},XG=VG,dO="timeline",QG=A(r=>/^\s*timeline/.test(r),"detector"),ZG=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-B37xNhjS.js");return{diagram:e}},__vite__mapDeps([37,25]));return{id:dO,diagram:r}},"loader"),KG={id:dO,detector:QG,loader:ZG},JG=KG,pO="mindmap",tV=A(r=>/^\s*mindmap/.test(r),"detector"),eV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-tksxnjhx.js");return{diagram:e}},__vite__mapDeps([38,12,13]));return{id:pO,diagram:r}},"loader"),rV={id:pO,detector:tV,loader:eV},iV=rV,gO="kanban",nV=A(r=>/^\s*kanban/.test(r),"detector"),aV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-Cm1n9eat.js");return{diagram:e}},__vite__mapDeps([39,11]));return{id:gO,diagram:r}},"loader"),sV={id:gO,detector:nV,loader:aV},oV=sV,mO="sankey",lV=A(r=>/^\s*sankey(-beta)?/.test(r),"detector"),cV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-C6EkbQKo.js");return{diagram:e}},[]);return{id:mO,diagram:r}},"loader"),hV={id:mO,detector:lV,loader:cV},uV=hV,yO="packet",fV=A(r=>/^\s*packet(-beta)?/.test(r),"detector"),dV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-BpiYFv-I.js");return{diagram:e}},__vite__mapDeps([40,17,19,4,2]));return{id:yO,diagram:r}},"loader"),pV={id:yO,detector:fV,loader:dV},xO="radar",gV=A(r=>/^\s*radar-beta/.test(r),"detector"),mV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-DaYymOrR.js");return{diagram:e}},__vite__mapDeps([41,17,19,4,2]));return{id:xO,diagram:r}},"loader"),yV={id:xO,detector:gV,loader:mV},bO="block",xV=A(r=>/^\s*block(-beta)?/.test(r),"detector"),bV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-DMobz1n7.js");return{diagram:e}},__vite__mapDeps([42,11,5,1,2,14]));return{id:bO,diagram:r}},"loader"),vV={id:bO,detector:xV,loader:bV},CV=vV,vO="treeView",_V=A(r=>/^\s*treeView-beta/.test(r),"detector"),kV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-B2G4mPPw.js");return{diagram:e}},__vite__mapDeps([43,17,18,19,4,2]));return{id:vO,diagram:r}},"loader"),SV={id:vO,detector:_V,loader:kV},wV=SV,CO="architecture",TV=A(r=>/^\s*architecture/.test(r),"detector"),BV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-CCvw4XFg.js");return{diagram:e}},__vite__mapDeps([44,17,19,4,2,7]));return{id:CO,diagram:r}},"loader"),AV={id:CO,detector:TV,loader:BV},EV=AV,_O="ishikawa",MV=A(r=>/^\s*ishikawa(-beta)?\b/i.test(r),"detector"),LV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-UjyrPeaS.js");return{diagram:e}},[]);return{id:_O,diagram:r}},"loader"),OV={id:_O,detector:MV,loader:LV},kO="venn",NV=A(r=>/^\s*venn-beta/.test(r),"detector"),RV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-D28OvWbm.js");return{diagram:e}},[]);return{id:kO,diagram:r}},"loader"),jV={id:kO,detector:NV,loader:RV},DV=jV,SO="treemap",FV=A(r=>/^\s*treemap/.test(r),"detector"),$V=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-C8nxN9ZB.js");return{diagram:e}},__vite__mapDeps([45,13,17,19,4,2,22]));return{id:SO,diagram:r}},"loader"),zV={id:SO,detector:FV,loader:$V},wO="wardley-beta",qV=A(r=>/^\s*wardley-beta/i.test(r),"detector"),IV=A(async()=>{const{diagram:r}=await Ce(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-D0vChrnT.js");return{diagram:e}},__vite__mapDeps([46,17,19,4,2]));return{id:wO,diagram:r}},"loader"),PV={id:wO,detector:qV,loader:IV},HV=PV,Qw=!1,sm=A(()=>{Qw||(Qw=!0,Xp("error",WG,r=>r.toLowerCase().trim()==="error"),Xp("---",{db:{clear:A(()=>{},"clear")},styles:{},renderer:{draw:A(()=>{},"draw")},parser:{parse:A(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:A(()=>null,"init")},r=>r.toLowerCase().trimStart().startsWith("---")),$x(XG,iV,EV),$x(NY,oV,EG,wG,WY,JY,rG,aG,yG,CG,IY,FY,JG,XY,FG,NG,IG,cG,uV,pV,dG,CV,wV,yV,OV,zV,DV,HV))},"addDiagrams"),UV=A(async()=>{_t.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(cl).map(async([i,{detector:n,loader:a}])=>{if(a)try{Px(i)}catch{try{const{diagram:o,id:c}=await a();Xp(c,o,n)}catch(o){throw _t.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete cl[i],o}}}))).filter(i=>i.status==="rejected");if(e.length>0){_t.error(`Failed to load ${e.length} external diagrams`);for(const i of e)_t.error(i);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),WV="graphics-document document";function TO(r,e){r.attr("role",WV),e!==""&&r.attr("aria-roledescription",e)}A(TO,"setA11yDiagramInfo");function BO(r,e,i,n){if(r.insert!==void 0){if(i){const a=`chart-desc-${n}`;r.attr("aria-describedby",a),r.insert("desc",":first-child").attr("id",a).text(i)}if(e){const a=`chart-title-${n}`;r.attr("aria-labelledby",a),r.insert("title",":first-child").attr("id",a).text(e)}}}A(BO,"addSVGa11yTitleDescription");var al,Fb=(al=class{constructor(e,i,n,a,o){this.type=e,this.text=i,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,i={}){var d,p;const n=nr(),a=v1(e,n);e=pH(e)+`
|
|
403
|
+
`;try{Px(a)}catch{const g=UF(a);if(!g)throw new vA(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();Xp(x,y)}const{db:o,parser:c,renderer:h,init:u}=Px(a);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),u==null||u(n),i.title&&((p=o.setDiagramTitle)==null||p.call(o,i.title)),await c.parse(e),new al(a,e,o,c,h)}async render(e,i){await this.renderer.draw(this.text,e,i,this)}getParser(){return this.parser}getType(){return this.type}},A(al,"Diagram"),al),Zw=[],YV=A(()=>{Zw.forEach(r=>{r()}),Zw=[]},"attachFunctions"),GV=A(r=>r.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function AO(r){const e=r.match(bA);if(!e)return{text:r,metadata:{}};let i=xq(e[1],{schema:yq})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const n={};return i.displayMode&&(n.displayMode=i.displayMode.toString()),i.title&&(n.title=i.title.toString()),i.config&&(n.config=i.config),{text:r.slice(e[0].length),metadata:n}}A(AO,"extractFrontMatter");var VV=A(r=>r.replace(/\r\n?/g,`
|
|
404
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,i,n)=>"<"+i+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),XV=A(r=>{const{text:e,metadata:i}=AO(r),{displayMode:n,title:a,config:o={}}=i;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),QV=A(r=>{const e=Mn.detectInit(r)??{},i=Mn.detectDirective(r,"wrap");return Array.isArray(i)?e.wrap=i.some(({type:n})=>n==="wrap"):(i==null?void 0:i.type)==="wrap"&&(e.wrap=!0),{text:eH(r),directive:e}},"processDirectives");function _v(r){const e=VV(r),i=XV(e),n=QV(i.text),a=av(i.config,n.directive);return r=GV(n.text),{code:r,title:i.title,config:a}}A(_v,"preprocessDiagram");function EO(r){const e=new TextEncoder().encode(r),i=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(i)}A(EO,"toBase64");var ZV=5e4,KV="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",JV="sandbox",tX="loose",eX="http://www.w3.org/2000/svg",rX="http://www.w3.org/1999/xlink",iX="http://www.w3.org/1999/xhtml",nX="100%",aX="100%",sX="border:0;margin:0;",oX="margin:0",lX="allow-top-navigation-by-user-activation allow-popups",cX='The "iframe" tag is not supported by your browser.',hX=["foreignobject"],uX=["dominant-baseline"];function kv(r){const e=_v(r);return Gp(),x6(e.config??{}),e}A(kv,"processAndSetConfigs");async function MO(r,e){sm();try{const{code:i,config:n}=kv(r);return{diagramType:(await OO(i)).type,config:n}}catch(i){if(e!=null&&e.suppressErrors)return!1;throw i}}A(MO,"parse");var Kw=A((r,e,i=[])=>`
|
|
405
|
+
.${r} ${e} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),fX=A((r,e=new Map)=>{let i="";if(r.themeCSS!==void 0&&(i+=`
|
|
406
|
+
${r.themeCSS}`),r.fontFamily!==void 0&&(i+=`
|
|
407
|
+
:root { --mermaid-font-family: ${r.fontFamily}}`),r.altFontFamily!==void 0&&(i+=`
|
|
408
|
+
:root { --mermaid-alt-font-family: ${r.altFontFamily}}`),e instanceof Map){const c=gi(r)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{Xw(h.styles)||c.forEach(u=>{i+=Kw(h.id,u,h.styles)}),Xw(h.textStyles)||(i+=Kw(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return i},"createCssStyles"),dX=A((r,e,i,n)=>{const a=fX(r,i),o=F6(e,a,{...r.themeVariables,theme:r.theme,look:r.look},n);return Ob(dY(`${n}{${o}}`),gY)},"createUserStyles"),pX=A((r="",e,i)=>{let n=r;return!i&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=pl(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),gX=A((r="",e)=>{var a,o;const i=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":aX,n=EO(`<body style="${oX}">${r}</body>`);return`<iframe style="width:${nX};height:${i};${sX}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${lX}">
|
|
409
|
+
${cX}
|
|
410
|
+
</iframe>`},"putIntoIFrame"),Jw=A((r,e,i,n,a)=>{const o=r.append("div");o.attr("id",i),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",eX);return a&&c.attr("xmlns:xlink",a),c.append("g"),r},"appendDivSvgG");function $b(r,e){return r.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}A($b,"sandboxedIframe");var mX=A((r,e,i,n)=>{var a,o,c;(a=r.getElementById(e))==null||a.remove(),(o=r.getElementById(i))==null||o.remove(),(c=r.getElementById(n))==null||c.remove()},"removeExistingElements"),yX=A(async function(r,e,i){var K,W,F,U,R,I;sm();const n=kv(e);e=n.code;const a=nr();_t.debug(a),e.length>((a==null?void 0:a.maxTextSize)??ZV)&&(e=KV);const o="#"+r,c="i"+r,h="#"+c,u="d"+r,d="#"+u,p=A(()=>{const G=Xt(x?h:d).node();G&&"remove"in G&&G.remove()},"removeTempElements");let g=Xt("body");const x=a.securityLevel===JV,y=a.securityLevel===tX,b=a.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const H=$b(Xt(i),c);g=Xt(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt(i);Jw(g,r,u,`font-family: ${b}`,rX)}else{if(mX(document,r,u,c),x){const H=$b(Xt("body"),c);g=Xt(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt("body");Jw(g,r,u)}let _,k;try{_=await Fb.fromText(e,{title:n.title})}catch(H){if(a.suppressErrorRendering)throw p(),H;_=await Fb.fromText("error"),k=H}const w=g.select(d).node(),T=_.type,B=w.firstChild,E=B.firstChild,O=(W=(K=_.renderer).getClasses)==null?void 0:W.call(K,e,_),j=dX(a,T,O,o),M=document.createElement("style");M.innerHTML=j,B.insertBefore(M,E);try{await _.renderer.draw(e,r,"11.14.0",_)}catch(H){throw a.suppressErrorRendering?p():HG.draw(e,r,"11.14.0"),H}const N=g.select(`${d} svg`),Y=(U=(F=_.db).getAccTitle)==null?void 0:U.call(F),$=(I=(R=_.db).getAccDescription)==null?void 0:I.call(R);NO(T,N,Y,$),g.select(`[id="${r}"]`).selectAll("foreignobject > *").attr("xmlns",iX);let z=g.select(d).node().innerHTML;if(_t.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),z=pX(z,x,Ja(a.arrowMarkerAbsolute)),x){const H=g.select(d+" svg").node();z=gX(z,H)}else y||(z=Vc.sanitize(z,{ADD_TAGS:hX,ADD_ATTR:uX,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(YV(),k)throw k;return p(),{diagramType:T,svg:z,bindFunctions:_.db.bindFunctions}},"render");function LO(r={}){var n;const e=Lr({},r);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),m6(e),e!=null&&e.theme&&e.theme in Ga?e.themeVariables=Ga[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ga.default.getThemeVariables(e.themeVariables));const i=typeof e=="object"?g6(e):wA();b1(i.logLevel),sm()}A(LO,"initialize");var OO=A((r,e={})=>{const{code:i}=_v(r);return Fb.fromText(i,e)},"getDiagramFromText");function NO(r,e,i,n){TO(e,r),BO(e,i,n,e.attr("id"))}A(NO,"addA11yInfo");var ml=Object.freeze({render:yX,parse:MO,getDiagramFromText:OO,initialize:LO,getConfig:nr,setConfig:TA,getSiteConfig:wA,updateSiteConfig:y6,reset:A(()=>{Gp()},"reset"),globalReset:A(()=>{Gp(Xc)},"globalReset"),defaultConfig:Xc});b1(nr().logLevel);Gp(nr());var xX=A((r,e,i)=>{_t.warn(r),nv(r)?(i&&i(r.str,r.hash),e.push({...r,message:r.str,error:r})):(i&&i(r),r instanceof Error&&e.push({str:r.message,message:r.message,hash:r.name,error:r}))},"handleError"),RO=A(async function(r={querySelector:".mermaid"}){try{await bX(r)}catch(e){if(nv(e)&&_t.error(e.str),Xi.parseError&&Xi.parseError(e),!r.suppressErrors)throw _t.error("Use the suppressErrors option to suppress these errors"),e}},"run"),bX=A(async function({postRenderCallback:r,querySelector:e,nodes:i}={querySelector:".mermaid"}){const n=ml.getConfig();_t.debug(`${r?"":"No "}Callback function found`);let a;if(i)a=i;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");_t.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(_t.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),ml.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new Mn.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(_t.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=u.innerHTML,c=Z5(Mn.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Mn.detectInit(c);p&&_t.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await $O(d,c,u);u.innerHTML=g,r&&await r(d),x&&x(u)}catch(g){xX(g,h,Xi.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),jO=A(function(r){ml.initialize(r)},"initialize"),vX=A(async function(r,e,i){_t.warn("mermaid.init is deprecated. Please use run instead."),r&&jO(r);const n={postRenderCallback:i,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await RO(n)},"init"),CX=A(async(r,{lazyLoad:e=!0}={})=>{sm(),$x(...r),e===!1&&await UV()},"registerExternalDiagrams"),DO=A(function(){if(Xi.startOnLoad){const{startOnLoad:r}=ml.getConfig();r&&Xi.run().catch(e=>_t.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",DO,!1);var _X=A(function(r){Xi.parseError=r},"setParseErrorHandler"),wg=[],Y0=!1,FO=A(async()=>{if(!Y0){for(Y0=!0;wg.length>0;){const r=wg.shift();if(r)try{await r()}catch(e){_t.error("Error executing queue",e)}}Y0=!1}},"executeQueue"),kX=A(async(r,e)=>new Promise((i,n)=>{const a=A(()=>new Promise((o,c)=>{ml.parse(r,e).then(h=>{o(h),i(h)},h=>{var u;_t.error("Error parsing",h),(u=Xi.parseError)==null||u.call(Xi,h),c(h),n(h)})}),"performCall");wg.push(a),FO().catch(n)}),"parse"),$O=A((r,e,i)=>new Promise((n,a)=>{const o=A(()=>new Promise((c,h)=>{ml.render(r,e,i).then(u=>{c(u),n(u)},u=>{var d;_t.error("Error parsing",u),(d=Xi.parseError)==null||d.call(Xi,u),h(u),a(u)})}),"performCall");wg.push(o),FO().catch(a)}),"render"),SX=A(()=>Object.keys(cl).map(r=>({id:r})),"getRegisteredDiagramsMetadata"),Xi={startOnLoad:!0,mermaidAPI:ml,parse:kX,render:$O,init:vX,run:RO,registerExternalDiagrams:CX,registerLayoutLoaders:PL,initialize:jO,parseError:void 0,contentLoaded:DO,setParseErrorHandler:_X,detectType:v1,registerIconPacks:CU,getRegisteredDiagramsMetadata:SX},Sv=Xi;/*! Check if previously processed *//*!
|
|
411
|
+
* Wait for document loaded before starting the execution
|
|
412
|
+
*/var yu={exports:{}},tT;function wX(){if(tT)return yu.exports;tT=1,yu.exports=r,yu.exports.addWheelListener=r,yu.exports.removeWheelListener=e;function r(i,n,a){i.addEventListener("wheel",n,a)}function e(i,n,a){i.removeEventListener("wheel",n,a)}return yu.exports}var xu={exports:{}},G0,eT;function TX(){if(eT)return G0;eT=1;var r=4,e=.001,i=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(_,k){return 1-3*k+3*_}function u(_,k){return 3*k-6*_}function d(_){return 3*_}function p(_,k,w){return((h(k,w)*_+u(k,w))*_+d(k))*_}function g(_,k,w){return 3*h(k,w)*_*_+2*u(k,w)*_+d(k)}function x(_,k,w,T,B){var E,O,j=0;do O=k+(w-k)/2,E=p(O,T,B)-_,E>0?w=O:k=O;while(Math.abs(E)>i&&++j<n);return O}function y(_,k,w,T){for(var B=0;B<r;++B){var E=g(k,w,T);if(E===0)return k;var O=p(k,w,T)-_;k-=O/E}return k}function b(_){return _}return G0=function(k,w,T,B){if(!(0<=k&&k<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(k===w&&T===B)return b;for(var E=c?new Float32Array(a):new Array(a),O=0;O<a;++O)E[O]=p(O*o,k,T);function j(M){for(var N=0,Y=1,$=a-1;Y!==$&&E[Y]<=M;++Y)N+=o;--Y;var z=(M-E[Y])/(E[Y+1]-E[Y]),K=N+z*o,W=g(K,k,T);return W>=e?y(M,K,k,T):W===0?K:x(M,N,N+o,k,T)}return function(N){return N===0?0:N===1?1:p(j(N),w,B)}},G0}var rT;function BX(){if(rT)return xu.exports;rT=1;var r=TX(),e={ease:r(.25,.1,.25,1),easeIn:r(.42,0,1,1),easeOut:r(0,0,.58,1),easeInOut:r(.42,0,.58,1),linear:r(0,0,1,1)};xu.exports=i,xu.exports.makeAggregateRaf=h,xu.exports.sharedScheduler=h();function i(u,d,p){var g=Object.create(null),x=Object.create(null);p=p||{};var y=typeof p.easing=="function"?p.easing:e[p.easing];y||(p.easing&&console.warn("Unknown easing function in amator: "+p.easing),y=e.ease);var b=typeof p.step=="function"?p.step:n,_=typeof p.done=="function"?p.done:n,k=a(p.scheduler),w=Object.keys(d);w.forEach(function(Y){g[Y]=u[Y],x[Y]=d[Y]-u[Y]});var T=typeof p.duration=="number"?p.duration:400,B=Math.max(1,T*.06),E,O=0;return E=k.next(M),{cancel:j};function j(){k.cancel(E),E=0}function M(){var Y=y(O/B);O+=1,N(Y),O<=B?(E=k.next(M),b(u)):(E=0,setTimeout(function(){_(u)},0))}function N(Y){w.forEach(function($){u[$]=x[$]*Y+g[$]})}}function n(){}function a(u){if(!u){var d=typeof window<"u"&&window.requestAnimationFrame;return d?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,d=new Set,p=0;return{next:x,cancel:x,clearAll:g};function g(){u.clear(),d.clear(),cancelAnimationFrame(p),p=0}function x(_){d.add(_),y()}function y(){p||(p=requestAnimationFrame(b))}function b(){p=0;var _=d;d=u,u=_,u.forEach(function(k){k()}),u.clear()}}return xu.exports}var V0,iT;function AX(){if(iT)return V0;iT=1;function r(n){i(n);const a=e(n);return n.on=a.on,n.off=a.off,n.fire=a.fire,n}function e(n){let a=Object.create(null);return{on:function(o,c,h){if(typeof c!="function")throw new Error("callback is expected to be a function");let u=a[o];return u||(u=a[o]=[]),u.push({callback:c,ctx:h}),n},off:function(o,c){if(typeof o>"u")return a=Object.create(null),n;if(a[o])if(typeof c!="function")delete a[o];else{const h=a[o];for(let u=0;u<h.length;++u)h[u].callback===c&&h.splice(u,1)}return n},fire:function(o){const c=a[o];if(!c)return n;let h;arguments.length>1&&(h=Array.prototype.slice.call(arguments,1));for(let u=0;u<c.length;++u){const d=c[u];d.callback.apply(d.ctx,h)}return n}}}function i(n){if(!n)throw new Error("Eventify cannot use falsy object as events subject");const a=["on","fire","off"];for(let o=0;o<a.length;++o)if(n.hasOwnProperty(a[o]))throw new Error("Subject cannot be eventified, since it already has property '"+a[o]+"'")}return V0=r,V0}var X0,nT;function EX(){if(nT)return X0;nT=1,X0=r;function r(n,a,o){typeof o!="object"&&(o={});var c=typeof o.minVelocity=="number"?o.minVelocity:5,h=typeof o.amplitude=="number"?o.amplitude:.25,u=typeof o.cancelAnimationFrame=="function"?o.cancelAnimationFrame:e(),d=typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame:i(),p,g,x=342,y,b,_,k,w,T,B,E;return{start:j,stop:N,cancel:O};function O(){u(y),u(E)}function j(){p=n(),k=B=b=w=0,g=new Date,u(y),u(E),y=d(M)}function M(){var $=Date.now(),z=$-g;g=$;var K=n(),W=K.x-p.x,F=K.y-p.y;p=K;var U=1e3/(1+z);b=.8*W*U+.2*b,w=.8*F*U+.2*w,y=d(M)}function N(){u(y),u(E);var $=n();_=$.x,T=$.y,g=Date.now(),(b<-c||b>c)&&(k=h*b,_+=k),(w<-c||w>c)&&(B=h*w,T+=B),E=d(Y)}function Y(){var $=Date.now()-g,z=!1,K=0,W=0;k&&(K=-k*Math.exp(-$/x),K>.5||K<-.5?z=!0:K=k=0),B&&(W=-B*Math.exp(-$/x),W>.5||W<-.5?z=!0:W=B=0),z&&(a(_+K,T+W),E=d(Y))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function i(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return X0}var Q0,aT;function MX(){if(aT)return Q0;aT=1,Q0=r;function r(n){if(n)return{capture:i,release:i};var a,o,c,h=!1;return{capture:u,release:d};function u(p){h=!0,o=window.document.onselectstart,c=window.document.ondragstart,window.document.onselectstart=e,a=p,a.ondragstart=e}function d(){h&&(h=!1,window.document.onselectstart=o,a&&(a.ondragstart=c))}}function e(n){return n.stopPropagation(),!1}function i(){}return Q0}var Z0,sT;function LX(){if(sT)return Z0;sT=1,Z0=r;function r(){this.x=0,this.y=0,this.scale=1}return Z0}var dp={exports:{}},oT;function OX(){if(oT)return dp.exports;oT=1,dp.exports=r,dp.exports.canAttach=e;function r(i,n){if(!e(i))throw new Error("svg element is required for svg.panzoom to work");var a=i.ownerSVGElement;if(!a)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");n.disableKeyboardInteraction||a.setAttribute("tabindex",0);var o={getBBox:h,getScreenCTM:u,getOwner:c,applyTransform:p,initTransform:d};return o;function c(){return a}function h(){var g=i.getBBox();return{left:g.x,top:g.y,width:g.width,height:g.height}}function u(){var g=a.getCTM();return g||a.getScreenCTM()}function d(g){var x=i.getCTM();x===null&&(x=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),g.x=x.e,g.y=x.f,g.scale=x.a,a.removeAttributeNS(null,"viewBox")}function p(g){i.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(i){return i&&i.ownerSVGElement&&i.getCTM}return dp.exports}var pp={exports:{}},lT;function NX(){if(lT)return pp.exports;lT=1,pp.exports=r,pp.exports.canAttach=e;function r(i,n){var a=e(i);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=i.parentElement;i.scrollTop=0,n.disableKeyboardInteraction||o.setAttribute("tabindex",0);var c={getBBox:u,getOwner:h,applyTransform:d};return c;function h(){return o}function u(){return{left:0,top:0,width:i.clientWidth,height:i.clientHeight}}function d(p){i.style.transformOrigin="0 0 0",i.style.transform="matrix("+p.scale+", 0, 0, "+p.scale+", "+p.x+", "+p.y+")"}}function e(i){return i&&i.parentElement&&i.style}return pp.exports}var K0,cT;function RX(){if(cT)return K0;cT=1;var r=wX(),e=BX(),i=AX(),n=EX(),a=MX(),o=a(),c=a(!0),h=LX(),u=OX(),d=NX(),p=1,g=1.75,x=300,y=200;K0=b;function b(M,N){N=N||{};var Y=N.controller;if(Y||(u.canAttach(M)?Y=u(M,N):d.canAttach(M)&&(Y=d(M,N))),!Y)throw new Error("Cannot create panzoom for the current type of dom element");var $=Y.getOwner(),z={x:0,y:0},K=!1,W=new h;Y.initTransform&&Y.initTransform(W);var F=typeof N.filterKey=="function"?N.filterKey:w,U=typeof N.pinchSpeed=="number"?N.pinchSpeed:1,R=N.bounds,I=typeof N.maxZoom=="number"?N.maxZoom:Number.POSITIVE_INFINITY,H=typeof N.minZoom=="number"?N.minZoom:0,G=typeof N.boundsPadding=="number"?N.boundsPadding:.05,Z=typeof N.zoomDoubleClickSpeed=="number"?N.zoomDoubleClickSpeed:g,P=N.beforeWheel||w,J=N.beforeMouseDown||w,nt=typeof N.zoomSpeed=="number"?N.zoomSpeed:p,ut=_(N.transformOrigin),gt=N.enableTextSelection?c:o;T(R),N.autocenter&&xr();var kt,Et=0,st=0,Ct=0,mt=null,Bt=new Date,Yt,qt=!1,Vt=!1,At,Jt,Ae,ar,Rr,he;"smoothScroll"in N&&!N.smoothScroll?he=O():he=n(ns,mo,N.smoothScroll);var Ee,Pe,Xr,Re=!1;Ze();var jr={dispose:xi,moveBy:Zi,moveTo:xn,smoothMoveTo:$i,centerOn:qr,zoomTo:Bl,zoomAbs:da,smoothZoom:vi,smoothZoomAbs:Ci,showRectangle:Sl,pause:kl,resume:ho,isPaused:uo,getTransform:dr,getMinZoom:sr,setMinZoom:fo,getMaxZoom:po,setMaxZoom:ch,getTransformOrigin:zn,setTransformOrigin:qn,getZoomSpeed:is,setZoomSpeed:ni};i(jr);var yi=typeof N.initialX=="number"?N.initialX:W.x,Br=typeof N.initialY=="number"?N.initialY:W.y,yn=typeof N.initialZoom=="number"?N.initialZoom:W.scale;return(yi!=W.x||Br!=W.y||yn!=W.scale)&&da(yi,Br,yn),jr;function kl(){He(),Re=!0}function ho(){Re&&(Ze(),Re=!1)}function uo(){return Re}function Sl(ht){var St=$.getBoundingClientRect(),wt=Dr(St.width,St.height),Ot=ht.right-ht.left,de=ht.bottom-ht.top;if(!Number.isFinite(Ot)||!Number.isFinite(de))throw new Error("Invalid rectangle");var _e=wt.x/Ot,je=wt.y/de,vr=Math.min(_e,je);W.x=-(ht.left+Ot/2)*vr+wt.x/2,W.y=-(ht.top+de/2)*vr+wt.y/2,W.scale=vr}function Dr(ht,St){if(Y.getScreenCTM){var wt=Y.getScreenCTM(),Ot=wt.a,de=wt.d,_e=wt.e,je=wt.f;z.x=ht*Ot-_e,z.y=St*de-je}else z.x=ht,z.y=St;return z}function xr(){var ht,St,wt=0,Ot=0,de=as();if(de)wt=de.left,Ot=de.top,ht=de.right-de.left,St=de.bottom-de.top;else{var _e=$.getBoundingClientRect();ht=_e.width,St=_e.height}var je=Y.getBBox();if(!(je.width===0||je.height===0)){var vr=St/je.height,pa=ht/je.width,vn=Math.min(pa,vr);W.x=-(je.left+je.width/2)*vn+ht/2+wt,W.y=-(je.top+je.height/2)*vn+St/2+Ot,W.scale=vn}}function dr(){return W}function sr(){return H}function fo(ht){H=ht}function po(){return I}function ch(ht){I=ht}function zn(){return ut}function qn(ht){ut=_(ht)}function is(){return nt}function ni(ht){if(!Number.isFinite(ht))throw new Error("Zoom speed should be a number");nt=ht}function ns(){return{x:W.x,y:W.y}}function xn(ht,St){W.x=ht,W.y=St,Fi(),Hn("pan"),fa()}function Qe(ht,St){xn(W.x+ht,W.y+St)}function Fi(){var ht=as();if(ht){var St=!1,wt=In(),Ot=ht.left-wt.right;return Ot>0&&(W.x+=Ot,St=!0),Ot=ht.right-wt.left,Ot<0&&(W.x+=Ot,St=!0),Ot=ht.top-wt.bottom,Ot>0&&(W.y+=Ot,St=!0),Ot=ht.bottom-wt.top,Ot<0&&(W.y+=Ot,St=!0),St}}function as(){if(R){if(typeof R=="boolean"){var ht=$.getBoundingClientRect(),St=ht.width,wt=ht.height;return{left:St*G,top:wt*G,right:St*(1-G),bottom:wt*(1-G)}}return R}}function In(){var ht=Y.getBBox(),St=go(ht.left,ht.top);return{left:St.x,top:St.y,right:ht.width*W.scale+St.x,bottom:ht.height*W.scale+St.y}}function go(ht,St){return{x:ht*W.scale+W.x,y:St*W.scale+W.y}}function fa(){K=!0,kt=window.requestAnimationFrame(bn)}function ss(ht,St,wt){if(E(ht)||E(St)||E(wt))throw new Error("zoom requires valid numbers");var Ot=W.scale*wt;if(Ot<H){if(W.scale===H)return;wt=H/W.scale}if(Ot>I){if(W.scale===I)return;wt=I/W.scale}var de=Dr(ht,St);if(W.x=de.x-wt*(de.x-W.x),W.y=de.y-wt*(de.y-W.y),R&&G===1&&H===1)W.scale*=wt,Fi();else{var _e=Fi();_e||(W.scale*=wt)}Hn("zoom"),fa()}function da(ht,St,wt){var Ot=wt/W.scale;ss(ht,St,Ot)}function qr(ht){var St=ht.ownerSVGElement;if(!St)throw new Error("ui element is required to be within the scene");var wt=ht.getBoundingClientRect(),Ot=wt.left+wt.width/2,de=wt.top+wt.height/2,_e=St.getBoundingClientRect(),je=_e.width/2-Ot,vr=_e.height/2-de;Zi(je,vr,!0)}function $i(ht,St){Zi(ht-W.x,St-W.y,!0)}function Zi(ht,St,wt){if(!wt)return Qe(ht,St);Ee&&Ee.cancel();var Ot={x:0,y:0},de={x:ht,y:St},_e=0,je=0;Ee=e(Ot,de,{step:function(vr){Qe(vr.x-_e,vr.y-je),_e=vr.x,je=vr.y}})}function mo(ht,St){fs(),xn(ht,St)}function xi(){He()}function Ze(){$.addEventListener("mousedown",pr,{passive:!1}),$.addEventListener("dblclick",ir,{passive:!1}),$.addEventListener("touchstart",ls,{passive:!1}),$.addEventListener("keydown",wl,{passive:!1}),r.addWheelListener($,xo,{passive:!1}),fa()}function He(){r.removeWheelListener($,xo),$.removeEventListener("mousedown",pr),$.removeEventListener("keydown",wl),$.removeEventListener("dblclick",ir),$.removeEventListener("touchstart",ls),kt&&(window.cancelAnimationFrame(kt),kt=0),he.cancel(),hs(),yo(),gt.release(),uh()}function bn(){K&&os()}function os(){K=!1,Y.applyTransform(W),Hn("transform"),kt=0}function wl(ht){var St=0,wt=0,Ot=0;if(ht.keyCode===38?wt=1:ht.keyCode===40?wt=-1:ht.keyCode===37?St=1:ht.keyCode===39?St=-1:ht.keyCode===189||ht.keyCode===109?Ot=1:(ht.keyCode===187||ht.keyCode===107)&&(Ot=-1),!F(ht,St,wt,Ot)){if(St||wt){ht.preventDefault(),ht.stopPropagation();var de=$.getBoundingClientRect(),_e=Math.min(de.width,de.height),je=.05,vr=_e*je*St,pa=_e*je*wt;Zi(vr,pa)}if(Ot){var vn=hh(Ot*100),_e=ut?us():Tl();Bl(_e.x,_e.y,vn)}}}function Tl(){var ht=$.getBoundingClientRect();return{x:ht.width/2,y:ht.height/2}}function ls(ht){if(Pn(ht),ue(),ht.touches.length===1)return V(ht,ht.touches[0]);ht.touches.length===2&&(Rr=br(ht.touches[0],ht.touches[1]),Xr=!0,vt())}function Pn(ht){N.onTouch&&!N.onTouch(ht)||(ht.stopPropagation(),ht.preventDefault())}function It(ht){ue(),!(N.onDoubleClick&&!N.onDoubleClick(ht))&&(ht.preventDefault(),ht.stopPropagation())}function V(ht){st=new Date;var St=ht.touches[0],wt=bi(St);Yt=wt;var Ot=Dr(wt.x,wt.y);At=Ot.x,Jt=Ot.y,Ae=At,ar=Jt,he.cancel(),vt()}function vt(){qt||(qt=!0,document.addEventListener("touchmove",Lt),document.addEventListener("touchend",$e),document.addEventListener("touchcancel",$e))}function Lt(ht){if(ht.touches.length===1){ht.stopPropagation();var St=ht.touches[0],wt=bi(St),Ot=Dr(wt.x,wt.y),de=Ot.x-At,_e=Ot.y-Jt;de!==0&&_e!==0&&bo(),At=Ot.x,Jt=Ot.y,Zi(de,_e)}else if(ht.touches.length===2){Xr=!0;var je=ht.touches[0],vr=ht.touches[1],pa=br(je,vr),vn=1+(pa/Rr-1)*U,Df=bi(je),Ff=bi(vr);if(At=(Df.x+Ff.x)/2,Jt=(Df.y+Ff.y)/2,ut){var wt=us();At=wt.x,Jt=wt.y}Bl(At,Jt,vn),Rr=pa,ht.stopPropagation(),ht.preventDefault()}}function ue(){Ct&&(clearTimeout(Ct),Ct=0)}function fe(ht){if(N.onClick){ue();var St=At-Ae,wt=Jt-ar,Ot=Math.sqrt(St*St+wt*wt);Ot>5||(Ct=setTimeout(function(){Ct=0,N.onClick(ht)},x))}}function $e(ht){if(ue(),ht.touches.length>0){var St=bi(ht.touches[0]),wt=Dr(St.x,St.y);At=wt.x,Jt=wt.y}else{var Ot=new Date;if(Ot-Et<x)if(ut){var St=us();vi(St.x,St.y,Z)}else vi(Yt.x,Yt.y,Z);else Ot-st<y&&fe(ht);Et=Ot,uh(),yo()}}function br(ht,St){var wt=ht.clientX-St.clientX,Ot=ht.clientY-St.clientY;return Math.sqrt(wt*wt+Ot*Ot)}function ir(ht){It(ht);var St=bi(ht);ut&&(St=us()),vi(St.x,St.y,Z)}function pr(ht){if(ue(),!J(ht)){if(mt=ht,Bt=new Date,qt)return ht.stopPropagation(),!1;var St=ht.button===1&&window.event!==null||ht.button===0;if(St){he.cancel();var wt=bi(ht),Ot=Dr(wt.x,wt.y);return Ae=At=Ot.x,ar=Jt=Ot.y,document.addEventListener("mousemove",cs),document.addEventListener("mouseup",Ke),gt.capture(ht.target||ht.srcElement),!1}}}function cs(ht){if(!qt){bo();var St=bi(ht),wt=Dr(St.x,St.y),Ot=wt.x-At,de=wt.y-Jt;At=wt.x,Jt=wt.y,Zi(Ot,de)}}function Ke(){var ht=new Date;ht-Bt<y&&fe(mt),gt.release(),uh(),hs()}function hs(){document.removeEventListener("mousemove",cs),document.removeEventListener("mouseup",Ke),Vt=!1}function yo(){document.removeEventListener("touchmove",Lt),document.removeEventListener("touchend",$e),document.removeEventListener("touchcancel",$e),Vt=!1,Xr=!1,qt=!1}function xo(ht){if(!P(ht)){he.cancel();var St=ht.deltaY;ht.deltaMode>0&&(St*=100);var wt=hh(St);if(wt!==1){var Ot=ut?us():bi(ht);Bl(Ot.x,Ot.y,wt),ht.preventDefault()}}}function bi(ht){var St,wt,Ot=$.getBoundingClientRect();return St=ht.clientX-Ot.left,wt=ht.clientY-Ot.top,{x:St,y:wt}}function vi(ht,St,wt){var Ot=W.scale,de={scale:Ot},_e={scale:wt*Ot};he.cancel(),fs(),Pe=e(de,_e,{step:function(je){da(ht,St,je.scale)},done:ai})}function Ci(ht,St,wt){var Ot=W.scale,de={scale:Ot},_e={scale:wt};he.cancel(),fs(),Pe=e(de,_e,{step:function(je){da(ht,St,je.scale)},done:ai})}function us(){var ht=$.getBoundingClientRect();return{x:ht.width*ut.x,y:ht.height*ut.y}}function Bl(ht,St,wt){return he.cancel(),fs(),ss(ht,St,wt)}function fs(){Pe&&(Pe.cancel(),Pe=null)}function hh(ht){var St=Math.sign(ht),wt=Math.min(.25,Math.abs(nt*ht/128));return 1-St*wt}function bo(){Vt||(Hn("panstart"),Vt=!0,he.start())}function uh(){Vt&&(Xr||he.stop(),Hn("panend"))}function ai(){Hn("zoomend")}function Hn(ht){jr.fire(ht,jr)}}function _(M){if(M){if(typeof M=="object")return(!B(M.x)||!B(M.y))&&k(M),M;k()}}function k(M){throw console.error(M),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
|
|
413
|
+
`))}function w(){}function T(M){var N=typeof M;if(!(N==="undefined"||N==="boolean")){var Y=B(M.left)&&B(M.top)&&B(M.bottom)&&B(M.right);if(!Y)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function B(M){return Number.isFinite(M)}function E(M){return Number.isNaN?Number.isNaN(M):M!==M}function O(){return{start:w,stop:w,cancel:w}}function j(){if(typeof document>"u")return;var M=document.getElementsByTagName("script");if(!M)return;for(var N,Y=0;Y<M.length;++Y){var $=M[Y];if($.src&&$.src.match(/\bpanzoom(\.min)?\.js/)){N=$;break}}if(!N)return;var z=N.getAttribute("query");if(!z)return;var K=N.getAttribute("name")||"pz",W=Date.now();F();function F(){var I=document.querySelector(z);if(!I){var H=Date.now(),G=H-W;if(G<2e3){setTimeout(F,100);return}console.error("Cannot find the panzoom element",K);return}var Z=U(N);console.log(Z),window[K]=b(I,Z)}function U(I){for(var H=I.attributes,G={},Z=0;Z<H.length;++Z){var P=H[Z],J=R(P);J&&(G[J.name]=J.value)}return G}function R(I){if(I.name){var H=I.name[0]==="p"&&I.name[1]==="z"&&I.name[2]==="-";if(H){var G=I.name.substr(3),Z=JSON.parse(I.value);return{name:G,value:Z}}}}}return j(),K0}var jX=RX();const DX=Og(jX);let hT=null;function FX(r){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return r==="dark"?{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#1c1f2a",primaryColor:"rgba(157, 140, 255, 0.18)",primaryTextColor:"#f5f6fa",primaryBorderColor:"#9d8cff",secondaryColor:"rgba(96, 165, 250, 0.18)",secondaryBorderColor:"#93c5fd",secondaryTextColor:"#f5f6fa",tertiaryColor:"rgba(74, 222, 128, 0.16)",tertiaryBorderColor:"#86efac",tertiaryTextColor:"#f5f6fa",noteBkgColor:"rgba(251, 191, 36, 0.18)",noteBorderColor:"#fcd34d",noteTextColor:"#fcd34d",lineColor:"#9aa0b3",textColor:"#f5f6fa",mainBkg:"rgba(157, 140, 255, 0.18)",nodeBorder:"#9d8cff",clusterBkg:"rgba(255, 255, 255, 0.04)",clusterBorder:"#3d4358",edgeLabelBackground:"#1c1f2a",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}:{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ede9fe",primaryTextColor:"#5b21b6",primaryBorderColor:"#7b68ee",secondaryColor:"#dbeafe",secondaryBorderColor:"#1d4ed8",secondaryTextColor:"#1d4ed8",tertiaryColor:"#dcfce7",tertiaryBorderColor:"#15803d",tertiaryTextColor:"#15803d",noteBkgColor:"#fef3c7",noteBorderColor:"#a16207",noteTextColor:"#a16207",lineColor:"#646464",textColor:"#292d34",mainBkg:"#ede9fe",nodeBorder:"#7b68ee",clusterBkg:"#f7f8f8",clusterBorder:"#e8e8e8",edgeLabelBackground:"#ffffff",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}}function zO(r){hT!==r&&(Sv.initialize(FX(r)),hT=r)}function $X(r){const e=r.getAttribute("style");if(!e)return;const i=e.split(";").filter(n=>{var o;const a=(o=n.trim().split(":")[0])==null?void 0:o.trim().toLowerCase();return a&&a!=="fill"&&a!=="stroke"&&a!=="color"}).join(";");i.trim()?r.setAttribute("style",i):r.removeAttribute("style")}function qO(r){const e=[".node > rect",".node > polygon",".node > path",".node > circle",".node .label",".node .label *",".node foreignObject *",".cluster > rect",".cluster > polygon",".cluster-label",".cluster-label *",".cluster-label foreignObject *",".edgeLabel",".edgeLabel rect",".edgeLabel foreignObject *",".edgePath path",".marker",".arrowheadPath"];r.querySelectorAll(e.join(", ")).forEach($X);const i=r.querySelector("style");if(i&&i.textContent){const n=i.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");i.textContent=n}}async function zX(r,e){r.querySelectorAll(".mermaid-rendered").forEach(o=>{const c=o.dataset.mermaidSource;if(!c)return;const h=document.createElement("pre"),u=document.createElement("code");u.className="language-mermaid",u.textContent=c,h.appendChild(u),o.replaceWith(h)});const n=r.querySelectorAll("pre > code.language-mermaid");if(n.length===0)return;let a=0;for(const o of n){const c=o.parentElement;if(!c)continue;const h=(o.textContent??"").trim();if(!h)continue;const u=`${e}-${a++}-${Date.now().toString(36)}`,d=document.createElement("div");d.className="mermaid-rendered",d.dataset.mermaidSource=h;const p=document.createElement("div");p.className="mermaid-stage",d.appendChild(p),c.replaceWith(d);try{const{svg:g}=await Sv.render(u,h);p.innerHTML=g;const x=p.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",qO(x))}catch(g){const x=g instanceof Error?g.message:String(g);p.innerHTML=`<div class="mermaid-error">Diagram error: ${x.replace(/[<>&]/g,y=>({"<":"<",">":">","&":"&"})[y]??y)}</div>`}}}function qX(r,e,i,n="mmd"){et.useEffect(()=>{const a=r.current;if(!a||!e)return;zO(i);let o=!1;return queueMicrotask(()=>{o||zX(a,n)}),()=>{o=!0}},[r,e,i,n])}ae.setOptions({gfm:!0,breaks:!0});const IX={"[":"]","(":")","{":"}"};function PX(r){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(r))return r;let e="",i=0;const n=r.length;for(;i<n;){const a=r.slice(i).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=r[i],i++;continue}const o=a[1],c=a[2],h=IX[c],u=i+o.length+1,d=r.lastIndexOf(h);if(d<=u){e+=r[i],i++;continue}const g=r.slice(u,d).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=r.slice(i,d+1),i=d+1;continue}if(g===""){e+=r.slice(i,d+1),i=d+1;continue}const x=g.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");e+=`${o}${c}"${x}"${h}`,i=d+1}return e}function HX(r){return r.split(`
|
|
414
|
+
`).map(PX).join(`
|
|
415
|
+
`)}const UX=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function WX(r,e,i){const n=r.split(`
|
|
416
|
+
`);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],d=/^(\s*)(```|~~~)/.exec(u);if(d){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=d[2]);continue}if(o)continue;const p=UX.exec(u);if(p){if(a===e){const[,g,,x,y]=p,b=i?"[x]":"[ ]";n[h]=`${g}${b}${x}${y}`;const _=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
|
|
417
|
+
`),nodeId:_?_[1]:null}}a++}}return null}const YX=/-->|---|==>|==|-\.|~~~|\.->/;function GX(r,e,i){const n=i?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=r.split(`
|
|
418
|
+
`);let h=!1,u="";for(let d=0;d<c.length;d++){const p=c[d];if(!h){const _=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(p);_&&(h=!0,u=_[2]);continue}if(p.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(p)||YX.test(p))continue;const g=o.exec(p);if(!g)continue;const[,x,y,b]=g;c[d]=`${x}${y}${b??""}:::${n}`}return c.join(`
|
|
419
|
+
`)}const VX=[1,2,3,4,5,6,7,8,9,10],XX=[1,2,3,4,5],QX=[25,50,75,100],ZX=[.5,1,1.5,2,3,4,5,6,8];function KX(r){return r==null?"":r<5?"rice-score--low":r<=15?"rice-score--mid":"rice-score--high"}function JX({task:r,expanded:e,onToggle:i,onUpdate:n}){const{t:a}=ri(),o=r.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=KX(c),d=g=>o?o[g]:null,p=(g,x)=>{const y=x===""?null:Number(x);y!==null&&!Number.isFinite(y)||y!==d(g)&&n({[g]:y})};return v.jsxs("div",{className:`rice-block ${e?"rice-block--open":""}`,children:[v.jsxs("button",{type:"button",className:"rice-header",onClick:i,"aria-expanded":e,children:[v.jsx("span",{className:"rice-header-label",children:a("rice.title")}),v.jsx("span",{className:`rice-score-badge ${u}`,title:a("rice.score"),children:h}),v.jsx("svg",{className:`rice-chevron ${e?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:v.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e&&v.jsxs("div",{className:"rice-grid",children:[v.jsxs("label",{className:"rice-field",children:[v.jsx("span",{className:"rice-field-label",children:a("rice.reach")}),v.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.reach)??"",title:a("rice.tooltip.reach"),onChange:g=>p("reach",g.target.value),children:[v.jsx("option",{value:"",children:"—"}),VX.map(g=>v.jsx("option",{value:g,children:g},g))]})]}),v.jsxs("label",{className:"rice-field",children:[v.jsx("span",{className:"rice-field-label",children:a("rice.impact")}),v.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.impact)??"",title:a("rice.tooltip.impact"),onChange:g=>p("impact",g.target.value),children:[v.jsx("option",{value:"",children:"—"}),XX.map(g=>v.jsx("option",{value:g,children:g},g))]})]}),v.jsxs("label",{className:"rice-field",children:[v.jsx("span",{className:"rice-field-label",children:a("rice.confidence")}),v.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.confidence)??"",title:a("rice.tooltip.confidence"),onChange:g=>p("confidence",g.target.value),children:[v.jsx("option",{value:"",children:"—"}),QX.map(g=>v.jsxs("option",{value:g,children:[g,"%"]},g))]})]}),v.jsxs("label",{className:"rice-field",children:[v.jsx("span",{className:"rice-field-label",children:a("rice.effort")}),v.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.effort)??"",title:a("rice.tooltip.effort"),onChange:g=>p("effort",g.target.value),children:[v.jsx("option",{value:"",children:"—"}),ZX.map(g=>v.jsxs("option",{value:g,children:[g,"w"]},g))]})]}),o&&v.jsx("button",{type:"button",className:"rice-clear-btn",onClick:()=>n(null),children:a("rice.clear")})]})]})}function ln({label:r,children:e}){return v.jsxs("div",{className:"prop-row",children:[v.jsx("span",{className:"prop-label",children:r}),v.jsx("div",{className:"prop-value",children:e})]})}function tQ({text:r}){const[e,i]=et.useState(!1),[n,a]=et.useState(!1),o=et.useRef(null);return et.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[r]),v.jsxs("span",{className:"prop-expandable",onClick:()=>i(c=>!c),children:[v.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:r}),n&&!e&&v.jsx("span",{className:"prop-expand-hint",children:"show more"}),e&&n&&v.jsx("span",{className:"prop-expand-hint",children:"show less"})]})}function eQ({task:r,onClose:e,initialRiceExpanded:i}){const{t:n}=ri(),{resolved:a}=Ng(),o=YB(),c=Hj(),{data:h}=VB(),[u,d]=et.useState(""),[p,g]=et.useState(null),[x,y]=et.useState(i??!!r.rice),[b,_]=et.useState(!1),k=W=>{g(W.message),setTimeout(()=>g(null),5e3)},w=W=>{o.mutate({slug:r.slug,updates:{status:W}},{onError:k})},T=W=>{o.mutate({slug:r.slug,updates:{priority:W}},{onError:k})},B=W=>{o.mutate({slug:r.slug,updates:{urgency:W}},{onError:k})},E=W=>{o.mutate({slug:r.slug,updates:{version:W||null}},{onError:k})},O=W=>{o.mutate({slug:r.slug,updates:{rice:W}},{onError:k})},j=W=>{W.preventDefault(),u.trim()&&c.mutate({slug:r.slug,content:u.trim()},{onSuccess:()=>d(""),onError:k})},M=et.useMemo(()=>r.body?ae.parse(r.body):"",[r.body]),N=et.useRef(null),Y=et.useRef(r.body??""),$=et.useRef(r.body??"");et.useEffect(()=>{Y.current=r.body??"",$.current=r.body??""},[r.body]);const z=et.useRef(o),K=et.useRef(k);return et.useEffect(()=>{z.current=o,K.current=k}),et.useEffect(()=>{const W=N.current;if(!W||!M)return;W.querySelectorAll('input[type="checkbox"]').forEach((R,I)=>{R.removeAttribute("disabled"),R.dataset.criterionIndex=String(I)});const U=R=>{const I=R.target;if(!(I instanceof HTMLInputElement)||I.type!=="checkbox")return;const H=I.dataset.criterionIndex;if(H===void 0)return;const G=Number(H),Z=I.checked,P=$.current,J=WX(P,G,Z);if(!J)return;let nt=J.body;J.nodeId&&(nt=GX(nt,J.nodeId,Z)),nt!==P&&($.current=nt,z.current.mutate({slug:r.slug,updates:{body:nt}},{onError:ut=>{I.checked=!Z,$.current=Y.current,K.current(ut)}}))};return W.addEventListener("change",U),()=>W.removeEventListener("change",U)},[M,r.slug]),et.useEffect(()=>{const W=N.current;if(!W||!M)return;zO(a);let F=!1;const U=[];let R=!1;const I=async()=>{if(F||R)return;W.querySelectorAll(".mermaid-rendered").forEach(Z=>{const P=Z.dataset.mermaidSource;if(!P)return;const J=document.createElement("pre"),nt=document.createElement("code");nt.className="language-mermaid",nt.textContent=P,J.appendChild(nt),Z.replaceWith(J)});const G=W.querySelectorAll("pre > code.language-mermaid");if(G.length!==0){for(R=!0;U.length;){const Z=U.pop();try{Z==null||Z()}catch{}}for(let Z=0;Z<G.length&&!F;Z++){const P=G[Z],J=P.parentElement;if(!J)continue;const nt=HX(P.textContent??""),ut=`mmd-${r.slug}-${Z}-${Date.now().toString(36)}`,gt=document.createElement("div");gt.className="mermaid-rendered",gt.dataset.mermaidSource=nt;const kt=document.createElement("div");kt.className="mermaid-stage",gt.appendChild(kt);const Et=document.createElement("div");Et.className="mermaid-controls",Et.innerHTML=`
|
|
420
|
+
<button type="button" data-act="out" title="Zoom out">−</button>
|
|
421
|
+
<button type="button" data-act="reset" title="Fit">⤢</button>
|
|
422
|
+
<button type="button" data-act="in" title="Zoom in">+</button>
|
|
423
|
+
`,gt.appendChild(Et),J.replaceWith(gt);try{const{svg:st,bindFunctions:Ct}=await Sv.render(ut,nt);if(F)break;kt.innerHTML=st,Ct==null||Ct(kt),gt.dataset.mermaidRendered="1";const mt=kt.querySelector("svg");if(!mt)continue;qO(mt);const Bt=mt.viewBox.baseVal,Yt=Bt&&Bt.width>0?Bt.width:mt.getBoundingClientRect().width,qt=Bt&&Bt.height>0?Bt.height:mt.getBoundingClientRect().height;mt.removeAttribute("width"),mt.removeAttribute("height"),mt.style.width=`${Yt}px`,mt.style.height=`${qt}px`,mt.style.maxWidth="none",mt.style.transformOrigin="0 0";const Vt=DX(mt,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),At=()=>{try{const he=kt.getBoundingClientRect();if(he.width===0||he.height===0)return;const Ee=32,Pe=Math.min((he.width-Ee)/Yt,(he.height-Ee)/qt,1);Vt.zoomAbs(0,0,1),Vt.moveTo(0,0),Vt.zoomAbs(0,0,Pe);const Xr=(he.width-Yt*Pe)/2,Re=(he.height-qt*Pe)/2;Vt.moveTo(Xr,Re)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(At));const Jt=new ResizeObserver(()=>At());Jt.observe(kt);let Ae=null;const ar=he=>{try{const Ee=he.getBoundingClientRect(),Pe=kt.getBoundingClientRect();if(Ee.width===0)return;const Xr=Ee.left+Ee.width/2-Pe.left,Re=Ee.top+Ee.height/2-Pe.top,jr=Math.min(Pe.width*.6/Ee.width,Pe.height*.6/Ee.height,6),yi=Vt.getTransform(),Br=jr/yi.scale;if(Math.abs(Br-1)<.01)return;Vt.smoothZoom(Xr,Re,Br)}catch{}},Rr=he=>{const Ee=he.target,Pe=(Ee==null?void 0:Ee.closest("g.node, g.cluster"))??null;if(!Pe){Ae&&(Ae=null,At());return}Ae===Pe?(Ae=null,At()):(Ae=Pe,ar(Pe))};kt.addEventListener("click",Rr),mt.querySelectorAll("g.node, g.cluster").forEach(he=>{he.style.cursor="zoom-in"}),Et.addEventListener("click",he=>{he.stopPropagation();const Ee=he.target.closest("button");if(!Ee)return;const Pe=kt.getBoundingClientRect(),Xr=Pe.width/2,Re=Pe.height/2,jr=Ee.getAttribute("data-act");jr==="in"?Vt.smoothZoom(Xr,Re,1.4):jr==="out"?Vt.smoothZoom(Xr,Re,1/1.4):jr==="reset"&&(Ae=null,At())}),U.push(()=>{Jt.disconnect(),kt.removeEventListener("click",Rr),Vt.dispose()})}catch(st){if(F)break;const Ct=st instanceof Error?st.message:String(st);kt.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${Ct.replace(/[<>&]/g,mt=>({"<":"<",">":">","&":"&"})[mt]??mt)}</pre>`}}R=!1}};I();const H=new MutationObserver(()=>{if(F||R)return;const G=W.querySelector("pre > code.language-mermaid"),Z=W.querySelector(".mermaid-rendered .mermaid-stage svg");G&&(!Z||G)&&G&&I()});return H.observe(W,{childList:!0,subtree:!0}),()=>{for(F=!0,H.disconnect();U.length;){const G=U.pop();try{G==null||G()}catch{}}}},[M,r.slug,a]),v.jsx("div",{className:`detail-overlay ${b?"detail-overlay--fullscreen":""}`,onClick:e,children:v.jsxs("div",{className:`detail-panel ${b?"detail-panel--fullscreen":""}`,onClick:W=>W.stopPropagation(),children:[v.jsxs("div",{className:"detail-header",children:[v.jsx("h2",{className:"detail-title",children:r.name}),v.jsxs("div",{className:"detail-header-actions",children:[v.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>_(W=>!W),title:b?"Exit full-page view":"Open in full page","aria-label":b?"Exit full-page view":"Open in full page",children:b?v.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:v.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):v.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:v.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),v.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),v.jsxs("div",{className:"detail-body",children:[p&&v.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:p}),v.jsxs("div",{className:"props-block",children:[v.jsx(ln,{label:"Status",children:v.jsxs("select",{className:"field-select prop-select",value:r.status,onChange:W=>w(W.target.value),children:[v.jsx("option",{value:"todo",children:n("tasks.todo")}),v.jsx("option",{value:"in_progress",children:n("tasks.in_progress")}),v.jsx("option",{value:"in_review",children:n("tasks.in_review")}),v.jsx("option",{value:"completed",children:n("tasks.completed")})]})}),v.jsx(ln,{label:n("tasks.priority"),children:v.jsxs("select",{className:"field-select prop-select",value:r.priority,onChange:W=>T(W.target.value),children:[v.jsx("option",{value:"low",children:n("priority.low")}),v.jsx("option",{value:"medium",children:n("priority.medium")}),v.jsx("option",{value:"high",children:n("priority.high")}),v.jsx("option",{value:"critical",children:n("priority.critical")})]})}),v.jsx(ln,{label:"Urgency",children:v.jsxs("select",{className:"field-select prop-select",value:r.urgency,onChange:W=>B(W.target.value),children:[v.jsx("option",{value:"low",children:n("priority.low")}),v.jsx("option",{value:"medium",children:n("priority.medium")}),v.jsx("option",{value:"high",children:n("priority.high")}),v.jsx("option",{value:"critical",children:n("priority.critical")})]})}),v.jsx(ln,{label:n("rice.title"),children:v.jsx(JX,{task:r,expanded:x,onToggle:()=>y(W=>!W),onUpdate:O})}),r.tags.length>0&&v.jsx(ln,{label:"Tags",children:v.jsx("div",{className:"prop-tags",children:r.tags.map(W=>v.jsx("span",{className:"task-tag","data-hue":Rg(W),children:W},W))})}),r.related_feature&&v.jsx(ln,{label:"Feature",children:v.jsx("span",{className:"prop-feature",children:r.related_feature})}),v.jsx(ln,{label:"Version",children:v.jsxs("select",{className:"field-select prop-select",value:r.version??"",onChange:W=>E(W.target.value),children:[v.jsx("option",{value:"",children:"No version"}),(h??[]).map(W=>v.jsx("option",{value:W.version,children:W.version},W.version)),r.version&&!(h??[]).some(W=>W.version===r.version)&&v.jsx("option",{value:r.version,children:r.version})]})}),r.description&&v.jsx(ln,{label:"Description",children:v.jsx(tQ,{text:r.description})}),v.jsx(ln,{label:"Created",children:v.jsx("span",{className:"prop-date",children:r.created_at})}),v.jsx(ln,{label:"Updated",children:v.jsx("span",{className:"prop-date",children:r.updated_at})}),r.parent_task&&v.jsx(ln,{label:"Parent",children:v.jsx("span",{className:"prop-text",children:r.parent_task})}),v.jsx(ln,{label:"ID",children:v.jsx("code",{className:"prop-id",children:r.id})})]}),v.jsx("hr",{className:"detail-divider"}),M?v.jsx("div",{ref:N,className:"markdown-body",dangerouslySetInnerHTML:{__html:M}}):v.jsx("p",{className:"detail-empty",children:"No content."}),v.jsx("hr",{className:"detail-divider"}),v.jsxs("div",{className:"changelog-section",children:[v.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),v.jsxs("form",{onSubmit:j,className:"changelog-add",children:[v.jsx("input",{className:"field-input",value:u,onChange:W=>d(W.target.value),placeholder:"Add a changelog entry..."}),v.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!u.trim()||c.isPending,children:c.isPending?"...":n("tasks.add_entry")})]})]})]})]})})}const rQ=["critical","high"];function Ds(r){return rQ.includes(r)}const iQ=[{key:"do",label:"Do First",subtitle:"Important & Urgent",colorVar:"--color-quadrant-do",filter:r=>Ds(r.priority)&&Ds(r.urgency)},{key:"schedule",label:"Schedule",subtitle:"Important & Not Urgent",colorVar:"--color-quadrant-schedule",filter:r=>Ds(r.priority)&&!Ds(r.urgency)},{key:"delegate",label:"Delegate",subtitle:"Less Important & Urgent",colorVar:"--color-quadrant-delegate",filter:r=>!Ds(r.priority)&&Ds(r.urgency)},{key:"eliminate",label:"Don't Do",subtitle:"Less Important & Not Urgent",colorVar:"--color-quadrant-eliminate",filter:r=>!Ds(r.priority)&&!Ds(r.urgency)}];function nQ({tasks:r,onTaskClick:e}){const i=r.filter(n=>n.status!=="completed");return v.jsxs("div",{className:"eisenhower",children:[v.jsxs("div",{className:"eisenhower-y-label",children:[v.jsx("span",{className:"eisenhower-axis-hi",children:"Important"}),v.jsx("span",{className:"eisenhower-axis-lo",children:"Less Important"})]}),v.jsx("div",{className:"eisenhower-grid",children:iQ.map(n=>{const a=i.filter(n.filter);return v.jsxs("div",{className:`eisenhower-quadrant eisenhower-quadrant--${n.key}`,children:[v.jsxs("div",{className:"eisenhower-quadrant-header",children:[v.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${n.colorVar})`}}),v.jsx("span",{className:"eisenhower-quadrant-label",children:n.label}),v.jsx("span",{className:"eisenhower-quadrant-count",children:a.length})]}),v.jsx("span",{className:"eisenhower-quadrant-subtitle",children:n.subtitle}),v.jsx("div",{className:"eisenhower-quadrant-cards",children:a.map(o=>v.jsx(Cf,{task:o,onClick:()=>e(o),onDragStart:()=>{}},o.slug))})]},n.key)})}),v.jsxs("div",{className:"eisenhower-x-label",children:[v.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),v.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const re={top:32,right:24,bottom:56,left:64},uT=.5,fT=8,J0=1,dT=5,aQ=2,sQ=3,oQ={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function tx(r){return Math.log2(Math.max(r,.01)+1)}function ex(r,e,i){return Math.max(e,Math.min(i,r))}function pT(r){const e=r.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function lQ({tasks:r,onTaskClick:e}){const i=et.useRef(null),[n,a]=et.useState({width:800,height:480}),[o,c]=et.useState(!1),[h,u]=et.useState(null);et.useEffect(()=>{const $=i.current;if(!$)return;const z=new ResizeObserver(K=>{for(const W of K){const F=W.contentRect.width,U=Math.max(360,Math.min(620,F*.6));a({width:F,height:U})}});return z.observe($),()=>z.disconnect()},[]);const d=et.useMemo(()=>r.filter($=>$.status!=="completed"),[r]),p=et.useMemo(()=>d.filter(pT),[d]),g=et.useMemo(()=>d.filter($=>!pT($)),[d]),x=et.useMemo(()=>[...p].sort(($,z)=>(z.rice.score??0)-($.rice.score??0)),[p]),y=Math.max(120,n.width-re.left-re.right),b=Math.max(120,n.height-re.top-re.bottom),_=tx(uT),w=tx(fT)-_,T=$=>{const z=(tx(ex($,uT,fT))-_)/w;return re.left+(1-z)*y},B=$=>{const z=(ex($,J0,dT)-J0)/(dT-J0);return re.top+(1-z)*b},E=$=>6+(ex($,1,10)-1)/9*18,O=$=>Math.max(.4,$/100),j=T(aQ),M=B(sQ),N=[.5,1,2,4,8],Y=[1,2,3,4,5];return v.jsxs("div",{className:"rice-scatter",ref:i,children:[v.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${p.length} rated tasks plotted by impact and effort`,children:[v.jsx("rect",{x:re.left,y:re.top,width:j-re.left,height:M-re.top,className:"rice-quad rice-quad--big-bets"}),v.jsx("rect",{x:j,y:re.top,width:re.left+y-j,height:M-re.top,className:"rice-quad rice-quad--quick-wins"}),v.jsx("rect",{x:re.left,y:M,width:j-re.left,height:re.top+b-M,className:"rice-quad rice-quad--time-sinks"}),v.jsx("rect",{x:j,y:M,width:re.left+y-j,height:re.top+b-M,className:"rice-quad rice-quad--fill-ins"}),v.jsx("text",{x:re.left+8,y:re.top+18,className:"rice-quad-label",children:"Big Bets"}),v.jsx("text",{x:re.left+y-8,y:re.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),v.jsx("text",{x:re.left+8,y:re.top+b-6,className:"rice-quad-label",children:"Time Sinks"}),v.jsx("text",{x:re.left+y-8,y:re.top+b-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),v.jsx("line",{x1:j,y1:re.top,x2:j,y2:re.top+b,className:"rice-quad-divider"}),v.jsx("line",{x1:re.left,y1:M,x2:re.left+y,y2:M,className:"rice-quad-divider"}),v.jsx("line",{x1:re.left,y1:re.top+b,x2:re.left+y,y2:re.top+b,className:"rice-axis"}),v.jsx("line",{x1:re.left,y1:re.top,x2:re.left,y2:re.top+b,className:"rice-axis"}),N.map($=>v.jsxs("g",{children:[v.jsx("line",{x1:T($),y1:re.top+b,x2:T($),y2:re.top+b+4,className:"rice-axis"}),v.jsxs("text",{x:T($),y:re.top+b+18,textAnchor:"middle",className:"rice-tick",children:[$,"w"]})]},`xt-${$}`)),v.jsx("text",{x:re.left+y/2,y:re.top+b+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),Y.map($=>v.jsxs("g",{children:[v.jsx("line",{x1:re.left-4,y1:B($),x2:re.left,y2:B($),className:"rice-axis"}),v.jsx("text",{x:re.left-8,y:B($)+4,textAnchor:"end",className:"rice-tick",children:$})]},`yt-${$}`)),v.jsx("text",{transform:`translate(${re.left-44}, ${re.top+b/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),p.map($=>{const z=$.rice,K=T(z.effort),W=B(z.impact),F=E(z.reach),U=O(z.confidence),R=oQ[$.status],I=h===$.slug;return v.jsx("circle",{cx:K,cy:W,r:F,fill:`var(${R})`,fillOpacity:U,stroke:"var(--color-bg)",strokeWidth:I?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${$.name}: reach ${z.reach}, impact ${z.impact}, confidence ${z.confidence}, effort ${z.effort} weeks, score ${z.score}`,onClick:()=>e($),onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),e($))},onMouseEnter:()=>u($.slug),onMouseLeave:()=>u(null),onFocus:()=>u($.slug),onBlur:()=>u(null),children:v.jsx("title",{children:`${$.name}
|
|
424
|
+
R ${z.reach} · I ${z.impact} · C ${z.confidence}% · E ${z.effort}w
|
|
425
|
+
Score: ${z.score}`})},$.slug)})]}),v.jsx("ol",{className:"rice-scatter-sr-list",children:x.map($=>v.jsx("li",{children:`${$.name} — score ${$.rice.score}`},$.slug))}),g.length>0&&v.jsxs("div",{className:`rice-unscored ${o?"rice-unscored--open":""}`,children:[v.jsxs("button",{type:"button",className:"rice-unscored-toggle",onClick:()=>c($=>!$),"aria-expanded":o,children:[v.jsxs("span",{children:["Unscored (",g.length,")"]}),v.jsx("svg",{className:`rice-chevron ${o?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:v.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o&&v.jsx("div",{className:"rice-unscored-cards",children:g.map($=>v.jsx(Cf,{task:$,onClick:()=>e($),onDragStart:()=>{}},$.slug))})]})]})}function cQ({onClose:r,tasks:e}){const{data:i,isLoading:n}=GB(),a=Uj(),o=Wj(),[c,h]=et.useState(""),[u,d]=et.useState(""),p=b=>{b.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),d("")}})},g=b=>e.filter(_=>_.version===b).length,x=(i??[]).filter(b=>b.status==="planning"),y=(i??[]).filter(b=>b.status==="released");return v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal version-manager-modal",onClick:b=>b.stopPropagation(),children:[v.jsxs("div",{className:"modal-header",children:[v.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),v.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),v.jsxs("div",{className:"modal-body version-manager-body",children:[v.jsxs("div",{className:"version-stats",children:[v.jsxs("div",{className:"version-stat",children:[v.jsx("span",{className:"version-stat-count",children:x.length}),v.jsx("span",{className:"version-stat-label",children:"Planning"})]}),v.jsxs("div",{className:"version-stat",children:[v.jsx("span",{className:"version-stat-count",children:y.length}),v.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&v.jsx("p",{className:"version-manager-loading",children:"Loading..."}),x.length>0&&v.jsxs("div",{className:"version-section",children:[v.jsx("h3",{className:"version-section-title",children:"Planning"}),x.map(b=>{const _=g(b.version);return v.jsxs("div",{className:"version-item",children:[v.jsxs("div",{className:"version-item-info",children:[v.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),v.jsx("span",{className:"version-item-name",children:b.version}),v.jsxs("span",{className:"version-item-count",children:[_," task",_!==1?"s":""]})]}),b.summary&&v.jsx("p",{className:"version-item-desc",children:b.summary}),v.jsx("div",{className:"version-item-actions",children:v.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:b.version,updates:{status:"released"}}),children:"Release"})})]},b.version)})]}),y.length>0&&v.jsxs("div",{className:"version-section",children:[v.jsx("h3",{className:"version-section-title",children:"Released"}),y.map(b=>{const _=g(b.version);return v.jsxs("div",{className:"version-item version-item--released",children:[v.jsxs("div",{className:"version-item-info",children:[v.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),v.jsx("span",{className:"version-item-name",children:b.version}),v.jsxs("span",{className:"version-item-count",children:[_," task",_!==1?"s":""]}),b.date&&v.jsx("span",{className:"version-item-date",children:b.date})]}),b.summary&&v.jsx("p",{className:"version-item-desc",children:b.summary})]},b.version)})]}),(i??[]).length===0&&!n&&v.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),v.jsxs("form",{onSubmit:p,className:"version-create-form",children:[v.jsx("h3",{className:"version-section-title",children:"New Version"}),v.jsx("input",{className:"field-input",value:c,onChange:b=>h(b.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),v.jsx("input",{className:"field-input",value:u,onChange:b=>d(b.target.value),placeholder:"Summary (optional)"}),v.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const gT={critical:0,high:1,medium:2,low:3},mT={critical:0,high:1,medium:2,low:3},IO=[{key:"todo",labelKey:"tasks.todo",colorVar:"--color-status-todo"},{key:"in_progress",labelKey:"tasks.in_progress",colorVar:"--color-status-in-progress"},{key:"in_review",labelKey:"tasks.in_review",colorVar:"--color-status-in-review"},{key:"completed",labelKey:"tasks.completed",colorVar:"--color-status-completed"}],PO=[{key:"critical",label:"Critical",colorVar:"--color-priority-critical"},{key:"high",label:"High",colorVar:"--color-priority-high"},{key:"medium",label:"Medium",colorVar:"--color-priority-medium"},{key:"low",label:"Low",colorVar:"--color-priority-low"}],HO=[{key:"critical",label:"Critical",colorVar:"--color-urgency-critical"},{key:"high",label:"High",colorVar:"--color-urgency-high"},{key:"medium",label:"Medium",colorVar:"--color-urgency-medium"},{key:"low",label:"Low",colorVar:"--color-urgency-low"}];function hQ(r,e){return[...r].sort((i,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(i[e]);case"priority":return(gT[i.priority]??9)-(gT[n.priority]??9);case"urgency":return(mT[i.urgency]??9)-(mT[n.urgency]??9);case"name":return i.name.localeCompare(n.name);case"rice":{const c=((a=i.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function uQ(r,e){let i=r;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();i=i.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(i=i.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(i=i.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(i=i.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(i=i.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(i=i.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(i=i.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(i=i.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;i=i.filter(a=>{var o,c;return((o=a.rice)==null?void 0:o.score)!==null&&((c=a.rice)==null?void 0:c.score)!==void 0&&a.rice.score>=n})}return hQ(i,e.sortField)}function yT(r){const e=r,i={...Ip};for(const a of Object.keys(Ip))e[a]!==void 0&&(i[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?i[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(i[a]=[])}return i.viewMode===void 0&&(i.viewMode="kanban"),i.subGroupBy===void 0&&(i.subGroupBy="none"),i.minRice===void 0&&(i.minRice=null),i}function xT(r,e){if(e==="none")return[];switch(e){case"status":return IO.map(i=>({key:i.key,label:i.labelKey,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.status===i.key)})).filter(i=>i.tasks.length>0);case"priority":return PO.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.priority===i.key)})).filter(i=>i.tasks.length>0);case"urgency":return HO.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.urgency===i.key)})).filter(i=>i.tasks.length>0);case"tags":{const i=new Map;for(const n of r)if(n.tags.length===0){const a=i.get("(untagged)")??[];a.push(n),i.set("(untagged)",a)}else for(const a of n.tags){const o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const i=new Map;for(const n of r){const a=n.version??"(no version)",o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function fQ(r,e){return r?`dreamcontext:${r}:${e}`:`dreamcontext:${e}`}function dQ(r,e){try{const i=localStorage.getItem(r);return i===null?e:JSON.parse(i)}catch{return e}}function pQ(r,e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}}function gQ(){const{t:r}=ri(),{projectId:e}=qB(),{data:i,isLoading:n,isError:a,error:o}=Ij(),{data:c}=GB(),h=YB(),[u,d]=et.useState(!1),[p,g]=et.useState(!1),[x,y]=et.useState(null),b=et.useMemo(()=>fQ(e,"kanban-filters"),[e]),[_,k]=et.useState(()=>{const F=dQ(b,Ip);return yT(F)}),w=et.useCallback(F=>{k(U=>{const R=typeof F=="function"?F(U):F;return pQ(b,R),R})},[b]),T=Xj(e),B=et.useCallback((F,U)=>{w(R=>({...R,[F]:U}))},[w]),E=et.useCallback(()=>{w(F=>({...Ip,sortField:F.sortField,groupBy:F.groupBy,subGroupBy:F.subGroupBy,viewMode:F.viewMode}))},[w]),O=et.useCallback(F=>{Qj(e,F,{..._})},[_,e]),j=et.useCallback(F=>{w(yT(F.filters))},[w]),M=et.useCallback(F=>{Zj(e,F)},[e]),N=et.useMemo(()=>uQ(i??[],_),[i,_]),Y=et.useMemo(()=>!x||!i?null:i.find(F=>F.slug===x)??null,[x,i]),$=et.useMemo(()=>{const F=new Set;for(const U of i??[])for(const R of U.tags)F.add(R);return Array.from(F).sort()},[i]),z=et.useMemo(()=>{const F=new Set;for(const U of i??[])U.version&&F.add(U.version);for(const U of c??[])F.add(U.version);return Array.from(F).sort()},[i,c]),K=(F,U,R)=>{switch(R){case"status":h.mutate({slug:F,updates:{status:U}});break;case"priority":h.mutate({slug:F,updates:{priority:U}});break;case"urgency":h.mutate({slug:F,updates:{urgency:U}});break;case"tags":{const I=(i??[]).find(H=>H.slug===F);I&&!I.tags.includes(U)&&U!=="(untagged)"&&h.mutate({slug:F,updates:{tags:[...I.tags,U]}})}break;case"version":h.mutate({slug:F,updates:{version:U==="(no version)"?null:U}});break}};if(n)return v.jsx("div",{className:"loading",children:r("common.loading")});if(a)return v.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const W=()=>{const{groupBy:F,subGroupBy:U}=_,R=(I,H,G,Z,P)=>v.jsx($k,{title:typeof H=="string"&&H.includes(".")?r(H):H,status:I,tasks:Z,count:Z.length,colorVar:G,onTaskClick:J=>y(J.slug),onDrop:(J,nt)=>K(J,nt,F),staggerIndex:P+1,subGroups:U!=="none"?xT(Z,U):void 0},I);switch(F){case"status":return IO.map((I,H)=>R(I.key,I.labelKey,I.colorVar,N.filter(G=>G.status===I.key),H));case"priority":return PO.map((I,H)=>R(I.key,I.label,I.colorVar,N.filter(G=>G.priority===I.key),H));case"urgency":return HO.map((I,H)=>R(I.key,I.label,I.colorVar,N.filter(G=>G.urgency===I.key),H));case"tags":{const I=new Map;for(const H of N)if(H.tags.length===0){const G=I.get("(untagged)")??[];G.push(H),I.set("(untagged)",G)}else for(const G of H.tags){const Z=I.get(G)??[];Z.push(H),I.set(G,Z)}return Array.from(I.entries()).map(([H,G],Z)=>R(H,H,"--color-brand-vivid",G,Z))}case"version":{const I=(c??[]).filter(Z=>Z.status==="planning").map(Z=>Z.version),H=(c??[]).filter(Z=>Z.status==="released").map(Z=>Z.version),G=["(no version)",...I,...H];for(const Z of N)Z.version&&!G.includes(Z.version)&&G.push(Z.version);return G.map((Z,P)=>{const J=N.filter(nt=>(nt.version??"(no version)")===Z);return J.length===0&&Z!=="(no version)"?null:R(Z,Z,"--color-brand-mid",J,P)}).filter(Boolean)}case"none":return[v.jsx($k,{title:"All Tasks",status:"all",tasks:N,count:N.length,colorVar:"--color-brand-vivid",onTaskClick:I=>y(I.slug),onDrop:()=>{},subGroups:U!=="none"?xT(N,U):void 0},"all")]}};return v.jsxs("div",{className:"kanban-board",children:[v.jsx(CD,{filters:_,onFilterChange:B,onClearFilters:E,onCreateClick:()=>d(!0),presets:T,onSavePreset:O,onLoadPreset:j,onDeletePreset:M,allTags:$,allVersions:z,onVersionManagerClick:()=>g(!0)}),_.viewMode==="eisenhower"?v.jsx(nQ,{tasks:N,onTaskClick:F=>y(F.slug)}):_.viewMode==="scatter"?v.jsx(lQ,{tasks:N,onTaskClick:F=>y(F.slug)}):_.viewMode==="list"?v.jsx("div",{className:"task-list",children:N.map(F=>v.jsx(Cf,{task:F,onClick:()=>y(F.slug),onDragStart:()=>{}},F.slug))}):v.jsx("div",{className:"kanban-columns",children:W()}),u&&v.jsx(_D,{onClose:()=>d(!1)}),p&&v.jsx(cQ,{onClose:()=>g(!1),tasks:i??[]}),Y&&v.jsx(eQ,{task:Y,onClose:()=>y(null)})]})}function mQ(){const{t:r}=ri();return v.jsxs("div",{children:[v.jsx("h1",{className:"page-title",children:r("tasks.title")}),v.jsx(gQ,{})]})}function yQ(){const{t:r}=ri(),{data:e,isLoading:i,isError:n,error:a}=HB();if(i||!e)return v.jsx("div",{className:"loading",children:r("common.loading")});if(n)return v.jsxs("div",{className:"error-state",children:["Failed to load sleep state. ",a==null?void 0:a.message]});const o=IB(e.debt),c=PB(e.debt);return v.jsxs("div",{className:"sleep-page",children:[v.jsx("h1",{className:"page-title",children:r("sleep.title")}),v.jsxs("div",{className:"sleep-overview",children:[v.jsxs("div",{className:`sleep-gauge sleep-gauge--${c}`,children:[v.jsx("span",{className:"sleep-gauge-number",children:e.debt}),v.jsx("span",{className:"sleep-gauge-label",children:o})]}),v.jsxs("div",{className:"sleep-details",children:[v.jsxs("div",{className:"sleep-detail",children:[v.jsx("span",{className:"sleep-detail-label",children:r("sleep.last_sleep")}),v.jsx("span",{className:"sleep-detail-value",children:e.last_sleep??"Never"})]}),e.last_sleep_summary&&v.jsxs("div",{className:"sleep-detail",children:[v.jsx("span",{className:"sleep-detail-label",children:"Summary"}),v.jsx("span",{className:"sleep-detail-value sleep-detail-value--summary",children:e.last_sleep_summary.slice(0,200)})]})]})]}),e.sessions.length>0&&v.jsxs("div",{className:"sleep-section",children:[v.jsxs("h2",{className:"sleep-section-title",children:[r("sleep.sessions")," (",e.sessions.length,")"]}),v.jsx("div",{className:"session-list",children:e.sessions.map((h,u)=>v.jsxs("div",{className:"session-item",children:[v.jsxs("div",{className:"session-header",children:[v.jsx("span",{className:"session-time",children:h.stopped_at??"Active"}),h.score!==null&&v.jsxs("span",{className:"session-score",children:["+",h.score]}),h.change_count!==null&&v.jsxs("span",{className:"session-changes",children:[h.change_count," changes"]}),h.tool_count!=null&&v.jsxs("span",{className:"session-changes",children:[h.tool_count," tools"]})]}),h.last_assistant_message&&v.jsxs("p",{className:"session-message",children:[h.last_assistant_message.slice(0,150),h.last_assistant_message.length>150?"...":""]})]},u))})]}),e.dashboard_changes.length>0&&v.jsxs("div",{className:"sleep-section",children:[v.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),v.jsx("div",{className:"session-list",children:e.dashboard_changes.map((h,u)=>v.jsxs("div",{className:"session-item",children:[v.jsxs("div",{className:"session-header",children:[v.jsx("span",{className:"session-time",children:h.timestamp}),v.jsxs("span",{className:"session-changes",children:[h.entity," / ",h.action]})]}),v.jsx("p",{className:"session-message",children:h.summary})]},u))})]})]})}const xQ=new Set(["text","int","integer","numeric","boolean","timestamp","jsonb","json","serial","bigint","smallint","real","double","float","date","time","uuid","bytea","blob","varchar","char","array"]);function rx(r){const e=r.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return xQ.has(e)}function bQ(r){const{entities:e,relations:i}=vQ(r),n=CQ(r),a=new Set(e.map(p=>p.name.toLowerCase())),o=[...e,...n.filter(p=>!a.has(p.name.toLowerCase()))],c=_Q(o),h=p=>`${p.from}.${p.fromField}->${p.to}.${p.toField}`,u=new Set(i.map(h)),d=[...i,...c.filter(p=>!u.has(h(p)))];return{entities:o,relations:d}}function vQ(r){const e=[],i=[],n=r.split(`
|
|
426
|
+
`);let a=null,o=[],c,h=!1,u=null;function d(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let p=0;p<n.length;p++){const g=n[p],x=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const Y=g.match(/\/\w+\/\{[^}]+\}/);Y&&(c=Y[0]);continue}const y=x.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){d(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){d();continue}if(/^\s*--/.test(g)){const $=g.replace(/^\s*--\s?/,"").trim();if(!$||/^[═─=\-*]{3,}/.test($))continue;if($.startsWith(".")){const K=$.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(K&&rx(K[2])&&u){const W=K[1],F=K[2].toLowerCase(),R=(K[3]||"").match(/--\s*(.+)$/),I=R?R[1].trim():void 0;o.push({name:`${u}.${W}`,type:F,description:I,isNested:!0,parentField:u})}continue}const z=$.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(z&&rx(z[3])){const K=z[1].replace(/\[\]$/,""),W=z[2],F=z[3].toLowerCase(),R=(z[4]||"").match(/--\s*(.+)$/),I=R?R[1].trim():void 0;u=K,o.push({name:`${K}.${W}`,type:F,description:I,isNested:!0,parentField:K});continue}continue}if(!x)continue;const _=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(_))continue;const k=_.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!k)continue;const w=k[1],T=k[2],B=k[3]||"";if(!rx(T))continue;const E=T.toLowerCase(),O=/PRIMARY\s+KEY/i.test(B),j=B.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);j&&i.push({from:a,fromField:w,to:j[1],toField:j[2],cardinality:"1:1"});const M=g.match(/--\s*(.+)$/),N=M?M[1].trim():void 0;(E==="jsonb"||E==="json")&&(u=w),o.push({name:w,type:E,isPrimary:O,description:N})}return d(),{entities:e,relations:i}}function CQ(r){var o,c,h,u,d;const e=[];let i=null,n=!1;const a=r.split(`
|
|
427
|
+
`);for(let p=0;p<a.length;p++){const x=a[p].match(/^--\s?(.*)/);if(!x)continue;const y=x[1].trim();if(/^={4,}$/.test(y)){i&&i.fields.length>0&&e.push(i),i=null,n=!1;continue}if(/^[A-Z ]+\(/.test(y)&&!y.match(/^[a-z_]/))continue;const b=y.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(b&&!n){const _=b[1].trim();if(_===_.toUpperCase()&&_.length>1){i&&i.fields.length>0&&e.push(i);const k=b[2].trim();i={name:_,path:k,storageType:k.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(i){const _=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(_){i.managedBy=_[1].trim();continue}}if(y.includes("Fields in YAML frontmatter")||y.startsWith("Schema ")){n=!0;continue}if(y==="["||y==="{"){n=!0;continue}if(!(y==="]"||y==="}"||y==="..."||y==="},")){if(i&&n){const _=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(_){const{type:w,enumValues:T}=bT(_[2].trim(),(o=_[3])==null?void 0:o.trim());i.fields.push({name:_[1],type:w,enumValues:T,description:(c=_[3])==null?void 0:c.trim(),isPrimary:_[1]==="id"});continue}const k=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(k){const{type:w,enumValues:T}=bT(k[2].trim(),(h=k[3])==null?void 0:h.trim());i.fields.push({name:k[1],type:w,enumValues:T,description:(u=k[3])==null?void 0:u.trim()});continue}}if(i&&y.startsWith("Body ")&&(i.notes.push(y),y.includes("sections")&&p+1<a.length)){const _=(d=a[p+1])==null?void 0:d.match(/^--\s?(.*)/);_&&/^\s*(Why|[A-Z])/.test(_[1])&&(i.notes.push(_[1].trim()),p++)}}}return i&&i.fields.length>0&&e.push(i),e}function bT(r,e){return r.includes("|")?{type:"enum",enumValues:r.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:r==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:r.startsWith("[")?{type:"array"}:r==="true"||r==="false"?{type:"boolean"}:r==="null"?{type:"nullable"}:/^\d+$/.test(r)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(r.replace(/"/g,""))?{type:"date"}:{type:"string"}}function _Q(r){const e=[];for(const i of r)for(const n of i.fields)if(!n.isNested){if(n.description){const a=n.description.match(/(task|feature|knowledge)\s+IDs?/i);if(a){const o=a[1].toLowerCase(),c=r.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==i.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:i.name,fromField:n.name,to:c.name,toField:h?h.name:"_id",cardinality:n.type.includes("array")||n.type==="array"?"1:N":"1:1"})}}}if(n.name==="parent_task"||n.name==="parent_id"){const a=i.fields.find(o=>o.isPrimary);e.push({from:i.name,fromField:n.name,to:i.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function zb(r){return r.toLowerCase().replace(/\s+/g,"-")}function vT(r){return r==="enum"?"enum":r==="array"||r.endsWith("[]")||r.startsWith("array")?"array":r==="boolean"?"boolean":r==="nullable"?"nullable":r==="date"||r==="timestamp"?"date":r==="int"||r==="integer"||r==="numeric"||r==="serial"||r==="bigint"||r==="smallint"||r==="real"||r==="float"||r==="double"?"number":r==="jsonb"||r==="json"?"json":"string"}function kQ(r,e,i){return r.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===i&&a.fromField===r.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function SQ(r,e,i,n){if(n){const _=r.right-i.left,k=r.top+r.height*.35-i.top,w=36,T=28;return{d:`M ${_},${k} C ${_+w},${k-T*.3} ${_+w},${k-T*1.3} ${_},${k-T}`,labelX:_+w+4,labelY:k-T*.5}}const a=r.left+r.width/2-i.left,o=e.left+e.width/2-i.left,c=r.top+r.height/2-i.top,h=e.top+e.height/2-i.top,u=Math.abs(a-o),d=Math.abs(c-h);let p,g,x,y;if(u>d){a<o?(p=r.right-i.left,x=e.left-i.left):(p=r.left-i.left,x=e.right-i.left),g=c,y=h;const _=(x-p)*.4;return{d:`M ${p},${g} C ${p+_},${g} ${x-_},${y} ${x},${y}`,labelX:(p+x)/2,labelY:(g+y)/2-10}}p=a,x=o,c<h?(g=r.bottom-i.top,y=e.top-i.top):(g=r.top-i.top,y=e.bottom-i.top);const b=(y-g)*.4;return{d:`M ${p},${g} C ${p},${g+b} ${x},${y-b} ${x},${y}`,labelX:(p+x)/2,labelY:(g+y)/2-10}}function wQ({entity:r,relations:e}){const[i,n]=et.useState(new Set),a=r.storageType==="json"?"{ }":r.storageType==="table"?"SQL":"☰",o=r.fields.filter(u=>!u.isNested),c=et.useMemo(()=>{const u=new Map;for(const d of r.fields)if(d.isNested&&d.parentField){const p=u.get(d.parentField)||[];p.push(d),u.set(d.parentField,p)}return u},[r.fields]),h=u=>{n(d=>{const p=new Set(d);return p.has(u)?p.delete(u):p.add(u),p})};return v.jsxs("div",{className:"entity-card","data-entity":zb(r.name),children:[v.jsxs("div",{className:"entity-card-header",children:[v.jsxs("div",{className:"entity-card-title-group",children:[v.jsx("span",{className:"entity-card-category-icon",children:a}),v.jsx("span",{className:"entity-card-name",children:r.name})]}),v.jsx("span",{className:"entity-card-badge","data-storage":r.storageType,children:r.storageType})]}),r.path&&v.jsx("div",{className:"entity-card-path",title:r.path,children:r.path}),r.managedBy&&v.jsx("div",{className:"entity-card-managed",children:r.managedBy}),v.jsx("div",{className:"entity-fields",children:o.map(u=>{const d=kQ(u,e,r.name),p=vT(u.type),g=c.get(u.name),x=i.has(u.name);return v.jsxs(et.Fragment,{children:[v.jsxs("div",{className:`entity-field${g?" entity-field--expandable":""}`,onClick:g?()=>h(u.name):void 0,children:[v.jsx("span",{className:`entity-field-icon ${(d==null?void 0:d.cls)??""}`,children:(d==null?void 0:d.icon)??""}),v.jsx("span",{className:"entity-field-name",children:u.name}),u.type==="enum"&&u.enumValues?v.jsx("span",{className:"entity-field-enum-group",children:u.enumValues.map(y=>v.jsx("span",{className:"entity-field-enum-pill",children:y},y))}):v.jsx("span",{className:"entity-field-type","data-type":p,children:u.type}),g&&v.jsxs("span",{className:"entity-field-toggle",children:[v.jsx("span",{className:`entity-field-toggle-arrow${x?" entity-field-toggle-arrow--open":""}`,children:"▶"}),v.jsx("span",{className:"entity-field-toggle-count",children:g.length})]}),!g&&u.description&&v.jsx("span",{className:"entity-field-desc",title:u.description,children:u.description})]}),g&&x&&g.map(y=>{var k;const b=vT(y.type),_=y.name.slice((((k=y.parentField)==null?void 0:k.length)??0)+1);return v.jsxs("div",{className:"entity-field entity-field--nested",children:[v.jsx("span",{className:"entity-field-icon"}),v.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",_]}),v.jsx("span",{className:"entity-field-type","data-type":b,children:y.type}),y.description&&v.jsx("span",{className:"entity-field-desc",title:y.description,children:y.description})]},y.name)})]},u.name)})}),r.notes.length>0&&v.jsx("div",{className:"entity-card-notes",children:r.notes.map((u,d)=>v.jsx("div",{className:"entity-card-note",children:u},d))})]})}function TQ({relations:r,entities:e}){return r.length===0?null:v.jsxs("div",{className:"sql-preview-legend",children:[v.jsx("div",{className:"sql-preview-legend-title",children:"Relationships"}),v.jsx("div",{className:"sql-preview-legend-items",children:r.map((i,n)=>{var h,u;const a=((h=e.find(d=>d.name===i.from))==null?void 0:h.name)??i.from,o=((u=e.find(d=>d.name===i.to))==null?void 0:u.name)??i.to,c=i.from===i.to;return v.jsxs("div",{className:"sql-preview-legend-item",children:[v.jsx("span",{className:"sql-preview-legend-line"}),v.jsx("span",{children:c?`${a}.${i.fromField} ↻ self`:`${a}.${i.fromField} → ${o}.${i.toField}`}),v.jsx("span",{className:"sql-preview-legend-cardinality",children:i.cardinality})]},n)})})]})}function BQ({content:r}){const e=et.useRef(null),[i,n]=et.useState([]),[a,o]=et.useState({width:0,height:0}),c=et.useMemo(()=>bQ(r),[r]),h=et.useCallback(()=>{const u=e.current;if(!u||c.relations.length===0){n([]);return}const d=u.getBoundingClientRect();o({width:u.scrollWidth,height:u.scrollHeight});const p=[];for(const g of c.relations){const x=u.querySelector(`[data-entity="${zb(g.from)}"]`),y=u.querySelector(`[data-entity="${zb(g.to)}"]`);if(!x||!y)continue;const b=x.getBoundingClientRect(),_=y.getBoundingClientRect(),{d:k,labelX:w,labelY:T}=SQ(b,_,d,g.from===g.to);p.push({d:k,labelX:w,labelY:T,label:g.cardinality})}n(p)},[c]);return et.useEffect(()=>{const u=requestAnimationFrame(h),d=new ResizeObserver(h);return e.current&&d.observe(e.current),()=>{cancelAnimationFrame(u),d.disconnect()}},[h]),c.entities.length===0?v.jsx("div",{className:"sql-preview",children:v.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})}):v.jsxs("div",{className:"sql-preview",ref:e,children:[v.jsxs("svg",{className:"sql-preview-svg",width:a.width||"100%",height:a.height||"100%",viewBox:a.width?`0 0 ${a.width} ${a.height}`:void 0,children:[v.jsx("defs",{children:v.jsx("marker",{id:"rel-arrowhead",viewBox:"0 0 10 7",refX:"9",refY:"3.5",markerWidth:"8",markerHeight:"6",orient:"auto",children:v.jsx("polygon",{points:"0 0, 10 3.5, 0 7",className:"sql-preview-arrowhead"})})}),i.map((u,d)=>v.jsxs("g",{children:[v.jsx("path",{d:u.d,className:"sql-preview-line",markerEnd:"url(#rel-arrowhead)"}),v.jsx("rect",{className:"sql-preview-line-label-bg",x:u.labelX-12,y:u.labelY-7,width:24,height:14}),v.jsx("text",{className:"sql-preview-line-label",x:u.labelX,y:u.labelY+4,textAnchor:"middle",children:u.label})]},d))]}),v.jsx("div",{className:"sql-preview-grid",children:c.entities.map(u=>v.jsx(wQ,{entity:u,relations:c.relations},u.name))}),v.jsx(TQ,{relations:c.relations,entities:c.entities})]})}const AQ={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function qb({type:r}){return v.jsx("span",{className:`json-type-badge ${AQ[r]??""}`,children:r})}function Ib(){return v.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function EQ({data:r}){const[e,i]=et.useState("all"),[n,a]=et.useState(new Set),o=et.useMemo(()=>{const u=e==="all"?r:r.filter(p=>p.type===e),d=new Map;for(let p=0;p<u.length;p++){const g=u[p],x=d.get(g.date)||[];x.push({entry:g,index:p}),d.set(g.date,x)}return d},[r,e]),c=u=>{a(d=>{const p=new Set(d);return p.has(u)?p.delete(u):p.add(u),p})},h=et.useMemo(()=>{const u={};for(const d of r)u[d.type]=(u[d.type]||0)+1;return u},[r]);return v.jsxs("div",{className:"json-preview",children:[v.jsx("div",{className:"json-preview-header",children:v.jsxs("div",{className:"json-preview-stats",children:[v.jsxs("span",{className:"json-preview-total",children:[r.length," entries"]}),Object.entries(h).sort((u,d)=>d[1]-u[1]).map(([u,d])=>v.jsxs("button",{className:`json-stat-chip ${e===u?"json-stat-chip--active":""}`,onClick:()=>i(p=>p===u?"all":u),children:[v.jsx(qb,{type:u})," ",d]},u))]})}),v.jsx("div",{className:"json-timeline",children:Array.from(o.entries()).map(([u,d])=>v.jsxs("div",{className:"json-date-group",children:[v.jsxs("div",{className:"json-date-marker",children:[v.jsx("span",{className:"json-date-dot"}),v.jsx("span",{className:"json-date-label",children:u}),v.jsx("span",{className:"json-date-count",children:d.length})]}),v.jsx("div",{className:"json-date-entries",children:d.map(({entry:p,index:g})=>{const x=n.has(g),y=p.scope.length>50?p.scope.slice(0,47)+"...":p.scope;return v.jsxs("div",{className:`json-entry ${x?"json-entry--expanded":""}`,onClick:()=>c(g),children:[v.jsxs("div",{className:"json-entry-header",children:[v.jsx(qb,{type:p.type}),p.breaking&&v.jsx(Ib,{}),v.jsx("span",{className:"json-entry-scope",title:p.scope,children:y})]}),v.jsx("div",{className:`json-entry-desc ${x?"":"json-entry-desc--clamped"}`,children:p.description})]},g)})})]},u))})]})}function MQ({data:r}){const[e,i]=et.useState(new Set([0])),n=a=>{i(o=>{const c=new Set(o);return c.has(a)?c.delete(a):c.add(a),c})};return v.jsxs("div",{className:"json-preview",children:[v.jsx("div",{className:"json-preview-header",children:v.jsxs("span",{className:"json-preview-total",children:[r.length," release",r.length!==1?"s":""]})}),v.jsx("div",{className:"json-releases",children:r.map((a,o)=>{var h,u,d,p;const c=e.has(o);return v.jsxs("div",{className:`json-release ${c?"json-release--expanded":""}`,children:[v.jsxs("div",{className:"json-release-header",onClick:()=>n(o),children:[v.jsx("span",{className:"json-release-version",children:a.version}),v.jsx("span",{className:"json-release-date",children:a.date}),a.breaking&&v.jsx(Ib,{}),v.jsxs("span",{className:"json-release-meta",children:[(h=a.features)!=null&&h.length?`${a.features.length} features`:"",(u=a.features)!=null&&u.length&&((d=a.tasks)!=null&&d.length)?" / ":"",(p=a.tasks)!=null&&p.length?`${a.tasks.length} task${a.tasks.length!==1?"s":""}`:""]}),v.jsx("span",{className:`json-release-chevron ${c?"json-release-chevron--open":""}`,children:"▶"})]}),c&&v.jsxs("div",{className:"json-release-body",children:[v.jsx("div",{className:"json-release-summary",children:a.summary}),a.features&&a.features.length>0&&v.jsxs("div",{className:"json-release-section",children:[v.jsx("div",{className:"json-release-section-title",children:"Features"}),v.jsx("div",{className:"json-release-ids",children:a.features.map(g=>v.jsx("span",{className:"json-id-chip json-id-chip--feature",children:g},g))})]}),a.tasks&&a.tasks.length>0&&v.jsxs("div",{className:"json-release-section",children:[v.jsx("div",{className:"json-release-section-title",children:"Tasks"}),v.jsx("div",{className:"json-release-ids",children:a.tasks.map(g=>v.jsx("span",{className:"json-id-chip json-id-chip--task",children:g},g))})]}),a.changelog&&a.changelog.length>0&&v.jsxs("div",{className:"json-release-section",children:[v.jsxs("div",{className:"json-release-section-title",children:["Changelog (",a.changelog.length,")"]}),v.jsx("div",{className:"json-release-changelog",children:a.changelog.map((g,x)=>v.jsxs("div",{className:"json-release-cl-entry",children:[v.jsx(qb,{type:g.type}),g.breaking&&v.jsx(Ib,{}),v.jsx("span",{className:"json-release-cl-scope",children:g.scope}),v.jsx("span",{className:"json-release-cl-desc",children:g.description})]},x))})]})]})]},a.version)})})]})}function LQ({data:r,filename:e}){var a,o,c;if(!Array.isArray(r)||r.length===0)return v.jsx("div",{className:"json-preview",children:v.jsx("div",{className:"json-preview-empty",children:"No data found in this file."})});const i=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return i&&((a=r[0])!=null&&a.type)&&((o=r[0])!=null&&o.description)?v.jsx(EQ,{data:r}):n&&((c=r[0])!=null&&c.version)?v.jsx(MQ,{data:r}):v.jsxs("div",{className:"json-preview",children:[v.jsx("div",{className:"json-preview-header",children:v.jsxs("span",{className:"json-preview-total",children:[r.length," items"]})}),v.jsx("div",{className:"json-generic-list",children:r.map((h,u)=>v.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}ae.setOptions({gfm:!0,breaks:!0});function om({content:r,frontmatter:e}){const i=et.useMemo(()=>ae.parse(r),[r]),n=et.useRef(null),{resolved:a}=Ng();qX(n,i,a,"md-mmd");const o=e?Object.entries(e).filter(([,c])=>c!=null&&c!==""):[];return v.jsxs("div",{className:"md-preview",children:[o.length>0&&v.jsx("div",{className:"md-frontmatter",children:o.map(([c,h])=>v.jsxs("div",{className:"md-fm-row",children:[v.jsx("span",{className:"md-fm-key",children:c}),v.jsx("span",{className:"md-fm-value",children:String(h)})]},c))}),v.jsx("div",{ref:n,className:"markdown-body",dangerouslySetInnerHTML:{__html:i}})]})}function OQ(r){return r.endsWith(".sql")||r.endsWith(".json")||r.endsWith(".md")}function NQ(){const{t:r}=ri(),e=la(),[i,n]=et.useState(null),[a,o]=et.useState(null),[c,h]=et.useState(!1),[u,d]=et.useState("preview"),{data:p,isLoading:g,isError:x,error:y}=ji({queryKey:["core"],queryFn:()=>fr.get("/core")}),{data:b}=ji({queryKey:["core",i],queryFn:()=>fr.get(`/core/${i}`),enabled:!!i}),_=yl({mutationFn:({filename:E,content:O})=>fr.put(`/core/${E}`,{content:O}),onSuccess:()=>{e.invalidateQueries({queryKey:["core"]}),h(!1)}}),k=()=>{(b==null?void 0:b.content)!==void 0&&(o(b.content),h(!0))},w=()=>{i&&a!==null&&_.mutate({filename:i,content:a})};if(g)return v.jsx("div",{className:"loading",children:r("common.loading")});if(x)return v.jsxs("div",{className:"error-state",children:["Failed to load core files. ",y==null?void 0:y.message]});const T=(p==null?void 0:p.files)??[],B=()=>{if(!i||!b)return null;if(u==="preview"){if(i.endsWith(".sql")&&b.content)return v.jsx(BQ,{content:b.content});if(i.endsWith(".json")&&b.data)return v.jsx(LQ,{data:b.data,filename:i});if(i.endsWith(".md")&&b.content)return v.jsx(om,{content:b.content,frontmatter:b.frontmatter})}return v.jsx("pre",{className:"core-viewer-content",children:b.content??JSON.stringify(b.data,null,2)})};return v.jsxs("div",{className:"core-page",children:[v.jsx("h1",{className:"page-title",children:r("core.title")}),v.jsxs("div",{className:"core-layout",children:[v.jsx("div",{className:"core-list",children:T.map((E,O)=>v.jsxs("button",{className:`core-list-item ${i===E.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{n(E.filename),h(!1),d("preview")},children:[v.jsx("span",{className:"core-list-name",children:E.name}),v.jsx("span",{className:"core-list-type",children:E.type})]},E.filename))}),v.jsxs("div",{className:"core-detail",children:[!i&&v.jsx("div",{className:"core-empty",children:"Select a file to view."}),i&&b&&!c&&v.jsxs("div",{className:"core-viewer",children:[v.jsxs("div",{className:"core-viewer-header",children:[v.jsx("h2",{className:"core-viewer-title",children:b.filename}),v.jsxs("div",{className:"core-viewer-actions",children:[OQ(i)&&v.jsxs("div",{className:"core-tabs",children:[v.jsx("button",{className:`core-tab ${u==="file"?"core-tab--active":""}`,onClick:()=>d("file"),children:"File"}),v.jsx("button",{className:`core-tab ${u==="preview"?"core-tab--active":""}`,onClick:()=>d("preview"),children:"Preview"})]}),b.type==="markdown"&&v.jsx("button",{className:"btn btn--ghost",onClick:k,children:"Edit"})]})]}),B()]}),i&&c&&v.jsxs("div",{className:"core-editor",children:[v.jsxs("div",{className:"core-editor-header",children:[v.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",i]}),v.jsxs("div",{className:"core-editor-actions",children:[v.jsx("button",{className:"btn btn--ghost",onClick:()=>h(!1),children:"Cancel"}),v.jsx("button",{className:"btn btn--primary",onClick:w,disabled:_.isPending,children:_.isPending?"Saving...":"Save"})]})]}),v.jsxs("div",{className:"core-editor-split",children:[v.jsx("textarea",{className:"core-editor-textarea",value:a??"",onChange:E=>o(E.target.value)}),v.jsx("pre",{className:"core-editor-preview",children:a})]})]})]})]})]})}function RQ(){return ji({queryKey:["knowledge"],queryFn:()=>fr.get("/knowledge"),select:r=>r.entries})}function jQ(r){return ji({queryKey:["knowledge",r],queryFn:()=>fr.get(`/knowledge/${r}`),select:e=>e.entry,enabled:!!r})}function DQ(){const r=la();return yl({mutationFn:({slug:e,pinned:i})=>fr.patch(`/knowledge/${e}`,{pinned:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["knowledge"]})}})}function FQ(){const{t:r}=ri(),{data:e,isLoading:i,isError:n,error:a}=RQ(),o=DQ(),[c,h]=et.useState(""),[u,d]=et.useState(null),[p,g]=et.useState("preview"),{data:x}=jQ(u??""),y=et.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const b=c.toLowerCase();return e.filter(_=>_.name.toLowerCase().includes(b)||_.description.toLowerCase().includes(b)||_.tags.some(k=>k.toLowerCase().includes(b)))},[e,c]);return i?v.jsx("div",{className:"loading",children:r("common.loading")}):n?v.jsxs("div",{className:"error-state",children:["Failed to load knowledge. ",a==null?void 0:a.message]}):v.jsxs("div",{className:"knowledge-page",children:[v.jsx("h1",{className:"page-title",children:r("knowledge.title")}),v.jsx("input",{className:"knowledge-search",placeholder:r("knowledge.search"),value:c,onChange:b=>h(b.target.value)}),v.jsxs("div",{className:"knowledge-layout",children:[v.jsxs("div",{className:"knowledge-list",children:[y.length===0&&v.jsx("div",{className:"core-empty",children:r("common.empty")}),y.map(b=>v.jsxs("button",{className:`knowledge-card ${u===b.slug?"knowledge-card--active":""}`,onClick:()=>{d(b.slug),g("preview")},children:[v.jsxs("div",{className:"knowledge-card-header",children:[v.jsx("span",{className:"knowledge-card-name",children:b.name}),v.jsx("button",{className:`pin-btn ${b.pinned?"pin-btn--active":""}`,onClick:_=>{_.stopPropagation(),o.mutate({slug:b.slug,pinned:!b.pinned})},title:b.pinned?r("knowledge.unpin"):r("knowledge.pin"),children:b.pinned?"◆":"◇"})]}),b.description&&v.jsx("p",{className:"knowledge-card-desc",children:b.description}),v.jsx("div",{className:"knowledge-card-tags",children:b.tags.map(_=>v.jsx("span",{className:"task-tag","data-hue":Rg(_),children:_},_))})]},b.slug))]}),v.jsxs("div",{className:"knowledge-detail",children:[!u&&v.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&x&&v.jsxs("div",{className:"core-viewer",children:[v.jsxs("div",{className:"core-viewer-header",children:[v.jsx("h2",{className:"core-viewer-title",children:x.name}),v.jsx("div",{className:"core-viewer-actions",children:v.jsxs("div",{className:"core-tabs",children:[v.jsx("button",{className:`core-tab ${p==="file"?"core-tab--active":""}`,onClick:()=>g("file"),children:"File"}),v.jsx("button",{className:`core-tab ${p==="preview"?"core-tab--active":""}`,onClick:()=>g("preview"),children:"Preview"})]})})]}),p==="preview"&&x.content?v.jsx(om,{content:x.content}):v.jsx("pre",{className:"core-viewer-content",children:x.content})]})]})]})]})}function $Q(){const{t:r}=ri(),[e,i]=et.useState(null),[n,a]=et.useState("preview"),{data:o,isLoading:c,isError:h,error:u}=ji({queryKey:["features"],queryFn:()=>fr.get("/features")}),{data:d}=ji({queryKey:["features",e],queryFn:()=>fr.get(`/features/${e}`),enabled:!!e,select:g=>g.feature});if(c)return v.jsx("div",{className:"loading",children:r("common.loading")});if(h)return v.jsxs("div",{className:"error-state",children:["Failed to load features. ",u==null?void 0:u.message]});const p=(o==null?void 0:o.features)??[];return v.jsxs("div",{className:"features-page",children:[v.jsx("h1",{className:"page-title",children:r("features.title")}),v.jsxs("div",{className:"features-layout",children:[v.jsxs("div",{className:"features-list",children:[p.length===0&&v.jsx("div",{className:"core-empty",children:r("common.empty")}),p.map((g,x)=>v.jsxs("button",{className:`feature-card ${e===g.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(x+1,8)}`,onClick:()=>{i(g.slug),a("preview")},children:[v.jsxs("div",{className:"feature-card-header",children:[v.jsx("span",{className:"feature-card-name",children:g.slug}),v.jsx("span",{className:`feature-status feature-status--${g.status}`,children:g.status})]}),v.jsx("div",{className:"knowledge-card-tags",children:g.tags.map(y=>v.jsx("span",{className:"task-tag","data-hue":Rg(y),children:y},y))})]},g.slug))]}),v.jsxs("div",{className:"features-detail",children:[!e&&v.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&d&&v.jsxs("div",{className:"core-viewer",children:[v.jsxs("div",{className:"core-viewer-header",children:[v.jsx("h2",{className:"core-viewer-title",children:d.slug}),v.jsx("div",{className:"core-viewer-actions",children:v.jsxs("div",{className:"core-tabs",children:[v.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),v.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),v.jsxs("div",{className:"feature-meta",children:[v.jsxs("span",{children:["Status: ",d.status]}),v.jsxs("span",{children:["Created: ",d.created]}),v.jsxs("span",{children:["Updated: ",d.updated]})]}),d.related_tasks.length>0&&v.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",d.related_tasks.join(", ")]}),n==="preview"&&d.content?v.jsx(om,{content:d.content}):v.jsx("div",{className:"feature-viewer",children:d.sections.map(g=>v.jsxs("div",{className:"feature-section",children:[v.jsx("h3",{className:"feature-section-title",children:g}),v.jsx("pre",{className:"feature-section-content",children:d.sectionContents[g]||"(empty)"})]},g))})]})]})]})]})}function zQ(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function qQ(r,e,i){return e=VQ(e),e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function CT(r,e){return HQ(r)||zQ(r,e)||UO(r,e)||YQ()}function IQ(r){return PQ(r)||UQ(r)||UO(r)||WQ()}function PQ(r){if(Array.isArray(r))return Pb(r)}function HQ(r){if(Array.isArray(r))return r}function UQ(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function UO(r,e){if(r){if(typeof r=="string")return Pb(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Pb(r,e)}}function Pb(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function WQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
428
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
429
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GQ(r,e){if(typeof r!="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function VQ(r){var e=GQ(r,"string");return typeof e=="symbol"?e:String(e)}var XQ=function(e,i){var n=new Set(i);return Object.assign.apply(Object,[{}].concat(IQ(Object.entries(e).filter(function(a){var o=CT(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=CT(a,2),c=o[0],h=o[1];return qQ({},c,h)}))))};function Hb(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function QQ(r){if(Array.isArray(r))return r}function ZQ(r){if(Array.isArray(r))return Hb(r)}function KQ(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function JQ(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function tZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
430
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
431
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rZ(r,e){return QQ(r)||JQ(r,e)||WO(r,e)||tZ()}function _T(r){return ZQ(r)||KQ(r)||WO(r)||eZ()}function WO(r,e){if(r){if(typeof r=="string")return Hb(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Hb(r,e):void 0}}function iZ(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.wrapperElementType,n=i===void 0?"div":i,a=e.nodeMapper,o=a===void 0?function(p){return p}:a,c=e.methodNames,h=c===void 0?[]:c,u=e.initPropNames,d=u===void 0?[]:u;return et.forwardRef(function(p,g){var x=et.useRef(),y=et.useMemo(function(){var k=Object.fromEntries(d.filter(function(w){return p.hasOwnProperty(w)}).map(function(w){return[w,p[w]]}));return r(k)},[]);kT(function(){y(o(x.current))},et.useLayoutEffect),kT(function(){return y._destructor instanceof Function?y._destructor:void 0});var b=et.useCallback(function(k){for(var w=arguments.length,T=new Array(w>1?w-1:0),B=1;B<w;B++)T[B-1]=arguments[B];return y[k]instanceof Function?y[k].apply(y,T):void 0},[y]),_=et.useRef({});return Object.keys(XQ(p,[].concat(_T(h),_T(d)))).filter(function(k){return _.current[k]!==p[k]}).forEach(function(k){return b(k,p[k])}),_.current=p,et.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(k){return[k,function(){for(var w=arguments.length,T=new Array(w),B=0;B<w;B++)T[B]=arguments[B];return b.apply(void 0,[k].concat(T))}]}))},[b]),DR.createElement(n,{ref:x})})}function kT(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.useEffect,i=et.useRef(),n=et.useRef(!1),a=et.useRef(!1),o=et.useState(0),c=rZ(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(i.current=r(),n.current=!0),h(function(u){return u+1}),function(){a.current&&i.current&&i.current()}},[])}var nZ="[object Symbol]";function aZ(r){return typeof r=="symbol"||ah(r)&&bl(r)==nZ}var sZ=/\s/;function oZ(r){for(var e=r.length;e--&&sZ.test(r.charAt(e)););return e}var lZ=/^\s+/;function cZ(r){return r&&r.slice(0,oZ(r)+1).replace(lZ,"")}var ST=NaN,hZ=/^[-+]0x[0-9a-f]+$/i,uZ=/^0b[01]+$/i,fZ=/^0o[0-7]+$/i,dZ=parseInt;function wT(r){if(typeof r=="number")return r;if(aZ(r))return ST;if(jn(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=jn(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=cZ(r);var i=uZ.test(r);return i||fZ.test(r)?dZ(r.slice(2),i?2:8):hZ.test(r)?ST:+r}var ix=function(){return $n.Date.now()},pZ="Expected a function",gZ=Math.max,mZ=Math.min;function YO(r,e,i){var n,a,o,c,h,u,d=0,p=!1,g=!1,x=!0;if(typeof r!="function")throw new TypeError(pZ);e=wT(e)||0,jn(i)&&(p=!!i.leading,g="maxWait"in i,o=g?gZ(wT(i.maxWait)||0,e):o,x="trailing"in i?!!i.trailing:x);function y(j){var M=n,N=a;return n=a=void 0,d=j,c=r.apply(N,M),c}function b(j){return d=j,h=setTimeout(w,e),p?y(j):c}function _(j){var M=j-u,N=j-d,Y=e-M;return g?mZ(Y,o-N):Y}function k(j){var M=j-u,N=j-d;return u===void 0||M>=e||M<0||g&&N>=o}function w(){var j=ix();if(k(j))return T(j);h=setTimeout(w,_(j))}function T(j){return h=void 0,x&&n?y(j):(n=a=void 0,c)}function B(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function E(){return h===void 0?c:T(ix())}function O(){var j=ix(),M=k(j);if(n=arguments,a=this,u=j,M){if(h===void 0)return b(u);if(g)return clearTimeout(h),h=setTimeout(w,e),y(u)}return h===void 0&&(h=setTimeout(w,e)),c}return O.cancel=B,O.flush=E,O}var yZ="Expected a function";function xZ(r,e,i){var n=!0,a=!0;if(typeof r!="function")throw new TypeError(yZ);return jn(i)&&(n="leading"in i?!!i.leading:n,a="trailing"in i?!!i.trailing:a),YO(r,e,{leading:n,maxWait:e,trailing:a})}var nl=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var e=1.70158;return r===1?1:r*r*((e+1)*r-e)},Out:function(r){var e=1.70158;return r===0?0:--r*r*((e+1)*r+e)+1},InOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)}}),Bounce:Object.freeze({In:function(r){return 1-nl.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?nl.Bounce.In(r*2)*.5:nl.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(e){return Math.pow(e,r)},Out:function(e){return 1-Math.pow(1-e,r)},InOut:function(e){return e<.5?Math.pow(e*2,r)/2:(1-Math.pow(2-e*2,r))/2+.5}}}}),$u=function(){return performance.now()},GO=(function(){function r(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return r.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(i){return e._tweens[i]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var e,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];for(var a=0,o=i;a<o.length;a++){var c=o[a];(e=c._group)===null||e===void 0||e.remove(c),c._group=this,this._tweens[c.getId()]=c,this._tweensAddedDuringUpdate[c.getId()]=c}},r.prototype.remove=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var n=0,a=e;n<a.length;n++){var o=a[n];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},r.prototype.update=function(e,i){e===void 0&&(e=$u()),i===void 0&&(i=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var o=this._tweens[n[a]],c=!i;o&&o.update(e,c)===!1&&!i&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},r})(),Ub={Linear:function(r,e){var i=r.length-1,n=i*e,a=Math.floor(n),o=Ub.Utils.Linear;return e<0?o(r[0],r[1],n):e>1?o(r[i],r[i-1],i-n):o(r[a],r[a+1>i?i:a+1],n-a)},Utils:{Linear:function(r,e,i){return(e-r)*i+r}}},VO=(function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r})(),Wb=new GO,TT=(function(){function r(e,i){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=nl.Linear.None,this._interpolationFunction=Ub.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=VO.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof i=="object"?(this._group=i,i.add(this)):i===!0&&(this._group=Wb,Wb.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(e,i){if(i===void 0&&(i=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=i<0?0:i,this},r.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},r.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},r.prototype.start=function(e,i){if(e===void 0&&(e=$u()),i===void 0&&(i=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||i){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,i)}return this},r.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},r.prototype._setupProperties=function(e,i,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),d=u?"array":typeof h,p=!u&&Array.isArray(n[c]);if(!(d==="undefined"||d==="function")){if(p){var g=n[c];if(g.length===0)continue;for(var x=[h],y=0,b=g.length;y<b;y+=1){var _=this._handleRelativeValue(h,g[y]);if(isNaN(_)){p=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(_)}p&&(n[c]=x)}if((d==="object"||u)&&h&&!p){i[c]=u?[]:{};var k=h;for(var w in k)i[c][w]=k[w];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var w in g)T[w]=g[w];n[c]=g=T}this._setupProperties(k,i[c],g,a[c],o)}else(typeof i[c]>"u"||o)&&(i[c]=h),u||(i[c]*=1),p?a[c]=n[c].slice().reverse():a[c]=i[c]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(e){return e===void 0&&(e=$u()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},r.prototype.resume=function(e){return e===void 0&&(e=$u()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var e=0,i=this._chainedTweens.length;e<i;e++)this._chainedTweens[e].stop();return this},r.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},r.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},r.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},r.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},r.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},r.prototype.easing=function(e){return e===void 0&&(e=nl.Linear.None),this._easingFunction=e,this},r.prototype.interpolation=function(e){return e===void 0&&(e=Ub.Linear),this._interpolationFunction=e,this},r.prototype.chain=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return this._chainedTweens=e,this},r.prototype.onStart=function(e){return this._onStartCallback=e,this},r.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},r.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},r.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},r.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},r.prototype.onStop=function(e){return this._onStopCallback=e,this},r.prototype.update=function(e,i){var n=this,a;if(e===void 0&&(e=$u()),i===void 0&&(i=r.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(i)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,d=function(){if(n._duration===0||c>u)return 1;var _=Math.trunc(c/h),k=c-_*h,w=Math.min(k/n._duration,1);return w===0&&c===n._duration?1:w},p=d(),g=this._easingFunction(p);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,p),this._duration===0||c>=this._duration)if(this._repeat>0){var x=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=x);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*x,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,b=this._chainedTweens.length;y<b;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(e,i,n,a){for(var o in n)if(i[o]!==void 0){var c=i[o]||0,h=n[o],u=Array.isArray(e[o]),d=Array.isArray(h),p=!u&&d;p?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},r.prototype._handleRelativeValue=function(e,i){return typeof i!="string"?i:i.charAt(0)==="+"||i.charAt(0)==="-"?e+parseFloat(i):parseFloat(i)},r.prototype._swapEndStartRepeatValues=function(e){var i=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=i},r.autoStartOnUpdate=!1,r})();VO.nextId;var oa=Wb;oa.getAll.bind(oa);oa.removeAll.bind(oa);oa.add.bind(oa);oa.remove.bind(oa);oa.update.bind(oa);function BT(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function bZ(r){if(Array.isArray(r))return r}function vZ(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function CZ(r,e,i){return Object.defineProperty(r,"prototype",{writable:!1}),r}function _Z(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function kZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
432
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SZ(r,e){return bZ(r)||_Z(r,e)||wZ(r,e)||kZ()}function wZ(r,e){if(r){if(typeof r=="string")return BT(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?BT(r,e):void 0}}var TZ=CZ(function r(e,i){var n=i.default,a=n===void 0?null:n,o=i.triggerUpdate,c=o===void 0?!0:o,h=i.onChange,u=h===void 0?function(d,p){}:h;vZ(this,r),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function wv(r){var e=r.stateInit,i=e===void 0?function(){return{}}:e,n=r.props,a=n===void 0?{}:n,o=r.methods,c=o===void 0?{}:o,h=r.aliases,u=h===void 0?{}:h,d=r.init,p=d===void 0?function(){}:d,g=r.update,x=g===void 0?function(){}:g,y=Object.keys(a).map(function(b){return new TZ(b,a[b])});return function b(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];var T=!!(this instanceof b&&this.constructor),B=T?k.shift():void 0,E=k[0],O=E===void 0?{}:E,j=Object.assign({},i instanceof Function?i(O):i,{initialised:!1}),M={};function N(z){return Y(z,O),$(),N}var Y=function(K,W){p.call(N,K,j,W),j.initialised=!0},$=YO(function(){j.initialised&&(x.call(N,j,M),M={})},1);return y.forEach(function(z){N[z.name]=K(z);function K(W){var F=W.name,U=W.triggerUpdate,R=U===void 0?!1:U,I=W.onChange,H=I===void 0?function(P,J){}:I,G=W.defaultVal,Z=G===void 0?null:G;return function(P){var J=j[F];if(!arguments.length)return J;var nt=P===void 0?Z:P;return j[F]=nt,H.call(N,nt,j,J),!M.hasOwnProperty(F)&&(M[F]=J),R&&$(),N}}}),Object.keys(c).forEach(function(z){N[z]=function(){for(var K,W=arguments.length,F=new Array(W),U=0;U<W;U++)F[U]=arguments[U];return(K=c[z]).call.apply(K,[N,j].concat(F))}}),Object.entries(u).forEach(function(z){var K=SZ(z,2),W=K[0],F=K[1];return N[W]=N[F]}),N.resetProps=function(){return y.forEach(function(z){N[z.name](z.defaultVal)}),N},N.resetProps(),j._rerender=$,T&&B&&N(B),N}}var Me=(function(r){return typeof r=="function"?r:typeof r=="string"?function(e){return e[r]}:function(e){return r}});function Tg(r){"@babel/helpers - typeof";return Tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tg(r)}var BZ=/^\s+/,AZ=/\s+$/;function Ht(r,e){if(r=r||"",e=e||{},r instanceof Ht)return r;if(!(this instanceof Ht))return new Ht(r,e);var i=EZ(r);this._originalInput=r,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}Ht.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),i,n,a,o,c,h;return i=e.r/255,n=e.g/255,a=e.b/255,i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*c+.0722*h},setAlpha:function(e){return this._a=XO(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ET(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ET(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+i+", "+n+"%, "+a+"%)":"hsva("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=AT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=AT(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+i+", "+n+"%, "+a+"%)":"hsla("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return MT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return NZ(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(er(this._r,255)*100)+"%",g:Math.round(er(this._g,255)*100)+"%",b:Math.round(er(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(er(this._r,255)*100)+"%, "+Math.round(er(this._g,255)*100)+"%, "+Math.round(er(this._b,255)*100)+"%)":"rgba("+Math.round(er(this._r,255)*100)+"%, "+Math.round(er(this._g,255)*100)+"%, "+Math.round(er(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:WZ[MT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var i="#"+LT(this._r,this._g,this._b,this._a),n=i,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=Ht(e);n="#"+LT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+i+",endColorstr="+n+")"},toString:function(e){var i=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!i&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Ht(this.toString())},_applyModification:function(e,i){var n=e.apply(null,[this].concat([].slice.call(i)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(FZ,arguments)},brighten:function(){return this._applyModification($Z,arguments)},darken:function(){return this._applyModification(zZ,arguments)},desaturate:function(){return this._applyModification(RZ,arguments)},saturate:function(){return this._applyModification(jZ,arguments)},greyscale:function(){return this._applyModification(DZ,arguments)},spin:function(){return this._applyModification(qZ,arguments)},_applyCombination:function(e,i){return e.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this._applyCombination(HZ,arguments)},complement:function(){return this._applyCombination(IZ,arguments)},monochromatic:function(){return this._applyCombination(UZ,arguments)},splitcomplement:function(){return this._applyCombination(PZ,arguments)},triad:function(){return this._applyCombination(OT,[3])},tetrad:function(){return this._applyCombination(OT,[4])}};Ht.fromRatio=function(r,e){if(Tg(r)=="object"){var i={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?i[n]=r[n]:i[n]=zu(r[n]));r=i}return Ht(r,e)};function EZ(r){var e={r:0,g:0,b:0},i=1,n=null,a=null,o=null,c=!1,h=!1;return typeof r=="string"&&(r=XZ(r)),Tg(r)=="object"&&(Ra(r.r)&&Ra(r.g)&&Ra(r.b)?(e=MZ(r.r,r.g,r.b),c=!0,h=String(r.r).substr(-1)==="%"?"prgb":"rgb"):Ra(r.h)&&Ra(r.s)&&Ra(r.v)?(n=zu(r.s),a=zu(r.v),e=OZ(r.h,n,a),c=!0,h="hsv"):Ra(r.h)&&Ra(r.s)&&Ra(r.l)&&(n=zu(r.s),o=zu(r.l),e=LZ(r.h,n,o),c=!0,h="hsl"),r.hasOwnProperty("a")&&(i=r.a)),i=XO(i),{ok:c,format:r.format||h,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:i}}function MZ(r,e,i){return{r:er(r,255)*255,g:er(e,255)*255,b:er(i,255)*255}}function AT(r,e,i){r=er(r,255),e=er(e,255),i=er(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),o,c,h=(n+a)/2;if(n==a)o=c=0;else{var u=n-a;switch(c=h>.5?u/(2-n-a):u/(n+a),n){case r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function LZ(r,e,i){var n,a,o;r=er(r,360),e=er(e,100),i=er(i,100);function c(d,p,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(p-d)*6*g:g<1/2?p:g<2/3?d+(p-d)*(2/3-g)*6:d}if(e===0)n=a=o=i;else{var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;n=c(u,h,r+1/3),a=c(u,h,r),o=c(u,h,r-1/3)}return{r:n*255,g:a*255,b:o*255}}function ET(r,e,i){r=er(r,255),e=er(e,255),i=er(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function OZ(r,e,i){r=er(r,360)*6,e=er(e,100),i=er(i,100);var n=Math.floor(r),a=r-n,o=i*(1-e),c=i*(1-a*e),h=i*(1-(1-a)*e),u=n%6,d=[i,c,o,o,h,i][u],p=[h,i,i,c,o,o][u],g=[o,o,h,i,i,c][u];return{r:d*255,g:p*255,b:g*255}}function MT(r,e,i,n){var a=[Ln(Math.round(r).toString(16)),Ln(Math.round(e).toString(16)),Ln(Math.round(i).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function NZ(r,e,i,n,a){var o=[Ln(Math.round(r).toString(16)),Ln(Math.round(e).toString(16)),Ln(Math.round(i).toString(16)),Ln(QO(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function LT(r,e,i,n){var a=[Ln(QO(n)),Ln(Math.round(r).toString(16)),Ln(Math.round(e).toString(16)),Ln(Math.round(i).toString(16))];return a.join("")}Ht.equals=function(r,e){return!r||!e?!1:Ht(r).toRgbString()==Ht(e).toRgbString()};Ht.random=function(){return Ht.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function RZ(r,e){e=e===0?0:e||10;var i=Ht(r).toHsl();return i.s-=e/100,i.s=lm(i.s),Ht(i)}function jZ(r,e){e=e===0?0:e||10;var i=Ht(r).toHsl();return i.s+=e/100,i.s=lm(i.s),Ht(i)}function DZ(r){return Ht(r).desaturate(100)}function FZ(r,e){e=e===0?0:e||10;var i=Ht(r).toHsl();return i.l+=e/100,i.l=lm(i.l),Ht(i)}function $Z(r,e){e=e===0?0:e||10;var i=Ht(r).toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(255*-(e/100)))),i.g=Math.max(0,Math.min(255,i.g-Math.round(255*-(e/100)))),i.b=Math.max(0,Math.min(255,i.b-Math.round(255*-(e/100)))),Ht(i)}function zZ(r,e){e=e===0?0:e||10;var i=Ht(r).toHsl();return i.l-=e/100,i.l=lm(i.l),Ht(i)}function qZ(r,e){var i=Ht(r).toHsl(),n=(i.h+e)%360;return i.h=n<0?360+n:n,Ht(i)}function IZ(r){var e=Ht(r).toHsl();return e.h=(e.h+180)%360,Ht(e)}function OT(r,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var i=Ht(r).toHsl(),n=[Ht(r)],a=360/e,o=1;o<e;o++)n.push(Ht({h:(i.h+o*a)%360,s:i.s,l:i.l}));return n}function PZ(r){var e=Ht(r).toHsl(),i=e.h;return[Ht(r),Ht({h:(i+72)%360,s:e.s,l:e.l}),Ht({h:(i+216)%360,s:e.s,l:e.l})]}function HZ(r,e,i){e=e||6,i=i||30;var n=Ht(r).toHsl(),a=360/i,o=[Ht(r)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(Ht(n));return o}function UZ(r,e){e=e||6;for(var i=Ht(r).toHsv(),n=i.h,a=i.s,o=i.v,c=[],h=1/e;e--;)c.push(Ht({h:n,s:a,v:o})),o=(o+h)%1;return c}Ht.mix=function(r,e,i){i=i===0?0:i||50;var n=Ht(r).toRgb(),a=Ht(e).toRgb(),o=i/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return Ht(c)};Ht.readability=function(r,e){var i=Ht(r),n=Ht(e);return(Math.max(i.getLuminance(),n.getLuminance())+.05)/(Math.min(i.getLuminance(),n.getLuminance())+.05)};Ht.isReadable=function(r,e,i){var n=Ht.readability(r,e),a,o;switch(o=!1,a=QZ(i),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};Ht.mostReadable=function(r,e,i){var n=null,a=0,o,c,h,u;i=i||{},c=i.includeFallbackColors,h=i.level,u=i.size;for(var d=0;d<e.length;d++)o=Ht.readability(r,e[d]),o>a&&(a=o,n=Ht(e[d]));return Ht.isReadable(r,n,{level:h,size:u})||!c?n:(i.includeFallbackColors=!1,Ht.mostReadable(r,["#fff","#000"],i))};var Yb=Ht.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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:"f00",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",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},WZ=Ht.hexNames=YZ(Yb);function YZ(r){var e={};for(var i in r)r.hasOwnProperty(i)&&(e[r[i]]=i);return e}function XO(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function er(r,e){GZ(r)&&(r="100%");var i=VZ(r);return r=Math.min(e,Math.max(0,parseFloat(r))),i&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function lm(r){return Math.min(1,Math.max(0,r))}function Vi(r){return parseInt(r,16)}function GZ(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function VZ(r){return typeof r=="string"&&r.indexOf("%")!=-1}function Ln(r){return r.length==1?"0"+r:""+r}function zu(r){return r<=1&&(r=r*100+"%"),r}function QO(r){return Math.round(parseFloat(r)*255).toString(16)}function NT(r){return Vi(r)/255}var Sn=(function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",a="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Ra(r){return!!Sn.CSS_UNIT.exec(r)}function XZ(r){r=r.replace(BZ,"").replace(AZ,"").toLowerCase();var e=!1;if(Yb[r])r=Yb[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=Sn.rgb.exec(r))?{r:i[1],g:i[2],b:i[3]}:(i=Sn.rgba.exec(r))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=Sn.hsl.exec(r))?{h:i[1],s:i[2],l:i[3]}:(i=Sn.hsla.exec(r))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=Sn.hsv.exec(r))?{h:i[1],s:i[2],v:i[3]}:(i=Sn.hsva.exec(r))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=Sn.hex8.exec(r))?{r:Vi(i[1]),g:Vi(i[2]),b:Vi(i[3]),a:NT(i[4]),format:e?"name":"hex8"}:(i=Sn.hex6.exec(r))?{r:Vi(i[1]),g:Vi(i[2]),b:Vi(i[3]),format:e?"name":"hex"}:(i=Sn.hex4.exec(r))?{r:Vi(i[1]+""+i[1]),g:Vi(i[2]+""+i[2]),b:Vi(i[3]+""+i[3]),a:NT(i[4]+""+i[4]),format:e?"name":"hex8"}:(i=Sn.hex3.exec(r))?{r:Vi(i[1]+""+i[1]),g:Vi(i[2]+""+i[2]),b:Vi(i[3]+""+i[3]),format:e?"name":"hex"}:!1}function QZ(r){var e,i;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),i=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:e,size:i}}function Gb(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function ZZ(r){if(Array.isArray(r))return Gb(r)}function ZO(r,e,i){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function KZ(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function JZ(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function cn(r,e){return r.get(ZO(r,e))}function RT(r,e,i){KZ(r,e),e.set(r,i)}function jT(r,e,i){return r.set(ZO(r,e),i),i}function tK(r,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,sK(n.key),n)}}function eK(r,e,i){return e&&tK(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function rK(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function iK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
433
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nK(r){return ZZ(r)||rK(r)||oK(r)||iK()}function aK(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function sK(r){var e=aK(r,"string");return typeof e=="symbol"?e:e+""}function oK(r,e){if(r){if(typeof r=="string")return Gb(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Gb(r,e):void 0}}var lK=123,cK=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},KO=function(e,i,n){return(e<<16)+(i<<8)+n},hK=function(e){var i=Ht(e).toRgb(),n=i.r,a=i.g,o=i.b;return KO(n,a,o)},DT=function(e,i){return e*lK%Math.pow(2,i)},$o=new WeakMap,ja=new WeakMap,uK=(function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;JZ(this,r),RT(this,$o,void 0),RT(this,ja,void 0),jT(ja,this,e),this.reset()}return eK(r,[{key:"reset",value:function(){jT($o,this,["__reserved for background__"])}},{key:"register",value:function(i){if(cn($o,this).length>=Math.pow(2,24-cn(ja,this)))return null;var n=cn($o,this).length,a=DT(n,cn(ja,this)),o=cK(n+(a<<24-cn(ja,this)));return cn($o,this).push(i),o}},{key:"lookup",value:function(i){if(!i)return null;var n=typeof i=="string"?hK(i):KO.apply(void 0,nK(i));if(!n)return null;var a=n&Math.pow(2,24-cn(ja,this))-1,o=n>>24-cn(ja,this)&Math.pow(2,cn(ja,this))-1;return DT(a,cn(ja,this))!==o||a>=cn($o,this).length?null:cn($o,this)[a]}}])})(),Rf,rr,JO,tN,Ps,FT,eN,rN,nx,Dp,Vu,iN,Tv,Vb,Xb,Bg={},Ag=[],fK=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cm=Array.isArray;function ia(r,e){for(var i in e)r[i]=e[i];return r}function Bv(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function dK(r,e,i){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Rf.call(arguments,2):i),typeof r=="function"&&r.defaultProps!=null)for(o in r.defaultProps)c[o]===void 0&&(c[o]=r.defaultProps[o]);return Xu(r,c,n,a,null)}function Xu(r,e,i,n,a){var o={type:r,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++JO,__i:-1,__u:0};return a==null&&rr.vnode!=null&&rr.vnode(o),o}function hm(r){return r.children}function Fp(r,e){this.props=r,this.context=e}function rh(r,e){if(e==null)return r.__?rh(r.__,r.__i+1):null;for(var i;e<r.__k.length;e++)if((i=r.__k[e])!=null&&i.__e!=null)return i.__e;return typeof r.type=="function"?rh(r):null}function pK(r){if(r.__P&&r.__d){var e=r.__v,i=e.__e,n=[],a=[],o=ia({},e);o.__v=e.__v+1,rr.vnode&&rr.vnode(o),Av(r.__P,o,e,r.__n,r.__P.namespaceURI,32&e.__u?[i]:null,n,i??rh(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,oN(n,o,a),e.__e=e.__=null,o.__e!=i&&nN(o)}}function nN(r){if((r=r.__)!=null&&r.__c!=null)return r.__e=r.__c.base=null,r.__k.some(function(e){if(e!=null&&e.__e!=null)return r.__e=r.__c.base=e.__e}),nN(r)}function $T(r){(!r.__d&&(r.__d=!0)&&Ps.push(r)&&!Eg.__r++||FT!=rr.debounceRendering)&&((FT=rr.debounceRendering)||eN)(Eg)}function Eg(){try{for(var r,e=1;Ps.length;)Ps.length>e&&Ps.sort(rN),r=Ps.shift(),e=Ps.length,pK(r)}finally{Ps.length=Eg.__r=0}}function aN(r,e,i,n,a,o,c,h,u,d,p){var g,x,y,b,_,k,w,T=n&&n.__k||Ag,B=e.length;for(u=gK(i,e,T,u,B),g=0;g<B;g++)(y=i.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||Bg,y.__i=g,k=Av(r,y,x,a,o,c,h,u,d,p),b=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&Ev(x.ref,null,y),p.push(y.ref,y.__c||b,y)),_==null&&b!=null&&(_=b),(w=!!(4&y.__u))||x.__k===y.__k?(u=sN(y,u,r,w),w&&x.__e&&(x.__e=null)):typeof y.type=="function"&&k!==void 0?u=k:b&&(u=b.nextSibling),y.__u&=-7);return i.__e=_,u}function gK(r,e,i,n,a){var o,c,h,u,d,p=i.length,g=p,x=0;for(r.__k=new Array(a),o=0;o<a;o++)(c=e[o])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=r.__k[o]=Xu(null,c,null,null,null):cm(c)?c=r.__k[o]=Xu(hm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=r.__k[o]=Xu(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):r.__k[o]=c,u=o+x,c.__=r,c.__b=r.__b+1,h=null,(d=c.__i=mK(c,i,u,g))!=-1&&(g--,(h=i[d])&&(h.__u|=2)),h==null||h.__v==null?(d==-1&&(a>p?x--:a<p&&x++),typeof c.type!="function"&&(c.__u|=4)):d!=u&&(d==u-1?x--:d==u+1?x++:(d>u?x--:x++,c.__u|=4))):r.__k[o]=null;if(g)for(o=0;o<p;o++)(h=i[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=rh(h)),cN(h,h));return n}function sN(r,e,i,n){var a,o;if(typeof r.type=="function"){for(a=r.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=r,e=sN(a[o],e,i,n));return e}r.__e!=e&&(n&&(e&&r.type&&!e.parentNode&&(e=rh(r)),i.insertBefore(r.__e,e||null)),e=r.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function mK(r,e,i,n){var a,o,c,h=r.key,u=r.type,d=e[i],p=d!=null&&(2&d.__u)==0;if(d===null&&h==null||p&&h==d.key&&u==d.type)return i;if(n>(p?1:0)){for(a=i-1,o=i+1;a>=0||o<e.length;)if((d=e[c=a>=0?a--:o++])!=null&&(2&d.__u)==0&&h==d.key&&u==d.type)return c}return-1}function zT(r,e,i){e[0]=="-"?r.setProperty(e,i??""):r[e]=i==null?"":typeof i!="number"||fK.test(e)?i:i+"px"}function gp(r,e,i,n,a){var o,c;t:if(e=="style")if(typeof i=="string")r.style.cssText=i;else{if(typeof n=="string"&&(r.style.cssText=n=""),n)for(e in n)i&&e in i||zT(r.style,e,"");if(i)for(e in i)n&&i[e]==n[e]||zT(r.style,e,i[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(iN,"$1")),c=e.toLowerCase(),e=c in r||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),r.l||(r.l={}),r.l[e+o]=i,i?n?i[Vu]=n[Vu]:(i[Vu]=Tv,r.addEventListener(e,o?Xb:Vb,o)):r.removeEventListener(e,o?Xb:Vb,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in r)try{r[e]=i??"";break t}catch{}typeof i=="function"||(i==null||i===!1&&e[4]!="-"?r.removeAttribute(e):r.setAttribute(e,e=="popover"&&i==1?"":i))}}function qT(r){return function(e){if(this.l){var i=this.l[e.type+r];if(e[Dp]==null)e[Dp]=Tv++;else if(e[Dp]<i[Vu])return;return i(rr.event?rr.event(e):e)}}}function Av(r,e,i,n,a,o,c,h,u,d){var p,g,x,y,b,_,k,w,T,B,E,O,j,M,N,Y=e.type;if(e.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),o=[h=e.__e=i.__e]),(p=rr.__b)&&p(e);t:if(typeof Y=="function")try{if(w=e.props,T=Y.prototype&&Y.prototype.render,B=(p=Y.contextType)&&n[p.__c],E=p?B?B.props.value:p.__:n,i.__c?k=(g=e.__c=i.__c).__=g.__E:(T?e.__c=g=new Y(w,E):(e.__c=g=new Fp(w,E),g.constructor=Y,g.render=xK),B&&B.sub(g),g.state||(g.state={}),g.__n=n,x=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&Y.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=ia({},g.__s)),ia(g.__s,Y.getDerivedStateFromProps(w,g.__s))),y=g.props,b=g.state,g.__v=e,x)T&&Y.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&Y.getDerivedStateFromProps==null&&w!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(w,E),e.__v==i.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(w,g.__s,E)===!1){e.__v!=i.__v&&(g.props=w,g.state=g.__s,g.__d=!1),e.__e=i.__e,e.__k=i.__k,e.__k.some(function($){$&&($.__=e)}),Ag.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(w,g.__s,E),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,b,_)})}if(g.context=E,g.props=w,g.__P=r,g.__e=!1,O=rr.__r,j=0,T)g.state=g.__s,g.__d=!1,O&&O(e),p=g.render(g.props,g.state,g.context),Ag.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,O&&O(e),p=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++j<25);g.state=g.__s,g.getChildContext!=null&&(n=ia(ia({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(_=g.getSnapshotBeforeUpdate(y,b)),M=p!=null&&p.type===hm&&p.key==null?lN(p.props.children):p,h=aN(r,cm(M)?M:[M],e,i,n,a,o,c,h,u,d),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),k&&(g.__E=g.__=null)}catch($){if(e.__v=null,u||o!=null)if($.then){for(e.__u|=u?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;o[o.indexOf(h)]=null,e.__e=h}else{for(N=o.length;N--;)Bv(o[N]);Qb(e)}else e.__e=i.__e,e.__k=i.__k,$.then||Qb(e);rr.__e($,e,i)}else o==null&&e.__v==i.__v?(e.__k=i.__k,e.__e=i.__e):h=e.__e=yK(i.__e,e,i,n,a,o,c,u,d);return(p=rr.diffed)&&p(e),128&e.__u?void 0:h}function Qb(r){r&&(r.__c&&(r.__c.__e=!0),r.__k&&r.__k.some(Qb))}function oN(r,e,i){for(var n=0;n<i.length;n++)Ev(i[n],i[++n],i[++n]);rr.__c&&rr.__c(e,r),r.some(function(a){try{r=a.__h,a.__h=[],r.some(function(o){o.call(a)})}catch(o){rr.__e(o,a.__v)}})}function lN(r){return typeof r!="object"||r==null||r.__b>0?r:cm(r)?r.map(lN):ia({},r)}function yK(r,e,i,n,a,o,c,h,u){var d,p,g,x,y,b,_,k=i.props||Bg,w=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!T&&(T?y.localName==T:y.nodeType==3)){r=y,o[d]=null;break}}if(r==null){if(T==null)return document.createTextNode(w);r=document.createElementNS(a,T,w.is&&w),h&&(rr.__m&&rr.__m(e,o),h=!1),o=null}if(T==null)k===w||h&&r.data==w||(r.data=w);else{if(o=o&&Rf.call(r.childNodes),!h&&o!=null)for(k={},d=0;d<r.attributes.length;d++)k[(y=r.attributes[d]).name]=y.value;for(d in k)y=k[d],d=="dangerouslySetInnerHTML"?g=y:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||gp(r,d,null,y,a);for(d in w)y=w[d],d=="children"?x=y:d=="dangerouslySetInnerHTML"?p=y:d=="value"?b=y:d=="checked"?_=y:h&&typeof y!="function"||k[d]===y||gp(r,d,y,k[d],a);if(p)h||g&&(p.__html==g.__html||p.__html==r.innerHTML)||(r.innerHTML=p.__html),e.__k=[];else if(g&&(r.innerHTML=""),aN(e.type=="template"?r.content:r,cm(x)?x:[x],e,i,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:i.__k&&rh(i,0),h,u),o!=null)for(d=o.length;d--;)Bv(o[d]);h||(d="value",T=="progress"&&b==null?r.removeAttribute("value"):b!=null&&(b!==r[d]||T=="progress"&&!b||T=="option"&&b!=k[d])&&gp(r,d,b,k[d],a),d="checked",_!=null&&_!=r[d]&&gp(r,d,_,k[d],a))}return r}function Ev(r,e,i){try{if(typeof r=="function"){var n=typeof r.__u=="function";n&&r.__u(),n&&e==null||(r.__u=r(e))}else r.current=e}catch(a){rr.__e(a,i)}}function cN(r,e,i){var n,a;if(rr.unmount&&rr.unmount(r),(n=r.ref)&&(n.current&&n.current!=r.__e||Ev(n,null,e)),(n=r.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){rr.__e(o,e)}n.base=n.__P=null}if(n=r.__k)for(a=0;a<n.length;a++)n[a]&&cN(n[a],e,i||typeof r.type!="function");i||Bv(r.__e),r.__c=r.__=r.__e=void 0}function xK(r,e,i){return this.constructor(r,i)}function bK(r,e,i){var n,a,o,c;e==document&&(e=document.documentElement),rr.__&&rr.__(r,e),a=(n=!1)?null:e.__k,o=[],c=[],Av(e,r=e.__k=dK(hm,null,[r]),a||Bg,Bg,e.namespaceURI,a?null:e.firstChild?Rf.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),oN(o,r,c)}function hN(r,e,i){var n,a,o,c,h=ia({},r.props);for(o in r.type&&r.type.defaultProps&&(c=r.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Rf.call(arguments,2):i),Xu(r.type,h,n||r.key,a||r.ref,null)}Rf=Ag.slice,rr={__e:function(r,e,i,n){for(var a,o,c;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(r)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(r,n||{}),c=a.__d),c)return a.__E=a}catch(h){r=h}throw r}},JO=0,tN=function(r){return r!=null&&r.constructor===void 0},Fp.prototype.setState=function(r,e){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ia({},this.state),typeof r=="function"&&(r=r(ia({},i),this.props)),r&&ia(i,r),r!=null&&this.__v&&(e&&this._sb.push(e),$T(this))},Fp.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),$T(this))},Fp.prototype.render=hm,Ps=[],eN=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rN=function(r,e){return r.__v.__b-e.__v.__b},Eg.__r=0,nx=Math.random().toString(8),Dp="__d"+nx,Vu="__a"+nx,iN=/(PointerCapture)$|Capture$/i,Tv=0,Vb=qT(!1),Xb=qT(!0);function IT(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function vK(r){if(Array.isArray(r))return r}function CK(r,e,i){return(e=BK(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function _K(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function kK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
434
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PT(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function SK(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?PT(Object(i),!0).forEach(function(n){CK(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):PT(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function wK(r,e){return vK(r)||_K(r,e)||AK(r,e)||kK()}function TK(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function BK(r){var e=TK(r,"string");return typeof e=="symbol"?e:e+""}function Mg(r){"@babel/helpers - typeof";return Mg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mg(r)}function AK(r,e){if(r){if(typeof r=="string")return IT(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?IT(r,e):void 0}}var Zb=function(e){if(Mg(e)!=="object")return e;var i=hN(e);if(i.props){var n;i.props=SK({},i.props),i!=null&&(n=i.props)!==null&&n!==void 0&&n.children&&(i.props.children=Array.isArray(i.props.children)?i.props.children.map(Zb):Zb(i.props.children))}return i},EK=function(e){return tN(hN(e))},MK=function(e,i){delete i.__k,bK(Zb(e),i)};function LK(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var OK=`.float-tooltip-kap {
|
|
435
|
+
position: absolute;
|
|
436
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
437
|
+
max-width: max(50%, 150px);
|
|
438
|
+
padding: 3px 5px;
|
|
439
|
+
border-radius: 3px;
|
|
440
|
+
font: 12px sans-serif;
|
|
441
|
+
color: #eee;
|
|
442
|
+
background: rgba(0,0,0,0.6);
|
|
443
|
+
pointer-events: none;
|
|
444
|
+
}
|
|
445
|
+
`;LK(OK);var NK=wv({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&Mg(e)==="object"&&!!e.node&&typeof e.node=="function",h=Xt(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),i.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var p=wK(d,2),g=p[0],x=p[1];return i.tooltipEl.style(g,x)}),i.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));i.mouseInside=!1,h.on("mousemove.".concat(u),function(d){i.mouseInside=!0;var p=Kn(d),g=h.node(),x=g.offsetWidth,y=g.offsetHeight,b=[i.offsetX===null||i.offsetX===void 0?"-".concat(p[0]/x*100,"%"):typeof i.offsetX=="number"?"calc(-50% + ".concat(i.offsetX,"px)"):i.offsetX,i.offsetY===null||i.offsetY===void 0?y>130&&y-p[1]<100?"calc(-100% - 6px)":"21px":typeof i.offsetY=="number"?i.offsetY<0?"calc(-100% - ".concat(Math.abs(i.offsetY),"px)"):"".concat(i.offsetY,"px"):i.offsetY];i.tooltipEl.style("left",p[0]+"px").style("top",p[1]+"px").style("transform","translate(".concat(b.join(","),")")),i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){i.mouseInside=!0,i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){i.mouseInside=!1,i.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):EK(e.content)?(e.tooltipEl.text(""),MK(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function RK(r,e,i){var n,a=1;r==null&&(r=0),e==null&&(e=0),i==null&&(i=0);function o(){var c,h=n.length,u,d=0,p=0,g=0;for(c=0;c<h;++c)u=n[c],d+=u.x||0,p+=u.y||0,g+=u.z||0;for(d=(d/h-r)*a,p=(p/h-e)*a,g=(g/h-i)*a,c=0;c<h;++c)u=n[c],d&&(u.x-=d),p&&(u.y-=p),g&&(u.z-=g)}return o.initialize=function(c){n=c},o.x=function(c){return arguments.length?(r=+c,o):r},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(i=+c,o):i},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function jK(r){const e=+this._x.call(null,r);return uN(this.cover(e),e,r)}function uN(r,e,i){if(isNaN(e))return r;var n,a=r._root,o={data:i},c=r._x0,h=r._x1,u,d,p,g,x;if(!a)return r._root=o,r;for(;a.length;)if((p=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+p]))return n[g]=o,r;if(d=+r._x.call(null,a.data),e===d)return o.next=a,n?n[g]=o:r._root=o,r;do n=n?n[g]=new Array(2):r._root=new Array(2),(p=e>=(u=(c+h)/2))?c=u:h=u;while((g=+p)==(x=+(d>=u)));return n[x]=a,n[g]=o,r}function DK(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,r[o]))||(i[o]=c,c<n&&(n=c),c>a&&(a=c));if(n>a)return this;this.cover(n).cover(a);for(let o=0;o<e;++o)uN(this,i[o],r[o]);return this}function FK(r){if(isNaN(r=+r))return this;var e=this._x0,i=this._x1;if(isNaN(e))i=(e=Math.floor(r))+1;else{for(var n=i-e||1,a=this._root,o,c;e>r||r>=i;)switch(c=+(r<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:i=e+n;break;case 1:e=i-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=i,this}function $K(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function zK(r){return arguments.length?this.cover(+r[0][0]).cover(+r[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Xa(r,e,i){this.node=r,this.x0=e,this.x1=i}function qK(r,e){var i,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,p;for(u&&h.push(new Xa(u,n,c)),e==null?e=1/0:(n=r-e,c=r+e);d=h.pop();)if(!(!(u=d.node)||(a=d.x0)>c||(o=d.x1)<n))if(u.length){var g=(a+o)/2;h.push(new Xa(u[1],g,o),new Xa(u[0],a,g)),(p=+(r>=g))&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-p],h[h.length-1-p]=d)}else{var x=Math.abs(r-+this._x.call(null,u.data));x<e&&(e=x,n=r-x,c=r+x,i=u.data)}return i}function IK(r){if(isNaN(u=+this._x.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._x1,u,d,p,g,x;if(!i)return this;if(i.length)for(;;){if((p=u>=(d=(c+h)/2))?c=d:h=d,e=i,!(i=i[g=+p]))return this;if(!i.length)break;e[g+1&1]&&(n=e,x=g)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(i=e[0]||e[1])&&i===(e[1]||e[0])&&!i.length&&(n?n[x]=i:this._root=i),this):(this._root=o,this)}function PK(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function HK(){return this._root}function UK(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function WK(r){var e=[],i,n=this._root,a,o,c;for(n&&e.push(new Xa(n,this._x0,this._x1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new Xa(a,h,c)),(a=n[0])&&e.push(new Xa(a,o,h))}return this}function YK(r){var e=[],i=[],n;for(this._root&&e.push(new Xa(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new Xa(o,c,u)),(o=a[1])&&e.push(new Xa(o,u,h))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.x1);return this}function GK(r){return r[0]}function VK(r){return arguments.length?(this._x=r,this):this._x}function Mv(r,e){var i=new Lv(e??GK,NaN,NaN);return r==null?i:i.addAll(r)}function Lv(r,e,i){this._x=r,this._x0=e,this._x1=i,this._root=void 0}function HT(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Di=Mv.prototype=Lv.prototype;Di.copy=function(){var r=new Lv(this._x,this._x0,this._x1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=HT(e),r;for(i=[{source:e,target:r._root=new Array(2)}];e=i.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=HT(n));return r};Di.add=jK;Di.addAll=DK;Di.cover=FK;Di.data=$K;Di.extent=zK;Di.find=qK;Di.remove=IK;Di.removeAll=PK;Di.root=HK;Di.size=UK;Di.visit=WK;Di.visitAfter=YK;Di.x=VK;function XK(r){const e=+this._x.call(null,r),i=+this._y.call(null,r),n=+this._z.call(null,r);return fN(this.cover(e,i,n),e,i,n,r)}function fN(r,e,i,n,a){if(isNaN(e)||isNaN(i)||isNaN(n))return r;var o,c=r._root,h={data:a},u=r._x0,d=r._y0,p=r._z0,g=r._x1,x=r._y1,y=r._z1,b,_,k,w,T,B,E,O,j,M,N;if(!c)return r._root=h,r;for(;c.length;)if((E=e>=(b=(u+g)/2))?u=b:g=b,(O=i>=(_=(d+x)/2))?d=_:x=_,(j=n>=(k=(p+y)/2))?p=k:y=k,o=c,!(c=c[M=j<<2|O<<1|E]))return o[M]=h,r;if(w=+r._x.call(null,c.data),T=+r._y.call(null,c.data),B=+r._z.call(null,c.data),e===w&&i===T&&n===B)return h.next=c,o?o[M]=h:r._root=h,r;do o=o?o[M]=new Array(8):r._root=new Array(8),(E=e>=(b=(u+g)/2))?u=b:g=b,(O=i>=(_=(d+x)/2))?d=_:x=_,(j=n>=(k=(p+y)/2))?p=k:y=k;while((M=j<<2|O<<1|E)===(N=(B>=k)<<2|(T>=_)<<1|w>=b));return o[N]=c,o[M]=h,r}function QK(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,d=-1/0,p=-1/0;for(let g=0,x,y,b,_;g<e;++g)isNaN(y=+this._x.call(null,x=r[g]))||isNaN(b=+this._y.call(null,x))||isNaN(_=+this._z.call(null,x))||(i[g]=y,n[g]=b,a[g]=_,y<o&&(o=y),y>u&&(u=y),b<c&&(c=b),b>d&&(d=b),_<h&&(h=_),_>p&&(p=_));if(o>u||c>d||h>p)return this;this.cover(o,c,h).cover(u,d,p);for(let g=0;g<e;++g)fN(this,i[g],n[g],a[g],r[g]);return this}function ZK(r,e,i){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(i=+i))return this;var n=this._x0,a=this._y0,o=this._z0,c=this._x1,h=this._y1,u=this._z1;if(isNaN(n))c=(n=Math.floor(r))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(i))+1;else{for(var d=c-n||1,p=this._root,g,x;n>r||r>=c||a>e||e>=h||o>i||i>=u;)switch(x=(i<o)<<2|(e<a)<<1|r<n,g=new Array(8),g[x]=p,p=g,d*=2,x){case 0:c=n+d,h=a+d,u=o+d;break;case 1:n=c-d,h=a+d,u=o+d;break;case 2:c=n+d,a=h-d,u=o+d;break;case 3:n=c-d,a=h-d,u=o+d;break;case 4:c=n+d,h=a+d,o=u-d;break;case 5:n=c-d,h=a+d,o=u-d;break;case 6:c=n+d,a=h-d,o=u-d;break;case 7:n=c-d,a=h-d,o=u-d;break}this._root&&this._root.length&&(this._root=p)}return this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this}function KK(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function JK(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function We(r,e,i,n,a,o,c){this.node=r,this.x0=e,this.y0=i,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function tJ(r,e,i,n){var a,o=this._x0,c=this._y0,h=this._z0,u,d,p,g,x,y,b=this._x1,_=this._y1,k=this._z1,w=[],T=this._root,B,E;for(T&&w.push(new We(T,o,c,h,b,_,k)),n==null?n=1/0:(o=r-n,c=e-n,h=i-n,b=r+n,_=e+n,k=i+n,n*=n);B=w.pop();)if(!(!(T=B.node)||(u=B.x0)>b||(d=B.y0)>_||(p=B.z0)>k||(g=B.x1)<o||(x=B.y1)<c||(y=B.z1)<h))if(T.length){var O=(u+g)/2,j=(d+x)/2,M=(p+y)/2;w.push(new We(T[7],O,j,M,g,x,y),new We(T[6],u,j,M,O,x,y),new We(T[5],O,d,M,g,j,y),new We(T[4],u,d,M,O,j,y),new We(T[3],O,j,p,g,x,M),new We(T[2],u,j,p,O,x,M),new We(T[1],O,d,p,g,j,M),new We(T[0],u,d,p,O,j,M)),(E=(i>=M)<<2|(e>=j)<<1|r>=O)&&(B=w[w.length-1],w[w.length-1]=w[w.length-1-E],w[w.length-1-E]=B)}else{var N=r-+this._x.call(null,T.data),Y=e-+this._y.call(null,T.data),$=i-+this._z.call(null,T.data),z=N*N+Y*Y+$*$;if(z<n){var K=Math.sqrt(n=z);o=r-K,c=e-K,h=i-K,b=r+K,_=e+K,k=i+K,a=T.data}}return a}const eJ=(r,e,i,n,a,o)=>Math.sqrt((r-n)**2+(e-a)**2+(i-o)**2);function rJ(r,e,i,n){const a=[],o=r-n,c=e-n,h=i-n,u=r+n,d=e+n,p=i+n;return this.visit((g,x,y,b,_,k,w)=>{if(!g.length)do{const T=g.data;eJ(r,e,i,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return x>u||y>d||b>p||_<o||k<c||w<h}),a}function iJ(r){if(isNaN(x=+this._x.call(null,r))||isNaN(y=+this._y.call(null,r))||isNaN(b=+this._z.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,d=this._x1,p=this._y1,g=this._z1,x,y,b,_,k,w,T,B,E,O,j;if(!i)return this;if(i.length)for(;;){if((T=x>=(_=(c+d)/2))?c=_:d=_,(B=y>=(k=(h+p)/2))?h=k:p=k,(E=b>=(w=(u+g)/2))?u=w:g=w,e=i,!(i=i[O=E<<2|B<<1|T]))return this;if(!i.length)break;(e[O+1&7]||e[O+2&7]||e[O+3&7]||e[O+4&7]||e[O+5&7]||e[O+6&7]||e[O+7&7])&&(n=e,j=O)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[O]=o:delete e[O],(i=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&i===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[j]=i:this._root=i),this):(this._root=o,this)}function nJ(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function aJ(){return this._root}function sJ(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function oJ(r){var e=[],i,n=this._root,a,o,c,h,u,d,p;for(n&&e.push(new We(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.z0,u=i.x1,d=i.y1,p=i.z1)&&n.length){var g=(o+u)/2,x=(c+d)/2,y=(h+p)/2;(a=n[7])&&e.push(new We(a,g,x,y,u,d,p)),(a=n[6])&&e.push(new We(a,o,x,y,g,d,p)),(a=n[5])&&e.push(new We(a,g,c,y,u,x,p)),(a=n[4])&&e.push(new We(a,o,c,y,g,x,p)),(a=n[3])&&e.push(new We(a,g,x,h,u,d,y)),(a=n[2])&&e.push(new We(a,o,x,h,g,d,y)),(a=n[1])&&e.push(new We(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new We(a,o,c,h,g,x,y))}return this}function lJ(r){var e=[],i=[],n;for(this._root&&e.push(new We(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.z0,d=n.x1,p=n.y1,g=n.z1,x=(c+d)/2,y=(h+p)/2,b=(u+g)/2;(o=a[0])&&e.push(new We(o,c,h,u,x,y,b)),(o=a[1])&&e.push(new We(o,x,h,u,d,y,b)),(o=a[2])&&e.push(new We(o,c,y,u,x,p,b)),(o=a[3])&&e.push(new We(o,x,y,u,d,p,b)),(o=a[4])&&e.push(new We(o,c,h,b,x,y,g)),(o=a[5])&&e.push(new We(o,x,h,b,d,y,g)),(o=a[6])&&e.push(new We(o,c,y,b,x,p,g)),(o=a[7])&&e.push(new We(o,x,y,b,d,p,g))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function cJ(r){return r[0]}function hJ(r){return arguments.length?(this._x=r,this):this._x}function uJ(r){return r[1]}function fJ(r){return arguments.length?(this._y=r,this):this._y}function dJ(r){return r[2]}function pJ(r){return arguments.length?(this._z=r,this):this._z}function Ov(r,e,i,n){var a=new Nv(e??cJ,i??uJ,n??dJ,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?a:a.addAll(r)}function Nv(r,e,i,n,a,o,c,h,u){this._x=r,this._y=e,this._z=i,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function UT(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Vr=Ov.prototype=Nv.prototype;Vr.copy=function(){var r=new Nv(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=UT(e),r;for(i=[{source:e,target:r._root=new Array(8)}];e=i.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=UT(n));return r};Vr.add=XK;Vr.addAll=QK;Vr.cover=ZK;Vr.data=KK;Vr.extent=JK;Vr.find=tJ;Vr.findAllWithinRadius=rJ;Vr.remove=iJ;Vr.removeAll=nJ;Vr.root=aJ;Vr.size=sJ;Vr.visit=oJ;Vr.visitAfter=lJ;Vr.x=hJ;Vr.y=fJ;Vr.z=pJ;function Nr(r){return function(){return r}}function dn(r){return(r()-.5)*1e-6}function ax(r){return r.x+r.vx}function WT(r){return r.y+r.vy}function gJ(r){return r.z+r.vz}function mJ(r){var e,i,n,a,o=1,c=1;typeof r!="function"&&(r=Nr(r==null?1:+r));function h(){for(var p,g=e.length,x,y,b,_,k,w,T,B=0;B<c;++B)for(x=(i===1?Mv(e,ax):i===2?R1(e,ax,WT):i===3?Ov(e,ax,WT,gJ):null).visitAfter(u),p=0;p<g;++p)y=e[p],w=n[y.index],T=w*w,b=y.x+y.vx,i>1&&(_=y.y+y.vy),i>2&&(k=y.z+y.vz),x.visit(E);function E(O,j,M,N,Y,$,z){var K=[j,M,N,Y,$,z],W=K[0],F=K[1],U=K[2],R=K[i],I=K[i+1],H=K[i+2],G=O.data,Z=O.r,P=w+Z;if(G){if(G.index>y.index){var J=b-G.x-G.vx,nt=i>1?_-G.y-G.vy:0,ut=i>2?k-G.z-G.vz:0,gt=J*J+nt*nt+ut*ut;gt<P*P&&(J===0&&(J=dn(a),gt+=J*J),i>1&&nt===0&&(nt=dn(a),gt+=nt*nt),i>2&&ut===0&&(ut=dn(a),gt+=ut*ut),gt=(P-(gt=Math.sqrt(gt)))/gt*o,y.vx+=(J*=gt)*(P=(Z*=Z)/(T+Z)),i>1&&(y.vy+=(nt*=gt)*P),i>2&&(y.vz+=(ut*=gt)*P),G.vx-=J*(P=1-P),i>1&&(G.vy-=nt*P),i>2&&(G.vz-=ut*P))}return}return W>b+P||R<b-P||i>1&&(F>_+P||I<_-P)||i>2&&(U>k+P||H<k-P)}}function u(p){if(p.data)return p.r=n[p.data.index];for(var g=p.r=0;g<Math.pow(2,i);++g)p[g]&&p[g].r>p.r&&(p.r=p[g].r)}function d(){if(e){var p,g=e.length,x;for(n=new Array(g),p=0;p<g;++p)x=e[p],n[x.index]=+r(x,p,e)}}return h.initialize=function(p,...g){e=p,a=g.find(x=>typeof x=="function")||Math.random,i=g.find(x=>[1,2,3].includes(x))||2,d()},h.iterations=function(p){return arguments.length?(c=+p,h):c},h.strength=function(p){return arguments.length?(o=+p,h):o},h.radius=function(p){return arguments.length?(r=typeof p=="function"?p:Nr(+p),d(),h):r},h}function yJ(r){return r.index}function YT(r,e){var i=r.get(e);if(!i)throw new Error("node not found: "+e);return i}function xJ(r){var e=yJ,i=x,n,a=Nr(30),o,c,h,u,d,p,g=1;r==null&&(r=[]);function x(w){return 1/Math.min(u[w.source.index],u[w.target.index])}function y(w){for(var T=0,B=r.length;T<g;++T)for(var E=0,O,j,M,N=0,Y=0,$=0,z,K;E<B;++E)O=r[E],j=O.source,M=O.target,N=M.x+M.vx-j.x-j.vx||dn(p),h>1&&(Y=M.y+M.vy-j.y-j.vy||dn(p)),h>2&&($=M.z+M.vz-j.z-j.vz||dn(p)),z=Math.sqrt(N*N+Y*Y+$*$),z=(z-o[E])/z*w*n[E],N*=z,Y*=z,$*=z,M.vx-=N*(K=d[E]),h>1&&(M.vy-=Y*K),h>2&&(M.vz-=$*K),j.vx+=N*(K=1-K),h>1&&(j.vy+=Y*K),h>2&&(j.vz+=$*K)}function b(){if(c){var w,T=c.length,B=r.length,E=new Map(c.map((j,M)=>[e(j,M,c),j])),O;for(w=0,u=new Array(T);w<B;++w)O=r[w],O.index=w,typeof O.source!="object"&&(O.source=YT(E,O.source)),typeof O.target!="object"&&(O.target=YT(E,O.target)),u[O.source.index]=(u[O.source.index]||0)+1,u[O.target.index]=(u[O.target.index]||0)+1;for(w=0,d=new Array(B);w<B;++w)O=r[w],d[w]=u[O.source.index]/(u[O.source.index]+u[O.target.index]);n=new Array(B),_(),o=new Array(B),k()}}function _(){if(c)for(var w=0,T=r.length;w<T;++w)n[w]=+i(r[w],w,r)}function k(){if(c)for(var w=0,T=r.length;w<T;++w)o[w]=+a(r[w],w,r)}return y.initialize=function(w,...T){c=w,p=T.find(B=>typeof B=="function")||Math.random,h=T.find(B=>[1,2,3].includes(B))||2,b()},y.links=function(w){return arguments.length?(r=w,b(),y):r},y.id=function(w){return arguments.length?(e=w,y):e},y.iterations=function(w){return arguments.length?(g=+w,y):g},y.strength=function(w){return arguments.length?(i=typeof w=="function"?w:Nr(+w),_(),y):i},y.distance=function(w){return arguments.length?(a=typeof w=="function"?w:Nr(+w),k(),y):a},y}const bJ=1664525,vJ=1013904223,GT=4294967296;function CJ(){let r=1;return()=>(r=(bJ*r+vJ)%GT)/GT}var VT=3;function sx(r){return r.x}function XT(r){return r.y}function _J(r){return r.z}var kJ=10,SJ=Math.PI*(3-Math.sqrt(5)),wJ=Math.PI*20/(9+Math.sqrt(221));function TJ(r,e){e=e||2;var i=Math.min(VT,Math.max(1,Math.round(e))),n,a=1,o=.001,c=1-Math.pow(o,1/300),h=0,u=.6,d=new Map,p=L1(y),g=wf("tick","end"),x=CJ();r==null&&(r=[]);function y(){b(),g.call("tick",n),a<o&&(p.stop(),g.call("end",n))}function b(w){var T,B=r.length,E;w===void 0&&(w=1);for(var O=0;O<w;++O)for(a+=(h-a)*c,d.forEach(function(j){j(a)}),T=0;T<B;++T)E=r[T],E.fx==null?E.x+=E.vx*=u:(E.x=E.fx,E.vx=0),i>1&&(E.fy==null?E.y+=E.vy*=u:(E.y=E.fy,E.vy=0)),i>2&&(E.fz==null?E.z+=E.vz*=u:(E.z=E.fz,E.vz=0));return n}function _(){for(var w=0,T=r.length,B;w<T;++w){if(B=r[w],B.index=w,B.fx!=null&&(B.x=B.fx),B.fy!=null&&(B.y=B.fy),B.fz!=null&&(B.z=B.fz),isNaN(B.x)||i>1&&isNaN(B.y)||i>2&&isNaN(B.z)){var E=kJ*(i>2?Math.cbrt(.5+w):i>1?Math.sqrt(.5+w):w),O=w*SJ,j=w*wJ;i===1?B.x=E:i===2?(B.x=E*Math.cos(O),B.y=E*Math.sin(O)):(B.x=E*Math.sin(O)*Math.cos(j),B.y=E*Math.cos(O),B.z=E*Math.sin(O)*Math.sin(j))}(isNaN(B.vx)||i>1&&isNaN(B.vy)||i>2&&isNaN(B.vz))&&(B.vx=0,i>1&&(B.vy=0),i>2&&(B.vz=0))}}function k(w){return w.initialize&&w.initialize(r,x,i),w}return _(),n={tick:b,restart:function(){return p.restart(y),n},stop:function(){return p.stop(),n},numDimensions:function(w){return arguments.length?(i=Math.min(VT,Math.max(1,Math.round(w))),d.forEach(k),n):i},nodes:function(w){return arguments.length?(r=w,_(),d.forEach(k),n):r},alpha:function(w){return arguments.length?(a=+w,n):a},alphaMin:function(w){return arguments.length?(o=+w,n):o},alphaDecay:function(w){return arguments.length?(c=+w,n):+c},alphaTarget:function(w){return arguments.length?(h=+w,n):h},velocityDecay:function(w){return arguments.length?(u=1-w,n):1-u},randomSource:function(w){return arguments.length?(x=w,d.forEach(k),n):x},force:function(w,T){return arguments.length>1?(T==null?d.delete(w):d.set(w,k(T)),n):d.get(w)},find:function(){var w=Array.prototype.slice.call(arguments),T=w.shift()||0,B=(i>1?w.shift():null)||0,E=(i>2?w.shift():null)||0,O=w.shift()||1/0,j=0,M=r.length,N,Y,$,z,K,W;for(O*=O,j=0;j<M;++j)K=r[j],N=T-K.x,Y=B-(K.y||0),$=E-(K.z||0),z=N*N+Y*Y+$*$,z<O&&(W=K,O=z);return W},on:function(w,T){return arguments.length>1?(g.on(w,T),n):g.on(w)}}}function BJ(){var r,e,i,n,a,o=Nr(-30),c,h=1,u=1/0,d=.81;function p(b){var _,k=r.length,w=(e===1?Mv(r,sx):e===2?R1(r,sx,XT):e===3?Ov(r,sx,XT,_J):null).visitAfter(x);for(a=b,_=0;_<k;++_)i=r[_],w.visit(y)}function g(){if(r){var b,_=r.length,k;for(c=new Array(_),b=0;b<_;++b)k=r[b],c[k.index]=+o(k,b,r)}}function x(b){var _=0,k,w,T=0,B,E,O,j,M=b.length;if(M){for(B=E=O=j=0;j<M;++j)(k=b[j])&&(w=Math.abs(k.value))&&(_+=k.value,T+=w,B+=w*(k.x||0),E+=w*(k.y||0),O+=w*(k.z||0));_*=Math.sqrt(4/M),b.x=B/T,e>1&&(b.y=E/T),e>2&&(b.z=O/T)}else{k=b,k.x=k.data.x,e>1&&(k.y=k.data.y),e>2&&(k.z=k.data.z);do _+=c[k.data.index];while(k=k.next)}b.value=_}function y(b,_,k,w,T){if(!b.value)return!0;var B=[k,w,T][e-1],E=b.x-i.x,O=e>1?b.y-i.y:0,j=e>2?b.z-i.z:0,M=B-_,N=E*E+O*O+j*j;if(M*M/d<N)return N<u&&(E===0&&(E=dn(n),N+=E*E),e>1&&O===0&&(O=dn(n),N+=O*O),e>2&&j===0&&(j=dn(n),N+=j*j),N<h&&(N=Math.sqrt(h*N)),i.vx+=E*b.value*a/N,e>1&&(i.vy+=O*b.value*a/N),e>2&&(i.vz+=j*b.value*a/N)),!0;if(b.length||N>=u)return;(b.data!==i||b.next)&&(E===0&&(E=dn(n),N+=E*E),e>1&&O===0&&(O=dn(n),N+=O*O),e>2&&j===0&&(j=dn(n),N+=j*j),N<h&&(N=Math.sqrt(h*N)));do b.data!==i&&(M=c[b.data.index]*a/N,i.vx+=E*M,e>1&&(i.vy+=O*M),e>2&&(i.vz+=j*M));while(b=b.next)}return p.initialize=function(b,..._){r=b,n=_.find(k=>typeof k=="function")||Math.random,e=_.find(k=>[1,2,3].includes(k))||2,g()},p.strength=function(b){return arguments.length?(o=typeof b=="function"?b:Nr(+b),g(),p):o},p.distanceMin=function(b){return arguments.length?(h=b*b,p):Math.sqrt(h)},p.distanceMax=function(b){return arguments.length?(u=b*b,p):Math.sqrt(u)},p.theta=function(b){return arguments.length?(d=b*b,p):Math.sqrt(d)},p}function AJ(r,e,i,n){var a,o,c=Nr(.1),h,u;typeof r!="function"&&(r=Nr(+r)),e==null&&(e=0),i==null&&(i=0),n==null&&(n=0);function d(g){for(var x=0,y=a.length;x<y;++x){var b=a[x],_=b.x-e||1e-6,k=(b.y||0)-i||1e-6,w=(b.z||0)-n||1e-6,T=Math.sqrt(_*_+k*k+w*w),B=(u[x]-T)*h[x]*g/T;b.vx+=_*B,o>1&&(b.vy+=k*B),o>2&&(b.vz+=w*B)}}function p(){if(a){var g,x=a.length;for(h=new Array(x),u=new Array(x),g=0;g<x;++g)u[g]=+r(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return d.initialize=function(g,...x){a=g,o=x.find(y=>[1,2,3].includes(y))||2,p()},d.strength=function(g){return arguments.length?(c=typeof g=="function"?g:Nr(+g),p(),d):c},d.radius=function(g){return arguments.length?(r=typeof g=="function"?g:Nr(+g),p(),d):r},d.x=function(g){return arguments.length?(e=+g,d):e},d.y=function(g){return arguments.length?(i=+g,d):i},d.z=function(g){return arguments.length?(n=+g,d):n},d}function EJ(r){var e=Nr(.1),i,n,a;typeof r!="function"&&(r=Nr(r==null?0:+r));function o(h){for(var u=0,d=i.length,p;u<d;++u)p=i[u],p.vx+=(a[u]-p.x)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Nr(+h),c(),o):e},o.x=function(h){return arguments.length?(r=typeof h=="function"?h:Nr(+h),c(),o):r},o}function MJ(r){var e=Nr(.1),i,n,a;typeof r!="function"&&(r=Nr(r==null?0:+r));function o(h){for(var u=0,d=i.length,p;u<d;++u)p=i[u],p.vy+=(a[u]-p.y)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Nr(+h),c(),o):e},o.y=function(h){return arguments.length?(r=typeof h=="function"?h:Nr(+h),c(),o):r},o}const{abs:bu,cos:Da,sin:cc,acos:LJ,atan2:vu,sqrt:Fs,pow:hn}=Math;function Cu(r){return r<0?-hn(-r,1/3):hn(r,1/3)}const dN=Math.PI,mp=2*dN,$s=dN/2,OJ=1e-6,ox=Number.MAX_SAFE_INTEGER||9007199254740991,lx=Number.MIN_SAFE_INTEGER||-9007199254740991,NJ={x:0,y:0,z:0},Tt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(r,e){const i=e(r);let n=i.x*i.x+i.y*i.y;return typeof i.z<"u"&&(n+=i.z*i.z),Fs(n)},compute:function(r,e,i){if(r===0)return e[0].t=0,e[0];const n=e.length-1;if(r===1)return e[n].t=1,e[n];const a=1-r;let o=e;if(n===0)return e[0].t=r,e[0];if(n===1){const h={x:a*o[0].x+r*o[1].x,y:a*o[0].y+r*o[1].y,t:r};return i&&(h.z=a*o[0].z+r*o[1].z),h}if(n<4){let h=a*a,u=r*r,d,p,g,x=0;n===2?(o=[o[0],o[1],o[2],NJ],d=h,p=a*r*2,g=u):n===3&&(d=h*a,p=h*r*3,g=a*u*3,x=r*u);const y={x:d*o[0].x+p*o[1].x+g*o[2].x+x*o[3].x,y:d*o[0].y+p*o[1].y+g*o[2].y+x*o[3].y,t:r};return i&&(y.z=d*o[0].z+p*o[1].z+g*o[2].z+x*o[3].z),y}const c=JSON.parse(JSON.stringify(e));for(;c.length>1;){for(let h=0;h<c.length-1;h++)c[h]={x:c[h].x+(c[h+1].x-c[h].x)*r,y:c[h].y+(c[h+1].y-c[h].y)*r},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*r);c.splice(c.length-1,1)}return c[0].t=r,c[0]},computeWithRatios:function(r,e,i,n){const a=1-r,o=i,c=e;let h=o[0],u=o[1],d=o[2],p=o[3],g;if(h*=a,u*=r,c.length===2)return g=h+u,{x:(h*c[0].x+u*c[1].x)/g,y:(h*c[0].y+u*c[1].y)/g,z:n?(h*c[0].z+u*c[1].z)/g:!1,t:r};if(h*=a,u*=2*a,d*=r*r,c.length===3)return g=h+u+d,{x:(h*c[0].x+u*c[1].x+d*c[2].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z)/g:!1,t:r};if(h*=a,u*=1.5*a,d*=3*a,p*=r*r*r,c.length===4)return g=h+u+d+p,{x:(h*c[0].x+u*c[1].x+d*c[2].x+p*c[3].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y+p*c[3].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z+p*c[3].z)/g:!1,t:r}},derive:function(r,e){const i=[];for(let n=r,a=n.length,o=a-1;a>1;a--,o--){const c=[];for(let h=0,u;h<o;h++)u={x:o*(n[h+1].x-n[h].x),y:o*(n[h+1].y-n[h].y)},e&&(u.z=o*(n[h+1].z-n[h].z)),c.push(u);i.push(c),n=c}return i},between:function(r,e,i){return e<=r&&r<=i||Tt.approximately(r,e)||Tt.approximately(r,i)},approximately:function(r,e,i){return bu(r-e)<=(i||OJ)},length:function(r){const i=Tt.Tvalues.length;let n=0;for(let a=0,o;a<i;a++)o=.5*Tt.Tvalues[a]+.5,n+=Tt.Cvalues[a]*Tt.arcfn(o,r);return .5*n},map:function(r,e,i,n,a){const o=i-e,c=a-n,h=r-e,u=h/o;return n+c*u},lerp:function(r,e,i){const n={x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)};return e.z!==void 0&&i.z!==void 0&&(n.z=e.z+r*(i.z-e.z)),n},pointToString:function(r){let e=r.x+"/"+r.y;return typeof r.z<"u"&&(e+="/"+r.z),e},pointsToString:function(r){return"["+r.map(Tt.pointToString).join(", ")+"]"},copy:function(r){return JSON.parse(JSON.stringify(r))},angle:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-r.x,c=i.y-r.y,h=n*c-a*o,u=n*o+a*c;return vu(h,u)},round:function(r,e){const i=""+r,n=i.indexOf(".");return parseFloat(i.substring(0,n+1+e))},dist:function(r,e){const i=r.x-e.x,n=r.y-e.y;return Fs(i*i+n*n)},closest:function(r,e){let i=hn(2,63),n,a;return r.forEach(function(o,c){a=Tt.dist(e,o),a<i&&(i=a,n=c)}),{mdist:i,mpos:n}},abcratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=hn(r,e)+hn(1-r,e),n=i-1;return bu(n/i)},projectionratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=hn(1-r,e),n=hn(r,e)+i;return i/n},lli8:function(r,e,i,n,a,o,c,h){const u=(r*n-e*i)*(a-c)-(r-i)*(a*h-o*c),d=(r*n-e*i)*(o-h)-(e-n)*(a*h-o*c),p=(r-i)*(o-h)-(e-n)*(a-c);return p==0?!1:{x:u/p,y:d/p}},lli4:function(r,e,i,n){const a=r.x,o=r.y,c=e.x,h=e.y,u=i.x,d=i.y,p=n.x,g=n.y;return Tt.lli8(a,o,c,h,u,d,p,g)},lli:function(r,e){return Tt.lli4(r,r.c,e,e.c)},makeline:function(r,e){return new Ve(r.x,r.y,(r.x+e.x)/2,(r.y+e.y)/2,e.x,e.y)},findbbox:function(r){let e=ox,i=ox,n=lx,a=lx;return r.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),i>c.y.min&&(i=c.y.min),n<c.x.max&&(n=c.x.max),a<c.y.max&&(a=c.y.max)}),{x:{min:e,mid:(e+n)/2,max:n,size:n-e},y:{min:i,mid:(i+a)/2,max:a,size:a-i}}},shapeintersections:function(r,e,i,n,a){if(!Tt.bboxoverlap(e,n))return[];const o=[],c=[r.startcap,r.forward,r.back,r.endcap],h=[i.startcap,i.forward,i.back,i.endcap];return c.forEach(function(u){u.virtual||h.forEach(function(d){if(d.virtual)return;const p=u.intersects(d,a);p.length>0&&(p.c1=u,p.c2=d,p.s1=r,p.s2=i,o.push(p))})}),o},makeshape:function(r,e,i){const n=e.points.length,a=r.points.length,o=Tt.makeline(e.points[n-1],r.points[0]),c=Tt.makeline(r.points[a-1],e.points[0]),h={startcap:o,forward:r,back:e,endcap:c,bbox:Tt.findbbox([o,r,e,c])};return h.intersections=function(u){return Tt.shapeintersections(h,h.bbox,u,u.bbox,i)},h},getminmax:function(r,e,i){if(!i)return{min:0,max:0};let n=ox,a=lx,o,c;i.indexOf(0)===-1&&(i=[0].concat(i)),i.indexOf(1)===-1&&i.push(1);for(let h=0,u=i.length;h<u;h++)o=i[h],c=r.get(o),c[e]<n&&(n=c[e]),c[e]>a&&(a=c[e]);return{min:n,mid:(n+a)/2,max:a,size:a-n}},align:function(r,e){const i=e.p1.x,n=e.p1.y,a=-vu(e.p2.y-n,e.p2.x-i),o=function(c){return{x:(c.x-i)*Da(a)-(c.y-n)*cc(a),y:(c.x-i)*cc(a)+(c.y-n)*Da(a)}};return r.map(o)},roots:function(r,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const i=r.length-1,n=Tt.align(r,e),a=function(M){return 0<=M&&M<=1};if(i===2){const M=n[0].y,N=n[1].y,Y=n[2].y,$=M-2*N+Y;if($!==0){const z=-Fs(N*N-M*Y),K=-M+N,W=-(z+K)/$,F=-(-z+K)/$;return[W,F].filter(a)}else if(N!==Y&&$===0)return[(2*N-Y)/(2*N-2*Y)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let d=-o+3*c-3*h+u,p=3*o-6*c+3*h,g=-3*o+3*c,x=o;if(Tt.approximately(d,0)){if(Tt.approximately(p,0))return Tt.approximately(g,0)?[]:[-x/g].filter(a);const M=Fs(g*g-4*p*x),N=2*p;return[(M-g)/N,(-g-M)/N].filter(a)}p/=d,g/=d,x/=d;const y=(3*g-p*p)/3,b=y/3,_=(2*p*p*p-9*p*g+27*x)/27,k=_/2,w=k*k+b*b*b;let T,B,E,O,j;if(w<0){const M=-y/3,N=M*M*M,Y=Fs(N),$=-_/(2*Y),z=$<-1?-1:$>1?1:$,K=LJ(z),W=Cu(Y),F=2*W;return E=F*Da(K/3)-p/3,O=F*Da((K+mp)/3)-p/3,j=F*Da((K+2*mp)/3)-p/3,[E,O,j].filter(a)}else{if(w===0)return T=k<0?Cu(-k):-Cu(k),E=2*T-p/3,O=-T-p/3,[E,O].filter(a);{const M=Fs(w);return T=Cu(-k+M),B=Cu(k+M),[T-B-p/3].filter(a)}}},droots:function(r){if(r.length===3){const e=r[0],i=r[1],n=r[2],a=e-2*i+n;if(a!==0){const o=-Fs(i*i-e*n),c=-e+i,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(i!==n&&a===0)return[(2*i-n)/(2*(i-n))];return[]}if(r.length===2){const e=r[0],i=r[1];return e!==i?[e/(e-i)]:[]}return[]},curvature:function(r,e,i,n,a){let o,c,h,u,d=0,p=0;const g=Tt.compute(r,e),x=Tt.compute(r,i),y=g.x*g.x+g.y*g.y;if(n?(o=Fs(hn(g.y*x.z-x.y*g.z,2)+hn(g.z*x.x-x.z*g.x,2)+hn(g.x*x.y-x.x*g.y,2)),c=hn(y+g.z*g.z,3/2)):(o=g.x*x.y-g.y*x.x,c=hn(y,3/2)),o===0||c===0)return{k:0,r:0};if(d=o/c,p=c/o,!a){const b=Tt.curvature(r-.001,e,i,n,!0).k,_=Tt.curvature(r+.001,e,i,n,!0).k;u=(_-d+(d-b))/2,h=(bu(_-d)+bu(d-b))/2}return{k:d,r:p,dk:u,adk:h}},inflections:function(r){if(r.length<4)return[];const e=Tt.align(r,{p1:r[0],p2:r.slice(-1)[0]}),i=e[2].x*e[1].y,n=e[3].x*e[1].y,a=e[1].x*e[2].y,o=e[3].x*e[2].y,c=18*(-3*i+2*n+3*a-o),h=18*(3*i-n-3*a),u=18*(a-i);if(Tt.approximately(c,0)){if(!Tt.approximately(h,0)){let x=-u/h;if(0<=x&&x<=1)return[x]}return[]}const d=2*c;if(Tt.approximately(d,0))return[];const p=h*h-4*c*u;if(p<0)return[];const g=Math.sqrt(p);return[(g-h)/d,-(h+g)/d].filter(function(x){return 0<=x&&x<=1})},bboxoverlap:function(r,e){const i=["x","y"],n=i.length;for(let a=0,o,c,h,u;a<n;a++)if(o=i[a],c=r[o].mid,h=e[o].mid,u=(r[o].size+e[o].size)/2,bu(c-h)>=u)return!1;return!0},expandbox:function(r,e){e.x.min<r.x.min&&(r.x.min=e.x.min),e.y.min<r.y.min&&(r.y.min=e.y.min),e.z&&e.z.min<r.z.min&&(r.z.min=e.z.min),e.x.max>r.x.max&&(r.x.max=e.x.max),e.y.max>r.y.max&&(r.y.max=e.y.max),e.z&&e.z.max>r.z.max&&(r.z.max=e.z.max),r.x.mid=(r.x.min+r.x.max)/2,r.y.mid=(r.y.min+r.y.max)/2,r.z&&(r.z.mid=(r.z.min+r.z.max)/2),r.x.size=r.x.max-r.x.min,r.y.size=r.y.max-r.y.min,r.z&&(r.z.size=r.z.max-r.z.min)},pairiteration:function(r,e,i){const n=r.bbox(),a=e.bbox(),o=1e5,c=i||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(r._t1+r._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=r.split(.5),u=e.split(.5),d=[{left:h.left,right:u.left},{left:h.left,right:u.right},{left:h.right,right:u.right},{left:h.right,right:u.left}];d=d.filter(function(g){return Tt.bboxoverlap(g.left.bbox(),g.right.bbox())});let p=[];return d.length===0||(d.forEach(function(g){p=p.concat(Tt.pairiteration(g.left,g.right,c))}),p=p.filter(function(g,x){return p.indexOf(g)===x})),p},getccenter:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-e.x,c=i.y-e.y,h=n*Da($s)-a*cc($s),u=n*cc($s)+a*Da($s),d=o*Da($s)-c*cc($s),p=o*cc($s)+c*Da($s),g=(r.x+e.x)/2,x=(r.y+e.y)/2,y=(e.x+i.x)/2,b=(e.y+i.y)/2,_=g+h,k=x+u,w=y+d,T=b+p,B=Tt.lli8(g,x,_,k,y,b,w,T),E=Tt.dist(B,r);let O=vu(r.y-B.y,r.x-B.x),j=vu(e.y-B.y,e.x-B.x),M=vu(i.y-B.y,i.x-B.x),N;return O<M?((O>j||j>M)&&(O+=mp),O>M&&(N=M,M=O,O=N)):M<j&&j<O?(N=M,M=O,O=N):M+=mp,B.s=O,B.e=M,B.r=E,B},numberSort:function(r,e){return r-e}};class Qu{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return Tt.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,i){return e+i})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var i=e[0].bbox(),n=1;n<e.length;n++)Tt.expandbox(i,e[n].bbox());return i}offset(e){const i=[];return this.curves.forEach(function(n){i.push(...n.offset(e))}),new Qu(i)}}const{abs:_u,min:QT,max:ZT,cos:RJ,sin:jJ,acos:DJ,sqrt:ku}=Math,FJ=Math.PI;class Ve{constructor(e){let i=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof i[0]=="object"){n=i.length;const y=[];i.forEach(function(b){["x","y","z"].forEach(function(_){typeof b[_]<"u"&&y.push(b[_])})}),i=y}let a=!1;const o=i.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let y=0,b=c?3:2;y<o;y+=b){var u={x:i[y],y:i[y+1]};c&&(u.z=i[y+2]),h.push(u)}const d=this.order=h.length-1,p=this.dims=["x","y"];c&&p.push("z"),this.dimlen=p.length;const g=Tt.align(h,{p1:h[0],p2:h[d]}),x=Tt.dist(h[0],h[d]);this._linear=g.reduce((y,b)=>y+_u(b.y),0)<x/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,i,n,a){if(typeof a>"u"&&(a=.5),a===0)return new Ve(i,i,n);if(a===1)return new Ve(e,i,i);const o=Ve.getABC(2,e,i,n,a);return new Ve(e,o.A,n)}static cubicFromPoints(e,i,n,a,o){typeof a>"u"&&(a=.5);const c=Ve.getABC(3,e,i,n,a);typeof o>"u"&&(o=Tt.dist(i,c.C));const h=o*(1-a)/a,u=Tt.dist(e,n),d=(n.x-e.x)/u,p=(n.y-e.y)/u,g=o*d,x=o*p,y=h*d,b=h*p,_={x:i.x-g,y:i.y-x},k={x:i.x+y,y:i.y+b},w=c.A,T={x:w.x+(_.x-w.x)/(1-a),y:w.y+(_.y-w.y)/(1-a)},B={x:w.x+(k.x-w.x)/a,y:w.y+(k.y-w.y)/a},E={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},O={x:n.x+(B.x-n.x)/(1-a),y:n.y+(B.y-n.y)/(1-a)};return new Ve(e,E,O,n)}static getUtils(){return Tt}getUtils(){return Ve.getUtils()}static get PolyBezier(){return Qu}valueOf(){return this.toString()}toString(){return Tt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,i=e[0].x,n=e[0].y,a=["M",i,n,this.order===2?"Q":"C"];for(let o=1,c=e.length;o<c;o++)a.push(e[o].x),a.push(e[o].y);return a.join(" ")}setRatios(e){if(e.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){const e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,i){return""+i+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=Tt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,i=Tt.angle(e[0],e[this.order],e[1]);this.clockwise=i>0}length(){return Tt.length(this.derivative.bind(this))}static getABC(e=2,i,n,a,o=.5){const c=Tt.projectionratio(o,e),h=1-c,u={x:c*i.x+h*a.x,y:c*i.y+h*a.y},d=Tt.abcratio(o,e);return{A:{x:n.x+(n.x-u.x)/d,y:n.y+(n.y-u.y)/d},B:n,C:u,S:i,E:a}}getABC(e,i){i=i||this.get(e);let n=this.points[0],a=this.points[this.order];return Ve.getABC(this.order,n,i,a,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let i=0,n,a;i<e;i++)a=i/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,i){i=i||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],Tt.dist(c,e)<i&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const i=this.getLUT(),n=i.length-1,a=Tt.closest(i,e),o=a.mpos,c=(o-1)/n,h=(o+1)/n,u=.1/n;let d=a.mdist,p=c,g=p,x;d+=1;for(let y;p<h+u;p+=u)x=this.compute(p),y=Tt.dist(e,x),y<d&&(d=y,g=p);return g=g<0?0:g>1?1:g,x=this.compute(g),x.t=g,x.d=d,x}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Tt.computeWithRatios(e,this.points,this.ratios,this._3d):Tt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,i=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],i[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return i[n]=e[n-1],new Ve(i)}derivative(e){return Tt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Tt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new Ve(Tt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Tt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Tt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const i=this.derivative(e),n=ku(i.x*i.x+i.y*i.y);return{t:e,x:-i.y/n,y:i.x/n}}__normal3(e){const i=this.derivative(e),n=this.derivative(e+.01),a=ku(i.x*i.x+i.y*i.y+i.z*i.z),o=ku(n.x*n.x+n.y*n.y+n.z*n.z);i.x/=a,i.y/=a,i.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*i.z-n.z*i.y,y:n.z*i.x-n.x*i.z,z:n.x*i.y-n.y*i.x},h=ku(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*i.x+u[1]*i.y+u[2]*i.z,y:u[3]*i.x+u[4]*i.y+u[5]*i.z,z:u[6]*i.x+u[7]*i.y+u[8]*i.z}}hull(e){let i=this.points,n=[],a=[],o=0;for(a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],this.order===3&&(a[o++]=i[3]);i.length>1;){n=[];for(let c=0,h,u=i.length-1;c<u;c++)h=Tt.lerp(e,i[c],i[c+1]),a[o++]=h,n.push(h);i=n}return a}split(e,i){if(e===0&&i)return this.split(i).left;if(i===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new Ve([n[0],n[3],n[5]]):new Ve([n[0],n[4],n[7],n[9]]),right:this.order===2?new Ve([n[5],n[4],n[2]]):new Ve([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Tt.map(0,0,1,this._t1,this._t2),a.left._t2=Tt.map(e,0,1,this._t1,this._t2),a.right._t1=Tt.map(e,0,1,this._t1,this._t2),a.right._t2=Tt.map(1,0,1,this._t1,this._t2),i?(i=Tt.map(i,e,1,0,1),a.right.split(i).left):a}extrema(){const e={};let i=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=Tt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Tt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),i=i.concat(e[n].sort(Tt.numberSort))}).bind(this)),e.values=i.sort(Tt.numberSort).filter(function(n,a){return i.indexOf(n)===a}),e}bbox(){const e=this.extrema(),i={};return this.dims.forEach((function(n){i[n]=Tt.getminmax(this,n,e[n])}).bind(this)),i}overlaps(e){const i=this.bbox(),n=e.bbox();return Tt.bboxoverlap(i,n)}offset(e,i){if(typeof i<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*i,y:n.y+a.y*i};return this._3d&&(o.z=n.z+a.z*i),o}if(this._linear){const n=this.normal(0),a=this.points.map(function(o){const c={x:o.x+e*n.x,y:o.y+e*n.y};return o.z&&n.z&&(c.z=o.z+e*n.z),c});return[new Ve(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Tt.angle(this.points[0],this.points[3],this.points[1]),o=Tt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const e=this.normal(0),i=this.normal(1);let n=e.x*i.x+e.y*i.y;return this._3d&&(n+=e.z*i.z),_u(DJ(n))<FJ/3}reduce(){let e,i=0,n=0,a=.01,o,c=[],h=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),i=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(i,n),o._t1=i,o._t2=n,c.push(o),i=n;return c.forEach(function(d){for(i=0,n=0;n<=1;)for(n=i+a;n<=1+a;n+=a)if(o=d.split(i,n),!o.simple()){if(n-=a,_u(i-n)<a)return[];o=d.split(i,n),o._t1=Tt.map(i,0,1,d._t1,d._t2),o._t2=Tt.map(n,0,1,d._t1,d._t2),h.push(o),i=n;break}i<1&&(o=d.split(i,1),o._t1=Tt.map(i,0,1,d._t1,d._t2),o._t2=d._t2,h.push(o))}),h}translate(e,i,n){n=typeof n=="number"?n:i;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*i+h/a*n);return new Ve(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const i=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&i===2)return this.raise().scale(n);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const c=n?n(0):e,h=n?n(1):e,u=[this.offset(0,10),this.offset(1,10)],d=[],p=Tt.lli4(u[0],u[0].c,u[1],u[1].c);if(!p)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const x=d[g*i]=Tt.copy(o[g*i]);x.x+=(g?h:c)*u[g].n.x,x.y+=(g?h:c)*u[g].n.y}),n?([0,1].forEach(function(g){if(!(i===2&&g)){var x=o[g+1],y={x:x.x-p.x,y:x.y-p.y},b=n?n((g+1)/i):e;n&&!a&&(b=-b);var _=ku(y.x*y.x+y.y*y.y);y.x/=_,y.y/=_,d[g+1]={x:x.x+b*y.x,y:x.y+b*y.y}}}),new Ve(d)):([0,1].forEach(g=>{if(i===2&&g)return;const x=d[g*i],y=this.derivative(g),b={x:x.x+y.x,y:x.y+y.y};d[g+1]=Tt.lli4(x,b,p,o[g+1])}),new Ve(d))}outline(e,i,n,a){if(i=i===void 0?e:i,this._linear){const O=this.normal(0),j=this.points[0],M=this.points[this.points.length-1];let N,Y,$;n===void 0&&(n=e,a=i),N={x:j.x+O.x*e,y:j.y+O.y*e},$={x:M.x+O.x*n,y:M.y+O.y*n},Y={x:(N.x+$.x)/2,y:(N.y+$.y)/2};const z=[N,Y,$];N={x:j.x-O.x*i,y:j.y-O.y*i},$={x:M.x-O.x*a,y:M.y-O.y*a},Y={x:(N.x+$.x)/2,y:(N.y+$.y)/2};const K=[$,Y,N],W=Tt.makeline(K[2],z[0]),F=Tt.makeline(z[2],K[0]),U=[W,new Ve(z),F,new Ve(K)];return new Qu(U)}const o=this.reduce(),c=o.length,h=[];let u=[],d,p=0,g=this.length();const x=typeof n<"u"&&typeof a<"u";function y(O,j,M,N,Y){return function($){const z=N/M,K=(N+Y)/M,W=j-O;return Tt.map($,0,1,O+z*W,O+K*W)}}o.forEach(function(O){const j=O.length();x?(h.push(O.scale(y(e,n,g,p,j))),u.push(O.scale(y(-i,-a,g,p,j)))):(h.push(O.scale(e)),u.push(O.scale(-i))),p+=j}),u=u.map(function(O){return d=O.points,d[3]?O.points=[d[3],d[2],d[1],d[0]]:O.points=[d[2],d[1],d[0]],O}).reverse();const b=h[0].points[0],_=h[c-1].points[h[c-1].points.length-1],k=u[c-1].points[u[c-1].points.length-1],w=u[0].points[0],T=Tt.makeline(k,b),B=Tt.makeline(_,w),E=[T].concat(h).concat([B]).concat(u);return new Qu(E)}outlineshapes(e,i,n){i=i||e;const a=this.outline(e,i).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=Tt.makeshape(a[c],a[h-c],n);u.startcap.virtual=c>1,u.endcap.virtual=c<h/2-1,o.push(u)}return o}intersects(e,i){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof Ve&&(e=e.reduce()),this.curveintersects(this.reduce(),e,i)):this.selfintersects(i)}lineIntersects(e){const i=QT(e.p1.x,e.p2.x),n=QT(e.p1.y,e.p2.y),a=ZT(e.p1.x,e.p2.x),o=ZT(e.p1.y,e.p2.y);return Tt.roots(this.points,e).filter(c=>{var h=this.get(c);return Tt.between(h.x,i,a)&&Tt.between(h.y,n,o)})}selfintersects(e){const i=this.reduce(),n=i.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=i.slice(o,o+1),u=i.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,i,n){const a=[];e.forEach(function(c){i.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=Tt.pairiteration(c.left,c.right,n);h.length>0&&(o=o.concat(h))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,i,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=Tt.dist(e,i),d=Tt.dist(e,c),p=Tt.dist(e,h);return _u(d-u)+_u(p-u)}_iterate(e,i){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,d,p,g=!1,x=!1,y,b=a,_=1;do if(x=g,p=d,b=(n+a)/2,h=this.get(b),u=this.get(a),d=Tt.getccenter(c,h,u),d.interval={start:n,end:a},g=this._error(d,c,n,a)<=e,y=x&&!g,y||(_=a),g){if(a>=1){if(d.interval.end=_=1,p=d,a>1){let w={x:d.x+d.r*RJ(d.e),y:d.y+d.r*jJ(d.e)};d.e+=Tt.angle({x:d.x,y:d.y},w,this.get(1))}break}a=a+(a-n)/2}else a=b;while(!y&&o++<100);if(o>=100)break;p=p||d,i.push(p),n=_}while(a<1);return i}}function Kb(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function $J(r){if(Array.isArray(r))return r}function zJ(r){if(Array.isArray(r))return Kb(r)}function qJ(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function IJ(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function PJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
446
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
447
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UJ(r,e){if(r==null)return{};var i,n,a=WJ(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)i=o[n],e.includes(i)||{}.propertyIsEnumerable.call(r,i)&&(a[i]=r[i])}return a}function WJ(r,e){if(r==null)return{};var i={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;i[n]=r[n]}return i}function YJ(r,e){return $J(r)||IJ(r,e)||pN(r,e)||PJ()}function GJ(r){return zJ(r)||qJ(r)||pN(r)||HJ()}function VJ(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function XJ(r){var e=VJ(r,"string");return typeof e=="symbol"?e:e+""}function pN(r,e){if(r){if(typeof r=="string")return Kb(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Kb(r,e):void 0}}var QJ=(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=r.reduce(function(h,u){var d=h,p=u;return a.forEach(function(g,x){var y=g.keyAccessor,b=g.isProp,_;if(b){var k=p,w=k[y],T=UJ(k,[y].map(XJ));_=w,p=T}else _=y(p,x);x+1<a.length?(d.hasOwnProperty(_)||(d[_]={}),d=d[_]):i?(d.hasOwnProperty(_)||(d[_]=[]),d[_].push(p)):d[_]=p}),h},{});i instanceof Function&&(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===a.length?Object.keys(u).forEach(function(p){return u[p]=i(u[p])}):Object.values(u).forEach(function(p){return h(p,d+1)})})(o);var c=o;return n&&(c=[],(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===a.length?c.push({keys:d,vals:u}):Object.entries(u).forEach(function(p){var g=YJ(p,2),x=g[0],y=g[1];return h(y,[].concat(GJ(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function ZJ(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var KJ=`.force-graph-container canvas {
|
|
448
|
+
display: block;
|
|
449
|
+
user-select: none;
|
|
450
|
+
outline: none;
|
|
451
|
+
-webkit-tap-highlight-color: transparent;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.force-graph-container .clickable {
|
|
455
|
+
cursor: pointer;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.force-graph-container .grabbable {
|
|
459
|
+
cursor: move;
|
|
460
|
+
cursor: grab;
|
|
461
|
+
cursor: -moz-grab;
|
|
462
|
+
cursor: -webkit-grab;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.force-graph-container .grabbable:active {
|
|
466
|
+
cursor: grabbing;
|
|
467
|
+
cursor: -moz-grabbing;
|
|
468
|
+
cursor: -webkit-grabbing;
|
|
469
|
+
}
|
|
470
|
+
`;ZJ(KJ);function Jb(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function JJ(r){if(Array.isArray(r))return r}function ttt(r){if(Array.isArray(r))return Jb(r)}function KT(r,e,i){if(gN())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(r.bind.apply(r,n));return a}function gf(r,e,i){return(e=stt(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function gN(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gN=function(){return!!r})()}function ett(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function rtt(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function itt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
471
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ntt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
472
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JT(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function hc(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?JT(Object(i),!0).forEach(function(n){gf(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):JT(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function Zu(r,e){return JJ(r)||rtt(r,e)||mN(r,e)||itt()}function pn(r){return ttt(r)||ett(r)||mN(r)||ntt()}function att(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function stt(r){var e=att(r,"string");return typeof e=="symbol"?e:e+""}function t1(r){"@babel/helpers - typeof";return t1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t1(r)}function mN(r,e){if(r){if(typeof r=="string")return Jb(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Jb(r,e):void 0}}var ott=hE(U7);function tB(r,e,i){!e||typeof i!="string"||r.filter(function(n){return!n[i]}).forEach(function(n){n[i]=ott(e(n))})}function ltt(r,e){var i=r.nodes,n=r.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:h,d={};i.forEach(function(y){return d[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var b=y.source,_=y.target,k=E(b),w=E(_);if(!d.hasOwnProperty(k))throw"Missing source node with id: ".concat(k);if(!d.hasOwnProperty(w))throw"Missing target node with id: ".concat(w);var T=d[k],B=d[w];T.out.push(B);function E(O){return t1(O)==="object"?e(O):O}});var p=[];x(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(pn(Object.entries(d).filter(function(y){var b=Zu(y,2),_=b[1];return!_.skip}).map(function(y){var b=Zu(y,2),_=b[0],k=b[1];return gf({},_,k.depth)}))));return g;function x(y){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,k=function(){var E=y[w];if(b.indexOf(E)!==-1){var O=[].concat(pn(b.slice(b.indexOf(E))),[E]).map(function(j){return e(j.data)});return p.some(function(j){return j.length===O.length&&j.every(function(M,N){return M===O[N]})})||(p.push(O),u(O)),1}_>E.depth&&(E.depth=_,x(E.out,[].concat(pn(b),[E]),_+(E.skip?0:1)))},w=0,T=y.length;w<T;w++)k()}}var ctt=2,Zr=function(e,i){return i.onNeedsRedraw&&i.onNeedsRedraw()},eB=function(e,i){if(!i.isShadow){var n=Me(i.linkDirectionalParticles);i.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=pn(Array(o)).map(function(){return{}}):delete a.__photons})}},Lg=wv({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,i){i.engineRunning=!1,eB(e,i)}},dagMode:{onChange:function(e,i){!e&&(i.graphData.nodes||[]).forEach(function(n){return n.fx=n.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Zr},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Zr},nodeColor:{default:"color",triggerUpdate:!1,onChange:Zr},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Zr},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Zr},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Zr},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Zr},linkColor:{default:"color",triggerUpdate:!1,onChange:Zr},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Zr},linkWidth:{default:1,triggerUpdate:!1,onChange:Zr},linkCurvature:{default:0,triggerUpdate:!1,onChange:Zr},linkCanvasObject:{triggerUpdate:!1,onChange:Zr},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Zr},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Zr},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Zr},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Zr},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:eB},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,i,n){return n===void 0?e.forceLayout.force(i):(e.forceLayout.force(i,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&i(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function i(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function n(){var h=Me(e.nodeVisibility),u=Me(e.nodeVal),d=Me(e.nodeColor),p=Me(e.nodeCanvasObjectMode),g=e.ctx,x=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(b){var _=p(b);if(e.nodeCanvasObject&&(_==="before"||_==="replace")&&(e.nodeCanvasObject(b,g,e.globalScale),_==="replace")){g.restore();return}var k=Math.sqrt(Math.max(0,u(b)||1))*e.nodeRelSize+x;g.beginPath(),g.arc(b.x,b.y,k,0,2*Math.PI,!1),g.fillStyle=d(b)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&_==="after"&&e.nodeCanvasObject(b,e.ctx,e.globalScale)}),g.restore()}function a(){var h=Me(e.linkVisibility),u=Me(e.linkColor),d=Me(e.linkWidth),p=Me(e.linkLineDash),g=Me(e.linkCurvature),x=Me(e.linkCanvasObjectMode),y=e.ctx,b=e.isShadow*2,_=e.graphData.links.filter(h);_.forEach(j);var k=[],w=[],T=_;if(e.linkCanvasObject){var B=[],E=[];_.forEach(function(M){return({before:k,after:w,replace:B}[x(M)]||E).push(M)}),T=[].concat(pn(k),w,E),k=k.concat(B)}y.save(),k.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();var O=QJ(T,[u,d,p]);y.save(),Object.entries(O).forEach(function(M){var N=Zu(M,2),Y=N[0],$=N[1],z=!Y||Y==="undefined"?"rgba(0,0,0,0.15)":Y;Object.entries($).forEach(function(K){var W=Zu(K,2),F=W[0],U=W[1],R=(F||1)/e.globalScale+b;Object.entries(U).forEach(function(I){var H=Zu(I,2);H[0];var G=H[1],Z=p(G[0]);y.beginPath(),G.forEach(function(P){var J=P.source,nt=P.target;if(!(!J||!nt||!J.hasOwnProperty("x")||!nt.hasOwnProperty("x"))){y.moveTo(J.x,J.y);var ut=P.__controlPoints;ut?y[ut.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,pn(ut).concat([nt.x,nt.y])):y.lineTo(nt.x,nt.y)}}),y.strokeStyle=z,y.lineWidth=R,y.setLineDash(Z||[]),y.stroke()})})}),y.restore(),y.save(),w.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();function j(M){var N=g(M);if(!N){M.__controlPoints=null;return}var Y=M.source,$=M.target;if(!(!Y||!$||!Y.hasOwnProperty("x")||!$.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow($.x-Y.x,2)+Math.pow($.y-Y.y,2));if(z>0){var K=Math.atan2($.y-Y.y,$.x-Y.x),W=z*N,F={x:(Y.x+$.x)/2+W*Math.cos(K-Math.PI/2),y:(Y.y+$.y)/2+W*Math.sin(K-Math.PI/2)};M.__controlPoints=[F.x,F.y]}else{var U=N*70;M.__controlPoints=[$.x,$.y-U,$.x+U,$.y]}}}}function o(){var h=1.6,u=.2,d=Me(e.linkDirectionalArrowLength),p=Me(e.linkDirectionalArrowRelPos),g=Me(e.linkVisibility),x=Me(e.linkDirectionalArrowColor||e.linkColor),y=Me(e.nodeVal),b=e.ctx;b.save(),e.graphData.links.filter(g).forEach(function(_){var k=d(_);if(!(!k||k<0)){var w=_.source,T=_.target;if(!(!w||!T||!w.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var B=Math.sqrt(Math.max(0,y(w)||1))*e.nodeRelSize,E=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,O=Math.min(1,Math.max(0,p(_))),j=x(_)||"rgba(0,0,0,0.28)",M=k/h/2,N=_.__controlPoints&&KT(Ve,[w.x,w.y].concat(pn(_.__controlPoints),[T.x,T.y])),Y=N?function(R){return N.get(R)}:function(R){return{x:w.x+(T.x-w.x)*R||0,y:w.y+(T.y-w.y)*R||0}},$=N?N.length():Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2)),z=B+k+($-B-E-k)*O,K=Y(z/$),W=Y((z-k)/$),F=Y((z-k*(1-u))/$),U=Math.atan2(K.y-W.y,K.x-W.x)-Math.PI/2;b.beginPath(),b.moveTo(K.x,K.y),b.lineTo(W.x+M*Math.cos(U),W.y+M*Math.sin(U)),b.lineTo(F.x,F.y),b.lineTo(W.x-M*Math.cos(U),W.y-M*Math.sin(U)),b.fillStyle=j,b.fill()}}}),b.restore()}function c(){var h=Me(e.linkDirectionalParticles),u=Me(e.linkDirectionalParticleSpeed),d=Me(e.linkDirectionalParticleOffset),p=Me(e.linkDirectionalParticleWidth),g=Me(e.linkVisibility),x=Me(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(b){var _=h(b);if(!(!b.hasOwnProperty("__photons")||!b.__photons.length)){var k=b.source,w=b.target;if(!(!k||!w||!k.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var T=u(b),B=Math.abs(d(b)),E=b.__photons||[],O=Math.max(0,p(b)/2)/Math.sqrt(e.globalScale),j=x(b)||"rgba(0,0,0,0.28)";y.fillStyle=j;var M=b.__controlPoints?KT(Ve,[k.x,k.y].concat(pn(b.__controlPoints),[w.x,w.y])):null,N=0,Y=!1;E.forEach(function($){var z=!!$.__singleHop;if($.hasOwnProperty("__progressRatio")||($.__progressRatio=z?T<0?1:0:(N+B)/_),!z&&N++,$.__progressRatio+=T,$.__progressRatio>=1||$.__progressRatio<0)if(!z)$.__progressRatio=$.__progressRatio%1,$.__progressRatio<0&&$.__progressRatio++;else{Y=!0;return}var K=$.__progressRatio,W=M?M.get(K):{x:k.x+(w.x-k.x)*K||0,y:k.y+(w.y-k.y)*K||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(W.x,W.y,b,y,e.globalScale):(y.beginPath(),y.arc(W.x,W.y,O,0,2*Math.PI,!1),y.fill())}),Y&&(b.__photons=b.__photons.filter(function($){return!$.__singleHop||$.__progressRatio<=1&&$.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,i){return i&&(!i.__photons&&(i.__photons=[]),i.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:TJ().force("link",xJ()).force("charge",BJ()).force("center",RK()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,i){i.ctx=e},update:function(e,i){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&tB(e.graphData.nodes,Me(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&tB(e.graphData.links,Me(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(x){x.source=x[e.linkSource],x.target=x[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id(function(x){return x[e.nodeId]}).links(e.graphData.links);var a=e.dagMode&<t(e.graphData,function(x){return x[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,pn(Object.values(a||[]))),c=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*ctt*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(i.dagMode)){var h=["lr","rl"].includes(i.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return delete x[h]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var u=["rl","bu"].includes(e.dagMode),d=function(y){return(a[y[e.nodeId]]-o/2)*c*(u?-1:1)},p=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return x[p]=d(x)})}e.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?AJ(function(x){var y=a[x[e.nodeId]]||-1;return(e.dagMode==="radialin"?o-y:y)*c}).strength(function(x){return e.dagNodeFilter(x)?1:0}):null);for(var g=0;g<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);g++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function yN(r,e){var i=r instanceof Array?r:[r],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){i.forEach(function(d){return u[d][o](h)})},triggerUpdate:!1}},linkMethod:function(o){return function(c){for(var h=arguments.length,u=new Array(h>1?h-1:0),d=1;d<h;d++)u[d-1]=arguments[d];var p=[];return i.forEach(function(g){var x=c[g],y=x[o].apply(x,u);y!==x&&p.push(y)}),p.length?p[0]:this}}}}var htt=800,utt=4,ftt=5,xN=yN("forceGraph",Lg),dtt=yN(["forceGraph","shadowGraph"],Lg),ptt=Object.assign.apply(Object,pn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(r){return gf({},r,xN.linkProp(r))})).concat(pn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(r){return gf({},r,dtt.linkProp(r))})))),gtt=Object.assign.apply(Object,pn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(r){return gf({},r,xN.linkMethod(r))})));function cx(r){if(r.canvas){var e=r.canvas.width,i=r.canvas.height;e===300&&i===150&&(e=i=0);var n=window.devicePixelRatio;e/=n,i/=n,[r.canvas,r.shadowCanvas].forEach(function(o){o.style.width="".concat(r.width,"px"),o.style.height="".concat(r.height,"px"),o.width=r.width*n,o.height=r.height*n,!e&&!i&&o.getContext("2d").scale(n,n)});var a=Zn(r.canvas).k;r.zoom.translateBy(r.zoom.__baseElem,(r.width-e)/2/a,(r.height-i)/2/a),r.needsRedraw=!0}}function bN(r){var e=window.devicePixelRatio;r.setTransform(e,0,0,e,0,0)}function rB(r,e,i){r.save(),bN(r),r.clearRect(0,0,e,i),r.restore()}var mtt=wv({props:hc({width:{default:window.innerWidth,onChange:function(e,i){return cx(i)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,i){return cx(i)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,i){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&i.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),i.forceGraph.graphData(e),i.shadowGraph.graphData(e);function n(a){var o=a.type,c=a.objs;c.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var u=i.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=i.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,i){i.canvas&&e&&(i.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,i){i.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,i){i.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,i){i.zoom.scaleExtent([e,i.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,i){i.zoom.scaleExtent([i.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,i){i.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},ptt),aliases:{stopAnimation:"pauseAnimation"},methods:hc({graph2ScreenCoords:function(e,i,n){var a=Zn(e.canvas);return{x:i*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,i,n){var a=Zn(e.canvas);return{x:(i-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,i,n,a){if(!e.canvas)return null;if(i!==void 0||n!==void 0){var o=Object.assign({},i!==void 0?{x:i}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new TT(c()).to(o,a).easing(nl.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=Zn(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var d=u.x,p=u.y;e.zoom.translateTo(e.zoom.__baseElem,d===void 0?c().x:d,p===void 0?c().y:p),e.needsRedraw=!0}},zoom:function(e,i,n){if(!e.canvas)return null;if(i!==void 0)return n?e.tweenGroup.add(new TT({k:a()}).to({k:i},n).easing(nl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(i),this;return a();function a(){return Zn(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,i),this.zoom(d,i)}return this},getGraphBbox:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=Me(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(i).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[mS(o,function(c){return c.x-c.r}),gS(o,function(c){return c.x+c.r})],y:[mS(o,function(c){return c.y-c.r}),gS(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},gtt),stateInit:function(){return{lastSetZoom:1,zoom:h9(),forceGraph:new Lg,shadowGraph:new Lg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new uK,tweenGroup:new GO}},init:function(e,i){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),i.canvas=document.createElement("canvas"),i.backgroundColor&&(i.canvas.style.background=i.backgroundColor),a.appendChild(i.canvas),i.shadowCanvas=document.createElement("canvas");var o=i.canvas.getContext("2d"),c=i.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},u=function(){var g=null,x=window.devicePixelRatio,y=h.x>0&&h.y>0?c.getImageData(h.x*x,h.y*x,1,1):null;return y&&(g=i.colorTracker.lookup(y.data)),g};Xt(i.canvas).call(q$().subject(function(){if(!i.enableNodeDrag)return null;var p=u();return p&&p.type==="Node"?p.d:null}).on("start",function(p){var g=p.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},p.active||(g.fx=g.x,g.fy=g.y),i.canvas.classList.add("grabbable")}).on("drag",function(p){var g=p.subject,x=g.__initialDragPos,y=p,b=Zn(i.canvas).k,_={x:x.x+(y.x-x.x)/b-g.x,y:x.y+(y.y-x.y)/b-g.y};["x","y"].forEach(function(k){return g["f".concat(k)]=g[k]=x[k]+(y[k]-x[k])/b}),!(!g.__dragged&&ftt>=Math.sqrt(K6(["x","y"].map(function(k){return Math.pow(p[k]-x[k],2)}))))&&(i.forceGraph.d3AlphaTarget(.3).resetCountdown(),i.isPointerDragging=!0,g.__dragged=!0,i.onNodeDrag(g,_))}).on("end",function(p){var g=p.subject,x=g.__initialDragPos,y={x:g.x-x.x,y:g.y-x.y};x.fx===void 0&&(g.fx=void 0),x.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,i.forceGraph.d3AlphaTarget()&&i.forceGraph.d3AlphaTarget(0).resetCountdown(),i.canvas.classList.remove("grabbable"),i.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,i.onNodeDragEnd(g,y))})),i.zoom(i.zoom.__baseElem=Xt(i.canvas)),i.zoom.__baseElem.on("dblclick.zoom",null),i.zoom.filter(function(p){return!p.button&&i.enableZoomPanInteraction&&(p.type!=="wheel"||Me(i.enableZoomInteraction)(p))&&(p.type==="wheel"||Me(i.enablePanInteraction)(p))}).on("zoom",function(p){var g=p.transform;[o,c].forEach(function(x){bN(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),i.isPointerDragging=!0,i.onZoom&&i.onZoom(hc(hc({},g),n.centerAt())),i.needsRedraw=!0}).on("end",function(p){i.isPointerDragging=!1,i.onZoomEnd&&i.onZoomEnd(hc(hc({},p.transform),n.centerAt()))}),cx(i),i.forceGraph.onNeedsRedraw(function(){return i.needsRedraw=!0}).onFinishUpdate(function(){Zn(i.canvas).k===i.lastSetZoom&&i.graphData.nodes.length&&(i.zoom.scaleTo(i.zoom.__baseElem,i.lastSetZoom=utt/Math.cbrt(i.graphData.nodes.length)),i.needsRedraw=!0)}),i.tooltip=new NK(a),["pointermove","pointerdown"].forEach(function(p){return a.addEventListener(p,function(g){p==="pointerdown"&&(i.isPointerPressed=!0,i.pointerDownEvent=g),!i.isPointerDragging&&g.type==="pointermove"&&i.onBackgroundClick&&(g.pressure>0||i.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(b){return Math.abs(b)>1}))&&(i.isPointerDragging=!0);var x=y(a);h.x=g.pageX-x.left,h.y=g.pageY-x.top;function y(b){var _=b.getBoundingClientRect(),k=window.pageXOffset||document.documentElement.scrollLeft,w=window.pageYOffset||document.documentElement.scrollTop;return{top:_.top+w,left:_.left+k}}},{passive:!0})}),a.addEventListener("pointerup",function(p){if(i.isPointerPressed){if(i.isPointerPressed=!1,i.isPointerDragging){i.isPointerDragging=!1;return}var g=[p,i.pointerDownEvent];requestAnimationFrame(function(){if(p.button===0)if(i.hoverObj){var x=i["on".concat(i.hoverObj.type,"Click")];x&&x.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundClick&&i.onBackgroundClick.apply(i,g);if(p.button===2)if(i.hoverObj){var y=i["on".concat(i.hoverObj.type,"RightClick")];y&&y.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundRightClick&&i.onBackgroundRightClick.apply(i,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(p){return!i.onBackgroundRightClick&&!i.onNodeRightClick&&!i.onLinkRightClick?!0:(p.preventDefault(),!1)}),i.forceGraph(o),i.shadowGraph(c);var d=xZ(function(){rB(c,i.width,i.height),i.shadowGraph.linkWidth(function(g){return Me(i.linkWidth)(g)+i.linkHoverPrecision});var p=Zn(i.canvas);i.shadowGraph.globalScale(p.k).tickFrame()},htt);i.flushShadowCanvas=d.flush,(this._animationCycle=function p(){var g=!i.autoPauseRedraw||!!i.needsRedraw||i.forceGraph.isEngineRunning()||i.graphData.links.some(function(B){return B.__photons&&B.__photons.length});if(i.needsRedraw=!1,i.enablePointerInteraction){var x=i.isPointerDragging?null:u();if(x!==i.hoverObj){var y=i.hoverObj,b=y?y.type:null,_=x?x.type:null;if(b&&b!==_){var k=i["on".concat(b,"Hover")];k&&k(null,y.d)}if(_){var w=i["on".concat(_,"Hover")];w&&w(x.d,b===_?y.d:null)}i.tooltip.content(x&&Me(i["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),i.canvas.classList[(x&&i["on".concat(_,"Click")]||!x&&i.onBackgroundClick)&&Me(i.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),i.hoverObj=x}g&&d()}if(g){rB(o,i.width,i.height);var T=Zn(i.canvas).k;i.onRenderFramePre&&i.onRenderFramePre(o,T),i.forceGraph.globalScale(T).tickFrame(),i.onRenderFramePost&&i.onRenderFramePost(o,T)}i.tweenGroup.update(),i.animationFrameRequestId=requestAnimationFrame(p)})()},update:function(e){}}),hx={exports:{}},ux,iB;function ytt(){if(iB)return ux;iB=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ux=r,ux}var fx,nB;function xtt(){if(nB)return fx;nB=1;var r=ytt();function e(){}function i(){}return i.resetWarningCache=e,fx=function(){function n(c,h,u,d,p,g){if(g!==r){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:e};return o.PropTypes=o,o},fx}var aB;function btt(){return aB||(aB=1,hx.exports=xtt()()),hx.exports}var vtt=btt();const rt=Og(vtt),um={width:rt.number,height:rt.number,graphData:rt.shape({nodes:rt.arrayOf(rt.object).isRequired,links:rt.arrayOf(rt.object).isRequired}),backgroundColor:rt.string,nodeRelSize:rt.number,nodeId:rt.string,nodeLabel:rt.oneOfType([rt.string,rt.func]),nodeVal:rt.oneOfType([rt.number,rt.string,rt.func]),nodeVisibility:rt.oneOfType([rt.bool,rt.string,rt.func]),nodeColor:rt.oneOfType([rt.string,rt.func]),nodeAutoColorBy:rt.oneOfType([rt.string,rt.func]),onNodeHover:rt.func,onNodeClick:rt.func,linkSource:rt.string,linkTarget:rt.string,linkLabel:rt.oneOfType([rt.string,rt.func]),linkVisibility:rt.oneOfType([rt.bool,rt.string,rt.func]),linkColor:rt.oneOfType([rt.string,rt.func]),linkAutoColorBy:rt.oneOfType([rt.string,rt.func]),linkWidth:rt.oneOfType([rt.number,rt.string,rt.func]),linkCurvature:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalArrowLength:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalArrowColor:rt.oneOfType([rt.string,rt.func]),linkDirectionalArrowRelPos:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalParticles:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalParticleSpeed:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalParticleOffset:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalParticleWidth:rt.oneOfType([rt.number,rt.string,rt.func]),linkDirectionalParticleColor:rt.oneOfType([rt.string,rt.func]),onLinkHover:rt.func,onLinkClick:rt.func,dagMode:rt.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:rt.number,dagNodeFilter:rt.func,onDagError:rt.func,d3AlphaMin:rt.number,d3AlphaDecay:rt.number,d3VelocityDecay:rt.number,warmupTicks:rt.number,cooldownTicks:rt.number,cooldownTime:rt.number,onEngineTick:rt.func,onEngineStop:rt.func,getGraphBbox:rt.func},vN={zoomToFit:rt.func,onNodeRightClick:rt.func,onNodeDrag:rt.func,onNodeDragEnd:rt.func,onLinkRightClick:rt.func,linkHoverPrecision:rt.number,onBackgroundClick:rt.func,onBackgroundRightClick:rt.func,showPointerCursor:rt.oneOfType([rt.bool,rt.func]),enablePointerInteraction:rt.bool,enableNodeDrag:rt.bool},Rv={showNavInfo:rt.bool,nodeOpacity:rt.number,nodeResolution:rt.number,nodeThreeObject:rt.oneOfType([rt.object,rt.string,rt.func]),nodeThreeObjectExtend:rt.oneOfType([rt.bool,rt.string,rt.func]),nodePositionUpdate:rt.func,linkOpacity:rt.number,linkResolution:rt.number,linkCurveRotation:rt.oneOfType([rt.number,rt.string,rt.func]),linkMaterial:rt.oneOfType([rt.object,rt.string,rt.func]),linkThreeObject:rt.oneOfType([rt.object,rt.string,rt.func]),linkThreeObjectExtend:rt.oneOfType([rt.bool,rt.string,rt.func]),linkPositionUpdate:rt.func,linkDirectionalArrowResolution:rt.number,linkDirectionalParticleResolution:rt.number,linkDirectionalParticleThreeObject:rt.oneOfType([rt.object,rt.string,rt.func]),forceEngine:rt.oneOf(["d3","ngraph"]),ngraphPhysics:rt.object,numDimensions:rt.oneOf([1,2,3])},Ctt=Object.assign({},um,vN,{linkLineDash:rt.oneOfType([rt.arrayOf(rt.number),rt.string,rt.func]),nodeCanvasObjectMode:rt.oneOfType([rt.string,rt.func]),nodeCanvasObject:rt.func,nodePointerAreaPaint:rt.func,linkCanvasObjectMode:rt.oneOfType([rt.string,rt.func]),linkCanvasObject:rt.func,linkPointerAreaPaint:rt.func,linkDirectionalParticleCanvasObject:rt.func,autoPauseRedraw:rt.bool,minZoom:rt.number,maxZoom:rt.number,enableZoomInteraction:rt.oneOfType([rt.bool,rt.func]),enablePanInteraction:rt.oneOfType([rt.bool,rt.func]),onZoom:rt.func,onZoomEnd:rt.func,onRenderFramePre:rt.func,onRenderFramePost:rt.func});Object.assign({},um,vN,Rv,{enableNavigationControls:rt.bool,controlType:rt.oneOf(["trackball","orbit","fly"]),rendererConfig:rt.object,extraRenderers:rt.arrayOf(rt.shape({render:rt.func.isRequired}))});Object.assign({},um,Rv,{nodeDesc:rt.oneOfType([rt.string,rt.func]),linkDesc:rt.oneOfType([rt.string,rt.func])});Object.assign({},um,Rv,{markerAttrs:rt.object,yOffset:rt.number,glScale:rt.number});const jv=iZ(mtt,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});jv.displayName="ForceGraph2D";jv.propTypes=Ctt;function _tt(){return ji({queryKey:["graph"],queryFn:()=>fr.get("/graph"),staleTime:3e4})}const dx="dreamcontext:";function ktt(r,e){const{projectId:i}=qB(),n=i?`${dx}${i}:${r}`:`${dx}${r}`,[a,o]=et.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(i){const u=`${dx}${r}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=et.useCallback(h=>{o(u=>{const d=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(d))}catch{}return d})},[n]);return[a,c]}const sB={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function Stt(r){return{centerStrength:.05+r.centerStrength*.45,repelStrength:-(30+r.repelStrength*240),linkStrength:.1+r.linkStrength*1.2,linkDistance:20+r.linkDistance*180}}function wtt(){const[r,e]=ktt("brain:settings:v1",sB),i=et.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=et.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=et.useCallback(()=>{e(sB)},[e]);return{settings:r,patch:i,setGroups:n,reset:a}}function Ttt(r){const e=[];let i=0;for(;i<r.length;){const n=r[i];if(/\s/.test(n)){i++;continue}if(n==="("){e.push({type:"LPAREN"}),i++;continue}if(n===")"){e.push({type:"RPAREN"}),i++;continue}if(n==="-"&&i+1<r.length&&!/\s/.test(r[i+1])){e.push({type:"NOT"}),i++;continue}if(n==='"'){let h=i+1,u="";for(;h<r.length&&r[h]!=='"';)r[h]==="\\"&&h+1<r.length?(u+=r[h+1],h+=2):(u+=r[h],h++);e.push({type:"PHRASE",value:u}),i=h+1;continue}if(n==="/"){let h=i+1,u="";for(;h<r.length&&r[h]!=="/";)r[h]==="\\"&&h+1<r.length?(u+=r[h]+r[h+1],h+=2):(u+=r[h],h++);if(h<r.length){e.push({type:"REGEX",value:u}),i=h+1;continue}}let a=i;for(;a<r.length&&!/[\s()]/.test(r[a])&&r[a]!=='"';)a++;const o=r.slice(i,a),c=o.match(/^(tag|path|file|content):(.*)$/i);c?e.push({type:"OP",value:c[1].toLowerCase(),arg:c[2]}):o.toUpperCase()==="OR"?e.push({type:"OR"}):o.toUpperCase()==="AND"||o.length>0&&e.push({type:"WORD",value:o}),i=a}return e}class Btt{constructor(e){Ut(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var i;let e=this.parseAnd();for(;((i=this.peek())==null?void 0:i.type)==="OR";){this.pos++;const n=this.parseAnd();e.type==="or"?e.children.push(n):e={type:"or",children:[e,n]}}return e}parseAnd(){var i,n;const e=[];for(;this.pos<this.tokens.length&&((i=this.peek())==null?void 0:i.type)!=="RPAREN"&&((n=this.peek())==null?void 0:n.type)!=="OR";){const a=this.parseTerm();a&&e.push(a)}return e.length===0?{type:"and",children:[]}:e.length===1?e[0]:{type:"and",children:e}}parseTerm(){var a;const e=this.peek();if(!e)return null;let i=!1;e.type==="NOT"&&(i=!0,this.pos++);const n=this.peek();if(!n)return null;if(n.type==="LPAREN"){this.pos++;const o=this.parseOr();return((a=this.peek())==null?void 0:a.type)==="RPAREN"&&this.pos++,i?CN(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:i};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:i};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:i}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:i}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function CN(r){return r.type==="and"||r.type==="or"?{...r,children:r.children.map(CN)}:{...r,negated:!r.negated}}function oB(r){const e=r.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const i=Ttt(e),n=new Btt(i).parse();return{match:a=>e1(n,a),raw:e,isEmpty:!1}}function e1(r,e){switch(r.type){case"and":return r.children.every(i=>e1(i,e));case"or":return r.children.some(i=>e1(i,e));case"word":return yp(lB(e,r.value),r.negated);case"phrase":return yp(lB(e,r.value),r.negated);case"regex":return yp(Att(e,r.value),r.negated);case"op":return yp(Ett(e,r.op,r.arg),r.negated)}}function yp(r,e){return e?!r:r}function _N(r){return[r.label,r.path,r.id,r.meta.description??"",...r.meta.tags??[]].join(" ").toLowerCase()}function lB(r,e){return _N(r).includes(e)}function Att(r,e){return e.test(_N(r))}function Ett(r,e,i){var a;const n=i.toLowerCase();switch(e){case"path":return r.path.toLowerCase().includes(n);case"file":return(((a=r.path.split("/").pop())==null?void 0:a.toLowerCase())??r.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(r.meta.tags??[]).some(c=>c.toLowerCase()===o)||r.group==="tag"&&r.label.toLowerCase().replace(/^#/,"")===o}case"content":return(r.meta.description??"").toLowerCase().includes(n);default:return!1}}const xp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},px=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Mtt({settings:r,patch:e,setGroups:i,reset:n,onClose:a}){const[o,c]=et.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(d=>({...d,[u]:!d[u]}));return v.jsxs("aside",{className:"brain-settings",children:[v.jsxs("div",{className:"brain-settings-header",children:[v.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),v.jsxs("div",{className:"brain-settings-header-actions",children:[v.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),v.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),v.jsxs("div",{className:"brain-settings-body",children:[v.jsxs(bp,{label:xp.filters,open:o.filters,onToggle:()=>h("filters"),children:[v.jsx("label",{className:"brain-settings-label",children:"Search files"}),v.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:r.filters.search,onChange:u=>e("filters",{search:u.target.value})}),v.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",v.jsx("code",{children:"tag:"})," ",v.jsx("code",{children:"path:"})," ",v.jsx("code",{children:"file:"})," ",v.jsx("code",{children:"-not"})," ",v.jsx("code",{children:"OR"})," ",v.jsx("code",{children:'"phrase"'})," ",v.jsx("code",{children:"/regex/"})]}),v.jsx(Su,{label:"Tags",checked:r.filters.showTags,onChange:u=>e("filters",{showTags:u})}),v.jsx(Su,{label:"Attachments",checked:r.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),v.jsx(Su,{label:"Existing files only",checked:r.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),v.jsx(Su,{label:"Orphans",checked:r.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),v.jsx(bp,{label:xp.groups,open:o.groups,onToggle:()=>h("groups"),children:v.jsx(Ott,{groups:r.groups,onChange:i})}),v.jsxs(bp,{label:xp.display,open:o.display,onToggle:()=>h("display"),children:[v.jsx(Ltt,{label:"View",value:r.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),v.jsx(Su,{label:"Arrows",checked:r.display.arrows,onChange:u=>e("display",{arrows:u})}),v.jsx(zo,{label:"Text fade threshold",value:r.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),v.jsx(zo,{label:"Node size",value:r.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),v.jsx(zo,{label:"Link thickness",value:r.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),v.jsxs(bp,{label:xp.forces,open:o.forces,onToggle:()=>h("forces"),children:[v.jsx(zo,{label:"Center force",value:r.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),v.jsx(zo,{label:"Repel force",value:r.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),v.jsx(zo,{label:"Link force",value:r.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),v.jsx(zo,{label:"Link distance",value:r.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function bp({label:r,open:e,onToggle:i,children:n}){return v.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[v.jsxs("button",{className:"brain-section-header",onClick:i,type:"button",children:[v.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),v.jsx("span",{children:r})]}),e&&v.jsx("div",{className:"brain-section-body",children:n})]})}function Su({label:r,checked:e,onChange:i}){return v.jsxs("label",{className:"brain-toggle-row",children:[v.jsx("span",{children:r}),v.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>i(!e),children:v.jsx("span",{className:"brain-toggle-knob"})})]})}function Ltt({label:r,value:e,options:i,onChange:n}){return v.jsxs("div",{className:"brain-segmented-row",children:[v.jsx("span",{className:"brain-segmented-label",children:r}),v.jsx("div",{className:"brain-segmented",role:"tablist",children:i.map(a=>v.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function zo({label:r,value:e,onChange:i}){return v.jsxs("label",{className:"brain-slider-row",children:[v.jsx("span",{className:"brain-slider-label-text",children:r}),v.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>i(parseFloat(n.target.value))})]})}function Ott({groups:r,onChange:e}){const[i,n]=et.useState(""),[a,o]=et.useState(null),c=()=>{const d=i.trim();if(!d)return;const p=`grp_${Math.random().toString(36).slice(2,8)}`;e([...r,{id:p,query:d,color:px[r.length%px.length]}]),n("")},h=(d,p)=>{e(r.map(g=>g.id===d?{...g,...p}:g))},u=d=>e(r.filter(p=>p.id!==d));return v.jsxs(v.Fragment,{children:[r.length===0&&v.jsxs("p",{className:"brain-settings-hint",children:["Color nodes that match a query. First matching group wins. Example:"," ",v.jsx("code",{children:"tag:#architecture"})]}),v.jsx("div",{className:"brain-groups-list",children:r.map(d=>v.jsxs("div",{className:"brain-group-row",children:[v.jsx("button",{className:"brain-group-color",style:{background:d.color},onClick:()=>o(a===d.id?null:d.id),title:"Pick color"}),v.jsx("input",{className:"brain-settings-input brain-group-input",value:d.query,onChange:p=>h(d.id,{query:p.target.value})}),v.jsx("button",{className:"brain-settings-mini-btn",onClick:()=>u(d.id),title:"Remove group",children:"×"}),a===d.id&&v.jsx("div",{className:"brain-swatch-picker",children:px.map(p=>v.jsx("button",{className:"brain-swatch",style:{background:p},onClick:()=>{h(d.id,{color:p}),o(null)}},p))})]},d.id))}),v.jsxs("div",{className:"brain-group-add",children:[v.jsx("input",{className:"brain-settings-input",placeholder:"New group query…",value:i,onChange:d=>n(d.target.value),onKeyDown:d=>{d.key==="Enter"&&c()}}),v.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!i.trim(),children:"New group"})]})]})}function Ntt(r){return ji({queryKey:["graph","content",(r==null?void 0:r.path)??null],queryFn:()=>{if(!r||!r.path)throw new Error("No path for node");return fr.get(`/graph/content?path=${encodeURIComponent(r.path)}`)},enabled:!!(r&&r.path),staleTime:3e4})}const cB={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Rtt={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},jtt={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Dtt(r){return r==="task"?"tasks":r==="feature"?"features":r==="knowledge"?"knowledge":r==="soul"||r==="user"||r==="memory"||r==="core"?"core":null}function Ftt({node:r,onClose:e,onSelectRelated:i,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(r!=null&&r.path),u=Ntt(h?r:null);if(!r)return v.jsx("aside",{className:"brain-drawer"});const d=Dtt(r.group),p=u.data;return v.jsxs("aside",{className:"brain-drawer brain-drawer--open",children:[v.jsx("button",{className:"brain-drawer-close",onClick:e,"aria-label":"Close",children:"×"}),v.jsxs("div",{className:"brain-drawer-header",children:[v.jsxs("span",{className:"brain-drawer-group-badge",children:[v.jsx("span",{className:"brain-related-dot",style:{background:cB[r.group]}}),Rtt[r.group]]}),v.jsx("h2",{className:"brain-drawer-title",children:r.label}),r.path&&v.jsx("span",{className:"brain-drawer-id",children:r.path})]}),v.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&v.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&v.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(p==null?void 0:p.type)==="markdown"&&v.jsx(om,{content:p.content,frontmatter:p.frontmatter}),(p==null?void 0:p.type)==="json"&&v.jsx("pre",{className:"brain-codeblock",children:p.data!==void 0?JSON.stringify(p.data,null,2):p.raw??"(empty)"}),(p==null?void 0:p.type)==="text"&&v.jsx("pre",{className:"brain-codeblock",children:p.content}),!h&&r.group==="tag"&&v.jsxs("p",{className:"brain-description",children:["Tag ",v.jsxs("code",{children:["#",r.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&r.group!=="tag"&&v.jsx("p",{className:"brain-description",children:r.meta.description??"No file content."}),n.length>0&&v.jsxs("section",{className:"brain-drawer-section",children:[v.jsxs("h3",{className:"brain-drawer-section-title",children:["Connections (",n.length,") · in ",a," · total ",o]}),v.jsx("div",{className:"brain-related-list",children:n.map(({node:g,kind:x})=>v.jsxs("button",{className:"brain-related-item",onClick:()=>i(g.id),children:[v.jsx("span",{className:"brain-related-dot",style:{background:cB[g.group]}}),v.jsx("span",{children:g.label}),v.jsx("span",{className:"brain-related-kind",children:jtt[x]??x})]},`${g.id}-${x}`))})]})]}),d&&c&&v.jsx("div",{className:"brain-drawer-footer",children:v.jsxs("button",{className:"brain-btn",onClick:()=>c(d,r.id),children:["Open in ",d.charAt(0).toUpperCase()+d.slice(1)," to edit →"]})})]})}const $tt=et.lazy(()=>Ce(()=>import("./BrainCanvas3D-BLJ4_SqE.js"),[]).then(r=>({default:r.BrainCanvas3D}))),ztt={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},qtt={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function hB(r){return typeof r=="string"?r:r.id}function kN(r){const e=r.group==="soul"?8:r.group==="user"||r.group==="memory"?6:r.group==="tag"?3:4,i=r.__inDegree??0;return e+Math.min(14,i*1.2)}function uB(r,e){return Math.sqrt(kN(r)*e)*3}function Itt(r,e,i){for(const{group:n,parsed:a}of e)if(a.match(r))return n.color;return i[r.group]}function Ptt({onNavigate:r}){const{data:e,isLoading:i,error:n}=_tt(),a=la(),{settings:o,patch:c,setGroups:h,reset:u}=wtt(),{resolved:d}=Ng(),p=d==="dark",g=p?ztt:qtt,x=et.useRef(null),y=et.useRef(void 0),[b,_]=et.useState({w:0,h:0}),[k,w]=et.useState(null),[T,B]=et.useState(null),[E,O]=et.useState(!0),j=et.useRef(!1);et.useEffect(()=>{if(!x.current)return;const st=x.current,Ct=()=>_({w:st.clientWidth,h:st.clientHeight});Ct();const mt=new ResizeObserver(Ct);return mt.observe(st),()=>mt.disconnect()},[]);const M=et.useMemo(()=>oB(o.filters.search),[o.filters.search]),N=et.useMemo(()=>o.groups.map(st=>({group:st,parsed:oB(st.query)})).filter(({parsed:st})=>!st.isEmpty),[o.groups]),{filteredData:Y,neighborsById:$,totalDegreeById:z,inDegreeById:K}=et.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const st=new Map,Ct=new Map;for(const At of e.nodes)st.set(At.id,0),Ct.set(At.id,0);for(const At of e.links){const Jt=typeof At.source=="string"?At.source:At.source.id,Ae=typeof At.target=="string"?At.target:At.target.id;st.set(Ae,(st.get(Ae)??0)+1),Ct.set(Jt,(Ct.get(Jt)??0)+1),Ct.set(Ae,(Ct.get(Ae)??0)+1)}const mt=At=>(Ct.get(At)??0)===0,Bt=[],Yt=new Set;for(const At of e.nodes){if(!o.filters.showTags&&At.group==="tag"||!o.filters.showOrphans&&mt(At.id)||!M.isEmpty&&!M.match(At))continue;const Jt={...At};Jt.__inDegree=st.get(At.id)??0,Jt.__totalDegree=Ct.get(At.id)??0,Jt.__color=Itt(At,N,g),Bt.push(Jt),Yt.add(At.id)}const qt=[],Vt=new Map;for(const At of Bt)Vt.set(At.id,new Set);for(const At of e.links){const Jt=typeof At.source=="string"?At.source:At.source.id,Ae=typeof At.target=="string"?At.target:At.target.id;!Yt.has(Jt)||!Yt.has(Ae)||(qt.push({source:Jt,target:Ae,kind:At.kind}),Vt.get(Jt).add(Ae),Vt.get(Ae).add(Jt))}return{filteredData:{nodes:Bt,links:qt},neighborsById:Vt,totalDegreeById:Ct,inDegreeById:st}},[e,o.filters,M,N]),W=et.useMemo(()=>Stt(o.forces),[o.forces]),F=.4+o.display.nodeSize*2.2;et.useEffect(()=>{var Yt,qt,Vt,At,Jt,Ae,ar,Rr,he;const st=y.current;if(!st)return;const Ct=(Yt=st.d3Force)==null?void 0:Yt.call(st,"charge");Ct!=null&&Ct.strength&&Ct.strength(W.repelStrength),Ct!=null&&Ct.distanceMax&&Ct.distanceMax(420);const mt=(qt=st.d3Force)==null?void 0:qt.call(st,"link");mt&&((Vt=mt.strength)==null||Vt.call(mt,W.linkStrength),(At=mt.distance)==null||At.call(mt,W.linkDistance));const Bt=(Jt=st.d3Force)==null?void 0:Jt.call(st,"center");Bt!=null&&Bt.strength&&Bt.strength(W.centerStrength),(Ae=st.d3Force)==null||Ae.call(st,"collide",mJ().radius(Ee=>uB(Ee,F)+4).strength(.9).iterations(2)),(ar=st.d3Force)==null||ar.call(st,"x",EJ(0).strength(W.centerStrength*.4)),(Rr=st.d3Force)==null||Rr.call(st,"y",MJ(0).strength(W.centerStrength*.4)),(he=st.d3ReheatSimulation)==null||he.call(st)},[W,F,Y]),et.useEffect(()=>{j.current=!1},[e==null?void 0:e.nodes.length]),et.useEffect(()=>{if(!e||!Y.nodes.length)return;const st=[];return[800,1600,2600].forEach(Ct=>{st.push(setTimeout(()=>{var Bt;if(j.current)return;const mt=y.current;mt&&((Bt=mt.zoomToFit)==null||Bt.call(mt,500,80),Ct>=2600&&(j.current=!0))},Ct))}),()=>st.forEach(clearTimeout)},[e,Y.nodes.length]);const U=et.useMemo(()=>Y.nodes.find(st=>st.id===k)??null,[Y,k]),R=et.useMemo(()=>{if(!U||!e)return[];const st=[],Ct=new Map(e.nodes.map(mt=>[mt.id,mt]));for(const mt of e.links){const Bt=typeof mt.source=="string"?mt.source:mt.source.id,Yt=typeof mt.target=="string"?mt.target:mt.target.id;if(Bt===U.id){const qt=Ct.get(Yt);qt&&st.push({node:qt,kind:mt.kind})}else if(Yt===U.id){const qt=Ct.get(Bt);qt&&st.push({node:qt,kind:mt.kind})}}return st},[e,U]),I=st=>{w(st.id);const Ct=y.current;Ct&&typeof st.x=="number"&&typeof st.y=="number"&&(Ct.centerAt(st.x,st.y,400),Ct.zoom(Math.max(Ct.zoom(),2.2),400))},H=()=>a.invalidateQueries({queryKey:["graph"]});et.useEffect(()=>{const st=Ct=>{var Yt;if((Yt=Ct.target)!=null&&Yt.matches("input,textarea"))return;const mt=y.current;if(!mt)return;const Bt=mt.zoom();if(Ct.key==="+"||Ct.key==="=")mt.zoom(Bt*1.2,200);else if(Ct.key==="-"||Ct.key==="_")mt.zoom(Bt/1.2,200);else if(Ct.key.startsWith("Arrow")){const qt=Ct.shiftKey?120:40,Vt=mt.centerAt();let At=0,Jt=0;Ct.key==="ArrowUp"?Jt=-qt:Ct.key==="ArrowDown"?Jt=qt:Ct.key==="ArrowLeft"?At=-qt:Ct.key==="ArrowRight"&&(At=qt),mt.centerAt(((Vt==null?void 0:Vt.x)??0)+At/Bt,((Vt==null?void 0:Vt.y)??0)+Jt/Bt,150)}};return window.addEventListener("keydown",st),()=>window.removeEventListener("keydown",st)},[]);const G=T??k,Z=G?$.get(G)??new Set:null,P=st=>!G||st===G?!1:!(Z!=null&&Z.has(st)),J=st=>{const Ct=st.__color??g[st.group];return P(st.id)?Htt(Ct,p?.18:.3):Ct},nt=st=>{const Ct=hB(st.source),mt=hB(st.target);return G?Ct===G||mt===G?p?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":p?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":p?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},ut=.5+o.display.linkThickness*2.5,gt=st=>st.kind==="sibling_core"||st.kind==="release_includes"?ut*1.3:ut,kt=st=>kN(st)*F,Et=(1-o.display.textFadeThreshold)*.8;return v.jsxs("div",{className:"brain-page",children:[v.jsxs("header",{className:"brain-header",children:[v.jsxs("h1",{className:"brain-title",children:[v.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&v.jsxs("span",{className:"brain-stats",children:[Y.nodes.length,"/",e.nodes.length," nodes · ",Y.links.length," links"]}),v.jsxs("div",{className:"brain-header-actions",children:[v.jsx("button",{className:"brain-btn",onClick:H,title:"Refresh",children:"↻"}),v.jsx("button",{className:`brain-btn ${E?"brain-btn--active":""}`,onClick:()=>O(st=>!st),title:"Graph settings",children:"⚙"})]})]}),v.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>B(null),onPointerDown:()=>B(null),children:[E&&v.jsx(Mtt,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>O(!1)}),i&&v.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&v.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&Y.nodes.length===0&&!i&&v.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&Y.nodes.length>0&&b.w>0&&o.display.view!=="3d"&&v.jsx(jv,{ref:y,graphData:Y,width:b.w,height:b.h,backgroundColor:p?"#151518":"#ffffff",nodeId:"id",nodeLabel:st=>st.label,nodeColor:st=>J(st),nodeVal:st=>kt(st),nodeRelSize:3,linkColor:st=>nt(st),linkWidth:st=>gt(st),linkDirectionalArrowLength:st=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>p?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:st=>I(st),onNodeHover:st=>B(st?st.id:null),onNodeDrag:()=>B(null),onZoom:()=>B(null),onBackgroundClick:()=>{w(null),B(null)},onEngineStop:()=>{var Ct;if(j.current)return;const st=y.current;st&&((Ct=st.zoomToFit)==null||Ct.call(st,600,80),j.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(st,Ct,mt)=>{if(!(st.id===T||st.id===k||G&&(Z==null?void 0:Z.has(st.id)))&&mt<Et)return;const Yt=st.label,qt=Math.max(10,13/Math.max(mt,.7));Ct.font=`${qt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,Ct.textAlign="center",Ct.textBaseline="top";const Vt=uB(st,F),At=(st.y??0)+Vt+3,Jt=P(st.id);p?Ct.fillStyle=Jt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":Ct.fillStyle=Jt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",Ct.fillText(Yt,st.x??0,At)}}),e&&Y.nodes.length>0&&b.w>0&&o.display.view==="3d"&&v.jsx(et.Suspense,{fallback:v.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:v.jsx($tt,{graphData:Y,width:b.w,height:b.h,isDark:p,nodeColor:J,nodeVal:kt,linkColor:nt,linkWidth:gt,showArrows:o.display.arrows,forces:W,nodeSizeScale:F,isDimmed:P,neighborsById:$,onNodeClick:I,onNodeHover:st=>B(st?st.id:null),onBackgroundClick:()=>{w(null),B(null)}})}),v.jsx(Ftt,{node:U,onClose:()=>w(null),onSelectRelated:st=>w(st),relatedNodes:R,inDegree:U?K.get(U.id)??0:0,totalDegree:U?z.get(U.id)??0:0,onNavigate:r})]})]})}function Htt(r,e){const i=r.replace("#",""),n=parseInt(i,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function Utt(){return ji({queryKey:["council"],queryFn:()=>fr.get("/council"),select:r=>r.debates})}function Wtt(r){return ji({queryKey:["council",r],queryFn:()=>fr.get(`/council/${r}`),select:e=>e.debate,enabled:!!r})}function SN(r){if(!r)return null;const e=r.split(`
|
|
473
|
+
`)[0].trim();if(!e)return null;const n=e.replace(/^(recommend(?:ed|ing)?|i\s+(?:would\s+)?recommend|proposal|my\s+position|conclusion|verdict)\s*[:\-—]?\s*/i,"").replace(/\.$/,"").split(/\s+/).slice(0,3).join(" ");return(n.length>18?n.slice(0,17).trimEnd()+"…":n).toUpperCase()}function Ytt(r){if(!r)return"other";const e=r.toLowerCase();return/\b(go\b|ship|launch|proceed|approve|yes|adopt|migrate\b)/.test(e)?"go":/\b(defer|postpone|delay|wait|later|q[2-9]|next\s+(?:quarter|year))/.test(e)?"defer":/\b(no-go|no\b|reject|abandon|stop|cancel|block)/.test(e)?"hold":/\b(pivot|phased|poc|proof.?of.?concept|pilot|partial|subset|scope\s+down)/.test(e)?"pivot":"other"}function wN(r,e){return r.rounds.find(i=>i.round===e)??null}function TN(r){if(!r.reactions)return 0;const e=(r.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(r.reactions.match(/^####\s+/gm)??[]).length}function Gtt(r,e){if(!r.reactions)return[];const i=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(r.reactions))!==null;)i.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function Vtt(r){return r.openQuestions?(r.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function Xtt(r){const e=r.frontmatter.rounds_planned||r.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),i=r.personas.length,n=r.personas.reduce((c,h)=>c+h.rounds.reduce((u,d)=>u+TN(d),0),0);let a=0,o=0;if(r.finalReport){const c=r.finalReport.content,h=c.match(/##\s+Open\s+risks\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);h&&(a=(h[1].match(/^\s*[-*]/gm)??[]).length);const u=c.match(/##\s+Minority\s+views\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);if(u){const d=u[1].trim();d.length>0&&!/\(none\)|n\/?a/i.test(d)&&(o=Math.max(1,(d.match(/^\s*[-*]/gm)??[]).length))}}return{rounds:e,personas:i,pushbacks:n,openRisks:a,minorityViews:o}}function Qtt(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return e%360}const fB=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function Ztt(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return fB[e%fB.length]}function Ktt(r){const e=(r||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function Jtt(r){const e={verdict:"",appendix:null,sections:[]},i=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=i.exec(r))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function jf({slug:r,size:e=36,title:i,onClick:n}){const a=Qtt(r),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=Ztt(r);return v.jsx("span",{className:"council-avatar",onClick:n,title:i??r,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":r,children:c})}const tet=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function eet(r,e,i){var a;if(i!=="all"&&(i==="in_progress"&&!r.status.endsWith("_running")||i==="synthesizing"&&r.status!=="synthesizing"||i==="complete"&&r.status!=="complete"||i==="promoted"&&!r.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((r.topic||"").toLowerCase().includes(n)||r.id.toLowerCase().includes(n)||(a=r.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function ret(r){return r==="complete"?"council-hall-status--complete":r==="synthesizing"?"council-hall-status--synth":r.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function iet(r){return r==="complete"?"Complete":r==="synthesizing"?"Synthesizing":r.endsWith("_running")?"In progress":"Pending"}function net({debates:r,onOpen:e}){const{t:i}=ri(),[n,a]=et.useState(""),[o,c]=et.useState("all"),h=et.useMemo(()=>r.filter(u=>eet(u,n,o)),[r,n,o]);return v.jsxs("div",{className:"council-hall",children:[v.jsxs("div",{className:"council-hall-bar",children:[v.jsxs("label",{className:"council-hall-search",children:[v.jsx("span",{"aria-hidden":!0,children:"🔍"}),v.jsx("input",{type:"search",value:n,onChange:u=>a(u.target.value),placeholder:i("council.search.placeholder")})]}),v.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":i("council.filter.status"),children:tet.map(u=>v.jsx("option",{value:u.value,children:u.label},u.value))}),v.jsxs("span",{className:"council-hall-count",children:[h.length," / ",r.length]})]}),h.length===0?v.jsx("div",{className:"council-empty",children:i("council.empty.list")}):v.jsx("div",{className:"council-hall-grid",children:h.map(u=>v.jsxs("button",{type:"button",className:"council-hall-card",onClick:()=>e(u.id),children:[v.jsxs("div",{className:"council-hall-card-head",children:[v.jsxs("span",{className:`council-hall-status ${ret(u.status)}`,children:[v.jsx("span",{className:"council-hall-status-dot"}),iet(u.status)]}),v.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),v.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),v.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&v.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((d,p)=>v.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-p},children:v.jsx(jf,{slug:d,size:20})},d)),u.personaSlugs.length>6&&v.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),v.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&v.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function aet(r){var e,i;if(r==="complete")return{label:"Complete",tone:"complete"};if(r==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(r)){const n=(e=r.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(r)){const n=(i=r.match(/^round_(\d+)_complete$/))==null?void 0:i[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return r==="created"?{label:"Created",tone:"pending"}:{label:r,tone:"pending"}}function set({status:r,size:e="md"}){const{label:i,tone:n}=aet(r);return v.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[v.jsx("span",{className:"council-status-dot"}),i]})}function wu({value:r,label:e,tone:i="default"}){return v.jsxs("div",{className:`council-stat-tile council-stat-tile--${i}`,children:[v.jsx("div",{className:"council-stat-value",children:r}),v.jsx("div",{className:"council-stat-label",children:e})]})}function oet({debate:r,onCiteJump:e,onAgentJump:i}){const{t:n}=ri(),a=et.useMemo(()=>Xtt(r),[r]),o=r.finalReport?Jtt(r.finalReport.content):null,c=r.personas.map(u=>u.slug),h=u=>{const d=u.toLowerCase();return/\b(risk|danger|warning|caveat)/.test(d)?"council-ov-card--risks":/\b(minority|dissent|objection)/.test(d)?"council-ov-card--minority":/^why\b/.test(d)?"council-ov-card--why":""};return v.jsxs("div",{className:"council-ov",children:[v.jsxs("section",{className:"council-ov-problem",children:[v.jsx("div",{className:"council-ov-label",children:"Problem"}),v.jsx("h2",{className:"council-ov-topic",children:r.frontmatter.topic||r.frontmatter.id}),r.frontmatter.promoted_to_knowledge&&v.jsxs("div",{className:"council-ov-promoted",children:[v.jsx("span",{children:"📜"}),v.jsxs("span",{children:["Promoted to knowledge: ",v.jsx("code",{children:r.frontmatter.promoted_to_knowledge})]})]})]}),!o&&v.jsxs("section",{className:"council-ov-pending",children:[v.jsx("div",{className:"council-ov-label",children:n("council.verdict.awaitingSynthesis")}),v.jsx("p",{children:n("council.verdict.synthPending")}),r.roundLog&&v.jsxs("div",{className:"council-roundlog",children:[v.jsx("h4",{children:"Round log"}),v.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(r.roundLog)}})]})]}),o&&v.jsxs(v.Fragment,{children:[v.jsxs("section",{className:"council-ov-verdict",children:[v.jsx("div",{className:"council-ov-label",children:"Verdict"}),v.jsx("div",{className:"council-ov-verdict-text",dangerouslySetInnerHTML:{__html:ae.parse(o.verdict||"*No verdict section found.*")}})]}),v.jsxs("div",{className:"council-ov-stats",children:[v.jsx(wu,{value:a.rounds,label:"rounds"}),v.jsx(wu,{value:a.personas,label:"personas"}),v.jsx(wu,{value:a.pushbacks,label:"pushbacks"}),v.jsx(wu,{value:a.openRisks,label:"open risks",tone:"warning"}),v.jsx(wu,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&v.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>v.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[v.jsx("h3",{children:u.heading}),v.jsx(cet,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:i})]},u.heading))}),o.appendix&&v.jsxs("details",{className:"council-ov-appendix",children:[v.jsx("summary",{children:o.appendix.heading}),v.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(o.appendix.body)}})]})]})]})}function cet({text:r,knownSlugs:e,onCiteJump:i,onAgentJump:n}){const a=[],o=new Set(e);let c=r.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(x,y,b)=>{if(!o.has(y))return x;const _=a.length;return a.push({slug:y,round:Number(b)}),`\0CITE${_}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(x,y)=>{if(!o.has(y))return x;const b=h.length;return h.push(y),`\0AGENT${b}\0`});const d=ae.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),p=[];let g=0;for(;g<d.length;){const x=d[g];if(g+2<d.length&&(d[g+1]==="CITE"||d[g+1]==="AGENT")){p.push(v.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`));const y=d[g+1],b=Number(d[g+2]);if(y==="CITE"){const _=a[b];p.push(v.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>i(_.slug,_.round),children:[v.jsx(jf,{slug:_.slug,size:14}),v.jsx("span",{children:_.slug}),v.jsxs("span",{className:"council-cite-round",children:["R",_.round]})]},`c-${g}`))}else{const _=h[b];p.push(v.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(_),children:_},`a-${g}`))}g+=3}else p.push(v.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`)),g+=1}return v.jsx("div",{className:"council-sheet-prose council-citation-prose",children:p})}function BN({model:r}){const e=Ktt(r),i=r?r.charAt(0).toUpperCase()+r.slice(1):"unknown";return v.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${i}`,children:i})}function het(r,e){if(!e.trim())return!0;const i=e.trim().toLowerCase();if(r.slug.toLowerCase().includes(i))return!0;for(const n of r.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
|
|
474
|
+
`).toLowerCase().includes(i))return!0;return!1}function Dv(r,e){if(!e.trim())return r;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return r.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function uet({debate:r,focusSlug:e}){const{t:i}=ri(),[n,a]=et.useState(""),[o,c]=et.useState(()=>new Set),h=et.useRef(null),u=et.useMemo(()=>r.personas.filter(p=>het(p,n)),[r.personas,n]);et.useEffect(()=>{if(!e)return;c(g=>{const x=new Set(g);return x.delete(e),x});const p=setTimeout(()=>{var x;const g=(x=h.current)==null?void 0:x.querySelector(`[data-agent="${e}"]`);g==null||g.scrollIntoView({behavior:"smooth",block:"start"})},30);return()=>clearTimeout(p)},[e]);const d=p=>{c(g=>{const x=new Set(g);return x.has(p)?x.delete(p):x.add(p),x})};return v.jsxs("div",{className:"council-transcript",ref:h,children:[v.jsxs("div",{className:"council-transcript-searchbar",children:[v.jsxs("label",{className:"council-transcript-search",children:[v.jsx("span",{"aria-hidden":!0,children:"🔍"}),v.jsx("input",{type:"search",value:n,onChange:p=>a(p.target.value),placeholder:i("council.search.transcript")})]}),v.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",r.personas.length," persona",r.personas.length===1?"":"s"]})]}),v.jsxs("div",{className:"council-transcript-body",children:[u.length===0&&v.jsx("div",{className:"council-empty",children:"No personas match this search."}),u.map(p=>v.jsx(fet,{persona:p,query:n,collapsed:o.has(p.slug),highlighted:e===p.slug,onToggle:()=>d(p.slug)},p.slug))]})]})}function fet({persona:r,query:e,collapsed:i,highlighted:n,onToggle:a}){return v.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":r.slug,children:[v.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[v.jsxs("div",{className:"council-transcript-block-title",children:[v.jsx(jf,{slug:r.slug,size:24}),v.jsxs("div",{children:[v.jsx("h3",{className:"council-transcript-block-name",children:r.slug}),v.jsxs("div",{className:"council-transcript-block-meta",children:[v.jsx(BN,{model:r.frontmatter.model}),r.frontmatter.aspects.slice(0,4).map(o=>v.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),v.jsx("span",{className:`council-transcript-chev ${i?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!i&&v.jsxs("div",{className:"council-transcript-block-body",children:[r.persona&&v.jsxs("section",{className:"council-sheet-section",children:[v.jsx("h4",{children:"Persona prompt"}),v.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Dv(ae.parse(r.persona),e)}})]}),r.rounds.length===0&&v.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),r.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>v.jsx(det,{round:o,crossContext:r.crossContext[o.round]??null,query:e},o.round)),r.researches.length>0&&v.jsxs("section",{className:"council-sheet-section",children:[v.jsx("h4",{children:"Research notes"}),v.jsx("ul",{className:"council-research-list",children:r.researches.map(o=>v.jsxs("li",{children:[v.jsx("span",{className:"council-research-topic",children:o.topic}),v.jsx("span",{className:"council-research-date",children:o.added_at})]},o.slug))})]})]})]})}function det({round:r,crossContext:e,query:i}){const n=SN(r.position);return v.jsxs("section",{className:"council-round-panel",children:[v.jsxs("header",{className:"council-round-panel-head",children:[v.jsxs("h4",{className:"council-round-panel-title",children:["Round ",r.round]}),n&&v.jsx("span",{className:"council-chip-pos",children:n})]}),e&&v.jsxs("blockquote",{className:"council-crosscontext",children:[v.jsx("strong",{children:"Cross-context loaded"}),v.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Dv(ae.parse(e),i)}})]}),r.executiveSummary&&v.jsx(Tu,{title:"Executive summary",body:r.executiveSummary,query:i}),r.position&&v.jsx(Tu,{title:"Position",body:r.position,query:i}),r.reasoning&&v.jsx(Tu,{title:"Reasoning",body:r.reasoning,query:i}),r.reactions&&v.jsx(Tu,{title:"Reactions to peers",body:r.reactions,query:i}),r.openQuestions&&v.jsx(Tu,{title:"Open questions",body:r.openQuestions,query:i})]})}function Tu({title:r,body:e,query:i}){const n=Dv(ae.parse(e),i);return v.jsxs("div",{className:"council-round-sub",children:[v.jsx("h5",{className:"council-round-sub-title",children:r}),v.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function AN(r,e){return e.trim()?r?[r.executiveSummary,r.position,r.reasoning].filter(Boolean).join(`
|
|
475
|
+
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function pet({debate:r,query:e,onQueryChange:i,selected:n,onSelectCell:a,onClearSelection:o}){const c=et.useRef(null),h=et.useMemo(()=>Array.from({length:Math.max(1,r.frontmatter.rounds_planned)},(p,g)=>g+1),[r.frontmatter.rounds_planned]),u=et.useMemo(()=>r.personas.map(p=>p.slug),[r.personas]),d=et.useMemo(()=>{if(!e.trim())return null;let p=0;for(const g of r.personas)for(const x of h)AN(wN(g,x),e)&&p++;return p},[e,r,h]);return et.useEffect(()=>{if(!n)return;const p=g=>{const x=g.target;if(x&&["INPUT","TEXTAREA"].includes(x.tagName))return;if(g.key==="Escape"){o();return}const y=r.personas.findIndex(_=>_.slug===n.slug);if(y===-1)return;const b=r.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<b?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&y<r.personas.length-1?(g.preventDefault(),a(r.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(r.personas[y-1].slug,n.round))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,r,o,a]),et.useEffect(()=>{if(!n||!c.current)return;const p=c.current.querySelector(`[data-persona="${n.slug}"][data-round="${n.round}"]`);p==null||p.scrollIntoView({behavior:"smooth",block:"center"})},[n]),v.jsxs("div",{className:"council-matrix",children:[v.jsxs("div",{className:"council-matrix-bar",children:[v.jsxs("label",{className:"council-matrix-search-input",children:[v.jsx("span",{className:"council-matrix-search-icon","aria-hidden":!0,children:"🔍"}),v.jsx("input",{type:"search",value:e,onChange:p=>i(p.target.value),placeholder:"Filter cells by text…"}),e&&v.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>i(""),children:"×"})]}),d!=null&&v.jsxs("span",{className:"council-matrix-count",children:[d," match",d===1?"":"es"]})]}),v.jsx("div",{className:"council-matrix-scroll",ref:c,children:v.jsxs("div",{className:"council-matrix-grid",style:{gridTemplateColumns:`180px repeat(${h.length}, minmax(220px, 1fr))`},children:[v.jsx("div",{className:"council-matrix-corner","aria-hidden":!0}),h.map(p=>{const g=r.frontmatter.status===`round_${p}_running`,x=r.frontmatter.current_round>=p&&!g;return v.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${x?"is-done":""}`,children:["Round ",p]},`h-${p}`)}),r.personas.map(p=>v.jsx(get,{persona:p,rounds:h,debate:r,query:e,selected:n,knownSlugs:u,onSelectCell:a},p.slug))]})})]})}function get({persona:r,rounds:e,debate:i,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return v.jsxs(v.Fragment,{children:[v.jsxs("aside",{className:"council-matrix-row-head",children:[v.jsx(jf,{slug:r.slug,size:22}),v.jsxs("div",{className:"council-matrix-row-id",children:[v.jsx("div",{className:"council-matrix-row-name",children:r.slug}),v.jsx(BN,{model:r.frontmatter.model})]})]}),e.map(h=>{const u=wN(r,h),d=i.frontmatter.status===`round_${h}_running`,p=!!a&&a.slug===r.slug&&a.round===h,g=AN(u,n),x=!!n.trim()&&!g;return v.jsx(met,{personaSlug:r.slug,round:h,data:u,isRunning:d,active:p,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function met({personaSlug:r,round:e,data:i,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!i)return v.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,children:v.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=SN(i.position),d=Ytt(i.position),p=TN(i),g=Vtt(i),x=Gtt(i,c);return v.jsxs("button",{type:"button",className:`council-cell council-cell--${d} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,onClick:()=>h(r,e),children:[v.jsxs("div",{className:"council-cell-top",children:[u&&v.jsx("span",{className:`council-chip-pos council-chip-pos--${d}`,children:u}),(p>0||g>0)&&v.jsxs("span",{className:"council-cell-meta",children:[p>0&&v.jsxs(v.Fragment,{children:["↯ ",p]}),p>0&&g>0&&v.jsx("span",{children:" · "}),g>0&&v.jsxs(v.Fragment,{children:["? ",g]})]})]}),!a&&i.executiveSummary&&v.jsx("p",{className:"council-cell-exec",children:i.executiveSummary}),a&&v.jsxs("div",{className:"council-cell-full",children:[i.executiveSummary&&v.jsx(Bu,{title:"Executive summary",children:v.jsx("p",{children:i.executiveSummary})}),i.position&&v.jsx(Bu,{title:"Position",children:v.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(i.position)}})}),i.reasoning&&v.jsx(Bu,{title:"Reasoning",children:v.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(i.reasoning)}})}),i.reactions&&v.jsxs(Bu,{title:"Reactions to peers",children:[v.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(i.reactions)}}),x.length>0&&v.jsx("div",{className:"council-cell-react-chips",children:x.map(y=>v.jsxs("span",{className:"council-cell-react-chip",children:[v.jsx(jf,{slug:y,size:14}),v.jsx("span",{children:y})]},y))})]}),i.openQuestions&&v.jsx(Bu,{title:"Open questions",children:v.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(i.openQuestions)}})})]})]})}function Bu({title:r,children:e}){return v.jsxs("section",{className:"council-cell-sub",children:[v.jsx("h5",{children:r}),v.jsx("div",{className:"council-cell-sub-body",children:e})]})}function dB(r){return r==="complete"||r==="synthesizing"?"overview":"matrix"}function yet({debate:r,onBack:e}){const{t:i}=ri(),[n,a]=et.useState(()=>dB(r.frontmatter.status)),[o,c]=et.useState(""),[h,u]=et.useState(null),[d,p]=et.useState(null);et.useEffect(()=>{a(dB(r.frontmatter.status)),c(""),u(null),p(null)},[r.frontmatter.id]);const g=(b,_)=>{a("matrix"),u({slug:b,round:_})},x=b=>{a("agents"),p(b)},y=()=>{var b;return(b=navigator.clipboard)==null?void 0:b.writeText(r.frontmatter.id).catch(()=>{})};return v.jsxs("div",{className:"council-detail",children:[v.jsxs("header",{className:"council-detail-head",children:[v.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",i("council.title")]}),v.jsxs("div",{className:"council-detail-meta",children:[v.jsx(set,{status:r.frontmatter.status}),v.jsxs("span",{className:"council-detail-rounds",children:["R",r.frontmatter.current_round,"/",r.frontmatter.rounds_planned]}),v.jsx("span",{className:"council-session-dot",children:"·"}),v.jsx("span",{className:"council-detail-date",children:r.frontmatter.created_at}),v.jsx("span",{className:"council-session-dot",children:"·"}),v.jsx("button",{type:"button",className:"council-session-id",onClick:y,title:"Copy debate id",children:r.frontmatter.id})]})]}),v.jsxs("nav",{className:"council-tabs",role:"tablist",children:[v.jsx(gx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),v.jsx(gx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),v.jsx(gx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),v.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&v.jsx(oet,{debate:r,onCiteJump:g,onAgentJump:x}),n==="agents"&&v.jsx(uet,{debate:r,focusSlug:d}),n==="matrix"&&v.jsx(pet,{debate:r,query:o,onQueryChange:c,selected:h,onSelectCell:(b,_)=>u({slug:b,round:_}),onClearSelection:()=>u(null)})]})]})}function gx({active:r,onClick:e,label:i}){return v.jsx("button",{type:"button",role:"tab","aria-selected":r,className:`council-tab ${r?"is-active":""}`,onClick:e,children:i})}function xet(){const{t:r}=ri(),{data:e,isLoading:i,isError:n,error:a}=Utt(),[o,c]=et.useState(null),{data:h,isLoading:u}=Wtt(o);return i?v.jsx("div",{className:"loading",children:r("common.loading")}):n?v.jsxs("div",{className:"error-state",children:["Failed to load council sessions. ",a==null?void 0:a.message]}):o?v.jsxs("div",{className:"council-page council-page--detail",children:[u&&v.jsx("div",{className:"loading",children:"Loading session…"}),h&&v.jsx(yet,{debate:h,onBack:()=>c(null)})]}):v.jsxs("div",{className:"council-page",children:[v.jsx("h1",{className:"page-title",children:r("council.title")}),v.jsx(net,{debates:e??[],onOpen:c})]})}const bet=new dj({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function vet({nav:r}){const e=(i,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};r.navigate(a[i],n)};switch(r.page){case"brain":return v.jsx(Ptt,{onNavigate:e});case"tasks":return v.jsx(mQ,{});case"sleep":return v.jsx(yQ,{});case"core":return v.jsx(NQ,{});case"knowledge":return v.jsx(FQ,{});case"features":return v.jsx($Q,{});case"council":return v.jsx(xet,{})}}class Cet extends et.Component{constructor(){super(...arguments);Ut(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?v.jsxs("div",{className:"error-boundary",children:[v.jsx("h1",{children:"Something went wrong."}),v.jsx("p",{children:this.state.error.message}),v.jsx("button",{onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}function _et(){return v.jsx(Cet,{children:v.jsx(pj,{client:bet,children:v.jsx(Oj,{children:v.jsx(Tj,{children:v.jsx(Aj,{children:v.jsx(qj,{children:r=>v.jsx(vet,{nav:r})})})})})})})}HR.createRoot(document.getElementById("root")).render(v.jsx(et.StrictMode,{children:v.jsx(_et,{})}));export{jA as $,Met as A,ro as B,uF as C,nr as D,Y6 as E,av as F,SA as G,sH as H,u9 as I,yq as J,QF as K,Ju as L,Aet as M,Zg as N,T6 as O,NA as P,hS as Q,X7 as R,Jx as S,aH as T,kf as U,Dn as V,pt as W,ft as X,R6 as Y,ZP as Z,A as _,q6 as a,MI as a$,W7 as a0,FS as a1,DS as a2,zet as a3,Ret as a4,Fet as a5,Det as a6,Oet as a7,D1 as a8,$et as a9,vW as aA,bW as aB,hE as aC,P7 as aD,kU as aE,pA as aF,Y7 as aG,Bet as aH,Qg as aI,pg as aJ,aZ as aK,B5 as aL,Og as aM,Lf as aN,CU as aO,vU as aP,H7 as aQ,E1 as aR,Is as aS,nf as aT,BS as aU,iz as aV,wP as aW,w5 as aX,x5 as aY,EI as aZ,ug as a_,Net as aa,sc as ab,Iet as ac,qet as ad,jet as ae,VU as af,$L as ag,nrt as ah,bq as ai,gi as aj,es as ak,hu as al,sv as am,N5 as an,pl as ao,F5 as ap,ie as aq,aa as ar,jt as as,QW as at,irt as au,art as av,ert as aw,zt as ax,rrt as ay,wW as az,z6 as b,lo as b$,ah as b0,Po as b1,vP as b2,nw as b3,jn as b4,LI as b5,K1 as b6,AI as b7,RI as b8,nh as b9,RK as bA,Ht as bB,U7 as bC,NK as bD,GO as bE,TT as bF,nl as bG,iZ as bH,rt as bI,et as bJ,mJ as bK,EJ as bL,MJ as bM,v as bN,wT as bO,YP as bP,zP as bQ,VP as bR,Yg as bS,TI as bT,Z1 as bU,S5 as bV,QP as bW,LP as bX,bY,Ef as bZ,dg as b_,SP as ba,GP as bb,zI as bc,qP as bd,Q1 as be,Xw as bf,Ft as bg,$5 as bh,Ri as bi,Q$ as bj,A1 as bk,QA as bl,Bf as bm,JA as bn,Let as bo,mS as bp,gS as bq,hF as br,Nr as bs,AX as bt,Me as bu,wv as bv,AJ as bw,TJ as bx,xJ as by,BJ as bz,we as c,JS as c0,J1 as c1,v5 as c2,jb as c3,wet as c4,Ce as c5,Xt as d,RA as e,Lr as f,P6 as g,Ka as h,Rn as i,_q as j,Sf as k,_t as l,j5 as m,Eet as n,ort as o,H6 as p,U6 as q,srt as r,I6 as s,xq as t,Mn as u,pW as v,cH as w,Pet as x,Vc as y,$6 as z};
|