@launchsecure/launch-kit 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-client/assets/index-Dd6IotOZ.css +1 -0
- package/dist/chart-client/index.html +2 -2
- package/dist/client/assets/index-DE0uje6k.css +32 -0
- package/dist/client/index.html +2 -2
- package/dist/council-client/assets/index-CGYusOCK.css +1 -0
- package/dist/council-client/assets/{index-B1v46vTE.js → index-DkTFX53U.js} +1 -1
- package/dist/council-client/index.html +2 -2
- package/dist/deck-client/assets/_baseUniq-BrhDuG3C.js +1 -0
- package/dist/deck-client/assets/arc-DXtPHMhw.js +1 -0
- package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-Cs9IdLQQ.js +36 -0
- package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-CUdblaWk.js → blockDiagram-DXYQGD6D--wpvoBAt.js} +2 -2
- package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-MfAO5lak.js → c4Diagram-AHTNJAMY-BNIKE8-Z.js} +2 -2
- package/dist/deck-client/assets/channel-Bb5wIjTD.js +1 -0
- package/dist/deck-client/assets/chunk-4BX2VUAB-Bz3EWmUo.js +1 -0
- package/dist/deck-client/assets/{chunk-4TB4RGXK-BUJtZ7jO.js → chunk-4TB4RGXK-D55BBvVZ.js} +1 -1
- package/dist/deck-client/assets/chunk-55IACEB6-BzjEcoTi.js +1 -0
- package/dist/deck-client/assets/chunk-EDXVE4YY-CH1vs4Lu.js +1 -0
- package/dist/deck-client/assets/{chunk-FMBD7UC4-PnZ9v6ey.js → chunk-FMBD7UC4-CVRnaGM0.js} +1 -1
- package/dist/deck-client/assets/{chunk-OYMX7WX6-DXrWNOsV.js → chunk-OYMX7WX6-BCTV_aEZ.js} +1 -1
- package/dist/deck-client/assets/chunk-QZHKN3VN-BqM8r4ee.js +1 -0
- package/dist/deck-client/assets/chunk-YZCP3GAM-Rhbb691A.js +1 -0
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CN-ZYMbT.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CN-ZYMbT.js +1 -0
- package/dist/deck-client/assets/clone-D6e7poKG.js +1 -0
- package/dist/deck-client/assets/cose-bilkent-S5V4N54A-fWyBR9Nn.js +1 -0
- package/dist/deck-client/assets/dagre-KV5264BT-Ds0Sqext.js +4 -0
- package/dist/deck-client/assets/diagram-5BDNPKRD-BGz_X007.js +10 -0
- package/dist/deck-client/assets/diagram-G4DWMVQ6-C78jeb-r.js +24 -0
- package/dist/deck-client/assets/diagram-MMDJMWI5-BdoHW8mF.js +43 -0
- package/dist/deck-client/assets/diagram-TYMM5635-C8i9zc-U.js +24 -0
- package/dist/deck-client/assets/{erDiagram-SMLLAGMA-56pn_93p.js → erDiagram-SMLLAGMA-DplAZ-yG.js} +2 -2
- package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-BtV3M5xJ.js → flowDiagram-DWJPFMVM-F3N9yTAB.js} +2 -2
- package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DebdM4S5.js +292 -0
- package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-htCk0oPz.js +106 -0
- package/dist/deck-client/assets/graph-Dtxc2PT4.js +1 -0
- package/dist/deck-client/assets/index-CwAiam97.js +892 -0
- package/dist/deck-client/assets/index-evAPhGvM.css +1 -0
- package/dist/deck-client/assets/infoDiagram-42DDH7IO-gTxegviJ.js +2 -0
- package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DXYkdO3T.js → ishikawaDiagram-UXIWVN3A-DYSEsfUK.js} +5 -5
- package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-C2zBr-J5.js → journeyDiagram-VCZTEJTY-DgVc1q4D.js} +2 -2
- package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-CdoYLS4Z.js → kanban-definition-6JOO6SKY-DcOf3i9N.js} +2 -2
- package/dist/deck-client/assets/layout-CHP9HIw4.js +1 -0
- package/dist/deck-client/assets/linear-XjVb7x4Q.js +1 -0
- package/dist/deck-client/assets/mermaid.core-bouKOnsR.js +309 -0
- package/dist/deck-client/assets/min-Jl4GV9DB.js +1 -0
- package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-oAybLedr.js → mindmap-definition-QFDTVHPH-FXXf4cJx.js} +2 -2
- package/dist/deck-client/assets/pieDiagram-DEJITSTG-Dl4plCTi.js +30 -0
- package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-dtluDZXs.js → quadrantDiagram-34T5L4WZ-BeOEeelg.js} +2 -2
- package/dist/deck-client/assets/{requirementDiagram-MS252O5E-Cq8l7bOl.js → requirementDiagram-MS252O5E-CBh1jchM.js} +2 -2
- package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-BK6gG-ub.js +10 -0
- package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-CYkd7oQK.js → sequenceDiagram-FGHM5R23-BtQwzsF5.js} +2 -2
- package/dist/deck-client/assets/stateDiagram-FHFEXIEX--kLQOi8R.js +1 -0
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CHEPjgB0.js +1 -0
- package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-DZIxSyd1.js → timeline-definition-GMOUNBTQ-CQ_-CLh7.js} +2 -2
- package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-Ct4JVRDM.js → vennDiagram-DHZGUBPP-DBhKYAFT.js} +2 -2
- package/dist/deck-client/assets/{wardley-RL74JXVD-V29ycxOW.js → wardley-RL74JXVD-DLKe29q9.js} +3 -3
- package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-D-Ua6Cmi.js → wardleyDiagram-NUSXRM2D-Brb8ezsV.js} +2 -2
- package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-BPCOuRVl.js → xychartDiagram-5P7HB3ND-LogZ0Az9.js} +2 -2
- package/dist/deck-client/index.html +2 -2
- package/dist/server/cli.js +488 -215
- package/dist/server/council-entry.js +7 -1
- package/dist/server/council-serve.js +7 -1
- package/dist/server/deck-mcp-entry.js +423 -50
- package/dist/server/deck-serve.js +350 -48
- package/dist/server/graph-mcp-entry.js +331 -37
- package/dist/server/init-entry.js +17 -7
- package/dist/server/rover-entry.js +1 -1
- package/package.json +1 -1
- package/scaffolds/ls-marketplace/plugins/kit/skills/comms/SKILL.md +34 -1
- package/scaffolds/ls-marketplace/plugins/kit/skills/gen-test/SKILL.md +126 -0
- package/dist/chart-client/assets/index-CWJFFDPu.css +0 -1
- package/dist/client/assets/index-CTzFcfGV.css +0 -32
- package/dist/council-client/assets/index-ArgRc5mN.css +0 -1
- package/dist/deck-client/assets/_baseUniq-BZP7n41F.js +0 -1
- package/dist/deck-client/assets/arc-31biU3Az.js +0 -1
- package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-DHg6Ss--.js +0 -36
- package/dist/deck-client/assets/channel-BBkRLdnC.js +0 -1
- package/dist/deck-client/assets/chunk-4BX2VUAB-DQ1MrGgN.js +0 -1
- package/dist/deck-client/assets/chunk-55IACEB6-BdSnXB6g.js +0 -1
- package/dist/deck-client/assets/chunk-EDXVE4YY-94yZIUI8.js +0 -1
- package/dist/deck-client/assets/chunk-QZHKN3VN-CsIGIDKX.js +0 -1
- package/dist/deck-client/assets/chunk-YZCP3GAM-DVkBO9tn.js +0 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-DFCaeF-7.js +0 -1
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-DFCaeF-7.js +0 -1
- package/dist/deck-client/assets/clone-GCEVRScB.js +0 -1
- package/dist/deck-client/assets/cose-bilkent-S5V4N54A-m126Oh3b.js +0 -1
- package/dist/deck-client/assets/dagre-KV5264BT-C2aig8U5.js +0 -4
- package/dist/deck-client/assets/diagram-5BDNPKRD-CKpoRfGn.js +0 -10
- package/dist/deck-client/assets/diagram-G4DWMVQ6-Cjh115Ep.js +0 -24
- package/dist/deck-client/assets/diagram-MMDJMWI5-DKlBv_2L.js +0 -43
- package/dist/deck-client/assets/diagram-TYMM5635-CdBh4cEn.js +0 -24
- package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DTIsC6Zg.js +0 -292
- package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-CJYeyCLe.js +0 -106
- package/dist/deck-client/assets/graph-BDvMu1Ss.js +0 -1
- package/dist/deck-client/assets/index-D4eSxcBn.css +0 -1
- package/dist/deck-client/assets/index-QnGVE9PZ.js +0 -1196
- package/dist/deck-client/assets/infoDiagram-42DDH7IO-BWyKJnpW.js +0 -2
- package/dist/deck-client/assets/layout-vOnxnCQU.js +0 -1
- package/dist/deck-client/assets/linear-B0J0WCGz.js +0 -1
- package/dist/deck-client/assets/min-B0AXlT9L.js +0 -1
- package/dist/deck-client/assets/pieDiagram-DEJITSTG-BjHyHxGk.js +0 -30
- package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-C1Vih91z.js +0 -10
- package/dist/deck-client/assets/stateDiagram-FHFEXIEX-CtyG8wBK.js +0 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-BLyKWfcN.js +0 -1
- /package/dist/chart-client/assets/{index-Dzlj-oCj.js → index-CrYM1-ac.js} +0 -0
- /package/dist/client/assets/{index-tTg_ezUF.js → index-BoIjawzY.js} +0 -0
|
@@ -1,1196 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-C2aig8U5.js","assets/graph-BDvMu1Ss.js","assets/_baseUniq-BZP7n41F.js","assets/layout-vOnxnCQU.js","assets/min-B0AXlT9L.js","assets/clone-GCEVRScB.js","assets/cose-bilkent-S5V4N54A-m126Oh3b.js","assets/cytoscape.esm-BQk4lpUV.js","assets/c4Diagram-AHTNJAMY-MfAO5lak.js","assets/chunk-YZCP3GAM-DVkBO9tn.js","assets/flowDiagram-DWJPFMVM-BtV3M5xJ.js","assets/chunk-FMBD7UC4-PnZ9v6ey.js","assets/chunk-55IACEB6-BdSnXB6g.js","assets/chunk-EDXVE4YY-94yZIUI8.js","assets/channel-BBkRLdnC.js","assets/erDiagram-SMLLAGMA-56pn_93p.js","assets/gitGraphDiagram-UUTBAWPF-CJYeyCLe.js","assets/chunk-4BX2VUAB-DQ1MrGgN.js","assets/chunk-QZHKN3VN-CsIGIDKX.js","assets/wardley-RL74JXVD-V29ycxOW.js","assets/ganttDiagram-T4ZO3ILL-DTIsC6Zg.js","assets/linear-B0J0WCGz.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-BWyKJnpW.js","assets/pieDiagram-DEJITSTG-BjHyHxGk.js","assets/arc-31biU3Az.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-34T5L4WZ-dtluDZXs.js","assets/xychartDiagram-5P7HB3ND-BPCOuRVl.js","assets/requirementDiagram-MS252O5E-Cq8l7bOl.js","assets/sequenceDiagram-FGHM5R23-CYkd7oQK.js","assets/classDiagram-6PBFFD2Q-DFCaeF-7.js","assets/chunk-4TB4RGXK-BUJtZ7jO.js","assets/classDiagram-v2-HSJHXN6E-DFCaeF-7.js","assets/stateDiagram-FHFEXIEX-CtyG8wBK.js","assets/chunk-OYMX7WX6-DXrWNOsV.js","assets/stateDiagram-v2-QKLJ7IA2-BLyKWfcN.js","assets/journeyDiagram-VCZTEJTY-C2zBr-J5.js","assets/timeline-definition-GMOUNBTQ-DZIxSyd1.js","assets/mindmap-definition-QFDTVHPH-oAybLedr.js","assets/kanban-definition-6JOO6SKY-CdoYLS4Z.js","assets/sankeyDiagram-XADWPNL6-C1Vih91z.js","assets/diagram-TYMM5635-CdBh4cEn.js","assets/diagram-MMDJMWI5-DKlBv_2L.js","assets/blockDiagram-DXYQGD6D-CUdblaWk.js","assets/diagram-5BDNPKRD-CKpoRfGn.js","assets/architectureDiagram-Q4EWVU46-DHg6Ss--.js","assets/diagram-G4DWMVQ6-Cjh115Ep.js","assets/wardleyDiagram-NUSXRM2D-D-Ua6Cmi.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var F_=Object.defineProperty;var M_=(e,t,r)=>t in e?F_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lt=(e,t,r)=>M_(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(n){if(n.ep)return;n.ep=!0;const o=r(n);fetch(n.href,o)}})();var $_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function b7(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var CC={exports:{}},Th={},bC={exports:{}},bt={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its 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 Ha=Symbol.for("react.element"),I_=Symbol.for("react.portal"),P_=Symbol.for("react.fragment"),O_=Symbol.for("react.strict_mode"),R_=Symbol.for("react.profiler"),D_=Symbol.for("react.provider"),N_=Symbol.for("react.context"),z_=Symbol.for("react.forward_ref"),q_=Symbol.for("react.suspense"),W_=Symbol.for("react.memo"),j_=Symbol.for("react.lazy"),Zm=Symbol.iterator;function H_(e){return e===null||typeof e!="object"?null:(e=Zm&&e[Zm]||e["@@iterator"],typeof e=="function"?e:null)}var kC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vC=Object.assign,wC={};function rs(e,t,r){this.props=e,this.context=t,this.refs=wC,this.updater=r||kC}rs.prototype.isReactComponent={};rs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};rs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function SC(){}SC.prototype=rs.prototype;function _p(e,t,r){this.props=e,this.context=t,this.refs=wC,this.updater=r||kC}var Bp=_p.prototype=new SC;Bp.constructor=_p;vC(Bp,rs.prototype);Bp.isPureReactComponent=!0;var Km=Array.isArray,TC=Object.prototype.hasOwnProperty,Lp={current:null},_C={key:!0,ref:!0,__self:!0,__source:!0};function BC(e,t,r){var i,n={},o=null,s=null;if(t!=null)for(i in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)TC.call(t,i)&&!_C.hasOwnProperty(i)&&(n[i]=t[i]);var a=arguments.length-2;if(a===1)n.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];n.children=l}if(e&&e.defaultProps)for(i in a=e.defaultProps,a)n[i]===void 0&&(n[i]=a[i]);return{$$typeof:Ha,type:e,key:o,ref:s,props:n,_owner:Lp.current}}function U_(e,t){return{$$typeof:Ha,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ep(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ha}function Y_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Jm=/\/+/g;function Su(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Y_(""+e.key):t.toString(36)}function jl(e,t,r,i,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ha:case I_:s=!0}}if(s)return s=e,n=n(s),e=i===""?"."+Su(s,0):i,Km(n)?(r="",e!=null&&(r=e.replace(Jm,"$&/")+"/"),jl(n,t,r,"",function(c){return c})):n!=null&&(Ep(n)&&(n=U_(n,r+(!n.key||s&&s.key===n.key?"":(""+n.key).replace(Jm,"$&/")+"/")+e)),t.push(n)),1;if(s=0,i=i===""?".":i+":",Km(e))for(var a=0;a<e.length;a++){o=e[a];var l=i+Su(o,a);s+=jl(o,t,r,l,n)}else if(l=H_(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=i+Su(o,a++),s+=jl(o,t,r,l,n);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function dl(e,t,r){if(e==null)return e;var i=[],n=0;return jl(e,i,"","",function(o){return t.call(r,o,n++)}),i}function V_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ie={current:null},Hl={transition:null},G_={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:Lp};function LC(){throw Error("act(...) is not supported in production builds of React.")}bt.Children={map:dl,forEach:function(e,t,r){dl(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return dl(e,function(){t++}),t},toArray:function(e){return dl(e,function(t){return t})||[]},only:function(e){if(!Ep(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};bt.Component=rs;bt.Fragment=P_;bt.Profiler=R_;bt.PureComponent=_p;bt.StrictMode=O_;bt.Suspense=q_;bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G_;bt.act=LC;bt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=vC({},e.props),n=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Lp.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)TC.call(t,l)&&!_C.hasOwnProperty(l)&&(i[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:Ha,type:e.type,key:n,ref:o,props:i,_owner:s}};bt.createContext=function(e){return e={$$typeof:N_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:D_,_context:e},e.Consumer=e};bt.createElement=BC;bt.createFactory=function(e){var t=BC.bind(null,e);return t.type=e,t};bt.createRef=function(){return{current:null}};bt.forwardRef=function(e){return{$$typeof:z_,render:e}};bt.isValidElement=Ep;bt.lazy=function(e){return{$$typeof:j_,_payload:{_status:-1,_result:e},_init:V_}};bt.memo=function(e,t){return{$$typeof:W_,type:e,compare:t===void 0?null:t}};bt.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};bt.unstable_act=LC;bt.useCallback=function(e,t){return Ie.current.useCallback(e,t)};bt.useContext=function(e){return Ie.current.useContext(e)};bt.useDebugValue=function(){};bt.useDeferredValue=function(e){return Ie.current.useDeferredValue(e)};bt.useEffect=function(e,t){return Ie.current.useEffect(e,t)};bt.useId=function(){return Ie.current.useId()};bt.useImperativeHandle=function(e,t,r){return Ie.current.useImperativeHandle(e,t,r)};bt.useInsertionEffect=function(e,t){return Ie.current.useInsertionEffect(e,t)};bt.useLayoutEffect=function(e,t){return Ie.current.useLayoutEffect(e,t)};bt.useMemo=function(e,t){return Ie.current.useMemo(e,t)};bt.useReducer=function(e,t,r){return Ie.current.useReducer(e,t,r)};bt.useRef=function(e){return Ie.current.useRef(e)};bt.useState=function(e){return Ie.current.useState(e)};bt.useSyncExternalStore=function(e,t,r){return Ie.current.useSyncExternalStore(e,t,r)};bt.useTransition=function(){return Ie.current.useTransition()};bt.version="18.3.1";bC.exports=bt;var st=bC.exports;const Ul=xC(st);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its 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 X_=st,Q_=Symbol.for("react.element"),Z_=Symbol.for("react.fragment"),K_=Object.prototype.hasOwnProperty,J_=X_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tB={key:!0,ref:!0,__self:!0,__source:!0};function EC(e,t,r){var i,n={},o=null,s=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(i in t)K_.call(t,i)&&!tB.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)n[i]===void 0&&(n[i]=t[i]);return{$$typeof:Q_,type:e,key:o,ref:s,props:n,_owner:J_.current}}Th.Fragment=Z_;Th.jsx=EC;Th.jsxs=EC;CC.exports=Th;var M=CC.exports,Sd={},AC={exports:{}},nr={},FC={exports:{}},MC={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its 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
|
-
*/(function(e){function t(B,z){var W=B.length;B.push(z);t:for(;0<W;){var q=W-1>>>1,H=B[q];if(0<n(H,z))B[q]=z,B[W]=H,W=q;else break t}}function r(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var z=B[0],W=B.pop();if(W!==z){B[0]=W;t:for(var q=0,H=B.length,G=H>>>1;q<G;){var Q=2*(q+1)-1,Z=B[Q],gt=Q+1,Ct=B[gt];if(0>n(Z,W))gt<H&&0>n(Ct,Z)?(B[q]=Ct,B[gt]=W,q=gt):(B[q]=Z,B[Q]=W,q=Q);else if(gt<H&&0>n(Ct,W))B[q]=Ct,B[gt]=W,q=gt;else break t}}return z}function n(B,z){var W=B.sortIndex-z.sortIndex;return W!==0?W:B.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],h=1,u=null,f=3,d=!1,p=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(B){for(var z=r(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=B)i(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=r(c)}}function v(B){if(g=!1,b(B),!p)if(r(l)!==null)p=!0,$(S);else{var z=r(c);z!==null&&O(v,z.startTime-B)}}function S(B,z){p=!1,g&&(g=!1,m(T),T=-1),d=!0;var W=f;try{for(b(z),u=r(l);u!==null&&(!(u.expirationTime>z)||B&&!F());){var q=u.callback;if(typeof q=="function"){u.callback=null,f=u.priorityLevel;var H=q(u.expirationTime<=z);z=e.unstable_now(),typeof H=="function"?u.callback=H:u===r(l)&&i(l),b(z)}else i(l);u=r(l)}if(u!==null)var G=!0;else{var Q=r(c);Q!==null&&O(v,Q.startTime-z),G=!1}return G}finally{u=null,f=W,d=!1}}var _=!1,w=null,T=-1,D=5,A=-1;function F(){return!(e.unstable_now()-A<D)}function V(){if(w!==null){var B=e.unstable_now();A=B;var z=!0;try{z=w(!0,B)}finally{z?j():(_=!1,w=null)}}else _=!1}var j;if(typeof y=="function")j=function(){y(V)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,I=P.port2;P.port1.onmessage=V,j=function(){I.postMessage(null)}}else j=function(){x(V,0)};function $(B){w=B,_||(_=!0,j())}function O(B,z){T=x(function(){B(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,$(S))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(B){switch(f){case 1:case 2:case 3:var z=3;break;default:z=f}var W=f;f=z;try{return B()}finally{f=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,z){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=f;f=B;try{return z()}finally{f=W}},e.unstable_scheduleCallback=function(B,z,W){var q=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?q+W:q):W=q,B){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=W+H,B={id:h++,callback:z,priorityLevel:B,startTime:W,expirationTime:H,sortIndex:-1},W>q?(B.sortIndex=W,t(c,B),r(l)===null&&B===r(c)&&(g?(m(T),T=-1):g=!0,O(v,W-q))):(B.sortIndex=H,t(l,B),p||d||(p=!0,$(S))),B},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(B){var z=f;return function(){var W=f;f=z;try{return B.apply(this,arguments)}finally{f=W}}}})(MC);FC.exports=MC;var eB=FC.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its 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 rB=st,rr=eB;function X(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var $C=new Set,da={};function On(e,t){qo(e,t),qo(e+"Capture",t)}function qo(e,t){for(da[e]=t,e=0;e<t.length;e++)$C.add(t[e])}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Td=Object.prototype.hasOwnProperty,iB=/^[: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]*$/,ty={},ey={};function nB(e){return Td.call(ey,e)?!0:Td.call(ty,e)?!1:iB.test(e)?ey[e]=!0:(ty[e]=!0,!1)}function oB(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sB(e,t,r,i){if(t===null||typeof t>"u"||oB(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,r,i,n,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pe[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ap=/[\-:]([a-z])/g;function Fp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ap,Fp);pe[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ap,Fp);pe[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ap,Fp);pe[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mp(e,t,r,i){var n=pe.hasOwnProperty(t)?pe[t]:null;(n!==null?n.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(sB(t,r,n,i)&&(r=null),i||n===null?nB(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,i=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var Ci=rB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fl=Symbol.for("react.element"),no=Symbol.for("react.portal"),oo=Symbol.for("react.fragment"),$p=Symbol.for("react.strict_mode"),_d=Symbol.for("react.profiler"),IC=Symbol.for("react.provider"),PC=Symbol.for("react.context"),Ip=Symbol.for("react.forward_ref"),Bd=Symbol.for("react.suspense"),Ld=Symbol.for("react.suspense_list"),Pp=Symbol.for("react.memo"),_i=Symbol.for("react.lazy"),OC=Symbol.for("react.offscreen"),ry=Symbol.iterator;function ds(e){return e===null||typeof e!="object"?null:(e=ry&&e[ry]||e["@@iterator"],typeof e=="function"?e:null)}var jt=Object.assign,Tu;function Ps(e){if(Tu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Tu=t&&t[1]||""}return`
|
|
35
|
-
`+Tu+e}var _u=!1;function Bu(e,t){if(!e||_u)return"";_u=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var i=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){i=c}e.call(t.prototype)}else{try{throw Error()}catch(c){i=c}e()}}catch(c){if(c&&i&&typeof c.stack=="string"){for(var n=c.stack.split(`
|
|
36
|
-
`),o=i.stack.split(`
|
|
37
|
-
`),s=n.length-1,a=o.length-1;1<=s&&0<=a&&n[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(n[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||n[s]!==o[a]){var l=`
|
|
38
|
-
`+n[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{_u=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ps(e):""}function aB(e){switch(e.tag){case 5:return Ps(e.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return e=Bu(e.type,!1),e;case 11:return e=Bu(e.type.render,!1),e;case 1:return e=Bu(e.type,!0),e;default:return""}}function Ed(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oo:return"Fragment";case no:return"Portal";case _d:return"Profiler";case $p:return"StrictMode";case Bd:return"Suspense";case Ld:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case PC:return(e.displayName||"Context")+".Consumer";case IC:return(e._context.displayName||"Context")+".Provider";case Ip:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pp:return t=e.displayName||null,t!==null?t:Ed(e.type)||"Memo";case _i:t=e._payload,e=e._init;try{return Ed(e(t))}catch{}}return null}function lB(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ed(t);case 8:return t===$p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function RC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cB(e){var t=RC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pl(e){e._valueTracker||(e._valueTracker=cB(e))}function DC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=RC(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function mc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ad(e,t){var r=t.checked;return jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function iy(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Ui(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NC(e,t){t=t.checked,t!=null&&Mp(e,"checked",t,!1)}function Fd(e,t){NC(e,t);var r=Ui(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Md(e,t.type,r):t.hasOwnProperty("defaultValue")&&Md(e,t.type,Ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ny(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Md(e,t,r){(t!=="number"||mc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Os=Array.isArray;function xo(e,t,r,i){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Ui(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,i&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function $d(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(X(91));return jt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oy(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(X(92));if(Os(r)){if(1<r.length)throw Error(X(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ui(r)}}function zC(e,t){var r=Ui(t.value),i=Ui(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function sy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Id(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gl,WC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(gl=gl||document.createElement("div"),gl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fa(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},hB=["Webkit","ms","Moz","O"];Object.keys(Gs).forEach(function(e){hB.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gs[t]=Gs[e]})});function jC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Gs.hasOwnProperty(e)&&Gs[e]?(""+t).trim():t+"px"}function HC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,n=jC(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,n):e[r]=n}}var uB=jt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pd(e,t){if(t){if(uB[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(X(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(X(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(X(61))}if(t.style!=null&&typeof t.style!="object")throw Error(X(62))}}function Od(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Rd=null;function Op(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dd=null,Co=null,bo=null;function ay(e){if(e=Va(e)){if(typeof Dd!="function")throw Error(X(280));var t=e.stateNode;t&&(t=Ah(t),Dd(e.stateNode,e.type,t))}}function UC(e){Co?bo?bo.push(e):bo=[e]:Co=e}function YC(){if(Co){var e=Co,t=bo;if(bo=Co=null,ay(e),t)for(e=0;e<t.length;e++)ay(t[e])}}function VC(e,t){return e(t)}function GC(){}var Lu=!1;function XC(e,t,r){if(Lu)return e(t,r);Lu=!0;try{return VC(e,t,r)}finally{Lu=!1,(Co!==null||bo!==null)&&(GC(),YC())}}function pa(e,t){var r=e.stateNode;if(r===null)return null;var i=Ah(r);if(i===null)return null;r=i[t];t:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break t;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(X(231,t,typeof r));return r}var Nd=!1;if(fi)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{Nd=!1}function dB(e,t,r,i,n,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(h){this.onError(h)}}var Xs=!1,yc=null,xc=!1,zd=null,fB={onError:function(e){Xs=!0,yc=e}};function pB(e,t,r,i,n,o,s,a,l){Xs=!1,yc=null,dB.apply(fB,arguments)}function gB(e,t,r,i,n,o,s,a,l){if(pB.apply(this,arguments),Xs){if(Xs){var c=yc;Xs=!1,yc=null}else throw Error(X(198));xc||(xc=!0,zd=c)}}function Rn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function QC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ly(e){if(Rn(e)!==e)throw Error(X(188))}function mB(e){var t=e.alternate;if(!t){if(t=Rn(e),t===null)throw Error(X(188));return t!==e?null:e}for(var r=e,i=t;;){var n=r.return;if(n===null)break;var o=n.alternate;if(o===null){if(i=n.return,i!==null){r=i;continue}break}if(n.child===o.child){for(o=n.child;o;){if(o===r)return ly(n),e;if(o===i)return ly(n),t;o=o.sibling}throw Error(X(188))}if(r.return!==i.return)r=n,i=o;else{for(var s=!1,a=n.child;a;){if(a===r){s=!0,r=n,i=o;break}if(a===i){s=!0,i=n,r=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===r){s=!0,r=o,i=n;break}if(a===i){s=!0,i=o,r=n;break}a=a.sibling}if(!s)throw Error(X(189))}}if(r.alternate!==i)throw Error(X(190))}if(r.tag!==3)throw Error(X(188));return r.stateNode.current===r?e:t}function ZC(e){return e=mB(e),e!==null?KC(e):null}function KC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=KC(e);if(t!==null)return t;e=e.sibling}return null}var JC=rr.unstable_scheduleCallback,cy=rr.unstable_cancelCallback,yB=rr.unstable_shouldYield,xB=rr.unstable_requestPaint,Vt=rr.unstable_now,CB=rr.unstable_getCurrentPriorityLevel,Rp=rr.unstable_ImmediatePriority,t1=rr.unstable_UserBlockingPriority,Cc=rr.unstable_NormalPriority,bB=rr.unstable_LowPriority,e1=rr.unstable_IdlePriority,_h=null,Hr=null;function kB(e){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(_h,e,void 0,(e.current.flags&128)===128)}catch{}}var _r=Math.clz32?Math.clz32:SB,vB=Math.log,wB=Math.LN2;function SB(e){return e>>>=0,e===0?32:31-(vB(e)/wB|0)|0}var ml=64,yl=4194304;function Rs(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bc(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,n=e.suspendedLanes,o=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~n;a!==0?i=Rs(a):(o&=s,o!==0&&(i=Rs(o)))}else s=r&~n,s!==0?i=Rs(s):o!==0&&(i=Rs(o));if(i===0)return 0;if(t!==0&&t!==i&&!(t&n)&&(n=i&-i,o=t&-t,n>=o||n===16&&(o&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-_r(t),n=1<<r,i|=e[r],t&=~n;return i}function TB(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _B(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,n=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-_r(o),a=1<<s,l=n[s];l===-1?(!(a&r)||a&i)&&(n[s]=TB(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function qd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function r1(){var e=ml;return ml<<=1,!(ml&4194240)&&(ml=64),e}function Eu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ua(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_r(t),e[t]=r}function BB(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-_r(r),o=1<<n;t[n]=0,i[n]=-1,e[n]=-1,r&=~o}}function Dp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-_r(r),n=1<<i;n&t|e[i]&t&&(e[i]|=t),r&=~n}}var At=0;function i1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var n1,Np,o1,s1,a1,Wd=!1,xl=[],Pi=null,Oi=null,Ri=null,ga=new Map,ma=new Map,Ei=[],LB="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 submit".split(" ");function hy(e,t){switch(e){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":ga.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(t.pointerId)}}function ps(e,t,r,i,n,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:o,targetContainers:[n]},t!==null&&(t=Va(t),t!==null&&Np(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function EB(e,t,r,i,n){switch(t){case"focusin":return Pi=ps(Pi,e,t,r,i,n),!0;case"dragenter":return Oi=ps(Oi,e,t,r,i,n),!0;case"mouseover":return Ri=ps(Ri,e,t,r,i,n),!0;case"pointerover":var o=n.pointerId;return ga.set(o,ps(ga.get(o)||null,e,t,r,i,n)),!0;case"gotpointercapture":return o=n.pointerId,ma.set(o,ps(ma.get(o)||null,e,t,r,i,n)),!0}return!1}function l1(e){var t=un(e.target);if(t!==null){var r=Rn(t);if(r!==null){if(t=r.tag,t===13){if(t=QC(r),t!==null){e.blockedOn=t,a1(e.priority,function(){o1(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=jd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Rd=i,r.target.dispatchEvent(i),Rd=null}else return t=Va(r),t!==null&&Np(t),e.blockedOn=r,!1;t.shift()}return!0}function uy(e,t,r){Yl(e)&&r.delete(t)}function AB(){Wd=!1,Pi!==null&&Yl(Pi)&&(Pi=null),Oi!==null&&Yl(Oi)&&(Oi=null),Ri!==null&&Yl(Ri)&&(Ri=null),ga.forEach(uy),ma.forEach(uy)}function gs(e,t){e.blockedOn===t&&(e.blockedOn=null,Wd||(Wd=!0,rr.unstable_scheduleCallback(rr.unstable_NormalPriority,AB)))}function ya(e){function t(n){return gs(n,e)}if(0<xl.length){gs(xl[0],e);for(var r=1;r<xl.length;r++){var i=xl[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Pi!==null&&gs(Pi,e),Oi!==null&&gs(Oi,e),Ri!==null&&gs(Ri,e),ga.forEach(t),ma.forEach(t),r=0;r<Ei.length;r++)i=Ei[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Ei.length&&(r=Ei[0],r.blockedOn===null);)l1(r),r.blockedOn===null&&Ei.shift()}var ko=Ci.ReactCurrentBatchConfig,kc=!0;function FB(e,t,r,i){var n=At,o=ko.transition;ko.transition=null;try{At=1,zp(e,t,r,i)}finally{At=n,ko.transition=o}}function MB(e,t,r,i){var n=At,o=ko.transition;ko.transition=null;try{At=4,zp(e,t,r,i)}finally{At=n,ko.transition=o}}function zp(e,t,r,i){if(kc){var n=jd(e,t,r,i);if(n===null)Nu(e,t,i,vc,r),hy(e,i);else if(EB(n,e,t,r,i))i.stopPropagation();else if(hy(e,i),t&4&&-1<LB.indexOf(e)){for(;n!==null;){var o=Va(n);if(o!==null&&n1(o),o=jd(e,t,r,i),o===null&&Nu(e,t,i,vc,r),o===n)break;n=o}n!==null&&i.stopPropagation()}else Nu(e,t,i,null,r)}}var vc=null;function jd(e,t,r,i){if(vc=null,e=Op(i),e=un(e),e!==null)if(t=Rn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=QC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return vc=e,null}function c1(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CB()){case Rp:return 1;case t1:return 4;case Cc:case bB:return 16;case e1:return 536870912;default:return 16}default:return 16}}var Fi=null,qp=null,Vl=null;function h1(){if(Vl)return Vl;var e,t=qp,r=t.length,i,n="value"in Fi?Fi.value:Fi.textContent,o=n.length;for(e=0;e<r&&t[e]===n[e];e++);var s=r-e;for(i=1;i<=s&&t[r-i]===n[o-i];i++);return Vl=n.slice(e,1<i?1-i:void 0)}function Gl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cl(){return!0}function dy(){return!1}function or(e){function t(r,i,n,o,s){this._reactName=r,this._targetInst=n,this.type=i,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Cl:dy,this.isPropagationStopped=dy,this}return jt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Cl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=or(is),Ya=jt({},is,{view:0,detail:0}),$B=or(Ya),Au,Fu,ms,Bh=jt({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ms&&(ms&&e.type==="mousemove"?(Au=e.screenX-ms.screenX,Fu=e.screenY-ms.screenY):Fu=Au=0,ms=e),Au)},movementY:function(e){return"movementY"in e?e.movementY:Fu}}),fy=or(Bh),IB=jt({},Bh,{dataTransfer:0}),PB=or(IB),OB=jt({},Ya,{relatedTarget:0}),Mu=or(OB),RB=jt({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),DB=or(RB),NB=jt({},is,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zB=or(NB),qB=jt({},is,{data:0}),py=or(qB),WB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jB={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"},HB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UB(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HB[e])?!!t[e]:!1}function jp(){return UB}var YB=jt({},Ya,{key:function(e){if(e.key){var t=WB[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jB[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(e){return e.type==="keypress"?Gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VB=or(YB),GB=jt({},Bh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gy=or(GB),XB=jt({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),QB=or(XB),ZB=jt({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),KB=or(ZB),JB=jt({},Bh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),tL=or(JB),eL=[9,13,27,32],Hp=fi&&"CompositionEvent"in window,Qs=null;fi&&"documentMode"in document&&(Qs=document.documentMode);var rL=fi&&"TextEvent"in window&&!Qs,u1=fi&&(!Hp||Qs&&8<Qs&&11>=Qs),my=" ",yy=!1;function d1(e,t){switch(e){case"keyup":return eL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var so=!1;function iL(e,t){switch(e){case"compositionend":return f1(t);case"keypress":return t.which!==32?null:(yy=!0,my);case"textInput":return e=t.data,e===my&&yy?null:e;default:return null}}function nL(e,t){if(so)return e==="compositionend"||!Hp&&d1(e,t)?(e=h1(),Vl=qp=Fi=null,so=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return u1&&t.locale!=="ko"?null:t.data;default:return null}}var oL={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 xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oL[e.type]:t==="textarea"}function p1(e,t,r,i){UC(i),t=wc(t,"onChange"),0<t.length&&(r=new Wp("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Zs=null,xa=null;function sL(e){T1(e,0)}function Lh(e){var t=co(e);if(DC(t))return e}function aL(e,t){if(e==="change")return t}var g1=!1;if(fi){var $u;if(fi){var Iu="oninput"in document;if(!Iu){var Cy=document.createElement("div");Cy.setAttribute("oninput","return;"),Iu=typeof Cy.oninput=="function"}$u=Iu}else $u=!1;g1=$u&&(!document.documentMode||9<document.documentMode)}function by(){Zs&&(Zs.detachEvent("onpropertychange",m1),xa=Zs=null)}function m1(e){if(e.propertyName==="value"&&Lh(xa)){var t=[];p1(t,xa,e,Op(e)),XC(sL,t)}}function lL(e,t,r){e==="focusin"?(by(),Zs=t,xa=r,Zs.attachEvent("onpropertychange",m1)):e==="focusout"&&by()}function cL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lh(xa)}function hL(e,t){if(e==="click")return Lh(t)}function uL(e,t){if(e==="input"||e==="change")return Lh(t)}function dL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ar=typeof Object.is=="function"?Object.is:dL;function Ca(e,t){if(Ar(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var n=r[i];if(!Td.call(t,n)||!Ar(e[n],t[n]))return!1}return!0}function ky(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vy(e,t){var r=ky(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=ky(r)}}function y1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?y1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x1(){for(var e=window,t=mc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=mc(e.document)}return t}function Up(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fL(e){var t=x1(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&y1(r.ownerDocument.documentElement,r)){if(i!==null&&Up(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,o=Math.min(i.start,n);i=i.end===void 0?o:Math.min(i.end,n),!e.extend&&o>i&&(n=i,i=o,o=n),n=vy(r,o);var s=vy(r,i);n&&s&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pL=fi&&"documentMode"in document&&11>=document.documentMode,ao=null,Hd=null,Ks=null,Ud=!1;function wy(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ud||ao==null||ao!==mc(i)||(i=ao,"selectionStart"in i&&Up(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Ks&&Ca(Ks,i)||(Ks=i,i=wc(Hd,"onSelect"),0<i.length&&(t=new Wp("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=ao)))}function bl(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var lo={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},Pu={},C1={};fi&&(C1=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);function Eh(e){if(Pu[e])return Pu[e];if(!lo[e])return e;var t=lo[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in C1)return Pu[e]=t[r];return e}var b1=Eh("animationend"),k1=Eh("animationiteration"),v1=Eh("animationstart"),w1=Eh("transitionend"),S1=new Map,Sy="abort auxClick 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(" ");function Zi(e,t){S1.set(e,t),On(t,[e])}for(var Ou=0;Ou<Sy.length;Ou++){var Ru=Sy[Ou],gL=Ru.toLowerCase(),mL=Ru[0].toUpperCase()+Ru.slice(1);Zi(gL,"on"+mL)}Zi(b1,"onAnimationEnd");Zi(k1,"onAnimationIteration");Zi(v1,"onAnimationStart");Zi("dblclick","onDoubleClick");Zi("focusin","onFocus");Zi("focusout","onBlur");Zi(w1,"onTransitionEnd");qo("onMouseEnter",["mouseout","mouseover"]);qo("onMouseLeave",["mouseout","mouseover"]);qo("onPointerEnter",["pointerout","pointerover"]);qo("onPointerLeave",["pointerout","pointerover"]);On("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));On("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));On("onBeforeInput",["compositionend","keypress","textInput","paste"]);On("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));On("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));On("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="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(" "),yL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function Ty(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,gB(i,t,void 0,e),e.currentTarget=null}function T1(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],n=i.event;i=i.listeners;t:{var o=void 0;if(t)for(var s=i.length-1;0<=s;s--){var a=i[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&n.isPropagationStopped())break t;Ty(n,a,c),o=l}else for(s=0;s<i.length;s++){if(a=i[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&n.isPropagationStopped())break t;Ty(n,a,c),o=l}}}if(xc)throw e=zd,xc=!1,zd=null,e}function Pt(e,t){var r=t[Qd];r===void 0&&(r=t[Qd]=new Set);var i=e+"__bubble";r.has(i)||(_1(t,e,2,!1),r.add(i))}function Du(e,t,r){var i=0;t&&(i|=4),_1(r,e,i,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function ba(e){if(!e[kl]){e[kl]=!0,$C.forEach(function(r){r!=="selectionchange"&&(yL.has(r)||Du(r,!1,e),Du(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,Du("selectionchange",!1,t))}}function _1(e,t,r,i){switch(c1(t)){case 1:var n=FB;break;case 4:n=MB;break;default:n=zp}r=n.bind(null,t,r,e),n=void 0,!Nd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),i?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function Nu(e,t,r,i,n){var o=i;if(!(t&1)&&!(t&2)&&i!==null)t:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var a=i.stateNode.containerInfo;if(a===n||a.nodeType===8&&a.parentNode===n)break;if(s===4)for(s=i.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;s=s.return}for(;a!==null;){if(s=un(a),s===null)return;if(l=s.tag,l===5||l===6){i=o=s;continue t}a=a.parentNode}}i=i.return}XC(function(){var c=o,h=Op(r),u=[];t:{var f=S1.get(e);if(f!==void 0){var d=Wp,p=e;switch(e){case"keypress":if(Gl(r)===0)break t;case"keydown":case"keyup":d=VB;break;case"focusin":p="focus",d=Mu;break;case"focusout":p="blur",d=Mu;break;case"beforeblur":case"afterblur":d=Mu;break;case"click":if(r.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=fy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=PB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=QB;break;case b1:case k1:case v1:d=DB;break;case w1:d=KB;break;case"scroll":d=$B;break;case"wheel":d=tL;break;case"copy":case"cut":case"paste":d=zB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=gy}var g=(t&4)!==0,x=!g&&e==="scroll",m=g?f!==null?f+"Capture":null:f;g=[];for(var y=c,b;y!==null;){b=y;var v=b.stateNode;if(b.tag===5&&v!==null&&(b=v,m!==null&&(v=pa(y,m),v!=null&&g.push(ka(y,v,b)))),x)break;y=y.return}0<g.length&&(f=new d(f,p,null,r,h),u.push({event:f,listeners:g}))}}if(!(t&7)){t:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&r!==Rd&&(p=r.relatedTarget||r.fromElement)&&(un(p)||p[pi]))break t;if((d||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,d?(p=r.relatedTarget||r.toElement,d=c,p=p?un(p):null,p!==null&&(x=Rn(p),p!==x||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=c),d!==p)){if(g=fy,v="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=gy,v="onPointerLeave",m="onPointerEnter",y="pointer"),x=d==null?f:co(d),b=p==null?f:co(p),f=new g(v,y+"leave",d,r,h),f.target=x,f.relatedTarget=b,v=null,un(h)===c&&(g=new g(m,y+"enter",p,r,h),g.target=b,g.relatedTarget=x,v=g),x=v,d&&p)e:{for(g=d,m=p,y=0,b=g;b;b=Vn(b))y++;for(b=0,v=m;v;v=Vn(v))b++;for(;0<y-b;)g=Vn(g),y--;for(;0<b-y;)m=Vn(m),b--;for(;y--;){if(g===m||m!==null&&g===m.alternate)break e;g=Vn(g),m=Vn(m)}g=null}else g=null;d!==null&&_y(u,f,d,g,!1),p!==null&&x!==null&&_y(u,x,p,g,!0)}}t:{if(f=c?co(c):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var S=aL;else if(xy(f))if(g1)S=uL;else{S=cL;var _=lL}else(d=f.nodeName)&&d.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=hL);if(S&&(S=S(e,c))){p1(u,S,r,h);break t}_&&_(e,f,c),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Md(f,"number",f.value)}switch(_=c?co(c):window,e){case"focusin":(xy(_)||_.contentEditable==="true")&&(ao=_,Hd=c,Ks=null);break;case"focusout":Ks=Hd=ao=null;break;case"mousedown":Ud=!0;break;case"contextmenu":case"mouseup":case"dragend":Ud=!1,wy(u,r,h);break;case"selectionchange":if(pL)break;case"keydown":case"keyup":wy(u,r,h)}var w;if(Hp)t:{switch(e){case"compositionstart":var T="onCompositionStart";break t;case"compositionend":T="onCompositionEnd";break t;case"compositionupdate":T="onCompositionUpdate";break t}T=void 0}else so?d1(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(u1&&r.locale!=="ko"&&(so||T!=="onCompositionStart"?T==="onCompositionEnd"&&so&&(w=h1()):(Fi=h,qp="value"in Fi?Fi.value:Fi.textContent,so=!0)),_=wc(c,T),0<_.length&&(T=new py(T,e,null,r,h),u.push({event:T,listeners:_}),w?T.data=w:(w=f1(r),w!==null&&(T.data=w)))),(w=rL?iL(e,r):nL(e,r))&&(c=wc(c,"onBeforeInput"),0<c.length&&(h=new py("onBeforeInput","beforeinput",null,r,h),u.push({event:h,listeners:c}),h.data=w))}T1(u,t)})}function ka(e,t,r){return{instance:e,listener:t,currentTarget:r}}function wc(e,t){for(var r=t+"Capture",i=[];e!==null;){var n=e,o=n.stateNode;n.tag===5&&o!==null&&(n=o,o=pa(e,r),o!=null&&i.unshift(ka(e,o,n)),o=pa(e,t),o!=null&&i.push(ka(e,o,n))),e=e.return}return i}function Vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _y(e,t,r,i,n){for(var o=t._reactName,s=[];r!==null&&r!==i;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,n?(l=pa(r,o),l!=null&&s.unshift(ka(r,l,a))):n||(l=pa(r,o),l!=null&&s.push(ka(r,l,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var xL=/\r\n?/g,CL=/\u0000|\uFFFD/g;function By(e){return(typeof e=="string"?e:""+e).replace(xL,`
|
|
39
|
-
`).replace(CL,"")}function vl(e,t,r){if(t=By(t),By(e)!==t&&r)throw Error(X(425))}function Sc(){}var Yd=null,Vd=null;function Gd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xd=typeof setTimeout=="function"?setTimeout:void 0,bL=typeof clearTimeout=="function"?clearTimeout:void 0,Ly=typeof Promise=="function"?Promise:void 0,kL=typeof queueMicrotask=="function"?queueMicrotask:typeof Ly<"u"?function(e){return Ly.resolve(null).then(e).catch(vL)}:Xd;function vL(e){setTimeout(function(){throw e})}function zu(e,t){var r=t,i=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(i===0){e.removeChild(n),ya(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=n}while(r);ya(t)}function Di(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ey(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ns=Math.random().toString(36).slice(2),jr="__reactFiber$"+ns,va="__reactProps$"+ns,pi="__reactContainer$"+ns,Qd="__reactEvents$"+ns,wL="__reactListeners$"+ns,SL="__reactHandles$"+ns;function un(e){var t=e[jr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pi]||r[jr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ey(e);e!==null;){if(r=e[jr])return r;e=Ey(e)}return t}e=r,r=e.parentNode}return null}function Va(e){return e=e[jr]||e[pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function co(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(X(33))}function Ah(e){return e[va]||null}var Zd=[],ho=-1;function Ki(e){return{current:e}}function Rt(e){0>ho||(e.current=Zd[ho],Zd[ho]=null,ho--)}function It(e,t){ho++,Zd[ho]=e.current,e.current=t}var Yi={},Se=Ki(Yi),He=Ki(!1),vn=Yi;function Wo(e,t){var r=e.type.contextTypes;if(!r)return Yi;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var n={},o;for(o in r)n[o]=t[o];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Ue(e){return e=e.childContextTypes,e!=null}function Tc(){Rt(He),Rt(Se)}function Ay(e,t,r){if(Se.current!==Yi)throw Error(X(168));It(Se,t),It(He,r)}function B1(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var n in i)if(!(n in t))throw Error(X(108,lB(e)||"Unknown",n));return jt({},r,i)}function _c(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yi,vn=Se.current,It(Se,e),It(He,He.current),!0}function Fy(e,t,r){var i=e.stateNode;if(!i)throw Error(X(169));r?(e=B1(e,t,vn),i.__reactInternalMemoizedMergedChildContext=e,Rt(He),Rt(Se),It(Se,e)):Rt(He),It(He,r)}var oi=null,Fh=!1,qu=!1;function L1(e){oi===null?oi=[e]:oi.push(e)}function TL(e){Fh=!0,L1(e)}function Ji(){if(!qu&&oi!==null){qu=!0;var e=0,t=At;try{var r=oi;for(At=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}oi=null,Fh=!1}catch(n){throw oi!==null&&(oi=oi.slice(e+1)),JC(Rp,Ji),n}finally{At=t,qu=!1}}return null}var uo=[],fo=0,Bc=null,Lc=0,lr=[],cr=0,wn=null,si=1,ai="";function sn(e,t){uo[fo++]=Lc,uo[fo++]=Bc,Bc=e,Lc=t}function E1(e,t,r){lr[cr++]=si,lr[cr++]=ai,lr[cr++]=wn,wn=e;var i=si;e=ai;var n=32-_r(i)-1;i&=~(1<<n),r+=1;var o=32-_r(t)+n;if(30<o){var s=n-n%5;o=(i&(1<<s)-1).toString(32),i>>=s,n-=s,si=1<<32-_r(t)+n|r<<n|i,ai=o+e}else si=1<<o|r<<n|i,ai=e}function Yp(e){e.return!==null&&(sn(e,1),E1(e,1,0))}function Vp(e){for(;e===Bc;)Bc=uo[--fo],uo[fo]=null,Lc=uo[--fo],uo[fo]=null;for(;e===wn;)wn=lr[--cr],lr[cr]=null,ai=lr[--cr],lr[cr]=null,si=lr[--cr],lr[cr]=null}var Je=null,Ke=null,Nt=!1,kr=null;function A1(e,t){var r=hr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function My(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Je=e,Ke=Di(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,Ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=wn!==null?{id:si,overflow:ai}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=hr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Je=e,Ke=null,!0):!1;default:return!1}}function Kd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jd(e){if(Nt){var t=Ke;if(t){var r=t;if(!My(e,t)){if(Kd(e))throw Error(X(418));t=Di(r.nextSibling);var i=Je;t&&My(e,t)?A1(i,r):(e.flags=e.flags&-4097|2,Nt=!1,Je=e)}}else{if(Kd(e))throw Error(X(418));e.flags=e.flags&-4097|2,Nt=!1,Je=e}}}function $y(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function wl(e){if(e!==Je)return!1;if(!Nt)return $y(e),Nt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gd(e.type,e.memoizedProps)),t&&(t=Ke)){if(Kd(e))throw F1(),Error(X(418));for(;t;)A1(e,t),t=Di(t.nextSibling)}if($y(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(X(317));t:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ke=Di(e.nextSibling);break t}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ke=null}}else Ke=Je?Di(e.stateNode.nextSibling):null;return!0}function F1(){for(var e=Ke;e;)e=Di(e.nextSibling)}function jo(){Ke=Je=null,Nt=!1}function Gp(e){kr===null?kr=[e]:kr.push(e)}var _L=Ci.ReactCurrentBatchConfig;function ys(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(X(309));var i=r.stateNode}if(!i)throw Error(X(147,e));var n=i,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=n.refs;s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(X(284));if(!r._owner)throw Error(X(290,e))}return e}function Sl(e,t){throw e=Object.prototype.toString.call(t),Error(X(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Iy(e){var t=e._init;return t(e._payload)}function M1(e){function t(m,y){if(e){var b=m.deletions;b===null?(m.deletions=[y],m.flags|=16):b.push(y)}}function r(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function i(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function n(m,y){return m=Wi(m,y),m.index=0,m.sibling=null,m}function o(m,y,b){return m.index=b,e?(b=m.alternate,b!==null?(b=b.index,b<y?(m.flags|=2,y):b):(m.flags|=2,y)):(m.flags|=1048576,y)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,y,b,v){return y===null||y.tag!==6?(y=Gu(b,m.mode,v),y.return=m,y):(y=n(y,b),y.return=m,y)}function l(m,y,b,v){var S=b.type;return S===oo?h(m,y,b.props.children,v,b.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===_i&&Iy(S)===y.type)?(v=n(y,b.props),v.ref=ys(m,y,b),v.return=m,v):(v=ec(b.type,b.key,b.props,null,m.mode,v),v.ref=ys(m,y,b),v.return=m,v)}function c(m,y,b,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=Xu(b,m.mode,v),y.return=m,y):(y=n(y,b.children||[]),y.return=m,y)}function h(m,y,b,v,S){return y===null||y.tag!==7?(y=Cn(b,m.mode,v,S),y.return=m,y):(y=n(y,b),y.return=m,y)}function u(m,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Gu(""+y,m.mode,b),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case fl:return b=ec(y.type,y.key,y.props,null,m.mode,b),b.ref=ys(m,null,y),b.return=m,b;case no:return y=Xu(y,m.mode,b),y.return=m,y;case _i:var v=y._init;return u(m,v(y._payload),b)}if(Os(y)||ds(y))return y=Cn(y,m.mode,b,null),y.return=m,y;Sl(m,y)}return null}function f(m,y,b,v){var S=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:a(m,y,""+b,v);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:return b.key===S?l(m,y,b,v):null;case no:return b.key===S?c(m,y,b,v):null;case _i:return S=b._init,f(m,y,S(b._payload),v)}if(Os(b)||ds(b))return S!==null?null:h(m,y,b,v,null);Sl(m,b)}return null}function d(m,y,b,v,S){if(typeof v=="string"&&v!==""||typeof v=="number")return m=m.get(b)||null,a(y,m,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fl:return m=m.get(v.key===null?b:v.key)||null,l(y,m,v,S);case no:return m=m.get(v.key===null?b:v.key)||null,c(y,m,v,S);case _i:var _=v._init;return d(m,y,b,_(v._payload),S)}if(Os(v)||ds(v))return m=m.get(b)||null,h(y,m,v,S,null);Sl(y,v)}return null}function p(m,y,b,v){for(var S=null,_=null,w=y,T=y=0,D=null;w!==null&&T<b.length;T++){w.index>T?(D=w,w=null):D=w.sibling;var A=f(m,w,b[T],v);if(A===null){w===null&&(w=D);break}e&&w&&A.alternate===null&&t(m,w),y=o(A,y,T),_===null?S=A:_.sibling=A,_=A,w=D}if(T===b.length)return r(m,w),Nt&&sn(m,T),S;if(w===null){for(;T<b.length;T++)w=u(m,b[T],v),w!==null&&(y=o(w,y,T),_===null?S=w:_.sibling=w,_=w);return Nt&&sn(m,T),S}for(w=i(m,w);T<b.length;T++)D=d(w,m,T,b[T],v),D!==null&&(e&&D.alternate!==null&&w.delete(D.key===null?T:D.key),y=o(D,y,T),_===null?S=D:_.sibling=D,_=D);return e&&w.forEach(function(F){return t(m,F)}),Nt&&sn(m,T),S}function g(m,y,b,v){var S=ds(b);if(typeof S!="function")throw Error(X(150));if(b=S.call(b),b==null)throw Error(X(151));for(var _=S=null,w=y,T=y=0,D=null,A=b.next();w!==null&&!A.done;T++,A=b.next()){w.index>T?(D=w,w=null):D=w.sibling;var F=f(m,w,A.value,v);if(F===null){w===null&&(w=D);break}e&&w&&F.alternate===null&&t(m,w),y=o(F,y,T),_===null?S=F:_.sibling=F,_=F,w=D}if(A.done)return r(m,w),Nt&&sn(m,T),S;if(w===null){for(;!A.done;T++,A=b.next())A=u(m,A.value,v),A!==null&&(y=o(A,y,T),_===null?S=A:_.sibling=A,_=A);return Nt&&sn(m,T),S}for(w=i(m,w);!A.done;T++,A=b.next())A=d(w,m,T,A.value,v),A!==null&&(e&&A.alternate!==null&&w.delete(A.key===null?T:A.key),y=o(A,y,T),_===null?S=A:_.sibling=A,_=A);return e&&w.forEach(function(V){return t(m,V)}),Nt&&sn(m,T),S}function x(m,y,b,v){if(typeof b=="object"&&b!==null&&b.type===oo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:t:{for(var S=b.key,_=y;_!==null;){if(_.key===S){if(S=b.type,S===oo){if(_.tag===7){r(m,_.sibling),y=n(_,b.props.children),y.return=m,m=y;break t}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===_i&&Iy(S)===_.type){r(m,_.sibling),y=n(_,b.props),y.ref=ys(m,_,b),y.return=m,m=y;break t}r(m,_);break}else t(m,_);_=_.sibling}b.type===oo?(y=Cn(b.props.children,m.mode,v,b.key),y.return=m,m=y):(v=ec(b.type,b.key,b.props,null,m.mode,v),v.ref=ys(m,y,b),v.return=m,m=v)}return s(m);case no:t:{for(_=b.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(m,y.sibling),y=n(y,b.children||[]),y.return=m,m=y;break t}else{r(m,y);break}else t(m,y);y=y.sibling}y=Xu(b,m.mode,v),y.return=m,m=y}return s(m);case _i:return _=b._init,x(m,y,_(b._payload),v)}if(Os(b))return p(m,y,b,v);if(ds(b))return g(m,y,b,v);Sl(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(m,y.sibling),y=n(y,b),y.return=m,m=y):(r(m,y),y=Gu(b,m.mode,v),y.return=m,m=y),s(m)):r(m,y)}return x}var Ho=M1(!0),$1=M1(!1),Ec=Ki(null),Ac=null,po=null,Xp=null;function Qp(){Xp=po=Ac=null}function Zp(e){var t=Ec.current;Rt(Ec),e._currentValue=t}function tf(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function vo(e,t){Ac=e,Xp=po=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function dr(e){var t=e._currentValue;if(Xp!==e)if(e={context:e,memoizedValue:t,next:null},po===null){if(Ac===null)throw Error(X(308));po=e,Ac.dependencies={lanes:0,firstContext:e}}else po=po.next=e;return t}var dn=null;function Kp(e){dn===null?dn=[e]:dn.push(e)}function I1(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,Kp(t)):(r.next=n.next,n.next=r),t.interleaved=r,gi(e,i)}function gi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Bi=!1;function Jp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function P1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function hi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ni(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,wt&2){var n=i.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),i.pending=t,gi(e,r)}return n=i.interleaved,n===null?(t.next=t,Kp(i)):(t.next=n.next,n.next=t),i.interleaved=t,gi(e,r)}function Xl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Dp(e,r)}}function Py(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var n=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?n=o=s:o=o.next=s,r=r.next}while(r!==null);o===null?n=o=t:o=o.next=t}else n=o=t;r={baseState:i.baseState,firstBaseUpdate:n,lastBaseUpdate:o,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Fc(e,t,r,i){var n=e.updateQueue;Bi=!1;var o=n.firstBaseUpdate,s=n.lastBaseUpdate,a=n.shared.pending;if(a!==null){n.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(o!==null){var u=n.baseState;s=0,h=c=l=null,a=o;do{var f=a.lane,d=a.eventTime;if((i&f)===f){h!==null&&(h=h.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});t:{var p=e,g=a;switch(f=t,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){u=p.call(d,u,f);break t}u=p;break t;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(d,u,f):p,f==null)break t;u=jt({},u,f);break t;case 2:Bi=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[a]:f.push(a))}else d={eventTime:d,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=d,l=u):h=h.next=d,s|=f;if(a=a.next,a===null){if(a=n.shared.pending,a===null)break;f=a,a=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(!0);if(h===null&&(l=u),n.baseState=l,n.firstBaseUpdate=c,n.lastBaseUpdate=h,t=n.shared.interleaved,t!==null){n=t;do s|=n.lane,n=n.next;while(n!==t)}else o===null&&(n.shared.lanes=0);Tn|=s,e.lanes=s,e.memoizedState=u}}function Oy(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],n=i.callback;if(n!==null){if(i.callback=null,i=r,typeof n!="function")throw Error(X(191,n));n.call(i)}}}var Ga={},Ur=Ki(Ga),wa=Ki(Ga),Sa=Ki(Ga);function fn(e){if(e===Ga)throw Error(X(174));return e}function tg(e,t){switch(It(Sa,t),It(wa,e),It(Ur,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Id(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Id(t,e)}Rt(Ur),It(Ur,t)}function Uo(){Rt(Ur),Rt(wa),Rt(Sa)}function O1(e){fn(Sa.current);var t=fn(Ur.current),r=Id(t,e.type);t!==r&&(It(wa,e),It(Ur,r))}function eg(e){wa.current===e&&(Rt(Ur),Rt(wa))}var zt=Ki(0);function Mc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wu=[];function rg(){for(var e=0;e<Wu.length;e++)Wu[e]._workInProgressVersionPrimary=null;Wu.length=0}var Ql=Ci.ReactCurrentDispatcher,ju=Ci.ReactCurrentBatchConfig,Sn=0,qt=null,te=null,oe=null,$c=!1,Js=!1,Ta=0,BL=0;function ye(){throw Error(X(321))}function ig(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ar(e[r],t[r]))return!1;return!0}function ng(e,t,r,i,n,o){if(Sn=o,qt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ql.current=e===null||e.memoizedState===null?FL:ML,e=r(i,n),Js){o=0;do{if(Js=!1,Ta=0,25<=o)throw Error(X(301));o+=1,oe=te=null,t.updateQueue=null,Ql.current=$L,e=r(i,n)}while(Js)}if(Ql.current=Ic,t=te!==null&&te.next!==null,Sn=0,oe=te=qt=null,$c=!1,t)throw Error(X(300));return e}function og(){var e=Ta!==0;return Ta=0,e}function qr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?qt.memoizedState=oe=e:oe=oe.next=e,oe}function fr(){if(te===null){var e=qt.alternate;e=e!==null?e.memoizedState:null}else e=te.next;var t=oe===null?qt.memoizedState:oe.next;if(t!==null)oe=t,te=e;else{if(e===null)throw Error(X(310));te=e,e={memoizedState:te.memoizedState,baseState:te.baseState,baseQueue:te.baseQueue,queue:te.queue,next:null},oe===null?qt.memoizedState=oe=e:oe=oe.next=e}return oe}function _a(e,t){return typeof t=="function"?t(e):t}function Hu(e){var t=fr(),r=t.queue;if(r===null)throw Error(X(311));r.lastRenderedReducer=e;var i=te,n=i.baseQueue,o=r.pending;if(o!==null){if(n!==null){var s=n.next;n.next=o.next,o.next=s}i.baseQueue=n=o,r.pending=null}if(n!==null){o=n.next,i=i.baseState;var a=s=null,l=null,c=o;do{var h=c.lane;if((Sn&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var u={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,s=i):l=l.next=u,qt.lanes|=h,Tn|=h}c=c.next}while(c!==null&&c!==o);l===null?s=i:l.next=a,Ar(i,t.memoizedState)||(We=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,r.lastRenderedState=i}if(e=r.interleaved,e!==null){n=e;do o=n.lane,qt.lanes|=o,Tn|=o,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Uu(e){var t=fr(),r=t.queue;if(r===null)throw Error(X(311));r.lastRenderedReducer=e;var i=r.dispatch,n=r.pending,o=t.memoizedState;if(n!==null){r.pending=null;var s=n=n.next;do o=e(o,s.action),s=s.next;while(s!==n);Ar(o,t.memoizedState)||(We=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,i]}function R1(){}function D1(e,t){var r=qt,i=fr(),n=t(),o=!Ar(i.memoizedState,n);if(o&&(i.memoizedState=n,We=!0),i=i.queue,sg(q1.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||oe!==null&&oe.memoizedState.tag&1){if(r.flags|=2048,Ba(9,z1.bind(null,r,i,n,t),void 0,null),ae===null)throw Error(X(349));Sn&30||N1(r,t,n)}return n}function N1(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qt.updateQueue,t===null?(t={lastEffect:null,stores:null},qt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function z1(e,t,r,i){t.value=r,t.getSnapshot=i,W1(t)&&j1(e)}function q1(e,t,r){return r(function(){W1(t)&&j1(e)})}function W1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ar(e,r)}catch{return!0}}function j1(e){var t=gi(e,1);t!==null&&Br(t,e,1,-1)}function Ry(e){var t=qr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t.queue=e,e=e.dispatch=AL.bind(null,qt,e),[t.memoizedState,e]}function Ba(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=qt.updateQueue,t===null?(t={lastEffect:null,stores:null},qt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function H1(){return fr().memoizedState}function Zl(e,t,r,i){var n=qr();qt.flags|=e,n.memoizedState=Ba(1|t,r,void 0,i===void 0?null:i)}function Mh(e,t,r,i){var n=fr();i=i===void 0?null:i;var o=void 0;if(te!==null){var s=te.memoizedState;if(o=s.destroy,i!==null&&ig(i,s.deps)){n.memoizedState=Ba(t,r,o,i);return}}qt.flags|=e,n.memoizedState=Ba(1|t,r,o,i)}function Dy(e,t){return Zl(8390656,8,e,t)}function sg(e,t){return Mh(2048,8,e,t)}function U1(e,t){return Mh(4,2,e,t)}function Y1(e,t){return Mh(4,4,e,t)}function V1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function G1(e,t,r){return r=r!=null?r.concat([e]):null,Mh(4,4,V1.bind(null,t,e),r)}function ag(){}function X1(e,t){var r=fr();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&ig(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Q1(e,t){var r=fr();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&ig(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Z1(e,t,r){return Sn&21?(Ar(r,t)||(r=r1(),qt.lanes|=r,Tn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,We=!0),e.memoizedState=r)}function LL(e,t){var r=At;At=r!==0&&4>r?r:4,e(!0);var i=ju.transition;ju.transition={};try{e(!1),t()}finally{At=r,ju.transition=i}}function K1(){return fr().memoizedState}function EL(e,t,r){var i=qi(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},J1(e))tb(t,r);else if(r=I1(e,t,r,i),r!==null){var n=Fe();Br(r,e,i,n),eb(r,t,i)}}function AL(e,t,r){var i=qi(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(J1(e))tb(t,n);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,r);if(n.hasEagerState=!0,n.eagerState=a,Ar(a,s)){var l=t.interleaved;l===null?(n.next=n,Kp(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=I1(e,t,n,i),r!==null&&(n=Fe(),Br(r,e,i,n),eb(r,t,i))}}function J1(e){var t=e.alternate;return e===qt||t!==null&&t===qt}function tb(e,t){Js=$c=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function eb(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Dp(e,r)}}var Ic={readContext:dr,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},FL={readContext:dr,useCallback:function(e,t){return qr().memoizedState=[e,t===void 0?null:t],e},useContext:dr,useEffect:Dy,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Zl(4194308,4,V1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zl(4,2,e,t)},useMemo:function(e,t){var r=qr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=qr();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=EL.bind(null,qt,e),[i.memoizedState,e]},useRef:function(e){var t=qr();return e={current:e},t.memoizedState=e},useState:Ry,useDebugValue:ag,useDeferredValue:function(e){return qr().memoizedState=e},useTransition:function(){var e=Ry(!1),t=e[0];return e=LL.bind(null,e[1]),qr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=qt,n=qr();if(Nt){if(r===void 0)throw Error(X(407));r=r()}else{if(r=t(),ae===null)throw Error(X(349));Sn&30||N1(i,t,r)}n.memoizedState=r;var o={value:r,getSnapshot:t};return n.queue=o,Dy(q1.bind(null,i,o,e),[e]),i.flags|=2048,Ba(9,z1.bind(null,i,o,r,t),void 0,null),r},useId:function(){var e=qr(),t=ae.identifierPrefix;if(Nt){var r=ai,i=si;r=(i&~(1<<32-_r(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ta++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=BL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ML={readContext:dr,useCallback:X1,useContext:dr,useEffect:sg,useImperativeHandle:G1,useInsertionEffect:U1,useLayoutEffect:Y1,useMemo:Q1,useReducer:Hu,useRef:H1,useState:function(){return Hu(_a)},useDebugValue:ag,useDeferredValue:function(e){var t=fr();return Z1(t,te.memoizedState,e)},useTransition:function(){var e=Hu(_a)[0],t=fr().memoizedState;return[e,t]},useMutableSource:R1,useSyncExternalStore:D1,useId:K1,unstable_isNewReconciler:!1},$L={readContext:dr,useCallback:X1,useContext:dr,useEffect:sg,useImperativeHandle:G1,useInsertionEffect:U1,useLayoutEffect:Y1,useMemo:Q1,useReducer:Uu,useRef:H1,useState:function(){return Uu(_a)},useDebugValue:ag,useDeferredValue:function(e){var t=fr();return te===null?t.memoizedState=e:Z1(t,te.memoizedState,e)},useTransition:function(){var e=Uu(_a)[0],t=fr().memoizedState;return[e,t]},useMutableSource:R1,useSyncExternalStore:D1,useId:K1,unstable_isNewReconciler:!1};function Cr(e,t){if(e&&e.defaultProps){t=jt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ef(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:jt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var $h={isMounted:function(e){return(e=e._reactInternals)?Rn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Fe(),n=qi(e),o=hi(i,n);o.payload=t,r!=null&&(o.callback=r),t=Ni(e,o,n),t!==null&&(Br(t,e,n,i),Xl(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Fe(),n=qi(e),o=hi(i,n);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Ni(e,o,n),t!==null&&(Br(t,e,n,i),Xl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Fe(),i=qi(e),n=hi(r,i);n.tag=2,t!=null&&(n.callback=t),t=Ni(e,n,i),t!==null&&(Br(t,e,i,r),Xl(t,e,i))}};function Ny(e,t,r,i,n,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,s):t.prototype&&t.prototype.isPureReactComponent?!Ca(r,i)||!Ca(n,o):!0}function rb(e,t,r){var i=!1,n=Yi,o=t.contextType;return typeof o=="object"&&o!==null?o=dr(o):(n=Ue(t)?vn:Se.current,i=t.contextTypes,o=(i=i!=null)?Wo(e,n):Yi),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$h,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=o),t}function zy(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&$h.enqueueReplaceState(t,t.state,null)}function rf(e,t,r,i){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},Jp(e);var o=t.contextType;typeof o=="object"&&o!==null?n.context=dr(o):(o=Ue(t)?vn:Se.current,n.context=Wo(e,o)),n.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ef(e,t,o,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&$h.enqueueReplaceState(n,n.state,null),Fc(e,r,n,i),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Yo(e,t){try{var r="",i=t;do r+=aB(i),i=i.return;while(i);var n=r}catch(o){n=`
|
|
40
|
-
Error generating stack: `+o.message+`
|
|
41
|
-
`+o.stack}return{value:e,source:t,stack:n,digest:null}}function Yu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function nf(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var IL=typeof WeakMap=="function"?WeakMap:Map;function ib(e,t,r){r=hi(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Oc||(Oc=!0,pf=i),nf(e,t)},r}function nb(e,t,r){r=hi(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var n=t.value;r.payload=function(){return i(n)},r.callback=function(){nf(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){nf(e,t),typeof i!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function qy(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new IL;var n=new Set;i.set(t,n)}else n=i.get(t),n===void 0&&(n=new Set,i.set(t,n));n.has(r)||(n.add(r),e=GL.bind(null,e,t,r),t.then(e,e))}function Wy(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jy(e,t,r,i,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=hi(-1,1),t.tag=2,Ni(r,t,1))),r.lanes|=1),e)}var PL=Ci.ReactCurrentOwner,We=!1;function Be(e,t,r,i){t.child=e===null?$1(t,null,r,i):Ho(t,e.child,r,i)}function Hy(e,t,r,i,n){r=r.render;var o=t.ref;return vo(t,n),i=ng(e,t,r,i,o,n),r=og(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,mi(e,t,n)):(Nt&&r&&Yp(t),t.flags|=1,Be(e,t,i,n),t.child)}function Uy(e,t,r,i,n){if(e===null){var o=r.type;return typeof o=="function"&&!gg(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,ob(e,t,o,i,n)):(e=ec(r.type,null,i,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&n)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:Ca,r(s,i)&&e.ref===t.ref)return mi(e,t,n)}return t.flags|=1,e=Wi(o,i),e.ref=t.ref,e.return=t,t.child=e}function ob(e,t,r,i,n){if(e!==null){var o=e.memoizedProps;if(Ca(o,i)&&e.ref===t.ref)if(We=!1,t.pendingProps=i=o,(e.lanes&n)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,mi(e,t,n)}return of(e,t,r,i,n)}function sb(e,t,r){var i=t.pendingProps,n=i.children,o=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},It(mo,Ze),Ze|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,It(mo,Ze),Ze|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=o!==null?o.baseLanes:r,It(mo,Ze),Ze|=i}else o!==null?(i=o.baseLanes|r,t.memoizedState=null):i=r,It(mo,Ze),Ze|=i;return Be(e,t,n,r),t.child}function ab(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function of(e,t,r,i,n){var o=Ue(r)?vn:Se.current;return o=Wo(t,o),vo(t,n),r=ng(e,t,r,i,o,n),i=og(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,mi(e,t,n)):(Nt&&i&&Yp(t),t.flags|=1,Be(e,t,r,n),t.child)}function Yy(e,t,r,i,n){if(Ue(r)){var o=!0;_c(t)}else o=!1;if(vo(t,n),t.stateNode===null)Kl(e,t),rb(t,r,i),rf(t,r,i,n),i=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=dr(c):(c=Ue(r)?vn:Se.current,c=Wo(t,c));var h=r.getDerivedStateFromProps,u=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==i||l!==c)&&zy(t,s,i,c),Bi=!1;var f=t.memoizedState;s.state=f,Fc(t,i,s,n),l=t.memoizedState,a!==i||f!==l||He.current||Bi?(typeof h=="function"&&(ef(t,r,h,i),l=t.memoizedState),(a=Bi||Ny(t,r,a,i,f,l,c))?(u||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"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),s.props=i,s.state=l,s.context=c,i=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{s=t.stateNode,P1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Cr(t.type,a),s.props=c,u=t.pendingProps,f=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=dr(l):(l=Ue(r)?vn:Se.current,l=Wo(t,l));var d=r.getDerivedStateFromProps;(h=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==u||f!==l)&&zy(t,s,i,l),Bi=!1,f=t.memoizedState,s.state=f,Fc(t,i,s,n);var p=t.memoizedState;a!==u||f!==p||He.current||Bi?(typeof d=="function"&&(ef(t,r,d,i),p=t.memoizedState),(c=Bi||Ny(t,r,c,i,f,p,l)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(i,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(i,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),s.props=i,s.state=p,s.context=l,i=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),i=!1)}return sf(e,t,r,i,o,n)}function sf(e,t,r,i,n,o){ab(e,t);var s=(t.flags&128)!==0;if(!i&&!s)return n&&Fy(t,r,!1),mi(e,t,o);i=t.stateNode,PL.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&s?(t.child=Ho(t,e.child,null,o),t.child=Ho(t,null,a,o)):Be(e,t,a,o),t.memoizedState=i.state,n&&Fy(t,r,!0),t.child}function lb(e){var t=e.stateNode;t.pendingContext?Ay(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ay(e,t.context,!1),tg(e,t.containerInfo)}function Vy(e,t,r,i,n){return jo(),Gp(n),t.flags|=256,Be(e,t,r,i),t.child}var af={dehydrated:null,treeContext:null,retryLane:0};function lf(e){return{baseLanes:e,cachePool:null,transitions:null}}function cb(e,t,r){var i=t.pendingProps,n=zt.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(n&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),It(zt,n&1),e===null)return Jd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,o?(i=t.mode,o=t.child,s={mode:"hidden",children:s},!(i&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Oh(s,i,0,null),e=Cn(e,i,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=lf(r),t.memoizedState=af,e):lg(t,s));if(n=e.memoizedState,n!==null&&(a=n.dehydrated,a!==null))return OL(e,t,s,i,a,n,r);if(o){o=i.fallback,s=t.mode,n=e.child,a=n.sibling;var l={mode:"hidden",children:i.children};return!(s&1)&&t.child!==n?(i=t.child,i.childLanes=0,i.pendingProps=l,t.deletions=null):(i=Wi(n,l),i.subtreeFlags=n.subtreeFlags&14680064),a!==null?o=Wi(a,o):(o=Cn(o,s,r,null),o.flags|=2),o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,s=e.child.memoizedState,s=s===null?lf(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~r,t.memoizedState=af,i}return o=e.child,e=o.sibling,i=Wi(o,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function lg(e,t){return t=Oh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,r,i){return i!==null&&Gp(i),Ho(t,e.child,null,r),e=lg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function OL(e,t,r,i,n,o,s){if(r)return t.flags&256?(t.flags&=-257,i=Yu(Error(X(422))),Tl(e,t,s,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=i.fallback,n=t.mode,i=Oh({mode:"visible",children:i.children},n,0,null),o=Cn(o,n,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ho(t,e.child,null,s),t.child.memoizedState=lf(s),t.memoizedState=af,o);if(!(t.mode&1))return Tl(e,t,s,null);if(n.data==="$!"){if(i=n.nextSibling&&n.nextSibling.dataset,i)var a=i.dgst;return i=a,o=Error(X(419)),i=Yu(o,i,void 0),Tl(e,t,s,i)}if(a=(s&e.childLanes)!==0,We||a){if(i=ae,i!==null){switch(s&-s){case 4:n=2;break;case 16:n=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(i.suspendedLanes|s)?0:n,n!==0&&n!==o.retryLane&&(o.retryLane=n,gi(e,n),Br(i,e,n,-1))}return pg(),i=Yu(Error(X(421))),Tl(e,t,s,i)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=XL.bind(null,e),n._reactRetry=t,null):(e=o.treeContext,Ke=Di(n.nextSibling),Je=t,Nt=!0,kr=null,e!==null&&(lr[cr++]=si,lr[cr++]=ai,lr[cr++]=wn,si=e.id,ai=e.overflow,wn=t),t=lg(t,i.children),t.flags|=4096,t)}function Gy(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),tf(e.return,t,r)}function Vu(e,t,r,i,n){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:n}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=r,o.tailMode=n)}function hb(e,t,r){var i=t.pendingProps,n=i.revealOrder,o=i.tail;if(Be(e,t,i.children,r),i=zt.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)t:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gy(e,r,t);else if(e.tag===19)Gy(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(It(zt,i),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Mc(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),Vu(t,!1,n,r,o);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Mc(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}Vu(t,!0,r,null,o);break;case"together":Vu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(X(153));if(t.child!==null){for(e=t.child,r=Wi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Wi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function RL(e,t,r){switch(t.tag){case 3:lb(t),jo();break;case 5:O1(t);break;case 1:Ue(t.type)&&_c(t);break;case 4:tg(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,n=t.memoizedProps.value;It(Ec,i._currentValue),i._currentValue=n;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(It(zt,zt.current&1),t.flags|=128,null):r&t.child.childLanes?cb(e,t,r):(It(zt,zt.current&1),e=mi(e,t,r),e!==null?e.sibling:null);It(zt,zt.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return hb(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),It(zt,zt.current),i)break;return null;case 22:case 23:return t.lanes=0,sb(e,t,r)}return mi(e,t,r)}var ub,cf,db,fb;ub=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};cf=function(){};db=function(e,t,r,i){var n=e.memoizedProps;if(n!==i){e=t.stateNode,fn(Ur.current);var o=null;switch(r){case"input":n=Ad(e,n),i=Ad(e,i),o=[];break;case"select":n=jt({},n,{value:void 0}),i=jt({},i,{value:void 0}),o=[];break;case"textarea":n=$d(e,n),i=$d(e,i),o=[];break;default:typeof n.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Sc)}Pd(r,i);var s;r=null;for(c in n)if(!i.hasOwnProperty(c)&&n.hasOwnProperty(c)&&n[c]!=null)if(c==="style"){var a=n[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(da.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in i){var l=i[c];if(a=n!=null?n[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(da.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Pt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};fb=function(e,t,r,i){r!==i&&(t.flags|=4)};function xs(e,t){if(!Nt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags&14680064,i|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags,i|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function DL(e,t,r){var i=t.pendingProps;switch(Vp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xe(t),null;case 1:return Ue(t.type)&&Tc(),xe(t),null;case 3:return i=t.stateNode,Uo(),Rt(He),Rt(Se),rg(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(wl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kr!==null&&(yf(kr),kr=null))),cf(e,t),xe(t),null;case 5:eg(t);var n=fn(Sa.current);if(r=t.type,e!==null&&t.stateNode!=null)db(e,t,r,i,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(X(166));return xe(t),null}if(e=fn(Ur.current),wl(t)){i=t.stateNode,r=t.type;var o=t.memoizedProps;switch(i[jr]=t,i[va]=o,e=(t.mode&1)!==0,r){case"dialog":Pt("cancel",i),Pt("close",i);break;case"iframe":case"object":case"embed":Pt("load",i);break;case"video":case"audio":for(n=0;n<Ds.length;n++)Pt(Ds[n],i);break;case"source":Pt("error",i);break;case"img":case"image":case"link":Pt("error",i),Pt("load",i);break;case"details":Pt("toggle",i);break;case"input":iy(i,o),Pt("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},Pt("invalid",i);break;case"textarea":oy(i,o),Pt("invalid",i)}Pd(r,o),n=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?i.textContent!==a&&(o.suppressHydrationWarning!==!0&&vl(i.textContent,a,e),n=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&vl(i.textContent,a,e),n=["children",""+a]):da.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Pt("scroll",i)}switch(r){case"input":pl(i),ny(i,o,!0);break;case"textarea":pl(i),sy(i);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(i.onclick=Sc)}i=n,t.updateQueue=i,i!==null&&(t.flags|=4)}else{s=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=s.createElement(r,{is:i.is}):(e=s.createElement(r),r==="select"&&(s=e,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):e=s.createElementNS(e,r),e[jr]=t,e[va]=i,ub(e,t,!1,!1),t.stateNode=e;t:{switch(s=Od(r,i),r){case"dialog":Pt("cancel",e),Pt("close",e),n=i;break;case"iframe":case"object":case"embed":Pt("load",e),n=i;break;case"video":case"audio":for(n=0;n<Ds.length;n++)Pt(Ds[n],e);n=i;break;case"source":Pt("error",e),n=i;break;case"img":case"image":case"link":Pt("error",e),Pt("load",e),n=i;break;case"details":Pt("toggle",e),n=i;break;case"input":iy(e,i),n=Ad(e,i),Pt("invalid",e);break;case"option":n=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},n=jt({},i,{value:void 0}),Pt("invalid",e);break;case"textarea":oy(e,i),n=$d(e,i),Pt("invalid",e);break;default:n=i}Pd(r,n),a=n;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?HC(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&WC(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&fa(e,l):typeof l=="number"&&fa(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(da.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Pt("scroll",e):l!=null&&Mp(e,o,l,s))}switch(r){case"input":pl(e),ny(e,i,!1);break;case"textarea":pl(e),sy(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Ui(i.value));break;case"select":e.multiple=!!i.multiple,o=i.value,o!=null?xo(e,!!i.multiple,o,!1):i.defaultValue!=null&&xo(e,!!i.multiple,i.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Sc)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xe(t),null;case 6:if(e&&t.stateNode!=null)fb(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(X(166));if(r=fn(Sa.current),fn(Ur.current),wl(t)){if(i=t.stateNode,r=t.memoizedProps,i[jr]=t,(o=i.nodeValue!==r)&&(e=Je,e!==null))switch(e.tag){case 3:vl(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(i.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[jr]=t,t.stateNode=i}return xe(t),null;case 13:if(Rt(zt),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Nt&&Ke!==null&&t.mode&1&&!(t.flags&128))F1(),jo(),t.flags|=98560,o=!1;else if(o=wl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(X(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(X(317));o[jr]=t}else jo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xe(t),o=!1}else kr!==null&&(yf(kr),kr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||zt.current&1?ie===0&&(ie=3):pg())),t.updateQueue!==null&&(t.flags|=4),xe(t),null);case 4:return Uo(),cf(e,t),e===null&&ba(t.stateNode.containerInfo),xe(t),null;case 10:return Zp(t.type._context),xe(t),null;case 17:return Ue(t.type)&&Tc(),xe(t),null;case 19:if(Rt(zt),o=t.memoizedState,o===null)return xe(t),null;if(i=(t.flags&128)!==0,s=o.rendering,s===null)if(i)xs(o,!1);else{if(ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Mc(e),s!==null){for(t.flags|=128,xs(o,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)o=r,e=i,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return It(zt,zt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Vt()>Vo&&(t.flags|=128,i=!0,xs(o,!1),t.lanes=4194304)}else{if(!i)if(e=Mc(s),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),xs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Nt)return xe(t),null}else 2*Vt()-o.renderingStartTime>Vo&&r!==1073741824&&(t.flags|=128,i=!0,xs(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(r=o.last,r!==null?r.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,r=zt.current,It(zt,i?r&1|2:r&1),t):(xe(t),null);case 22:case 23:return fg(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ze&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(X(156,t.tag))}function NL(e,t){switch(Vp(t),t.tag){case 1:return Ue(t.type)&&Tc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Uo(),Rt(He),Rt(Se),rg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eg(t),null;case 13:if(Rt(zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(X(340));jo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(zt),null;case 4:return Uo(),null;case 10:return Zp(t.type._context),null;case 22:case 23:return fg(),null;case 24:return null;default:return null}}var _l=!1,ve=!1,zL=typeof WeakSet=="function"?WeakSet:Set,J=null;function go(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Yt(e,t,i)}else r.current=null}function hf(e,t,r){try{r()}catch(i){Yt(e,t,i)}}var Xy=!1;function qL(e,t){if(Yd=kc,e=x1(),Up(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else t:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var n=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break t}var s=0,a=-1,l=-1,c=0,h=0,u=e,f=null;e:for(;;){for(var d;u!==r||n!==0&&u.nodeType!==3||(a=s+n),u!==o||i!==0&&u.nodeType!==3||(l=s+i),u.nodeType===3&&(s+=u.nodeValue.length),(d=u.firstChild)!==null;)f=u,u=d;for(;;){if(u===e)break e;if(f===r&&++c===n&&(a=s),f===o&&++h===i&&(l=s),(d=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=d}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Vd={focusedElem:e,selectionRange:r},kc=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,x=p.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cr(t.type,g),x);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch(v){Yt(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return p=Xy,Xy=!1,p}function ta(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var n=i=i.next;do{if((n.tag&e)===e){var o=n.destroy;n.destroy=void 0,o!==void 0&&hf(t,r,o)}n=n.next}while(n!==i)}}function Ih(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function uf(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function pb(e){var t=e.alternate;t!==null&&(e.alternate=null,pb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jr],delete t[va],delete t[Qd],delete t[wL],delete t[SL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gb(e){return e.tag===5||e.tag===3||e.tag===4}function Qy(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||gb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function df(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Sc));else if(i!==4&&(e=e.child,e!==null))for(df(e,t,r),e=e.sibling;e!==null;)df(e,t,r),e=e.sibling}function ff(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(ff(e,t,r),e=e.sibling;e!==null;)ff(e,t,r),e=e.sibling}var ue=null,br=!1;function Si(e,t,r){for(r=r.child;r!==null;)mb(e,t,r),r=r.sibling}function mb(e,t,r){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(_h,r)}catch{}switch(r.tag){case 5:ve||go(r,t);case 6:var i=ue,n=br;ue=null,Si(e,t,r),ue=i,br=n,ue!==null&&(br?(e=ue,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ue.removeChild(r.stateNode));break;case 18:ue!==null&&(br?(e=ue,r=r.stateNode,e.nodeType===8?zu(e.parentNode,r):e.nodeType===1&&zu(e,r),ya(e)):zu(ue,r.stateNode));break;case 4:i=ue,n=br,ue=r.stateNode.containerInfo,br=!0,Si(e,t,r),ue=i,br=n;break;case 0:case 11:case 14:case 15:if(!ve&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){n=i=i.next;do{var o=n,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&hf(r,t,s),n=n.next}while(n!==i)}Si(e,t,r);break;case 1:if(!ve&&(go(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(a){Yt(r,t,a)}Si(e,t,r);break;case 21:Si(e,t,r);break;case 22:r.mode&1?(ve=(i=ve)||r.memoizedState!==null,Si(e,t,r),ve=i):Si(e,t,r);break;default:Si(e,t,r)}}function Zy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new zL),t.forEach(function(i){var n=QL.bind(null,e,i);r.has(i)||(r.add(i),i.then(n,n))})}}function xr(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var n=r[i];try{var o=e,s=t,a=s;t:for(;a!==null;){switch(a.tag){case 5:ue=a.stateNode,br=!1;break t;case 3:ue=a.stateNode.containerInfo,br=!0;break t;case 4:ue=a.stateNode.containerInfo,br=!0;break t}a=a.return}if(ue===null)throw Error(X(160));mb(o,s,n),ue=null,br=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(c){Yt(n,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)yb(t,e),t=t.sibling}function yb(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xr(t,e),Rr(e),i&4){try{ta(3,e,e.return),Ih(3,e)}catch(g){Yt(e,e.return,g)}try{ta(5,e,e.return)}catch(g){Yt(e,e.return,g)}}break;case 1:xr(t,e),Rr(e),i&512&&r!==null&&go(r,r.return);break;case 5:if(xr(t,e),Rr(e),i&512&&r!==null&&go(r,r.return),e.flags&32){var n=e.stateNode;try{fa(n,"")}catch(g){Yt(e,e.return,g)}}if(i&4&&(n=e.stateNode,n!=null)){var o=e.memoizedProps,s=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&NC(n,o),Od(a,s);var c=Od(a,o);for(s=0;s<l.length;s+=2){var h=l[s],u=l[s+1];h==="style"?HC(n,u):h==="dangerouslySetInnerHTML"?WC(n,u):h==="children"?fa(n,u):Mp(n,h,u,c)}switch(a){case"input":Fd(n,o);break;case"textarea":zC(n,o);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?xo(n,!!o.multiple,d,!1):f!==!!o.multiple&&(o.defaultValue!=null?xo(n,!!o.multiple,o.defaultValue,!0):xo(n,!!o.multiple,o.multiple?[]:"",!1))}n[va]=o}catch(g){Yt(e,e.return,g)}}break;case 6:if(xr(t,e),Rr(e),i&4){if(e.stateNode===null)throw Error(X(162));n=e.stateNode,o=e.memoizedProps;try{n.nodeValue=o}catch(g){Yt(e,e.return,g)}}break;case 3:if(xr(t,e),Rr(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{ya(t.containerInfo)}catch(g){Yt(e,e.return,g)}break;case 4:xr(t,e),Rr(e);break;case 13:xr(t,e),Rr(e),n=e.child,n.flags&8192&&(o=n.memoizedState!==null,n.stateNode.isHidden=o,!o||n.alternate!==null&&n.alternate.memoizedState!==null||(ug=Vt())),i&4&&Zy(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(ve=(c=ve)||h,xr(t,e),ve=c):xr(t,e),Rr(e),i&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(J=e,h=e.child;h!==null;){for(u=J=h;J!==null;){switch(f=J,d=f.child,f.tag){case 0:case 11:case 14:case 15:ta(4,f,f.return);break;case 1:go(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){i=f,r=f.return;try{t=i,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){Yt(i,r,g)}}break;case 5:go(f,f.return);break;case 22:if(f.memoizedState!==null){Jy(u);continue}}d!==null?(d.return=f,J=d):Jy(u)}h=h.sibling}t:for(h=null,u=e;;){if(u.tag===5){if(h===null){h=u;try{n=u.stateNode,c?(o=n.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=u.stateNode,l=u.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=jC("display",s))}catch(g){Yt(e,e.return,g)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){Yt(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break t;for(;u.sibling===null;){if(u.return===null||u.return===e)break t;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:xr(t,e),Rr(e),i&4&&Zy(e);break;case 21:break;default:xr(t,e),Rr(e)}}function Rr(e){var t=e.flags;if(t&2){try{t:{for(var r=e.return;r!==null;){if(gb(r)){var i=r;break t}r=r.return}throw Error(X(160))}switch(i.tag){case 5:var n=i.stateNode;i.flags&32&&(fa(n,""),i.flags&=-33);var o=Qy(e);ff(e,o,n);break;case 3:case 4:var s=i.stateNode.containerInfo,a=Qy(e);df(e,a,s);break;default:throw Error(X(161))}}catch(l){Yt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function WL(e,t,r){J=e,xb(e)}function xb(e,t,r){for(var i=(e.mode&1)!==0;J!==null;){var n=J,o=n.child;if(n.tag===22&&i){var s=n.memoizedState!==null||_l;if(!s){var a=n.alternate,l=a!==null&&a.memoizedState!==null||ve;a=_l;var c=ve;if(_l=s,(ve=l)&&!c)for(J=n;J!==null;)s=J,l=s.child,s.tag===22&&s.memoizedState!==null?t0(n):l!==null?(l.return=s,J=l):t0(n);for(;o!==null;)J=o,xb(o),o=o.sibling;J=n,_l=a,ve=c}Ky(e)}else n.subtreeFlags&8772&&o!==null?(o.return=n,J=o):Ky(e)}}function Ky(e){for(;J!==null;){var t=J;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ve||Ih(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ve)if(r===null)i.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Cr(t.type,r.memoizedProps);i.componentDidUpdate(n,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Oy(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Oy(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var u=h.dehydrated;u!==null&&ya(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(X(163))}ve||t.flags&512&&uf(t)}catch(f){Yt(t,t.return,f)}}if(t===e){J=null;break}if(r=t.sibling,r!==null){r.return=t.return,J=r;break}J=t.return}}function Jy(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var r=t.sibling;if(r!==null){r.return=t.return,J=r;break}J=t.return}}function t0(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ih(4,t)}catch(l){Yt(t,r,l)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var n=t.return;try{i.componentDidMount()}catch(l){Yt(t,n,l)}}var o=t.return;try{uf(t)}catch(l){Yt(t,o,l)}break;case 5:var s=t.return;try{uf(t)}catch(l){Yt(t,s,l)}}}catch(l){Yt(t,t.return,l)}if(t===e){J=null;break}var a=t.sibling;if(a!==null){a.return=t.return,J=a;break}J=t.return}}var jL=Math.ceil,Pc=Ci.ReactCurrentDispatcher,cg=Ci.ReactCurrentOwner,ur=Ci.ReactCurrentBatchConfig,wt=0,ae=null,Zt=null,fe=0,Ze=0,mo=Ki(0),ie=0,La=null,Tn=0,Ph=0,hg=0,ea=null,Ne=null,ug=0,Vo=1/0,ni=null,Oc=!1,pf=null,zi=null,Bl=!1,Mi=null,Rc=0,ra=0,gf=null,Jl=-1,tc=0;function Fe(){return wt&6?Vt():Jl!==-1?Jl:Jl=Vt()}function qi(e){return e.mode&1?wt&2&&fe!==0?fe&-fe:_L.transition!==null?(tc===0&&(tc=r1()),tc):(e=At,e!==0||(e=window.event,e=e===void 0?16:c1(e.type)),e):1}function Br(e,t,r,i){if(50<ra)throw ra=0,gf=null,Error(X(185));Ua(e,r,i),(!(wt&2)||e!==ae)&&(e===ae&&(!(wt&2)&&(Ph|=r),ie===4&&Ai(e,fe)),Ye(e,i),r===1&&wt===0&&!(t.mode&1)&&(Vo=Vt()+500,Fh&&Ji()))}function Ye(e,t){var r=e.callbackNode;_B(e,t);var i=bc(e,e===ae?fe:0);if(i===0)r!==null&&cy(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&cy(r),t===1)e.tag===0?TL(e0.bind(null,e)):L1(e0.bind(null,e)),kL(function(){!(wt&6)&&Ji()}),r=null;else{switch(i1(i)){case 1:r=Rp;break;case 4:r=t1;break;case 16:r=Cc;break;case 536870912:r=e1;break;default:r=Cc}r=_b(r,Cb.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Cb(e,t){if(Jl=-1,tc=0,wt&6)throw Error(X(327));var r=e.callbackNode;if(wo()&&e.callbackNode!==r)return null;var i=bc(e,e===ae?fe:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Dc(e,i);else{t=i;var n=wt;wt|=2;var o=kb();(ae!==e||fe!==t)&&(ni=null,Vo=Vt()+500,xn(e,t));do try{YL();break}catch(a){bb(e,a)}while(!0);Qp(),Pc.current=o,wt=n,Zt!==null?t=0:(ae=null,fe=0,t=ie)}if(t!==0){if(t===2&&(n=qd(e),n!==0&&(i=n,t=mf(e,n))),t===1)throw r=La,xn(e,0),Ai(e,i),Ye(e,Vt()),r;if(t===6)Ai(e,i);else{if(n=e.current.alternate,!(i&30)&&!HL(n)&&(t=Dc(e,i),t===2&&(o=qd(e),o!==0&&(i=o,t=mf(e,o))),t===1))throw r=La,xn(e,0),Ai(e,i),Ye(e,Vt()),r;switch(e.finishedWork=n,e.finishedLanes=i,t){case 0:case 1:throw Error(X(345));case 2:an(e,Ne,ni);break;case 3:if(Ai(e,i),(i&130023424)===i&&(t=ug+500-Vt(),10<t)){if(bc(e,0)!==0)break;if(n=e.suspendedLanes,(n&i)!==i){Fe(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=Xd(an.bind(null,e,Ne,ni),t);break}an(e,Ne,ni);break;case 4:if(Ai(e,i),(i&4194240)===i)break;for(t=e.eventTimes,n=-1;0<i;){var s=31-_r(i);o=1<<s,s=t[s],s>n&&(n=s),i&=~o}if(i=n,i=Vt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*jL(i/1960))-i,10<i){e.timeoutHandle=Xd(an.bind(null,e,Ne,ni),i);break}an(e,Ne,ni);break;case 5:an(e,Ne,ni);break;default:throw Error(X(329))}}}return Ye(e,Vt()),e.callbackNode===r?Cb.bind(null,e):null}function mf(e,t){var r=ea;return e.current.memoizedState.isDehydrated&&(xn(e,t).flags|=256),e=Dc(e,t),e!==2&&(t=Ne,Ne=r,t!==null&&yf(t)),e}function yf(e){Ne===null?Ne=e:Ne.push.apply(Ne,e)}function HL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var n=r[i],o=n.getSnapshot;n=n.value;try{if(!Ar(o(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ai(e,t){for(t&=~hg,t&=~Ph,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-_r(t),i=1<<r;e[r]=-1,t&=~i}}function e0(e){if(wt&6)throw Error(X(327));wo();var t=bc(e,0);if(!(t&1))return Ye(e,Vt()),null;var r=Dc(e,t);if(e.tag!==0&&r===2){var i=qd(e);i!==0&&(t=i,r=mf(e,i))}if(r===1)throw r=La,xn(e,0),Ai(e,t),Ye(e,Vt()),r;if(r===6)throw Error(X(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,an(e,Ne,ni),Ye(e,Vt()),null}function dg(e,t){var r=wt;wt|=1;try{return e(t)}finally{wt=r,wt===0&&(Vo=Vt()+500,Fh&&Ji())}}function _n(e){Mi!==null&&Mi.tag===0&&!(wt&6)&&wo();var t=wt;wt|=1;var r=ur.transition,i=At;try{if(ur.transition=null,At=1,e)return e()}finally{At=i,ur.transition=r,wt=t,!(wt&6)&&Ji()}}function fg(){Ze=mo.current,Rt(mo)}function xn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,bL(r)),Zt!==null)for(r=Zt.return;r!==null;){var i=r;switch(Vp(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Tc();break;case 3:Uo(),Rt(He),Rt(Se),rg();break;case 5:eg(i);break;case 4:Uo();break;case 13:Rt(zt);break;case 19:Rt(zt);break;case 10:Zp(i.type._context);break;case 22:case 23:fg()}r=r.return}if(ae=e,Zt=e=Wi(e.current,null),fe=Ze=t,ie=0,La=null,hg=Ph=Tn=0,Ne=ea=null,dn!==null){for(t=0;t<dn.length;t++)if(r=dn[t],i=r.interleaved,i!==null){r.interleaved=null;var n=i.next,o=r.pending;if(o!==null){var s=o.next;o.next=n,i.next=s}r.pending=i}dn=null}return e}function bb(e,t){do{var r=Zt;try{if(Qp(),Ql.current=Ic,$c){for(var i=qt.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}$c=!1}if(Sn=0,oe=te=qt=null,Js=!1,Ta=0,cg.current=null,r===null||r.return===null){ie=1,La=t,Zt=null;break}t:{var o=e,s=r.return,a=r,l=t;if(t=fe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=a,u=h.tag;if(!(h.mode&1)&&(u===0||u===11||u===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var d=Wy(s);if(d!==null){d.flags&=-257,jy(d,s,a,o,t),d.mode&1&&qy(o,c,t),t=d,l=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break t}else{if(!(t&1)){qy(o,c,t),pg();break t}l=Error(X(426))}}else if(Nt&&a.mode&1){var x=Wy(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),jy(x,s,a,o,t),Gp(Yo(l,a));break t}}o=l=Yo(l,a),ie!==4&&(ie=2),ea===null?ea=[o]:ea.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=ib(o,l,t);Py(o,m);break t;case 1:a=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(zi===null||!zi.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=nb(o,a,t);Py(o,v);break t}}o=o.return}while(o!==null)}wb(r)}catch(S){t=S,Zt===r&&r!==null&&(Zt=r=r.return);continue}break}while(!0)}function kb(){var e=Pc.current;return Pc.current=Ic,e===null?Ic:e}function pg(){(ie===0||ie===3||ie===2)&&(ie=4),ae===null||!(Tn&268435455)&&!(Ph&268435455)||Ai(ae,fe)}function Dc(e,t){var r=wt;wt|=2;var i=kb();(ae!==e||fe!==t)&&(ni=null,xn(e,t));do try{UL();break}catch(n){bb(e,n)}while(!0);if(Qp(),wt=r,Pc.current=i,Zt!==null)throw Error(X(261));return ae=null,fe=0,ie}function UL(){for(;Zt!==null;)vb(Zt)}function YL(){for(;Zt!==null&&!yB();)vb(Zt)}function vb(e){var t=Tb(e.alternate,e,Ze);e.memoizedProps=e.pendingProps,t===null?wb(e):Zt=t,cg.current=null}function wb(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=NL(r,t),r!==null){r.flags&=32767,Zt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ie=6,Zt=null;return}}else if(r=DL(r,t,Ze),r!==null){Zt=r;return}if(t=t.sibling,t!==null){Zt=t;return}Zt=t=e}while(t!==null);ie===0&&(ie=5)}function an(e,t,r){var i=At,n=ur.transition;try{ur.transition=null,At=1,VL(e,t,r,i)}finally{ur.transition=n,At=i}return null}function VL(e,t,r,i){do wo();while(Mi!==null);if(wt&6)throw Error(X(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(X(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(BB(e,o),e===ae&&(Zt=ae=null,fe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Bl||(Bl=!0,_b(Cc,function(){return wo(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=ur.transition,ur.transition=null;var s=At;At=1;var a=wt;wt|=4,cg.current=null,qL(e,r),yb(r,e),fL(Vd),kc=!!Yd,Vd=Yd=null,e.current=r,WL(r),xB(),wt=a,At=s,ur.transition=o}else e.current=r;if(Bl&&(Bl=!1,Mi=e,Rc=n),o=e.pendingLanes,o===0&&(zi=null),kB(r.stateNode),Ye(e,Vt()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],i(n.value,{componentStack:n.stack,digest:n.digest});if(Oc)throw Oc=!1,e=pf,pf=null,e;return Rc&1&&e.tag!==0&&wo(),o=e.pendingLanes,o&1?e===gf?ra++:(ra=0,gf=e):ra=0,Ji(),null}function wo(){if(Mi!==null){var e=i1(Rc),t=ur.transition,r=At;try{if(ur.transition=null,At=16>e?16:e,Mi===null)var i=!1;else{if(e=Mi,Mi=null,Rc=0,wt&6)throw Error(X(331));var n=wt;for(wt|=4,J=e.current;J!==null;){var o=J,s=o.child;if(J.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(J=c;J!==null;){var h=J;switch(h.tag){case 0:case 11:case 15:ta(8,h,o)}var u=h.child;if(u!==null)u.return=h,J=u;else for(;J!==null;){h=J;var f=h.sibling,d=h.return;if(pb(h),h===c){J=null;break}if(f!==null){f.return=d,J=f;break}J=d}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}J=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,J=s;else t:for(;J!==null;){if(o=J,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ta(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,J=m;break t}J=o.return}}var y=e.current;for(J=y;J!==null;){s=J;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,J=b;else t:for(s=y;J!==null;){if(a=J,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ih(9,a)}}catch(S){Yt(a,a.return,S)}if(a===s){J=null;break t}var v=a.sibling;if(v!==null){v.return=a.return,J=v;break t}J=a.return}}if(wt=n,Ji(),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(_h,e)}catch{}i=!0}return i}finally{At=r,ur.transition=t}}return!1}function r0(e,t,r){t=Yo(r,t),t=ib(e,t,1),e=Ni(e,t,1),t=Fe(),e!==null&&(Ua(e,1,t),Ye(e,t))}function Yt(e,t,r){if(e.tag===3)r0(e,e,r);else for(;t!==null;){if(t.tag===3){r0(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(zi===null||!zi.has(i))){e=Yo(r,e),e=nb(t,e,1),t=Ni(t,e,1),e=Fe(),t!==null&&(Ua(t,1,e),Ye(t,e));break}}t=t.return}}function GL(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&r,ae===e&&(fe&r)===r&&(ie===4||ie===3&&(fe&130023424)===fe&&500>Vt()-ug?xn(e,0):hg|=r),Ye(e,t)}function Sb(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var r=Fe();e=gi(e,t),e!==null&&(Ua(e,t,r),Ye(e,r))}function XL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Sb(e,r)}function QL(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(X(314))}i!==null&&i.delete(t),Sb(e,r)}var Tb;Tb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)We=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return We=!1,RL(e,t,r);We=!!(e.flags&131072)}else We=!1,Nt&&t.flags&1048576&&E1(t,Lc,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Kl(e,t),e=t.pendingProps;var n=Wo(t,Se.current);vo(t,r),n=ng(null,t,i,e,n,r);var o=og();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(i)?(o=!0,_c(t)):o=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,Jp(t),n.updater=$h,t.stateNode=n,n._reactInternals=t,rf(t,i,e,r),t=sf(null,t,i,!0,o,r)):(t.tag=0,Nt&&o&&Yp(t),Be(null,t,n,r),t=t.child),t;case 16:i=t.elementType;t:{switch(Kl(e,t),e=t.pendingProps,n=i._init,i=n(i._payload),t.type=i,n=t.tag=KL(i),e=Cr(i,e),n){case 0:t=of(null,t,i,e,r);break t;case 1:t=Yy(null,t,i,e,r);break t;case 11:t=Hy(null,t,i,e,r);break t;case 14:t=Uy(null,t,i,Cr(i.type,e),r);break t}throw Error(X(306,i,""))}return t;case 0:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Cr(i,n),of(e,t,i,n,r);case 1:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Cr(i,n),Yy(e,t,i,n,r);case 3:t:{if(lb(t),e===null)throw Error(X(387));i=t.pendingProps,o=t.memoizedState,n=o.element,P1(e,t),Fc(t,i,null,r);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){n=Yo(Error(X(423)),t),t=Vy(e,t,i,r,n);break t}else if(i!==n){n=Yo(Error(X(424)),t),t=Vy(e,t,i,r,n);break t}else for(Ke=Di(t.stateNode.containerInfo.firstChild),Je=t,Nt=!0,kr=null,r=$1(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jo(),i===n){t=mi(e,t,r);break t}Be(e,t,i,r)}t=t.child}return t;case 5:return O1(t),e===null&&Jd(t),i=t.type,n=t.pendingProps,o=e!==null?e.memoizedProps:null,s=n.children,Gd(i,n)?s=null:o!==null&&Gd(i,o)&&(t.flags|=32),ab(e,t),Be(e,t,s,r),t.child;case 6:return e===null&&Jd(t),null;case 13:return cb(e,t,r);case 4:return tg(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ho(t,null,i,r):Be(e,t,i,r),t.child;case 11:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Cr(i,n),Hy(e,t,i,n,r);case 7:return Be(e,t,t.pendingProps,r),t.child;case 8:return Be(e,t,t.pendingProps.children,r),t.child;case 12:return Be(e,t,t.pendingProps.children,r),t.child;case 10:t:{if(i=t.type._context,n=t.pendingProps,o=t.memoizedProps,s=n.value,It(Ec,i._currentValue),i._currentValue=s,o!==null)if(Ar(o.value,s)){if(o.children===n.children&&!He.current){t=mi(e,t,r);break t}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=hi(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),tf(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(X(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),tf(s,r,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Be(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,i=t.pendingProps.children,vo(t,r),n=dr(n),i=i(n),t.flags|=1,Be(e,t,i,r),t.child;case 14:return i=t.type,n=Cr(i,t.pendingProps),n=Cr(i.type,n),Uy(e,t,i,n,r);case 15:return ob(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Cr(i,n),Kl(e,t),t.tag=1,Ue(i)?(e=!0,_c(t)):e=!1,vo(t,r),rb(t,i,n),rf(t,i,n,r),sf(null,t,i,!0,e,r);case 19:return hb(e,t,r);case 22:return sb(e,t,r)}throw Error(X(156,t.tag))};function _b(e,t){return JC(e,t)}function ZL(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hr(e,t,r,i){return new ZL(e,t,r,i)}function gg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KL(e){if(typeof e=="function")return gg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ip)return 11;if(e===Pp)return 14}return 2}function Wi(e,t){var r=e.alternate;return r===null?(r=hr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ec(e,t,r,i,n,o){var s=2;if(i=e,typeof e=="function")gg(e)&&(s=1);else if(typeof e=="string")s=5;else t:switch(e){case oo:return Cn(r.children,n,o,t);case $p:s=8,n|=8;break;case _d:return e=hr(12,r,t,n|2),e.elementType=_d,e.lanes=o,e;case Bd:return e=hr(13,r,t,n),e.elementType=Bd,e.lanes=o,e;case Ld:return e=hr(19,r,t,n),e.elementType=Ld,e.lanes=o,e;case OC:return Oh(r,n,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case IC:s=10;break t;case PC:s=9;break t;case Ip:s=11;break t;case Pp:s=14;break t;case _i:s=16,i=null;break t}throw Error(X(130,e==null?e:typeof e,""))}return t=hr(s,r,t,n),t.elementType=e,t.type=i,t.lanes=o,t}function Cn(e,t,r,i){return e=hr(7,e,i,t),e.lanes=r,e}function Oh(e,t,r,i){return e=hr(22,e,i,t),e.elementType=OC,e.lanes=r,e.stateNode={isHidden:!1},e}function Gu(e,t,r){return e=hr(6,e,null,t),e.lanes=r,e}function Xu(e,t,r){return t=hr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JL(e,t,r,i,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Eu(0),this.expirationTimes=Eu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eu(0),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function mg(e,t,r,i,n,o,s,a,l){return e=new JL(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=hr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jp(o),e}function tE(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:no,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Bb(e){if(!e)return Yi;e=e._reactInternals;t:{if(Rn(e)!==e||e.tag!==1)throw Error(X(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break t;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break t}}t=t.return}while(t!==null);throw Error(X(171))}if(e.tag===1){var r=e.type;if(Ue(r))return B1(e,r,t)}return t}function Lb(e,t,r,i,n,o,s,a,l){return e=mg(r,i,!0,e,n,o,s,a,l),e.context=Bb(null),r=e.current,i=Fe(),n=qi(r),o=hi(i,n),o.callback=t??null,Ni(r,o,n),e.current.lanes=n,Ua(e,n,i),Ye(e,i),e}function Rh(e,t,r,i){var n=t.current,o=Fe(),s=qi(n);return r=Bb(r),t.context===null?t.context=r:t.pendingContext=r,t=hi(o,s),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Ni(n,t,s),e!==null&&(Br(e,n,s,o),Xl(e,n,s)),s}function Nc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function i0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function yg(e,t){i0(e,t),(e=e.alternate)&&i0(e,t)}function eE(){return null}var Eb=typeof reportError=="function"?reportError:function(e){console.error(e)};function xg(e){this._internalRoot=e}Dh.prototype.render=xg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(X(409));Rh(e,t,null,null)};Dh.prototype.unmount=xg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_n(function(){Rh(null,e,null,null)}),t[pi]=null}};function Dh(e){this._internalRoot=e}Dh.prototype.unstable_scheduleHydration=function(e){if(e){var t=s1();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ei.length&&t!==0&&t<Ei[r].priority;r++);Ei.splice(r,0,e),r===0&&l1(e)}};function Cg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function n0(){}function rE(e,t,r,i,n){if(n){if(typeof i=="function"){var o=i;i=function(){var c=Nc(s);o.call(c)}}var s=Lb(t,i,e,0,null,!1,!1,"",n0);return e._reactRootContainer=s,e[pi]=s.current,ba(e.nodeType===8?e.parentNode:e),_n(),s}for(;n=e.lastChild;)e.removeChild(n);if(typeof i=="function"){var a=i;i=function(){var c=Nc(l);a.call(c)}}var l=mg(e,0,!1,null,null,!1,!1,"",n0);return e._reactRootContainer=l,e[pi]=l.current,ba(e.nodeType===8?e.parentNode:e),_n(function(){Rh(t,l,r,i)}),l}function zh(e,t,r,i,n){var o=r._reactRootContainer;if(o){var s=o;if(typeof n=="function"){var a=n;n=function(){var l=Nc(s);a.call(l)}}Rh(t,s,e,n)}else s=rE(r,t,e,n,i);return Nc(s)}n1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Rs(t.pendingLanes);r!==0&&(Dp(t,r|1),Ye(t,Vt()),!(wt&6)&&(Vo=Vt()+500,Ji()))}break;case 13:_n(function(){var i=gi(e,1);if(i!==null){var n=Fe();Br(i,e,1,n)}}),yg(e,1)}};Np=function(e){if(e.tag===13){var t=gi(e,134217728);if(t!==null){var r=Fe();Br(t,e,134217728,r)}yg(e,134217728)}};o1=function(e){if(e.tag===13){var t=qi(e),r=gi(e,t);if(r!==null){var i=Fe();Br(r,e,t,i)}yg(e,t)}};s1=function(){return At};a1=function(e,t){var r=At;try{return At=e,t()}finally{At=r}};Dd=function(e,t,r){switch(t){case"input":if(Fd(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var n=Ah(i);if(!n)throw Error(X(90));DC(i),Fd(i,n)}}}break;case"textarea":zC(e,r);break;case"select":t=r.value,t!=null&&xo(e,!!r.multiple,t,!1)}};VC=dg;GC=_n;var iE={usingClientEntryPoint:!1,Events:[Va,co,Ah,UC,YC,dg]},Cs={findFiberByHostInstance:un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nE={bundleType:Cs.bundleType,version:Cs.version,rendererPackageName:Cs.rendererPackageName,rendererConfig:Cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ci.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ZC(e),e===null?null:e.stateNode},findFiberByHostInstance:Cs.findFiberByHostInstance||eE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{_h=Ll.inject(nE),Hr=Ll}catch{}}nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iE;nr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cg(t))throw Error(X(200));return tE(e,t,null,r)};nr.createRoot=function(e,t){if(!Cg(e))throw Error(X(299));var r=!1,i="",n=Eb;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=mg(e,1,!1,null,null,r,!1,i,n),e[pi]=t.current,ba(e.nodeType===8?e.parentNode:e),new xg(t)};nr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(X(188)):(e=Object.keys(e).join(","),Error(X(268,e)));return e=ZC(t),e=e===null?null:e.stateNode,e};nr.flushSync=function(e){return _n(e)};nr.hydrate=function(e,t,r){if(!Nh(t))throw Error(X(200));return zh(null,e,t,!0,r)};nr.hydrateRoot=function(e,t,r){if(!Cg(e))throw Error(X(405));var i=r!=null&&r.hydratedSources||null,n=!1,o="",s=Eb;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Lb(t,null,e,1,r??null,n,!1,o,s),e[pi]=t.current,ba(e),i)for(e=0;e<i.length;e++)r=i[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new Dh(t)};nr.render=function(e,t,r){if(!Nh(t))throw Error(X(200));return zh(null,e,t,!1,r)};nr.unmountComponentAtNode=function(e){if(!Nh(e))throw Error(X(40));return e._reactRootContainer?(_n(function(){zh(null,null,e,!1,function(){e._reactRootContainer=null,e[pi]=null})}),!0):!1};nr.unstable_batchedUpdates=dg;nr.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Nh(r))throw Error(X(200));if(e==null||e._reactInternals===void 0)throw Error(X(38));return zh(e,t,r,!1,i)};nr.version="18.3.1-next-f1338f8080-20240426";function Ab(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ab)}catch(e){console.error(e)}}Ab(),AC.exports=nr;var oE=AC.exports,o0=oE;Sd.createRoot=o0.createRoot,Sd.hydrateRoot=o0.hydrateRoot;function sE(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function aE({sessions:e,onOpen:t}){const[r,i]=st.useState(!1),[n,o]=st.useState("");st.useEffect(()=>{if(!r)return;const l=c=>{c.key==="Escape"&&i(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[r]),st.useEffect(()=>{r||o("")},[r]);const s=n.trim().toLowerCase(),a=s?e.filter(l=>l.id.toLowerCase().includes(s)):e;return M.jsxs(M.Fragment,{children:[M.jsxs("button",{onClick:()=>i(!0),className:"flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Sessions",title:"Sessions",children:[M.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),"Sessions",M.jsx("span",{className:"rounded bg-muted px-1.5 text-[10px] leading-4",children:e.length})]}),M.jsx("div",{className:`fixed inset-0 z-50 bg-black/40 transition-opacity duration-200 ${r?"opacity-100":"pointer-events-none opacity-0"}`,onClick:()=>i(!1),"aria-hidden":"true"}),M.jsxs("aside",{className:`fixed right-0 top-0 z-50 flex h-full w-80 max-w-[85vw] flex-col border-l bg-background shadow-xl transition-transform duration-200 ease-out ${r?"translate-x-0":"translate-x-full"}`,role:"dialog","aria-modal":"true","aria-label":"Sessions",children:[M.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b px-4",children:[M.jsxs("span",{className:"flex items-center gap-2 text-sm font-semibold",children:["Sessions",M.jsx("span",{className:"rounded bg-muted px-1.5 text-[10px] leading-4 font-normal text-muted-foreground",children:e.length})]}),M.jsx("button",{onClick:()=>i(!1),className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Close sessions",children:M.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),M.jsx("div",{className:"shrink-0 border-b px-3 py-2",children:M.jsxs("div",{className:"relative",children:[M.jsxs("svg",{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("circle",{cx:"11",cy:"11",r:"8"}),M.jsx("path",{d:"M21 21l-4.35-4.35"})]}),M.jsx("input",{type:"text",value:n,onChange:l=>o(l.target.value),placeholder:"Search sessions…","aria-label":"Search sessions",className:"h-8 w-full rounded-md border bg-background pl-8 pr-7 text-xs outline-none placeholder:text-muted-foreground focus:border-primary"}),n&&M.jsx("button",{onClick:()=>o(""),className:"absolute right-1.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground","aria-label":"Clear search",children:M.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})}),M.jsx("div",{className:"flex-1 overflow-auto",children:e.length===0?M.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:"No saved sessions."}):a.length===0?M.jsxs("div",{className:"p-4 text-xs text-muted-foreground",children:['No sessions match "',n,'".']}):M.jsx("ul",{className:"py-1",children:a.map(l=>M.jsx("li",{className:"px-2",children:M.jsxs("button",{className:"w-full min-w-0 flex flex-col items-start rounded px-2 py-2 text-left hover:bg-accent",onClick:()=>{t(l.id),i(!1)},children:[M.jsx("span",{className:"w-full truncate text-sm font-medium",children:l.id}),M.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground",children:[l.blockCount," block",l.blockCount===1?"":"s"," · v",l.version," · ",sE(l.updatedAt),l.shared&&M.jsxs("span",{className:"inline-flex items-center gap-0.5 text-emerald-500",title:"Shared to cloud LaunchSecure",children:[M.jsx("svg",{className:"h-2.5 w-2.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:M.jsx("path",{d:"M20 6L9 17l-5-5"})}),"shared"]})]})]})},l.id))})})]})]})}function lE(){return M.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[M.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),M.jsx("path",{d:"M8 21h8"}),M.jsx("path",{d:"M12 17v4"}),M.jsx("path",{d:"M9.5 7.5 15 10l-5.5 2.5z",fill:"currentColor",stroke:"none"})]})}function cE(e,t){return e.find(r=>r.name===t)??e.find(r=>r.active)??e[0]}function hE({courses:e,selected:t,onSelect:r}){const i=cE(e,t);return M.jsxs("div",{className:"flex h-8 items-center gap-2 rounded-md border px-2.5 text-xs",title:"Org / project this deck targets, and the Launch Course it will be shared to (does not change your active course)",children:[M.jsxs("svg",{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:[M.jsx("circle",{cx:"12",cy:"12",r:"10"}),M.jsx("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),M.jsx("span",{className:"font-medium text-[hsl(var(--primary))]",children:(i==null?void 0:i.org)||"—"}),M.jsx("span",{className:"opacity-40",children:"/"}),M.jsx("span",{className:"font-medium",children:(i==null?void 0:i.project)||"—"}),M.jsx("span",{className:"mx-0.5 h-4 w-px bg-border","aria-hidden":"true"}),M.jsx("span",{className:"font-semibold uppercase tracking-wide text-muted-foreground",children:"Course"}),M.jsx("select",{value:(i==null?void 0:i.name)??"",onChange:n=>r(n.target.value),className:"cursor-pointer bg-transparent font-medium text-[hsl(var(--primary))] outline-none","aria-label":"Share target course",children:e.map(n=>M.jsxs("option",{value:n.name,disabled:!n.usable,children:[n.name,n.active?" (active)":"",n.usable?"":" — incomplete"]},n.name))})]})}const uE={idle:{label:"Connected",dotClass:"connected"},delivered:{label:"Content delivered",dotClass:"connected"},feedback:{label:"Feedback needed",dotClass:"feedback"}};function dE({connected:e,theme:t,setTheme:r,status:i,availableSessions:n,onOpenSession:o,courses:s,selectedCourse:a,onSelectCourse:l}){const c=t==="dark"?"light":"dark",h=e?uE[i]:{label:"Disconnected",dotClass:"disconnected"};return M.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center border-b bg-background px-4 shadow-sm",children:[M.jsxs("span",{className:"flex flex-1 items-center gap-2.5",children:[M.jsx("span",{className:"h-6 w-6 text-[hsl(var(--primary))]",children:M.jsx(lE,{})}),M.jsx("span",{className:"text-base font-semibold tracking-tight",children:"LaunchDeck"})]}),s.length>0&&M.jsx(hE,{courses:s,selected:a,onSelect:l}),M.jsxs("div",{className:"flex flex-1 items-center justify-end gap-3",children:[M.jsx(aE,{sessions:n,onOpen:o}),M.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[M.jsx("span",{className:`deck-status-dot ${h.dotClass}`}),h.label]}),M.jsx("button",{onClick:()=>r(c),className:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":`Switch to ${c} mode`,children:t==="dark"?M.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[M.jsx("circle",{cx:"12",cy:"12",r:"5"}),M.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}):M.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})})})]})]})}function fE({content:e,theme:t}){const r=st.useRef(null);return st.useEffect(()=>{const i=r.current;if(!i)return;const n=i.contentDocument;if(!n)return;const o=document.documentElement.classList.contains("dark");n.open(),n.write(`
|
|
42
|
-
<!DOCTYPE html>
|
|
43
|
-
<html>
|
|
44
|
-
<head>
|
|
45
|
-
<meta charset="UTF-8">
|
|
46
|
-
<style>
|
|
47
|
-
*, *::before, *::after { box-sizing: border-box; }
|
|
48
|
-
html, body {
|
|
49
|
-
margin: 0; padding: 0; height: 100%;
|
|
50
|
-
color: ${o?"#e4e4e7":"#18181b"};
|
|
51
|
-
background: transparent;
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
54
|
-
</head>
|
|
55
|
-
<body>${e}</body>
|
|
56
|
-
</html>
|
|
57
|
-
`),n.close()},[e,t]),M.jsx("iframe",{ref:r,sandbox:"allow-same-origin",className:"w-full h-full border-0",title:"HTML Preview"})}const pE="modulepreload",gE=function(e){return"/"+e},s0={},vt=function(t,r,i){let n=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=Promise.allSettled(r.map(l=>{if(l=gE(l),l in s0)return;s0[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":pE,c||(u.as="script"),u.crossOrigin="",u.href=l,a&&u.setAttribute("nonce",a),document.head.appendChild(u),c)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return n.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};var Fb={exports:{}};(function(e,t){(function(r,i){e.exports=i()})($_,function(){var r=1e3,i=6e4,n=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",p="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,y={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(P){var I=["th","st","nd","rd"],$=P%100;return"["+P+(I[($-20)%10]||I[$]||I[0])+"]"}},b=function(P,I,$){var O=String(P);return!O||O.length>=I?P:""+Array(I+1-O.length).join($)+P},v={s:b,z:function(P){var I=-P.utcOffset(),$=Math.abs(I),O=Math.floor($/60),B=$%60;return(I<=0?"+":"-")+b(O,2,"0")+":"+b(B,2,"0")},m:function P(I,$){if(I.date()<$.date())return-P($,I);var O=12*($.year()-I.year())+($.month()-I.month()),B=I.clone().add(O,u),z=$-B<0,W=I.clone().add(O+(z?-1:1),u);return+(-(O+($-B)/(z?B-W:W-B))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:u,y:d,w:h,d:c,D:p,h:l,m:a,s,ms:o,Q:f}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",_={};_[S]=y;var w="$isDayjsObject",T=function(P){return P instanceof V||!(!P||!P[w])},D=function P(I,$,O){var B;if(!I)return S;if(typeof I=="string"){var z=I.toLowerCase();_[z]&&(B=z),$&&(_[z]=$,B=z);var W=I.split("-");if(!B&&W.length>1)return P(W[0])}else{var q=I.name;_[q]=I,B=q}return!O&&B&&(S=B),B||!O&&S},A=function(P,I){if(T(P))return P.clone();var $=typeof I=="object"?I:{};return $.date=P,$.args=arguments,new V($)},F=v;F.l=D,F.i=T,F.w=function(P,I){return A(P,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var V=function(){function P($){this.$L=D($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[w]=!0}var I=P.prototype;return I.parse=function($){this.$d=function(O){var B=O.date,z=O.utc;if(B===null)return new Date(NaN);if(F.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var W=B.match(x);if(W){var q=W[2]-1||0,H=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,H)):new Date(W[1],q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,H)}}return new Date(B)}($),this.init()},I.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},I.$utils=function(){return F},I.isValid=function(){return this.$d.toString()!==g},I.isSame=function($,O){var B=A($);return this.startOf(O)<=B&&B<=this.endOf(O)},I.isAfter=function($,O){return A($)<this.startOf(O)},I.isBefore=function($,O){return this.endOf(O)<A($)},I.$g=function($,O,B){return F.u($)?this[O]:this.set(B,$)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function($,O){var B=this,z=!!F.u(O)||O,W=F.p($),q=function(Ve,ot){var mt=F.w(B.$u?Date.UTC(B.$y,ot,Ve):new Date(B.$y,ot,Ve),B);return z?mt:mt.endOf(c)},H=function(Ve,ot){return F.w(B.toDate()[Ve].apply(B.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ot)),B)},G=this.$W,Q=this.$M,Z=this.$D,gt="set"+(this.$u?"UTC":"");switch(W){case d:return z?q(1,0):q(31,11);case u:return z?q(1,Q):q(0,Q+1);case h:var Ct=this.$locale().weekStart||0,_t=(G<Ct?G+7:G)-Ct;return q(z?Z-_t:Z+(6-_t),Q);case c:case p:return H(gt+"Hours",0);case l:return H(gt+"Minutes",1);case a:return H(gt+"Seconds",2);case s:return H(gt+"Milliseconds",3);default:return this.clone()}},I.endOf=function($){return this.startOf($,!1)},I.$set=function($,O){var B,z=F.p($),W="set"+(this.$u?"UTC":""),q=(B={},B[c]=W+"Date",B[p]=W+"Date",B[u]=W+"Month",B[d]=W+"FullYear",B[l]=W+"Hours",B[a]=W+"Minutes",B[s]=W+"Seconds",B[o]=W+"Milliseconds",B)[z],H=z===c?this.$D+(O-this.$W):O;if(z===u||z===d){var G=this.clone().set(p,1);G.$d[q](H),G.init(),this.$d=G.set(p,Math.min(this.$D,G.daysInMonth())).$d}else q&&this.$d[q](H);return this.init(),this},I.set=function($,O){return this.clone().$set($,O)},I.get=function($){return this[F.p($)]()},I.add=function($,O){var B,z=this;$=Number($);var W=F.p(O),q=function(Q){var Z=A(z);return F.w(Z.date(Z.date()+Math.round(Q*$)),z)};if(W===u)return this.set(u,this.$M+$);if(W===d)return this.set(d,this.$y+$);if(W===c)return q(1);if(W===h)return q(7);var H=(B={},B[a]=i,B[l]=n,B[s]=r,B)[W]||1,G=this.$d.getTime()+$*H;return F.w(G,this)},I.subtract=function($,O){return this.add(-1*$,O)},I.format=function($){var O=this,B=this.$locale();if(!this.isValid())return B.invalidDate||g;var z=$||"YYYY-MM-DDTHH:mm:ssZ",W=F.z(this),q=this.$H,H=this.$m,G=this.$M,Q=B.weekdays,Z=B.months,gt=B.meridiem,Ct=function(ot,mt,Ft,Mt){return ot&&(ot[mt]||ot(O,z))||Ft[mt].slice(0,Mt)},_t=function(ot){return F.s(q%12||12,ot,"0")},Ve=gt||function(ot,mt,Ft){var Mt=ot<12?"AM":"PM";return Ft?Mt.toLowerCase():Mt};return z.replace(m,function(ot,mt){return mt||function(Ft){switch(Ft){case"YY":return String(O.$y).slice(-2);case"YYYY":return F.s(O.$y,4,"0");case"M":return G+1;case"MM":return F.s(G+1,2,"0");case"MMM":return Ct(B.monthsShort,G,Z,3);case"MMMM":return Ct(Z,G);case"D":return O.$D;case"DD":return F.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return Ct(B.weekdaysMin,O.$W,Q,2);case"ddd":return Ct(B.weekdaysShort,O.$W,Q,3);case"dddd":return Q[O.$W];case"H":return String(q);case"HH":return F.s(q,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Ve(q,H,!0);case"A":return Ve(q,H,!1);case"m":return String(H);case"mm":return F.s(H,2,"0");case"s":return String(O.$s);case"ss":return F.s(O.$s,2,"0");case"SSS":return F.s(O.$ms,3,"0");case"Z":return W}return null}(ot)||W.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function($,O,B){var z,W=this,q=F.p(O),H=A($),G=(H.utcOffset()-this.utcOffset())*i,Q=this-H,Z=function(){return F.m(W,H)};switch(q){case d:z=Z()/12;break;case u:z=Z();break;case f:z=Z()/3;break;case h:z=(Q-G)/6048e5;break;case c:z=(Q-G)/864e5;break;case l:z=Q/n;break;case a:z=Q/i;break;case s:z=Q/r;break;default:z=Q}return B?z:F.a(z)},I.daysInMonth=function(){return this.endOf(u).$D},I.$locale=function(){return _[this.$L]},I.locale=function($,O){if(!$)return this.$L;var B=this.clone(),z=D($,O,!0);return z&&(B.$L=z),B},I.clone=function(){return F.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},P}(),j=V.prototype;return A.prototype=j,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",c],["$M",u],["$y",d],["$D",p]].forEach(function(P){j[P[1]]=function(I){return this.$g(I,P[0],P[1])}}),A.extend=function(P,I){return P.$i||(P(I,V,A),P.$i=!0),A},A.locale=D,A.isDayjs=T,A.unix=function(P){return A(1e3*P)},A.en=_[S],A.Ls=_,A.p={},A})})(Fb);var mE=Fb.exports;const yE=xC(mE);var Mb=Object.defineProperty,C=(e,t)=>Mb(e,"name",{value:t,configurable:!0}),xE=(e,t)=>{for(var r in t)Mb(e,r,{get:t[r],enumerable:!0})},ti={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},U={trace:C((...e)=>{},"trace"),debug:C((...e)=>{},"debug"),info:C((...e)=>{},"info"),warn:C((...e)=>{},"warn"),error:C((...e)=>{},"error"),fatal:C((...e)=>{},"fatal")},bg=C(function(e="fatal"){let t=ti.fatal;typeof e=="string"?e.toLowerCase()in ti&&(t=ti[e]):typeof e=="number"&&(t=e),U.trace=()=>{},U.debug=()=>{},U.info=()=>{},U.warn=()=>{},U.error=()=>{},U.fatal=()=>{},t<=ti.fatal&&(U.fatal=console.error?console.error.bind(console,ar("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ar("FATAL"))),t<=ti.error&&(U.error=console.error?console.error.bind(console,ar("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ar("ERROR"))),t<=ti.warn&&(U.warn=console.warn?console.warn.bind(console,ar("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ar("WARN"))),t<=ti.info&&(U.info=console.info?console.info.bind(console,ar("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ar("INFO"))),t<=ti.debug&&(U.debug=console.debug?console.debug.bind(console,ar("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ar("DEBUG"))),t<=ti.trace&&(U.trace=console.debug?console.debug.bind(console,ar("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ar("TRACE")))},"setLogLevel"),ar=C(e=>`%c${yE().format("ss.SSS")} : ${e} : `,"format");const rc={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,o=2*r-n;switch(i){case"r":return rc.hue2rgb(o,n,e+1/3)*255;case"g":return rc.hue2rgb(o,n,e)*255;case"b":return rc.hue2rgb(o,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),o=Math.min(e,t,r),s=(n+o)/2;if(i==="l")return s*100;if(n===o)return 0;const a=n-o,l=s>.5?a/(2-n-o):a/(n+o);if(i==="s")return l*100;switch(n){case e:return((t-r)/a+(t<r?6:0))*60;case t:return((r-e)/a+2)*60;case r:return((e-t)/a+4)*60;default:return-1}}},CE={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},bE={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},pt={channel:rc,lang:CE,unit:bE},Ti={};for(let e=0;e<=255;e++)Ti[e]=pt.unit.dec2hex(e);const Ce={ALL:0,RGB:1,HSL:2};class kE{constructor(){this.type=Ce.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ce.ALL}is(t){return this.type===t}}class vE{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new kE}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ce.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=pt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=pt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=pt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=pt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=pt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=pt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ce.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ce.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ce.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ce.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ce.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ce.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const qh=new vE({r:0,g:0,b:0,a:0},"transparent"),So={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(So.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,o=n%4===0,s=n>4,a=s?1:17,l=s?8:4,c=o?0:-1,h=s?255:15;return qh.set({r:(i>>l*(c+3)&h)*a,g:(i>>l*(c+2)&h)*a,b:(i>>l*(c+1)&h)*a,a:o?(i&h)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Ti[Math.round(t)]}${Ti[Math.round(r)]}${Ti[Math.round(i)]}${Ti[Math.round(n*255)]}`:`#${Ti[Math.round(t)]}${Ti[Math.round(r)]}${Ti[Math.round(i)]}`}},pn={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(pn.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return pt.channel.clamp.h(parseFloat(r)*.9);case"rad":return pt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pt.channel.clamp.h(parseFloat(r)*360)}}return pt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(pn.re);if(!r)return;const[,i,n,o,s,a]=r;return qh.set({h:pn._hue2deg(i),s:pt.channel.clamp.s(parseFloat(n)),l:pt.channel.clamp.l(parseFloat(o)),a:s?pt.channel.clamp.a(a?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%, ${n})`:`hsl(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%)`}},ia={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=ia.colors[e];if(t)return So.parse(t)},stringify:e=>{const t=So.stringify(e);for(const r in ia.colors)if(ia.colors[r]===t)return r}},Ns={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ns.re);if(!r)return;const[,i,n,o,s,a,l,c,h]=r;return qh.set({r:pt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:pt.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:pt.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?pt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)}, ${pt.lang.round(n)})`:`rgb(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)})`}},Vr={format:{keyword:ia,hex:So,rgb:Ns,rgba:Ns,hsl:pn,hsla:pn},parse:e=>{if(typeof e!="string")return e;const t=So.parse(e)||Ns.parse(e)||pn.parse(e)||ia.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ce.HSL)||e.data.r===void 0?pn.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ns.stringify(e):So.stringify(e)},$b=(e,t)=>{const r=Vr.parse(e);for(const i in t)r[i]=pt.channel.clamp[i](t[i]);return Vr.stringify(r)},ji=(e,t,r=0,i=1)=>{if(typeof e!="number")return $b(e,{a:t});const n=qh.set({r:pt.channel.clamp.r(e),g:pt.channel.clamp.g(t),b:pt.channel.clamp.b(r),a:pt.channel.clamp.a(i)});return Vr.stringify(n)},wE=e=>{const{r:t,g:r,b:i}=Vr.parse(e),n=.2126*pt.channel.toLinear(t)+.7152*pt.channel.toLinear(r)+.0722*pt.channel.toLinear(i);return pt.lang.round(n)},SE=e=>wE(e)>=.5,Mr=e=>!SE(e),Ib=(e,t,r)=>{const i=Vr.parse(e),n=i[t],o=pt.channel.clamp[t](n+r);return n!==o&&(i[t]=o),Vr.stringify(i)},N=(e,t)=>Ib(e,"l",t),R=(e,t)=>Ib(e,"l",-t),k=(e,t)=>{const r=Vr.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return $b(e,i)},TE=(e,t,r=50)=>{const{r:i,g:n,b:o,a:s}=Vr.parse(e),{r:a,g:l,b:c,a:h}=Vr.parse(t),u=r/100,f=u*2-1,d=s-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,x=1-g,m=i*g+a*x,y=n*g+l*x,b=o*g+c*x,v=s*u+h*(1-u);return ji(m,y,b,v)},E=(e,t=100)=>{const r=Vr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,TE(r,e,t)};/*! @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:Pb,setPrototypeOf:a0,isFrozen:_E,getPrototypeOf:BE,getOwnPropertyDescriptor:LE}=Object;let{freeze:Me,seal:pr,create:Kn}=Object,{apply:xf,construct:Cf}=typeof Reflect<"u"&&Reflect;Me||(Me=function(t){return t});pr||(pr=function(t){return t});xf||(xf=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];return t.apply(r,n)});Cf||(Cf=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const bs=Kt(Array.prototype.forEach),EE=Kt(Array.prototype.lastIndexOf),l0=Kt(Array.prototype.pop),ks=Kt(Array.prototype.push),AE=Kt(Array.prototype.splice),_e=Array.isArray,zs=Kt(String.prototype.toLowerCase),Qu=Kt(String.prototype.toString),c0=Kt(String.prototype.match),Gn=Kt(String.prototype.replace),h0=Kt(String.prototype.indexOf),FE=Kt(String.prototype.trim),ME=Kt(Number.prototype.toString),$E=Kt(Boolean.prototype.toString),u0=typeof BigInt>"u"?null:Kt(BigInt.prototype.toString),d0=typeof Symbol>"u"?null:Kt(Symbol.prototype.toString),Ut=Kt(Object.prototype.hasOwnProperty),vs=Kt(Object.prototype.toString),ce=Kt(RegExp.prototype.test),El=IE(TypeError);function Kt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return xf(e,t,i)}}function IE(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Cf(e,r)}}function yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zs;if(a0&&a0(e,null),!_e(t))return e;let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const o=r(n);o!==n&&(_E(t)||(t[i]=o),n=o)}e[n]=!0}return e}function PE(e){for(let t=0;t<e.length;t++)Ut(e,t)||(e[t]=null);return e}function De(e){const t=Kn(null);for(const[r,i]of Pb(e))Ut(e,r)&&(_e(i)?t[r]=PE(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=De(i):t[r]=i);return t}function OE(e){switch(typeof e){case"string":return e;case"number":return ME(e);case"boolean":return $E(e);case"bigint":return u0?u0(e):"0";case"symbol":return d0?d0(e):"Symbol()";case"undefined":return vs(e);case"function":case"object":{if(e===null)return vs(e);const t=e,r=Jn(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:vs(i)}return vs(e)}default:return vs(e)}}function Jn(e,t){for(;e!==null;){const i=LE(e,t);if(i){if(i.get)return Kt(i.get);if(typeof i.value=="function")return Kt(i.value)}e=BE(e)}function r(){return null}return r}function RE(e){try{return ce(e,""),!0}catch{return!1}}const f0=Me(["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"]),Zu=Me(["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"]),Ku=Me(["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"]),DE=Me(["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"]),Ju=Me(["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"]),NE=Me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),p0=Me(["#text"]),g0=Me(["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"]),td=Me(["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"]),m0=Me(["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"]),Al=Me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zE=pr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),qE=pr(/<%[\w\W]*|[\w\W]*%>/gm),WE=pr(/\$\{[\w\W]*/gm),jE=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),HE=pr(/^aria-[\-\w]+$/),Ob=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UE=pr(/^(?:\w+script|data):/i),YE=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rb=pr(/^html$/i),VE=pr(/^[a-z][.\w]*(-[.\w]+)+$/i);var y0=Object.freeze({__proto__:null,ARIA_ATTR:HE,ATTR_WHITESPACE:YE,CUSTOM_ELEMENT:VE,DATA_ATTR:jE,DOCTYPE_NAME:Rb,ERB_EXPR:qE,IS_ALLOWED_URI:Ob,IS_SCRIPT_OR_DATA:UE,MUSTACHE_EXPR:zE,TMPLIT_EXPR:WE});const ws={element:1,text:3,progressingInstruction:7,comment:8,document:9},GE=function(){return typeof window>"u"?null:window},XE=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},x0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Db(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:GE();const t=ct=>Db(ct);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==ws.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,p=l.prototype,g=Jn(p,"cloneNode"),x=Jn(p,"remove"),m=Jn(p,"nextSibling"),y=Jn(p,"childNodes"),b=Jn(p,"parentNode");if(typeof s=="function"){const ct=r.createElement("template");ct.content&&ct.content.ownerDocument&&(r=ct.content.ownerDocument)}let v,S="";const{implementation:_,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:D}=r,{importNode:A}=i;let F=x0();t.isSupported=typeof Pb=="function"&&typeof b=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:V,ERB_EXPR:j,TMPLIT_EXPR:P,DATA_ATTR:I,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:z}=y0;let{IS_ALLOWED_URI:W}=y0,q=null;const H=yt({},[...f0,...Zu,...Ku,...Ju,...p0]);let G=null;const Q=yt({},[...g0,...td,...m0,...Al]);let Z=Object.seal(Kn(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}})),gt=null,Ct=null;const _t=Object.seal(Kn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,ot=!0,mt=!1,Ft=!0,Mt=!1,Ge=!0,ge=!1,jn=!1,al=!1,Ir=!1,ll=!1,cl=!1,$m=!0,Im=!1;const Pm="user-content-";let fu=!0,hs=!1,Hn={},Pr=null;const pu=yt({},["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 Om=null;const Rm=yt({},["audio","video","img","source","image","track"]);let gu=null;const Dm=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hl="http://www.w3.org/1998/Math/MathML",ul="http://www.w3.org/2000/svg",Or="http://www.w3.org/1999/xhtml";let Un=Or,mu=!1,yu=null;const S_=yt({},[hl,ul,Or],Qu);let xu=yt({},["mi","mo","mn","ms","mtext"]),Cu=yt({},["annotation-xml"]);const T_=yt({},["title","style","font","a","script"]);let us=null;const __=["application/xhtml+xml","text/html"],B_="text/html";let Jt=null,Yn=null;const L_=r.createElement("form"),Nm=function(L){return L instanceof RegExp||L instanceof Function},bu=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Yn&&Yn===L)return;(!L||typeof L!="object")&&(L={}),L=De(L),us=__.indexOf(L.PARSER_MEDIA_TYPE)===-1?B_:L.PARSER_MEDIA_TYPE,Jt=us==="application/xhtml+xml"?Qu:zs,q=Ut(L,"ALLOWED_TAGS")&&_e(L.ALLOWED_TAGS)?yt({},L.ALLOWED_TAGS,Jt):H,G=Ut(L,"ALLOWED_ATTR")&&_e(L.ALLOWED_ATTR)?yt({},L.ALLOWED_ATTR,Jt):Q,yu=Ut(L,"ALLOWED_NAMESPACES")&&_e(L.ALLOWED_NAMESPACES)?yt({},L.ALLOWED_NAMESPACES,Qu):S_,gu=Ut(L,"ADD_URI_SAFE_ATTR")&&_e(L.ADD_URI_SAFE_ATTR)?yt(De(Dm),L.ADD_URI_SAFE_ATTR,Jt):Dm,Om=Ut(L,"ADD_DATA_URI_TAGS")&&_e(L.ADD_DATA_URI_TAGS)?yt(De(Rm),L.ADD_DATA_URI_TAGS,Jt):Rm,Pr=Ut(L,"FORBID_CONTENTS")&&_e(L.FORBID_CONTENTS)?yt({},L.FORBID_CONTENTS,Jt):pu,gt=Ut(L,"FORBID_TAGS")&&_e(L.FORBID_TAGS)?yt({},L.FORBID_TAGS,Jt):De({}),Ct=Ut(L,"FORBID_ATTR")&&_e(L.FORBID_ATTR)?yt({},L.FORBID_ATTR,Jt):De({}),Hn=Ut(L,"USE_PROFILES")?L.USE_PROFILES&&typeof L.USE_PROFILES=="object"?De(L.USE_PROFILES):L.USE_PROFILES:!1,Ve=L.ALLOW_ARIA_ATTR!==!1,ot=L.ALLOW_DATA_ATTR!==!1,mt=L.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=L.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Mt=L.SAFE_FOR_TEMPLATES||!1,Ge=L.SAFE_FOR_XML!==!1,ge=L.WHOLE_DOCUMENT||!1,Ir=L.RETURN_DOM||!1,ll=L.RETURN_DOM_FRAGMENT||!1,cl=L.RETURN_TRUSTED_TYPE||!1,al=L.FORCE_BODY||!1,$m=L.SANITIZE_DOM!==!1,Im=L.SANITIZE_NAMED_PROPS||!1,fu=L.KEEP_CONTENT!==!1,hs=L.IN_PLACE||!1,W=RE(L.ALLOWED_URI_REGEXP)?L.ALLOWED_URI_REGEXP:Ob,Un=typeof L.NAMESPACE=="string"?L.NAMESPACE:Or,xu=Ut(L,"MATHML_TEXT_INTEGRATION_POINTS")&&L.MATHML_TEXT_INTEGRATION_POINTS&&typeof L.MATHML_TEXT_INTEGRATION_POINTS=="object"?De(L.MATHML_TEXT_INTEGRATION_POINTS):yt({},["mi","mo","mn","ms","mtext"]),Cu=Ut(L,"HTML_INTEGRATION_POINTS")&&L.HTML_INTEGRATION_POINTS&&typeof L.HTML_INTEGRATION_POINTS=="object"?De(L.HTML_INTEGRATION_POINTS):yt({},["annotation-xml"]);const Y=Ut(L,"CUSTOM_ELEMENT_HANDLING")&&L.CUSTOM_ELEMENT_HANDLING&&typeof L.CUSTOM_ELEMENT_HANDLING=="object"?De(L.CUSTOM_ELEMENT_HANDLING):Kn(null);if(Z=Kn(null),Ut(Y,"tagNameCheck")&&Nm(Y.tagNameCheck)&&(Z.tagNameCheck=Y.tagNameCheck),Ut(Y,"attributeNameCheck")&&Nm(Y.attributeNameCheck)&&(Z.attributeNameCheck=Y.attributeNameCheck),Ut(Y,"allowCustomizedBuiltInElements")&&typeof Y.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=Y.allowCustomizedBuiltInElements),Mt&&(ot=!1),ll&&(Ir=!0),Hn&&(q=yt({},p0),G=Kn(null),Hn.html===!0&&(yt(q,f0),yt(G,g0)),Hn.svg===!0&&(yt(q,Zu),yt(G,td),yt(G,Al)),Hn.svgFilters===!0&&(yt(q,Ku),yt(G,td),yt(G,Al)),Hn.mathMl===!0&&(yt(q,Ju),yt(G,m0),yt(G,Al))),_t.tagCheck=null,_t.attributeCheck=null,Ut(L,"ADD_TAGS")&&(typeof L.ADD_TAGS=="function"?_t.tagCheck=L.ADD_TAGS:_e(L.ADD_TAGS)&&(q===H&&(q=De(q)),yt(q,L.ADD_TAGS,Jt))),Ut(L,"ADD_ATTR")&&(typeof L.ADD_ATTR=="function"?_t.attributeCheck=L.ADD_ATTR:_e(L.ADD_ATTR)&&(G===Q&&(G=De(G)),yt(G,L.ADD_ATTR,Jt))),Ut(L,"ADD_URI_SAFE_ATTR")&&_e(L.ADD_URI_SAFE_ATTR)&&yt(gu,L.ADD_URI_SAFE_ATTR,Jt),Ut(L,"FORBID_CONTENTS")&&_e(L.FORBID_CONTENTS)&&(Pr===pu&&(Pr=De(Pr)),yt(Pr,L.FORBID_CONTENTS,Jt)),Ut(L,"ADD_FORBID_CONTENTS")&&_e(L.ADD_FORBID_CONTENTS)&&(Pr===pu&&(Pr=De(Pr)),yt(Pr,L.ADD_FORBID_CONTENTS,Jt)),fu&&(q["#text"]=!0),ge&&yt(q,["html","head","body"]),q.table&&(yt(q,["tbody"]),delete gt.tbody),L.TRUSTED_TYPES_POLICY){if(typeof L.TRUSTED_TYPES_POLICY.createHTML!="function")throw El('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof L.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw El('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=L.TRUSTED_TYPES_POLICY,S=v.createHTML("")}else v===void 0&&(v=XE(d,n)),v!==null&&typeof S=="string"&&(S=v.createHTML(""));Me&&Me(L),Yn=L},zm=yt({},[...Zu,...Ku,...DE]),qm=yt({},[...Ju,...NE]),E_=function(L){let Y=b(L);(!Y||!Y.tagName)&&(Y={namespaceURI:Un,tagName:"template"});const et=zs(L.tagName),$t=zs(Y.tagName);return yu[L.namespaceURI]?L.namespaceURI===ul?Y.namespaceURI===Or?et==="svg":Y.namespaceURI===hl?et==="svg"&&($t==="annotation-xml"||xu[$t]):!!zm[et]:L.namespaceURI===hl?Y.namespaceURI===Or?et==="math":Y.namespaceURI===ul?et==="math"&&Cu[$t]:!!qm[et]:L.namespaceURI===Or?Y.namespaceURI===ul&&!Cu[$t]||Y.namespaceURI===hl&&!xu[$t]?!1:!qm[et]&&(T_[et]||!zm[et]):!!(us==="application/xhtml+xml"&&yu[L.namespaceURI]):!1},mr=function(L){ks(t.removed,{element:L});try{b(L).removeChild(L)}catch{x(L)}},rn=function(L,Y){try{ks(t.removed,{attribute:Y.getAttributeNode(L),from:Y})}catch{ks(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(L),L==="is")if(Ir||ll)try{mr(Y)}catch{}else try{Y.setAttribute(L,"")}catch{}},Wm=function(L){let Y=null,et=null;if(al)L="<remove></remove>"+L;else{const Xt=c0(L,/^[\r\n\t ]+/);et=Xt&&Xt[0]}us==="application/xhtml+xml"&&Un===Or&&(L='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+L+"</body></html>");const $t=v?v.createHTML(L):L;if(Un===Or)try{Y=new f().parseFromString($t,us)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Un,"template",null);try{Y.documentElement.innerHTML=mu?S:$t}catch{}}const me=Y.body||Y.documentElement;return L&&et&&me.insertBefore(r.createTextNode(et),me.childNodes[0]||null),Un===Or?D.call(Y,ge?"html":"body")[0]:ge?Y.documentElement:me},jm=function(L){return w.call(L.ownerDocument||L,L,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ku=function(L){return L instanceof u&&(typeof L.nodeName!="string"||typeof L.textContent!="string"||typeof L.removeChild!="function"||!(L.attributes instanceof h)||typeof L.removeAttribute!="function"||typeof L.setAttribute!="function"||typeof L.namespaceURI!="string"||typeof L.insertBefore!="function"||typeof L.hasChildNodes!="function")},vu=function(L){return typeof a=="function"&&L instanceof a};function Jr(ct,L,Y){bs(ct,et=>{et.call(t,L,Y,Yn)})}const Hm=function(L){let Y=null;if(Jr(F.beforeSanitizeElements,L,null),ku(L))return mr(L),!0;const et=Jt(L.nodeName);if(Jr(F.uponSanitizeElement,L,{tagName:et,allowedTags:q}),Ge&&L.hasChildNodes()&&!vu(L.firstElementChild)&&ce(/<[/\w!]/g,L.innerHTML)&&ce(/<[/\w!]/g,L.textContent)||Ge&&L.namespaceURI===Or&&et==="style"&&vu(L.firstElementChild)||L.nodeType===ws.progressingInstruction||Ge&&L.nodeType===ws.comment&&ce(/<[/\w]/g,L.data))return mr(L),!0;if(gt[et]||!(_t.tagCheck instanceof Function&&_t.tagCheck(et))&&!q[et]){if(!gt[et]&&Ym(et)&&(Z.tagNameCheck instanceof RegExp&&ce(Z.tagNameCheck,et)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(et)))return!1;if(fu&&!Pr[et]){const $t=b(L)||L.parentNode,me=y(L)||L.childNodes;if(me&&$t){const Xt=me.length;for(let Oe=Xt-1;Oe>=0;--Oe){const sr=g(me[Oe],!0);$t.insertBefore(sr,m(L))}}}return mr(L),!0}return L instanceof l&&!E_(L)||(et==="noscript"||et==="noembed"||et==="noframes")&&ce(/<\/no(script|embed|frames)/i,L.innerHTML)?(mr(L),!0):(Mt&&L.nodeType===ws.text&&(Y=L.textContent,bs([V,j,P],$t=>{Y=Gn(Y,$t," ")}),L.textContent!==Y&&(ks(t.removed,{element:L.cloneNode()}),L.textContent=Y)),Jr(F.afterSanitizeElements,L,null),!1)},Um=function(L,Y,et){if(Ct[Y]||$m&&(Y==="id"||Y==="name")&&(et in r||et in L_))return!1;const $t=G[Y]||_t.attributeCheck instanceof Function&&_t.attributeCheck(Y,L);if(!(ot&&!Ct[Y]&&ce(I,Y))){if(!(Ve&&ce($,Y))){if(!$t||Ct[Y]){if(!(Ym(L)&&(Z.tagNameCheck instanceof RegExp&&ce(Z.tagNameCheck,L)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(L))&&(Z.attributeNameCheck instanceof RegExp&&ce(Z.attributeNameCheck,Y)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(Y,L))||Y==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&ce(Z.tagNameCheck,et)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(et))))return!1}else if(!gu[Y]){if(!ce(W,Gn(et,B,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&L!=="script"&&h0(et,"data:")===0&&Om[L])){if(!(mt&&!ce(O,Gn(et,B,"")))){if(et)return!1}}}}}}return!0},A_=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ym=function(L){return!A_[zs(L)]&&ce(z,L)},Vm=function(L){Jr(F.beforeSanitizeAttributes,L,null);const{attributes:Y}=L;if(!Y||ku(L))return;const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let $t=Y.length;for(;$t--;){const me=Y[$t],{name:Xt,namespaceURI:Oe,value:sr}=me,yr=Jt(Xt),wu=sr;let ne=Xt==="value"?wu:FE(wu);if(et.attrName=yr,et.attrValue=ne,et.keepAttr=!0,et.forceKeepAttr=void 0,Jr(F.uponSanitizeAttribute,L,et),ne=et.attrValue,Im&&(yr==="id"||yr==="name")&&h0(ne,Pm)!==0&&(rn(Xt,L),ne=Pm+ne),Ge&&ce(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ne)){rn(Xt,L);continue}if(yr==="attributename"&&c0(ne,"href")){rn(Xt,L);continue}if(et.forceKeepAttr)continue;if(!et.keepAttr){rn(Xt,L);continue}if(!Ft&&ce(/\/>/i,ne)){rn(Xt,L);continue}Mt&&bs([V,j,P],Qm=>{ne=Gn(ne,Qm," ")});const Xm=Jt(L.nodeName);if(!Um(Xm,yr,ne)){rn(Xt,L);continue}if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Oe)switch(d.getAttributeType(Xm,yr)){case"TrustedHTML":{ne=v.createHTML(ne);break}case"TrustedScriptURL":{ne=v.createScriptURL(ne);break}}if(ne!==wu)try{Oe?L.setAttributeNS(Oe,Xt,ne):L.setAttribute(Xt,ne),ku(L)?mr(L):l0(t.removed)}catch{rn(Xt,L)}}Jr(F.afterSanitizeAttributes,L,null)},Gm=function(L){let Y=null;const et=jm(L);for(Jr(F.beforeSanitizeShadowDOM,L,null);Y=et.nextNode();)Jr(F.uponSanitizeShadowNode,Y,null),Hm(Y),Vm(Y),Y.content instanceof o&&Gm(Y.content);Jr(F.afterSanitizeShadowDOM,L,null)};return t.sanitize=function(ct){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,et=null,$t=null,me=null;if(mu=!ct,mu&&(ct="<!-->"),typeof ct!="string"&&!vu(ct)&&(ct=OE(ct),typeof ct!="string"))throw El("dirty is not a string, aborting");if(!t.isSupported)return ct;if(jn||bu(L),t.removed=[],typeof ct=="string"&&(hs=!1),hs){const sr=ct.nodeName;if(typeof sr=="string"){const yr=Jt(sr);if(!q[yr]||gt[yr])throw El("root node is forbidden and cannot be sanitized in-place")}}else if(ct instanceof a)Y=Wm("<!---->"),et=Y.ownerDocument.importNode(ct,!0),et.nodeType===ws.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?Y=et:Y.appendChild(et);else{if(!Ir&&!Mt&&!ge&&ct.indexOf("<")===-1)return v&&cl?v.createHTML(ct):ct;if(Y=Wm(ct),!Y)return Ir?null:cl?S:""}Y&&al&&mr(Y.firstChild);const Xt=jm(hs?ct:Y);for(;$t=Xt.nextNode();)Hm($t),Vm($t),$t.content instanceof o&&Gm($t.content);if(hs)return ct;if(Ir){if(Mt){Y.normalize();let sr=Y.innerHTML;bs([V,j,P],yr=>{sr=Gn(sr,yr," ")}),Y.innerHTML=sr}if(ll)for(me=T.call(Y.ownerDocument);Y.firstChild;)me.appendChild(Y.firstChild);else me=Y;return(G.shadowroot||G.shadowrootmode)&&(me=A.call(i,me,!0)),me}let Oe=ge?Y.outerHTML:Y.innerHTML;return ge&&q["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&ce(Rb,Y.ownerDocument.doctype.name)&&(Oe="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
58
|
-
`+Oe),Mt&&bs([V,j,P],sr=>{Oe=Gn(Oe,sr," ")}),v&&cl?v.createHTML(Oe):Oe},t.setConfig=function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bu(ct),jn=!0},t.clearConfig=function(){Yn=null,jn=!1},t.isValidAttribute=function(ct,L,Y){Yn||bu({});const et=Jt(ct),$t=Jt(L);return Um(et,$t,Y)},t.addHook=function(ct,L){typeof L=="function"&&ks(F[ct],L)},t.removeHook=function(ct,L){if(L!==void 0){const Y=EE(F[ct],L);return Y===-1?void 0:AE(F[ct],Y,1)[0]}return l0(F[ct])},t.removeHooks=function(ct){F[ct]=[]},t.removeAllHooks=function(){F=x0()},t}var Go=Db(),Nb=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,na=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,QE=/\s*%%.*\n/gm,Bo,zb=(Bo=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},C(Bo,"UnknownDiagramError"),Bo),Bn={},kg=C(function(e,t){e=e.replace(Nb,"").replace(na,"").replace(QE,`
|
|
59
|
-
`);for(const[r,{detector:i}]of Object.entries(Bn))if(i(e,t))return r;throw new zb(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),bf=C((...e)=>{for(const{id:t,detector:r,loader:i}of e)qb(t,r,i)},"registerLazyLoadedDiagrams"),qb=C((e,t,r)=>{Bn[e]&&U.warn(`Detector with key ${e} already exists. Overwriting.`),Bn[e]={detector:t,loader:r},U.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),ZE=C(e=>Bn[e].loader,"getDiagramLoader"),kf=C((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>kf(e,o,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=kf(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),ee=kf,Xr="#ffffff",Qr="#f2f2f2",ft=C((e,t)=>t?k(e,{s:-40,l:10}):k(e,{s:-40,l:-10}),"mkBorder"),Lo,KE=(Lo=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,n,o,s,a,l,c,h,u,f,d,p,g,x,m,y,b,v,S,_,w;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(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||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=R(this["cScale"+T],75);else for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=R(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||E(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||N(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||R(this["cScale"+T],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||k(this.mainBkg,{h:180,s:-15,l:t*(5+T*3)}),this["surfacePeer"+T]=this["surfacePeer"+T]||k(this.mainBkg,{h:180,s:-15,l:t*(8+T*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,dataLabelColor:((p=this.xyChart)==null?void 0:p.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((x=this.xyChart)==null?void 0:x.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Lo,"Theme"),Lo),JE=C(e=>{const t=new KE;return t.calculate(e),t},"getThemeVariables"),Eo,tA=(Eo=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(E("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ji(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=ji(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ji(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||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,n,o,s,a,l,c,h,u,f,d,p,g,x,m,y,b,v,S,_;this.secondBkg=N(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=N(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=N(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=E(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||E(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScalePeer"+w]=this["cScalePeer"+w]||N(this["cScale"+w],10);for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||k(this.mainBkg,{h:30,s:-30,l:-(-10+w*4)}),this["surfacePeer"+w]=this["surfacePeer"+w]||k(this.mainBkg,{h:30,s:-30,l:-(-7+w*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];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 w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??N(this["cScale"+w],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((x=this.radar)==null?void 0:x.curveOpacity)||.5,curveStrokeWidth:((m=this.radar)==null?void 0:m.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=N(this.secondaryColor,20),this.git1=N(this.pie2||this.secondaryColor,20),this.git2=N(this.pie3||this.tertiaryColor,20),this.git3=N(this.pie4||k(this.primaryColor,{h:-30}),20),this.git4=N(this.pie5||k(this.primaryColor,{h:-60}),20),this.git5=N(this.pie6||k(this.primaryColor,{h:-90}),10),this.git6=N(this.pie7||k(this.primaryColor,{h:60}),10),this.git7=N(this.pie8||k(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(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||N(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||N(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Eo,"Theme"),Eo),eA=C(e=>{const t=new tA;return t.calculate(e),t},"getThemeVariables"),Ao,rA=(Ao=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=k(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ji(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,n,o,s,a,l,c,h,u,f,d,p,g,x,m,y,b,v,S,_;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=R(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||k(this["cScale"+w],{h:180});for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||k(this.mainBkg,{h:30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||k(this.mainBkg,{h:30,l:-(7+w*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||E(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||E(this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||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||N(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||N(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||k(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||k(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((a=this.radar)==null?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((m=this.xyChart)==null?void 0:m.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(E(this.git0),25),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Ao,"Theme"),Ao),iA=C(e=>{const t=new rA;return t.calculate(e),t},"getThemeVariables"),Fo,nA=(Fo=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=N("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.primaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,n,o,s,a,l,c,h,u,f,d,p,g,x,m,y,b,v,S,_;this.actorBorder=R(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=R(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||k(this["cScale"+w],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||k(this.mainBkg,{h:30,s:-30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||k(this.mainBkg,{h:30,s:-30,l:-(8+w*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||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{l:-30}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((a=this.radar)==null?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((m=this.xyChart)==null?void 0:m.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Fo,"Theme"),Fo),oA=C(e=>{const t=new nA;return t.calculate(e),t},"getThemeVariables"),Mo,sA=(Mo=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=N(this.contrast,55),this.background="#ffffff",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(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||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,n,o,s,a,l,c,h,u,f,d,p,g,x,m,y,b,v,S,_;this.secondBkg=N(this.contrast,55),this.border2=this.contrast,this.actorBorder=N(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 w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||E(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||N(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||k(this.mainBkg,{l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||k(this.mainBkg,{l:-(8+w*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=N(this.contrast,30),this.sectionBkgColor2=N(this.contrast,30),this.taskBorderColor=R(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=N(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];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 w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??this["cScale"+w];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((x=this.radar)==null?void 0:x.curveOpacity)||.5,curveStrokeWidth:((m=this.radar)==null?void 0:m.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||k(this.primaryColor,{h:-30}),this.git4=this.pie5||k(this.primaryColor,{h:-60}),this.git5=this.pie6||k(this.primaryColor,{h:-90}),this.git6=this.pie7||k(this.primaryColor,{h:60}),this.git7=this.pie8||k(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Mo,"Theme"),Mo),aA=C(e=>{const t=new sA;return t.calculate(e),t},"getThemeVariables"),$o,lA=($o=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,s,a,l,c,h,u,f,d,p,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||k(t,{h:30}),this.cScale4=this.cScale4||k(t,{h:60}),this.cScale5=this.cScale5||k(t,{h:90}),this.cScale6=this.cScale6||k(t,{h:120}),this.cScale7=this.cScale7||k(t,{h:150}),this.cScale8=this.cScale8||k(t,{h:210,l:150}),this.cScale9=this.cScale9||k(t,{h:270}),this.cScale10=this.cScale10||k(t,{h:300}),this.cScale11=this.cScale11||k(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=R(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=R(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||E(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||N(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||R(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C($o,"Theme"),$o),cA=C(e=>{const t=new lA;return t.calculate(e),t},"getThemeVariables"),Io,hA=(Io=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(E("#323D47"),10),this.border1="#ccc",this.border2=ji(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,n,o,s,a,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(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||N(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||E(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Io,"Theme"),Io),uA=C(e=>{const t=new hA;return t.calculate(e),t},"getThemeVariables"),Po,dA=(Po=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,s,a,l,c,h,u,f,d,p,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=R(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=R(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||E(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||N(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||R(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Po,"Theme"),Po),fA=C(e=>{const t=new dA;return t.calculate(e),t},"getThemeVariables"),Oo,pA=(Oo=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(E("#323D47"),10),this.border1="#ccc",this.border2=ji(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,n,o,s,a,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(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||N(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||E(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Oo,"Theme"),Oo),gA=C(e=>{const t=new pA;return t.calculate(e),t},"getThemeVariables"),Ro,mA=(Ro=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,s,a,l,c,h,u,f,d,p,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||E(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||N(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||R(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||k(this.mainBkg,{h:180,s:-15,l:n*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Ro,"Theme"),Ro),yA=C(e=>{const t=new mA;return t.calculate(e),t},"getThemeVariables"),Do,xA=(Do=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(E("#323D47"),10),this.border1="#ccc",this.border2=ji(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,n,o,s,a,l,c,h,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(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||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||E(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||k(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Mr(this.quadrant1Fill)?N(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(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||Xr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Do,"Theme"),Do),CA=C(e=>{const t=new xA;return t.calculate(e),t},"getThemeVariables"),ui={base:{getThemeVariables:JE},dark:{getThemeVariables:eA},default:{getThemeVariables:iA},forest:{getThemeVariables:oA},neutral:{getThemeVariables:aA},neo:{getThemeVariables:cA},"neo-dark":{getThemeVariables:uA},redux:{getThemeVariables:fA},"redux-dark":{getThemeVariables:gA},"redux-color":{getThemeVariables:yA},"redux-dark-color":{getThemeVariables:CA}},Xe={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},Wb={...Xe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ui.default.getThemeVariables(),sequence:{...Xe.sequence,messageFont:C(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:C(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:C(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Xe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xe.c4,useWidth:void 0,personFont:C(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Xe.flowchart,inheritDir:!1},external_personFont:C(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:C(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:C(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:C(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:C(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:C(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:C(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:C(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:C(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:C(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:C(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:C(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:C(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:C(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:C(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:C(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:C(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:C(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:C(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:C(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:C(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Xe.pie,useWidth:984},xyChart:{...Xe.xyChart,useWidth:void 0},requirement:{...Xe.requirement,useWidth:void 0},packet:{...Xe.packet},treeView:{...Xe.treeView,useWidth:void 0},radar:{...Xe.radar},ishikawa:{...Xe.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Xe.venn}},jb=C((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...jb(e[i],"")]:[...r,t+i],[]),"keyify"),bA=new Set(jb(Wb,"")),Hb=Wb,zc=C(e=>{if(U.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>zc(t));return}for(const t of Object.keys(e)){if(U.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!bA.has(t)||e[t]==null){U.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){U.debug("sanitizing object",t),zc(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(U.debug("sanitizing css option",t),e[t]=kA(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}U.debug("After sanitization",e)}},"sanitizeDirective"),kA=C(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Xo=Object.freeze(Hb),bi=C(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ze=ee({},Xo),qc,Ln=[],oa=ee({},Xo),Wh=C((e,t)=>{let r=ee({},e),i={};for(const n of t)Vb(n),i=ee(i,n);if(r=ee(r,i),i.theme&&i.theme in ui){const n=ee({},qc),o=ee(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ui&&(r.themeVariables=ui[r.theme].getThemeVariables(o))}return oa=r,Xb(oa),oa},"updateCurrentConfig"),vA=C(e=>(ze=ee({},Xo),ze=ee(ze,e),e.theme&&ui[e.theme]&&(ze.themeVariables=ui[e.theme].getThemeVariables(e.themeVariables)),Wh(ze,Ln),ze),"setSiteConfig"),wA=C(e=>{qc=ee({},e)},"saveConfigFromInitialize"),SA=C(e=>(ze=ee(ze,e),Wh(ze,Ln),ze),"updateSiteConfig"),Ub=C(()=>ee({},ze),"getSiteConfig"),Yb=C(e=>(Xb(e),ee(oa,e),Wt()),"setConfig"),Wt=C(()=>ee({},oa),"getConfig"),Vb=C(e=>{e&&(["secure",...ze.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(U.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Vb(e[t])}))},"sanitize"),TA=C(e=>{var t;zc(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ln.push(e),Wh(ze,Ln)},"addDirective"),Wc=C((e=ze)=>{Ln=[],Wh(e,Ln)},"reset"),_A={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."},C0={},Gb=C(e=>{C0[e]||(U.warn(_A[e]),C0[e]=!0)},"issueWarning"),Xb=C(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Gb("LAZY_LOAD_DEPRECATED")},"checkConfig"),k7=C(()=>{let e={};qc&&(e=ee(e,qc));for(const t of Ln)e=ee(e,t);return e},"getUserDefinedConfig"),$e=C(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Gb("FLOWCHART_HTML_LABELS_DEPRECATED"),bi(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Xa=/<br\s*\/?>/gi,BA=C(e=>e?Kb(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),LA=(()=>{let e=!1;return()=>{e||(Qb(),e=!0)}})();function Qb(){const e="data-temp-href-target";Go.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Go.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}C(Qb,"setupDompurifyHooks");var Zb=C(e=>(LA(),Go.sanitize(e)),"removeScript"),b0=C((e,t)=>{if($e(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Zb(e):r!=="loose"&&(e=Kb(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=MA(e))}return e},"sanitizeMore"),Fr=C((e,t)=>e&&(t.dompurifyConfig?e=Go.sanitize(b0(e,t),t.dompurifyConfig).toString():e=Go.sanitize(b0(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),EA=C((e,t)=>typeof e=="string"?Fr(e,t):e.flat().map(r=>Fr(r,t)),"sanitizeTextOrArray"),AA=C(e=>Xa.test(e),"hasBreaks"),FA=C(e=>e.split(Xa),"splitBreaks"),MA=C(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Kb=C(e=>e.replace(Xa,"#br#"),"breakToPlaceholder"),$A=C(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),IA=C(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),PA=C(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),k0=C(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const o=t[i-1],s=t[i+1];OA(o,s)&&(n=o+","+s,i++,r.pop())}r.push(RA(n))}return r.join("")},"parseGenericTypes"),vf=C((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),OA=C((e,t)=>{const r=vf(e,"~"),i=vf(t,"~");return r===1&&i===1},"shouldCombineSets"),RA=C(e=>{const t=vf(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),o=i.lastIndexOf("~");for(;n!==-1&&o!==-1&&n!==o;)i[n]="<",i[o]=">",n=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),v0=C(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wf=/\$\$(.*)\$\$/g,Ea=C(e=>{var t;return(((t=e.match(wf))==null?void 0:t.length)??0)>0},"hasKatex"),v7=C(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Jb(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),DA=C(async(e,t)=>{if(!Ea(e))return e;if(!(v0()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wf,"MathML is unsupported in this environment.");{const{default:r}=await vt(async()=>{const{default:n}=await import("./katex-DkKDou_j.js");return{default:n}},[]),i=t.forceLegacyMathML||!v0()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Xa).map(n=>Ea(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(wf,(n,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Jb=C(async(e,t)=>Fr(await DA(e,t),t),"renderKatexSanitized"),Qa={getRows:BA,sanitizeText:Fr,sanitizeTextOrArray:EA,hasBreaks:AA,splitBreaks:FA,lineBreakRegex:Xa,removeScript:Zb,getUrl:$A,evaluate:bi,getMax:IA,getMin:PA},NA=C(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),zA=C(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),tk=C(function(e,t,r,i){const n=zA(t,r,i);NA(e,n)},"configureSvgSize"),qA=C(function(e,t,r,i){const n=t.node().getBBox(),o=n.width,s=n.height;U.info(`SVG bounds: ${o}x${s}`,n);let a=0,l=0;U.info(`Graph bounds: ${a}x${l}`,e),a=o+r*2,l=s+r*2,U.info(`Calculated bounds: ${a}x${l}`),tk(t,l,a,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ic={},WA=C((e,t,r,i)=>{let n="";return e in ic&&ic[e]?n=ic[e]({...r,svgId:i}):U.warn(`No theme found for ${e}`),` & {
|
|
60
|
-
font-family: ${r.fontFamily};
|
|
61
|
-
font-size: ${r.fontSize};
|
|
62
|
-
fill: ${r.textColor}
|
|
63
|
-
}
|
|
64
|
-
@keyframes edge-animation-frame {
|
|
65
|
-
from {
|
|
66
|
-
stroke-dashoffset: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
@keyframes dash {
|
|
70
|
-
to {
|
|
71
|
-
stroke-dashoffset: 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
& .edge-animation-slow {
|
|
75
|
-
stroke-dasharray: 9,5 !important;
|
|
76
|
-
stroke-dashoffset: 900;
|
|
77
|
-
animation: dash 50s linear infinite;
|
|
78
|
-
stroke-linecap: round;
|
|
79
|
-
}
|
|
80
|
-
& .edge-animation-fast {
|
|
81
|
-
stroke-dasharray: 9,5 !important;
|
|
82
|
-
stroke-dashoffset: 900;
|
|
83
|
-
animation: dash 20s linear infinite;
|
|
84
|
-
stroke-linecap: round;
|
|
85
|
-
}
|
|
86
|
-
/* Classes common for multiple diagrams */
|
|
87
|
-
|
|
88
|
-
& .error-icon {
|
|
89
|
-
fill: ${r.errorBkgColor};
|
|
90
|
-
}
|
|
91
|
-
& .error-text {
|
|
92
|
-
fill: ${r.errorTextColor};
|
|
93
|
-
stroke: ${r.errorTextColor};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
& .edge-thickness-normal {
|
|
97
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
98
|
-
}
|
|
99
|
-
& .edge-thickness-thick {
|
|
100
|
-
stroke-width: 3.5px
|
|
101
|
-
}
|
|
102
|
-
& .edge-pattern-solid {
|
|
103
|
-
stroke-dasharray: 0;
|
|
104
|
-
}
|
|
105
|
-
& .edge-thickness-invisible {
|
|
106
|
-
stroke-width: 0;
|
|
107
|
-
fill: none;
|
|
108
|
-
}
|
|
109
|
-
& .edge-pattern-dashed{
|
|
110
|
-
stroke-dasharray: 3;
|
|
111
|
-
}
|
|
112
|
-
.edge-pattern-dotted {
|
|
113
|
-
stroke-dasharray: 2;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
& .marker {
|
|
117
|
-
fill: ${r.lineColor};
|
|
118
|
-
stroke: ${r.lineColor};
|
|
119
|
-
}
|
|
120
|
-
& .marker.cross {
|
|
121
|
-
stroke: ${r.lineColor};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
& svg {
|
|
125
|
-
font-family: ${r.fontFamily};
|
|
126
|
-
font-size: ${r.fontSize};
|
|
127
|
-
}
|
|
128
|
-
& p {
|
|
129
|
-
margin: 0
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${n}
|
|
133
|
-
.node .neo-node {
|
|
134
|
-
stroke: ${r.nodeBorder};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
138
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
139
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
[data-look="neo"].node path {
|
|
144
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
145
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
[data-look="neo"].node .outer-path {
|
|
149
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
[data-look="neo"].node .neo-line path {
|
|
153
|
-
stroke: ${r.nodeBorder};
|
|
154
|
-
filter: none;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
[data-look="neo"].node circle{
|
|
158
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
159
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
[data-look="neo"].node circle .state-start{
|
|
163
|
-
fill: #000000;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
[data-look="neo"].icon-shape .icon {
|
|
167
|
-
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
168
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
172
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
173
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
${t}
|
|
177
|
-
`},"getStyles"),jA=C((e,t)=>{t!==void 0&&(ic[e]=t)},"addStylesForDiagram"),HA=WA,ek={};xE(ek,{clear:()=>UA,getAccDescription:()=>XA,getAccTitle:()=>VA,getDiagramTitle:()=>ZA,setAccDescription:()=>GA,setAccTitle:()=>YA,setDiagramTitle:()=>QA});var vg="",wg="",Sg="",Tg=C(e=>Fr(e,Wt()),"sanitizeText"),UA=C(()=>{vg="",Sg="",wg=""},"clear"),YA=C(e=>{vg=Tg(e).replace(/^\s+/g,"")},"setAccTitle"),VA=C(()=>vg,"getAccTitle"),GA=C(e=>{Sg=Tg(e).replace(/\n\s+/g,`
|
|
178
|
-
`)},"setAccDescription"),XA=C(()=>Sg,"getAccDescription"),QA=C(e=>{wg=Tg(e)},"setDiagramTitle"),ZA=C(()=>wg,"getDiagramTitle"),w0=U,KA=bg,St=Wt,w7=Yb,S7=Xo,_g=C(e=>Fr(e,St()),"sanitizeText"),JA=qA,t3=C(()=>ek,"getCommonDb"),jc={},Hc=C((e,t,r)=>{var i;jc[e]&&w0.warn(`Diagram with id ${e} already registered. Overwriting.`),jc[e]=t,r&&qb(e,r),jA(e,t.styles),(i=t.injectUtils)==null||i.call(t,w0,KA,St,_g,JA,t3(),()=>{})},"registerDiagram"),Sf=C(e=>{if(e in jc)return jc[e];throw new e3(e)},"getDiagram"),No,e3=(No=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},C(No,"DiagramNotFoundError"),No),r3={value:()=>{}};function rk(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new nc(r)}function nc(e){this._=e}function i3(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}nc.prototype=rk.prototype={constructor:nc,on:function(e,t){var r=this._,i=i3(e+"",r),n,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((n=(e=i[o]).type)&&(n=n3(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(n=(e=i[o]).type)r[n]=S0(r[n],e.name,t);else if(t==null)for(n in r)r[n]=S0(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new nc(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,o;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,n=o.length;i<n;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,o=i.length;n<o;++n)i[n].value.apply(t,r)}};function n3(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function S0(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=r3,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Tf="http://www.w3.org/1999/xhtml";const T0={svg:"http://www.w3.org/2000/svg",xhtml:Tf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jh(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),T0.hasOwnProperty(t)?{space:T0[t],local:e}:e}function o3(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Tf&&t.documentElement.namespaceURI===Tf?t.createElement(e):t.createElementNS(r,e)}}function s3(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ik(e){var t=jh(e);return(t.local?s3:o3)(t)}function a3(){}function Bg(e){return e==null?a3:function(){return this.querySelector(e)}}function l3(e){typeof e!="function"&&(e=Bg(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],s=o.length,a=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new ir(i,this._parents)}function c3(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function h3(){return[]}function nk(e){return e==null?h3:function(){return this.querySelectorAll(e)}}function u3(e){return function(){return c3(e.apply(this,arguments))}}function d3(e){typeof e=="function"?e=u3(e):e=nk(e);for(var t=this._groups,r=t.length,i=[],n=[],o=0;o<r;++o)for(var s=t[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new ir(i,n)}function ok(e){return function(){return this.matches(e)}}function sk(e){return function(t){return t.matches(e)}}var f3=Array.prototype.find;function p3(e){return function(){return f3.call(this.children,e)}}function g3(){return this.firstElementChild}function m3(e){return this.select(e==null?g3:p3(typeof e=="function"?e:sk(e)))}var y3=Array.prototype.filter;function x3(){return Array.from(this.children)}function C3(e){return function(){return y3.call(this.children,e)}}function b3(e){return this.selectAll(e==null?x3:C3(typeof e=="function"?e:sk(e)))}function k3(e){typeof e!="function"&&(e=ok(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],s=o.length,a=i[n]=[],l,c=0;c<s;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&a.push(l);return new ir(i,this._parents)}function ak(e){return new Array(e.length)}function v3(){return new ir(this._enter||this._groups.map(ak),this._parents)}function Uc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uc.prototype={constructor:Uc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function w3(e){return function(){return e}}function S3(e,t,r,i,n,o){for(var s=0,a,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],i[s]=a):r[s]=new Uc(e,o[s]);for(;s<l;++s)(a=t[s])&&(n[s]=a)}function T3(e,t,r,i,n,o,s){var a,l,c=new Map,h=t.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=t[a])&&(f[a]=d=s.call(l,l.__data__,a,t)+"",c.has(d)?n[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(e,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):r[a]=new Uc(e,o[a]);for(a=0;a<h;++a)(l=t[a])&&c.get(f[a])===l&&(n[a]=l)}function _3(e){return e.__data__}function B3(e,t){if(!arguments.length)return Array.from(this,_3);var r=t?T3:S3,i=this._parents,n=this._groups;typeof e!="function"&&(e=w3(e));for(var o=n.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=n[c],f=u.length,d=L3(e.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),x=s[c]=new Array(p),m=l[c]=new Array(f);r(h,u,g,x,m,d,t);for(var y=0,b=0,v,S;y<p;++y)if(v=g[y]){for(y>=b&&(b=y+1);!(S=x[b])&&++b<p;);v._next=S||null}}return s=new ir(s,i),s._enter=a,s._exit=l,s}function L3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E3(){return new ir(this._exit||this._groups.map(ak),this._parents)}function A3(e,t,r){var i=this.enter(),n=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?o.remove():r(o),i&&n?i.merge(n).order():n}function F3(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,o=i.length,s=Math.min(n,o),a=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<n;++l)a[l]=r[l];return new ir(a,this._parents)}function M3(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,o=i[n],s;--n>=0;)(s=i[n])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function $3(e){e||(e=I3);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),o=0;o<i;++o){for(var s=r[o],a=s.length,l=n[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new ir(n,this._parents).order()}function I3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function P3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function O3(){return Array.from(this)}function R3(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,o=i.length;n<o;++n){var s=i[n];if(s)return s}return null}function D3(){let e=0;for(const t of this)++e;return e}function N3(){return!this.node()}function z3(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],o=0,s=n.length,a;o<s;++o)(a=n[o])&&e.call(a,a.__data__,o,n);return this}function q3(e){return function(){this.removeAttribute(e)}}function W3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function j3(e,t){return function(){this.setAttribute(e,t)}}function H3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function U3(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Y3(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function V3(e,t){var r=jh(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?W3:q3:typeof t=="function"?r.local?Y3:U3:r.local?H3:j3)(r,t))}function lk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function G3(e){return function(){this.style.removeProperty(e)}}function X3(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Q3(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Z3(e,t,r){return arguments.length>1?this.each((t==null?G3:typeof t=="function"?Q3:X3)(e,t,r??"")):Qo(this.node(),e)}function Qo(e,t){return e.style.getPropertyValue(t)||lk(e).getComputedStyle(e,null).getPropertyValue(t)}function K3(e){return function(){delete this[e]}}function J3(e,t){return function(){this[e]=t}}function t5(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function e5(e,t){return arguments.length>1?this.each((t==null?K3:typeof t=="function"?t5:J3)(e,t)):this.node()[e]}function ck(e){return e.trim().split(/^|\s+/)}function Lg(e){return e.classList||new hk(e)}function hk(e){this._node=e,this._names=ck(e.getAttribute("class")||"")}hk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function uk(e,t){for(var r=Lg(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function dk(e,t){for(var r=Lg(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function r5(e){return function(){uk(this,e)}}function i5(e){return function(){dk(this,e)}}function n5(e,t){return function(){(t.apply(this,arguments)?uk:dk)(this,e)}}function o5(e,t){var r=ck(e+"");if(arguments.length<2){for(var i=Lg(this.node()),n=-1,o=r.length;++n<o;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?n5:t?r5:i5)(r,t))}function s5(){this.textContent=""}function a5(e){return function(){this.textContent=e}}function l5(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function c5(e){return arguments.length?this.each(e==null?s5:(typeof e=="function"?l5:a5)(e)):this.node().textContent}function h5(){this.innerHTML=""}function u5(e){return function(){this.innerHTML=e}}function d5(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function f5(e){return arguments.length?this.each(e==null?h5:(typeof e=="function"?d5:u5)(e)):this.node().innerHTML}function p5(){this.nextSibling&&this.parentNode.appendChild(this)}function g5(){return this.each(p5)}function m5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function y5(){return this.each(m5)}function x5(e){var t=typeof e=="function"?e:ik(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function C5(){return null}function b5(e,t){var r=typeof e=="function"?e:ik(e),i=t==null?C5:typeof t=="function"?t:Bg(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function k5(){var e=this.parentNode;e&&e.removeChild(this)}function v5(){return this.each(k5)}function w5(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function S5(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function T5(e){return this.select(e?S5:w5)}function _5(e){return arguments.length?this.property("__data__",e):this.node().__data__}function B5(e){return function(t){e.call(this,t,this.__data__)}}function L5(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function E5(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,o;r<n;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function A5(e,t,r){return function(){var i=this.__on,n,o=B5(t);if(i){for(var s=0,a=i.length;s<a;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),n.value=t;return}}this.addEventListener(e.type,o,r),n={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(n):this.__on=[n]}}function F5(e,t,r){var i=L5(e+""),n,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(n=0,h=a[l];n<o;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(a=t?A5:E5,n=0;n<o;++n)this.each(a(i[n],t,r));return this}function fk(e,t,r){var i=lk(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function M5(e,t){return function(){return fk(this,e,t)}}function $5(e,t){return function(){return fk(this,e,t.apply(this,arguments))}}function I5(e,t){return this.each((typeof t=="function"?$5:M5)(e,t))}function*P5(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,o=i.length,s;n<o;++n)(s=i[n])&&(yield s)}var pk=[null];function ir(e,t){this._groups=e,this._parents=t}function Za(){return new ir([[document.documentElement]],pk)}function O5(){return this}ir.prototype=Za.prototype={constructor:ir,select:l3,selectAll:d3,selectChild:m3,selectChildren:b3,filter:k3,data:B3,enter:v3,exit:E3,join:A3,merge:F3,selection:O5,order:M3,sort:$3,call:P3,nodes:O3,node:R3,size:D3,empty:N3,each:z3,attr:V3,style:Z3,property:e5,classed:o5,text:c5,html:f5,raise:g5,lower:y5,append:x5,insert:b5,remove:v5,clone:T5,datum:_5,on:F5,dispatch:I5,[Symbol.iterator]:P5};function xt(e){return typeof e=="string"?new ir([[document.querySelector(e)]],[document.documentElement]):new ir([[e]],pk)}function Eg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function gk(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ka(){}var Aa=.7,Yc=1/Aa,To="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R5=/^#([0-9a-f]{3,8})$/,D5=new RegExp(`^rgb\\(${To},${To},${To}\\)$`),N5=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),z5=new RegExp(`^rgba\\(${To},${To},${To},${Fa}\\)$`),q5=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Fa}\\)$`),W5=new RegExp(`^hsl\\(${Fa},${Yr},${Yr}\\)$`),j5=new RegExp(`^hsla\\(${Fa},${Yr},${Yr},${Fa}\\)$`),_0={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};Eg(Ka,Ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:B0,formatHex:B0,formatHex8:H5,formatHsl:U5,formatRgb:L0,toString:L0});function B0(){return this.rgb().formatHex()}function H5(){return this.rgb().formatHex8()}function U5(){return mk(this).formatHsl()}function L0(){return this.rgb().formatRgb()}function Ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=R5.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?E0(t):r===3?new je(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=D5.exec(e))?new je(t[1],t[2],t[3],1):(t=N5.exec(e))?new je(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=z5.exec(e))?Fl(t[1],t[2],t[3],t[4]):(t=q5.exec(e))?Fl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=W5.exec(e))?M0(t[1],t[2]/100,t[3]/100,1):(t=j5.exec(e))?M0(t[1],t[2]/100,t[3]/100,t[4]):_0.hasOwnProperty(e)?E0(_0[e]):e==="transparent"?new je(NaN,NaN,NaN,0):null}function E0(e){return new je(e>>16&255,e>>8&255,e&255,1)}function Fl(e,t,r,i){return i<=0&&(e=t=r=NaN),new je(e,t,r,i)}function Y5(e){return e instanceof Ka||(e=Ma(e)),e?(e=e.rgb(),new je(e.r,e.g,e.b,e.opacity)):new je}function _f(e,t,r,i){return arguments.length===1?Y5(e):new je(e,t,r,i??1)}function je(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Eg(je,_f,gk(Ka,{brighter(e){return e=e==null?Yc:Math.pow(Yc,e),new je(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new je(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new je(bn(this.r),bn(this.g),bn(this.b),Vc(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:A0,formatHex:A0,formatHex8:V5,formatRgb:F0,toString:F0}));function A0(){return`#${gn(this.r)}${gn(this.g)}${gn(this.b)}`}function V5(){return`#${gn(this.r)}${gn(this.g)}${gn(this.b)}${gn((isNaN(this.opacity)?1:this.opacity)*255)}`}function F0(){const e=Vc(this.opacity);return`${e===1?"rgb(":"rgba("}${bn(this.r)}, ${bn(this.g)}, ${bn(this.b)}${e===1?")":`, ${e})`}`}function Vc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gn(e){return e=bn(e),(e<16?"0":"")+e.toString(16)}function M0(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Sr(e,t,r,i)}function mk(e){if(e instanceof Sr)return new Sr(e.h,e.s,e.l,e.opacity);if(e instanceof Ka||(e=Ma(e)),!e)return new Sr;if(e instanceof Sr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),o=Math.max(t,r,i),s=NaN,a=o-n,l=(o+n)/2;return a?(t===o?s=(r-i)/a+(r<i)*6:r===o?s=(i-t)/a+2:s=(t-r)/a+4,a/=l<.5?o+n:2-o-n,s*=60):a=l>0&&l<1?0:s,new Sr(s,a,l,e.opacity)}function G5(e,t,r,i){return arguments.length===1?mk(e):new Sr(e,t,r,i??1)}function Sr(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Eg(Sr,G5,gk(Ka,{brighter(e){return e=e==null?Yc:Math.pow(Yc,e),new Sr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new Sr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new je(ed(e>=240?e-240:e+120,n,i),ed(e,n,i),ed(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Sr($0(this.h),Ml(this.s),Ml(this.l),Vc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vc(this.opacity);return`${e===1?"hsl(":"hsla("}${$0(this.h)}, ${Ml(this.s)*100}%, ${Ml(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $0(e){return e=(e||0)%360,e<0?e+360:e}function Ml(e){return Math.max(0,Math.min(1,e||0))}function ed(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ag=e=>()=>e;function yk(e,t){return function(r){return e+r*t}}function X5(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function T7(e,t){var r=t-e;return r?yk(e,r>180||r<-180?r-360*Math.round(r/360):r):Ag(isNaN(e)?t:e)}function Q5(e){return(e=+e)==1?xk:function(t,r){return r-t?X5(t,r,e):Ag(isNaN(t)?r:t)}}function xk(e,t){var r=t-e;return r?yk(e,r):Ag(isNaN(e)?t:e)}const I0=function e(t){var r=Q5(t);function i(n,o){var s=r((n=_f(n)).r,(o=_f(o)).r),a=r(n.g,o.g),l=r(n.b,o.b),c=xk(n.opacity,o.opacity);return function(h){return n.r=s(h),n.g=a(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function Li(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Bf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rd=new RegExp(Bf.source,"g");function Z5(e){return function(){return e}}function K5(e){return function(t){return e(t)+""}}function J5(e,t){var r=Bf.lastIndex=rd.lastIndex=0,i,n,o,s=-1,a=[],l=[];for(e=e+"",t=t+"";(i=Bf.exec(e))&&(n=rd.exec(t));)(o=n.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(n=n[0])?a[s]?a[s]+=n:a[++s]=n:(a[++s]=null,l.push({i:s,x:Li(i,n)})),r=rd.lastIndex;return r<t.length&&(o=t.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?K5(l[0].x):Z5(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}var P0=180/Math.PI,Lf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ck(e,t,r,i,n,o){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(a=Math.sqrt(r*r+i*i))&&(r/=a,i/=a,l/=a),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:o,rotate:Math.atan2(t,e)*P0,skewX:Math.atan(l)*P0,scaleX:s,scaleY:a}}var $l;function tF(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lf:Ck(t.a,t.b,t.c,t.d,t.e,t.f)}function eF(e){return e==null||($l||($l=document.createElementNS("http://www.w3.org/2000/svg","g")),$l.setAttribute("transform",e),!(e=$l.transform.baseVal.consolidate()))?Lf:(e=e.matrix,Ck(e.a,e.b,e.c,e.d,e.e,e.f))}function bk(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push("translate(",null,t,null,r);p.push({i:g-4,x:Li(c,u)},{i:g-2,x:Li(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Li(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Li(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push(n(d)+"scale(",null,",",null,")");p.push({i:g-4,x:Li(c,u)},{i:g-2,x:Li(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var p=-1,g=f.length,x;++p<g;)u[(x=f[p]).i]=x.x(d);return u.join("")}}}var rF=bk(tF,"px, ","px)","deg)"),iF=bk(eF,", ",")",")"),Zo=0,qs=0,Ss=0,kk=1e3,Gc,Ws,Xc=0,En=0,Hh=0,$a=typeof performance=="object"&&performance.now?performance:Date,vk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fg(){return En||(vk(nF),En=$a.now()+Hh)}function nF(){En=0}function Qc(){this._call=this._time=this._next=null}Qc.prototype=wk.prototype={constructor:Qc,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Fg():+r)+(t==null?0:+t),!this._next&&Ws!==this&&(Ws?Ws._next=this:Gc=this,Ws=this),this._call=e,this._time=r,Ef()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ef())}};function wk(e,t,r){var i=new Qc;return i.restart(e,t,r),i}function oF(){Fg(),++Zo;for(var e=Gc,t;e;)(t=En-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zo}function O0(){En=(Xc=$a.now())+Hh,Zo=qs=0;try{oF()}finally{Zo=0,aF(),En=0}}function sF(){var e=$a.now(),t=e-Xc;t>kk&&(Hh-=t,Xc=e)}function aF(){for(var e,t=Gc,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Gc=r);Ws=e,Ef(i)}function Ef(e){if(!Zo){qs&&(qs=clearTimeout(qs));var t=e-En;t>24?(e<1/0&&(qs=setTimeout(O0,e-$a.now()-Hh)),Ss&&(Ss=clearInterval(Ss))):(Ss||(Xc=$a.now(),Ss=setInterval(sF,kk)),Zo=1,vk(O0))}}function R0(e,t,r){var i=new Qc;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var lF=rk("start","end","cancel","interrupt"),cF=[],Sk=0,D0=1,Af=2,oc=3,N0=4,Ff=5,sc=6;function Uh(e,t,r,i,n,o){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;hF(e,r,{name:t,index:i,group:n,on:lF,tween:cF,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Sk})}function Mg(e,t){var r=$r(e,t);if(r.state>Sk)throw new Error("too late; already scheduled");return r}function Zr(e,t){var r=$r(e,t);if(r.state>oc)throw new Error("too late; already running");return r}function $r(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function hF(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=wk(o,0,r.time);function o(c){r.state=D0,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,d;if(r.state!==D0)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===oc)return R0(s);d.state===N0?(d.state=sc,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=sc,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(R0(function(){r.state===oc&&(r.state=N0,r.timer.restart(a,r.delay,r.time),a(c))}),r.state=Af,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Af){for(r.state=oc,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function a(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Ff,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===Ff&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=sc,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function uF(e,t){var r=e.__transition,i,n,o=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){o=!1;continue}n=i.state>Af&&i.state<Ff,i.state=sc,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}o&&delete e.__transition}}function dF(e){return this.each(function(){uF(this,e)})}function fF(e,t){var r,i;return function(){var n=Zr(this,e),o=n.tween;if(o!==r){i=r=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function pF(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var o=Zr(this,e),s=o.tween;if(s!==i){n=(i=s).slice();for(var a={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a;break}l===c&&n.push(a)}o.tween=n}}function gF(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=$r(this.node(),r).tween,n=0,o=i.length,s;n<o;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?fF:pF)(r,e,t))}function $g(e,t,r){var i=e._id;return e.each(function(){var n=Zr(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return $r(n,i).value[t]}}function Tk(e,t){var r;return(typeof t=="number"?Li:t instanceof Ma?I0:(r=Ma(t))?(t=r,I0):J5)(e,t)}function mF(e){return function(){this.removeAttribute(e)}}function yF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xF(e,t,r){var i,n=r+"",o;return function(){var s=this.getAttribute(e);return s===n?null:s===i?o:o=t(i=s,r)}}function CF(e,t,r){var i,n=r+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?o:o=t(i=s,r)}}function bF(e,t,r){var i,n,o;return function(){var s,a=r(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===i&&l===n?o:(n=l,o=t(i=s,a)))}}function kF(e,t,r){var i,n,o;return function(){var s,a=r(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===i&&l===n?o:(n=l,o=t(i=s,a)))}}function vF(e,t){var r=jh(e),i=r==="transform"?iF:Tk;return this.attrTween(e,typeof t=="function"?(r.local?kF:bF)(r,i,$g(this,"attr."+e,t)):t==null?(r.local?yF:mF)(r):(r.local?CF:xF)(r,i,t))}function wF(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function SF(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function TF(e,t){var r,i;function n(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&SF(e,o)),r}return n._value=t,n}function _F(e,t){var r,i;function n(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&wF(e,o)),r}return n._value=t,n}function BF(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=jh(e);return this.tween(r,(i.local?TF:_F)(i,t))}function LF(e,t){return function(){Mg(this,e).delay=+t.apply(this,arguments)}}function EF(e,t){return t=+t,function(){Mg(this,e).delay=t}}function AF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?LF:EF)(t,e)):$r(this.node(),t).delay}function FF(e,t){return function(){Zr(this,e).duration=+t.apply(this,arguments)}}function MF(e,t){return t=+t,function(){Zr(this,e).duration=t}}function $F(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FF:MF)(t,e)):$r(this.node(),t).duration}function IF(e,t){if(typeof t!="function")throw new Error;return function(){Zr(this,e).ease=t}}function PF(e){var t=this._id;return arguments.length?this.each(IF(t,e)):$r(this.node(),t).ease}function OF(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Zr(this,e).ease=r}}function RF(e){if(typeof e!="function")throw new Error;return this.each(OF(this._id,e))}function DF(e){typeof e!="function"&&(e=ok(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],s=o.length,a=i[n]=[],l,c=0;c<s;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&a.push(l);return new yi(i,this._parents,this._name,this._id)}function NF(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,o=Math.min(i,n),s=new Array(i),a=0;a<o;++a)for(var l=t[a],c=r[a],h=l.length,u=s[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)s[a]=t[a];return new yi(s,this._parents,this._name,this._id)}function zF(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function qF(e,t,r){var i,n,o=zF(t)?Mg:Zr;return function(){var s=o(this,e),a=s.on;a!==i&&(n=(i=a).copy()).on(t,r),s.on=n}}function WF(e,t){var r=this._id;return arguments.length<2?$r(this.node(),r).on.on(e):this.each(qF(r,e,t))}function jF(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function HF(){return this.on("end.remove",jF(this._id))}function UF(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bg(e));for(var i=this._groups,n=i.length,o=new Array(n),s=0;s<n;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=e.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Uh(c[f],t,r,f,c,$r(h,r)));return new yi(o,this._parents,t,r)}function YF(e){var t=this._name,r=this._id;typeof e!="function"&&(e=nk(e));for(var i=this._groups,n=i.length,o=[],s=[],a=0;a<n;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,p=$r(h,r),g=0,x=f.length;g<x;++g)(d=f[g])&&Uh(d,t,r,g,f,p);o.push(f),s.push(h)}return new yi(o,s,t,r)}var VF=Za.prototype.constructor;function GF(){return new VF(this._groups,this._parents)}function XF(e,t){var r,i,n;return function(){var o=Qo(this,e),s=(this.style.removeProperty(e),Qo(this,e));return o===s?null:o===r&&s===i?n:n=t(r=o,i=s)}}function _k(e){return function(){this.style.removeProperty(e)}}function QF(e,t,r){var i,n=r+"",o;return function(){var s=Qo(this,e);return s===n?null:s===i?o:o=t(i=s,r)}}function ZF(e,t,r){var i,n,o;return function(){var s=Qo(this,e),a=r(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Qo(this,e))),s===l?null:s===i&&l===n?o:(n=l,o=t(i=s,a))}}function KF(e,t){var r,i,n,o="style."+t,s="end."+o,a;return function(){var l=Zr(this,e),c=l.on,h=l.value[o]==null?a||(a=_k(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function JF(e,t,r){var i=(e+="")=="transform"?rF:Tk;return t==null?this.styleTween(e,XF(e,i)).on("end.style."+e,_k(e)):typeof t=="function"?this.styleTween(e,ZF(e,i,$g(this,"style."+e,t))).each(KF(this._id,e)):this.styleTween(e,QF(e,i,t),r).on("end.style."+e,null)}function tM(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function eM(e,t,r){var i,n;function o(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&tM(e,s,r)),i}return o._value=t,o}function rM(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,eM(e,t,r??""))}function iM(e){return function(){this.textContent=e}}function nM(e){return function(){var t=e(this);this.textContent=t??""}}function oM(e){return this.tween("text",typeof e=="function"?nM($g(this,"text",e)):iM(e==null?"":e+""))}function sM(e){return function(t){this.textContent=e.call(this,t)}}function aM(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&sM(n)),t}return i._value=e,i}function lM(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,aM(e))}function cM(){for(var e=this._name,t=this._id,r=Bk(),i=this._groups,n=i.length,o=0;o<n;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=$r(l,t);Uh(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new yi(i,this._parents,e,r)}function hM(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--n===0&&o()}};r.each(function(){var c=Zr(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),n===0&&o()})}var uM=0;function yi(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Bk(){return++uM}var ei=Za.prototype;yi.prototype={constructor:yi,select:UF,selectAll:YF,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:DF,merge:NF,selection:GF,transition:cM,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:WF,attr:vF,attrTween:BF,style:JF,styleTween:rM,text:oM,textTween:lM,remove:HF,tween:gF,delay:AF,duration:$F,ease:PF,easeVarying:RF,end:hM,[Symbol.iterator]:ei[Symbol.iterator]};function dM(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var fM={time:null,delay:0,duration:250,ease:dM};function pM(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function gM(e){var t,r;e instanceof yi?(t=e._id,e=e._name):(t=Bk(),(r=fM).time=Fg(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,o=0;o<n;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Uh(l,e,t,c,s,r||pM(l,t));return new yi(i,this._parents,e,t)}Za.prototype.interrupt=dF;Za.prototype.transition=gM;const Mf=Math.PI,$f=2*Mf,ln=1e-6,mM=$f-ln;function Lk(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function yM(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Lk;const r=10**t;return function(i){this._+=i[0];for(let n=1,o=i.length;n<o;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class xM{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Lk:yM(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,o,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+o},${this._y1=+s}`}arcTo(t,r,i,n,o){if(t=+t,r=+r,i=+i,n=+n,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-t,c=n-r,h=s-t,u=a-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>ln)if(!(Math.abs(u*l-c*h)>ln)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-s,p=n-a,g=l*l+c*c,x=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(f),b=o*Math.tan((Mf-Math.acos((g+f-x)/(2*m*y)))/2),v=b/y,S=b/m;Math.abs(v-1)>ln&&this._append`L${t+v*h},${r+v*u}`,this._append`A${o},${o},0,0,${+(u*d>h*p)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,n,o,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(n),l=i*Math.sin(n),c=t+a,h=r+l,u=1^s,f=s?n-o:o-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ln||Math.abs(this._y1-h)>ln)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%$f+$f),f>mM?this._append`A${i},${i},0,1,${u},${t-a},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>ln&&this._append`A${i},${i},0,${+(f>=Mf)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Xn(e){return function(){return e}}const _7=Math.abs,B7=Math.atan2,L7=Math.cos,E7=Math.max,A7=Math.min,F7=Math.sin,M7=Math.sqrt,z0=1e-12,Ig=Math.PI,q0=Ig/2,$7=2*Ig;function I7(e){return e>1?0:e<-1?Ig:Math.acos(e)}function P7(e){return e>=1?q0:e<=-1?-q0:Math.asin(e)}function CM(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new xM(t)}function bM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ek(e){this._context=e}Ek.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function sa(e){return new Ek(e)}function kM(e){return e[0]}function vM(e){return e[1]}function wM(e,t){var r=Xn(!0),i=null,n=sa,o=null,s=CM(a);e=typeof e=="function"?e:e===void 0?kM:Xn(e),t=typeof t=="function"?t:t===void 0?vM:Xn(t);function a(l){var c,h=(l=bM(l)).length,u,f=!1,d;for(i==null&&(o=n(d=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(u,c,l),+t(u,c,l));if(d)return o=null,d+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:Xn(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:Xn(+l),a):t},a.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Xn(!!l),a):r},a.curve=function(l){return arguments.length?(n=l,i!=null&&(o=n(i)),a):n},a.context=function(l){return arguments.length?(l==null?i=o=null:o=n(i=l),a):i},a}class Ak{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Fk(e){return new Ak(e,!0)}function Mk(e){return new Ak(e,!1)}function Vi(){}function Zc(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Yh(e){this._context=e}Yh.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:Zc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function If(e){return new Yh(e)}function $k(e){this._context=e}$k.prototype={areaStart:Vi,areaEnd:Vi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function SM(e){return new $k(e)}function Ik(e){this._context=e}Ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Zc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TM(e){return new Ik(e)}function Pk(e,t){this._basis=new Yh(e),this._beta=t}Pk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],o=e[r]-i,s=t[r]-n,a=-1,l;++a<=r;)l=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+l*o),this._beta*t[a]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const _M=function e(t){function r(i){return t===1?new Yh(i):new Pk(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Kc(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Pg(e,t){this._context=e,this._k=(1-t)/6}Pg.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:Kc(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Kc(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ok=function e(t){function r(i){return new Pg(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Og(e,t){this._context=e,this._k=(1-t)/6}Og.prototype={areaStart:Vi,areaEnd:Vi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Kc(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const BM=function e(t){function r(i){return new Og(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Rg(e,t){this._context=e,this._k=(1-t)/6}Rg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Kc(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const LM=function e(t){function r(i){return new Rg(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Dg(e,t,r){var i=e._x1,n=e._y1,o=e._x2,s=e._y2;if(e._l01_a>z0){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>z0){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,o,s,e._x2,e._y2)}function Rk(e,t){this._context=e,this._alpha=t}Rk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Dg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Dk=function e(t){function r(i){return t?new Rk(i,t):new Pg(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Nk(e,t){this._context=e,this._alpha=t}Nk.prototype={areaStart:Vi,areaEnd:Vi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Dg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const EM=function e(t){function r(i){return t?new Nk(i,t):new Og(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function zk(e,t){this._context=e,this._alpha=t}zk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Dg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const AM=function e(t){function r(i){return t?new zk(i,t):new Rg(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function qk(e){this._context=e}qk.prototype={areaStart:Vi,areaEnd:Vi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function FM(e){return new qk(e)}function W0(e){return e<0?-1:1}function j0(e,t,r){var i=e._x1-e._x0,n=t-e._x1,o=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),a=(o*n+s*i)/(i+n);return(W0(o)+W0(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function H0(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function id(e,t,r){var i=e._x0,n=e._y0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,n+a*t,o-a,s-a*r,o,s)}function Jc(e){this._context=e}Jc.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:id(this,this._t0,H0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,id(this,H0(this,r=j0(this,e,t)),r);break;default:id(this,this._t0,r=j0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wk(e){this._context=new jk(e)}(Wk.prototype=Object.create(Jc.prototype)).point=function(e,t){Jc.prototype.point.call(this,t,e)};function jk(e){this._context=e}jk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,o){this._context.bezierCurveTo(t,e,i,r,o,n)}};function Hk(e){return new Jc(e)}function Uk(e){return new Wk(e)}function Yk(e){this._context=e}Yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=U0(e),n=U0(t),o=0,s=1;s<r;++o,++s)this._context.bezierCurveTo(i[0][o],n[0][o],i[1][o],n[1][o],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function U0(e){var t,r=e.length-1,i,n=new Array(r),o=new Array(r),s=new Array(r);for(n[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,o[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/o[t-1],o[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/o[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/o[t];for(o[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-n[t+1];return[n,o]}function Vk(e){return new Yk(e)}function Vh(e,t){this._context=e,this._t=t}Vh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Gk(e){return new Vh(e,.5)}function Xk(e){return new Vh(e,0)}function Qk(e){return new Vh(e,1)}function js(e,t,r){this.k=e,this.x=t,this.y=r}js.prototype={constructor:js,scale:function(e){return e===1?this:new js(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new js(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};js.prototype;var MM=C(e=>{var n;const{securityLevel:t}=St();let r=xt("body");if(t==="sandbox"){const s=((n=xt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=xt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Ng(e){return typeof e>"u"||e===null}C(Ng,"isNothing");function Zk(e){return typeof e=="object"&&e!==null}C(Zk,"isObject");function Kk(e){return Array.isArray(e)?e:Ng(e)?[]:[e]}C(Kk,"toArray");function Jk(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}C(Jk,"extend");function tv(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}C(tv,"repeat");function ev(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}C(ev,"isNegativeZero");var $M=Ng,IM=Zk,PM=Kk,OM=tv,RM=ev,DM=Jk,re={isNothing:$M,isObject:IM,toArray:PM,repeat:OM,isNegativeZero:RM,extend:DM};function zg(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
179
|
-
|
|
180
|
-
`+e.mark.snippet),i+" "+r):i}C(zg,"formatError");function Ko(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=zg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}C(Ko,"YAMLException$1");Ko.prototype=Object.create(Error.prototype);Ko.prototype.constructor=Ko;Ko.prototype.toString=C(function(t){return this.name+": "+zg(this,t)},"toString");var qe=Ko;function ac(e,t,r,i,n){var o="",s="",a=Math.floor(n/2)-1;return i-t>a&&(o=" ... ",t=i-a+o.length),r-i>a&&(s=" ...",r=i+a-s.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+o.length}}C(ac,"getLine");function lc(e,t){return re.repeat(" ",t-e.length)+e}C(lc,"padStart");function rv(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],o,s=-1;o=r.exec(e.buffer);)n.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var a="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=ac(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),a=re.repeat(" ",t.indent)+lc((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
181
|
-
`+a;for(c=ac(e.buffer,i[s],n[s],e.position,u),a+=re.repeat(" ",t.indent)+lc((e.line+1).toString(),h)+" | "+c.str+`
|
|
182
|
-
`,a+=re.repeat("-",t.indent+h+3+c.pos)+`^
|
|
183
|
-
`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=ac(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),a+=re.repeat(" ",t.indent)+lc((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
184
|
-
`;return a.replace(/\n$/,"")}C(rv,"makeSnippet");var NM=rv,zM=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],qM=["scalar","sequence","mapping"];function iv(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}C(iv,"compileStyleAliases");function nv(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(zM.indexOf(r)===-1)throw new qe('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=iv(t.styleAliases||null),qM.indexOf(this.kind)===-1)throw new qe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}C(nv,"Type$1");var we=nv;function Pf(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(n=s)}),r[n]=i}),r}C(Pf,"compileList");function ov(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(C(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}C(ov,"compileMap");function th(e){return this.extend(e)}C(th,"Schema$1");th.prototype.extend=C(function(t){var r=[],i=[];if(t instanceof we)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new qe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof we))throw new qe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new qe("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 qe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof we))throw new qe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(th.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Pf(n,"implicit"),n.compiledExplicit=Pf(n,"explicit"),n.compiledTypeMap=ov(n.compiledImplicit,n.compiledExplicit),n},"extend");var WM=th,jM=new we("tag:yaml.org,2002:str",{kind:"scalar",construct:C(function(e){return e!==null?e:""},"construct")}),HM=new we("tag:yaml.org,2002:seq",{kind:"sequence",construct:C(function(e){return e!==null?e:[]},"construct")}),UM=new we("tag:yaml.org,2002:map",{kind:"mapping",construct:C(function(e){return e!==null?e:{}},"construct")}),YM=new WM({explicit:[jM,HM,UM]});function sv(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}C(sv,"resolveYamlNull");function av(){return null}C(av,"constructYamlNull");function lv(e){return e===null}C(lv,"isNull");var VM=new we("tag:yaml.org,2002:null",{kind:"scalar",resolve:sv,construct:av,predicate:lv,represent:{canonical:C(function(){return"~"},"canonical"),lowercase:C(function(){return"null"},"lowercase"),uppercase:C(function(){return"NULL"},"uppercase"),camelcase:C(function(){return"Null"},"camelcase"),empty:C(function(){return""},"empty")},defaultStyle:"lowercase"});function cv(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}C(cv,"resolveYamlBoolean");function hv(e){return e==="true"||e==="True"||e==="TRUE"}C(hv,"constructYamlBoolean");function uv(e){return Object.prototype.toString.call(e)==="[object Boolean]"}C(uv,"isBoolean");var GM=new we("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cv,construct:hv,predicate:uv,represent:{lowercase:C(function(e){return e?"true":"false"},"lowercase"),uppercase:C(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:C(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function dv(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}C(dv,"isHexCode");function fv(e){return 48<=e&&e<=55}C(fv,"isOctCode");function pv(e){return 48<=e&&e<=57}C(pv,"isDecCode");function gv(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!dv(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!fv(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!pv(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}C(gv,"resolveYamlInteger");function mv(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}C(mv,"constructYamlInteger");function yv(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!re.isNegativeZero(e)}C(yv,"isInteger");var XM=new we("tag:yaml.org,2002:int",{kind:"scalar",resolve:gv,construct:mv,predicate:yv,represent:{binary:C(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:C(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:C(function(e){return e.toString(10)},"decimal"),hexadecimal:C(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),QM=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xv(e){return!(e===null||!QM.test(e)||e[e.length-1]==="_")}C(xv,"resolveYamlFloat");function Cv(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}C(Cv,"constructYamlFloat");var ZM=/^[-+]?[0-9]+e/;function bv(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(re.isNegativeZero(e))return"-0.0";return r=e.toString(10),ZM.test(r)?r.replace("e",".e"):r}C(bv,"representYamlFloat");function kv(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||re.isNegativeZero(e))}C(kv,"isFloat");var KM=new we("tag:yaml.org,2002:float",{kind:"scalar",resolve:xv,construct:Cv,predicate:kv,represent:bv,defaultStyle:"lowercase"}),vv=YM.extend({implicit:[VM,GM,XM,KM]}),JM=vv,wv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sv=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 Tv(e){return e===null?!1:wv.exec(e)!==null||Sv.exec(e)!==null}C(Tv,"resolveYamlTimestamp");function _v(e){var t,r,i,n,o,s,a,l=0,c=null,h,u,f;if(t=wv.exec(e),t===null&&(t=Sv.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,o,s,a,l)),c&&f.setTime(f.getTime()-c),f}C(_v,"constructYamlTimestamp");function Bv(e){return e.toISOString()}C(Bv,"representYamlTimestamp");var t$=new we("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Tv,construct:_v,instanceOf:Date,represent:Bv});function Lv(e){return e==="<<"||e===null}C(Lv,"resolveYamlMerge");var e$=new we("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Lv}),qg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
185
|
-
\r`;function Ev(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=qg;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}C(Ev,"resolveYamlBinary");function Av(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=qg,s=0,a=[];for(t=0;t<n;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}C(Av,"constructYamlBinary");function Fv(e){var t="",r=0,i,n,o=e.length,s=qg;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}C(Fv,"representYamlBinary");function Mv(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}C(Mv,"isBinary");var r$=new we("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ev,construct:Av,predicate:Mv,represent:Fv}),i$=Object.prototype.hasOwnProperty,n$=Object.prototype.toString;function $v(e){if(e===null)return!0;var t=[],r,i,n,o,s,a=e;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],s=!1,n$.call(n)!=="[object Object]")return!1;for(o in n)if(i$.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}C($v,"resolveYamlOmap");function Iv(e){return e!==null?e:[]}C(Iv,"constructYamlOmap");var o$=new we("tag:yaml.org,2002:omap",{kind:"sequence",resolve:$v,construct:Iv}),s$=Object.prototype.toString;function Pv(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],s$.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}C(Pv,"resolveYamlPairs");function Ov(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}C(Ov,"constructYamlPairs");var a$=new we("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Pv,construct:Ov}),l$=Object.prototype.hasOwnProperty;function Rv(e){if(e===null)return!0;var t,r=e;for(t in r)if(l$.call(r,t)&&r[t]!==null)return!1;return!0}C(Rv,"resolveYamlSet");function Dv(e){return e!==null?e:{}}C(Dv,"constructYamlSet");var c$=new we("tag:yaml.org,2002:set",{kind:"mapping",resolve:Rv,construct:Dv}),Nv=JM.extend({implicit:[t$,e$],explicit:[r$,o$,a$,c$]}),Gi=Object.prototype.hasOwnProperty,eh=1,zv=2,qv=3,rh=4,nd=1,h$=2,Y0=3,u$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d$=/[\x85\u2028\u2029]/,f$=/[,\[\]\{\}]/,Wv=/^(?:!|!!|![a-z\-]+!)$/i,jv=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Of(e){return Object.prototype.toString.call(e)}C(Of,"_class");function Lr(e){return e===10||e===13}C(Lr,"is_EOL");function Hi(e){return e===9||e===32}C(Hi,"is_WHITE_SPACE");function Le(e){return e===9||e===32||e===10||e===13}C(Le,"is_WS_OR_EOL");function mn(e){return e===44||e===91||e===93||e===123||e===125}C(mn,"is_FLOW_INDICATOR");function Hv(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}C(Hv,"fromHexCode");function Uv(e){return e===120?2:e===117?4:e===85?8:0}C(Uv,"escapedHexLen");function Yv(e){return 48<=e&&e<=57?e-48:-1}C(Yv,"fromDecimalCode");function Rf(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
186
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}C(Rf,"simpleEscapeSequence");function Vv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}C(Vv,"charFromCodepoint");function Wg(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}C(Wg,"setProperty");var Gv=new Array(256),Xv=new Array(256);for(nn=0;nn<256;nn++)Gv[nn]=Rf(nn)?1:0,Xv[nn]=Rf(nn);var nn;function Qv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Nv,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}C(Qv,"State$1");function jg(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=NM(r),new qe(t,r)}C(jg,"generateError");function at(e,t){throw jg(e,t)}C(at,"throwError");function Ia(e,t){e.onWarning&&e.onWarning.call(null,jg(e,t))}C(Ia,"throwWarning");var V0={YAML:C(function(t,r,i){var n,o,s;t.version!==null&&at(t,"duplication of %YAML directive"),i.length!==1&&at(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&at(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&at(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Ia(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:C(function(t,r,i){var n,o;i.length!==2&&at(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Wv.test(n)||at(t,"ill-formed tag handle (first argument) of the TAG directive"),Gi.call(t.tagMap,n)&&at(t,'there is a previously declared suffix for "'+n+'" tag handle'),jv.test(o)||at(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{at(t,"tag prefix is malformed: "+o)}t.tagMap[n]=o},"handleTagDirective")};function di(e,t,r,i){var n,o,s,a;if(t<r){if(a=e.input.slice(t,r),i)for(n=0,o=a.length;n<o;n+=1)s=a.charCodeAt(n),s===9||32<=s&&s<=1114111||at(e,"expected valid JSON character");else u$.test(a)&&at(e,"the stream contains non-printable characters");e.result+=a}}C(di,"captureSegment");function Df(e,t,r,i){var n,o,s,a;for(re.isObject(r)||at(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,a=n.length;s<a;s+=1)o=n[s],Gi.call(t,o)||(Wg(t,o,r[o]),i[o]=!0)}C(Df,"mergeMappings");function yn(e,t,r,i,n,o,s,a,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&at(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Of(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Of(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)Df(e,t,o[c],r);else Df(e,t,o,r);else!e.json&&!Gi.call(r,n)&&Gi.call(t,n)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,at(e,"duplicated mapping key")),Wg(t,n,o),delete r[n];return t}C(yn,"storeMappingPair");function Gh(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):at(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}C(Gh,"readLineBreak");function Gt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Hi(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Lr(n))for(Gh(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ia(e,"deficient indentation"),i}C(Gt,"skipSeparationSpace");function Ja(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Le(r)))}C(Ja,"testDocumentSeparator");function Xh(e,t){t===1?e.result+=" ":t>1&&(e.result+=re.repeat(`
|
|
187
|
-
`,t-1))}C(Xh,"writeFoldedLines");function Zv(e,t,r){var i,n,o,s,a,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Le(d)||mn(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),Le(n)||r&&mn(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),Le(n)||r&&mn(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Le(i))break}else{if(e.position===e.lineStart&&Ja(e)||r&&mn(d))break;if(Lr(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Gt(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}a&&(di(e,o,s,!1),Xh(e,e.line-l),o=s=e.position,a=!1),Hi(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return di(e,o,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}C(Zv,"readPlainScalar");function Kv(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(di(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Lr(r)?(di(e,i,n,!0),Xh(e,Gt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ja(e)?at(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);at(e,"unexpected end of the stream within a single quoted scalar")}C(Kv,"readSingleQuotedScalar");function Jv(e,t){var r,i,n,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return di(e,r,e.position,!0),e.position++,!0;if(a===92){if(di(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),Lr(a))Gt(e,!1,t);else if(a<256&&Gv[a])e.result+=Xv[a],e.position++;else if((s=Uv(a))>0){for(n=s,o=0;n>0;n--)a=e.input.charCodeAt(++e.position),(s=Hv(a))>=0?o=(o<<4)+s:at(e,"expected hexadecimal character");e.result+=Vv(o),e.position++}else at(e,"unknown escape sequence");r=i=e.position}else Lr(a)?(di(e,r,i,!0),Xh(e,Gt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ja(e)?at(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}at(e,"unexpected end of the stream within a double quoted scalar")}C(Jv,"readDoubleQuotedScalar");function t2(e,t){var r=!0,i,n,o,s=e.tag,a,l=e.anchor,c,h,u,f,d,p=Object.create(null),g,x,m,y;if(y=e.input.charCodeAt(e.position),y===91)h=93,d=!1,a=[];else if(y===123)h=125,d=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);y!==0;){if(Gt(e,!0,t),y=e.input.charCodeAt(e.position),y===h)return e.position++,e.tag=s,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=a,!0;r?y===44&&at(e,"expected the node content, but found ','"):at(e,"missed comma between flow collection entries"),x=g=m=null,u=f=!1,y===63&&(c=e.input.charCodeAt(e.position+1),Le(c)&&(u=f=!0,e.position++,Gt(e,!0,t))),i=e.line,n=e.lineStart,o=e.position,An(e,t,eh,!1,!0),x=e.tag,g=e.result,Gt(e,!0,t),y=e.input.charCodeAt(e.position),(f||e.line===i)&&y===58&&(u=!0,y=e.input.charCodeAt(++e.position),Gt(e,!0,t),An(e,t,eh,!1,!0),m=e.result),d?yn(e,a,p,x,g,m,i,n,o):u?a.push(yn(e,null,p,x,g,m,i,n,o)):a.push(g),Gt(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(r=!0,y=e.input.charCodeAt(++e.position)):r=!1}at(e,"unexpected end of the stream within a flow collection")}C(t2,"readFlowCollection");function e2(e,t){var r,i,n=nd,o=!1,s=!1,a=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)nd===n?n=u===43?Y0:h$:at(e,"repeat of a chomping mode identifier");else if((h=Yv(u))>=0)h===0?at(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?at(e,"repeat of an indentation width identifier"):(a=t+h-1,s=!0);else break;if(Hi(u)){do u=e.input.charCodeAt(++e.position);while(Hi(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Lr(u)&&u!==0)}for(;u!==0;){for(Gh(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),Lr(u)){l++;continue}if(e.lineIndent<a){n===Y0?e.result+=re.repeat(`
|
|
188
|
-
`,o?1+l:l):n===nd&&o&&(e.result+=`
|
|
189
|
-
`);break}for(i?Hi(u)?(c=!0,e.result+=re.repeat(`
|
|
190
|
-
`,o?1+l:l)):c?(c=!1,e.result+=re.repeat(`
|
|
191
|
-
`,l+1)):l===0?o&&(e.result+=" "):e.result+=re.repeat(`
|
|
192
|
-
`,l):e.result+=re.repeat(`
|
|
193
|
-
`,o?1+l:l),o=!0,s=!0,l=0,r=e.position;!Lr(u)&&u!==0;)u=e.input.charCodeAt(++e.position);di(e,r,e.position,!1)}return!0}C(e2,"readBlockScalar");function Nf(e,t){var r,i=e.tag,n=e.anchor,o=[],s,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Le(s))));){if(a=!0,e.position++,Gt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,An(e,t,qv,!1,!0),o.push(e.result),Gt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)at(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}C(Nf,"readBlockSequence");function r2(e,t,r){var i,n,o,s,a,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,p=null,g=null,x=!1,m=!1,y;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),y=e.input.charCodeAt(e.position);y!==0;){if(!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(y===63||y===58)&&Le(i))y===63?(x&&(yn(e,u,f,d,p,null,s,a,l),d=p=g=null),m=!0,x=!0,n=!0):x?(x=!1,n=!0):at(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=i;else{if(s=e.line,a=e.lineStart,l=e.position,!An(e,r,zv,!1,!0))break;if(e.line===o){for(y=e.input.charCodeAt(e.position);Hi(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Le(y)||at(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(yn(e,u,f,d,p,null,s,a,l),d=p=g=null),m=!0,x=!1,n=!1,d=e.tag,p=e.result;else if(m)at(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(m)at(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(x&&(s=e.line,a=e.lineStart,l=e.position),An(e,t,rh,!0,n)&&(x?p=e.result:g=e.result),x||(yn(e,u,f,d,p,g,s,a,l),d=p=g=null),Gt(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&y!==0)at(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&yn(e,u,f,d,p,null,s,a,l),m&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),m}C(r2,"readBlockMapping");function i2(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&at(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):at(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Le(s);)s===33&&(i?at(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Wv.test(n)||at(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),f$.test(o)&&at(e,"tag suffix cannot contain flow indicator characters")}o&&!jv.test(o)&&at(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{at(e,"tag name is malformed: "+o)}return r?e.tag=o:Gi.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:at(e,'undeclared tag handle "'+n+'"'),!0}C(i2,"readTagProperty");function n2(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&at(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Le(r)&&!mn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}C(n2,"readAnchorProperty");function o2(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Le(i)&&!mn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Gi.call(e.anchorMap,r)||at(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Gt(e,!0,-1),!0}C(o2,"readAlias");function An(e,t,r,i,n){var o,s,a,l=1,c=!1,h=!1,u,f,d,p,g,x;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=rh===r||qv===r,i&&Gt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;i2(e)||n2(e);)Gt(e,!0,-1)?(c=!0,a=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=c||n),(l===1||rh===r)&&(eh===r||zv===r?g=t:g=t+1,x=e.position-e.lineStart,l===1?a&&(Nf(e,x)||r2(e,x,g))||t2(e,g)?h=!0:(s&&e2(e,g)||Kv(e,g)||Jv(e,g)?h=!0:o2(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&at(e,"alias node should not have any properties")):Zv(e,g,eh===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=a&&Nf(e,x))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&at(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(p=e.implicitTypes[u],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Gi.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){p=d[u];break}p||at(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&at(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):at(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}C(An,"composeNode");function s2(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Gt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Le(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&at(e,"directive name must not be less than one character in length");s!==0;){for(;Hi(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Lr(s));break}if(Lr(s))break;for(r=e.position;s!==0&&!Le(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&Gh(e),Gi.call(V0,i)?V0[i](e,i,n):Ia(e,'unknown document directive "'+i+'"')}if(Gt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Gt(e,!0,-1)):o&&at(e,"directives end mark is expected"),An(e,e.lineIndent-1,rh,!1,!0),Gt(e,!0,-1),e.checkLineBreaks&&d$.test(e.input.slice(t,e.position))&&Ia(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ja(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Gt(e,!0,-1));return}if(e.position<e.length-1)at(e,"end of the stream or a document separator is expected");else return}C(s2,"readDocument");function Hg(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
194
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Qv(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,at(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)s2(r);return r.documents}C(Hg,"loadDocuments");function p$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Hg(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}C(p$,"loadAll$1");function a2(e,t){var r=Hg(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new qe("expected a single document in the stream, but found more")}}C(a2,"load$1");var g$=a2,m$={load:g$},l2=Object.prototype.toString,c2=Object.prototype.hasOwnProperty,Ug=65279,y$=9,Pa=10,x$=13,C$=32,b$=33,k$=34,zf=35,v$=37,w$=38,S$=39,T$=42,h2=44,_$=45,ih=58,B$=61,L$=62,E$=63,A$=64,u2=91,d2=93,F$=96,f2=123,M$=124,p2=125,Te={};Te[0]="\\0";Te[7]="\\a";Te[8]="\\b";Te[9]="\\t";Te[10]="\\n";Te[11]="\\v";Te[12]="\\f";Te[13]="\\r";Te[27]="\\e";Te[34]='\\"';Te[92]="\\\\";Te[133]="\\N";Te[160]="\\_";Te[8232]="\\L";Te[8233]="\\P";var $$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],I$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function g2(e,t){var r,i,n,o,s,a,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&c2.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[s]=a;return r}C(g2,"compileStyleMap");function m2(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new qe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+re.repeat("0",i-t.length)+t}C(m2,"encodeHex");var P$=1,Oa=2;function y2(e){this.schema=e.schema||Nv,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=re.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=g2(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Oa:P$,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}C(y2,"State");function qf(e,t){for(var r=re.repeat(" ",t),i=0,n=-1,o="",s,a=e.length;i<a;)n=e.indexOf(`
|
|
195
|
-
`,i),n===-1?(s=e.slice(i),i=a):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
|
|
196
|
-
`&&(o+=r),o+=s;return o}C(qf,"indentString");function nh(e,t){return`
|
|
197
|
-
`+re.repeat(" ",e.indent*t)}C(nh,"generateNextLine");function x2(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}C(x2,"testImplicitResolving");function Ra(e){return e===C$||e===y$}C(Ra,"isWhitespace");function Jo(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ug||65536<=e&&e<=1114111}C(Jo,"isPrintable");function Wf(e){return Jo(e)&&e!==Ug&&e!==x$&&e!==Pa}C(Wf,"isNsCharOrWhitespace");function jf(e,t,r){var i=Wf(e),n=i&&!Ra(e);return(r?i:i&&e!==h2&&e!==u2&&e!==d2&&e!==f2&&e!==p2)&&e!==zf&&!(t===ih&&!n)||Wf(t)&&!Ra(t)&&e===zf||t===ih&&n}C(jf,"isPlainSafe");function C2(e){return Jo(e)&&e!==Ug&&!Ra(e)&&e!==_$&&e!==E$&&e!==ih&&e!==h2&&e!==u2&&e!==d2&&e!==f2&&e!==p2&&e!==zf&&e!==w$&&e!==T$&&e!==b$&&e!==M$&&e!==B$&&e!==L$&&e!==S$&&e!==k$&&e!==v$&&e!==A$&&e!==F$}C(C2,"isPlainSafeFirst");function b2(e){return!Ra(e)&&e!==ih}C(b2,"isPlainSafeLast");function yo(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}C(yo,"codePointAt");function Yg(e){var t=/^\n* /;return t.test(e)}C(Yg,"needIndentIndicator");var k2=1,Hf=2,v2=3,w2=4,to=5;function S2(e,t,r,i,n,o,s,a){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,p=-1,g=C2(yo(e,0))&&b2(yo(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yo(e,l),!Jo(c))return to;g=g&&jf(c,h,a),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yo(e,l),c===Pa)u=!0,d&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!Jo(c))return to;g=g&&jf(c,h,a),h=c}f=f||d&&l-p-1>i&&e[p+1]!==" "}return!u&&!f?g&&!s&&!n(e)?k2:o===Oa?to:Hf:r>9&&Yg(e)?to:s?o===Oa?to:Hf:f?w2:v2}C(S2,"chooseScalarStyle");function T2(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Oa?'""':"''";if(!e.noCompatMode&&($$.indexOf(t)!==-1||I$.test(t)))return e.quotingType===Oa?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),a=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return x2(e,c)}switch(C(l,"testAmbiguity"),S2(t,a,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case k2:return t;case Hf:return"'"+t.replace(/'/g,"''")+"'";case v2:return"|"+Uf(t,e.indent)+Yf(qf(t,o));case w2:return">"+Uf(t,e.indent)+Yf(qf(_2(t,s),o));case to:return'"'+B2(t)+'"';default:throw new qe("impossible error: invalid scalar style")}}()}C(T2,"writeScalar");function Uf(e,t){var r=Yg(e)?String(t):"",i=e[e.length-1]===`
|
|
198
|
-
`,n=i&&(e[e.length-2]===`
|
|
199
|
-
`||e===`
|
|
200
|
-
`),o=n?"+":i?"":"-";return r+o+`
|
|
201
|
-
`}C(Uf,"blockHeader");function Yf(e){return e[e.length-1]===`
|
|
202
|
-
`?e.slice(0,-1):e}C(Yf,"dropEndingNewline");function _2(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
|
|
203
|
-
`);return c=c!==-1?c:e.length,r.lastIndex=c,Vf(e.slice(0,c),t)}(),n=e[0]===`
|
|
204
|
-
`||e[0]===" ",o,s;s=r.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",i+=a+(!n&&!o&&l!==""?`
|
|
205
|
-
`:"")+Vf(l,t),n=o}return i}C(_2,"foldString");function Vf(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,a=0,l="";i=r.exec(e);)a=i.index,a-n>t&&(o=s>n?s:a,l+=`
|
|
206
|
-
`+e.slice(n,o),n=o+1),s=a;return l+=`
|
|
207
|
-
`,e.length-n>t&&s>n?l+=e.slice(n,s)+`
|
|
208
|
-
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}C(Vf,"foldLine");function B2(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=yo(e,n),i=Te[r],!i&&Jo(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||m2(r);return t}C(B2,"escapeString");function L2(e,t,r){var i="",n=e.tag,o,s,a;for(o=0,s=r.length;o<s;o+=1)a=r[o],e.replacer&&(a=e.replacer.call(r,String(o),a)),(Gr(e,t,a,!1,!1)||typeof a>"u"&&Gr(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}C(L2,"writeFlowSequence");function Gf(e,t,r,i){var n="",o=e.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Gr(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Gr(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=nh(e,t)),e.dump&&Pa===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}C(Gf,"writeBlockSequence");function E2(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,a,l,c,h;for(s=0,a=o.length;s<a;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Gr(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Gr(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}C(E2,"writeFlowMapping");function A2(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),a,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new qe("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!i||n!=="")&&(f+=nh(e,t)),c=s[a],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Gr(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Pa===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=nh(e,t)),Gr(e,t+1,h,!0,u)&&(e.dump&&Pa===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=o,e.dump=n||"{}"}C(A2,"writeBlockMapping");function Xf(e,t,r){var i,n,o,s,a,l;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(a=n[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,l2.call(a.represent)==="[object Function]")i=a.represent(t,l);else if(c2.call(a.represent,l))i=a.represent[l](t,l);else throw new qe("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}C(Xf,"detectType");function Gr(e,t,r,i,n,o,s){e.tag=null,e.dump=r,Xf(e,r,!1)||Xf(e,r,!0);var a=l2.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=a==="[object Object]"||a==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(A2(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(E2(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Gf(e,t-1,e.dump,n):Gf(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(L2(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&T2(e,e.dump,t,o,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qe("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}C(Gr,"writeNode");function F2(e,t){var r=[],i=[],n,o;for(oh(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}C(F2,"getDuplicateReferences");function oh(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)oh(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)oh(e[i[n]],t,r)}C(oh,"inspectNode");function O$(e,t){t=t||{};var r=new y2(t);r.noRefs||F2(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Gr(r,0,i,!0,!0)?r.dump+`
|
|
209
|
-
`:""}C(O$,"dump$1");function R$(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}C(R$,"renamed");var D$=vv,N$=m$.load;/*! Bundled license information:
|
|
210
|
-
|
|
211
|
-
js-yaml/dist/js-yaml.mjs:
|
|
212
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
213
|
-
*/var Ts=C((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),ke={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},G0={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Hs(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Dt(e),t=Dt(t);const[r,i]=[e.x,e.y],[n,o]=[t.x,t.y],s=n-r,a=o-i;return{angle:Math.atan(a/s),deltaX:s,deltaY:a}}C(Hs,"calculateDeltaAndAngle");var Dt=C(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),z$=C(e=>({x:C(function(t,r,i){let n=0;const o=Dt(i[0]).x<Dt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ke,e.arrowTypeStart)){const{angle:d,deltaX:p}=Hs(i[0],i[1]);n=ke[e.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ke,e.arrowTypeEnd)){const{angle:d,deltaX:p}=Hs(i[i.length-1],i[i.length-2]);n=ke[e.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const s=Math.abs(Dt(t).x-Dt(i[i.length-1]).x),a=Math.abs(Dt(t).y-Dt(i[i.length-1]).y),l=Math.abs(Dt(t).x-Dt(i[0]).x),c=Math.abs(Dt(t).y-Dt(i[0]).y),h=ke[e.arrowTypeStart],u=ke[e.arrowTypeEnd],f=1;if(s<u&&s>0&&a<u){let d=u+f-s;d*=o==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=o==="right"?-1:1,n+=d}return Dt(t).x+n},"x"),y:C(function(t,r,i){let n=0;const o=Dt(i[0]).y<Dt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ke,e.arrowTypeStart)){const{angle:d,deltaY:p}=Hs(i[0],i[1]);n=ke[e.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ke,e.arrowTypeEnd)){const{angle:d,deltaY:p}=Hs(i[i.length-1],i[i.length-2]);n=ke[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const s=Math.abs(Dt(t).y-Dt(i[i.length-1]).y),a=Math.abs(Dt(t).x-Dt(i[i.length-1]).x),l=Math.abs(Dt(t).y-Dt(i[0]).y),c=Math.abs(Dt(t).x-Dt(i[0]).x),h=ke[e.arrowTypeStart],u=ke[e.arrowTypeEnd],f=1;if(s<u&&s>0&&a<u){let d=u+f-s;d*=o==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=o==="up"?-1:1,n+=d}return Dt(t).y+n},"y")}),"getLineFunctionsWithOffset"),M2={},se={};Object.defineProperty(se,"__esModule",{value:!0});se.BLANK_URL=se.relativeFirstCharacters=se.whitespaceEscapeCharsRegex=se.urlSchemeRegex=se.ctrlCharactersRegex=se.htmlCtrlEntityRegex=se.htmlEntitiesRegex=se.invalidProtocolRegex=void 0;se.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;se.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;se.htmlCtrlEntityRegex=/&(newline|tab);/gi;se.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;se.urlSchemeRegex=/^.+(:|:)/gim;se.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;se.relativeFirstCharacters=[".","/"];se.BLANK_URL="about:blank";Object.defineProperty(M2,"__esModule",{value:!0});var q$=M2.sanitizeUrl=U$,be=se;function W$(e){return be.relativeFirstCharacters.indexOf(e[0])>-1}function j$(e){var t=e.replace(be.ctrlCharactersRegex,"");return t.replace(be.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function H$(e){return URL.canParse(e)}function X0(e){try{return decodeURIComponent(e)}catch{return e}}function U$(e){if(!e)return be.BLANK_URL;var t,r=X0(e.trim());do r=j$(r).replace(be.htmlCtrlEntityRegex,"").replace(be.ctrlCharactersRegex,"").replace(be.whitespaceEscapeCharsRegex,"").trim(),r=X0(r),t=r.match(be.ctrlCharactersRegex)||r.match(be.htmlEntitiesRegex)||r.match(be.htmlCtrlEntityRegex)||r.match(be.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return be.BLANK_URL;if(W$(i))return i;var n=i.trimStart(),o=n.match(be.urlSchemeRegex);if(!o)return i;var s=o[0].toLowerCase().trim();if(be.invalidProtocolRegex.test(s))return be.BLANK_URL;var a=n.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return a;if(s==="http:"||s==="https:"){if(!H$(a))return be.BLANK_URL;var l=new URL(a);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return a}var $2=typeof global=="object"&&global&&global.Object===Object&&global,Y$=typeof self=="object"&&self&&self.Object===Object&&self,Kr=$2||Y$||Function("return this")(),sh=Kr.Symbol,I2=Object.prototype,V$=I2.hasOwnProperty,G$=I2.toString,_s=sh?sh.toStringTag:void 0;function X$(e){var t=V$.call(e,_s),r=e[_s];try{e[_s]=void 0;var i=!0}catch{}var n=G$.call(e);return i&&(t?e[_s]=r:delete e[_s]),n}var Q$=Object.prototype,Z$=Q$.toString;function K$(e){return Z$.call(e)}var J$="[object Null]",t4="[object Undefined]",Q0=sh?sh.toStringTag:void 0;function os(e){return e==null?e===void 0?t4:J$:Q0&&Q0 in Object(e)?X$(e):K$(e)}function Dn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var e4="[object AsyncFunction]",r4="[object Function]",i4="[object GeneratorFunction]",n4="[object Proxy]";function Vg(e){if(!Dn(e))return!1;var t=os(e);return t==r4||t==i4||t==e4||t==n4}var od=Kr["__core-js_shared__"],Z0=function(){var e=/[^.]+$/.exec(od&&od.keys&&od.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function o4(e){return!!Z0&&Z0 in e}var s4=Function.prototype,a4=s4.toString;function Nn(e){if(e!=null){try{return a4.call(e)}catch{}try{return e+""}catch{}}return""}var l4=/[\\^$.*+?()[\]{}|]/g,c4=/^\[object .+?Constructor\]$/,h4=Function.prototype,u4=Object.prototype,d4=h4.toString,f4=u4.hasOwnProperty,p4=RegExp("^"+d4.call(f4).replace(l4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g4(e){if(!Dn(e)||o4(e))return!1;var t=Vg(e)?p4:c4;return t.test(Nn(e))}function m4(e,t){return e==null?void 0:e[t]}function zn(e,t){var r=m4(e,t);return g4(r)?r:void 0}var Da=zn(Object,"create");function y4(){this.__data__=Da?Da(null):{},this.size=0}function x4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var C4="__lodash_hash_undefined__",b4=Object.prototype,k4=b4.hasOwnProperty;function v4(e){var t=this.__data__;if(Da){var r=t[e];return r===C4?void 0:r}return k4.call(t,e)?t[e]:void 0}var w4=Object.prototype,S4=w4.hasOwnProperty;function T4(e){var t=this.__data__;return Da?t[e]!==void 0:S4.call(t,e)}var _4="__lodash_hash_undefined__";function B4(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Da&&t===void 0?_4:t,this}function Fn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Fn.prototype.clear=y4;Fn.prototype.delete=x4;Fn.prototype.get=v4;Fn.prototype.has=T4;Fn.prototype.set=B4;function L4(){this.__data__=[],this.size=0}function Qh(e,t){return e===t||e!==e&&t!==t}function Zh(e,t){for(var r=e.length;r--;)if(Qh(e[r][0],t))return r;return-1}var E4=Array.prototype,A4=E4.splice;function F4(e){var t=this.__data__,r=Zh(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():A4.call(t,r,1),--this.size,!0}function M4(e){var t=this.__data__,r=Zh(t,e);return r<0?void 0:t[r][1]}function $4(e){return Zh(this.__data__,e)>-1}function I4(e,t){var r=this.__data__,i=Zh(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ki(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ki.prototype.clear=L4;ki.prototype.delete=F4;ki.prototype.get=M4;ki.prototype.has=$4;ki.prototype.set=I4;var Na=zn(Kr,"Map");function P4(){this.size=0,this.__data__={hash:new Fn,map:new(Na||ki),string:new Fn}}function O4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kh(e,t){var r=e.__data__;return O4(t)?r[typeof t=="string"?"string":"hash"]:r.map}function R4(e){var t=Kh(this,e).delete(e);return this.size-=t?1:0,t}function D4(e){return Kh(this,e).get(e)}function N4(e){return Kh(this,e).has(e)}function z4(e,t){var r=Kh(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function tn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}tn.prototype.clear=P4;tn.prototype.delete=R4;tn.prototype.get=D4;tn.prototype.has=N4;tn.prototype.set=z4;var q4="Expected a function";function tl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(q4);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=e.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(tl.Cache||tn),r}tl.Cache=tn;function W4(){this.__data__=new ki,this.size=0}function j4(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function H4(e){return this.__data__.get(e)}function U4(e){return this.__data__.has(e)}var Y4=200;function V4(e,t){var r=this.__data__;if(r instanceof ki){var i=r.__data__;if(!Na||i.length<Y4-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new tn(i)}return r.set(e,t),this.size=r.size,this}function ss(e){var t=this.__data__=new ki(e);this.size=t.size}ss.prototype.clear=W4;ss.prototype.delete=j4;ss.prototype.get=H4;ss.prototype.has=U4;ss.prototype.set=V4;var ah=function(){try{var e=zn(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Gg(e,t,r){t=="__proto__"&&ah?ah(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qf(e,t,r){(r!==void 0&&!Qh(e[t],r)||r===void 0&&!(t in e))&&Gg(e,t,r)}function G4(e){return function(t,r,i){for(var n=-1,o=Object(t),s=i(t),a=s.length;a--;){var l=s[++n];if(r(o[l],l,o)===!1)break}return t}}var X4=G4(),P2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K0=P2&&typeof module=="object"&&module&&!module.nodeType&&module,Q4=K0&&K0.exports===P2,J0=Q4?Kr.Buffer:void 0,tx=J0?J0.allocUnsafe:void 0;function Z4(e,t){if(t)return e.slice();var r=e.length,i=tx?tx(r):new e.constructor(r);return e.copy(i),i}var ex=Kr.Uint8Array;function K4(e){var t=new e.constructor(e.byteLength);return new ex(t).set(new ex(e)),t}function J4(e,t){var r=t?K4(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tI(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var rx=Object.create,eI=function(){function e(){}return function(t){if(!Dn(t))return{};if(rx)return rx(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function O2(e,t){return function(r){return e(t(r))}}var R2=O2(Object.getPrototypeOf,Object),rI=Object.prototype;function Jh(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||rI;return e===r}function iI(e){return typeof e.constructor=="function"&&!Jh(e)?eI(R2(e)):{}}function el(e){return e!=null&&typeof e=="object"}var nI="[object Arguments]";function ix(e){return el(e)&&os(e)==nI}var D2=Object.prototype,oI=D2.hasOwnProperty,sI=D2.propertyIsEnumerable,lh=ix(function(){return arguments}())?ix:function(e){return el(e)&&oI.call(e,"callee")&&!sI.call(e,"callee")},ch=Array.isArray,aI=9007199254740991;function N2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aI}function tu(e){return e!=null&&N2(e.length)&&!Vg(e)}function lI(e){return el(e)&&tu(e)}function cI(){return!1}var z2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nx=z2&&typeof module=="object"&&module&&!module.nodeType&&module,hI=nx&&nx.exports===z2,ox=hI?Kr.Buffer:void 0,uI=ox?ox.isBuffer:void 0,Xg=uI||cI,dI="[object Object]",fI=Function.prototype,pI=Object.prototype,q2=fI.toString,gI=pI.hasOwnProperty,mI=q2.call(Object);function yI(e){if(!el(e)||os(e)!=dI)return!1;var t=R2(e);if(t===null)return!0;var r=gI.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&q2.call(r)==mI}var xI="[object Arguments]",CI="[object Array]",bI="[object Boolean]",kI="[object Date]",vI="[object Error]",wI="[object Function]",SI="[object Map]",TI="[object Number]",_I="[object Object]",BI="[object RegExp]",LI="[object Set]",EI="[object String]",AI="[object WeakMap]",FI="[object ArrayBuffer]",MI="[object DataView]",$I="[object Float32Array]",II="[object Float64Array]",PI="[object Int8Array]",OI="[object Int16Array]",RI="[object Int32Array]",DI="[object Uint8Array]",NI="[object Uint8ClampedArray]",zI="[object Uint16Array]",qI="[object Uint32Array]",Ot={};Ot[$I]=Ot[II]=Ot[PI]=Ot[OI]=Ot[RI]=Ot[DI]=Ot[NI]=Ot[zI]=Ot[qI]=!0;Ot[xI]=Ot[CI]=Ot[FI]=Ot[bI]=Ot[MI]=Ot[kI]=Ot[vI]=Ot[wI]=Ot[SI]=Ot[TI]=Ot[_I]=Ot[BI]=Ot[LI]=Ot[EI]=Ot[AI]=!1;function WI(e){return el(e)&&N2(e.length)&&!!Ot[os(e)]}function jI(e){return function(t){return e(t)}}var W2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,aa=W2&&typeof module=="object"&&module&&!module.nodeType&&module,HI=aa&&aa.exports===W2,sd=HI&&$2.process,sx=function(){try{var e=aa&&aa.require&&aa.require("util").types;return e||sd&&sd.binding&&sd.binding("util")}catch{}}(),ax=sx&&sx.isTypedArray,Qg=ax?jI(ax):WI;function Zf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var UI=Object.prototype,YI=UI.hasOwnProperty;function VI(e,t,r){var i=e[t];(!(YI.call(e,t)&&Qh(i,r))||r===void 0&&!(t in e))&&Gg(e,t,r)}function GI(e,t,r,i){var n=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=void 0;l===void 0&&(l=e[a]),n?Gg(r,a,l):VI(r,a,l)}return r}function XI(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var QI=9007199254740991,ZI=/^(?:0|[1-9]\d*)$/;function j2(e,t){var r=typeof e;return t=t??QI,!!t&&(r=="number"||r!="symbol"&&ZI.test(e))&&e>-1&&e%1==0&&e<t}var KI=Object.prototype,JI=KI.hasOwnProperty;function tP(e,t){var r=ch(e),i=!r&&lh(e),n=!r&&!i&&Xg(e),o=!r&&!i&&!n&&Qg(e),s=r||i||n||o,a=s?XI(e.length,String):[],l=a.length;for(var c in e)(t||JI.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||j2(c,l)))&&a.push(c);return a}function eP(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var rP=Object.prototype,iP=rP.hasOwnProperty;function nP(e){if(!Dn(e))return eP(e);var t=Jh(e),r=[];for(var i in e)i=="constructor"&&(t||!iP.call(e,i))||r.push(i);return r}function H2(e){return tu(e)?tP(e,!0):nP(e)}function oP(e){return GI(e,H2(e))}function sP(e,t,r,i,n,o,s){var a=Zf(e,r),l=Zf(t,r),c=s.get(l);if(c){Qf(e,r,c);return}var h=o?o(a,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var f=ch(l),d=!f&&Xg(l),p=!f&&!d&&Qg(l);h=l,f||d||p?ch(a)?h=a:lI(a)?h=tI(a):d?(u=!1,h=Z4(l,!0)):p?(u=!1,h=J4(l,!0)):h=[]:yI(l)||lh(l)?(h=a,lh(a)?h=oP(a):(!Dn(a)||Vg(a))&&(h=iI(l))):u=!1}u&&(s.set(l,h),n(h,l,i,o,s),s.delete(l)),Qf(e,r,h)}function U2(e,t,r,i,n){e!==t&&X4(t,function(o,s){if(n||(n=new ss),Dn(o))sP(e,t,s,r,U2,i,n);else{var a=i?i(Zf(e,s),o,s+"",e,t,n):void 0;a===void 0&&(a=o),Qf(e,s,a)}},H2)}function Y2(e){return e}function aP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var lx=Math.max;function lP(e,t,r){return t=lx(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,o=lx(i.length-t,0),s=Array(o);++n<o;)s[n]=i[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=i[n];return a[t]=r(s),aP(e,this,a)}}function cP(e){return function(){return e}}var hP=ah?function(e,t){return ah(e,"toString",{configurable:!0,enumerable:!1,value:cP(t),writable:!0})}:Y2,uP=800,dP=16,fP=Date.now;function pP(e){var t=0,r=0;return function(){var i=fP(),n=dP-(i-r);if(r=i,n>0){if(++t>=uP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var gP=pP(hP);function mP(e,t){return gP(lP(e,t,Y2),e+"")}function yP(e,t,r){if(!Dn(r))return!1;var i=typeof t;return(i=="number"?tu(r)&&j2(t,r.length):i=="string"&&t in r)?Qh(r[t],e):!1}function xP(e){return mP(function(t,r){var i=-1,n=r.length,o=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(n--,o):void 0,s&&yP(r[0],r[1],s)&&(o=n<3?void 0:o,n=1),t=Object(t);++i<n;){var a=r[i];a&&e(t,a,i,o)}return t})}var CP=xP(function(e,t,r){U2(e,t,r)}),bP="",kP={curveBasis:If,curveBasisClosed:SM,curveBasisOpen:TM,curveBumpX:Fk,curveBumpY:Mk,curveBundle:_M,curveCardinalClosed:BM,curveCardinalOpen:LM,curveCardinal:Ok,curveCatmullRomClosed:EM,curveCatmullRomOpen:AM,curveCatmullRom:Dk,curveLinear:sa,curveLinearClosed:FM,curveMonotoneX:Hk,curveMonotoneY:Uk,curveNatural:Vk,curveStep:Gk,curveStepAfter:Qk,curveStepBefore:Xk},vP=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wP=C(function(e,t){const r=V2(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(a=>a.args);zc(s),i=ee(i,[...s])}else i=r.args;if(!i)return;let n=kg(e,t);const o="config";return i[o]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[o],delete i[o]),i},"detectInit"),V2=C(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${vP.source})(?=[}][%]{2}).*
|
|
214
|
-
`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),U.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const s=[];for(;(o=na.exec(e))!==null;)if(o.index===na.lastIndex&&na.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const a=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;s.push({type:a,args:l})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(n){return U.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),SP=C(function(e){return e.replace(na,"")},"removeDirectives"),TP=C(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Zg(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return kP[r]??t}C(Zg,"interpolateToCurve");function G2(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?q$(r):r}C(G2,"formatUrl");var _P=C((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let o=window;for(let s=0;s<i;s++)if(o=o[r[s]],!o){U.error(`Function name: ${e} not found in window`);return}o[n](...t)},"runFunc");function Kg(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}C(Kg,"distance");function X2(e){let t,r=0;e.forEach(n=>{r+=Kg(n,t),t=n});const i=r/2;return Jg(e,i)}C(X2,"traverseEdge");function Q2(e){return e.length===1?e[0]:X2(e)}C(Q2,"calcLabelPosition");var cx=C((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Jg=C((e,t)=>{let r,i=t;for(const n of e){if(r){const o=Kg(n,r);if(o===0)return r;if(o<i)i-=o;else{const s=i/o;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:cx((1-s)*r.x+s*n.x,5),y:cx((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),BP=C((e,t,r)=>{U.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Jg(t,25),o=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(s)*o+(t[0].x+n.x)/2,a.y=-Math.cos(s)*o+(t[0].y+n.y)/2,a},"calcCardinalityPosition");function Z2(e,t,r){const i=structuredClone(r);U.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,o=Jg(i,n),s=10+e*.5,a=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(a+Math.PI)*s+(i[0].x+o.x)/2,l.y=-Math.cos(a+Math.PI)*s+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(a-Math.PI)*s+(i[0].x+o.x)/2-5,l.y=-Math.cos(a-Math.PI)*s+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(a)*s+(i[0].x+o.x)/2-5,l.y=-Math.cos(a)*s+(i[0].y+o.y)/2-5):(l.x=Math.sin(a)*s+(i[0].x+o.x)/2,l.y=-Math.cos(a)*s+(i[0].y+o.y)/2),l}C(Z2,"calcTerminalLabelPosition");function K2(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}C(K2,"getStylesFromArray");var hx=0,LP=C(()=>(hx++,"id-"+Math.random().toString(36).substr(2,12)+"-"+hx),"generateId");function J2(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}C(J2,"makeRandomHex");var EP=C(e=>J2(e.length),"random"),AP=C(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"),FP=C(function(e,t){const r=t.text.replace(Qa.lineBreakRegex," "),[,i]=eu(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const o=n.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),n},"drawSimpleText"),MP=tl((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Qa.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let o="";return i.forEach((s,a)=>{const l=xi(`${s} `,r),c=xi(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=$P(s,t,"-",r);n.push(o,...f),o=d}else c+l>=t?(n.push(o),o=s):o=[o,s].filter(Boolean).join(" ");a+1===i.length&&n.push(o)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),$P=tl((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],o=[];let s="";return n.forEach((a,l)=>{const c=`${s}${a}`;if(xi(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;o.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:o,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function tw(e,t){return tm(e,t).height}C(tw,"calculateTextHeight");function xi(e,t){return tm(e,t).width}C(xi,"calculateTextWidth");var tm=tl((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,o]=eu(r),s=["sans-serif",i],a=e.split(Qa.lineBreakRegex),l=[],c=xt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let d=0;const p={width:0,height:0,lineHeight:0};for(const g of a){const x=AP();x.text=g||bP;const m=FP(h,x).style("font-size",o).style("font-weight",n).style("font-family",f),y=(m._groups||m)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,y.width)),d=Math.round(y.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}l.push(p)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),zo,IP=(zo=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},C(zo,"InitIDGenerator"),zo),Il,PP=C(function(e){return Il=Il||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Il.innerHTML=e,unescape(Il.textContent)},"entityDecode");function em(e){return"str"in e}C(em,"isDetailedError");var OP=C((e,t,r,i)=>{var o;if(!i)return;const n=(o=e.node())==null?void 0:o.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),eu=C(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function rm(e,t){return CP({},e,t)}C(rm,"cleanAndMerge");var Tr={assignWithDepth:ee,wrapLabel:MP,calculateTextHeight:tw,calculateTextWidth:xi,calculateTextDimensions:tm,cleanAndMerge:rm,detectInit:wP,detectDirective:V2,isSubstringInArray:TP,interpolateToCurve:Zg,calcLabelPosition:Q2,calcCardinalityPosition:BP,calcTerminalLabelPosition:Z2,formatUrl:G2,getStylesFromArray:K2,generateId:LP,random:EP,runFunc:_P,entityDecode:PP,insertTitle:OP,isLabelCoordinateInPath:ew,parseFontSize:eu,InitIDGenerator:IP},RP=C(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Mn=C(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),O7=C((e,t,{counter:r=0,prefix:i,suffix:n},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function le(e){return e??null}C(le,"handleUndefinedAttr");function ew(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return n.includes(r.toString())||n.includes(i.toString())}C(ew,"isLabelCoordinateInPath");var im=C(({flowchart:e})=>{var n,o;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function rw(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(o=>{function s(){if(n.style.display="flex",n.style.flexDirection="column",i){const a=St().fontSize?St().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Hb.fontSize]=eu(a),h=c*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";o(n)}C(s,"setupImage"),setTimeout(()=>{n.complete&&s()}),n.addEventListener("error",s),n.addEventListener("load",s)})))}C(rw,"configureLabelImages");var DP=C(e=>{const{handDrawnSeed:t}=St();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),as=C(e=>{const t=NP([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),NP=C(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),iw=C(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),it=C(e=>{const{stylesArray:t}=as(e),r=[],i=[],n=[],o=[];return t.forEach(s=>{const a=s[0];iw(a)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),a.includes("stroke")&&n.push(s.join(":")+" !important"),a==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:o}},"styles2String"),rt=C((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=St(),{nodeBorder:n,mainBkg:o}=r,{stylesMap:s}=as(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:((l=s.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:zP(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),zP=C(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const qP=Object.freeze({left:0,top:0,width:16,height:16}),hh=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nw=Object.freeze({...qP,...hh}),WP=Object.freeze({...nw,body:"",hidden:!1}),jP=Object.freeze({width:null,height:null}),HP=Object.freeze({...jP,...hh}),UP=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const a=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:a};return ad(c)?c:null}const o=n[0],s=o.split("-");if(s.length>1){const a={provider:i,prefix:s.shift(),name:s.join("-")};return ad(a)?a:null}if(r&&i===""){const a={provider:i,prefix:"",name:o};return ad(a,r)?a:null}return null},ad=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function YP(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function ux(e,t){const r=YP(e,t);for(const i in WP)i in hh?i in e&&!(i in r)&&(r[i]=hh[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function VP(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function o(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const a=i[s]&&i[s].parent,l=a&&o(a);l&&(n[s]=[a].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),n}function dx(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let o={};function s(a){o=ux(i[a]||n[a],o)}return s(t),r.forEach(s),ux(e,o)}function GP(e,t){if(e.icons[t])return dx(e,t,[]);const r=VP(e,[t])[t];return r?dx(e,t,r):null}const XP=/(-?[0-9.]*[0-9]+[0-9.]*)/g,QP=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fx(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(XP);if(i===null||!i.length)return e;const n=[];let o=i.shift(),s=QP.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?n.push(o):n.push(Math.ceil(a*t*r)/r)}else n.push(o);if(o=i.shift(),o===void 0)return n.join("");s=!s}}function ZP(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),o=e.indexOf("</"+t);if(n===-1||o===-1)break;const s=e.indexOf(">",o);if(s===-1)break;r+=e.slice(n+1,o).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function KP(e,t){return e?"<defs>"+e+"</defs>"+t:t}function JP(e,t,r){const i=ZP(e);return KP(i.defs,t+i.content+r)}const tO=e=>e==="unset"||e==="undefined"||e==="none";function eO(e,t){const r={...nw,...e},i={...HP,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(g=>{const x=[],m=g.hFlip,y=g.vFlip;let b=g.rotate;m?y?b+=2:(x.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),x.push("scale(-1 1)"),n.top=n.left=0):y&&(x.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),x.push("scale(1 -1)"),n.top=n.left=0);let v;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:v=n.height/2+n.top,x.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:x.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,x.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}b%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),x.length&&(o=JP(o,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=i.width,a=i.height,l=n.width,c=n.height;let h,u;s===null?(u=a===null?"1em":a==="auto"?c:a,h=fx(u,l/c)):(h=s==="auto"?l:s,u=a===null?fx(h,c/l):a==="auto"?c:a);const f={},d=(g,x)=>{tO(x)||(f[g]=x.toString())};d("width",h),d("height",u);const p=[n.left,n.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const rO=/\sid="(\S+)"/g,px=new Map;function iO(e){e=e.replace(/[0-9]+$/,"")||"a";const t=px.get(e)||0;return px.set(e,t+1),t?`${e}${t}`:e}function nO(e){const t=[];let r;for(;r=rO.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const o=iO(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function oO(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function nm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qn=nm();function ow(e){qn=e}var la={exec:()=>null};function Tt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Ee.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var sO=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ee={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},aO=/^(?:[ \t]*(?:\n|$))+/,lO=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,om=/(?:[*+-]|\d{1,9}[.)])/,sw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,aw=Tt(sw).replace(/bull/g,om).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(),uO=Tt(sw).replace(/bull/g,om).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(),sm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dO=/^[^\n]+/,am=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,fO=Tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",am).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pO=Tt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,om).getRegex(),ru="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",lm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gO=Tt("^ {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",lm).replace("tag",ru).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lw=Tt(sm).replace("hr",rl).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",ru).getRegex(),mO=Tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lw).getRegex(),cm={blockquote:mO,code:lO,def:fO,fences:cO,heading:hO,hr:rl,html:gO,lheading:aw,list:pO,newline:aO,paragraph:lw,table:la,text:dO},gx=Tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rl).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",ru).getRegex(),yO={...cm,lheading:uO,table:gx,paragraph:Tt(sm).replace("hr",rl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gx).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",ru).getRegex()},xO={...cm,html:Tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lm).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:la,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tt(sm).replace("hr",rl).replace("heading",` *#{1,6} *[^
|
|
215
|
-
]`).replace("lheading",aw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},CO=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cw=/^( {2,}|\\)\n(?!\s*$)/,kO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,iu=/[\p{P}\p{S}]/u,hm=/[\s\p{P}\p{S}]/u,hw=/[^\s\p{P}\p{S}]/u,vO=Tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,hm).getRegex(),uw=/(?!~)[\p{P}\p{S}]/u,wO=/(?!~)[\s\p{P}\p{S}]/u,SO=/(?:[^\s\p{P}\p{S}]|~)/u,TO=Tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",sO?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dw=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_O=Tt(dw,"u").replace(/punct/g,iu).getRegex(),BO=Tt(dw,"u").replace(/punct/g,uw).getRegex(),fw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",LO=Tt(fw,"gu").replace(/notPunctSpace/g,hw).replace(/punctSpace/g,hm).replace(/punct/g,iu).getRegex(),EO=Tt(fw,"gu").replace(/notPunctSpace/g,SO).replace(/punctSpace/g,wO).replace(/punct/g,uw).getRegex(),AO=Tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hw).replace(/punctSpace/g,hm).replace(/punct/g,iu).getRegex(),FO=Tt(/\\(punct)/,"gu").replace(/punct/g,iu).getRegex(),MO=Tt(/^<(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(),$O=Tt(lm).replace("(?:-->|$)","-->").getRegex(),IO=Tt("^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",$O).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),uh=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,PO=Tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",uh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pw=Tt(/^!?\[(label)\]\[(ref)\]/).replace("label",uh).replace("ref",am).getRegex(),gw=Tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",am).getRegex(),OO=Tt("reflink|nolink(?!\\()","g").replace("reflink",pw).replace("nolink",gw).getRegex(),mx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,um={_backpedal:la,anyPunctuation:FO,autolink:MO,blockSkip:TO,br:cw,code:bO,del:la,emStrongLDelim:_O,emStrongRDelimAst:LO,emStrongRDelimUnd:AO,escape:CO,link:PO,nolink:gw,punctuation:vO,reflink:pw,reflinkSearch:OO,tag:IO,text:kO,url:la},RO={...um,link:Tt(/^!?\[(label)\]\((.*?)\)/).replace("label",uh).getRegex(),reflink:Tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",uh).getRegex()},Kf={...um,emStrongRDelimAst:EO,emStrongLDelim:BO,url:Tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",mx).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:Tt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",mx).getRegex()},DO={...Kf,br:Tt(cw).replace("{2,}","*").getRegex(),text:Tt(Kf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pl={normal:cm,gfm:yO,pedantic:xO},Bs={normal:um,gfm:Kf,breaks:DO,pedantic:RO},NO={"&":"&","<":"<",">":">",'"':""","'":"'"},yx=e=>NO[e];function Dr(e,t){if(t){if(Ee.escapeTest.test(e))return e.replace(Ee.escapeReplace,yx)}else if(Ee.escapeTestNoEncode.test(e))return e.replace(Ee.escapeReplaceNoEncode,yx);return e}function xx(e){try{e=encodeURI(e).replace(Ee.percentDecode,"%")}catch{return null}return e}function Cx(e,t){var o;let r=e.replace(Ee.findPipe,(s,a,l)=>{let c=!1,h=a;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Ee.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ee.slashPipe,"|");return i}function Ls(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function zO(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function bx(e,t,r,i,n){let o=t.href,s=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function qO(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
|
216
|
-
`).map(o=>{let s=o.match(r.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=n.length?o.slice(n.length):o}).join(`
|
|
217
|
-
`)}var dh=class{constructor(t){lt(this,"options");lt(this,"rules");lt(this,"lexer");this.options=t||qn}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ls(i,`
|
|
218
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=qO(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=Ls(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ls(r[0],`
|
|
219
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ls(r[0],`
|
|
220
|
-
`).split(`
|
|
221
|
-
`),n="",o="",s=[];for(;i.length>0;){let a=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),a=!0;else if(!a)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
222
|
-
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
223
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
224
|
-
${h}`:h,o=o?`${o}
|
|
225
|
-
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,i.length===0)break;let d=s.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let p=d,g=p.raw+`
|
|
226
|
-
`+i.join(`
|
|
227
|
-
`),x=this.blockquote(g);s[s.length-1]=x,n=n.substring(0,n.length-p.raw.length)+x.raw,o=o.substring(0,o.length-p.text.length)+x.text;break}else if((d==null?void 0:d.type)==="list"){let p=d,g=p.raw+`
|
|
228
|
-
`+i.join(`
|
|
229
|
-
`),x=this.list(g);s[s.length-1]=x,n=n.substring(0,n.length-d.raw.length)+x.raw,o=o.substring(0,o.length-p.raw.length)+x.raw,i=g.substring(s.at(-1).raw.length).split(`
|
|
230
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,o={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),a=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
231
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),d=t.split(`
|
|
232
|
-
`,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):p?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=r[1].length),p&&this.rules.other.blankLine.test(d)&&(h+=d+`
|
|
233
|
-
`,t=t.substring(d.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),v=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){let w=t.split(`
|
|
234
|
-
`,1)[0],T;if(d=w,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),T=d):T=d.replace(this.rules.other.tabCharGlobal," "),v.test(d)||S.test(d)||_.test(d)||y.test(d)||b.test(d))break;if(T.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
|
|
235
|
-
`+T.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||S.test(f)||b.test(f))break;u+=`
|
|
236
|
-
`+d}!p&&!d.trim()&&(p=!0),h+=w+`
|
|
237
|
-
`,t=t.substring(w.length+1),f=T.slice(g)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0));let x=null,m;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(m=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!x,checked:m,loose:!1,text:u,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=u}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:o}}}table(t){var a;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Cx(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(a=r[3])!=null&&a.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
238
|
-
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<i.length;l++)s.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:s.align[l]});for(let l of o)s.rows.push(Cx(l,s.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[h]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
239
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=Ls(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=zO(r[2],"()");if(s===-2)return;if(s>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let n=r[2],o="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],o=s[3])}else o=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),bx(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[n.toLowerCase()];if(!o){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return bx(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...n[0]].length-1,s,a,l=o,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){l+=a;continue}else if((n[5]||n[6])&&o%3&&!((o+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let u=[...n[0]][0].length,f=t.slice(0,o+n.index+u+a);if(Math.min(o,a)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,o;if(r[2]==="@")n=r[0],o="mailto:"+n;else{let s;do s=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(s!==r[0]);n=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},vr=class Jf{constructor(t){lt(this,"tokens");lt(this,"options");lt(this,"state");lt(this,"tokenizer");lt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qn,this.options.tokenizer=this.options.tokenizer||new dh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ee,block:Pl.normal,inline:Bs.normal};this.options.pedantic?(r.block=Pl.pedantic,r.inline=Bs.pedantic):this.options.gfm&&(r.block=Pl.gfm,this.options.breaks?r.inline=Bs.breaks:r.inline=Bs.gfm),this.tokenizer.rules=r}static get rules(){return{block:Pl,inline:Bs}}static lex(t,r){return new Jf(r).lex(t)}static lexInline(t,r){return new Jf(r).inlineTokens(t)}lex(t){t=t.replace(Ee.carriageReturn,`
|
|
240
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,o,s;for(this.options.pedantic&&(t=t.replace(Ee.tabCharGlobal," ").replace(Ee.spaceLine,""));t;){let a;if((o=(n=this.options.extensions)==null?void 0:n.block)!=null&&o.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=r.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
|
|
241
|
-
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
242
|
-
`)?"":`
|
|
243
|
-
`)+a.raw,c.text+=`
|
|
244
|
-
`+a.text,this.inlineQueue.at(-1).src=c.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
245
|
-
`)?"":`
|
|
246
|
-
`)+a.raw,c.text+=`
|
|
247
|
-
`+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if((s=this.options.extensions)!=null&&s.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
248
|
-
`)?"":`
|
|
249
|
-
`)+a.raw,c.text+=`
|
|
250
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(a),i=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
251
|
-
`)?"":`
|
|
252
|
-
`)+a.raw,c.text+=`
|
|
253
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,f;let i=t,n=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=n[2]?n[2].length:0,i=i.slice(0,n.index+o)+"["+"a".repeat(n[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let s=!1,a="";for(;t;){s||(a=""),s=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,a)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let p=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,x=t.slice(1),m;this.options.extensions.startInline.forEach(y=>{m=y.call({lexer:this},x),typeof m=="number"&&m>=0&&(g=Math.min(g,m))}),g<1/0&&g>=0&&(p=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(p)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),s=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},fh=class{constructor(t){lt(this,"options");lt(this,"parser");this.options=t||qn}space(t){return""}code({text:t,lang:r,escaped:i}){var s;let n=(s=(r||"").match(Ee.notSpaceStart))==null?void 0:s[0],o=t.replace(Ee.endingNewline,"")+`
|
|
254
|
-
`;return n?'<pre><code class="language-'+Dr(n)+'">'+(i?o:Dr(o,!0))+`</code></pre>
|
|
255
|
-
`:"<pre><code>"+(i?o:Dr(o,!0))+`</code></pre>
|
|
256
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
257
|
-
${this.parser.parse(t)}</blockquote>
|
|
258
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
259
|
-
`}hr(t){return`<hr>
|
|
260
|
-
`}list(t){let r=t.ordered,i=t.start,n="";for(let a=0;a<t.items.length;a++){let l=t.items[a];n+=this.listitem(l)}let o=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+o+s+`>
|
|
261
|
-
`+n+"</"+o+`>
|
|
262
|
-
`}listitem(t){var i;let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Dr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
263
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
264
|
-
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let n="";for(let o=0;o<t.rows.length;o++){let s=t.rows[o];i="";for(let a=0;a<s.length;a++)i+=this.tablecell(s[a]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
265
|
-
<thead>
|
|
266
|
-
`+r+`</thead>
|
|
267
|
-
`+n+`</table>
|
|
268
|
-
`}tablerow({text:t}){return`<tr>
|
|
269
|
-
${t}</tr>
|
|
270
|
-
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
271
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Dr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),o=xx(t);if(o===null)return n;t=o;let s='<a href="'+t+'"';return r&&(s+=' title="'+Dr(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let o=xx(t);if(o===null)return Dr(i);t=o;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${Dr(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Dr(t.text)}},dm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},wr=class tp{constructor(t){lt(this,"options");lt(this,"renderer");lt(this,"textRenderer");this.options=t||qn,this.options.renderer=this.options.renderer||new fh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dm}static parse(t,r){return new tp(r).parse(t)}static parseInline(t,r){return new tp(r).parseInline(t)}parse(t,r=!0){var n,o;let i="";for(let s=0;s<t.length;s++){let a=t[s];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[a.type]){let c=a,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=a;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],h+=`
|
|
272
|
-
`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var n,o;let i="";for(let s=0;s<t.length;s++){let a=t[s];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=c||"";continue}}let l=a;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Wl,Us=(Wl=class{constructor(t){lt(this,"options");lt(this,"block");this.options=t||qn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?vr.lex:vr.lexInline}provideParser(){return this.block?wr.parse:wr.parseInline}},lt(Wl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),lt(Wl,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Wl),WO=class{constructor(...t){lt(this,"defaults",nm());lt(this,"options",this.setOptions);lt(this,"parse",this.parseMarkdown(!0));lt(this,"parseInline",this.parseMarkdown(!1));lt(this,"Parser",wr);lt(this,"Renderer",fh);lt(this,"TextRenderer",dm);lt(this,"Lexer",vr);lt(this,"Tokenizer",dh);lt(this,"Hooks",Us);this.use(...t)}walkTokens(t,r){var n,o;let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let a=s;for(let l of a.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of a.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let a=s;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=s;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let s=r.renderers[o.name];s?r.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[o.level];s?s.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),n.extensions=r),i.renderer){let o=this.defaults.renderer||new fh(this.defaults);for(let s in i.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=i.renderer[a],c=o[a];o[a]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u||""}}n.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new dh(this.defaults);for(let s in i.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=i.tokenizer[a],c=o[a];o[a]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}n.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Us;for(let s in i.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=i.hooks[a],c=o[a];Us.passThroughHooks.has(s)?o[a]=h=>{if(this.defaults.async&&Us.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let u=l.call(o,h);return c.call(o,u)}:o[a]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}n.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),o&&(l=l.concat(o.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return vr.lex(t,r??this.defaults)}parser(t,r){return wr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let a=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?vr.lex:vr.lexInline)(a,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?wr.parse:wr.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(s);try{o.hooks&&(r=o.hooks.preprocess(r));let a=(o.hooks?o.hooks.provideLexer():t?vr.lex:vr.lexInline)(r,o);o.hooks&&(a=o.hooks.processAllTokens(a)),o.walkTokens&&this.walkTokens(a,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?wr.parse:wr.parseInline)(a,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(a){return s(a)}}}onError(t,r){return i=>{if(i.message+=`
|
|
273
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Dr(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},$n=new WO;function Bt(e,t){return $n.parse(e,t)}Bt.options=Bt.setOptions=function(e){return $n.setOptions(e),Bt.defaults=$n.defaults,ow(Bt.defaults),Bt};Bt.getDefaults=nm;Bt.defaults=qn;Bt.use=function(...e){return $n.use(...e),Bt.defaults=$n.defaults,ow(Bt.defaults),Bt};Bt.walkTokens=function(e,t){return $n.walkTokens(e,t)};Bt.parseInline=$n.parseInline;Bt.Parser=wr;Bt.parser=wr.parse;Bt.Renderer=fh;Bt.TextRenderer=dm;Bt.Lexer=vr;Bt.lexer=vr.lex;Bt.Tokenizer=dh;Bt.Hooks=Us;Bt.parse=Bt;Bt.options;Bt.setOptions;Bt.use;Bt.walkTokens;Bt.parseInline;wr.parse;vr.lex;function mw(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(a,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):a},[]);if(n.length){var o=new RegExp(`
|
|
274
|
-
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(a){return a.replace(o,`
|
|
275
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(a,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=a;typeof a=="string"&&a.includes(`
|
|
276
|
-
`)&&(u=String(a).split(`
|
|
277
|
-
`).map(function(f,d){return d===0?f:""+h+f}).join(`
|
|
278
|
-
`)),s+=u+i[l+1]}),s}var jO={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},ep=new Map,yw=new Map,HO=C(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(U.debug("Registering icon pack:",t.name),"loader"in t)yw.set(t.name,t.loader);else if("icons"in t)ep.set(t.name,t.icons);else throw U.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),xw=C(async(e,t)=>{const r=UP(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=ep.get(i);if(!n){const s=yw.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},ep.set(i,n)}catch(a){throw U.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=GP(n,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),UO=C(async e=>{try{return await xw(e),!0}catch{return!1}},"isIconAvailable"),il=C(async(e,t,r)=>{let i;try{i=await xw(e,t==null?void 0:t.fallbackPrefix)}catch(s){U.error(s),i=jO}const n=eO(i,t),o=oO(nO(n.body),{...n.attributes,...r});return Fr(o,Wt())},"getIconSVG");function Cw(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
279
|
-
`).replace(/\n{2,}/g,`
|
|
280
|
-
`);return mw(i)}C(Cw,"preprocessMarkdown");function bw(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}C(bw,"nonMarkdownToLines");function kw(e,t={}){const r=Cw(e,t),i=Bt.lexer(r),n=[[]];let o=0;function s(a,l="normal"){a.type==="text"?a.text.split(`
|
|
281
|
-
`).forEach((h,u)=>{u!==0&&(o++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[o].push({content:f,type:l})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{s(c,a.type)}):a.type==="html"&&n[o].push({content:a.text,type:"normal"})}return C(s,"processNode"),i.forEach(a=>{var l;a.type==="paragraph"?(l=a.tokens)==null||l.forEach(c=>{s(c)}):a.type==="html"?n[o].push({content:a.text,type:"normal"}):n[o].push({content:a.raw,type:"normal"})}),n}C(kw,"markdownToLines");function vw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}C(vw,"nonMarkdownToHTML");function ww(e,{markdownAutoWrap:t}={}){const r=Bt.lexer(e);function i(n){var o,s,a;return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(o=n.tokens)==null?void 0:o.map(i).join("")}</strong>`:n.type==="em"?`<em>${(s=n.tokens)==null?void 0:s.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(a=n.tokens)==null?void 0:a.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(U.warn(`Unsupported markdown: ${n.type}`),n.raw)}return C(i,"output"),r.map(i).join("")}C(ww,"markdownToHTML");function Sw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}C(Sw,"splitTextToChars");function Tw(e,t){const r=Sw(t.content);return fm(e,[],r,t.type)}C(Tw,"splitWordToFitWidth");function fm(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...o]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?fm(e,s,o,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}C(fm,"splitWordToFitWidthRecursion");function _w(e,t){if(e.some(({content:r})=>r.includes(`
|
|
282
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ph(e,t)}C(_w,"splitLineToFitWidth");function ph(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(o),t(s))return ph(e,t,r,s);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[a,l]=Tw(t,o);r.push([a]),l.content&&e.unshift(l)}return ph(e,t,r)}C(ph,"splitLineToFitWidthRecursion");function rp(e,t){t&&e.attr("style",t)}C(rp,"applyStyle");var kx=16384;async function Bw(e,t,r,i,n=!1,o=Wt()){const s=e.append("foreignObject");s.attr("width",`${Math.min(10*r,kx)}px`),s.attr("height",`${Math.min(10*r,kx)}px`);const a=s.append("xhtml:div"),l=Ea(t.label)?await Jb(t.label.replace(Qa.lineBreakRegex,`
|
|
283
|
-
`),o):Fr(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=a.append("span");h.html(l),rp(h,t.labelStyle),h.attr("class",`${c} ${i}`),rp(a,t.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(a.style("max-width",r+"px"),a.style("text-align","center")),a.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&a.attr("class","labelBkg");let u=a.node().getBoundingClientRect();return u.width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),u=a.node().getBoundingClientRect()),s.node()}C(Bw,"addHtmlSpan");function nu(e,t,r,i=!1){const n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}C(nu,"createTspan");function Lw(e,t,r){const i=e.append("text"),n=nu(i,1,t);ou(n,r);const o=n.node().getComputedTextLength();return i.remove(),o}C(Lw,"computeWidthOfText");function YO(e,t,r){var s;const i=e.append("text"),n=nu(i,1,t);ou(n,[{content:r,type:"normal"}]);const o=(s=n.node())==null?void 0:s.getBoundingClientRect();return o&&i.remove(),o}C(YO,"computeDimensionOfText");function Ew(e,t,r,i=!1,n=!1){const s=t.append("g"),a=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=C(d=>Lw(s,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:_w(h,u);for(const d of f){const p=nu(l,c,1.1,n);ou(p,d),c++}}if(i){const h=l.node().getBBox(),u=2;return a.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),s.node()}else return l.node()}C(Ew,"createFormattedText");function ip(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}C(ip,"decodeHTMLEntities");function ou(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(ip(r.content)):n.text(" "+ip(r.content))})}C(ou,"updateTextContentAndStyles");async function Aw(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,o,s)=>(r.push((async()=>{const a=`${o}:${s}`;return await UO(a)?await il(a,void 0,{class:"label-icon"}):`<i class='${Fr(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}C(Aw,"replaceIconSubstring");var vi=C(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:o=!0,markdown:s=!0,isNode:a=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(U.debug("XYZ createText",t,r,i,n,o,a,"addSvgBackground: ",c),o){const u=s?ww(t,h):vw(t),f=await Aw(Mn(u),h),d=t.replace(/\\\\/g,"\\"),p={isNode:a,label:Ea(t)?d:f,labelStyle:r.replace("fill:","color:")};return await Bw(e,p,l,n,c,h)}else{const u=Mn(t.replace(/<br\s*\/?>/g,"<br/>")),f=s?kw(u.replace("<br>","<br/>"),h):bw(u),d=Ew(l,e,f,t?c:!1,!a);if(a){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(d).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");xt(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(d).select("text").attr("style",g)}return i?xt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):xt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ld(e,t,r){if(e&&e.length){const[i,n]=t,o=Math.PI/180*r,s=Math.cos(o),a=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*a+i,l[1]=(c-i)*a+(h-n)*s+n}}}function VO(e,t){return e[0]===t[0]&&e[1]===t[1]}function GO(e,t,r,i=1){const n=r,o=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(n)for(const c of s)ld(c,a,n);const l=function(c,h,u){const f=[];for(const y of c){const b=[...y];VO(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&f.push(b)}const d=[];h=Math.max(h,.1);const p=[];for(const y of f)for(let b=0;b<y.length-1;b++){const v=y[b],S=y[b+1];if(v[1]!==S[1]){const _=Math.min(v[1],S[1]);p.push({ymin:_,ymax:Math.max(v[1],S[1]),x:_===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(p.sort((y,b)=>y.ymin<b.ymin?-1:y.ymin>b.ymin?1:y.x<b.x?-1:y.x>b.x?1:y.ymax===b.ymax?0:(y.ymax-b.ymax)/Math.abs(y.ymax-b.ymax)),!p.length)return d;let g=[],x=p[0].ymin,m=0;for(;g.length||p.length;){if(p.length){let y=-1;for(let b=0;b<p.length&&!(p[b].ymin>x);b++)y=b;p.splice(0,y+1).forEach(b=>{g.push({s:x,edge:b})})}if(g=g.filter(y=>!(y.edge.ymax<=x)),g.sort((y,b)=>y.edge.x===b.edge.x?0:(y.edge.x-b.edge.x)/Math.abs(y.edge.x-b.edge.x)),(u!==1||m%h==0)&&g.length>1)for(let y=0;y<g.length;y+=2){const b=y+1;if(b>=g.length)break;const v=g[y].edge,S=g[b].edge;d.push([[Math.round(v.x),x],[Math.round(S.x),x]])}x+=u,g.forEach(y=>{y.edge.x=y.edge.x+u*y.edge.islope}),m++}return d}(s,o,i);if(n){for(const c of s)ld(c,a,-n);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),ld(f,h,u)})(l,a,-n)}return l}function nl(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=n),GO(e,n,i,o||1)}class pm{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=nl(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function su(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class XO extends pm{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=nl(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,s=[],a=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of n)su([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class QO extends pm{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,n);return i.ops=i.ops.concat(o.ops),i}}class ZO{constructor(t){this.helper=t}fillPolygons(t,r){const i=nl(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const s=n/4;for(const a of t){const l=su(a),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let p=0;p<h;p++){const g=d+u+p*n,x=f-s+2*Math.random()*s,m=g-s+2*Math.random()*s,y=this.helper.ellipse(x,m,o,o,r);i.push(...y.ops)}}return{type:"fillSketch",ops:i}}}class KO{constructor(t){this.helper=t}fillPolygons(t,r){const i=nl(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(s=>{const a=su(s),l=Math.floor(a/(i+n)),c=(a+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const p=d*(i+n),g=p+i,x=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(x[0],x[1],m[0],m[1],r))}}),o}}class JO{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,o=nl(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(o,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach(o=>{const s=su(o),a=Math.round(s/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*r,d=2*(u+1)*r,p=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],m=[g[0]+p*Math.cos(h+Math.PI/4),g[1]+p*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],m[0],m[1],i),...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i))}}),n}}const Re={};class tR{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const eR=0,cd=1,vx=2,Ol={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 hd(e,t){return e.type===t}function gm(e){const t=[],r=function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:eR,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:cd,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:vx,text:""},a}(e);let i="BOD",n=0,o=r[n];for(;!hd(o,vx);){let s=0;const a=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return gm("M0,0"+e);n++,s=Ol[o.text],i=o.text}else hd(o,cd)?s=Ol[i]:(n++,s=Ol[o.text],i=o.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!hd(c,cd))throw new Error("Param not a number: "+i+","+c.text);a[a.length]=+c.text}if(typeof Ol[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:a};t.push(l),n+=s,o=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Fw(e){let t=0,r=0,i=0,n=0;const o=[];for(const{key:s,data:a}of e)switch(s){case"M":o.push({key:"M",data:[...a]}),[t,r]=a,[i,n]=a;break;case"m":t+=a[0],r+=a[1],o.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":o.push({key:"L",data:[...a]}),[t,r]=a;break;case"l":t+=a[0],r+=a[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...a]}),t=a[4],r=a[5];break;case"c":{const l=a.map((c,h)=>h%2?c+r:c+t);o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),t=a[2],r=a[3];break;case"q":{const l=a.map((c,h)=>h%2?c+r:c+t);o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...a]}),t=a[5],r=a[6];break;case"a":t+=a[5],r+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,r]});break;case"H":o.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...a]}),t=a[2],r=a[3];break;case"s":{const l=a.map((c,h)=>h%2?c+r:c+t);o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...a]}),t=a[0],r=a[1];break;case"t":t+=a[0],r+=a[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=n}return o}function Mw(e){const t=[];let r="",i=0,n=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[o,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],a=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-a),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,p=0;r==="Q"||r==="T"?(d=i+(i-a),p=n+(n-l)):(d=i,p=n);const g=i+2*(d-i)/3,x=n+2*(p-n)/3,m=u+2*(d-u)/3,y=f+2*(p-f)/3;t.push({key:"C",data:[g,x,m,y,u,f]}),a=d,l=p,i=u,n=f;break}case"Q":{const[u,f,d,p]=h,g=i+2*(u-i)/3,x=n+2*(f-n)/3,m=d+2*(u-d)/3,y=p+2*(f-p)/3;t.push({key:"C",data:[g,x,m,y,d,p]}),a=u,l=f,i=d,n=p;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],p=h[3],g=h[4],x=h[5],m=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,x,m,x,m]}),i=x,n=m):(i!==x||n!==m)&&($w(i,n,x,m,u,f,d,p,g).forEach(function(y){t.push({key:"C",data:y})}),i=x,n=m);break}case"Z":t.push({key:"Z",data:[]}),i=o,n=s}r=c}return t}function Es(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function $w(e,t,r,i,n,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],d=0,p=0,g=0,x=0;if(c)[d,p,g,x]=c;else{[e,t]=Es(e,t,-h),[r,i]=Es(r,i,-h);const j=(e-r)/2,P=(t-i)/2;let I=j*j/(n*n)+P*P/(o*o);I>1&&(I=Math.sqrt(I),n*=I,o*=I);const $=n*n,O=o*o,B=$*O-$*P*P-O*j*j,z=$*P*P+O*j*j,W=(a===l?-1:1)*Math.sqrt(Math.abs(B/z));g=W*n*P/o+(e+r)/2,x=W*-o*j/n+(t+i)/2,d=Math.asin(parseFloat(((t-x)/o).toFixed(9))),p=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let m=p-d;if(Math.abs(m)>120*Math.PI/180){const j=p,P=r,I=i;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=$w(r=g+n*Math.cos(p),i=x+o*Math.sin(p),P,I,n,o,s,0,l,[p,j,g,x])}m=p-d;const y=Math.cos(d),b=Math.sin(d),v=Math.cos(p),S=Math.sin(p),_=Math.tan(m/4),w=4/3*n*_,T=4/3*o*_,D=[e,t],A=[e+w*b,t-T*y],F=[r+w*S,i-T*v],V=[r,i];if(A[0]=2*D[0]-A[0],A[1]=2*D[1]-A[1],c)return[A,F,V].concat(f);{f=[A,F,V].concat(f);const j=[];for(let P=0;P<f.length;P+=3){const I=Es(f[P][0],f[P][1],h),$=Es(f[P+1][0],f[P+1][1],h),O=Es(f[P+2][0],f[P+2][1],h);j.push([I[0],I[1],$[0],$[1],O[0],O[1]])}return j}}const rR={randOffset:function(e,t){return dt(e,t)},randOffsetWithRange:function(e,t,r){return gh(e,t,r)},ellipse:function(e,t,r,i,n){const o=Pw(r,i,n);return np(e,t,n,o).opset},doubleLineOps:function(e,t,r,i,n){return Xi(e,t,r,i,n,!0)}};function Iw(e,t,r,i,n){return{type:"path",ops:Xi(e,t,r,i,n)}}function cc(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let o=0;o<i-1;o++)n.push(...Xi(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&n.push(...Xi(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Iw(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function iR(e,t,r,i,n){return function(o,s){return cc(o,!0,s)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function wx(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Rl(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Rl(r[0],1.5*(1+.22*t.roughness),_x(t));for(let o=1;o<r.length;o++){const s=r[o];if(s.length){const a=Rl(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Rl(s,1.5*(1+.22*t.roughness),_x(t));for(const c of a)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Pw(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/n;let s=Math.abs(e/2),a=Math.abs(t/2);const l=1-r.curveFitting;return s+=dt(s*l,r),a+=dt(a*l,r),{increment:o,rx:s,ry:a}}function np(e,t,r,i){const[n,o]=Bx(i.increment,e,t,i.rx,i.ry,1,i.increment*gh(.1,gh(.4,1,r),r),r);let s=mh(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[a]=Bx(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=mh(a,null,r);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function Sx(e,t,r,i,n,o,s,a,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=dt(.01*u,l),f+=dt(.01*f,l);let d=n,p=o;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,x=Math.min(g/2,(p-d)/2),m=Lx(x,c,h,u,f,d,p,1,l);if(!l.disableMultiStroke){const y=Lx(x,c,h,u,f,d,p,1.5,l);m.push(...y)}return s&&(a?m.push(...Xi(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Xi(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l)):m.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:m}}function Tx(e,t){const r=Mw(Fw(gm(e))),i=[];let n=[0,0],o=[0,0];for(const{key:s,data:a}of r)switch(s){case"M":o=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...Xi(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,d]=a;i.push(...nR(l,c,h,u,f,d,o,t)),o=[f,d];break}case"Z":i.push(...Xi(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]]}return{type:"path",ops:i}}function ud(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+dt(n,t),i[0][1]+dt(n,t)]});for(let s=1;s<o;s++)r.push({op:"lineTo",data:[i[s][0]+dt(n,t),i[s][1]+dt(n,t)]})}}return{type:"fillPath",ops:r}}function Qn(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!Re[n])switch(n){case"zigzag":Re[n]||(Re[n]=new XO(i));break;case"cross-hatch":Re[n]||(Re[n]=new QO(i));break;case"dots":Re[n]||(Re[n]=new ZO(i));break;case"dashed":Re[n]||(Re[n]=new KO(i));break;case"zigzag-line":Re[n]||(Re[n]=new JO(i));break;default:n="hachure",Re[n]||(Re[n]=new pm(i))}return Re[n]}(t,rR).fillPolygons(e,t)}function _x(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ow(e){return e.randomizer||(e.randomizer=new tR(e.seed||0)),e.randomizer.next()}function gh(e,t,r,i=1){return r.roughness*i*(Ow(r)*(t-e)+e)}function dt(e,t,r=1){return gh(-e,e,t,r)}function Xi(e,t,r,i,n,o=!1){const s=o?n.disableMultiStrokeFill:n.disableMultiStroke,a=op(e,t,r,i,n,!0,!1);if(s)return a;const l=op(e,t,r,i,n,!0,!0);return a.concat(l)}function op(e,t,r,i,n,o,s){const a=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*Ow(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,p=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=dt(d,n,c),p=dt(p,n,c);const g=[],x=()=>dt(u,n,c),m=()=>dt(h,n,c),y=n.preserveVertices;return s?g.push({op:"move",data:[e+(y?0:x()),t+(y?0:x())]}):g.push({op:"move",data:[e+(y?0:dt(h,n,c)),t+(y?0:dt(h,n,c))]}),s?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),p+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(y?0:x()),i+(y?0:x())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),p+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),p+t+2*(i-t)*f+m(),r+(y?0:m()),i+(y?0:m())]}),g}function Rl(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]),i.push([e[0][0]+dt(t,r),e[0][1]+dt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+dt(t,r),e[n][1]+dt(t,r)]),n===e.length-1&&i.push([e[n][0]+dt(t,r),e[n][1]+dt(t,r)]);return mh(i,null,r)}function mh(e,t,r){const i=e.length,n=[];if(i>3){const o=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<i;a++){const l=e[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*e[a+1][0]-s*e[a-1][0])/6,l[1]+(s*e[a+1][1]-s*e[a-1][1])/6],o[2]=[e[a+1][0]+(s*e[a][0]-s*e[a+2][0])/6,e[a+1][1]+(s*e[a][1]-s*e[a+2][1])/6],o[3]=[e[a+1][0],e[a+1][1]],n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...op(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Bx(e,t,r,i,n,o,s,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=dt(.5,a)-Math.PI/2;c.push([dt(o,a)+t+.9*i*Math.cos(h-e),dt(o,a)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[dt(o,a)+t+i*Math.cos(f),dt(o,a)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([dt(o,a)+t+i*Math.cos(h+2*Math.PI+.5*s),dt(o,a)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([dt(o,a)+t+.98*i*Math.cos(h+s),dt(o,a)+r+.98*n*Math.sin(h+s)]),c.push([dt(o,a)+t+.9*i*Math.cos(h+.5*s),dt(o,a)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function Lx(e,t,r,i,n,o,s,a,l){const c=o+dt(.1,l),h=[];h.push([dt(a,l)+t+.9*i*Math.cos(c-e),dt(a,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([dt(a,l)+t+i*Math.cos(u),dt(a,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),mh(h,null,l)}function nR(e,t,r,i,n,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:dt(c[0],a)),s[1]+(f?0:dt(c[0],a))]}),h=f?[n,o]:[n+dt(c[d],a),o+dt(c[d],a)],l.push({op:"bcurveTo",data:[e+dt(c[d],a),t+dt(c[d],a),r+dt(c[d],a),i+dt(c[d],a),h[0],h[1]]});return l}function As(e){return[...e]}function Ex(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(As(e[0]),As(e[1]),As(e[2]),As(e[2]));else{const n=[];n.push(e[0],e[0]);for(let a=1;a<e.length;a++)n.push(e[a]),a===e.length-1&&n.push(e[a]);const o=[],s=1-t;i.push(As(n[0]));for(let a=1;a+2<n.length;a++){const l=n[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*n[a+1][0]-s*n[a-1][0])/6,l[1]+(s*n[a+1][1]-s*n[a-1][1])/6],o[2]=[n[a+1][0]+(s*n[a][0]-s*n[a+2][0])/6,n[a+1][1]+(s*n[a][1]-s*n[a+2][1])/6],o[3]=[n[a+1][0],n[a+1][1]],i.push(o[1],o[2],o[3])}}return i}function hc(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function oR(e,t,r){const i=hc(t,r);if(i===0)return hc(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),hc(e,cn(t,r,n))}function cn(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function sp(e,t,r,i){const n=i||[];if(function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let p=3*h[1]-2*c[1]-f[1];p*=p;let g=3*u[0]-2*f[0]-c[0];g*=g;let x=3*u[1]-2*f[1]-c[1];return x*=x,d<g&&(d=g),p<x&&(p=x),d+p}(e,t)<r){const a=e[t+0];n.length?(o=n[n.length-1],s=a,Math.sqrt(hc(o,s))>1&&n.push(a)):n.push(a),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=cn(l,c,.5),d=cn(c,h,.5),p=cn(h,u,.5),g=cn(f,d,.5),x=cn(d,p,.5),m=cn(g,x,.5);sp([l,f,g,m],0,r,n),sp([m,x,p,u],0,r,n)}var o,s;return n}function sR(e,t){return yh(e,0,e.length,t)}function yh(e,t,r,i,n){const o=n||[],s=e[t],a=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=oR(e[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(yh(e,t,c+1,i,o),yh(e,c,r,i,o)):(o.length||o.push(s),o.push(a)),o}function dd(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let o=0;o<n;o++)sp(e,3*o,t,i);return r&&r>0?yh(i,0,i.length,r):i}const Qe="none";class xh{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,o){const s=this._o(o);return this._d("line",[Iw(t,r,i,n,s)],s)}rectangle(t,r,i,n,o){const s=this._o(o),a=[],l=iR(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?a.push(ud([c],s)):a.push(Qn([c],s))}return s.stroke!==Qe&&a.push(l),this._d("rectangle",a,s)}ellipse(t,r,i,n,o){const s=this._o(o),a=[],l=Pw(i,n,s),c=np(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=np(t,r,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Qn([c.estimatedPoints],s));return s.stroke!==Qe&&a.push(c.opset),this._d("ellipse",a,s)}circle(t,r,i,n){const o=this.ellipse(t,r,i,i,n);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[cc(t,!1,i)],i)}arc(t,r,i,n,o,s,a=!1,l){const c=this._o(l),h=[],u=Sx(t,r,i,n,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Sx(t,r,i,n,o,s,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,p,g,x,m,y){const b=f,v=d;let S=Math.abs(p/2),_=Math.abs(g/2);S+=dt(.01*S,y),_+=dt(.01*_,y);let w=x,T=m;for(;w<0;)w+=2*Math.PI,T+=2*Math.PI;T-w>2*Math.PI&&(w=0,T=2*Math.PI);const D=(T-w)/y.curveStepCount,A=[];for(let F=w;F<=T;F+=D)A.push([b+S*Math.cos(F),v+_*Math.sin(F)]);return A.push([b+S*Math.cos(T),v+_*Math.sin(T)]),A.push([b,v]),Qn([A],y)}(t,r,i,n,o,s,c));return c.stroke!==Qe&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],o=wx(t,i);if(i.fill&&i.fill!==Qe)if(i.fillStyle==="solid"){const s=wx(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...dd(Ex([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...dd(Ex(c),10,(1+i.roughness)/2))}s.length&&n.push(Qn([s],i))}return i.stroke!==Qe&&n.push(o),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],o=cc(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ud([t],i)):n.push(Qn([t],i))),i.stroke!==Qe&&n.push(o),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Qe,s=i.stroke!==Qe,a=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=Mw(Fw(gm(h))),p=[];let g=[],x=[0,0],m=[];const y=()=>{m.length>=4&&g.push(...dd(m,u)),m=[]},b=()=>{y(),g.length&&(p.push(g),g=[])};for(const{key:S,data:_}of d)switch(S){case"M":b(),x=[_[0],_[1]],g.push(x);break;case"L":y(),g.push([_[0],_[1]]);break;case"C":if(!m.length){const w=g.length?g[g.length-1]:x;m.push([w[0],w[1]])}m.push([_[0],_[1]]),m.push([_[2],_[3]]),m.push([_[4],_[5]]);break;case"Z":y(),g.push([x[0],x[1]])}if(b(),!f)return p;const v=[];for(const S of p){const _=sR(S,f);_.length&&v.push(_)}return v}(t,1,a?4-4*(i.simplification||1):(1+i.roughness)/2),c=Tx(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Tx(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ud(l,i));else n.push(Qn(l,i));return s&&(a?l.forEach(h=>{n.push(cc(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const o=typeof r=="number"&&r>=0?n.data.map(s=>+s.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const o of r){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Qe};break;case"fillPath":s={d:this.opsToPath(o),stroke:Qe,strokeWidth:0,fill:i.fill||Qe};break;case"fillSketch":s=this.fillSketch(o,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Qe,strokeWidth:i,fill:Qe}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class aR{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new xh(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,o,a),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const o of r.ops){const s=typeof i=="number"&&i>=0?o.data.map(a=>+a.toFixed(i)):o.data;switch(o.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,o){const s=this.gen.line(t,r,i,n,o);return this.draw(s),s}rectangle(t,r,i,n,o){const s=this.gen.rectangle(t,r,i,n,o);return this.draw(s),s}ellipse(t,r,i,n,o){const s=this.gen.ellipse(t,r,i,n,o);return this.draw(s),s}circle(t,r,i,n){const o=this.gen.circle(t,r,i,n);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,o,s,a=!1,l){const c=this.gen.arc(t,r,i,n,o,s,a,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Dl="http://www.w3.org/2000/svg";class lR{constructor(t,r){this.svg=t,this.gen=new xh(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(Dl,"g"),s=t.options.fixedDecimalPlaceDigits;for(const a of r){let l=null;switch(a.type){case"path":l=n.createElementNS(Dl,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(Dl,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,a,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const o=t.createElementNS(Dl,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,o){const s=this.gen.line(t,r,i,n,o);return this.draw(s)}rectangle(t,r,i,n,o){const s=this.gen.rectangle(t,r,i,n,o);return this.draw(s)}ellipse(t,r,i,n,o){const s=this.gen.ellipse(t,r,i,n,o);return this.draw(s)}circle(t,r,i,n){const o=this.gen.circle(t,r,i,n);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,o,s,a=!1,l){const c=this.gen.arc(t,r,i,n,o,s,a,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var tt={canvas:(e,t)=>new aR(e,t),svg:(e,t)=>new lR(e,t),generator:e=>new xh(e),newSeed:()=>xh.newSeed()},ut=C(async(e,t,r)=>{var d,p;let i;const n=t.useHtmlLabels||bi((d=St())==null?void 0:d.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",le(t.labelStyle));let a;t.label===void 0?a="":a=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await vi(s,Fr(Mn(a),St()),{useHtmlLabels:n,width:t.width||((p=St().flowchart)==null?void 0:p.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},St());let u=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(n){const g=h.children[0],x=xt(h);await rw(g,a),u=g.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height)}return n?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:f,label:s}},"labelHelper"),fd=C(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??$e(St()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await vi(n,Fr(Mn(t),St()),{useHtmlLabels:i,width:r.width||((c=(l=St())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=o.getBBox();const a=r.padding/2;if($e(St())){const h=o.children[0],u=xt(o);s=h.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:a,label:n}},"insertLabel"),nt=C((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ht=C((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function kt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}C(kt,"createPathFromPoints");function Qi(e,t,r,i,n,o){const s=[],l=r-e,c=i-t,h=l/o,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const p=d/50,g=e+p*l,x=f+n*Math.sin(u*(g-e));s.push({x:g,y:x})}return s}C(Qi,"generateFullSineWavePoints");function za(e,t,r,i,n,o){const s=[],a=n*Math.PI/180,h=(o*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);s.push({x:-d,y:-p})}return s}C(za,"generateCirclePoints");function ap(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const n=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),s=C((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(n){const l={fill:s(n,"fill"),"fill-opacity":s(n,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:s(o,"stroke"),"stroke-width":s(o,"stroke-width")??"1","stroke-opacity":s(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const a=document.createElementNS("http://www.w3.org/2000/svg","g");return a.appendChild(r),a}C(ap,"mergePaths");var cR=C((e,t)=>{var r=e.x,i=e.y,n=t.x-r,o=t.y-i,s=e.width/2,a=e.height/2,l,c;return Math.abs(o)*s>Math.abs(n)*a?(o<0&&(a=-a),l=o===0?0:a*n/o,c=a):(n<0&&(s=-s),l=s,c=n===0?0:s*o/n),{x:r+l,y:i+c}},"intersectRect"),ls=cR,hR=C(async(e,t,r,i=!1,n=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const s=St(),a=$e(s);return await vi(e,o,{style:r,isTitle:i,useHtmlLabels:a,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),$i=hR,en=C((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Rw=C(async(e,t)=>{U.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=$e(r),d=u.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await vi(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await $i(d,t.label,t.labelStyle||"",!1,!0);let g=p.getBBox();if($e(r)){const w=p.children[0],T=xt(p);g=w.getBoundingClientRect(),T.attr("width",g.width),T.attr("height",g.height)}const x=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,y=t.x-x/2,b=t.y-m/2;U.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const w=tt.svg(u),T=rt(t,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:n}),D=w.path(en(y,b,x,m,0),T);v=u.insert(()=>(U.debug("Rough node insert CXC",D),D),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",b).attr("width",x).attr("height",m);const{subGraphTitleTopMargin:S}=im(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),a){const w=d.select("span");w&&w.attr("style",a)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(w){return ls(t,w)},{cluster:u,labelBBox:g}},"rect"),uR=C((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,o=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(a){return ls(t,a)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),dR=C(async(e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:a,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=await $i(u,t.label,t.labelStyle,void 0,!0);let p=d.getBBox();if($e(r)){const D=d.children[0],A=xt(d);p=D.getBoundingClientRect(),A.attr("width",p.width),A.attr("height",p.height)}const g=0*t.padding,x=g/2,m=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+g;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height+g,b=t.height+g-p.height-6,v=t.x-m/2,S=t.y-y/2;t.width=m;const _=t.y-t.height/2-x+p.height+2;let w;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),A=tt.svg(c),F=t.rx||t.ry?A.path(en(v,S,m,y,10),{roughness:.7,fill:a,fillStyle:"solid",stroke:l,seed:n}):A.rectangle(v,S,m,y,{seed:n});w=c.insert(()=>F,":first-child");const V=A.rectangle(v,_,m,b,{fill:D?o:s,fillStyle:D?"hachure":"solid",stroke:l,seed:n});w=c.insert(()=>F,":first-child"),f=c.insert(()=>V)}else w=h.insert("rect",":first-child"),w.attr("class","outer").attr("x",v).attr("y",S).attr("width",m).attr("height",y).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",m).attr("height",b);u.attr("transform",`translate(${t.x-p.width/2}, ${S+1-($e(r)?0:3)})`);const T=w.node().getBBox();return t.height=T.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(D){return ls(t,D)},{cluster:c,labelBBox:p}},"roundedWithTitle"),fR=C(async(e,t)=>{U.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=$e(r),d=u.insert("g").attr("class","cluster-label "),p=await vi(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=p.getBBox();if($e(r)){const w=p.children[0],T=xt(p);g=w.getBoundingClientRect(),T.attr("width",g.width),T.attr("height",g.height)}const x=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,y=t.x-x/2,b=t.y-m/2;U.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const w=tt.svg(u),T=rt(t,{roughness:.7,fill:o,stroke:s,fillWeight:4,seed:n}),D=w.path(en(y,b,x,m,t.rx),T);v=u.insert(()=>(U.debug("Rough node insert CXC",D),D),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",b).attr("width",x).attr("height",m);const{subGraphTitleTopMargin:S}=im(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),a){const w=d.select("span");w&&w.attr("style",a)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(w){return ls(t,w)},{cluster:u,labelBBox:g}},"kanbanSection"),pR=C((e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:o}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),a=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const x=tt.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:n});d=s.insert(()=>x,":first-child")}else{d=a.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=d.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return ls(t,g)},{cluster:s,labelBBox:{}}},"divider"),gR=Rw,mR={rect:Rw,squareRect:gR,roundedWithTitle:dR,noteGroup:uR,divider:pR,kanbanSection:fR},Dw=new Map,yR=C(async(e,t)=>{const r=t.shape||"rect",i=await mR[r](e,t);return Dw.set(t.id,i),i},"insertCluster"),W7=C(()=>{Dw=new Map},"clear");function Nw(e,t){return e.intersect(t)}C(Nw,"intersectNode");var xR=Nw;function zw(e,t,r,i){var n=e.x,o=e.y,s=n-i.x,a=o-i.y,l=Math.sqrt(t*t*a*a+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*a/l);return i.y<o&&(h=-h),{x:n+c,y:o+h}}C(zw,"intersectEllipse");var qw=zw;function Ww(e,t,r){return qw(e,t,t,r)}C(Ww,"intersectCircle");var CR=Ww;function jw(e,t,r,i){{const n=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n*r.x+o*r.y+s,l=n*i.x+o*i.y+s,c=1e-6;if(a!==0&&l!==0&&lp(a,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,p=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(p)<c&&lp(d,p))return;const g=n*u-h*o;if(g===0)return;const x=Math.abs(g/2);let m=o*f-u*s;const y=m<0?(m-x)/g:(m+x)/g;m=h*s-n*f;const b=m<0?(m-x)/g:(m+x)/g;return{x:y,y:b}}}C(jw,"intersectLine");function lp(e,t){return e*t>0}C(lp,"sameSign");var bR=jw;function Hw(e,t,r){let i=e.x,n=e.y,o=[],s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),a=Math.min(a,h.y)}):(s=Math.min(s,t.x),a=Math.min(a,t.y));let l=i-e.width/2-s,c=n-e.height/2-a;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=bR(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&o.push(d)}return o.length?(o.length>1&&o.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,p=Math.sqrt(f*f+d*d),g=u.x-r.x,x=u.y-r.y,m=Math.sqrt(g*g+x*x);return p<m?-1:p===m?0:1}),o[0]):e}C(Hw,"intersectPolygon");var kR=Hw,K={node:xR,circle:CR,ellipse:qw,polygon:kR,rect:ls};function Uw(e,t){const{labelStyles:r}=it(t);t.labelStyle=r;const i=ht(t);let n=i;i||(n="anchor");const o=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:a}=t,l=tt.svg(o),c=rt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=o.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",le(a)),nt(t,u),t.intersect=function(f){return U.info("Circle intersect",t,s,f),K.circle(t,s,f)},o}C(Uw,"anchor");function cp(e,t,r,i,n,o,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,p=f/o,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-g**2),m=l+x*o*Math.sin(h)*(s?-1:1),y=c-x*n*Math.cos(h)*(s?-1:1),b=Math.atan2((t-y)/o,(e-m)/n);let S=Math.atan2((i-y)/o,(r-m)/n)-b;s&&S<0&&(S+=2*Math.PI),!s&&S>0&&(S-=2*Math.PI);const _=[];for(let w=0;w<20;w++){const T=w/19,D=b+T*S,A=m+n*Math.cos(D),F=y+o*Math.sin(D);_.push({x:A,y:F})}return _}C(cp,"generateArcPoints");function Yw(e,t,r){const[i,n]=[t,r].sort((o,s)=>s-o);return n*(1-Math.sqrt(1-(e/i/2)**2))}C(Yw,"calculateArcSagitta");async function Vw(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n,a=C(D=>D+s,"calcTotalHeight"),l=C(D=>{const A=D/2;return[A/(2.5+D/50),A]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=a(t!=null&&t.height?t==null?void 0:t.height:h.height),[f,d]=l(u),p=Yw(u,f,d),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+p-p,m=u,{cssStyles:y}=t,b=[{x:x/2,y:-m/2},{x:-x/2,y:-m/2},...cp(-x/2,-m/2,-x/2,m/2,f,d,!1),{x:x/2,y:m/2},...cp(x/2,m/2,x/2,-m/2,f,d,!0)],v=tt.svg(c),S=rt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=kt(b),w=v.path(_,S),T=c.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${f/2}, 0)`),nt(t,T),t.intersect=function(D){return K.polygon(t,b,D)},c}C(Vw,"bowTieRect");function wi(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}C(wi,"insertPolygonShape");var Nl=12;async function Gw(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?28:n,s=t.look==="neo"?24:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+Nl),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?s*2:s),u=0,f=c,d=-h,p=0,g=[{x:u+Nl,y:d},{x:f,y:d},{x:f,y:p},{x:u,y:p},{x:u,y:d+Nl},{x:u+Nl,y:d}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=tt.svg(a),b=rt(t,{}),v=kt(g),S=y.path(v,b);x=a.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),m&&x.attr("style",m)}else x=wi(a,c,h,g);return i&&x.attr("style",i),nt(t,x),t.intersect=function(y){return K.polygon(t,g,y)},a}C(Gw,"card");function Xw(e,t){const{nodeStyles:r}=it(t);t.label="";const i=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],a=tt.svg(i),l=rt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=kt(s),h=a.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return K.polygon(t,s,f)},i}C(Xw,"choice");async function mm(e,t,r){const{labelStyles:i,nodeStyles:n}=it(t);t.labelStyle=i;const{shapeSvg:o,bbox:s,halfPadding:a}=await ut(e,t,ht(t)),l=16,c=(r==null?void 0:r.padding)??a,h=t.look==="neo"?s.width/2+l*2:s.width/2+c;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(o),p=rt(t,{}),g=d.circle(0,0,h*2,p);u=o.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",le(f))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);return nt(t,u),t.calcIntersect=function(d,p){const g=d.width/2;return K.circle(d,g,p)},t.intersect=function(d){return U.info("Circle intersect",t,h,d),K.circle(t,h,d)},o}C(mm,"circle");function Qw(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},a={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${a.x},${a.y}
|
|
284
|
-
M ${n.x},${n.y} L ${s.x},${s.y}`}C(Qw,"createLine");function Zw(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,a=tt.svg(n),l=rt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=a.circle(0,0,o*2,l),h=Qw(o),u=a.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),nt(t,f),t.intersect=function(d){return U.info("crossedCircle intersect",t,{radius:o,point:d}),K.circle(t,o,d)},n}C(Zw,"crossedCircle");function ri(e,t,r,i=100,n=0,o=180){const s=[],a=n*Math.PI/180,h=(o*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);s.push({x:-d,y:-p})}return s}C(ri,"generateCirclePoints");async function Kw(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,label:s}=await ut(e,t,ht(t)),a=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+a,h=o.height+l,u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...ri(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...ri(c/2+u*2,-u,u,20,-180,-270),...ri(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...ri(c/2,h/2,u,20,0,90)],p=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...ri(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...ri(c/2+c*.1,-u,u,20,-180,-270),...ri(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...ri(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],g=tt.svg(n),x=rt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=kt(d).replace("Z",""),b=g.path(y,x),v=kt(p),S=g.path(v,{...x}),_=n.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>b,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-c/2+u-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),nt(t,_),t.intersect=function(w){return K.polygon(t,p,w)},n}C(Kw,"curlyBraceLeft");function ii(e,t,r,i=100,n=0,o=180){const s=[],a=n*Math.PI/180,h=(o*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);s.push({x:d,y:p})}return s}C(ii,"generateCirclePoints");async function Jw(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,label:s}=await ut(e,t,ht(t)),a=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?a*2:a),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...ii(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...ii(c/2+u*2,-u,u,20,-180,-270),...ii(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...ii(c/2,h/2,u,20,0,90)],p=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...ii(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...ii(c/2+u*2,-u,u,20,-180,-270),...ii(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...ii(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],g=tt.svg(n),x=rt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=kt(d).replace("Z",""),b=g.path(y,x),v=kt(p),S=g.path(v,{...x}),_=n.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>b,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),nt(t,_),t.intersect=function(w){return K.polygon(t,p,w)},n}C(Jw,"curlyBraceRight");function he(e,t,r,i=100,n=0,o=180){const s=[],a=n*Math.PI/180,h=(o*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);s.push({x:-d,y:-p})}return s}C(he,"generateCirclePoints");async function tS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,label:s}=await ut(e,t,ht(t)),a=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?a*2:a),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...he(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...he(c/2+u*2,-u,u,20,-180,-270),...he(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...he(c/2,h/2,u,20,0,90)],p=[...he(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...he(-c/2-u/2,-u,u,20,0,90),...he(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...he(-c/2+u+u/2,h/2,u,30,-180,-270)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...he(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...he(c/2+u*2,-u,u,20,-180,-270),...he(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...he(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...he(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...he(-c/2-u/2,-u,u,20,0,90),...he(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...he(-c/2+u+u/2,h/2,u,30,-180,-270)],x=tt.svg(n),m=rt(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),v=x.path(b,m),_=kt(p).replace("Z",""),w=x.path(_,m),T=kt(g),D=x.path(T,{...m}),A=n.insert("g",":first-child");return A.insert(()=>D,":first-child").attr("stroke-opacity",0),A.insert(()=>v,":first-child"),A.insert(()=>w,":first-child"),A.attr("class","text"),f&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),nt(t,A),t.intersect=function(F){return K.polygon(t,g,F)},n}C(tS,"curlyBraces");async function eS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n,a=20,l=5,{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=Math.max(a,(h.width+o*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,h.height+s*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:p}=t,g=tt.svg(c),x=rt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=u,y=f,b=m-d,v=y/4,S=[{x:b,y:0},{x:v,y:0},{x:0,y:y/2},{x:v,y},{x:b,y},...za(-b,-y/2,d,50,270,90)],_=kt(S),w=g.path(_,x),T=c.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(${-u/2}, ${-f/2})`),nt(t,T),t.intersect=function(D){return K.polygon(t,S,D)},c}C(eS,"curvedTrapezoid");var vR=C((e,t,r,i,n,o)=>[`M${e},${t+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),wR=C((e,t,r,i,n,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),SR=C((e,t,r,i,n,o)=>[`M${e-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ax=8,Fx=8;async function rS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?24:n,s=t.look==="neo"?24:n;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<Fx&&(t.width=Fx);const y=x/2/(2.5+x/50);t.height=(t.height??0)-o-y*3,t.height<Ax&&(t.height=Ax)}const{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t.width?t.width:l.width)+s,u=h/2,f=u/(2.5+h/50),d=(t.height?t.height:l.height)+o+f;let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=tt.svg(a),m=wR(0,0,h,d,u,f),y=SR(0,f,h,d,u,f),b=rt(t,{}),v=x.path(m,b),S=x.path(y,rt(t,{fill:"none"}));p=a.insert(()=>S,":first-child"),p=a.insert(()=>v,":first-child"),p.attr("class","basic label-container"),g&&p.attr("style",g)}else{const x=vR(0,0,h,d,u,f);p=a.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",le(g)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),nt(t,p),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(x){const m=K.rect(t,x),y=m.x-(t.x??0);if(u!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-f)){let b=f*f*(1-y*y/(u*u));b>0&&(b=Math.sqrt(b)),b=f-b,x.y-(t.y??0)>0&&(b=-b),m.y+=b}return m},a}C(rS,"cylinder");async function iS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=a.width+n,h=a.height+o,u=h*.2,f=-c/2,d=-h/2-u/2,{cssStyles:p}=t,g=tt.svg(s),x=rt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],y=g.polygon(m.map(v=>[v.x,v.y]),x),b=s.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(a.x-(a.left??0))}, ${d+u+(t.padding??0)/2-(a.y-(a.top??0))})`),nt(t,b),t.intersect=function(v){return K.rect(t,v)},s}C(iS,"dividedRectangle");async function nS(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=it(t),n=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(s??0),h=c-n;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=tt.svg(a),x=rt(t,{roughness:.2,strokeWidth:2.5}),m=rt(t,{roughness:.2,strokeWidth:1.5}),y=g.circle(0,0,c*2,x),b=g.circle(0,0,h*2,m);u=a.insert("g",":first-child"),u.attr("class",le(t.cssClasses)).attr("style",le(f)),(d=u.node())==null||d.appendChild(y),(p=u.node())==null||p.appendChild(b)}else{u=a.insert("g",":first-child");const g=u.insert("circle",":first-child"),x=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return nt(t,u),t.intersect=function(g){return U.info("DoubleCircle intersect",t,c,g),K.circle(t,c,g)},a}C(nS,"doublecircle");function oS(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=it(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),s=7,{cssStyles:a}=t,l=tt.svg(o),{nodeBorder:c}=r,h=rt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=o.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),nt(t,f),t.intersect=function(d){return U.info("filledCircle intersect",t,{radius:s,point:d}),K.circle(t,s,d)},o}C(oS,"filledCircle");var Mx=10,$x=10;async function sS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Mx&&(t.height=Mx),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<$x&&(t.width=$x));const{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:a.width)+(o??0),h=t!=null&&t.height?t==null?void 0:t.height:c+a.height,u=h,f=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,p=tt.svg(s),g=rt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=kt(f),m=p.path(x,g),y=s.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=c,t.height=h,nt(t,y),l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-h/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(b){return U.info("Triangle intersect",t,f,b),K.polygon(t,f,b)},s}C(sS,"flippedTriangle");function aS(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:o}=it(t);t.label="";const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:a}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=tt.svg(s),d=rt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(h,u,l,c,d),g=s.insert(()=>p,":first-child");a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),nt(t,g);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(m){return K.rect(t,m)},s}C(aS,"forkJoin");async function lS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=15,o=10,s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-a*2,t.height<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:l,bbox:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(n,c.width))+s*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,c.height))+a*2,f=u/2,{cssStyles:d}=t,p=tt.svg(l),g=rt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=[{x:-h/2,y:-u/2},{x:h/2-f,y:-u/2},...za(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},{x:-h/2,y:u/2}],m=kt(x),y=p.path(m,g),b=l.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),nt(t,b),t.intersect=function(v){return U.info("Pill intersect",t,{radius:f,point:v}),K.polygon(t,x,v)},l}C(lS,"halfRoundedRectangle");var TR=C((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function cS(e,t){const{labelStyles:r,nodeStyles:i}=it(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,s=70,a=32,l=t.look==="neo"?s:o,c=t.look==="neo"?a:o;if(t.width||t.height){const b=(t.height??0)/n;t.width=((t==null?void 0:t.width)??0)-2*b-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await ut(e,t,ht(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/n,p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,g=[{x:d,y:0},{x:p-d,y:0},{x:p,y:-f/2},{x:p-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let x;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=tt.svg(h),b=rt(t,{}),v=TR(0,0,p,f,d),S=y.path(v,b);x=h.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=wi(h,p,f,g);return i&&x.attr("style",i),t.width=p,t.height=f,nt(t,x),t.intersect=function(y){return K.polygon(t,g,y)},h}C(cS,"hexagon");async function hS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await ut(e,t,ht(t)),o=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:a}=t,l=tt.svg(n),c=rt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],u=kt(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),a&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-o/2}, ${-s/2})`),nt(t,d),t.intersect=function(p){return U.info("Pill intersect",t,{points:h}),K.polygon(t,h,p)},n}C(hS,"hourglass");async function uS(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=it(t);t.labelStyle=n;const o=t.assetHeight??48,s=t.assetWidth??48,a=Math.max(o,s),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=t.pos==="t",d=a,p=a,{nodeBorder:g}=r,{stylesMap:x}=as(t),m=-p/2,y=-d/2,b=t.label?8:0,v=tt.svg(c),S=rt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=v.rectangle(m,y,p,d,S),w=Math.max(p,h.width),T=d+h.height+b,D=v.rectangle(-w/2,-T/2,w,T,{...S,fill:"transparent",stroke:"none"}),A=c.insert(()=>_,":first-child"),F=c.insert(()=>D);if(t.icon){const V=c.append("g");V.html(`<g>${await il(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const j=V.node().getBBox(),P=j.width,I=j.height,$=j.x,O=j.y;V.attr("transform",`translate(${-P/2-$},${f?h.height/2+b/2-I/2-O:-h.height/2-b/2-I/2-O})`),V.attr("style",`color: ${x.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-T/2:T/2-h.height})`),A.attr("transform",`translate(0,${f?h.height/2+b/2:-h.height/2-b/2})`),nt(t,F),t.intersect=function(V){if(U.info("iconSquare intersect",t,V),!t.label)return K.rect(t,V);const j=t.x??0,P=t.y??0,I=t.height??0;let $=[];return f?$=[{x:j-h.width/2,y:P-I/2},{x:j+h.width/2,y:P-I/2},{x:j+h.width/2,y:P-I/2+h.height+b},{x:j+p/2,y:P-I/2+h.height+b},{x:j+p/2,y:P+I/2},{x:j-p/2,y:P+I/2},{x:j-p/2,y:P-I/2+h.height+b},{x:j-h.width/2,y:P-I/2+h.height+b}]:$=[{x:j-p/2,y:P-I/2},{x:j+p/2,y:P-I/2},{x:j+p/2,y:P-I/2+d},{x:j+h.width/2,y:P-I/2+d},{x:j+h.width/2/2,y:P+I/2},{x:j-h.width/2,y:P+I/2},{x:j-h.width/2,y:P-I/2+d},{x:j-p/2,y:P-I/2+d}],K.polygon(t,$,V)},c}C(uS,"icon");async function dS(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=it(t);t.labelStyle=n;const o=t.assetHeight??48,s=t.assetWidth??48,a=Math.max(o,s),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await ut(e,t,"icon-shape default"),f=20,d=t.label?8:0,p=t.pos==="t",{nodeBorder:g,mainBkg:x}=r,{stylesMap:m}=as(t),y=tt.svg(c),b=rt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const v=m.get("fill");b.stroke=v??x;const S=c.append("g");t.icon&&S.html(`<g>${await il(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),w=_.width,T=_.height,D=_.x,A=_.y,F=Math.max(w,T)*Math.SQRT2+f*2,V=y.circle(0,0,F,b),j=Math.max(F,h.width),P=F+h.height+d,I=y.rectangle(-j/2,-P/2,j,P,{...b,fill:"transparent",stroke:"none"}),$=c.insert(()=>V,":first-child"),O=c.insert(()=>I);return S.attr("transform",`translate(${-w/2-D},${p?h.height/2+d/2-T/2-A:-h.height/2-d/2-T/2-A})`),S.attr("style",`color: ${m.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-P/2:P/2-h.height})`),$.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),nt(t,O),t.intersect=function(B){return U.info("iconSquare intersect",t,B),K.rect(t,B)},c}C(dS,"iconCircle");async function fS(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=it(t);t.labelStyle=n;const o=t.assetHeight??48,s=t.assetWidth??48,a=Math.max(o,s),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:x,mainBkg:m}=r,{stylesMap:y}=as(t),b=-g/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),w=rt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=y.get("fill");w.stroke=T??m;const D=_.path(en(b,v,g,p,5),w),A=Math.max(g,h.width),F=p+h.height+S,V=_.rectangle(-A/2,-F/2,A,F,{...w,fill:"transparent",stroke:"none"}),j=c.insert(()=>D,":first-child").attr("class","icon-shape2"),P=c.insert(()=>V);if(t.icon){const I=c.append("g");I.html(`<g>${await il(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const $=I.node().getBBox(),O=$.width,B=$.height,z=$.x,W=$.y;I.attr("transform",`translate(${-O/2-z},${d?h.height/2+S/2-B/2-W:-h.height/2-S/2-B/2-W})`),I.attr("style",`color: ${y.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-F/2:F/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),nt(t,P),t.intersect=function(I){if(U.info("iconSquare intersect",t,I),!t.label)return K.rect(t,I);const $=t.x??0,O=t.y??0,B=t.height??0;let z=[];return d?z=[{x:$-h.width/2,y:O-B/2},{x:$+h.width/2,y:O-B/2},{x:$+h.width/2,y:O-B/2+h.height+S},{x:$+g/2,y:O-B/2+h.height+S},{x:$+g/2,y:O+B/2},{x:$-g/2,y:O+B/2},{x:$-g/2,y:O-B/2+h.height+S},{x:$-h.width/2,y:O-B/2+h.height+S}]:z=[{x:$-g/2,y:O-B/2},{x:$+g/2,y:O-B/2},{x:$+g/2,y:O-B/2+p},{x:$+h.width/2,y:O-B/2+p},{x:$+h.width/2/2,y:O+B/2},{x:$-h.width/2,y:O+B/2},{x:$-h.width/2,y:O-B/2+p},{x:$-g/2,y:O-B/2+p}],K.polygon(t,z,I)},c}C(fS,"iconRounded");async function pS(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=it(t);t.labelStyle=n;const o=t.assetHeight??48,s=t.assetWidth??48,a=Math.max(o,s),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ut(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:x,mainBkg:m}=r,{stylesMap:y}=as(t),b=-g/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),w=rt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=y.get("fill");w.stroke=T??m;const D=_.path(en(b,v,g,p,.1),w),A=Math.max(g,h.width),F=p+h.height+S,V=_.rectangle(-A/2,-F/2,A,F,{...w,fill:"transparent",stroke:"none"}),j=c.insert(()=>D,":first-child"),P=c.insert(()=>V);if(t.icon){const I=c.append("g");I.html(`<g>${await il(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const $=I.node().getBBox(),O=$.width,B=$.height,z=$.x,W=$.y;I.attr("transform",`translate(${-O/2-z},${d?h.height/2+S/2-B/2-W:-h.height/2-S/2-B/2-W})`),I.attr("style",`color: ${y.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-F/2:F/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),nt(t,P),t.intersect=function(I){if(U.info("iconSquare intersect",t,I),!t.label)return K.rect(t,I);const $=t.x??0,O=t.y??0,B=t.height??0;let z=[];return d?z=[{x:$-h.width/2,y:O-B/2},{x:$+h.width/2,y:O-B/2},{x:$+h.width/2,y:O-B/2+h.height+S},{x:$+g/2,y:O-B/2+h.height+S},{x:$+g/2,y:O+B/2},{x:$-g/2,y:O+B/2},{x:$-g/2,y:O-B/2+h.height+S},{x:$-h.width/2,y:O-B/2+h.height+S}]:z=[{x:$-g/2,y:O-B/2},{x:$+g/2,y:O-B/2},{x:$+g/2,y:O-B/2+p},{x:$+h.width/2,y:O-B/2+p},{x:$+h.width/2/2,y:O+B/2},{x:$-h.width/2,y:O+B/2},{x:$-h.width/2,y:O-B/2+p},{x:$-g/2,y:O-B/2+p}],K.polygon(t,z,I)},c}C(pS,"iconSquare");async function gS(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/o;const{labelStyles:s}=it(t);t.labelStyle=s;const a=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?a??0:0,(t==null?void 0:t.assetWidth)??n),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(c,a??0);const{shapeSvg:u,bbox:f,label:d}=await ut(e,t,"image-shape default"),p=t.pos==="t",g=-c/2,x=-h/2,m=t.label?8:0,y=tt.svg(u),b=rt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const v=y.rectangle(g,x,c,h,b),S=Math.max(c,f.width),_=h+f.height+m,w=y.rectangle(-S/2,-_/2,S,_,{...b,fill:"none",stroke:"none"}),T=u.insert(()=>v,":first-child"),D=u.insert(()=>w);if(t.img){const A=u.append("image");A.attr("href",t.img),A.attr("width",c),A.attr("height",h),A.attr("preserveAspectRatio","none"),A.attr("transform",`translate(${-c/2},${p?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-m/2:h/2-f.height/2+m/2})`),T.attr("transform",`translate(0,${p?f.height/2+m/2:-f.height/2-m/2})`),nt(t,D),t.intersect=function(A){if(U.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const F=t.x??0,V=t.y??0,j=t.height??0;let P=[];return p?P=[{x:F-f.width/2,y:V-j/2},{x:F+f.width/2,y:V-j/2},{x:F+f.width/2,y:V-j/2+f.height+m},{x:F+c/2,y:V-j/2+f.height+m},{x:F+c/2,y:V+j/2},{x:F-c/2,y:V+j/2},{x:F-c/2,y:V-j/2+f.height+m},{x:F-f.width/2,y:V-j/2+f.height+m}]:P=[{x:F-c/2,y:V-j/2},{x:F+c/2,y:V-j/2},{x:F+c/2,y:V-j/2+h},{x:F+f.width/2,y:V-j/2+h},{x:F+f.width/2/2,y:V+j/2},{x:F-f.width/2,y:V+j/2},{x:F-f.width/2,y:V-j/2+h},{x:F-c/2,y:V-j/2+h}],K.polygon(t,P,A)},u}C(gS,"imageSquare");async function mS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=n,s=t.look==="neo"?n*2:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=Math.max(l.width+(s??0)*2,(t==null?void 0:t.width)??0),h=Math.max(l.height+(o??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=tt.svg(a),g=rt(t,{}),x=kt(u),m=p.path(x,g);f=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=wi(a,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,nt(t,f),t.intersect=function(p){return K.polygon(t,u,p)},a}C(mS,"inv_trapezoid");async function ol(e,t,r){const{labelStyles:i,nodeStyles:n}=it(t);t.labelStyle=i;const{shapeSvg:o,bbox:s}=await ut(e,t,ht(t)),a=Math.max(s.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(s.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-a/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:p}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=tt.svg(o),x=rt(t,{}),m=f||d?g.path(en(c,h,a,l,f||0),x):g.rectangle(c,h,a,l,x);u=o.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",le(p))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",le(f)).attr("ry",le(d)).attr("x",c).attr("y",h).attr("width",a).attr("height",l);return nt(t,u),t.calcIntersect=function(g,x){return K.rect(g,x)},t.intersect=function(g){return K.rect(t,g)},o}C(ol,"drawRect");async function yS(e,t){const{shapeSvg:r,bbox:i,label:n}=await ut(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),nt(t,o),t.intersect=function(l){return K.rect(t,l)},r}C(yS,"labelRect");async function xS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=n,s=t.look==="neo"?n*2:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+s,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=tt.svg(a),g=rt(t,{}),x=kt(u),m=p.path(x,g);f=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=wi(a,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,nt(t,f),t.intersect=function(p){return K.polygon(t,u,p)},a}C(xS,"lean_left");async function CS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=n,s=t.look==="neo"?n*2:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+s,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=tt.svg(a),g=rt(t,{}),x=kt(u),m=p.path(x,g);f=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=wi(a,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,nt(t,f),t.intersect=function(p){return K.polygon(t,u,p)},a}C(CS,"lean_right");function bS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,(t==null?void 0:t.width)??0),a=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:s,y:0},{x:0,y:a+l/2},{x:s-2*l,y:a+l/2},{x:0,y:2*a},{x:s,y:a-l/2},{x:2*l,y:a-l/2}],h=tt.svg(n),u=rt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=kt(c),d=h.path(f,u),p=n.insert(()=>d,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-a})`),nt(t,p),t.intersect=function(g){return U.info("lightningBolt intersect",t,g),K.polygon(t,c,g)},n}C(bS,"lightningBolt");var _R=C((e,t,r,i,n,o,s)=>[`M${e},${t+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+s}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),BR=C((e,t,r,i,n,o,s)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+s}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),LR=C((e,t,r,i,n,o)=>[`M${e-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ix=10,Px=10;async function kS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?24:n;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<Px&&(t.width=Px);const b=m/2/(2.5+m/50);t.height=(t.height??0)-s-b*3,t.height<Ix&&(t.height=Ix)}const{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=h/2,f=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+s*2,p=d*.1;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=tt.svg(a),y=BR(0,0,h,d,u,f,p),b=LR(0,f,h,d,u,f),v=rt(t,{}),S=m.path(y,v),_=m.path(b,v);a.insert(()=>_,":first-child").attr("class","line"),g=a.insert(()=>S,":first-child"),g.attr("class","basic label-container"),x&&g.attr("style",x)}else{const m=_R(0,0,h,d,u,f,p);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",le(x)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),nt(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(m){const y=K.rect(t,m),b=y.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(y.y-(t.y??0))>(t.height??0)/2-f)){let v=f*f*(1-b*b/(u*u));v>0&&(v=Math.sqrt(v)),v=f-v,m.y-(t.y??0)>0&&(v=-v),y.y+=v}return y},a}C(kS,"linedCylinder");async function vS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n;if(t.width||t.height){const v=t.width;t.width=(v??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-s*2,t.height<10&&(t.height=10)}const{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(s??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:p}=t,g=tt.svg(a),x=rt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...Qi(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,f,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],y=g.polygon(m.map(v=>[v.x,v.y]),x),b=a.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),nt(t,b),t.intersect=function(v){return K.polygon(t,m,v)},a}C(vS,"linedWaveEdgedRect");async function wS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n,a=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-2*a,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-2*a,10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+2*a,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+s*2+2*a,d=u-2*a,p=f-2*a,g=-d/2,x=-p/2,{cssStyles:m}=t,y=tt.svg(l),b=rt(t,{}),v=[{x:g-a,y:x+a},{x:g-a,y:x+p+a},{x:g+d-a,y:x+p+a},{x:g+d-a,y:x+p},{x:g+d,y:x+p},{x:g+d,y:x+p-a},{x:g+d+a,y:x+p-a},{x:g+d+a,y:x-a},{x:g+a,y:x-a},{x:g+a,y:x},{x:g,y:x},{x:g,y:x+a}],S=[{x:g,y:x+a},{x:g+d-a,y:x+a},{x:g+d-a,y:x+p},{x:g+d,y:x+p},{x:g+d,y:x},{x:g,y:x}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const _=kt(v);let w=y.path(_,b);const T=kt(S);let D=y.path(T,b);t.look!=="handDrawn"&&(w=ap(w),D=ap(D));const A=l.insert("g",":first-child");return A.insert(()=>w),A.insert(()=>D),A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-a-(c.x-(c.left??0))}, ${-(c.height/2)+a-(c.y-(c.top??0))})`),nt(t,A),t.intersect=function(F){return K.polygon(t,v,F)},l}C(wS,"multiRect");async function SS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,label:s}=await ut(e,t,ht(t)),a=t.padding??0,l=t.look==="neo"?16:a,c=t.look==="neo"?12:a;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(o.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?f/4:f/8,p=f+(h?d/2:-d/2),g=-u/2,x=-p/2,m=10,{cssStyles:y}=t,b=Qi(g-m,x+p+m,g+u-m,x+p+m,d,.8),v=b==null?void 0:b[b.length-1],S=[{x:g-m,y:x+m},{x:g-m,y:x+p+m},...b,{x:g+u-m,y:v.y-m},{x:g+u,y:v.y-m},{x:g+u,y:v.y-2*m},{x:g+u+m,y:v.y-2*m},{x:g+u+m,y:x-m},{x:g+m,y:x-m},{x:g+m,y:x},{x:g,y:x},{x:g,y:x+m}],_=[{x:g,y:x+m},{x:g+u-m,y:x+m},{x:g+u-m,y:v.y-m},{x:g+u,y:v.y-m},{x:g+u,y:x},{x:g,y:x}],w=tt.svg(n),T=rt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=kt(S),A=w.path(D,T),F=kt(_),V=w.path(F,T),j=n.insert(()=>A,":first-child");return j.insert(()=>V),j.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-(o.width/2)-m-(o.x-(o.left??0))}, ${-(o.height/2)+m-d/2-(o.y-(o.top??0))})`),nt(t,j),t.intersect=function(P){return K.polygon(t,S,P)},n}C(SS,"multiWaveEdgedRectangle");async function TS(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=it(t);t.labelStyle=i,t.useHtmlLabels||$e(Wt())||(t.centerLabel=!0);const{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,f=-h/2,{cssStyles:d}=t,p=tt.svg(s),g=rt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.rectangle(u,f,c,h,g),m=s.insert(()=>x,":first-child");return m.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),nt(t,m),t.intersect=function(y){return K.rect(t,y)},s}C(TS,"note");var ER=C((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function _S(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o}=await ut(e,t,ht(t)),s=o.width+(t.padding??0),a=o.height+(t.padding??0),l=s+a,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(n),p=rt(t,{}),g=ER(0,0,l),x=d.path(g,p);u=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=wi(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),nt(t,u),t.calcIntersect=function(d,p){const g=d.width,x=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],m=K.polygon(d,x,p);return{x:m.x-.5,y:m.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}C(_S,"question");async function BS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?21:n??0,s=t.look==="neo"?12:n??0,{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?s*2:s),f=-h/2,d=-u/2,p=d/2,g=[{x:f+p,y:d},{x:f,y:0},{x:f+p,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:x}=t,m=tt.svg(a),y=rt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=kt(g),v=m.path(b,y),S=a.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-p/2},0)`),c.attr("transform",`translate(${-p/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),nt(t,S),t.intersect=function(_){return K.polygon(t,g,_)},a}C(BS,"rect_left_inv_arrow");async function LS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const o=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=o.insert("g"),a=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await $i(a,c,t.labelStyle,!0,!0);let u={width:0,height:0};if($e(St())){const T=h.children[0],D=xt(h);u=T.getBoundingClientRect(),D.attr("width",u.width),D.attr("height",u.height)}U.info("Text 2",l);const f=l||[],d=h.getBBox(),p=await $i(a,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),g=p.children[0],x=xt(p);u=g.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const m=(t.padding||0)/2;xt(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+m+5)+")"),xt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-m+3)+")");const y=u.width+(t.padding||0),b=u.height+(t.padding||0),v=-u.width/2-m,S=-u.height/2-m;let _,w;if(t.look==="handDrawn"){const T=tt.svg(o),D=rt(t,{}),A=T.path(en(v,S,y,b,t.rx||0),D),F=T.line(-u.width/2-m,-u.height/2-m+d.height+m,u.width/2+m,-u.height/2-m+d.height+m,D);w=o.insert(()=>(U.debug("Rough node insert CXC",A),F),":first-child"),_=o.insert(()=>(U.debug("Rough node insert CXC",A),A),":first-child")}else _=s.insert("rect",":first-child"),w=s.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-m).attr("y",-u.height/2-m).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),w.attr("class","divider").attr("x1",-u.width/2-m).attr("x2",u.width/2+m).attr("y1",-u.height/2-m+d.height+m).attr("y2",-u.height/2-m+d.height+m);return nt(t,_),t.intersect=function(T){return K.rect(t,T)},o}C(LS,"rectWithTitle");async function ES(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,n={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return ol(e,t,n)}C(ES,"roundedRect");var on=8;async function AS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??a.width)+n*2+(t.look==="neo"?on:on*2),h=((t==null?void 0:t.height)??a.height)+o*2,u=c-on,f=h,d=on-c/2,p=-h/2,{cssStyles:g}=t,x=tt.svg(s),m=rt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:d,y:p},{x:d+u,y:p},{x:d+u,y:p+f},{x:d-on,y:p+f},{x:d-on,y:p},{x:d,y:p},{x:d,y:p+f}],b=x.polygon(y.map(S=>[S.x,S.y]),m),v=s.insert(()=>b,":first-child");return v.attr("class","basic label-container outer-path").attr("style",le(g)),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${on/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),nt(t,v),t.intersect=function(S){return K.rect(t,S)},s}C(AS,"shadedProcess");async function FS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-s*2,10));const{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+s*2)*1.5,f=h,d=u/1.5,p=-f/2,g=-d/2,{cssStyles:x}=t,m=tt.svg(a),y=rt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:p,y:g},{x:p,y:g+d},{x:p+f,y:g+d},{x:p+f,y:g-d/2}],v=kt(b),S=m.path(v,y),_=a.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),nt(t,_),t.intersect=function(w){return K.polygon(t,b,w)},a}C(FS,"slopedRect");async function MS(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return ol(e,t,o)}C(MS,"squareRect");async function $S(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?20:n,s=t.look==="neo"?12:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=l.height+(t.look==="neo"?s*2:s),h=l.width+c/4+(t.look==="neo"?o*2:o),u=c/2,{cssStyles:f}=t,d=tt.svg(a),p=rt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...za(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...za(h/2-u,0,u,50,270,450)],x=kt(g),m=d.path(x,p),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),nt(t,y),t.intersect=function(b){return K.polygon(t,g,b)},a}C($S,"stadium");async function IS(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ol(e,t,r)}C(IS,"state");function PS(e,t,{config:{themeVariables:r}}){var y,b;const{labelStyles:i,nodeStyles:n}=it(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:s,stateBorder:a,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=tt.svg(h),f=rt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:s,strokeWidth:2}),p=a??l,g=(t.width??0)*5/14,x=u.circle(0,0,g,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=h.insert(()=>d,":first-child");if(m.insert(()=>x),t.look!=="handDrawn"&&m.attr("class","outer-path"),o&&m.selectAll("path").attr("style",o),n&&m.selectAll("path").attr("style",n),t.width<25&&c&&t.look!=="handDrawn"){const v=((b=(y=e.node())==null?void 0:y.ownerSVGElement)==null?void 0:b.id)??"",S=v?`${v}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${S})`)}return nt(t,m),t.intersect=function(v){return K.circle(t,(t.width??0)/2,v)},h}C(PS,"stateEnd");function OS(e,t,{config:{themeVariables:r}}){var a,l;const{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const h=tt.svg(o).circle(0,0,t.width,DP(i));s=o.insert(()=>h),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else s=o.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){const c=((l=(a=e.node())==null?void 0:a.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${h})`)}return nt(t,s),t.intersect=function(c){return K.circle(t,(t.width??7)/2,c)},o}C(OS,"stateStart");var Zn=8;async function RS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:n,s=t.look==="neo"?12:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+2*Zn+o,h=((t==null?void 0:t.height)??l.height)+s,u=c-2*Zn,f=h,d=-c/2,p=-h/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const x=tt.svg(a),m=rt(t,{}),y=x.rectangle(d,p,u+16,f,m),b=x.line(d+Zn,p,d+Zn,p+f,m),v=x.line(d+Zn+u,p,d+Zn+u,p+f,m);a.insert(()=>b,":first-child"),a.insert(()=>v,":first-child");const S=a.insert(()=>y,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",le(_)),nt(t,S)}else{const x=wi(a,u,f,g);i&&x.attr("style",i),nt(t,x)}return t.intersect=function(x){return K.polygon(t,g,x)},a}C(RS,"subroutine");var pd=.2;async function DS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-s*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-pd*(t.height+s*2),10));const{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+s*2,h=pd*c,u=pd*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+h-h,p=c,g=-d/2,x=-p/2,{cssStyles:m}=t,y=tt.svg(a),b=rt(t,{}),v=[{x:g-h/2,y:x},{x:g+d+h/2,y:x},{x:g+d+h/2,y:x+p},{x:g-h/2,y:x+p}],S=[{x:g+d-h/2,y:x+p},{x:g+d+h/2,y:x+p},{x:g+d+h/2,y:x+p-u}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const _=kt(v),w=y.path(_,b),T=kt(S),D=y.path(T,{...b,fillStyle:"solid"}),A=a.insert(()=>D,":first-child");return A.insert(()=>w,":first-child"),A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),nt(t,A),t.intersect=function(F){return K.polygon(t,v,F)},a}C(DS,"taggedRect");async function NS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,label:s}=await ut(e,t,ht(t)),a=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*a,u=.2*l,f=l+c,{cssStyles:d}=t,p=tt.svg(n),g=rt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=[{x:-a/2-a/2*.1,y:f/2},...Qi(-a/2-a/2*.1,f/2,a/2+a/2*.1,f/2,c,.8),{x:a/2+a/2*.1,y:-f/2},{x:-a/2-a/2*.1,y:-f/2}],m=-a/2+a/2*.1,y=-f/2-u*.4,b=[{x:m+a-h,y:(y+l)*1.3},{x:m+a,y:y+l-u},{x:m+a,y:(y+l)*.9},...Qi(m+a,(y+l)*1.25,m+a-h,(y+l)*1.3,-l*.02,.5)],v=kt(x),S=p.path(v,g),_=kt(b),w=p.path(_,{...g,fillStyle:"solid"}),T=n.insert(()=>w,":first-child");return T.insert(()=>S,":first-child"),T.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),nt(t,T),t.intersect=function(D){return K.polygon(t,x,D)},n}C(NS,"taggedWaveEdgedRectangle");async function zS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o}=await ut(e,t,ht(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),a=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-s/2,c=-a/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",a),nt(t,h),t.intersect=function(u){return K.rect(t,u)},n}C(zS,"text");var AR=C((e,t,r,i,n,o)=>`M${e},${t}
|
|
285
|
-
a${n},${o} 0,0,1 0,${-i}
|
|
286
|
-
l${r},0
|
|
287
|
-
a${n},${o} 0,0,1 0,${i}
|
|
288
|
-
M${r},${-i}
|
|
289
|
-
a${n},${o} 0,0,0 0,${i}
|
|
290
|
-
l${-r},0`,"createCylinderPathD"),FR=C((e,t,r,i,n,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),MR=C((e,t,r,i,n,o)=>[`M${e+r/2},${-i/2}`,`a${n},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Ox=5,Rx=10;async function qS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?12:n/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-o,t.height<Ox&&(t.height=Ox);const m=g/2/(2.5+g/50);t.width=(t.width??0)-o-m*3,t.width<Rx&&(t.width=Rx)}const{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=(t.height?t.height:a.height)+o,h=c/2,u=h/(2.5+c/50),f=(t.width?t.width:a.width)+u+o,{cssStyles:d}=t;let p;if(t.look==="handDrawn"){const g=tt.svg(s),x=FR(0,0,f,c,u,h),m=MR(0,0,f,c,u,h),y=g.path(x,rt(t,{})),b=g.path(m,rt(t,{fill:"none"}));p=s.insert(()=>b,":first-child"),p=s.insert(()=>y,":first-child"),p.attr("class","basic label-container"),d&&p.attr("style",d)}else{const g=AR(0,0,f,c,u,h);p=s.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",le(d)).attr("style",i),p.attr("class","basic label-container outer-path"),d&&p.selectAll("path").attr("style",d),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",u),p.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),nt(t,p),t.intersect=function(g){const x=K.rect(t,g),m=x.y-(t.y??0);if(h!=0&&(Math.abs(m)<(t.height??0)/2||Math.abs(m)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-u)){let y=u*u*(1-m*m/(h*h));y!=0&&(y=Math.sqrt(Math.abs(y))),y=u-y,g.x-(t.x??0)>0&&(y=-y),x.x+=y}return x},s}C(qS,"tiltedCylinder");async function WS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=(t.look==="neo",n),s=t.look==="neo"?n*2:n,{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+s,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=tt.svg(a),g=rt(t,{}),x=kt(u),m=p.path(x,g);f=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=wi(a,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,nt(t,f),t.intersect=function(p){return K.polygon(t,u,p)},a}C(WS,"trapezoid");async function jS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n,a=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-s*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:c,bbox:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+s*2,{cssStyles:d}=t,p=tt.svg(c),g=rt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],m=kt(x),y=p.path(m,g),b=c.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),nt(t,b),t.intersect=function(v){return K.polygon(t,x,v)},c}C(jS,"trapezoidalPentagon");var Dx=10,Nx=10;async function HS(e,t){var v;const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<Nx&&(t.width=Nx),t.height=(t==null?void 0:t.height)??0,t.height<Dx&&(t.height=Dx));const{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=bi((v=St().flowchart)==null?void 0:v.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:a.width)+o,u=t!=null&&t.height?t==null?void 0:t.height:h+a.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:p}=t,g=tt.svg(s),x=rt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=kt(d),y=g.path(m,x),b=s.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=u,nt(t,b),l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(t.padding??0)/(c?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(S){return U.info("Triangle intersect",t,d,S),K.polygon(t,d,S)},s}C(HS,"triangle");async function US(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?12:n;let a=!0;(t.width||t.height)&&(a=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-s*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await ut(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(o??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(s??0)*2,d=t.look==="neo"?f/4:f/8,p=f+(a?d:-d),{cssStyles:g}=t,m=14-u,y=m>0?m/2:0,b=tt.svg(l),v=rt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=[{x:-u/2-y,y:p/2},...Qi(-u/2-y,p/2,u/2+y,p/2,d,.8),{x:u/2+y,y:-p/2},{x:-u/2-y,y:-p/2}],_=kt(S),w=b.path(_,v),T=l.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-d-(c.y-(c.top??0))})`),nt(t,T),t.intersect=function(D){return K.polygon(t,S,D)},l}C(US,"waveEdgedRectangle");async function YS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.padding??0,o=t.look==="neo"?16:n,s=t.look==="neo"?20:n;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-s-v*(20/9)),t.width=t.width-o*2}const{shapeSvg:a,bbox:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+s,u=h/8,f=h+u*2,{cssStyles:d}=t,p=tt.svg(a),g=rt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=[{x:-c/2,y:f/2},...Qi(-c/2,f/2,c/2,f/2,u,1),{x:c/2,y:-f/2},...Qi(c/2,-f/2,-c/2,-f/2,u,-1)],m=kt(x),y=p.path(m,g),b=a.insert(()=>y,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),nt(t,b),t.intersect=function(v){return K.polygon(t,x,v)},a}C(YS,"waveRectangle");var Ht=10;async function VS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-n*2-Ht,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-Ht,10));const{shapeSvg:s,bbox:a,label:l}=await ut(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:a.width)+n*2+Ht,h=(t!=null&&t.height?t==null?void 0:t.height:a.height)+o*2+Ht,u=c-Ht,f=h-Ht,d=-u/2,p=-f/2,{cssStyles:g}=t,x=tt.svg(s),m=rt(t,{}),y=[{x:d-Ht,y:p-Ht},{x:d-Ht,y:p+f},{x:d+u,y:p+f},{x:d+u,y:p-Ht}],b=`M${d-Ht},${p-Ht} L${d+u},${p-Ht} L${d+u},${p+f} L${d-Ht},${p+f} L${d-Ht},${p-Ht}
|
|
291
|
-
M${d-Ht},${p} L${d+u},${p}
|
|
292
|
-
M${d},${p-Ht} L${d},${p+f}`;t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const v=x.path(b,m),S=s.insert(()=>v,":first-child");return S.attr("transform",`translate(${Ht/2}, ${Ht/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(a.width/2)+Ht/2-(a.x-(a.left??0))}, ${-(a.height/2)+Ht/2-(a.y-(a.top??0))})`),nt(t,S),t.intersect=function(_){return K.polygon(t,y,_)},s}C(VS,"windowPane");var zx=new Set(["redux-color","redux-dark-color"]),$R=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ym(e,t){var gt,Ct,_t,Ve;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:n}=Wt(),{rowEven:o,rowOdd:s,nodeBorder:a,borderColorArray:l}=n;if(t.look==="handDrawn"){const{themeVariables:ot}=Wt(),{background:mt}=ot,Ft={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${mt}`]};await ym(e,Ft)}const c=Wt();t.useHtmlLabels=c.htmlLabels;let h=((gt=c.er)==null?void 0:gt.diagramPadding)??10,u=((Ct=c.er)==null?void 0:Ct.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:p}=it(t);if(r.attributes.length===0&&t.label){const ot={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};xi(t.label,c)+ot.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const mt=await ol(e,t,ot);if(i!=null&&zx.has(i)){const Ft=r.colorIndex??0;mt.attr("data-color-id",`color-${Ft%l.length}`)}if(!bi(c.htmlLabels)){const Ft=mt.select("text"),Mt=(_t=Ft.node())==null?void 0:_t.getBBox();Ft.attr("transform",`translate(${-Mt.width/2}, 0)`)}return mt}c.htmlLabels||(h*=1.25,u*=1.25);let g=ht(t);g||(g="node default");const x=e.insert("g").attr("class",g).attr("id",t.domId||t.id),m=await eo(x,t.label??"",c,0,0,["name"],d);m.height+=u;let y=0;const b=[],v=[];let S=0,_=0,w=0,T=0,D=!0,A=!0;for(const ot of r.attributes){const mt=await eo(x,ot.type,c,0,y,["attribute-type"],d);S=Math.max(S,mt.width+h);const Ft=await eo(x,ot.name,c,0,y,["attribute-name"],d);_=Math.max(_,Ft.width+h);const Mt=await eo(x,ot.keys.join(),c,0,y,["attribute-keys"],d);w=Math.max(w,Mt.width+h);const Ge=await eo(x,ot.comment,c,0,y,["attribute-comment"],d);T=Math.max(T,Ge.width+h);const ge=Math.max(mt.height,Ft.height,Mt.height,Ge.height)+u;v.push({yOffset:y,rowHeight:ge}),y+=ge}let F=4;w<=h&&(D=!1,w=0,F--),T<=h&&(A=!1,T=0,F--);const V=x.node().getBBox();if(m.width+h*2-(S+_+w+T)>0){const ot=m.width+h*2-(S+_+w+T);S+=ot/F,_+=ot/F,w>0&&(w+=ot/F),T>0&&(T+=ot/F)}const j=S+_+w+T,P=tt.svg(x),I=rt(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let $=0;v.length>0&&($=v.reduce((ot,mt)=>ot+((mt==null?void 0:mt.rowHeight)??0),0));const O=Math.max(V.width+h*2,(t==null?void 0:t.width)||0,j),B=Math.max(($??0)+m.height,(t==null?void 0:t.height)||0),z=-O/2,W=-B/2;if(x.selectAll("g:not(:first-child)").each((ot,mt,Ft)=>{const Mt=xt(Ft[mt]),Ge=Mt.attr("transform");let ge=0,jn=0;if(Ge){const Ir=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ge);Ir&&(ge=parseFloat(Ir[1]),jn=parseFloat(Ir[2]),Mt.attr("class").includes("attribute-name")?ge+=S:Mt.attr("class").includes("attribute-keys")?ge+=S+_:Mt.attr("class").includes("attribute-comment")&&(ge+=S+_+w))}Mt.attr("transform",`translate(${z+h/2+ge}, ${jn+W+m.height+u/2})`)}),x.select(".name").attr("transform","translate("+-m.width/2+", "+(W+u/2)+")"),i!=null&&zx.has(i)){const ot=r.colorIndex??0;x.attr("data-color-id",`color-${ot%l.length}`)}const q=P.rectangle(z,W,O,B,I),H=x.insert(()=>q,":first-child").attr("class","outer-path").attr("style",f.join(""));b.push(0);for(const[ot,mt]of v.entries()){const Mt=(ot+1)%2===0&&mt.yOffset!==0,Ge=P.rectangle(z,m.height+W+(mt==null?void 0:mt.yOffset),O,mt==null?void 0:mt.rowHeight,{...I,fill:Mt?o:s,stroke:a});x.insert(()=>Ge,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Mt?"even":"odd"}`)}const G=1e-4;let Q=ro(z,m.height+W,O+z,m.height+W,G),Z=P.polygon(Q.map(ot=>[ot.x,ot.y]),I);if(x.insert(()=>Z).attr("class","divider"),Q=ro(S+z,m.height+W,S+z,B+W,G),Z=P.polygon(Q.map(ot=>[ot.x,ot.y]),I),x.insert(()=>Z).attr("class","divider"),D){const ot=S+_+z;Q=ro(ot,m.height+W,ot,B+W,G),Z=P.polygon(Q.map(mt=>[mt.x,mt.y]),I),x.insert(()=>Z).attr("class","divider")}if(A){const ot=S+_+w+z;Q=ro(ot,m.height+W,ot,B+W,G),Z=P.polygon(Q.map(mt=>[mt.x,mt.y]),I),x.insert(()=>Z).attr("class","divider")}for(const ot of b){const mt=m.height+W+ot;Q=ro(z,mt,O+z,mt,G),Z=P.polygon(Q.map(Ft=>[Ft.x,Ft.y]),I),x.insert(()=>Z).attr("class","divider")}if(nt(t,H),p&&t.look!=="handDrawn")if(i!=null&&$R.has(i))x.selectAll("path").attr("style",p);else{const ot=p.split(";"),mt=(Ve=ot==null?void 0:ot.filter(Ft=>Ft.includes("stroke")))==null?void 0:Ve.map(Ft=>`${Ft}`).join("; ");x.selectAll("path").attr("style",mt??""),x.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(ot){return K.rect(t,ot)},x}C(ym,"erBox");async function eo(e,t,r,i=0,n=0,o=[],s=""){const a=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==k0(t)&&(t=k0(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=a.node().appendChild(await vi(a,t,{width:xi(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(bi(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=xt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}C(eo,"addText");function ro(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}C(ro,"lineToPolygon");async function GS(e,t,r,i,n=r.class.padding??12){const o=i?0:3,s=e.insert("g").attr("class",ht(t)).attr("id",t.domId||t.id);let a=null,l=null,c=null,h=null,u=0,f=0,d=0;if(a=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const y=t.annotations[0];await Ys(a,{text:`«${y}»`},0),u=a.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Ys(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=s.insert("g").attr("class","members-group text");let g=0;for(const y of t.members){const b=await Ys(c,y,g,[y.parseClassifier()]);g+=b+o}d=c.node().getBBox().height,d<=0&&(d=n/2),h=s.insert("g").attr("class","methods-group text");let x=0;for(const y of t.methods){const b=await Ys(h,y,x,[y.parseClassifier()]);x+=b+o}let m=s.node().getBBox();if(a!==null){const y=a.node().getBBox();a.attr("transform",`translate(${-y.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${u})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}C(GS,"textHelper");async function Ys(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Wt();let s="useHtmlLabels"in t?t.useHtmlLabels:bi(o.htmlLabels)??!0,a="";"text"in t?a=t.text:a=t.label,!s&&a.startsWith("\\")&&(a=a.substring(1)),Ea(a)&&(s=!0);const l=await vi(n,_g(Mn(a)),{width:xi(a,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let c,h=1;if(s){const u=l.children[0],f=xt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const p=a.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(x=>{function m(){var y;if(g.style.display="flex",g.style.flexDirection="column",p){const b=((y=o.fontSize)==null?void 0:y.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";x(g)}C(m,"setupImage"),setTimeout(()=>{g.complete&&m()}),g.addEventListener("error",m),g.addEventListener("load",m)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&xt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=a[0]+a.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),a[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}C(Ys,"addText");async function XS(e,t){var P,I;const r=St(),{themeVariables:i}=r,{useGradient:n}=i,o=r.class.padding??12,s=o,a=t.useHtmlLabels??bi(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await GS(e,t,r,a,s),{labelStyles:u,nodeStyles:f}=it(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((P=l.styles)==null?void 0:P.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!((I=r.class)!=null&&I.hideEmptyMembersBox),g=tt.svg(c),x=rt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=Math.max(t.width??0,h.width);let y=Math.max(t.height??0,h.height);const b=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?y+=s:l.members.length>0&&l.methods.length===0&&(y+=s*2);const v=-m/2,S=-y/2;let _=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;b&&(_=o*2);const w=g.rectangle(v-o,S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),m+2*o,y+2*o+_,x),T=c.insert(()=>w,":first-child");T.attr("class","basic label-container outer-path");const D=T.node().getBBox(),A=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,F=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,V=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,j=(A+F+S+o-(S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each(($,O,B)=>{var Q,Z;const z=xt(B[O]),W=z.attr("transform");let q=0;if(W){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);Ct&&(q=parseFloat(Ct[2]))}let H=q+S+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(z.attr("class").includes("methods-group")){const gt=Math.max(V,s/2);b?H=Math.max(j,A+F+gt+S+s*2+o)+s*2:H=A+F+gt+S+s*4+o}l.members.length===0&&l.methods.length===0&&((Q=r.class)!=null&&Q.hideEmptyMembersBox)&&(l.annotations.length>0?H=q-s:H=q),a||(H-=4);let G=v;(z.attr("class").includes("label-group")||z.attr("class").includes("annotation-group"))&&(G=-((Z=z.node())==null?void 0:Z.getBBox().width)/2||0,c.selectAll("text").each(function(gt,Ct,_t){window.getComputedStyle(_t[Ct]).textAnchor==="middle"&&(G=0)})),z.attr("transform",`translate(${G}, ${H})`)}),l.members.length>0||l.methods.length>0||p){const $=A+F+S+o,O=g.line(D.x,$,D.x+D.width,$+.001,x);c.insert(()=>O).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(p||l.members.length>0||l.methods.length>0){const $=A+F+V+S+s*2+o,O=g.line(D.x,b?Math.max(j,$):$,D.x+D.width,(b?Math.max(j,$):$)+.001,x);c.insert(()=>O).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),T.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!a){const $=RegExp(/color\s*:\s*([^;]*)/),O=$.exec(d);if(O){const B=O[0].replace("color","fill");c.selectAll("tspan").attr("style",B)}else if(u){const B=$.exec(u);if(B){const z=B[0].replace("color","fill");c.selectAll("tspan").attr("style",z)}}}return nt(t,T),t.intersect=function($){return K.rect(t,$)},c}C(XS,"classBox");async function QS(e,t){var D,A;const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const n=t,o=t,s=20,a=20,l="verifyMethod"in t,c=ht(t),{themeVariables:h}=St(),{borderColorArray:u,requirementEdgeLabelBackground:f}=h,d=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let p;l?p=await Nr(d,`<<${n.type}>>`,0,t.labelStyle):p=await Nr(d,"<<Element>>",0,t.labelStyle);let g=p;const x=await Nr(d,n.name,g,t.labelStyle+"; font-weight: bold;");if(g+=x+a,l){const F=await Nr(d,`${n.requirementId?`ID: ${n.requirementId}`:""}`,g,t.labelStyle);g+=F;const V=await Nr(d,`${n.text?`Text: ${n.text}`:""}`,g,t.labelStyle);g+=V;const j=await Nr(d,`${n.risk?`Risk: ${n.risk}`:""}`,g,t.labelStyle);g+=j,await Nr(d,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,g,t.labelStyle)}else{const F=await Nr(d,`${o.type?`Type: ${o.type}`:""}`,g,t.labelStyle);g+=F,await Nr(d,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,g,t.labelStyle)}const m=(((D=d.node())==null?void 0:D.getBBox().width)??200)+s,y=(((A=d.node())==null?void 0:A.getBBox().height)??200)+s,b=-m/2,v=-y/2,S=tt.svg(d),_=rt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=S.rectangle(b,v,m,y,_),T=d.insert(()=>w,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const F=t.colorIndex??0;d.attr("data-color-id",`color-${F%u.length}`)}if(d.selectAll(".label").each((F,V,j)=>{const P=xt(j[V]),I=P.attr("transform");let $=0,O=0;if(I){const q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);q&&($=parseFloat(q[1]),O=parseFloat(q[2]))}const B=O-y/2;let z=b+s/2;(V===0||V===1)&&(z=$),P.attr("transform",`translate(${z}, ${B+s})`)}),g>p+x+a){const F=v+p+x+a;let V;if(t.look==="neo"){const I=[[b,F],[b+m,F],[b+m,F+.001],[b,F+.001]];V=S.polygon(I,_)}else V=S.line(b,F,b+m,F,_);d.insert(()=>V).attr("class","divider")}return nt(t,T),t.intersect=function(F){return K.rect(t,F)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}C(QS,"requirementBox");async function Nr(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),o=St(),s=o.htmlLabels??!0,a=await vi(n,_g(Mn(t)),{width:xi(t,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let l;if(s){const c=a.children[0],h=xt(a);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=a.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=a.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}C(Nr,"addText");var IR=C(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ZS(e,t,{config:r}){var V,j;const{labelStyles:i,nodeStyles:n}=it(t);t.labelStyle=i||"";const o=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:a,bbox:l,label:c}=await ut(e,t,ht(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((V=r==null?void 0:r.kanban)!=null&&V.ticketBaseUrl)&&(u=(j=r==null?void 0:r.kanban)==null?void 0:j.ticketBaseUrl.replace("#TICKET#",t.ticket),f=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,g;f?{label:p,bbox:g}=await fd(f,"ticket"in t&&t.ticket||"",d):{label:p,bbox:g}=await fd(a,"ticket"in t&&t.ticket||"",d);const{label:x,bbox:m}=await fd(a,"assigned"in t&&t.assigned||"",d);t.width=s;const y=10,b=(t==null?void 0:t.width)||0,v=Math.max(g.height,m.height)/2,S=Math.max(l.height+y*2,(t==null?void 0:t.height)||0)+v,_=-b/2,w=-S/2;c.attr("transform","translate("+(h-b/2)+", "+(-v-l.height/2)+")"),p.attr("transform","translate("+(h-b/2)+", "+(-v+l.height/2)+")"),x.attr("transform","translate("+(h+b/2-m.width-2*o)+", "+(-v+l.height/2)+")");let T;const{rx:D,ry:A}=t,{cssStyles:F}=t;if(t.look==="handDrawn"){const P=tt.svg(a),I=rt(t,{}),$=D||A?P.path(en(_,w,b,S,D||0),I):P.rectangle(_,w,b,S,I);T=a.insert(()=>$,":first-child"),T.attr("class","basic label-container").attr("style",F||null)}else{T=a.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",n).attr("rx",D??5).attr("ry",A??5).attr("x",_).attr("y",w).attr("width",b).attr("height",S);const P="priority"in t&&t.priority;if(P){const I=a.append("line"),$=_+2,O=w+Math.floor((D??0)/2),B=w+S-Math.floor((D??0)/2);I.attr("x1",$).attr("y1",O).attr("x2",$).attr("y2",B).attr("stroke-width","4").attr("stroke",IR(P))}}return nt(t,T),t.height=S,t.intersect=function(P){return K.rect(t,P)},a}C(ZS,"kanbanItem");async function KS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:s,label:a}=await ut(e,t,ht(t)),l=o.width+10*s,c=o.height+8*s,h=.15*l,{cssStyles:u}=t,f=o.width+20,d=o.height+20,p=Math.max(l,f),g=Math.max(c,d);a.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let x;const m=`M0 0
|
|
293
|
-
a${h},${h} 1 0,0 ${p*.25},${-1*g*.1}
|
|
294
|
-
a${h},${h} 1 0,0 ${p*.25},0
|
|
295
|
-
a${h},${h} 1 0,0 ${p*.25},0
|
|
296
|
-
a${h},${h} 1 0,0 ${p*.25},${g*.1}
|
|
297
|
-
|
|
298
|
-
a${h},${h} 1 0,0 ${p*.15},${g*.33}
|
|
299
|
-
a${h*.8},${h*.8} 1 0,0 0,${g*.34}
|
|
300
|
-
a${h},${h} 1 0,0 ${-1*p*.15},${g*.33}
|
|
301
|
-
|
|
302
|
-
a${h},${h} 1 0,0 ${-1*p*.25},${g*.15}
|
|
303
|
-
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
304
|
-
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
305
|
-
a${h},${h} 1 0,0 ${-1*p*.25},${-1*g*.15}
|
|
306
|
-
|
|
307
|
-
a${h},${h} 1 0,0 ${-1*p*.1},${-1*g*.33}
|
|
308
|
-
a${h*.8},${h*.8} 1 0,0 0,${-1*g*.34}
|
|
309
|
-
a${h},${h} 1 0,0 ${p*.1},${-1*g*.33}
|
|
310
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const y=tt.svg(n),b=rt(t,{}),v=y.path(m,b);x=n.insert(()=>v,":first-child"),x.attr("class","basic label-container").attr("style",le(u))}else x=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return x.attr("transform",`translate(${-p/2}, ${-g/2})`),nt(t,x),t.calcIntersect=function(y,b){return K.rect(y,b)},t.intersect=function(y){return U.info("Bang intersect",t,y),K.rect(t,y)},n}C(KS,"bang");async function JS(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:s,label:a}=await ut(e,t,ht(t)),l=o.width+2*s,c=o.height+2*s,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:p}=t;let g;const x=`M0 0
|
|
311
|
-
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
312
|
-
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
313
|
-
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
314
|
-
|
|
315
|
-
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
316
|
-
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
|
|
317
|
-
|
|
318
|
-
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
319
|
-
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
320
|
-
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
321
|
-
|
|
322
|
-
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
323
|
-
a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
|
|
324
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const m=tt.svg(n),y=rt(t,{}),b=m.path(x,y);g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container").attr("style",le(p))}else g=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return a.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),nt(t,g),t.calcIntersect=function(m,y){return K.rect(m,y)},t.intersect=function(m){return U.info("Cloud intersect",t,m),K.rect(t,m)},n}C(JS,"cloud");async function tT(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:s,label:a}=await ut(e,t,ht(t)),l=o.width+8*s,c=o.height+2*s,h=5,u=t.look==="neo"?`
|
|
325
|
-
M${-l/2} ${c/2-h}
|
|
326
|
-
v${-c+2*h}
|
|
327
|
-
q0,-${h} ${h},-${h}
|
|
328
|
-
h${l-2*h}
|
|
329
|
-
q${h},0 ${h},${h}
|
|
330
|
-
v${c-h}
|
|
331
|
-
H${-l/2}
|
|
332
|
-
Z
|
|
333
|
-
`:`
|
|
334
|
-
M${-l/2} ${c/2-h}
|
|
335
|
-
v${-c+2*h}
|
|
336
|
-
q0,-${h} ${h},-${h}
|
|
337
|
-
h${l-2*h}
|
|
338
|
-
q${h},0 ${h},${h}
|
|
339
|
-
v${c-2*h}
|
|
340
|
-
q0,${h} ${-h},${h}
|
|
341
|
-
h${-(l-2*h)}
|
|
342
|
-
q${-h},0 ${-h},${-h}
|
|
343
|
-
Z
|
|
344
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),a.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),n.append(()=>a.node()),nt(t,f),t.calcIntersect=function(d,p){return K.rect(d,p)},t.intersect=function(d){return K.rect(t,d)},n}C(tT,"defaultMindmapNode");async function eT(e,t){const r={padding:t.padding??0};return mm(e,t,r)}C(eT,"mindmapCircle");var PR=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:MS},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ES},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:$S},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:RS},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rS},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mm},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:KS},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:JS},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:_S},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cS},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:CS},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xS},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:WS},{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:mS},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:nS},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:zS},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Gw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:AS},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:OS},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PS},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:aS},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hS},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Kw},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Jw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tS},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:bS},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:US},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:lS},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:qS},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:kS},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:eS},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:iS},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:HS},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:VS},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:oS},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:jS},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:sS},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:FS},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:SS},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:wS},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Vw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Zw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:NS},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:DS},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:YS},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:BS},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:vS}],OR=C(()=>{const t=[...Object.entries({state:IS,choice:Xw,note:TS,rectWithTitle:LS,labelRect:yS,iconSquare:pS,iconCircle:dS,icon:uS,iconRounded:fS,imageSquare:gS,anchor:Uw,kanbanItem:ZS,mindmapCircle:eT,defaultMindmapNode:tT,classBox:XS,erBox:ym,requirementBox:QS}),...PR.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),rT=OR();function RR(e){return e in rT}C(RR,"isValidShape");var au=new Map;async function iT(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?rT[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await o(i,t,r)}else n=await o(e,t,r),i=n;return i.attr("data-look",le(t.look)),t.tooltip&&n.attr("title",t.tooltip),au.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}C(iT,"insertNode");var j7=C((e,t)=>{au.set(t.id,e)},"setNodeElem"),H7=C(()=>{au.clear()},"clear"),U7=C(e=>{const t=au.get(e.id);U.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),DR=C((e,t,r,i,n,o=!1,s)=>{t.arrowTypeStart&&qx(e,"start",t.arrowTypeStart,r,i,n,o,s),t.arrowTypeEnd&&qx(e,"end",t.arrowTypeEnd,r,i,n,o,s)},"addEdgeMarkers"),NR={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}},zR=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],qx=C((e,t,r,i,n,o,s=!1,a)=>{var p;const l=NR[r],c=l&&zR.includes(l.type);if(!l){U.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${n}_${o}-${h}${t==="start"?"Start":"End"}${s&&c?"-margin":""}`;if(a&&a.trim()!==""){const g=a.replace(/[^\dA-Za-z]/g,"_"),x=`${d}_${g}`;if(!document.getElementById(x)){const m=document.getElementById(d);if(m){const y=m.cloneNode(!0);y.id=x,y.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",a),l.fill&&v.setAttribute("fill",a)}),(p=m.parentNode)==null||p.appendChild(y)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),qR=C(e=>{var t,r;return typeof e=="string"?e:(r=(t=St())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ch=new Map,de=new Map,Y7=C(()=>{Ch.clear(),de.clear()},"clear"),Fs=C(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),WR=C(async(e,t)=>{const r=St();let i=$e(r);const{labelStyles:n}=it(t);t.labelStyle=n;const o=e.insert("g").attr("class","edgeLabel"),s=o.insert("g").attr("class","label").attr("data-id",t.id),a=t.labelType==="markdown",c=await vi(e,t.label,{style:Fs(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:a,width:a?void 0:void 0},r);s.node().appendChild(c),U.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],p=xt(c);h=d.getBoundingClientRect(),u=h,p.attr("width",h.width),p.attr("height",h.height)}else{const d=xt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}s.attr("transform",Ts(u,i)),Ch.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await $i(p,t.startLabelLeft,Fs(t.labelStyle)||"",!1,!1);f=g;let x=g.getBBox();if(i){const m=g.children[0],y=xt(g);x=m.getBoundingClientRect(),y.attr("width",x.width),y.attr("height",x.height)}p.attr("transform",Ts(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startLeft=d,Vs(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await $i(p,t.startLabelRight,Fs(t.labelStyle)||"",!1,!1);f=g,p.node().appendChild(g);let x=g.getBBox();if(i){const m=g.children[0],y=xt(g);x=m.getBoundingClientRect(),y.attr("width",x.width),y.attr("height",x.height)}p.attr("transform",Ts(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startRight=d,Vs(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await $i(p,t.endLabelLeft,Fs(t.labelStyle)||"",!1,!1);f=g;let x=g.getBBox();if(i){const m=g.children[0],y=xt(g);x=m.getBoundingClientRect(),y.attr("width",x.width),y.attr("height",x.height)}p.attr("transform",Ts(x,i)),d.node().appendChild(g),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endLeft=d,Vs(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await $i(p,t.endLabelRight,Fs(t.labelStyle)||"",!1,!1);f=g;let x=g.getBBox();if(i){const m=g.children[0],y=xt(g);x=m.getBoundingClientRect(),y.attr("width",x.width),y.attr("height",x.height)}p.attr("transform",Ts(x,i)),d.node().appendChild(g),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endRight=d,Vs(f,t.endLabelRight)}return c},"insertEdgeLabel");function Vs(e,t){$e(St())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}C(Vs,"setTerminalWidth");var jR=C((e,t)=>{U.debug("Moving label abc88 ",e.id,e.label,Ch.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=St(),{subGraphTitleTotalMargin:n}=im(i);if(e.label){const o=Ch.get(e.id);let s=e.x,a=e.y;if(r){const l=Tr.calcLabelPosition(r);U.debug("Moving label "+e.label+" from (",s,",",a,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,a=l.y)}o.attr("transform",`translate(${s}, ${a+n/2})`)}if(e.startLabelLeft){const o=de.get(e.id).startLeft;let s=e.x,a=e.y;if(r){const l=Tr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,a=l.y}o.attr("transform",`translate(${s}, ${a})`)}if(e.startLabelRight){const o=de.get(e.id).startRight;let s=e.x,a=e.y;if(r){const l=Tr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,a=l.y}o.attr("transform",`translate(${s}, ${a})`)}if(e.endLabelLeft){const o=de.get(e.id).endLeft;let s=e.x,a=e.y;if(r){const l=Tr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,a=l.y}o.attr("transform",`translate(${s}, ${a})`)}if(e.endLabelRight){const o=de.get(e.id).endRight;let s=e.x,a=e.y;if(r){const l=Tr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,a=l.y}o.attr("transform",`translate(${s}, ${a})`)}},"positionEdgeLabel"),HR=C((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),o=Math.abs(t.y-i),s=e.width/2,a=e.height/2;return n>=s||o>=a},"outsideNode"),UR=C((e,t,r)=>{U.debug(`intersection calc abc89:
|
|
345
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
346
|
-
insidePoint : ${JSON.stringify(r)}
|
|
347
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,o=Math.abs(i-r.x),s=e.width/2;let a=r.x<t.x?s-o:s+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;a=h*u/c;const f={x:r.x<t.x?r.x+a:r.x-h+a,y:r.y<t.y?r.y+c-u:r.y-c+u};return a===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),U.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${a}`,f),f}else{r.x<t.x?a=t.x-s-i:a=i-s-t.x;let u=c*a/h,f=r.x<t.x?r.x+h-a:r.x-h+a,d=r.y<t.y?r.y+u:r.y-u;return U.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${a}`,{_x:f,_y:d}),a===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),Wx=C((e,t)=>{U.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(o=>{if(U.info("abc88 checking point",o,t),!HR(t,o)&&!n){const s=UR(t,i,o);U.debug("abc88 inside",o,i,s),U.debug("abc88 intersection",s,t);let a=!1;r.forEach(l=>{a=a||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?U.warn("abc88 no intersect",s,r):r.push(s),n=!0}else U.warn("abc88 outside",o,i),i=o,n||r.push(o)}),U.debug("returning points",r),r},"cutPathAtIntersect");function nT(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],o=e[i],s=e[i+1];(n.x===o.x&&o.y===s.y&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-n.y)>5||n.y===o.y&&o.x===s.x&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-s.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}C(nT,"extractCornerPoints");var jx=C(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,o=Math.sqrt(i*i+n*n),s=r/o;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),YR=C(function(e){const{cornerPointPositions:t}=nT(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],o=e[i+1],s=e[i],a=jx(n,s,5),l=jx(o,s,5),c=l.x-a.x,h=l.y-a.y;r.push(a);const u=Math.sqrt(2)*2;let f={x:s.x,y:s.y};if(Math.abs(o.x-n.x)>10&&Math.abs(o.y-n.y)>=10){U.debug("Corner point fixing",Math.abs(o.x-n.x),Math.abs(o.y-n.y));const d=5;s.x===a.x?f={x:c<0?a.x-d+u:a.x+d-u,y:h<0?a.y-u:a.y+u}:f={x:c<0?a.x-u:a.x+u,y:h<0?a.y-d+u:a.y+d-u}}else U.debug("Corner point skipping fixing",Math.abs(o.x-n.x),Math.abs(o.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),VR=C((e,t,r)=>{const i=e-t-r,n=2,o=2,s=n+o,a=Math.floor(i/s),l=Array(a).fill(`${n} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),GR=C(function(e,t,r,i,n,o,s,a=!1){var O;if(!s)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=St();let c=t.points,h=!1;const u=n;var f=o;const d=[];for(const B in t.cssCompiledStyles)iw(B)||d.push(t.cssCompiledStyles[B]);U.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!a&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),U.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const p=btoa(JSON.stringify(c));t.toCluster&&(U.info("to cluster abc88",r.get(t.toCluster)),c=Wx(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(U.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Wx(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let g=c.filter(B=>!Number.isNaN(B.y));const x=qR(t.curve);x!=="rounded"&&(g=YR(g));let m=sa;switch(x){case"linear":m=sa;break;case"basis":m=If;break;case"cardinal":m=Ok;break;case"bumpX":m=Fk;break;case"bumpY":m=Mk;break;case"catmullRom":m=Dk;break;case"monotoneX":m=Hk;break;case"monotoneY":m=Uk;break;case"natural":m=Vk;break;case"step":m=Gk;break;case"stepAfter":m=Qk;break;case"stepBefore":m=Xk;break;case"rounded":m=sa;break;default:m=If}const{x:y,y:b}=z$(t),v=wM().x(y).y(b).curve(m);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let _,w=x==="rounded"?oT(sT(g,t),5):v(g);const T=Array.isArray(t.style)?t.style:[t.style];let D=T.find(B=>B==null?void 0:B.startsWith("stroke:")),A="";t.animate&&(A="edge-animation-fast"),t.animation&&(A="edge-animation-"+t.animation);let F=!1;if(t.look==="handDrawn"){const B=tt.svg(e);Object.assign([],g);const z=B.path(w,{roughness:.3,seed:l});S+=" transition",_=xt(z).select("path").attr("id",`${s}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",T?T.reduce((q,H)=>q+";"+H,""):"");let W=_.attr("d");_.attr("d",W),e.node().appendChild(_.node())}else{const B=d.join(";"),z=T?T.reduce((Z,gt)=>Z+gt+";",""):"",W=(B?B+";"+z+";":z)+";"+(T?T.reduce((Z,gt)=>Z+";"+gt,""):"");_=e.append("path").attr("d",w).attr("id",`${s}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",W),D=(O=W.match(/stroke:([^;]+)/))==null?void 0:O[1],F=t.animate===!0||!!t.animation||B.includes("animation");const q=_.node(),H=typeof q.getTotalLength=="function"?q.getTotalLength():0,G=G0[t.arrowTypeStart]||0,Q=G0[t.arrowTypeEnd]||0;if(t.look==="neo"&&!F){const gt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?VR(H,G,Q):`0 ${G} ${H-G-Q} ${Q}`}; stroke-dashoffset: 0;`;_.attr("style",gt+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",p),_.attr("data-look",le(t.look)),t.showPoints&&g.forEach(B=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",B.x).attr("cy",B.y)});let V="";(St().flowchart.arrowMarkerAbsolute||St().state.arrowMarkerAbsolute)&&(V=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,V=V.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),U.info("arrowTypeStart",t.arrowTypeStart),U.info("arrowTypeEnd",t.arrowTypeEnd);const j=!F&&(t==null?void 0:t.look)==="neo";DR(_,t,V,s,i,j,D);const P=Math.floor(c.length/2),I=c[P];Tr.isLabelCoordinateInPath(I,_.attr("d"))||(h=!0);let $={};return h&&($.updatedPath=c),$.originalPath=t.points,$},"insertEdge");function oT(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let o=0;o<i;o++){const s=e[o],a=e[o-1],l=e[o+1];if(o===0)r+=`M${s.x},${s.y}`;else if(o===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-a.x,h=s.y-a.y,u=l.x-s.x,f=l.y-s.y,d=Math.hypot(c,h),p=Math.hypot(u,f);if(d<n||p<n){r+=`L${s.x},${s.y}`;continue}const g=c/d,x=h/d,m=u/p,y=f/p,b=g*m+x*y,v=Math.max(-1,Math.min(1,b)),S=Math.acos(v);if(S<n||Math.abs(Math.PI-S)<n){r+=`L${s.x},${s.y}`;continue}const _=Math.min(t/Math.sin(S/2),d/2,p/2),w=s.x-g*_,T=s.y-x*_,D=s.x+m*_,A=s.y+y*_;r+=`L${w},${T}`,r+=`Q${s.x},${s.y} ${D},${A}`}}return r}C(oT,"generateRoundedPath");function hp(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}C(hp,"calculateDeltaAndAngle");function sT(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&ke[t.arrowTypeStart]){const n=ke[t.arrowTypeStart],o=e[0],s=e[1],{angle:a}=hp(o,s),l=n*Math.cos(a),c=n*Math.sin(a);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&ke[t.arrowTypeEnd]){const n=ke[t.arrowTypeEnd],o=e[i-1],s=e[i-2],{angle:a}=hp(s,o),l=n*Math.cos(a),c=n*Math.sin(a);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}C(sT,"applyMarkerOffsetsToPoints");var XR=C((e,t,r,i)=>{t.forEach(n=>{xD[n](e,r,i)})},"insertMarkers"),QR=C((e,t,r)=>{U.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ZR=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),KR=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),JR=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),tD=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),eD=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),rD=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),iD=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),nD=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),oD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{transitionColor:o}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),sD=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),aD=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),lD=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),cD=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),hD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),uD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o,mainBkg:s}=n,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");a.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),a.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),dD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),fD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o,mainBkg:s}=n,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");a.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),pD=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
348
|
-
L20,10
|
|
349
|
-
M20,10
|
|
350
|
-
L0,20`)},"requirement_arrow"),gD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
351
|
-
L20,10
|
|
352
|
-
M20,10
|
|
353
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),mD=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),yD=C((e,t,r)=>{const i=Wt(),{themeVariables:n}=i,{strokeWidth:o}=n,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),xD={extension:QR,composition:ZR,aggregation:KR,dependency:JR,lollipop:tD,point:eD,circle:rD,cross:iD,barb:nD,barbNeo:oD,only_one:sD,zero_or_one:aD,one_or_more:lD,zero_or_more:cD,only_one_neo:hD,zero_or_one_neo:uD,one_or_more_neo:dD,zero_or_more_neo:fD,requirement_arrow:pD,requirement_contains:mD,requirement_arrow_neo:gD,requirement_contains_neo:yD},CD=XR,bD={common:Qa,getConfig:Wt,insertCluster:yR,insertEdge:GR,insertEdgeLabel:WR,insertMarkers:CD,insertNode:iT,interpolateToCurve:Zg,labelHelper:ut,log:U,positionEdgeLabel:jR},qa={},aT=C(e=>{for(const t of e)qa[t.name]=t},"registerLayoutLoaders"),kD=C(()=>{aT([{name:"dagre",loader:C(async()=>await vt(()=>import("./dagre-KV5264BT-C2aig8U5.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:C(async()=>await vt(()=>import("./cose-bilkent-S5V4N54A-m126Oh3b.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");kD();var V7=C(async(e,t)=>{if(!(e.layoutAlgorithm in qa))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=qa[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:o}=e.config,{useGradient:s,gradientStart:a,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),s){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,bD,{algorithm:r.algorithm})},"render"),G7=C((e="",{fallback:t="dagre"}={})=>{if(e in qa)return e;if(t in qa)return U.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),lT="comm",cT="rule",hT="decl",vD="@import",wD="@namespace",SD="@keyframes",TD="@layer",_D=Math.abs,ca=String.fromCharCode;function uT(e){return e.trim()}function up(e,t,r){return e.replace(t,r)}function _o(e,t){return e.charCodeAt(t)|0}function ts(e,t,r){return e.slice(t,r)}function Wr(e){return e.length}function BD(e){return e.length}function zl(e,t){return t.push(e),e}var lu=1,es=1,dT=0,gr=0,Qt=0,cs="";function xm(e,t,r,i,n,o,s,a){return{value:e,root:t,parent:r,type:i,props:n,children:o,line:lu,column:es,length:s,return:"",siblings:a}}function LD(){return Qt}function ED(){return Qt=gr>0?_o(cs,--gr):0,es--,Qt===10&&(es=1,lu--),Qt}function Er(){return Qt=gr<dT?_o(cs,gr++):0,es++,Qt===10&&(es=1,lu++),Qt}function Ii(){return _o(cs,gr)}function uc(){return gr}function cu(e,t){return ts(cs,e,t)}function Wa(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function AD(e){return lu=es=1,dT=Wr(cs=e),gr=0,[]}function FD(e){return cs="",e}function gd(e){return uT(cu(gr-1,dp(e===91?e+2:e===40?e+1:e)))}function MD(e){for(;(Qt=Ii())&&Qt<33;)Er();return Wa(e)>2||Wa(Qt)>3?"":" "}function $D(e,t){for(;--t&&Er()&&!(Qt<48||Qt>102||Qt>57&&Qt<65||Qt>70&&Qt<97););return cu(e,uc()+(t<6&&Ii()==32&&Er()==32))}function dp(e){for(;Er();)switch(Qt){case e:return gr;case 34:case 39:e!==34&&e!==39&&dp(Qt);break;case 40:e===41&&dp(e);break;case 92:Er();break}return gr}function ID(e,t){for(;Er()&&e+Qt!==57;)if(e+Qt===84&&Ii()===47)break;return"/*"+cu(t,gr-1)+"*"+ca(e===47?e:Er())}function PD(e){for(;!Wa(Ii());)Er();return cu(e,gr)}function OD(e){return FD(dc("",null,null,null,[""],e=AD(e),0,[0],e))}function dc(e,t,r,i,n,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,p=0,g=1,x=1,m=1,y=0,b=0,v="",S=n,_=o,w=i,T=v;x;)switch(p=b,b=Er()){case 40:p!=108&&_o(T,u-1)==58?(y++,T+="("):T+=gd(b);break;case 41:y--,T+=")";break;case 34:case 39:case 91:T+=gd(b);break;case 9:case 10:case 13:case 32:if(y>0){T+=ca(b);break}T+=MD(p);break;case 92:T+=$D(uc()-1,7);continue;case 47:switch(Ii()){case 42:case 47:zl(RD(ID(Er(),uc()),t,r,l),l),(Wa(p||1)==5||Wa(Ii()||1)==5)&&Wr(T)&&ts(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*g:a[c++]=Wr(T)*m;case 125*g:case 59:case 0:if(y>0&&b){T+=ca(b);break}switch(b){case 0:case 125:x=0;case 59+h:m==-1&&(T=up(T,/\f/g,"")),d>0&&(Wr(T)-u||g===0)&&zl(d>32?Ux(T+";",i,r,u-1,l):Ux(up(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(zl(w=Hx(T,t,r,c,h,n,a,v,S=[],_=[],u,o),o),b===123)if(h===0)dc(T,t,w,w,S,o,u,a,_);else{switch(f){case 99:if(_o(T,3)===110)break;case 108:if(_o(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?dc(e,w,w,i&&zl(Hx(e,w,w,0,0,n,a,v,n,S=[],u,_),_),n,_,u,a,i?S:_):dc(T,w,w,w,[""],_,0,a,_)}}c=h=d=0,g=m=1,v=T="",u=s;break;case 58:u=1+Wr(T),d=p;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&ED()==125)continue}switch(T+=ca(b),b*g){case 38:m=h>0?1:(T+="\f",-1);break;case 44:if(y>0)break;a[c++]=(Wr(T)-1)*m,m=1;break;case 64:Ii()===45&&(T+=gd(Er())),f=Ii(),h=u=Wr(v=T+=PD(uc())),b++;break;case 45:p===45&&Wr(T)==2&&(g=0)}}return o}function Hx(e,t,r,i,n,o,s,a,l,c,h,u){for(var f=n-1,d=n===0?o:[""],p=BD(d),g=0,x=0,m=0;g<i;++g)for(var y=0,b=ts(e,f+1,f=_D(x=s[g])),v=e;y<p;++y)(v=uT(x>0?d[y]+" "+b:up(b,/&\f/g,d[y])))&&(l[m++]=v);return xm(e,t,r,n===0?cT:a,l,c,h,u)}function RD(e,t,r,i){return xm(e,t,r,lT,ca(LD()),ts(e,2,-2),0,i)}function Ux(e,t,r,i,n){return xm(e,t,r,hT,ts(e,0,i),ts(e,i+1,-1),i,n)}function fp(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function DD(e,t,r,i){switch(e.type){case TD:if(e.children.length)break;case vD:case wD:case hT:return e.return=e.return||e.value;case lT:return"";case SD:return e.return=e.value+"{"+fp(e.children,i)+"}";case cT:if(!Wr(e.value=e.props.join(",")))return""}return Wr(r=fp(e.children,i))?e.return=e.value+"{"+r+"}":""}var ND=O2(Object.keys,Object),zD=Object.prototype,qD=zD.hasOwnProperty;function WD(e){if(!Jh(e))return ND(e);var t=[];for(var r in Object(e))qD.call(e,r)&&r!="constructor"&&t.push(r);return t}var pp=zn(Kr,"DataView"),gp=zn(Kr,"Promise"),mp=zn(Kr,"Set"),yp=zn(Kr,"WeakMap"),Yx="[object Map]",jD="[object Object]",Vx="[object Promise]",Gx="[object Set]",Xx="[object WeakMap]",Qx="[object DataView]",HD=Nn(pp),UD=Nn(Na),YD=Nn(gp),VD=Nn(mp),GD=Nn(yp),hn=os;(pp&&hn(new pp(new ArrayBuffer(1)))!=Qx||Na&&hn(new Na)!=Yx||gp&&hn(gp.resolve())!=Vx||mp&&hn(new mp)!=Gx||yp&&hn(new yp)!=Xx)&&(hn=function(e){var t=os(e),r=t==jD?e.constructor:void 0,i=r?Nn(r):"";if(i)switch(i){case HD:return Qx;case UD:return Yx;case YD:return Vx;case VD:return Gx;case GD:return Xx}return t});var XD="[object Map]",QD="[object Set]",ZD=Object.prototype,KD=ZD.hasOwnProperty;function Zx(e){if(e==null)return!0;if(tu(e)&&(ch(e)||typeof e=="string"||typeof e.splice=="function"||Xg(e)||Qg(e)||lh(e)))return!e.length;var t=hn(e);if(t==XD||t==QD)return!e.size;if(Jh(e))return!WD(e).length;for(var r in e)if(KD.call(e,r))return!1;return!0}var fT="c4",JD=C(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-MfAO5lak.js");return{diagram:t}},__vite__mapDeps([8,9]));return{id:fT,diagram:e}},"loader"),e6={id:fT,detector:JD,loader:t6},r6=e6,pT="flowchart",i6=C((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),n6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-BtV3M5xJ.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:pT,diagram:e}},"loader"),o6={id:pT,detector:i6,loader:n6},s6=o6,gT="flowchart-v2",a6=C((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),l6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-BtV3M5xJ.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:gT,diagram:e}},"loader"),c6={id:gT,detector:a6,loader:l6},h6=c6,mT="er",u6=C(e=>/^\s*erDiagram/.test(e),"detector"),d6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-56pn_93p.js");return{diagram:t}},__vite__mapDeps([15,12,13,14]));return{id:mT,diagram:e}},"loader"),f6={id:mT,detector:u6,loader:d6},p6=f6,yT="gitGraph",g6=C(e=>/^\s*gitGraph/.test(e),"detector"),m6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-CJYeyCLe.js");return{diagram:t}},__vite__mapDeps([16,17,18,19,4,2]));return{id:yT,diagram:e}},"loader"),y6={id:yT,detector:g6,loader:m6},x6=y6,xT="gantt",C6=C(e=>/^\s*gantt/.test(e),"detector"),b6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-DTIsC6Zg.js");return{diagram:t}},__vite__mapDeps([20,21,22,23]));return{id:xT,diagram:e}},"loader"),k6={id:xT,detector:C6,loader:b6},v6=k6,CT="info",w6=C(e=>/^\s*info/.test(e),"detector"),S6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-BWyKJnpW.js");return{diagram:t}},__vite__mapDeps([24,19,4,2]));return{id:CT,diagram:e}},"loader"),T6={id:CT,detector:w6,loader:S6},bT="pie",_6=C(e=>/^\s*pie/.test(e),"detector"),B6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-BjHyHxGk.js");return{diagram:t}},__vite__mapDeps([25,17,19,4,2,26,27,22]));return{id:bT,diagram:e}},"loader"),L6={id:bT,detector:_6,loader:B6},kT="quadrantChart",E6=C(e=>/^\s*quadrantChart/.test(e),"detector"),A6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-dtluDZXs.js");return{diagram:t}},__vite__mapDeps([28,21,22,23]));return{id:kT,diagram:e}},"loader"),F6={id:kT,detector:E6,loader:A6},M6=F6,vT="xychart",$6=C(e=>/^\s*xychart(-beta)?/.test(e),"detector"),I6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-BPCOuRVl.js");return{diagram:t}},__vite__mapDeps([29,22,27,21,23]));return{id:vT,diagram:e}},"loader"),P6={id:vT,detector:$6,loader:I6},O6=P6,wT="requirement",R6=C(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),D6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-Cq8l7bOl.js");return{diagram:t}},__vite__mapDeps([30,12,13]));return{id:wT,diagram:e}},"loader"),N6={id:wT,detector:R6,loader:D6},z6=N6,ST="sequence",q6=C(e=>/^\s*sequenceDiagram/.test(e),"detector"),W6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-CYkd7oQK.js");return{diagram:t}},__vite__mapDeps([31,9,18]));return{id:ST,diagram:e}},"loader"),j6={id:ST,detector:q6,loader:W6},H6=j6,TT="class",U6=C((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Y6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-DFCaeF-7.js");return{diagram:t}},__vite__mapDeps([32,33,11,9,12,13]));return{id:TT,diagram:e}},"loader"),V6={id:TT,detector:U6,loader:Y6},G6=V6,_T="classDiagram",X6=C((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Q6=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-DFCaeF-7.js");return{diagram:t}},__vite__mapDeps([34,33,11,9,12,13]));return{id:_T,diagram:e}},"loader"),Z6={id:_T,detector:X6,loader:Q6},K6=Z6,BT="state",J6=C((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),tN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-CtyG8wBK.js");return{diagram:t}},__vite__mapDeps([35,36,12,13,1,2,3,4]));return{id:BT,diagram:e}},"loader"),eN={id:BT,detector:J6,loader:tN},rN=eN,LT="stateDiagram",iN=C((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),nN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-BLyKWfcN.js");return{diagram:t}},__vite__mapDeps([37,36,12,13]));return{id:LT,diagram:e}},"loader"),oN={id:LT,detector:iN,loader:nN},sN=oN,ET="journey",aN=C(e=>/^\s*journey/.test(e),"detector"),lN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-C2zBr-J5.js");return{diagram:t}},__vite__mapDeps([38,11,9,26]));return{id:ET,diagram:e}},"loader"),cN={id:ET,detector:aN,loader:lN},hN=cN,uN=C((e,t,r)=>{U.debug(`rendering svg for syntax error
|
|
354
|
-
`);const i=MM(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),tk(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),AT={draw:uN},dN=AT,fN={db:{},renderer:AT,parser:{parse:C(()=>{},"parse")}},pN=fN,FT="flowchart-elk",gN=C((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),mN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-BtV3M5xJ.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:FT,diagram:e}},"loader"),yN={id:FT,detector:gN,loader:mN},xN=yN,MT="timeline",CN=C(e=>/^\s*timeline/.test(e),"detector"),bN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-DZIxSyd1.js");return{diagram:t}},__vite__mapDeps([39,26]));return{id:MT,diagram:e}},"loader"),kN={id:MT,detector:CN,loader:bN},vN=kN,$T="mindmap",wN=C(e=>/^\s*mindmap/.test(e),"detector"),SN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-oAybLedr.js");return{diagram:t}},__vite__mapDeps([40,12,13]));return{id:$T,diagram:e}},"loader"),TN={id:$T,detector:wN,loader:SN},_N=TN,IT="kanban",BN=C(e=>/^\s*kanban/.test(e),"detector"),LN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-CdoYLS4Z.js");return{diagram:t}},__vite__mapDeps([41,11]));return{id:IT,diagram:e}},"loader"),EN={id:IT,detector:BN,loader:LN},AN=EN,PT="sankey",FN=C(e=>/^\s*sankey(-beta)?/.test(e),"detector"),MN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-C1Vih91z.js");return{diagram:t}},__vite__mapDeps([42,27,22]));return{id:PT,diagram:e}},"loader"),$N={id:PT,detector:FN,loader:MN},IN=$N,OT="packet",PN=C(e=>/^\s*packet(-beta)?/.test(e),"detector"),ON=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-CdBh4cEn.js");return{diagram:t}},__vite__mapDeps([43,17,19,4,2]));return{id:OT,diagram:e}},"loader"),RN={id:OT,detector:PN,loader:ON},RT="radar",DN=C(e=>/^\s*radar-beta/.test(e),"detector"),NN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-DKlBv_2L.js");return{diagram:t}},__vite__mapDeps([44,17,19,4,2]));return{id:RT,diagram:e}},"loader"),zN={id:RT,detector:DN,loader:NN},DT="block",qN=C(e=>/^\s*block(-beta)?/.test(e),"detector"),WN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-CUdblaWk.js");return{diagram:t}},__vite__mapDeps([45,11,5,1,2,14]));return{id:DT,diagram:e}},"loader"),jN={id:DT,detector:qN,loader:WN},HN=jN,NT="treeView",UN=C(e=>/^\s*treeView-beta/.test(e),"detector"),YN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CKpoRfGn.js");return{diagram:t}},__vite__mapDeps([46,17,18,19,4,2]));return{id:NT,diagram:e}},"loader"),VN={id:NT,detector:UN,loader:YN},GN=VN,zT="architecture",XN=C(e=>/^\s*architecture/.test(e),"detector"),QN=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-DHg6Ss--.js");return{diagram:t}},__vite__mapDeps([47,17,19,4,2,7]));return{id:zT,diagram:e}},"loader"),ZN={id:zT,detector:XN,loader:QN},KN=ZN,qT="ishikawa",JN=C(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),t8=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-DXYkdO3T.js");return{diagram:t}},[]);return{id:qT,diagram:e}},"loader"),e8={id:qT,detector:JN,loader:t8},WT="venn",r8=C(e=>/^\s*venn-beta/.test(e),"detector"),i8=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-Ct4JVRDM.js");return{diagram:t}},[]);return{id:WT,diagram:e}},"loader"),n8={id:WT,detector:r8,loader:i8},o8=n8,jT="treemap",s8=C(e=>/^\s*treemap/.test(e),"detector"),a8=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-Cjh115Ep.js");return{diagram:t}},__vite__mapDeps([48,13,17,19,4,2,23,27,22]));return{id:jT,diagram:e}},"loader"),l8={id:jT,detector:s8,loader:a8},HT="wardley-beta",c8=C(e=>/^\s*wardley-beta/i.test(e),"detector"),h8=C(async()=>{const{diagram:e}=await vt(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-D-Ua6Cmi.js");return{diagram:t}},__vite__mapDeps([49,17,19,4,2]));return{id:HT,diagram:e}},"loader"),u8={id:HT,detector:c8,loader:h8},d8=u8,Kx=!1,hu=C(()=>{Kx||(Kx=!0,Hc("error",pN,e=>e.toLowerCase().trim()==="error"),Hc("---",{db:{clear:C(()=>{},"clear")},styles:{},renderer:{draw:C(()=>{},"draw")},parser:{parse:C(()=>{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:C(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),bf(xN,_N,KN),bf(r6,AN,K6,G6,p6,v6,T6,L6,z6,H6,h6,s6,vN,x6,sN,rN,hN,M6,IN,RN,O6,HN,GN,zN,e8,l8,o8,d8))},"addDiagrams"),f8=C(async()=>{U.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Bn).map(async([r,{detector:i,loader:n}])=>{if(n)try{Sf(r)}catch{try{const{diagram:o,id:s}=await n();Hc(s,o,i)}catch(o){throw U.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Bn[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){U.error(`Failed to load ${t.length} external diagrams`);for(const r of t)U.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),p8="graphics-document document";function UT(e,t){e.attr("role",p8),t!==""&&e.attr("aria-roledescription",t)}C(UT,"setA11yDiagramInfo");function YT(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}C(YT,"addSVGa11yTitleDescription");var kn,xp=(kn=class{constructor(t,r,i,n,o){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=o}static async fromText(t,r={}){var c,h;const i=Wt(),n=kg(t,i);t=RP(t)+`
|
|
355
|
-
`;try{Sf(n)}catch{const u=ZE(n);if(!u)throw new zb(`Diagram ${n} not found.`);const{id:f,diagram:d}=await u();Hc(f,d)}const{db:o,parser:s,renderer:a,init:l}=Sf(n);return s.parser&&(s.parser.yy=o),(c=o.clear)==null||c.call(o),l==null||l(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await s.parse(t),new kn(n,t,o,s,a)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},C(kn,"Diagram"),kn),Jx=[],g8=C(()=>{Jx.forEach(e=>{e()}),Jx=[]},"attachFunctions"),m8=C(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function VT(e){const t=e.match(Nb);if(!t)return{text:e,metadata:{}};let r=N$(t[1],{schema:D$})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}C(VT,"extractFrontMatter");var y8=C(e=>e.replace(/\r\n?/g,`
|
|
356
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),x8=C(e=>{const{text:t,metadata:r}=VT(e),{displayMode:i,title:n,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:n,config:o,text:t}},"processFrontmatter"),C8=C(e=>{const t=Tr.detectInit(e)??{},r=Tr.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:SP(e),directive:t}},"processDirectives");function Cm(e){const t=y8(e),r=x8(t),i=C8(r.text),n=rm(r.config,i.directive);return e=m8(i.text),{code:e,title:r.title,config:n}}C(Cm,"preprocessDiagram");function GT(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}C(GT,"toBase64");var b8=5e4,k8="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",v8="sandbox",w8="loose",S8="http://www.w3.org/2000/svg",T8="http://www.w3.org/1999/xlink",_8="http://www.w3.org/1999/xhtml",B8="100%",L8="100%",E8="border:0;margin:0;",A8="margin:0",F8="allow-top-navigation-by-user-activation allow-popups",M8='The "iframe" tag is not supported by your browser.',$8=["foreignobject"],I8=["dominant-baseline"];function bm(e){const t=Cm(e);return Wc(),TA(t.config??{}),t}C(bm,"processAndSetConfigs");async function XT(e,t){hu();try{const{code:r,config:i}=bm(e);return{diagramType:(await ZT(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}C(XT,"parse");var tC=C((e,t,r=[])=>`
|
|
357
|
-
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),P8=C((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
358
|
-
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
359
|
-
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
360
|
-
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=$e(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(a=>{Zx(a.styles)||s.forEach(l=>{r+=tC(a.id,l,a.styles)}),Zx(a.textStyles)||(r+=tC(a.id,"tspan",((a==null?void 0:a.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),O8=C((e,t,r,i)=>{const n=P8(e,r),o=HA(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return fp(OD(`${i}{${o}}`),DD)},"createUserStyles"),R8=C((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Mn(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),D8=C((e="",t)=>{var n,o;const r=(o=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":L8,i=GT(`<body style="${A8}">${e}</body>`);return`<iframe style="width:${B8};height:${r};${E8}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${F8}">
|
|
361
|
-
${M8}
|
|
362
|
-
</iframe>`},"putIntoIFrame"),eC=C((e,t,r,i,n)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",S8);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function Cp(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}C(Cp,"sandboxedIframe");var N8=C((e,t,r,i)=>{var n,o,s;(n=e.getElementById(t))==null||n.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),z8=C(async function(e,t,r){var V,j,P,I,$,O;hu();const i=bm(t);t=i.code;const n=Wt();U.debug(n),t.length>((n==null?void 0:n.maxTextSize)??b8)&&(t=k8);const o="#"+e,s="i"+e,a="#"+s,l="d"+e,c="#"+l,h=C(()=>{const z=xt(f?a:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let u=xt("body");const f=n.securityLevel===v8,d=n.securityLevel===w8,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const B=Cp(xt(r),s);u=xt(B.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=xt(r);eC(u,e,l,`font-family: ${p}`,T8)}else{if(N8(document,e,l,s),f){const B=Cp(xt("body"),s);u=xt(B.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=xt("body");eC(u,e,l)}let g,x;try{g=await xp.fromText(t,{title:i.title})}catch(B){if(n.suppressErrorRendering)throw h(),B;g=await xp.fromText("error"),x=B}const m=u.select(c).node(),y=g.type,b=m.firstChild,v=b.firstChild,S=(j=(V=g.renderer).getClasses)==null?void 0:j.call(V,t,g),_=O8(n,y,S,o),w=document.createElement("style");w.innerHTML=_,b.insertBefore(w,v);try{await g.renderer.draw(t,e,"11.14.0",g)}catch(B){throw n.suppressErrorRendering?h():dN.draw(t,e,"11.14.0"),B}const T=u.select(`${c} svg`),D=(I=(P=g.db).getAccTitle)==null?void 0:I.call(P),A=(O=($=g.db).getAccDescription)==null?void 0:O.call($);KT(y,T,D,A),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",_8);let F=u.select(c).node().innerHTML;if(U.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),F=R8(F,f,bi(n.arrowMarkerAbsolute)),f){const B=u.select(c+" svg").node();F=D8(F,B)}else d||(F=Go.sanitize(F,{ADD_TAGS:$8,ADD_ATTR:I8,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(g8(),x)throw x;return h(),{diagramType:y,svg:F,bindFunctions:g.db.bindFunctions}},"render");function QT(e={}){var i;const t=ee({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),wA(t),t!=null&&t.theme&&t.theme in ui?t.themeVariables=ui[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ui.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?vA(t):Ub();bg(r.logLevel),hu()}C(QT,"initialize");var ZT=C((e,t={})=>{const{code:r}=Cm(e);return xp.fromText(r,t)},"getDiagramFromText");function KT(e,t,r,i){UT(t,e),YT(t,r,i,t.attr("id"))}C(KT,"addA11yInfo");var In=Object.freeze({render:z8,parse:XT,getDiagramFromText:ZT,initialize:QT,getConfig:Wt,setConfig:Yb,getSiteConfig:Ub,updateSiteConfig:SA,reset:C(()=>{Wc()},"reset"),globalReset:C(()=>{Wc(Xo)},"globalReset"),defaultConfig:Xo});bg(Wt().logLevel);Wc(Wt());var q8=C((e,t,r)=>{U.warn(e),em(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),JT=C(async function(e={querySelector:".mermaid"}){try{await W8(e)}catch(t){if(em(t)&&U.error(t.str),tr.parseError&&tr.parseError(t),!e.suppressErrors)throw U.error("Use the suppressErrors option to suppress these errors"),t}},"run"),W8=C(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=In.getConfig();U.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");U.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(U.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),In.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Tr.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const a=[];for(const l of Array.from(n)){if(U.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;s=l.innerHTML,s=mw(Tr.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Tr.detectInit(s);h&&U.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await i_(c,s,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){q8(u,a,tr.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),t_=C(function(e){In.initialize(e)},"initialize"),j8=C(async function(e,t,r){U.warn("mermaid.init is deprecated. Please use run instead."),e&&t_(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await JT(i)},"init"),H8=C(async(e,{lazyLoad:t=!0}={})=>{hu(),bf(...e),t===!1&&await f8()},"registerExternalDiagrams"),e_=C(function(){if(tr.startOnLoad){const{startOnLoad:e}=In.getConfig();e&&tr.run().catch(t=>U.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",e_,!1);var U8=C(function(e){tr.parseError=e},"setParseErrorHandler"),bh=[],md=!1,r_=C(async()=>{if(!md){for(md=!0;bh.length>0;){const e=bh.shift();if(e)try{await e()}catch(t){U.error("Error executing queue",t)}}md=!1}},"executeQueue"),Y8=C(async(e,t)=>new Promise((r,i)=>{const n=C(()=>new Promise((o,s)=>{In.parse(e,t).then(a=>{o(a),r(a)},a=>{var l;U.error("Error parsing",a),(l=tr.parseError)==null||l.call(tr,a),s(a),i(a)})}),"performCall");bh.push(n),r_().catch(i)}),"parse"),i_=C((e,t,r)=>new Promise((i,n)=>{const o=C(()=>new Promise((s,a)=>{In.render(e,t,r).then(l=>{s(l),i(l)},l=>{var c;U.error("Error parsing",l),(c=tr.parseError)==null||c.call(tr,l),a(l),n(l)})}),"performCall");bh.push(o),r_().catch(n)}),"render"),V8=C(()=>Object.keys(Bn).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),tr={startOnLoad:!0,mermaidAPI:In,parse:Y8,render:i_,init:j8,run:JT,registerExternalDiagrams:H8,registerLayoutLoaders:aT,initialize:t_,parseError:void 0,contentLoaded:e_,setParseErrorHandler:U8,detectType:kg,registerIconPacks:HO,getRegisteredDiagramsMetadata:V8},bp=tr;/*! Check if previously processed *//*!
|
|
363
|
-
* Wait for document loaded before starting the execution
|
|
364
|
-
*/let kp=null;function G8(){const t=document.documentElement.classList.contains("dark")?"dark":"default";kp!==t&&(bp.initialize({startOnLoad:!1,theme:t,securityLevel:"loose",fontFamily:"'DM Sans', system-ui, sans-serif",suppressErrorRendering:!0}),kp=t)}function X8({content:e,onError:t,theme:r,version:i}){const n=st.useRef(null),[o,s]=st.useState(null);return st.useEffect(()=>{s(null)},[e,i]),st.useEffect(()=>{kp=null},[r]),st.useEffect(()=>{if(!n.current||!e.trim())return;G8();const a=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;bp.parse(e.trim()).then(()=>bp.render(a,e.trim())).then(({svg:l})=>{n.current&&(n.current.innerHTML=l)}).catch(l=>{var h;const c=String(l);s(c),n.current&&(n.current.innerHTML=""),(h=document.getElementById(a))==null||h.remove(),t==null||t(c,e.trim())})},[e,r,i]),M.jsxs("div",{className:"relative flex-1 min-h-0",children:[M.jsx("div",{ref:n,className:`mermaid-container flex items-center justify-center ${o?"hidden":""}`}),o&&M.jsx("div",{className:"flex h-full items-center justify-center",children:M.jsxs("div",{className:"text-center text-muted-foreground",children:[M.jsx("p",{className:"text-sm font-medium",children:"Diagram syntax error — reported to Claude"}),M.jsx("p",{className:"mt-1 text-xs",children:"Waiting for corrected diagram..."})]})})]})}function km(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wn=km();function n_(e){Wn=e}var ha={exec:()=>null};function Lt(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Ae.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var Ae={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Q8=/^(?:[ \t]*(?:\n|$))+/,Z8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,K8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,sl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,J8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vm=/(?:[*+-]|\d{1,9}[.)])/,o_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,s_=Lt(o_).replace(/bull/g,vm).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(),tz=Lt(o_).replace(/bull/g,vm).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(),wm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ez=/^[^\n]+/,Sm=/(?!\s*\])(?:\\.|[^\[\]\\])+/,rz=Lt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iz=Lt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vm).getRegex(),uu="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",Tm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nz=Lt("^ {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",Tm).replace("tag",uu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a_=Lt(wm).replace("hr",sl).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",uu).getRegex(),oz=Lt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",a_).getRegex(),_m={blockquote:oz,code:Z8,def:rz,fences:K8,heading:J8,hr:sl,html:nz,lheading:s_,list:iz,newline:Q8,paragraph:a_,table:ha,text:ez},rC=Lt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",sl).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",uu).getRegex(),sz={..._m,lheading:tz,table:rC,paragraph:Lt(wm).replace("hr",sl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rC).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",uu).getRegex()},az={..._m,html:Lt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tm).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:ha,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Lt(wm).replace("hr",sl).replace("heading",` *#{1,6} *[^
|
|
365
|
-
]`).replace("lheading",s_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lz=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cz=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,l_=/^( {2,}|\\)\n(?!\s*$)/,hz=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,du=/[\p{P}\p{S}]/u,Bm=/[\s\p{P}\p{S}]/u,c_=/[^\s\p{P}\p{S}]/u,uz=Lt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bm).getRegex(),h_=/(?!~)[\p{P}\p{S}]/u,dz=/(?!~)[\s\p{P}\p{S}]/u,fz=/(?:[^\s\p{P}\p{S}]|~)/u,pz=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,u_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,gz=Lt(u_,"u").replace(/punct/g,du).getRegex(),mz=Lt(u_,"u").replace(/punct/g,h_).getRegex(),d_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yz=Lt(d_,"gu").replace(/notPunctSpace/g,c_).replace(/punctSpace/g,Bm).replace(/punct/g,du).getRegex(),xz=Lt(d_,"gu").replace(/notPunctSpace/g,fz).replace(/punctSpace/g,dz).replace(/punct/g,h_).getRegex(),Cz=Lt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,c_).replace(/punctSpace/g,Bm).replace(/punct/g,du).getRegex(),bz=Lt(/\\(punct)/,"gu").replace(/punct/g,du).getRegex(),kz=Lt(/^<(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(),vz=Lt(Tm).replace("(?:-->|$)","-->").getRegex(),wz=Lt("^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",vz).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Sz=Lt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),f_=Lt(/^!?\[(label)\]\[(ref)\]/).replace("label",kh).replace("ref",Sm).getRegex(),p_=Lt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sm).getRegex(),Tz=Lt("reflink|nolink(?!\\()","g").replace("reflink",f_).replace("nolink",p_).getRegex(),Lm={_backpedal:ha,anyPunctuation:bz,autolink:kz,blockSkip:pz,br:l_,code:cz,del:ha,emStrongLDelim:gz,emStrongRDelimAst:yz,emStrongRDelimUnd:Cz,escape:lz,link:Sz,nolink:p_,punctuation:uz,reflink:f_,reflinkSearch:Tz,tag:wz,text:hz,url:ha},_z={...Lm,link:Lt(/^!?\[(label)\]\((.*?)\)/).replace("label",kh).getRegex(),reflink:Lt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kh).getRegex()},vp={...Lm,emStrongRDelimAst:xz,emStrongLDelim:mz,url:Lt(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Bz={...vp,br:Lt(l_).replace("{2,}","*").getRegex(),text:Lt(vp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ql={normal:_m,gfm:sz,pedantic:az},Ms={normal:Lm,gfm:vp,breaks:Bz,pedantic:_z},Lz={"&":"&","<":"<",">":">",'"':""","'":"'"},iC=e=>Lz[e];function zr(e,t){if(t){if(Ae.escapeTest.test(e))return e.replace(Ae.escapeReplace,iC)}else if(Ae.escapeTestNoEncode.test(e))return e.replace(Ae.escapeReplaceNoEncode,iC);return e}function nC(e){try{e=encodeURI(e).replace(Ae.percentDecode,"%")}catch{return null}return e}function oC(e,t){var o;const r=e.replace(Ae.findPipe,(s,a,l)=>{let c=!1,h=a;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Ae.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ae.slashPipe,"|");return i}function $s(e,t,r){const i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Ez(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function sC(e,t,r,i,n){const o=t.href,s=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function Az(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(`
|
|
366
|
-
`).map(o=>{const s=o.match(r.other.beginningSpace);if(s===null)return o;const[a]=s;return a.length>=n.length?o.slice(n.length):o}).join(`
|
|
367
|
-
`)}var vh=class{constructor(e){lt(this,"options");lt(this,"rules");lt(this,"lexer");this.options=e||Wn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:$s(r,`
|
|
368
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],i=Az(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const i=$s(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:$s(t[0],`
|
|
369
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=$s(t[0],`
|
|
370
|
-
`).split(`
|
|
371
|
-
`),i="",n="";const o=[];for(;r.length>0;){let s=!1;const a=[];let l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))a.push(r[l]),s=!0;else if(!s)a.push(r[l]);else break;r=r.slice(l);const c=a.join(`
|
|
372
|
-
`),h=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
373
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
374
|
-
${c}`:c,n=n?`${n}
|
|
375
|
-
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,o,!0),this.lexer.state.top=u,r.length===0)break;const f=o.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const d=f,p=d.raw+`
|
|
376
|
-
`+r.join(`
|
|
377
|
-
`),g=this.blockquote(p);o[o.length-1]=g,i=i.substring(0,i.length-d.raw.length)+g.raw,n=n.substring(0,n.length-d.text.length)+g.text;break}else if((f==null?void 0:f.type)==="list"){const d=f,p=d.raw+`
|
|
378
|
-
`+r.join(`
|
|
379
|
-
`),g=this.list(p);o[o.length-1]=g,i=i.substring(0,i.length-f.raw.length)+g.raw,n=n.substring(0,n.length-d.raw.length)+g.raw,r=p.substring(o.at(-1).raw.length).split(`
|
|
380
|
-
`);continue}}return{type:"blockquote",raw:i,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let s=!1;for(;e;){let l=!1,c="",h="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(`
|
|
381
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,m=>" ".repeat(3*m.length)),f=e.split(`
|
|
382
|
-
`,1)[0],d=!u.trim(),p=0;if(this.options.pedantic?(p=2,h=u.trimStart()):d?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,h=u.slice(p),p+=t[1].length),d&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
383
|
-
`,e=e.substring(f.length+1),l=!0),!l){const m=this.rules.other.nextBulletRegex(p),y=this.rules.other.hrRegex(p),b=this.rules.other.fencesBeginRegex(p),v=this.rules.other.headingBeginRegex(p),S=this.rules.other.htmlBeginRegex(p);for(;e;){const _=e.split(`
|
|
384
|
-
`,1)[0];let w;if(f=_,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),w=f):w=f.replace(this.rules.other.tabCharGlobal," "),b.test(f)||v.test(f)||S.test(f)||m.test(f)||y.test(f))break;if(w.search(this.rules.other.nonSpaceChar)>=p||!f.trim())h+=`
|
|
385
|
-
`+w.slice(p);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(u)||v.test(u)||y.test(u))break;h+=`
|
|
386
|
-
`+f}!d&&!f.trim()&&(d=!0),c+=_+`
|
|
387
|
-
`,e=e.substring(_.length+1),u=w.slice(p)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let g=null,x;this.options.gfm&&(g=this.rules.other.listIsTask.exec(h),g&&(x=g[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:c,task:!!g,checked:x,loose:!1,text:h,tokens:[]}),n.raw+=c}const a=n.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;l<n.items.length;l++)if(this.lexer.state.top=!1,n.items[l].tokens=this.lexer.blockTokens(n.items[l].text,[]),!n.loose){const c=n.items[l].tokens.filter(u=>u.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let l=0;l<n.items.length;l++)n.items[l].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){var s;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=oC(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
388
|
-
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<r.length;a++)o.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:o.align[a]});for(const a of n)o.rows.push(oC(a,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
389
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=$s(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=Ez(t[2],"()");if(o===-2)return;if(o>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],n=o[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),sC(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return sC(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...i[0]].length-1;let s,a,l=o,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+o);(i=h.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&o%3&&!((o+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);const u=[...i[0]][0].length,f=e.slice(0,o+i.index+u+a);if(Math.min(o,a)%2){const p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=t[0],n="mailto:"+i;else{let o;do o=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(o!==t[0]);i=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},li=class wp{constructor(t){lt(this,"tokens");lt(this,"options");lt(this,"state");lt(this,"tokenizer");lt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Wn,this.options.tokenizer=this.options.tokenizer||new vh,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 r={other:Ae,block:ql.normal,inline:Ms.normal};this.options.pedantic?(r.block=ql.pedantic,r.inline=Ms.pedantic):this.options.gfm&&(r.block=ql.gfm,this.options.breaks?r.inline=Ms.breaks:r.inline=Ms.gfm),this.tokenizer.rules=r}static get rules(){return{block:ql,inline:Ms}}static lex(t,r){return new wp(r).lex(t)}static lexInline(t,r){return new wp(r).inlineTokens(t)}lex(t){t=t.replace(Ae.carriageReturn,`
|
|
390
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,o,s;for(this.options.pedantic&&(t=t.replace(Ae.tabCharGlobal," ").replace(Ae.spaceLine,""));t;){let a;if((o=(n=this.options.extensions)==null?void 0:n.block)!=null&&o.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);const c=r.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
|
|
391
|
-
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
392
|
-
`+a.raw,c.text+=`
|
|
393
|
-
`+a.text,this.inlineQueue.at(-1).src=c.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
394
|
-
`+a.raw,c.text+=`
|
|
395
|
-
`+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if((s=this.options.extensions)!=null&&s.startBlock){let c=1/0;const h=t.slice(1);let u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){const c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
|
396
|
-
`+a.raw,c.text+=`
|
|
397
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(a),i=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
398
|
-
`+a.raw,c.text+=`
|
|
399
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(a);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var a,l,c;let i=t,n=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,s="";for(;t;){o||(s=""),o=!1;let h;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(h=f.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);const f=r.at(-1);h.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,s)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let u=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0;const d=t.slice(1);let p;this.options.extensions.startInline.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(h=this.tokenizer.inlineText(u)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(s=h.raw.slice(-1)),o=!0;const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=h.raw,f.text+=h.text):r.push(h);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},wh=class{constructor(e){lt(this,"options");lt(this,"parser");this.options=e||Wn}space(e){return""}code({text:e,lang:t,escaped:r}){var o;const i=(o=(t||"").match(Ae.notSpaceStart))==null?void 0:o[0],n=e.replace(Ae.endingNewline,"")+`
|
|
400
|
-
`;return i?'<pre><code class="language-'+zr(i)+'">'+(r?n:zr(n,!0))+`</code></pre>
|
|
401
|
-
`:"<pre><code>"+(r?n:zr(n,!0))+`</code></pre>
|
|
402
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
403
|
-
${this.parser.parse(e)}</blockquote>
|
|
404
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
405
|
-
`}hr(e){return`<hr>
|
|
406
|
-
`}list(e){const t=e.ordered,r=e.start;let i="";for(let s=0;s<e.items.length;s++){const a=e.items[s];i+=this.listitem(a)}const n=t?"ol":"ul",o=t&&r!==1?' start="'+r+'"':"";return"<"+n+o+`>
|
|
407
|
-
`+i+"</"+n+`>
|
|
408
|
-
`}listitem(e){var r;let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=i+" "+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=i+" "+zr(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
409
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
410
|
-
`}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){const o=e.rows[n];r="";for(let s=0;s<o.length;s++)r+=this.tablecell(o[s]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
411
|
-
<thead>
|
|
412
|
-
`+t+`</thead>
|
|
413
|
-
`+i+`</table>
|
|
414
|
-
`}tablerow({text:e}){return`<tr>
|
|
415
|
-
${e}</tr>
|
|
416
|
-
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
417
|
-
`}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>${zr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),n=nC(e);if(n===null)return i;e=n;let o='<a href="'+e+'"';return t&&(o+=' title="'+zr(t)+'"'),o+=">"+i+"</a>",o}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=nC(e);if(n===null)return zr(r);e=n;let o=`<img src="${e}" alt="${r}"`;return t&&(o+=` title="${zr(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:zr(e.text)}},Em=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""}},ci=class Sp{constructor(t){lt(this,"options");lt(this,"renderer");lt(this,"textRenderer");this.options=t||Wn,this.options.renderer=this.options.renderer||new wh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Em}static parse(t,r){return new Sp(r).parse(t)}static parseInline(t,r){return new Sp(r).parseInline(t)}parse(t,r=!0){var n,o;let i="";for(let s=0;s<t.length;s++){const a=t[s];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[a.type]){const c=a,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){i+=h||"";continue}}const l=a;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],h+=`
|
|
418
|
-
`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var n,o;let i="";for(let s=0;s<t.length;s++){const a=t[s];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[a.type]){const c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=c||"";continue}}const l=a;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},wd,fc=(wd=class{constructor(e){lt(this,"options");lt(this,"block");this.options=e||Wn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?li.lex:li.lexInline}provideParser(){return this.block?ci.parse:ci.parseInline}},lt(wd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),wd),Fz=class{constructor(...e){lt(this,"defaults",km());lt(this,"options",this.setOptions);lt(this,"parse",this.parseMarkdown(!0));lt(this,"parseInline",this.parseMarkdown(!1));lt(this,"Parser",ci);lt(this,"Renderer",wh);lt(this,"TextRenderer",Em);lt(this,"Lexer",li);lt(this,"Tokenizer",vh);lt(this,"Hooks",fc);this.use(...e)}walkTokens(e,t){var i,n;let r=[];for(const o of e)switch(r=r.concat(t.call(this,o)),o.type){case"table":{const s=o;for(const a of s.header)r=r.concat(this.walkTokens(a.tokens,t));for(const a of s.rows)for(const l of a)r=r.concat(this.walkTokens(l.tokens,t));break}case"list":{const s=o;r=r.concat(this.walkTokens(s.items,t));break}default:{const s=o;(n=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&n[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{const l=s[a].flat(1/0);r=r.concat(this.walkTokens(l,t))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const o=t.renderers[n.name];o?t.renderers[n.name]=function(...s){let a=n.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[n.level];o?o.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){const n=this.defaults.renderer||new wh(this.defaults);for(const o in r.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o,a=r.renderer[s],l=n[s];n[s]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new vh(this.defaults);for(const o in r.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,a=r.tokenizer[s],l=n[s];n[s]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new fc;for(const o in r.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const s=o,a=r.hooks[s],l=n[s];fc.passThroughHooks.has(o)?n[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(n,c)).then(u=>l.call(n,u));const h=a.call(n,c);return l.call(n,h)}:n[s]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),n&&(a=a.concat(n.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return li.lex(e,t??this.defaults)}parser(e,t){return ci.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const n={...i},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const a=o.hooks?o.hooks.provideLexer():e?li.lex:li.lexInline,l=o.hooks?o.hooks.provideParser():e?ci.parse:ci.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(s);try{o.hooks&&(r=o.hooks.preprocess(r));let c=a(r,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=l(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return s(c)}}}onError(e,t){return r=>{if(r.message+=`
|
|
419
|
-
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+zr(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},Pn=new Fz;function Et(e,t){return Pn.parse(e,t)}Et.options=Et.setOptions=function(e){return Pn.setOptions(e),Et.defaults=Pn.defaults,n_(Et.defaults),Et};Et.getDefaults=km;Et.defaults=Wn;Et.use=function(...e){return Pn.use(...e),Et.defaults=Pn.defaults,n_(Et.defaults),Et};Et.walkTokens=function(e,t){return Pn.walkTokens(e,t)};Et.parseInline=Pn.parseInline;Et.Parser=ci;Et.parser=ci.parse;Et.Renderer=wh;Et.TextRenderer=Em;Et.Lexer=li;Et.lexer=li.lex;Et.Tokenizer=vh;Et.Hooks=fc;Et.parse=Et;Et.options;Et.setOptions;Et.use;Et.walkTokens;Et.parseInline;ci.parse;li.lex;function Mz({content:e,theme:t}){const r=st.useRef(null),i=st.useMemo(()=>Et.parse(e,{async:!1}),[e]);return st.useEffect(()=>{const n=r.current;if(!n)return;const o=n.contentDocument;if(!o)return;const s=document.documentElement.classList.contains("dark");o.open(),o.write(`
|
|
420
|
-
<!DOCTYPE html>
|
|
421
|
-
<html>
|
|
422
|
-
<head>
|
|
423
|
-
<meta charset="UTF-8">
|
|
424
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,100..1000&display=swap" rel="stylesheet">
|
|
425
|
-
<style>
|
|
426
|
-
*, *::before, *::after { box-sizing: border-box; }
|
|
427
|
-
html, body {
|
|
428
|
-
margin: 0;
|
|
429
|
-
padding: 1rem;
|
|
430
|
-
font-family: 'DM Sans', system-ui, sans-serif;
|
|
431
|
-
font-size: 14px;
|
|
432
|
-
line-height: 1.7;
|
|
433
|
-
color: ${s?"#e4e4e7":"#18181b"};
|
|
434
|
-
background: transparent;
|
|
435
|
-
}
|
|
436
|
-
h1, h2, h3, h4, h5, h6 { margin: 1em 0 0.5em; font-weight: 700; }
|
|
437
|
-
h1 { font-size: 1.75em; }
|
|
438
|
-
h2 { font-size: 1.4em; }
|
|
439
|
-
h3 { font-size: 1.15em; }
|
|
440
|
-
p { margin: 0.5em 0; }
|
|
441
|
-
ul, ol { padding-left: 1.5em; margin: 0.5em 0; }
|
|
442
|
-
code {
|
|
443
|
-
font-family: ui-monospace, monospace;
|
|
444
|
-
font-size: 0.85em;
|
|
445
|
-
background: ${s?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"};
|
|
446
|
-
padding: 0.15em 0.35em;
|
|
447
|
-
border-radius: 4px;
|
|
448
|
-
}
|
|
449
|
-
pre {
|
|
450
|
-
background: ${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"};
|
|
451
|
-
padding: 0.75em 1em;
|
|
452
|
-
border-radius: 6px;
|
|
453
|
-
overflow-x: auto;
|
|
454
|
-
margin: 0.75em 0;
|
|
455
|
-
}
|
|
456
|
-
pre code { background: none; padding: 0; }
|
|
457
|
-
a { color: ${s?"#a78bfa":"#7c3aed"}; }
|
|
458
|
-
blockquote {
|
|
459
|
-
border-left: 3px solid ${s?"rgba(255,255,255,0.15)":"rgba(0,0,0,0.15)"};
|
|
460
|
-
padding-left: 1em;
|
|
461
|
-
margin: 0.75em 0;
|
|
462
|
-
color: ${s?"#a1a1aa":"#71717a"};
|
|
463
|
-
}
|
|
464
|
-
table { border-collapse: collapse; width: 100%; margin: 0.75em 0; }
|
|
465
|
-
th, td {
|
|
466
|
-
border: 1px solid ${s?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"};
|
|
467
|
-
padding: 0.4em 0.75em;
|
|
468
|
-
text-align: left;
|
|
469
|
-
}
|
|
470
|
-
th { font-weight: 600; background: ${s?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)"}; }
|
|
471
|
-
hr { border: none; border-top: 1px solid ${s?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"}; margin: 1.5em 0; }
|
|
472
|
-
</style>
|
|
473
|
-
</head>
|
|
474
|
-
<body>${i}</body>
|
|
475
|
-
</html>
|
|
476
|
-
`),o.close()},[i,t]),M.jsx("iframe",{ref:r,sandbox:"allow-same-origin",className:"w-full h-full border-0",title:"Markdown Preview"})}function $z({options:e,selections:t,onToggle:r}){return e.length===0?M.jsx("p",{className:"text-sm text-muted-foreground",children:"No options provided."}):M.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:e.map(i=>{const n=!!t[i.id];return M.jsxs("button",{className:`deck-option-card text-left ${n?"selected":""}`,onClick:()=>r(i.id),children:[M.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[M.jsx("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded border text-xs transition-colors ${n?"border-primary bg-primary text-primary-foreground":"border-muted-foreground/30"}`,children:n&&M.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:M.jsx("path",{d:"M5 13l4 4L19 7"})})}),M.jsx("span",{className:"text-sm font-medium",children:i.label})]}),i.description&&M.jsx("p",{className:"ml-6 text-xs text-muted-foreground",children:i.description}),i.preview&&M.jsx("pre",{className:"ml-6 mt-2 overflow-auto rounded bg-muted p-2 text-xs",children:i.preview})]},i.id)})})}function Iz({src:e,version:t}){return M.jsx("iframe",{src:e,className:"w-full h-full border-0",title:"Generated Visualization"},t??0)}const Pz="https://unpkg.com/wired-elements?module";let yd=!1;function Oz(){if(yd)return;if(document.querySelector("script[data-wired-cdn]")){yd=!0;return}const e=document.createElement("script");e.type="module",e.src=Pz,e.dataset.wiredCdn="1",document.head.appendChild(e),yd=!0}function Rz({content:e,theme:t,version:r}){const i=st.useRef(null);return st.useEffect(()=>{Oz()},[]),st.useEffect(()=>{if(!i.current)return;const n=i.current,o=n.shadowRoot??n.attachShadow({mode:"open"});o.innerHTML=e;const s=t==="dark"||document.documentElement.classList.contains("dark");n.style.setProperty("--page-fg",s?"#e4e4e7":"#18181b"),n.style.setProperty("--page-accent",s?"#a78bfa":"#7c3aed")},[e,t,r]),M.jsx("div",{ref:i,className:"wired-block-host w-full block",style:{display:"block",minHeight:120}})}function xd(e,t,r){const i=new Blob([t],{type:r}),n=URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=e,o.click(),URL.revokeObjectURL(n)}function Dz(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"download"}function Nz(){return M.jsx("div",{className:"flex h-full items-center justify-center",children:M.jsx("div",{className:"text-center text-muted-foreground/20",children:M.jsx("svg",{className:"mx-auto h-12 w-12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:M.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})})})})}function zz(e,t,r,i,n,o){switch(e.type){case"html":return M.jsx(fE,{content:e.content??"",theme:n});case"mermaid":return M.jsx(X8,{content:e.content??"",onError:i,theme:n,version:o});case"markdown":return M.jsx(Mz,{content:e.content??"",theme:n});case"iframe":return M.jsx(Iz,{src:e.src??"",version:o});case"rich-html":return e.framework==="wired"?M.jsx(Rz,{content:e.content??"",theme:n,version:o}):M.jsxs("div",{className:"p-4 text-muted-foreground",children:['rich-html framework "',e.framework??"?",'" not handled inline — expected server to rewrite to iframe.']});case"options":return M.jsx($z,{options:e.options??[],selections:t,onToggle:r});default:return M.jsxs("div",{className:"p-4 text-muted-foreground",children:["Unknown block type: ",e.type]})}}function qz({sessions:e,activeSessionIndex:t,onSessionChange:r,onCloseSession:i,onToggleSelection:n,onMermaidError:o,theme:s,onRespond:a,onShareSession:l,isActiveSessionShared:c,isActiveSessionStale:h,onDeleteSession:u,onDeleteRemote:f,immersive:d,onToggleImmersive:p}){const[g,x]=st.useState(0),m=e[t]??null,y=st.useCallback(async()=>{if(!m)return;const S=m.id;if(confirm(`Delete session "${S}"?`)){if(c&&f&&confirm(`Also delete the shared cloud copy of "${S}"?`))try{await f(S)}catch{if(!confirm("Couldn't delete the cloud copy. Delete the local session anyway?"))return}u==null||u(S)}},[m,c,f,u]),b=st.useCallback(()=>{if(!m)return;const S=m.blocks[g]??m.blocks[0];if(!S)return;const _=Dz(S.label||m.id);switch(S.type){case"html":xd(`${_}.html`,S.content??"","text/html");break;case"mermaid":{const w=document.querySelector(`[data-block-index="${g}"] .mermaid-container svg`);if(w){const D=new XMLSerializer().serializeToString(w),A="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(D),F=new Image;F.onload=()=>{const j=document.createElement("canvas");j.width=F.width*2,j.height=F.height*2;const P=j.getContext("2d");P.scale(2,2);const I=document.querySelector(".deck-canvas");I&&(P.fillStyle=getComputedStyle(I).backgroundColor,P.fillRect(0,0,F.width,F.height)),P.drawImage(F,0,0);const $=j.toDataURL("image/png"),O=document.createElement("a");O.href=$,O.download=`${_}.png`,O.click()},F.src=A}break}case"markdown":xd(`${_}.md`,S.content??"","text/markdown");break;case"options":{const w={options:S.options??[],selections:Object.fromEntries(Object.entries(m.selections).filter(([,T])=>T))};xd(`${_}.json`,JSON.stringify(w,null,2),"application/json");break}}},[m,g]);if(st.useEffect(()=>{if(!d||!p)return;const S=T=>{T.key==="Escape"&&p()};window.addEventListener("keydown",S);const _=[],w=Array.from(document.querySelectorAll(".deck-canvas iframe"));for(const T of w){const D=()=>{try{const A=T.contentDocument;if(!A)return;A.addEventListener("keydown",S),_.push(()=>A.removeEventListener("keydown",S))}catch{}};D(),T.addEventListener("load",D),_.push(()=>T.removeEventListener("load",D))}return()=>{window.removeEventListener("keydown",S),_.forEach(T=>T())}},[d,p]),e.length===0)return M.jsx("div",{className:"deck-canvas flex-1 min-h-0",children:M.jsx(Nz,{})});const v=m?m.blocks[g]??m.blocks[0]:null;return M.jsxs("div",{className:"deck-canvas flex flex-1 min-h-0 flex-col",children:[!d&&M.jsx("div",{className:"flex items-center gap-0 border-b border-border px-2 overflow-x-auto",children:e.map((S,_)=>M.jsxs("div",{className:"flex items-center group",children:[M.jsxs("button",{className:`deck-tab flex items-center gap-1.5 ${_===t?"active":""}`,onClick:()=>{r(_),x(0)},children:[S.mode==="feedback"&&M.jsx("span",{className:"deck-status-dot feedback"}),S.id]}),M.jsx("button",{className:"h-4 w-4 flex items-center justify-center rounded text-muted-foreground/50 hover:text-foreground hover:bg-accent opacity-0 group-hover:opacity-100 transition-opacity -ml-1 mr-1",onClick:w=>{w.stopPropagation(),i(S.id)},"aria-label":`Close ${S.id}`,children:M.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]},S.id))}),!d&&m&&m.blocks.length>1&&M.jsx("div",{className:"flex gap-1 border-b border-border/50 px-4 bg-muted/20",children:m.blocks.map((S,_)=>M.jsx("button",{className:`deck-tab text-xs ${_===g?"active":""}`,onClick:()=>x(_),children:S.label},_))}),m&&M.jsx("div",{className:"flex flex-1 min-h-0 flex-col overflow-auto p-6",children:m.blocks.map((S,_)=>M.jsx("div",{"data-block-index":_,className:`flex-1 min-h-0 ${_===g?"":"hidden"}`,children:zz(S,m.selections,n,o,s,m.version)},_))}),m&&!d&&M.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-t border-border/50 bg-muted/20 px-6 py-3",children:[m.mode==="feedback"&&m.prompt?M.jsx("div",{className:"min-w-0 flex-1 truncate text-xs font-medium text-primary",title:m.prompt,children:m.prompt}):M.jsx("div",{className:"flex-1"}),M.jsxs("div",{className:"flex items-center gap-3",children:[p&&M.jsx(Hz,{immersive:!!d,onToggle:p}),m.mode==="feedback"&&a&&M.jsxs("button",{onClick:a,className:"inline-flex h-12 items-center gap-2 rounded-full bg-primary px-5 text-sm font-medium text-primary-foreground shadow-lg transition-transform hover:scale-105",title:"Respond — pick an element, comment, or attach a screenshot",children:[M.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"})}),"Respond"]}),u&&M.jsx(Uz,{shared:!!c,onDelete:y}),l&&M.jsx(jz,{shared:!!c,stale:!!h,onShare:()=>l(m.id)}),v&&M.jsx(Yz,{block:v,onDownload:b})]})]}),m&&d&&p&&M.jsx("button",{onClick:p,className:"fixed bottom-4 right-4 z-30 flex h-11 w-11 items-center justify-center rounded-full border border-foreground/25 bg-background/50 text-foreground/80 shadow-lg backdrop-blur-sm transition-colors hover:border-primary hover:bg-background/70 hover:text-foreground","aria-label":"Exit focus mode",title:"Exit focus mode (Esc)",children:M.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("polyline",{points:"4 14 10 14 10 20"}),M.jsx("polyline",{points:"20 10 14 10 14 4"}),M.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),M.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})})]})}const Wz=M.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}),M.jsx("path",{d:"M12 12v9"}),M.jsx("path",{d:"m16 16-4-4-4 4"})]});function jz({shared:e,stale:t,onShare:r}){const[i,n]=st.useState(!1),[o,s]=st.useState(null),a=async()=>{s(null),n(!0);try{await r()}catch(c){s(c instanceof Error?c.message:String(c))}finally{n(!1)}},l=o?"bg-destructive text-destructive-foreground":t?"bg-amber-500 text-white":e?"bg-emerald-600 text-white":"bg-primary text-primary-foreground";return M.jsxs("button",{onClick:a,disabled:i,className:`relative flex h-12 w-12 items-center justify-center rounded-full shadow-lg transition-transform hover:scale-110 disabled:opacity-70 ${l}`,"aria-label":t?"Update shared copy":e?"Re-share with team":"Share with team",title:o?`Share failed — click to retry
|
|
477
|
-
${o}`:t?"Cloud copy is out of date — click to update it":e?"Re-share — update the cloud copy":"Share with team (upload to cloud LaunchSecure)",children:[i?M.jsx("svg",{className:"h-5 w-5 animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):Wz,t&&!i&&M.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-background text-[10px] font-bold leading-none text-amber-500 shadow","aria-hidden":!0,children:"!"})]})}function Hz({immersive:e,onToggle:t}){return M.jsx("button",{onClick:t,className:"flex h-12 w-12 items-center justify-center rounded-full border border-border bg-background/80 text-muted-foreground shadow-lg backdrop-blur transition-transform hover:scale-110 hover:border-primary hover:text-foreground","aria-label":e?"Show header and tabs":"Hide header and tabs","aria-pressed":e,title:e?"Exit focus mode — show header & tabs":"Focus mode — hide header & tabs",children:e?M.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("polyline",{points:"4 14 10 14 10 20"}),M.jsx("polyline",{points:"20 10 14 10 14 4"}),M.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),M.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}):M.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("polyline",{points:"15 3 21 3 21 9"}),M.jsx("polyline",{points:"9 21 3 21 3 15"}),M.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),M.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})})}function Uz({shared:e,onDelete:t}){return M.jsx("button",{onClick:t,className:"flex h-12 w-12 items-center justify-center rounded-full border border-border bg-background/80 text-muted-foreground shadow-lg backdrop-blur transition-transform hover:scale-110 hover:border-destructive hover:bg-destructive hover:text-destructive-foreground","aria-label":"Delete session",title:e?"Delete session (offers to remove the cloud copy too)":"Delete session",children:M.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:M.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6"})})})}const Cd=M.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[M.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),M.jsx("polyline",{points:"7 10 12 15 17 10"}),M.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]});function Yz({block:e,onDownload:t}){const[r,i]=st.useState(!1);if(e.type==="iframe"&&e.src){const n=e.src.replace("/deck-files/","/deck-download/");if(!e.src.includes("blast-radius.html")){const h=e.src.split("/").pop()??"download.html";return M.jsx("a",{href:n,download:h,className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-110","aria-label":"Download HTML",title:"Download HTML",children:Cd})}const s=n,a=n.replace("blast-radius.html","blast-radius-report.md"),l=n.replace("blast-radius.html","contract.md"),c=n.replace("blast-radius.html","contract.json");return M.jsxs("div",{className:"relative",children:[r&&M.jsxs("div",{className:"absolute bottom-full left-1/2 mb-3 flex -translate-x-1/2 flex-col items-center gap-3",children:[M.jsx("a",{href:c,download:"contract.json",className:"flex h-10 w-10 items-center justify-center rounded-full bg-emerald-600 text-white shadow-lg transition-transform hover:scale-110 text-[8px] font-bold leading-none text-center",title:"Download Contract (JSON)",onClick:()=>i(!1),children:"CTR"}),M.jsx("a",{href:l,download:"contract.md",className:"flex h-10 w-10 items-center justify-center rounded-full bg-emerald-600 text-white shadow-lg transition-transform hover:scale-110 text-[10px] font-bold leading-none",title:"Download Contract (Markdown)",onClick:()=>i(!1),children:".md"}),M.jsx("a",{href:a,download:"blast-radius-report.md",className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-110 text-[10px] font-bold leading-none",title:"Download Report",onClick:()=>i(!1),children:".md"}),M.jsx("a",{href:s,download:"blast-radius.html",className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-110 text-[10px] font-bold leading-none",title:"Download HTML",onClick:()=>i(!1),children:".html"})]}),M.jsx("button",{onClick:()=>i(!r),className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-110","aria-label":"Download options",title:"Download",children:Cd})]})}return M.jsx("button",{onClick:t,className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-110","aria-label":"Download",title:"Download",children:Cd})}const g_=String.raw`
|
|
478
|
-
:host {
|
|
479
|
-
--beacon-accent: #0ea5e9;
|
|
480
|
-
--beacon-bg: #ffffff;
|
|
481
|
-
--beacon-fg: #0f172a;
|
|
482
|
-
--beacon-muted: #64748b;
|
|
483
|
-
--beacon-border: #e2e8f0;
|
|
484
|
-
--beacon-radius: 10px;
|
|
485
|
-
--beacon-z-index: 2147483645;
|
|
486
|
-
--beacon-shadow: 0 10px 30px hsl(0 0% 0% / 0.15), 0 2px 6px hsl(0 0% 0% / 0.08);
|
|
487
|
-
--beacon-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
488
|
-
--beacon-color-scheme: light dark;
|
|
489
|
-
|
|
490
|
-
--beacon-bug: #ef4444;
|
|
491
|
-
--beacon-idea: #22c55e;
|
|
492
|
-
--beacon-ux: #a855f7;
|
|
493
|
-
--beacon-a11y: #06b6d4;
|
|
494
|
-
|
|
495
|
-
position: fixed;
|
|
496
|
-
z-index: var(--beacon-z-index);
|
|
497
|
-
font-family: var(--beacon-font-family);
|
|
498
|
-
font-size: 14px;
|
|
499
|
-
color: var(--beacon-fg);
|
|
500
|
-
line-height: 1.5;
|
|
501
|
-
color-scheme: var(--beacon-color-scheme);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
:host([theme='dark']) {
|
|
505
|
-
--beacon-bg: #0f172a;
|
|
506
|
-
--beacon-fg: #f1f5f9;
|
|
507
|
-
--beacon-muted: #94a3b8;
|
|
508
|
-
--beacon-border: #334155;
|
|
509
|
-
--beacon-color-scheme: dark;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
@media (prefers-color-scheme: dark) {
|
|
513
|
-
:host([theme='auto']) {
|
|
514
|
-
--beacon-bg: #0f172a;
|
|
515
|
-
--beacon-fg: #f1f5f9;
|
|
516
|
-
--beacon-muted: #94a3b8;
|
|
517
|
-
--beacon-border: #334155;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
:host([position='bottom-right']) { right: 20px; bottom: 20px; left: auto; top: auto; }
|
|
522
|
-
:host([position='bottom-left']) { left: 20px; bottom: 20px; right: auto; top: auto; }
|
|
523
|
-
|
|
524
|
-
:host([position='hidden']) {
|
|
525
|
-
position: static;
|
|
526
|
-
display: contents;
|
|
527
|
-
}
|
|
528
|
-
:host([position='hidden']) .beacon-default-trigger { display: none; }
|
|
529
|
-
|
|
530
|
-
.beacon-default-trigger {
|
|
531
|
-
display: inline-flex;
|
|
532
|
-
align-items: center;
|
|
533
|
-
gap: 6px;
|
|
534
|
-
background: var(--beacon-accent);
|
|
535
|
-
color: white;
|
|
536
|
-
border: 0;
|
|
537
|
-
border-radius: 999px;
|
|
538
|
-
padding: 10px 16px;
|
|
539
|
-
font: inherit;
|
|
540
|
-
font-weight: 500;
|
|
541
|
-
cursor: pointer;
|
|
542
|
-
box-shadow: var(--beacon-shadow);
|
|
543
|
-
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
544
|
-
}
|
|
545
|
-
.beacon-default-trigger:hover { transform: translateY(-1px); }
|
|
546
|
-
.beacon-default-trigger svg { width: 18px; height: 18px; }
|
|
547
|
-
|
|
548
|
-
.beacon-health-dot {
|
|
549
|
-
display: none;
|
|
550
|
-
width: 8px;
|
|
551
|
-
height: 8px;
|
|
552
|
-
border-radius: 50%;
|
|
553
|
-
background: var(--beacon-bug);
|
|
554
|
-
margin-left: 2px;
|
|
555
|
-
}
|
|
556
|
-
.beacon-health-dot.visible { display: inline-block; }
|
|
557
|
-
|
|
558
|
-
dialog.beacon-dialog {
|
|
559
|
-
width: 380px;
|
|
560
|
-
max-width: calc(100vw - 24px);
|
|
561
|
-
max-height: calc(100vh - 24px);
|
|
562
|
-
padding: 0;
|
|
563
|
-
background: var(--beacon-bg);
|
|
564
|
-
color: var(--beacon-fg);
|
|
565
|
-
border: 1px solid var(--beacon-border);
|
|
566
|
-
border-radius: var(--beacon-radius);
|
|
567
|
-
box-shadow: var(--beacon-shadow);
|
|
568
|
-
font-family: var(--beacon-font-family);
|
|
569
|
-
font-size: 14px;
|
|
570
|
-
line-height: 1.5;
|
|
571
|
-
}
|
|
572
|
-
dialog.beacon-dialog::backdrop {
|
|
573
|
-
background: hsl(0 0% 0% / 0.8);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.beacon-dialog-inner {
|
|
577
|
-
display: flex;
|
|
578
|
-
flex-direction: column;
|
|
579
|
-
max-height: calc(100vh - 24px);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.beacon-drawer-header {
|
|
583
|
-
display: flex;
|
|
584
|
-
align-items: center;
|
|
585
|
-
justify-content: space-between;
|
|
586
|
-
padding: 12px 16px;
|
|
587
|
-
border-bottom: 1px solid var(--beacon-border);
|
|
588
|
-
}
|
|
589
|
-
.beacon-drawer-title { font-weight: 600; }
|
|
590
|
-
.beacon-icon-btn {
|
|
591
|
-
background: transparent;
|
|
592
|
-
border: 0;
|
|
593
|
-
color: var(--beacon-muted);
|
|
594
|
-
cursor: pointer;
|
|
595
|
-
padding: 4px;
|
|
596
|
-
border-radius: 4px;
|
|
597
|
-
display: inline-flex;
|
|
598
|
-
}
|
|
599
|
-
.beacon-icon-btn:hover { background: var(--beacon-border); color: var(--beacon-fg); }
|
|
600
|
-
.beacon-icon-btn svg { width: 16px; height: 16px; }
|
|
601
|
-
|
|
602
|
-
.beacon-drawer-body {
|
|
603
|
-
padding: 16px;
|
|
604
|
-
overflow-y: auto;
|
|
605
|
-
display: flex;
|
|
606
|
-
flex-direction: column;
|
|
607
|
-
gap: 14px;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
/* Plugin panels share the same vertical rhythm as the drawer body so sibling
|
|
611
|
-
panels (annotate, monitor, etc.) don't visually collide. Without this, every
|
|
612
|
-
plugin panel renders flush against the previous one. */
|
|
613
|
-
.beacon-plugin-panels {
|
|
614
|
-
display: flex;
|
|
615
|
-
flex-direction: column;
|
|
616
|
-
gap: 14px;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.beacon-field { display: flex; flex-direction: column; gap: 6px; }
|
|
620
|
-
.beacon-label { font-size: 12px; color: var(--beacon-muted); font-weight: 500; }
|
|
621
|
-
.beacon-description { font-size: 12px; color: var(--beacon-muted); }
|
|
622
|
-
|
|
623
|
-
.beacon-input,
|
|
624
|
-
.beacon-textarea,
|
|
625
|
-
.beacon-select {
|
|
626
|
-
width: 100%;
|
|
627
|
-
padding: 8px 10px;
|
|
628
|
-
background: var(--beacon-bg);
|
|
629
|
-
color: var(--beacon-fg);
|
|
630
|
-
border: 1px solid var(--beacon-border);
|
|
631
|
-
border-radius: 6px;
|
|
632
|
-
font: inherit;
|
|
633
|
-
box-sizing: border-box;
|
|
634
|
-
}
|
|
635
|
-
.beacon-textarea { min-height: 80px; resize: vertical; }
|
|
636
|
-
.beacon-input:focus,
|
|
637
|
-
.beacon-textarea:focus,
|
|
638
|
-
.beacon-select:focus { outline: 2px solid var(--beacon-accent); outline-offset: -1px; border-color: var(--beacon-accent); }
|
|
639
|
-
|
|
640
|
-
.beacon-toggle {
|
|
641
|
-
display: inline-flex;
|
|
642
|
-
align-items: center;
|
|
643
|
-
gap: 8px;
|
|
644
|
-
cursor: pointer;
|
|
645
|
-
user-select: none;
|
|
646
|
-
}
|
|
647
|
-
.beacon-toggle input { margin: 0; }
|
|
648
|
-
|
|
649
|
-
.beacon-radio-group { display: flex; flex-direction: column; gap: 4px; }
|
|
650
|
-
.beacon-radio-opt { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
|
|
651
|
-
|
|
652
|
-
.beacon-severity {
|
|
653
|
-
display: grid;
|
|
654
|
-
grid-template-columns: repeat(4, 1fr);
|
|
655
|
-
gap: 6px;
|
|
656
|
-
}
|
|
657
|
-
.beacon-severity-opt {
|
|
658
|
-
position: relative;
|
|
659
|
-
display: flex;
|
|
660
|
-
align-items: center;
|
|
661
|
-
justify-content: center;
|
|
662
|
-
padding: 6px 4px;
|
|
663
|
-
background: transparent;
|
|
664
|
-
border: 1px solid var(--beacon-border);
|
|
665
|
-
border-radius: 6px;
|
|
666
|
-
cursor: pointer;
|
|
667
|
-
font-size: 12px;
|
|
668
|
-
font-weight: 500;
|
|
669
|
-
color: var(--beacon-fg);
|
|
670
|
-
text-transform: capitalize;
|
|
671
|
-
}
|
|
672
|
-
.beacon-severity-opt input { position: absolute; opacity: 0; pointer-events: none; }
|
|
673
|
-
.beacon-severity-opt:hover { background: var(--beacon-border); }
|
|
674
|
-
.beacon-severity-opt.selected[data-sev='bug'] { border-color: var(--beacon-bug); color: var(--beacon-bug); }
|
|
675
|
-
.beacon-severity-opt.selected[data-sev='idea'] { border-color: var(--beacon-idea); color: var(--beacon-idea); }
|
|
676
|
-
.beacon-severity-opt.selected[data-sev='ux'] { border-color: var(--beacon-ux); color: var(--beacon-ux); }
|
|
677
|
-
.beacon-severity-opt.selected[data-sev='a11y'] { border-color: var(--beacon-a11y); color: var(--beacon-a11y); }
|
|
678
|
-
|
|
679
|
-
.beacon-actions {
|
|
680
|
-
display: flex;
|
|
681
|
-
gap: 8px;
|
|
682
|
-
align-items: center;
|
|
683
|
-
}
|
|
684
|
-
.beacon-btn {
|
|
685
|
-
display: inline-flex;
|
|
686
|
-
align-items: center;
|
|
687
|
-
gap: 6px;
|
|
688
|
-
padding: 8px 14px;
|
|
689
|
-
border-radius: 6px;
|
|
690
|
-
border: 0;
|
|
691
|
-
cursor: pointer;
|
|
692
|
-
font: inherit;
|
|
693
|
-
font-weight: 500;
|
|
694
|
-
font-size: 13px;
|
|
695
|
-
transition: opacity 0.15s ease;
|
|
696
|
-
}
|
|
697
|
-
.beacon-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
698
|
-
.beacon-btn svg { width: 14px; height: 14px; }
|
|
699
|
-
.beacon-btn.primary { background: var(--beacon-accent); color: white; }
|
|
700
|
-
.beacon-btn.secondary {
|
|
701
|
-
background: transparent;
|
|
702
|
-
color: var(--beacon-fg);
|
|
703
|
-
border: 1px solid var(--beacon-border);
|
|
704
|
-
}
|
|
705
|
-
.beacon-btn.secondary:hover { background: var(--beacon-border); }
|
|
706
|
-
|
|
707
|
-
.beacon-status {
|
|
708
|
-
font-size: 12px;
|
|
709
|
-
color: var(--beacon-muted);
|
|
710
|
-
text-align: center;
|
|
711
|
-
padding: 4px;
|
|
712
|
-
}
|
|
713
|
-
.beacon-status.error { color: var(--beacon-bug); }
|
|
714
|
-
.beacon-status.success { color: var(--beacon-idea); }
|
|
715
|
-
|
|
716
|
-
.beacon-plugin-panel {
|
|
717
|
-
display: flex;
|
|
718
|
-
flex-direction: column;
|
|
719
|
-
gap: 10px;
|
|
720
|
-
padding: 12px;
|
|
721
|
-
border: 1px solid var(--beacon-border);
|
|
722
|
-
border-radius: 6px;
|
|
723
|
-
}
|
|
724
|
-
.beacon-plugin-panel-title {
|
|
725
|
-
font-size: 12px;
|
|
726
|
-
text-transform: uppercase;
|
|
727
|
-
letter-spacing: 0.04em;
|
|
728
|
-
color: var(--beacon-muted);
|
|
729
|
-
font-weight: 600;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/* ── Pin list (domEle plugin) ─────────────────────────────── */
|
|
733
|
-
.beacon-pin-list-header {
|
|
734
|
-
font-size: 12px;
|
|
735
|
-
color: var(--beacon-muted);
|
|
736
|
-
font-weight: 500;
|
|
737
|
-
}
|
|
738
|
-
.beacon-pin-list {
|
|
739
|
-
display: flex;
|
|
740
|
-
flex-direction: column;
|
|
741
|
-
gap: 6px;
|
|
742
|
-
max-height: 200px;
|
|
743
|
-
overflow-y: auto;
|
|
744
|
-
}
|
|
745
|
-
.beacon-pin-item {
|
|
746
|
-
display: flex;
|
|
747
|
-
align-items: flex-start;
|
|
748
|
-
gap: 8px;
|
|
749
|
-
padding: 8px;
|
|
750
|
-
background: var(--beacon-border);
|
|
751
|
-
border-radius: 6px;
|
|
752
|
-
}
|
|
753
|
-
.beacon-pin-num {
|
|
754
|
-
display: inline-flex;
|
|
755
|
-
align-items: center;
|
|
756
|
-
justify-content: center;
|
|
757
|
-
width: 20px;
|
|
758
|
-
height: 20px;
|
|
759
|
-
border-radius: 50%;
|
|
760
|
-
background: var(--beacon-accent);
|
|
761
|
-
color: white;
|
|
762
|
-
font-size: 11px;
|
|
763
|
-
font-weight: 600;
|
|
764
|
-
flex-shrink: 0;
|
|
765
|
-
}
|
|
766
|
-
.beacon-pin-meta { flex: 1; min-width: 0; }
|
|
767
|
-
.beacon-pin-selector {
|
|
768
|
-
font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
769
|
-
color: var(--beacon-muted);
|
|
770
|
-
white-space: nowrap;
|
|
771
|
-
overflow: hidden;
|
|
772
|
-
text-overflow: ellipsis;
|
|
773
|
-
}
|
|
774
|
-
.beacon-pin-note-input {
|
|
775
|
-
margin-top: 4px;
|
|
776
|
-
width: 100%;
|
|
777
|
-
padding: 4px 6px;
|
|
778
|
-
background: var(--beacon-bg);
|
|
779
|
-
color: var(--beacon-fg);
|
|
780
|
-
border: 1px solid var(--beacon-border);
|
|
781
|
-
border-radius: 4px;
|
|
782
|
-
font: inherit;
|
|
783
|
-
font-size: 12px;
|
|
784
|
-
box-sizing: border-box;
|
|
785
|
-
}
|
|
786
|
-
.beacon-pin-annotate { align-self: flex-start; }
|
|
787
|
-
.beacon-thumb {
|
|
788
|
-
width: 100%;
|
|
789
|
-
border: 1px solid var(--beacon-border);
|
|
790
|
-
border-radius: 6px;
|
|
791
|
-
display: block;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/* ── Captured runtime events chip (errors plugin form panel) ─── */
|
|
795
|
-
.beacon-events {
|
|
796
|
-
font-size: 12px;
|
|
797
|
-
border: 1px solid var(--beacon-border);
|
|
798
|
-
border-radius: 6px;
|
|
799
|
-
padding: 6px 8px;
|
|
800
|
-
}
|
|
801
|
-
.beacon-events-summary {
|
|
802
|
-
cursor: pointer;
|
|
803
|
-
list-style: none;
|
|
804
|
-
display: flex;
|
|
805
|
-
align-items: center;
|
|
806
|
-
gap: 6px;
|
|
807
|
-
color: var(--beacon-muted);
|
|
808
|
-
user-select: none;
|
|
809
|
-
}
|
|
810
|
-
.beacon-events-summary::-webkit-details-marker { display: none; }
|
|
811
|
-
.beacon-events-dot {
|
|
812
|
-
color: var(--beacon-bug);
|
|
813
|
-
font-size: 10px;
|
|
814
|
-
line-height: 1;
|
|
815
|
-
}
|
|
816
|
-
.beacon-events-list {
|
|
817
|
-
list-style: none;
|
|
818
|
-
margin: 8px 0 0;
|
|
819
|
-
padding: 0;
|
|
820
|
-
display: flex;
|
|
821
|
-
flex-direction: column;
|
|
822
|
-
gap: 4px;
|
|
823
|
-
max-height: 160px;
|
|
824
|
-
overflow-y: auto;
|
|
825
|
-
}
|
|
826
|
-
.beacon-events-item {
|
|
827
|
-
display: flex;
|
|
828
|
-
align-items: flex-start;
|
|
829
|
-
gap: 6px;
|
|
830
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
831
|
-
font-size: 11px;
|
|
832
|
-
line-height: 1.4;
|
|
833
|
-
}
|
|
834
|
-
.beacon-events-kind {
|
|
835
|
-
flex-shrink: 0;
|
|
836
|
-
padding: 1px 5px;
|
|
837
|
-
border-radius: 3px;
|
|
838
|
-
font-size: 10px;
|
|
839
|
-
text-transform: uppercase;
|
|
840
|
-
letter-spacing: 0.04em;
|
|
841
|
-
}
|
|
842
|
-
.beacon-events-kind.error { background: hsl(0 84% 50% / 0.15); color: var(--beacon-bug); }
|
|
843
|
-
.beacon-events-kind.rejection { background: hsl(38 92% 50% / 0.15); color: hsl(38 92% 50%); }
|
|
844
|
-
.beacon-events-msg {
|
|
845
|
-
word-break: break-word;
|
|
846
|
-
color: var(--beacon-fg);
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
/* ── liveMonitor plugin panel ─────────────────────────────── */
|
|
850
|
-
.beacon-monitor {
|
|
851
|
-
padding: 0 0 4px;
|
|
852
|
-
font-size: 12px;
|
|
853
|
-
color: var(--beacon-fg);
|
|
854
|
-
display: flex;
|
|
855
|
-
flex-direction: column;
|
|
856
|
-
gap: 6px;
|
|
857
|
-
}
|
|
858
|
-
.beacon-monitor-title {
|
|
859
|
-
display: flex;
|
|
860
|
-
align-items: center;
|
|
861
|
-
gap: 8px;
|
|
862
|
-
font-weight: 600;
|
|
863
|
-
text-transform: uppercase;
|
|
864
|
-
letter-spacing: 0.04em;
|
|
865
|
-
color: var(--beacon-muted);
|
|
866
|
-
font-size: 11px;
|
|
867
|
-
}
|
|
868
|
-
.beacon-monitor-rec {
|
|
869
|
-
width: 8px;
|
|
870
|
-
height: 8px;
|
|
871
|
-
border-radius: 50%;
|
|
872
|
-
background: var(--beacon-bug);
|
|
873
|
-
animation: beacon-rec-pulse 1.4s ease-in-out infinite;
|
|
874
|
-
}
|
|
875
|
-
@keyframes beacon-rec-pulse {
|
|
876
|
-
0%, 100% { opacity: 1; }
|
|
877
|
-
50% { opacity: 0.35; }
|
|
878
|
-
}
|
|
879
|
-
.beacon-monitor-row {
|
|
880
|
-
display: flex;
|
|
881
|
-
gap: 6px;
|
|
882
|
-
align-items: center;
|
|
883
|
-
}
|
|
884
|
-
.beacon-monitor-input {
|
|
885
|
-
flex: 1;
|
|
886
|
-
font: inherit;
|
|
887
|
-
padding: 6px 8px;
|
|
888
|
-
background: var(--beacon-bg);
|
|
889
|
-
color: var(--beacon-fg);
|
|
890
|
-
border: 1px solid var(--beacon-border);
|
|
891
|
-
border-radius: 6px;
|
|
892
|
-
min-width: 0;
|
|
893
|
-
box-sizing: border-box;
|
|
894
|
-
}
|
|
895
|
-
.beacon-monitor-input::placeholder { color: var(--beacon-muted); opacity: 0.7; }
|
|
896
|
-
.beacon-monitor-input:focus {
|
|
897
|
-
outline: 2px solid var(--beacon-accent);
|
|
898
|
-
outline-offset: -1px;
|
|
899
|
-
border-color: var(--beacon-accent);
|
|
900
|
-
}
|
|
901
|
-
.beacon-monitor-btn {
|
|
902
|
-
font: inherit;
|
|
903
|
-
padding: 6px 10px;
|
|
904
|
-
border-radius: 6px;
|
|
905
|
-
border: 1px solid var(--beacon-accent);
|
|
906
|
-
background: var(--beacon-accent);
|
|
907
|
-
color: white;
|
|
908
|
-
cursor: pointer;
|
|
909
|
-
font-weight: 500;
|
|
910
|
-
}
|
|
911
|
-
.beacon-monitor-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
912
|
-
.beacon-monitor-btn.stop {
|
|
913
|
-
background: transparent;
|
|
914
|
-
color: var(--beacon-accent);
|
|
915
|
-
}
|
|
916
|
-
.beacon-monitor-help {
|
|
917
|
-
color: var(--beacon-muted);
|
|
918
|
-
font-size: 11px;
|
|
919
|
-
}
|
|
920
|
-
.beacon-monitor-active-url {
|
|
921
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
922
|
-
font-size: 11px;
|
|
923
|
-
color: var(--beacon-muted);
|
|
924
|
-
word-break: break-all;
|
|
925
|
-
background: hsl(0 0% 0% / 0.18);
|
|
926
|
-
border-radius: 4px;
|
|
927
|
-
padding: 4px 6px;
|
|
928
|
-
}
|
|
929
|
-
.beacon-monitor-verbose {
|
|
930
|
-
display: inline-flex;
|
|
931
|
-
align-items: center;
|
|
932
|
-
gap: 6px;
|
|
933
|
-
color: var(--beacon-muted);
|
|
934
|
-
font-size: 11px;
|
|
935
|
-
cursor: pointer;
|
|
936
|
-
user-select: none;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
.beacon-overlay-layer {
|
|
940
|
-
position: fixed;
|
|
941
|
-
inset: 0;
|
|
942
|
-
pointer-events: none;
|
|
943
|
-
z-index: calc(var(--beacon-z-index) + 1);
|
|
944
|
-
}
|
|
945
|
-
.beacon-overlay-layer > * { pointer-events: auto; }
|
|
946
|
-
|
|
947
|
-
/* ── Body-mounted UI ──────────────────────────────────────
|
|
948
|
-
Pin-popover and other overlays mount on document.body to escape transformed
|
|
949
|
-
ancestors. Shadow DOM :host vars don't reach them, so we re-declare the
|
|
950
|
-
variables here on each body-mounted root. */
|
|
951
|
-
|
|
952
|
-
.beacon-pin-popover {
|
|
953
|
-
--beacon-accent: #0ea5e9;
|
|
954
|
-
--beacon-bg: #ffffff;
|
|
955
|
-
--beacon-fg: #0f172a;
|
|
956
|
-
--beacon-muted: #64748b;
|
|
957
|
-
--beacon-border: #e2e8f0;
|
|
958
|
-
--beacon-radius: 10px;
|
|
959
|
-
--beacon-shadow: 0 10px 30px hsl(0 0% 0% / 0.15), 0 2px 6px hsl(0 0% 0% / 0.08);
|
|
960
|
-
--beacon-bug: #ef4444;
|
|
961
|
-
--beacon-idea: #22c55e;
|
|
962
|
-
--beacon-ux: #a855f7;
|
|
963
|
-
--beacon-a11y: #06b6d4;
|
|
964
|
-
|
|
965
|
-
position: fixed;
|
|
966
|
-
z-index: 2147483647;
|
|
967
|
-
width: 240px;
|
|
968
|
-
background: var(--beacon-bg);
|
|
969
|
-
color: var(--beacon-fg);
|
|
970
|
-
border: 1px solid var(--beacon-border);
|
|
971
|
-
border-radius: 6px;
|
|
972
|
-
box-shadow: var(--beacon-shadow);
|
|
973
|
-
padding: 10px;
|
|
974
|
-
display: none;
|
|
975
|
-
flex-direction: column;
|
|
976
|
-
gap: 8px;
|
|
977
|
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
978
|
-
font-size: 14px;
|
|
979
|
-
line-height: 1.5;
|
|
980
|
-
}
|
|
981
|
-
.beacon-pin-popover.open { display: flex; }
|
|
982
|
-
.beacon-pin-popover.beacon-theme-dark {
|
|
983
|
-
--beacon-bg: #0f172a;
|
|
984
|
-
--beacon-fg: #f1f5f9;
|
|
985
|
-
--beacon-muted: #94a3b8;
|
|
986
|
-
--beacon-border: #334155;
|
|
987
|
-
}
|
|
988
|
-
@media (prefers-color-scheme: dark) {
|
|
989
|
-
.beacon-pin-popover.beacon-theme-auto {
|
|
990
|
-
--beacon-bg: #0f172a;
|
|
991
|
-
--beacon-fg: #f1f5f9;
|
|
992
|
-
--beacon-muted: #94a3b8;
|
|
993
|
-
--beacon-border: #334155;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.beacon-pin-popover .beacon-pin-popover-header {
|
|
998
|
-
display: flex;
|
|
999
|
-
align-items: center;
|
|
1000
|
-
justify-content: space-between;
|
|
1001
|
-
gap: 6px;
|
|
1002
|
-
}
|
|
1003
|
-
.beacon-pin-popover .beacon-pin-popover-actions {
|
|
1004
|
-
display: flex;
|
|
1005
|
-
gap: 6px;
|
|
1006
|
-
justify-content: flex-end;
|
|
1007
|
-
}
|
|
1008
|
-
.beacon-pin-popover .beacon-pin-num {
|
|
1009
|
-
display: inline-flex;
|
|
1010
|
-
align-items: center;
|
|
1011
|
-
justify-content: center;
|
|
1012
|
-
width: 20px;
|
|
1013
|
-
height: 20px;
|
|
1014
|
-
border-radius: 50%;
|
|
1015
|
-
background: var(--beacon-accent);
|
|
1016
|
-
color: white;
|
|
1017
|
-
font-size: 11px;
|
|
1018
|
-
font-weight: 600;
|
|
1019
|
-
flex-shrink: 0;
|
|
1020
|
-
}
|
|
1021
|
-
.beacon-pin-popover .beacon-icon-btn {
|
|
1022
|
-
background: transparent;
|
|
1023
|
-
border: 0;
|
|
1024
|
-
color: var(--beacon-muted);
|
|
1025
|
-
cursor: pointer;
|
|
1026
|
-
padding: 4px;
|
|
1027
|
-
border-radius: 4px;
|
|
1028
|
-
display: inline-flex;
|
|
1029
|
-
}
|
|
1030
|
-
.beacon-pin-popover .beacon-icon-btn:hover { background: var(--beacon-border); color: var(--beacon-fg); }
|
|
1031
|
-
.beacon-pin-popover .beacon-icon-btn svg { width: 16px; height: 16px; }
|
|
1032
|
-
.beacon-pin-popover .beacon-textarea {
|
|
1033
|
-
width: 100%;
|
|
1034
|
-
min-height: 48px;
|
|
1035
|
-
padding: 6px 8px;
|
|
1036
|
-
background: var(--beacon-bg);
|
|
1037
|
-
color: var(--beacon-fg);
|
|
1038
|
-
border: 1px solid var(--beacon-border);
|
|
1039
|
-
border-radius: 6px;
|
|
1040
|
-
font: inherit;
|
|
1041
|
-
resize: vertical;
|
|
1042
|
-
box-sizing: border-box;
|
|
1043
|
-
}
|
|
1044
|
-
.beacon-pin-popover .beacon-textarea:focus {
|
|
1045
|
-
outline: 2px solid var(--beacon-accent);
|
|
1046
|
-
outline-offset: -1px;
|
|
1047
|
-
border-color: var(--beacon-accent);
|
|
1048
|
-
}
|
|
1049
|
-
.beacon-pin-popover .beacon-btn {
|
|
1050
|
-
display: inline-flex;
|
|
1051
|
-
align-items: center;
|
|
1052
|
-
gap: 6px;
|
|
1053
|
-
padding: 6px 12px;
|
|
1054
|
-
border-radius: 6px;
|
|
1055
|
-
border: 0;
|
|
1056
|
-
cursor: pointer;
|
|
1057
|
-
font: inherit;
|
|
1058
|
-
font-weight: 500;
|
|
1059
|
-
font-size: 13px;
|
|
1060
|
-
}
|
|
1061
|
-
.beacon-pin-popover .beacon-btn.primary { background: var(--beacon-accent); color: white; }
|
|
1062
|
-
.beacon-pin-popover .beacon-btn svg { width: 14px; height: 14px; }
|
|
1063
|
-
|
|
1064
|
-
/* ── liveMonitor body-portal overlay ───────────────────────
|
|
1065
|
-
Dashed viewport frame + draggable status chip. Body-mounted (same reason as
|
|
1066
|
-
pick-mode-overlay), so the CSS var --beacon-monitor-accent is set inline on
|
|
1067
|
-
the frame and chip elements by the plugin — the shadow root's :host vars
|
|
1068
|
-
don't reach here. */
|
|
1069
|
-
|
|
1070
|
-
@keyframes beacon-monitor-frame-pulse {
|
|
1071
|
-
0%, 100% { opacity: 0.55; }
|
|
1072
|
-
50% { opacity: 1; }
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
.beacon-monitor-overlay-frame {
|
|
1076
|
-
--beacon-monitor-accent: #10b981;
|
|
1077
|
-
position: fixed;
|
|
1078
|
-
inset: 0;
|
|
1079
|
-
pointer-events: none;
|
|
1080
|
-
z-index: 2147483646;
|
|
1081
|
-
border: 2px dashed var(--beacon-monitor-accent);
|
|
1082
|
-
border-radius: 4px;
|
|
1083
|
-
box-shadow: inset 0 0 56px color-mix(in srgb, var(--beacon-monitor-accent) 18%, transparent);
|
|
1084
|
-
box-sizing: border-box;
|
|
1085
|
-
animation: beacon-monitor-frame-pulse 2.4s ease-in-out infinite;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
.beacon-monitor-overlay-chip {
|
|
1089
|
-
--beacon-monitor-accent: #10b981;
|
|
1090
|
-
position: fixed;
|
|
1091
|
-
z-index: 2147483647;
|
|
1092
|
-
pointer-events: auto;
|
|
1093
|
-
cursor: grab;
|
|
1094
|
-
user-select: none;
|
|
1095
|
-
background: #0f172a;
|
|
1096
|
-
color: #f1f5f9;
|
|
1097
|
-
border: 1px solid color-mix(in srgb, var(--beacon-monitor-accent) 50%, transparent);
|
|
1098
|
-
border-radius: 999px;
|
|
1099
|
-
padding: 6px 6px 6px 12px;
|
|
1100
|
-
box-shadow: 0 6px 20px hsl(0 0% 0% / 0.3);
|
|
1101
|
-
font: 500 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
1102
|
-
letter-spacing: 0.01em;
|
|
1103
|
-
display: flex;
|
|
1104
|
-
flex-direction: column;
|
|
1105
|
-
gap: 4px;
|
|
1106
|
-
min-width: 140px;
|
|
1107
|
-
max-width: min(360px, calc(100vw - 32px));
|
|
1108
|
-
touch-action: none;
|
|
1109
|
-
}
|
|
1110
|
-
.beacon-monitor-overlay-chip[data-dragging] { cursor: grabbing; }
|
|
1111
|
-
|
|
1112
|
-
.beacon-monitor-overlay-chip-row {
|
|
1113
|
-
display: flex;
|
|
1114
|
-
align-items: center;
|
|
1115
|
-
gap: 6px;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
.beacon-monitor-overlay-rec-dot {
|
|
1119
|
-
width: 8px;
|
|
1120
|
-
height: 8px;
|
|
1121
|
-
border-radius: 50%;
|
|
1122
|
-
background: #ef4444;
|
|
1123
|
-
flex-shrink: 0;
|
|
1124
|
-
animation: beacon-rec-pulse 1.4s ease-in-out infinite;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
.beacon-monitor-overlay-rec-label {
|
|
1128
|
-
font-weight: 700;
|
|
1129
|
-
letter-spacing: 0.06em;
|
|
1130
|
-
color: #ef4444;
|
|
1131
|
-
font-size: 11px;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
.beacon-monitor-overlay-sep {
|
|
1135
|
-
color: #64748b;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.beacon-monitor-overlay-timer {
|
|
1139
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1140
|
-
font-variant-numeric: tabular-nums;
|
|
1141
|
-
font-size: 12px;
|
|
1142
|
-
flex: 1;
|
|
1143
|
-
min-width: 48px;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.beacon-monitor-overlay-stop {
|
|
1147
|
-
font: inherit;
|
|
1148
|
-
font-weight: 500;
|
|
1149
|
-
font-size: 11px;
|
|
1150
|
-
padding: 3px 10px;
|
|
1151
|
-
border-radius: 999px;
|
|
1152
|
-
background: var(--beacon-monitor-accent);
|
|
1153
|
-
color: #ffffff;
|
|
1154
|
-
border: 0;
|
|
1155
|
-
cursor: pointer;
|
|
1156
|
-
flex-shrink: 0;
|
|
1157
|
-
}
|
|
1158
|
-
.beacon-monitor-overlay-stop:hover {
|
|
1159
|
-
background: color-mix(in srgb, var(--beacon-monitor-accent) 85%, white);
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
.beacon-monitor-overlay-url {
|
|
1163
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1164
|
-
font-size: 10px;
|
|
1165
|
-
color: #94a3b8;
|
|
1166
|
-
padding: 0 6px;
|
|
1167
|
-
white-space: nowrap;
|
|
1168
|
-
overflow: hidden;
|
|
1169
|
-
text-overflow: ellipsis;
|
|
1170
|
-
max-width: 100%;
|
|
1171
|
-
}
|
|
1172
|
-
`,aC="launch-kit-beacon-portal-styles";function Vz(){if(typeof document>"u"||!document.head||document.getElementById(aC))return;const e=document.createElement("style");e.id=aC,e.textContent=g_,document.head.appendChild(e)}const bd="http://www.w3.org/2000/svg";function Gz(){const e=document.createElementNS(bd,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round");const t=document.createElementNS(bd,"path");t.setAttribute("d","M3 11l18-5v12L3 14v-3z");const r=document.createElementNS(bd,"path");return r.setAttribute("d","M11.6 16.8a3 3 0 1 1-5.8-1.6"),e.appendChild(t),e.appendChild(r),e}const ja="launch-kit-beacon",Xz=typeof HTMLElement<"u"?HTMLElement:class{};class Qz extends Xz{constructor(){super(...arguments),this.onTriggerClick=null}connectedCallback(){if(this.shadow)return;this.shadow=this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=g_,this.shadow.appendChild(t),this.triggerSlot=document.createElement("slot"),this.triggerSlot.name="trigger",this.shadow.appendChild(this.triggerSlot),this.defaultTrigger=document.createElement("button"),this.defaultTrigger.type="button",this.defaultTrigger.className="beacon-default-trigger",this.defaultTrigger.appendChild(Gz());const r=document.createElement("span");r.textContent="Feedback",this.defaultTrigger.appendChild(r),this.healthDot=document.createElement("span"),this.healthDot.className="beacon-health-dot",this.defaultTrigger.appendChild(this.healthDot),this.shadow.appendChild(this.defaultTrigger),this.defaultTrigger.addEventListener("click",()=>{var i;return(i=this.onTriggerClick)==null?void 0:i.call(this)}),this.triggerSlot.addEventListener("slotchange",()=>{const i=this.triggerSlot.assignedElements();if(i.length>0){this.defaultTrigger.style.display="none";for(const n of i)n.addEventListener("click",()=>{var o;return(o=this.onTriggerClick)==null?void 0:o.call(this)})}else this.defaultTrigger.style.display=""}),this.hasAttribute("position")||this.setAttribute("position","bottom-right"),this.hasAttribute("theme")||this.setAttribute("theme","auto")}setTriggerLabel(t){if(!this.defaultTrigger)return;const r=this.defaultTrigger.querySelector("span");r&&(r.textContent=t)}setHealthIndicator(t){var r;(r=this.healthDot)==null||r.classList.toggle("visible",t)}}function m_(){typeof window>"u"||typeof customElements>"u"||customElements.get(ja)||customElements.define(ja,Qz)}function Zz(e,t){return{pluginName:e,captured:r=>t.getCaptured(r),get formValues(){return t.getFormValues(e)},requestMode:r=>t.requestMode(r),overlay:r=>t.overlay(r),on:(r,i)=>t.onLifecycle(r,i),get signal(){return t.getInitSignal()},captureSignal:()=>t.getCaptureSignal()}}class Kz extends Error{constructor(t){super(`Duplicate plugin name: "${t}"`),this.name="DuplicatePluginNameError"}}function Jz(e){const t=new Set;for(const i of e){if(t.has(i.name))throw new Kz(i.name);t.add(i.name)}const r=e.map(i=>({plugin:i,ctx:null,status:{state:"active",failures:0}}));return{entries:r,install(i,n){for(const o of r)if(o.ctx=i(o.plugin.name),!!o.plugin.setupOnce)try{const s=o.plugin.setupOnce(o.ctx);typeof s=="function"&&(o.teardown=s)}catch(s){const a=s instanceof Error?s:new Error(String(s));o.status={state:"failed",failures:o.status.failures+1,error:{message:a.message,...a.stack?{stack:a.stack}:{},at:"setupOnce"}},n({plugin:o.plugin.name,error:a,at:"setupOnce"})}},destroy(){var i;for(const n of r){try{(i=n.teardown)==null||i.call(n)}catch{}n.teardown=void 0}},async capture(i,n){const o={};for(const s of r)if(s.plugin.capture)try{const a=await s.plugin.capture(s.ctx),l=t9(a,s.plugin.version);l!==null&&(o[s.plugin.name]=l)}catch(a){const l=a instanceof Error?a:new Error(String(a));o[s.plugin.name]=e9(l),s.status={state:"failed",failures:s.status.failures+1,error:{message:l.message,...l.stack?{stack:l.stack}:{},at:"capture"}},n({plugin:s.plugin.name,error:l,at:"capture"})}return o},status(){const i={};for(const n of r)i[n.plugin.name]=n.status;return i}}}function t9(e,t){if(e==null)return null;const r=t??1;return Array.isArray(e)||typeof e!="object"?{v:r,value:e}:{...e,v:r}}function e9(e){return{error:e.message,...e.stack?{stack:e.stack}:{}}}async function r9(e,t,r,i,n="omit"){const o=await i9(r),s=await fetch(e,{method:"POST",credentials:n,headers:{"Content-Type":"application/json",...o},body:JSON.stringify(t),signal:i}),l=(s.headers.get("content-type")??"").includes("application/json")?await s.json().catch(()=>null):await s.text();return{ok:s.ok,status:s.status,body:l}}async function i9(e){return e?typeof e=="function"?await e()??{}:e:{}}function n9(e,t,r){for(const i of t){const n=document.createElement("div");if(n.className="beacon-field",i.label){const s=document.createElement("label");s.className="beacon-label",s.textContent=i.label,n.appendChild(s)}if(i.description){const s=document.createElement("div");s.className="beacon-description",s.textContent=i.description,n.appendChild(s)}const o=o9(i,r);n.appendChild(o),e.appendChild(n)}}function o9(e,t){var i,n;const r=t.get(e.name);switch(e.type){case"toggle":{const o=document.createElement("label");o.className="beacon-toggle";const s=document.createElement("input");return s.type="checkbox",s.checked=r??e.defaultValue??!1,s.addEventListener("change",()=>t.set(e.name,s.checked)),o.appendChild(s),t.set(e.name,s.checked),o}case"text":{const o=document.createElement("input");o.type="text",o.className="beacon-input";const s=r??e.defaultValue??"";return o.value=s,e.placeholder&&(o.placeholder=e.placeholder),o.addEventListener("input",()=>t.set(e.name,o.value)),t.set(e.name,s),o}case"textarea":{const o=document.createElement("textarea");o.className="beacon-textarea";const s=r??e.defaultValue??"";return o.value=s,e.placeholder&&(o.placeholder=e.placeholder),e.rows&&(o.rows=e.rows),o.addEventListener("input",()=>t.set(e.name,o.value)),t.set(e.name,s),o}case"select":{const o=document.createElement("select");o.className="beacon-select";const s=r??e.defaultValue??((i=e.options[0])==null?void 0:i.value)??"";for(const a of e.options){const l=document.createElement("option");l.value=a.value,l.textContent=a.label??a.value,a.value===s&&(l.selected=!0),o.appendChild(l)}return o.addEventListener("change",()=>t.set(e.name,o.value)),t.set(e.name,s),o}case"radio":{const o=document.createElement("div");o.className="beacon-radio-group";const s=r??e.defaultValue??((n=e.options[0])==null?void 0:n.value)??"";for(const a of e.options){const l=document.createElement("label");l.className="beacon-radio-opt";const c=document.createElement("input");c.type="radio",c.name=e.name,c.value=a.value,a.value===s&&(c.checked=!0),c.addEventListener("change",()=>t.set(e.name,a.value));const h=document.createElement("span");h.textContent=a.label??a.value,l.appendChild(c),l.appendChild(h),o.appendChild(l)}return t.set(e.name,s),o}case"number":{const o=document.createElement("input");o.type="number",o.className="beacon-input";const s=r??e.defaultValue;return s!==void 0&&(o.value=String(s)),e.min!==void 0&&(o.min=String(e.min)),e.max!==void 0&&(o.max=String(e.max)),e.step!==void 0&&(o.step=String(e.step)),o.addEventListener("input",()=>{const a=o.value===""?void 0:Number(o.value);t.set(e.name,a)}),s!==void 0&&t.set(e.name,s),o}}}const kd="http://www.w3.org/2000/svg";function s9(){const e=document.createElementNS(kd,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round");const t=document.createElementNS(kd,"line");t.setAttribute("x1","18"),t.setAttribute("y1","6"),t.setAttribute("x2","6"),t.setAttribute("y2","18");const r=document.createElementNS(kd,"line");return r.setAttribute("x1","6"),r.setAttribute("y1","6"),r.setAttribute("x2","18"),r.setAttribute("y2","18"),e.appendChild(t),e.appendChild(r),e}class a9{constructor(t,r,i){this.labels=t,this.severities=r,this.callbacks=i,this.severitySelected="bug",this.modeCounts={minimize:0,hide:0,pickElement:0},this.pluginCleanups=[],this.lastActive=null,this.submitSucceeded=!1,this.expectedSuppressedCloses=0,this.root=document.createElement("dialog"),this.root.className="beacon-dialog",this.inner=document.createElement("div"),this.inner.className="beacon-dialog-inner",this.root.appendChild(this.inner);const n=document.createElement("div");n.className="beacon-drawer-header";const o=document.createElement("div");o.className="beacon-drawer-title",o.textContent=t.drawerTitle,n.appendChild(o);const s=document.createElement("button");s.type="button",s.className="beacon-icon-btn",s.setAttribute("aria-label",t.closeButton),s.appendChild(s9()),s.addEventListener("click",()=>this.userCloseAttempt()),n.appendChild(s),this.inner.appendChild(n),this.root.addEventListener("cancel",d=>{this.submitSucceeded||this.hasUnsavedInput()&&(d.preventDefault(),window.confirm("You have unsaved feedback. Discard?")&&this.root.close())});const a=document.createElement("div");a.className="beacon-drawer-body",this.inner.appendChild(a);const l=document.createElement("div");l.className="beacon-field";const c=document.createElement("label");c.className="beacon-label",c.textContent=t.descriptionLabel,this.descTextarea=document.createElement("textarea"),this.descTextarea.className="beacon-textarea",this.descTextarea.placeholder=t.descriptionPlaceholder,this.descTextarea.rows=4,l.appendChild(c),l.appendChild(this.descTextarea),a.appendChild(l);const h=document.createElement("div");h.className="beacon-field";const u=document.createElement("label");u.className="beacon-label",u.textContent=t.severityLabel,this.severitiesContainer=document.createElement("div"),this.severitiesContainer.className="beacon-severity";for(const d of r){const p=document.createElement("label");p.className="beacon-severity-opt",p.dataset.sev=d;const g=document.createElement("input");g.type="radio",g.name="beacon-severity",g.value=d,d===this.severitySelected&&(g.checked=!0,p.classList.add("selected")),g.addEventListener("change",()=>this.setSeverity(d)),p.appendChild(g),p.appendChild(document.createTextNode(this.severityLabel(d))),this.severitiesContainer.appendChild(p)}h.appendChild(u),h.appendChild(this.severitiesContainer),a.appendChild(h),this.pluginSlot=document.createElement("div"),this.pluginSlot.className="beacon-plugin-panels",a.appendChild(this.pluginSlot),this.statusEl=document.createElement("div"),this.statusEl.className="beacon-status",a.appendChild(this.statusEl);const f=document.createElement("div");f.className="beacon-actions",this.submitBtn=document.createElement("button"),this.submitBtn.type="button",this.submitBtn.className="beacon-btn primary",this.submitBtn.textContent=t.send,this.submitBtn.addEventListener("click",()=>this.callbacks.onSubmit()),f.appendChild(this.submitBtn),a.appendChild(f),this.root.addEventListener("close",()=>{if(this.expectedSuppressedCloses>0){this.expectedSuppressedCloses-=1;return}this.callbacks.onClose("user")})}async requestMode(t){this.modeCounts[t]+=1,this.modeCounts[t]===1&&this.applyMode(t,!0);let r=!1;return()=>{r||(r=!0,this.modeCounts[t]-=1,this.modeCounts[t]===0&&this.applyMode(t,!1))}}applyMode(t,r){var i,n;switch(t){case"pickElement":{r?(this.lastActive=document.activeElement instanceof HTMLElement?document.activeElement:null,this.root.open&&(this.expectedSuppressedCloses+=1,this.root.close())):(this.root.open||this.tryShowModal(),(n=(i=this.lastActive)==null?void 0:i.focus)==null||n.call(i));break}case"hide":{this.inner.style.visibility=r?"hidden":"",this.root.style.opacity=r?"0":"";break}case"minimize":{const o=this.inner.querySelector(".beacon-drawer-body");o&&(o.style.display=r?"none":"");break}}}open(){this.root.open||this.tryShowModal()}close(t="user"){this.root.open&&this.root.close(),t==="submitted"&&(this.statusEl.textContent="")}userCloseAttempt(){!this.submitSucceeded&&this.hasUnsavedInput()&&!window.confirm("You have unsaved feedback. Discard?")||this.root.open&&this.root.close()}hasUnsavedInput(){return this.descTextarea.value.trim().length>0}setSubmitSucceeded(t){this.submitSucceeded=t}getDescription(){return this.descTextarea.value}setDescription(t){this.descTextarea.value=t}getSeverity(){return this.severitySelected}setSeverity(t){this.severitySelected=t;for(const r of Array.from(this.severitiesContainer.children)){r.classList.toggle("selected",r.dataset.sev===t);const i=r.querySelector("input");i&&(i.checked=r.dataset.sev===t)}}setStatus(t,r="idle"){this.statusEl.textContent=t,this.statusEl.classList.remove("error","success"),r!=="idle"&&this.statusEl.classList.add(r)}setSubmitting(t){this.submitBtn.disabled=t,this.submitBtn.textContent=t?this.labels.sending:this.labels.send}resetState(){this.descTextarea.value="",this.setStatus("","idle"),this.setSubmitting(!1),this.submitSucceeded=!1,this.severities[0]&&this.setSeverity(this.severities[0])}installPluginPanels(t,r){this.clearPluginPanels();for(const i of t){const n=document.createElement("div");if(n.className="beacon-plugin-panel",i.form.title){const o=document.createElement("div");o.className="beacon-plugin-panel-title",o.textContent=i.form.title,n.appendChild(o)}if("fields"in i.form)n9(n,i.form.fields,{get:o=>r.get(i.name,o),set:(o,s)=>r.set(i.name,o,s)});else{const o=i.form.render(n,i.ctx);typeof o=="function"&&this.pluginCleanups.push(o)}this.pluginSlot.appendChild(n)}}clearPluginPanels(){for(const t of this.pluginCleanups)try{t()}catch{}this.pluginCleanups=[],this.pluginSlot.innerHTML=""}severityLabel(t){switch(t){case"bug":return this.labels.severityBug;case"idea":return this.labels.severityIdea;case"ux":return this.labels.severityUx;case"a11y":return this.labels.severityA11y}}tryShowModal(){try{this.root.showModal()}catch{this.root.show()}}}function l9(){return{triggerButton:"Feedback",drawerTitle:"Send feedback",closeButton:"Close",send:"Send",sending:"Sending…",sentSuccess:"Sent — thanks!",descriptionLabel:"Description",descriptionPlaceholder:"What happened?",severityLabel:"Severity",severityBug:"bug",severityIdea:"idea",severityUx:"ux",severityA11y:"a11y"}}function c9(e){const t=document.createElement("div");return t.className="beacon-overlay-layer",e.appendChild(t),{layer:t}}function h9(e,t){const r=document.createElement("div");e.layer.appendChild(r);let i;try{i=t(r)}catch(n){throw r.remove(),n}return()=>{try{i==null||i()}catch{}r.parentNode&&r.parentNode.removeChild(r)}}function u9(){var r,i;const e=navigator;return e.userAgentData?{brand:((r=e.userAgentData.brands.find(n=>!/Not[.\-]?A.?Brand/i.test(n.brand)))==null?void 0:r.brand)??((i=e.userAgentData.brands[0])==null?void 0:i.brand)??"unknown",mobile:e.userAgentData.mobile,platform:e.userAgentData.platform}:void 0}function d9(){return{name:"metadata",capture(){const e=u9();return e?{uaData:e}:null}}}const f9=8,p9=" >> ";function lC(e,t=document){if(!e)return!1;try{return t.querySelectorAll(`#${CSS.escape(e)}`).length===1}catch{return!1}}function g9(e){const t=e.tagName.toLowerCase(),r=Array.from(e.classList).filter(i=>i.length>0&&i.length<40).slice(0,3).map(i=>`.${CSS.escape(i)}`).join("");return t+r}function m9(e){const t=e.parentElement;return t?Array.from(t.children).filter(i=>i.tagName===e.tagName).indexOf(e)+1:1}function y9(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(e.id&&lC(e.id))return`#${CSS.escape(e.id)}`;const t=[],r=[];let i=e,n=0;for(;i&&i.tagName.toLowerCase()!=="body"&&n<f9;){const s=i;if(s.id&&lC(s.id)){t.unshift(`#${CSS.escape(s.id)}`);break}const a=g9(s),l=s.parentElement;let c=a;if(l)try{const h=Array.from(s.classList).join(" ");Array.from(l.children).filter(f=>f.tagName===s.tagName&&Array.from(f.classList).join(" ")===h).length>1&&(c=`${s.tagName.toLowerCase()}:nth-of-type(${m9(s)})`)}catch{}if(t.unshift(c),t.length>1&&r.unshift(" > "),l)i=l;else{const h=s.getRootNode();h instanceof ShadowRoot?(i=h.host,t.length>0&&(r[0]=p9)):i=null}n++}let o=t[0]??"";for(let s=1;s<t.length;s++)o+=(r[s-1]??" > ")+t[s];return o}function x9(e){const t=Object.keys(e).filter(i=>i.startsWith("__reactFiber$")||i.startsWith("__reactInternalInstance$"));if(t.length===0)return null;let r=e[t[0]];for(let i=0;i<10&&r;i++){const n=r,o=n.type;if(typeof o=="function"){const s=o.displayName??o.name;if(s&&s!=="_default")return{lib:"react",name:s}}if(typeof o=="object"&&o!==null){const s=o.displayName??o.name;if(s)return{lib:"react",name:s}}r=n.return}return{lib:"react"}}function C9(e){var i,n;const t=e,r=t.__vueParentComponent;if(r){const o=((i=r.type)==null?void 0:i.name)??((n=r.type)==null?void 0:n.__name);return{lib:"vue",...o?{name:o}:{}}}return t.__vue__?{lib:"vue"}:null}function b9(e){const t=window.ng;if(!(t!=null&&t.getComponent))return null;try{const r=t.getComponent(e);if(!r)return null;const i=r.constructor;return{lib:"angular",...i!=null&&i.name?{name:i.name}:{}}}catch{return null}}function k9(e){return"__svelte_meta"in e?{lib:"svelte"}:null}function v9(e){return x9(e)??C9(e)??b9(e)??k9(e)??void 0}const w9=5e3,S9=1e3,cC=1e3,hC=200,T9=50,uC=200,_9=500,B9=["display","position","top","right","bottom","left","width","height","min-width","min-height","max-width","max-height","margin","padding","font-family","font-size","font-weight","line-height","text-align","color","background-color","background-image","border","border-radius","opacity","visibility","overflow","z-index","transform","transition","flex","flex-direction","justify-content","align-items","gap","grid-template-columns","grid-template-rows"];function dC(e,t){return e.length<=t?e:e.slice(0,t)+`
|
|
1173
|
-
|
|
1174
|
-
/* … truncated, original was ${e.length} chars */`}function L9(e){const t=getComputedStyle(e),r={};for(const i of B9){const n=t.getPropertyValue(i);n&&n!=="normal"&&n!=="none"&&n!=="auto"&&n!=="0px"&&(r[i]=n.trim().slice(0,_9))}return r}function E9(e){return Array.from(e.classList).slice(0,T9).map(t=>t.length>uC?t.slice(0,uC):t)}function A9(e){const t=e.getBoundingClientRect(),r=y9(e),i=e.id||null,n=v9(e);return{selector:r.length>cC?r.slice(0,cC):r,tagName:e.tagName.toLowerCase(),id:i&&i.length>hC?i.slice(0,hC):i,classList:E9(e),outerHTML:dC(e.outerHTML,w9),...e.parentElement?{parentOuterHTML:dC(e.parentElement.outerHTML,S9)}:{},computedStyles:L9(e),boundingRect:{x:Math.round(t.x),y:Math.round(t.y),w:Math.round(t.width),h:Math.round(t.height)},...n?{framework:n}:{}}}const F9=14,M9="#ffffff",$9="#ffffff",I9=3,P9="#0ea5e9";async function y_(e,t,r,i=P9){const n=await R9(e),o=document.createElement("canvas");o.width=n.naturalWidth,o.height=n.naturalHeight;const s=o.getContext("2d");if(!s)throw new Error("Could not get 2D canvas context");s.drawImage(n,0,0);const a=o.width/r.w,l=o.height/r.h;for(const c of t){const h=O9(c);if(!h)continue;const u=h.x*a,f=h.y*l,d=h.w*a,p=h.h*l;s.lineWidth=I9,s.strokeStyle=i,s.strokeRect(u,f,d,p);const g=u+d,x=f;s.beginPath(),s.fillStyle=i,s.arc(g,x,F9,0,Math.PI*2),s.fill(),s.lineWidth=3,s.strokeStyle=M9,s.stroke(),s.fillStyle=$9,s.font="bold 16px system-ui, -apple-system, sans-serif",s.textAlign="center",s.textBaseline="middle",s.fillText(String(c.number),g,x+1)}return o.toDataURL("image/jpeg",.85)}function O9(e){if(e.liveElement&&document.contains(e.liveElement)){const t=e.liveElement.getBoundingClientRect();if(t.width>0||t.height>0)return{x:t.left,y:t.top,w:t.width,h:t.height}}if(e.selector)try{const t=document.querySelector(e.selector);if(t){const r=t.getBoundingClientRect();if(r.width>0||r.height>0)return{x:r.left,y:r.top,w:r.width,h:r.height}}}catch{}return e.boundingRect}function R9(e){return new Promise((t,r)=>{const i=new Image;i.onload=()=>t(i),i.onerror=n=>r(n),i.src=e})}const Is="beacon-no-capture",D9="#0ea5e9",fC="Click any element to pin it · Press Esc to finish";function pC(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function N9(e={}){const t=e.accent??D9,r=pC(t,"b3"),i=pC(t,"2e"),n=document.createElement("style");n.className=Is,n.textContent="@keyframes beacon-spin { to { transform: rotate(360deg); } }",document.head.appendChild(n);const o=document.createElement("div");o.className=Is,o.setAttribute("aria-hidden","true"),o.style.cssText=["position: fixed","inset: 0","pointer-events: none","z-index: 2147483646",`border: 2px dashed ${r}`,"border-radius: 4px",`box-shadow: inset 0 0 56px ${i}`,"box-sizing: border-box"].join("; ");const s=document.createElement("div");s.className=Is,s.setAttribute("role","status"),s.style.cssText=["position: fixed","top: 16px","left: 50%","transform: translateX(-50%)",`background: ${t}`,"color: #fff","padding: 6px 14px","border-radius: 999px","font: 500 12px/1.4 system-ui, -apple-system, sans-serif","letter-spacing: 0.01em","box-shadow: 0 4px 12px hsl(0 0% 0% / 0.3)","pointer-events: none","white-space: nowrap","z-index: 2147483646"].join("; "),s.textContent=fC;const a=`<span style="
|
|
1175
|
-
display: inline-block;
|
|
1176
|
-
width: 12px;
|
|
1177
|
-
height: 12px;
|
|
1178
|
-
border: 2px solid #fff;
|
|
1179
|
-
border-top-color: transparent;
|
|
1180
|
-
border-radius: 50%;
|
|
1181
|
-
animation: beacon-spin 800ms linear infinite;
|
|
1182
|
-
vertical-align: middle;
|
|
1183
|
-
margin-right: 8px;
|
|
1184
|
-
"></span>`;function l(m){return m.replace(/[<>&]/g,y=>({"<":"<",">":">","&":"&"})[y])}document.body.appendChild(o),document.body.appendChild(s);const c=new Map;function h(m){const y=document.createElement("div");return y.className=Is,y.setAttribute("aria-hidden","true"),y.style.cssText=["position: fixed","width: 24px","height: 24px","border-radius: 999px",`background: ${t}`,"color: #fff","display: flex","align-items: center","justify-content: center","font: 700 12px/1 system-ui, -apple-system, sans-serif","border: 2px solid #fff","box-shadow: 0 2px 8px hsl(0 0% 0% / 0.4)","pointer-events: none","z-index: 2147483646"].join("; "),y.textContent=String(m),document.body.appendChild(y),y}function u(){const m=document.createElement("div");return m.className=Is,m.setAttribute("aria-hidden","true"),m.style.cssText=["position: fixed","pointer-events: none",`border: 2px solid ${t}`,"border-radius: 2px","box-sizing: border-box","z-index: 2147483645"].join("; "),document.body.appendChild(m),m}function f(m,y,b){const v=b?"0.5":"1";m.outline.style.display="block",m.outline.style.opacity=v,m.outline.style.left=`${y.x}px`,m.outline.style.top=`${y.y}px`,m.outline.style.width=`${y.w}px`,m.outline.style.height=`${y.h}px`,m.marker.style.display="flex",m.marker.style.opacity=v,m.marker.style.left=`${y.x+y.w-12}px`,m.marker.style.top=`${Math.max(2,y.y-12)}px`}function d(m){m.marker.style.display="none",m.outline.style.display="none"}function p(){c.forEach(m=>{let y=m.anchor.target;if(y&&!y.isConnected&&(y=null),!y&&m.anchor.selector){try{y=document.querySelector(m.anchor.selector)}catch{y=null}y&&(m.anchor.target=y)}if(y){const v=y.getBoundingClientRect();if(v.width>0||v.height>0){f(m,{x:v.left,y:v.top,w:v.width,h:v.height},!1);return}}const b=m.anchor.fallbackRect;if(b&&(b.w>0||b.h>0)){f(m,b,!0);return}d(m)})}let g=null;function x(){g===null&&(g=requestAnimationFrame(()=>{g=null,p()}))}return window.addEventListener("scroll",x,!0),window.addEventListener("resize",x),{addPin(m,y){const b=h(m),v=u();c.set(m,{anchor:y,marker:b,outline:v}),p()},setLoading(m){m?s.innerHTML=a+l(m):s.textContent=fC},destroy(){window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x),g!==null&&cancelAnimationFrame(g),o.remove(),s.remove(),n.remove(),c.forEach(({marker:m,outline:y})=>{m.remove(),y.remove()}),c.clear()}}}const z9='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',q9='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';function W9(e){return new Promise(t=>{const r=document.createElement("div");r.className="beacon-pin-popover open beacon-no-capture beacon-theme-auto",r.innerHTML=`
|
|
1185
|
-
<div class="beacon-pin-popover-header">
|
|
1186
|
-
<div style="display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;">
|
|
1187
|
-
<span class="beacon-pin-num">${e.pinNumber}</span>
|
|
1188
|
-
<span>Note for this pin</span>
|
|
1189
|
-
</div>
|
|
1190
|
-
<button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${z9}</button>
|
|
1191
|
-
</div>
|
|
1192
|
-
<textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
|
|
1193
|
-
<div class="beacon-pin-popover-actions">
|
|
1194
|
-
<button type="button" class="beacon-btn primary" data-action="save">${q9} Save</button>
|
|
1195
|
-
</div>
|
|
1196
|
-
`;const i=240,n=160,o=Math.min(Math.max(8,e.anchor.x),window.innerWidth-i-8),s=Math.min(Math.max(8,e.anchor.y+12),window.innerHeight-n-8);r.style.left=`${o}px`,r.style.top=`${s}px`,document.body.appendChild(r);const a=r.querySelector("textarea");a.focus();function l(h){document.removeEventListener("keydown",c,!0),r.remove(),t(h)}function c(h){h.key==="Escape"&&(h.preventDefault(),h.stopPropagation(),l({cancelled:"all"}))}document.addEventListener("keydown",c,!0),r.addEventListener("click",h=>{var d;const f=(d=h.target.closest("[data-action]"))==null?void 0:d.getAttribute("data-action");if(f&&(h.stopPropagation(),f==="cancel"&&l({cancelled:"pin"}),f==="save")){const p=a.value.trim();l({...p?{note:p}:{},cancelled:!1})}}),a.addEventListener("keydown",h=>{if(h.key==="Enter"&&(h.metaKey||h.ctrlKey)){h.preventDefault();const u=a.value.trim();l({...u?{note:u}:{},cancelled:!1})}})})}const j9="#0ea5e9";function H9(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function U9(e){const{shadowRoot:t,onHover:r}=e,i=e.accent??j9,n=H9(i,"14"),o=document.createElement("div");o.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483646",`border: 2px solid ${i}`,`background: ${n}`,"transition: all 60ms ease-out","box-sizing: border-box","border-radius: 2px"].join("; "),document.body.appendChild(o);const s=document.createElement("div");s.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483647","background: #0f172a","color: #fff","font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace","padding: 3px 6px","border-radius: 3px","max-width: 280px","overflow: hidden","text-overflow: ellipsis","white-space: nowrap"].join("; "),document.body.appendChild(s);const a=document.body.style.cursor;document.body.style.cursor="crosshair";let l=!1,c=()=>{};const h=new Promise(v=>{c=v});function u(v){if(!v||!(v instanceof Node))return!1;let S=v;for(;S;){if(S===t||S===t.host)return!0;S=S.parentNode??S.host??null}return!1}function f(v){return v.tagName.includes("-")}function d(v,S){var w,T;o.style.display="none",s.style.display="none";const _=document.elementsFromPoint(v,S);o.style.display="block",s.style.display="block";for(const D of _){if(u(D))continue;let A=D,F=16;for(;A.shadowRoot&&!f(A)&&F-- >0;){const j=(((T=(w=A.shadowRoot).elementsFromPoint)==null?void 0:T.call(w,v,S))??[]).find(P=>!u(P)&&P!==A);if(!j)break;A=j}return A}return null}function p(v){const S=v.getBoundingClientRect();o.style.left=`${S.left}px`,o.style.top=`${S.top}px`,o.style.width=`${S.width}px`,o.style.height=`${S.height}px`;const _=v.tagName.toLowerCase(),w=v.classList.length>0?"."+Array.from(v.classList).slice(0,2).join("."):"";s.textContent=_+w;const T=S.top-22;s.style.left=`${S.left}px`,s.style.top=`${T>=0?T:S.bottom+4}px`}function g(v){const S=d(v.clientX,v.clientY);S?(p(S),r==null||r(S)):(o.style.display="none",s.style.display="none",r==null||r(null))}function x(v){if(v.button!==0)return;v.preventDefault(),v.stopPropagation();const S=d(v.clientX,v.clientY);S&&b(S)}function m(v){v.preventDefault(),v.stopPropagation()}function y(v){v.key==="Escape"&&(v.preventDefault(),b(null))}function b(v){l||(l=!0,document.removeEventListener("mousemove",g,!0),document.removeEventListener("pointerdown",x,!0),document.removeEventListener("click",m,!0),document.removeEventListener("mouseup",m,!0),document.removeEventListener("keydown",y,!0),o.remove(),s.remove(),document.body.style.cursor=a,c(v))}return document.addEventListener("mousemove",g,!0),document.addEventListener("pointerdown",x,!0),document.addEventListener("click",m,!0),document.addEventListener("mouseup",m,!0),document.addEventListener("keydown",y,!0),{cancel:()=>b(null),promise:h}}let vd=null;async function Y9(){return vd||(vd=await vt(()=>import("./index-6sdqbm2o.js"),[])),vd}const pc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";function gC(e,t){if(!e||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("/")||e.startsWith("#"))return!0;try{if(new URL(e,window.location.href).origin===window.location.origin)return!0}catch{return!1}return t==="anonymous"||t==="use-credentials"}function V9(){const e=[],t=[];return document.querySelectorAll("img").forEach(r=>{gC(r.src,r.crossOrigin)||(e.push({el:r,src:r.src}),r.src=pc)}),document.querySelectorAll("image").forEach(r=>{const i=r,n=i.getAttribute("href"),o=i.getAttributeNS("http://www.w3.org/1999/xlink","href"),s=n||o||"";s&&!gC(s)&&(t.push({el:i,href:n,xlink:o}),n!==null&&i.setAttribute("href",pc),o!==null&&i.setAttributeNS("http://www.w3.org/1999/xlink","href",pc))}),()=>{for(const{el:r,src:i}of e)r.src=i;for(const{el:r,href:i,xlink:n}of t)i!==null&&r.setAttribute("href",i),n!==null&&r.setAttributeNS("http://www.w3.org/1999/xlink","href",n)}}function G9(){const e=[];document.querySelectorAll("*").forEach(o=>{const s=getComputedStyle(o),a=(s.overflowY==="auto"||s.overflowY==="scroll")&&o.scrollHeight>o.clientHeight,l=(s.overflowX==="auto"||s.overflowX==="scroll")&&o.scrollWidth>o.clientWidth;(a||l)&&e.push(o)});const t=window.scrollX,r=window.scrollY,i=e.map(o=>({el:o,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop})),n=new Map;for(const o of e){let s=o;for(;s&&s!==document.documentElement.parentElement;)n.has(s)||n.set(s,s.style.cssText),s=s.parentElement}for(const o of n.keys())o.style.setProperty("overflow","visible","important"),o.style.setProperty("overflow-x","visible","important"),o.style.setProperty("overflow-y","visible","important"),o.style.setProperty("max-height","none","important"),o.style.setProperty("height","auto","important"),o.style.setProperty("min-height","0","important");return()=>{for(const[o,s]of n)o.style.cssText=s;for(const{el:o,scrollLeft:s,scrollTop:a}of i)o.scrollLeft=s,o.scrollTop=a;window.scrollTo(t,r)}}function X9(){const e=document.createElement("style");return e.setAttribute("data-beacon-capture",""),e.textContent="*,*::before,*::after{animation:none !important;transition:none !important;}",(document.head??document.documentElement).appendChild(e),()=>{e.remove()}}let mC=Promise.resolve();async function x_(e={}){const t=mC;let r;mC=new Promise(i=>{r=i});try{return await t,await Q9(e,r)}catch(i){throw r(),i}}async function Q9(e,t){const{quality:r=.7,pixelRatio:i=Math.min(window.devicePixelRatio||1,2),excludeShadowRoot:n,excludeHosts:o,fullPage:s=!0}=e,a=await Y9(),l=n||o!=null&&o.length?p=>{let g=p;for(;g;){if(n&&g===n.host||o&&g instanceof Element&&o.includes(g)||g instanceof Element&&g.classList.contains("beacon-no-capture"))return!1;g=g.parentNode}return!0}:void 0,c=V9(),h=s?G9():()=>{},u=X9();let f=!1;const d=()=>{if(!f){f=!0;try{u()}finally{try{h()}finally{try{c()}finally{t()}}}}};try{s&&await new Promise(y=>requestAnimationFrame(()=>y()));const p=document.documentElement,g=s?Math.max(p.scrollWidth,window.innerWidth):window.innerWidth,x=s?Math.max(p.scrollHeight,window.innerHeight):window.innerHeight;return{dataUrl:await a.toJpeg(p,{quality:r,pixelRatio:i,cacheBust:!0,...l?{filter:l}:{},imagePlaceholder:pc,width:g,height:x,style:{transform:"none"}}),width:g,height:x,pixelRatio:i,dispose:d}}catch(p){throw d(),p}}let Am=null;function Z9(e){Am=e}function K9(){return Am}function io(){Am=null}const yC="http://www.w3.org/2000/svg";function J9(){const e=document.createElementNS(yC,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("aria-hidden","true");const t=["M3 6h18","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6","M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"];for(const r of t){const i=document.createElementNS(yC,"path");i.setAttribute("d",r),e.appendChild(i)}return e}function t7(e={}){const t=e.maxPins??20;let r=[],i=new WeakMap,n=null,o=0,s=null,a=null,l=null,c=null;function h(){r=[],i=new WeakMap,n=null,o+=1,io(),x(),m()}function u(){const y=document.querySelector("launch-kit-beacon");return(y==null?void 0:y.shadowRoot)??null}function f(){if(typeof window>"u")return e.accent??"#0ea5e9";if(e.accent)return e.accent;const y=document.querySelector("launch-kit-beacon");return y&&getComputedStyle(y).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}async function d(y){const b=u();if(!b)return;const v=f(),S=await y.requestMode("pickElement"),_=N9({accent:v});for(const w of r){const T=i.get(w);T&&_.addPin(w.number,{target:T,selector:w.selector,fallbackRect:w.boundingRect})}try{let w=!0;for(;w&&!(r.length>=t);){const D=await U9({shadowRoot:b,accent:v}).promise;if(!D)break;const A=D.getBoundingClientRect(),F=await W9({anchor:{x:A.left,y:A.bottom},pinNumber:r.length+1});if(F.cancelled==="all"){w=!1;break}if(F.cancelled==="pin")continue;const V=A9(D),j={number:r.length+1,...V,...F.note?{note:F.note}:{}};r.push(j),i.set(j,D),_.addPin(j.number,{target:D,selector:V.selector,fallbackRect:V.boundingRect})}r.length>0?(_.setLoading("Capturing screenshot…"),await new Promise(T=>requestAnimationFrame(()=>T())),await p()):(n=null,io())}finally{_.destroy(),S()}x(),m()}async function p(){const y=++o;if(r.length===0){n=null,io(),m();return}const b=f();try{const v=Array.from(document.querySelectorAll("launch-kit-beacon")),S=await x_({excludeHosts:v});try{if(y!==o)return;const _=r.map(D=>({number:D.number,selector:D.selector,boundingRect:D.boundingRect,...i.get(D)?{liveElement:i.get(D)}:{}})),w={w:S.width,h:S.height,dpr:S.pixelRatio},T=await y_(S.dataUrl,_,w,b);if(y!==o)return;n=T,Z9({dataUrl:T,mime:"image/jpeg"})}finally{S.dispose()}}catch{if(y!==o)return;n=null,io()}y===o&&m()}function g(y){const b=r.findIndex(v=>v.number===y);b!==-1&&(r.splice(b,1),r.forEach((v,S)=>{v.number=S+1}),n=null,io(),x(),m(),p())}function x(){if(s&&(s.textContent=`Pins (${r.length})`,s.style.display=r.length===0?"none":""),c&&(c.textContent=r.length===0?"Annotate elements":"Add another pin"),!!a){a.innerHTML="",a.style.display=r.length===0?"none":"";for(const y of r){const b=document.createElement("div");b.className="beacon-pin-item",b.dataset.pin=String(y.number);const v=document.createElement("span");v.className="beacon-pin-num",v.textContent=String(y.number);const S=document.createElement("div");S.className="beacon-pin-meta";const _=document.createElement("div");_.className="beacon-pin-selector",_.title=y.selector,_.textContent=y.selector||y.tagName;const w=document.createElement("input");w.type="text",w.className="beacon-pin-note-input",w.placeholder="Add a note (optional)",w.value=y.note??"",w.addEventListener("input",()=>{w.value.trim()?y.note=w.value:delete y.note}),S.appendChild(_),S.appendChild(w);const T=document.createElement("button");T.type="button",T.className="beacon-icon-btn",T.setAttribute("aria-label",`Remove pin ${y.number}`),T.appendChild(J9()),T.addEventListener("click",()=>g(y.number)),b.appendChild(v),b.appendChild(S),b.appendChild(T),a.appendChild(b)}}}function m(){l&&(n?(l.src=n,l.style.display="block"):(l.removeAttribute("src"),l.style.display="none"))}return{name:"domEle",setupOnce(y){return y.on("close",()=>h())},form(y){return{render:b=>(s=document.createElement("div"),s.className="beacon-pin-list-header",b.appendChild(s),a=document.createElement("div"),a.className="beacon-pin-list",b.appendChild(a),c=document.createElement("button"),c.type="button",c.className="beacon-btn secondary beacon-pin-annotate",c.addEventListener("click",()=>{d(y)}),b.appendChild(c),l=document.createElement("img"),l.className="beacon-thumb",l.alt="Annotated screenshot preview",l.style.display="none",b.appendChild(l),x(),m(),()=>{s=null,a=null,l=null,c=null})}},capture(){return r.length===0?null:{pins:r}}}}function e7(e){return!!e&&typeof e=="object"&&!("v"in e)&&"error"in e}function r7(e={}){return{name:"domSS",async capture(t){const r=K9();if(r)return{dataUrl:r.dataUrl,mime:r.mime};const i=await t.requestMode("hide");try{await new Promise(s=>requestAnimationFrame(()=>s()));const n=Array.from(document.querySelectorAll("launch-kit-beacon")),o=await x_({quality:e.quality,pixelRatio:e.pixelRatio,excludeHosts:n});try{const s=t.captured("domEle"),a=i7(s),l={w:o.width,h:o.height,dpr:o.pixelRatio},c=e.accent??n7();return{dataUrl:a.length>0?await y_(o.dataUrl,a,l,c):o.dataUrl,mime:"image/jpeg"}}finally{o.dispose()}}finally{i()}}}}function i7(e){if(!e||e7(e))return[];const t=e.pins;return Array.isArray(t)?t.filter(r=>!!r&&typeof r=="object").map(r=>({number:Number(r.number)||0,selector:typeof r.selector=="string"?r.selector:void 0,boundingRect:r.boundingRect??{x:0,y:0,w:0,h:0}})):[]}function n7(){if(typeof window>"u")return"#0ea5e9";const e=document.querySelector("launch-kit-beacon");return e&&getComputedStyle(e).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}let er=null;const Fm={"plugin:error":new Set,"submit:success":new Set,"submit:error":new Set,ready:new Set};function o7(e){if(typeof window>"u")return;if(!e.endpoint)throw new Error("init: endpoint is required");m_(),b_();const t={...l9(),...e.labels??{}},r=new AbortController,i=c7(e),n=e.position??"bottom-right",o=e.theme??"auto";Vz(),l7(e,n,o);const s=document.querySelector(ja);if(!s)throw new Error("init: failed to acquire <launch-kit-beacon> host");if(!s.shadow)throw new Error("init: host element shadow root not initialized");const a=c9(s.shadow),l=new a9(t,["bug","idea","ux","a11y"],{onSubmit:()=>{u7()},onClose:u=>{Sh("close",{}),u==="user"&&v_()}});s.shadow.appendChild(l.root),s.classList.add("beacon-no-capture");const c=Jz(i),h={endpoint:e.endpoint,headers:e.headers,context:e.context,credentials:e.credentials??"omit",plugins:i,registry:c,dialog:l,overlayHost:a,hostElement:s,initAbort:r,labels:t,debug:!!e.debug||h7(),healthIndicator:e.healthIndicator??"never",position:n,theme:o,currentSubmit:null,capturedEntries:{},formValues:{},lifecycleHandlers:{open:new Set,close:new Set,beforeSubmit:new Set,afterSubmit:new Set},panelSources:[]};er=h,s.onTriggerClick=()=>C_(),c.install(u=>k_(u),u=>Mm(u)),ua("ready",{ready:!0}),h.debug&&console.info("[beacon] ready",h.endpoint)}function C_(){const e=er;e&&(e.currentSubmit||(e.panelSources=e.plugins.map(t=>{if(!t.form)return null;const r=k_(t.name);let i;try{i=t.form(r)}catch(n){return Mm({plugin:t.name,error:n instanceof Error?n:new Error(String(n)),at:"form"}),null}return{name:t.name,form:i,ctx:r}}).filter(t=>t!==null),e.dialog.installPluginPanels(e.panelSources,{get:(t,r)=>{var i;return(i=e.formValues[t])==null?void 0:i[r]},set:(t,r,i)=>{var o;const n=(o=e.formValues)[t]??(o[t]={});n[r]=i}}),e.dialog.open(),Sh("open",{})))}function b_(){var t;const e=er;if(e){e.initAbort.abort(),(t=e.currentSubmit)==null||t.abort(),e.registry.destroy(),io();try{e.dialog.root.remove(),e.overlayHost.layer.remove()}catch{}e.hostElement.onTriggerClick=null,er=null}}function s7(e,t){return Fm[e].add(t),()=>a7(e,t)}function a7(e,t){Fm[e].delete(t)}function l7(e,t,r){let i=document.querySelector(ja);if(!i){i=document.createElement(ja),i.setAttribute("position",t),i.setAttribute("theme",r),t==="hidden"&&(i.style.position="absolute",i.style.left="-9999px"),(document.body??document.documentElement).appendChild(i);return}e.position!==void 0&&i.setAttribute("position",t),e.theme!==void 0&&i.setAttribute("theme",r)}function c7(e){return e.plugins?e.plugins:[]}function h7(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("lsbeacon-debug")}catch{return!1}}function k_(e){const t=er;return Zz(e,{getCaptured:i=>t==null?void 0:t.capturedEntries[i],getFormValues:i=>{var n;return t?(n=t.formValues)[i]??(n[i]={}):{}},getCaptureSignal:()=>{var i;return(i=t==null?void 0:t.currentSubmit)==null?void 0:i.signal},getInitSignal:()=>t.initAbort.signal,requestMode:async i=>t?t.dialog.requestMode(i):()=>{},overlay:i=>t?h9(t.overlayHost,i.render):()=>{},onLifecycle:(i,n)=>{if(!t)return()=>{};const o=t.lifecycleHandlers[i];return o.add(n),()=>o.delete(n)}})}function Sh(e,t){const r=er;if(r)for(const i of r.lifecycleHandlers[e])try{i(t)}catch(n){r.debug&&console.error("[beacon] lifecycle handler threw:",n)}}function ua(e,t){for(const r of Fm[e])try{r(t)}catch(i){er!=null&&er.debug&&console.error("[beacon] system handler threw:",i)}}function Mm(e){ua("plugin:error",{plugin:e.plugin,error:e.error,at:e.at});const t=er;t&&((t.healthIndicator==="always"||t.healthIndicator==="dev"&&t.debug)&&t.hostElement.setHealthIndicator(!0),t.debug&&console.warn(`[beacon] plugin "${e.plugin}" ${e.at} failed:`,e.error))}function v_(){const e=er;e&&(e.dialog.resetState(),e.dialog.clearPluginPanels(),e.formValues={})}async function u7(){const e=er;if(!e||e.currentSubmit)return;const t=e.dialog.getDescription().trim();if(!t){e.dialog.setStatus("Description is required","error");return}e.currentSubmit=new AbortController,e.capturedEntries={},e.dialog.setSubmitting(!0),e.dialog.setStatus("Capturing…");let r=null;try{const i=await e.registry.capture(a=>e.capturedEntries[a],a=>Mm(a));e.capturedEntries=i,r=d7(e,t,i);let n=null;if(Sh("beforeSubmit",{payload:r,cancel:a=>{n===null&&(n=a)}}),n!==null){e.dialog.setSubmitting(!1),e.dialog.setStatus(`Cancelled: ${n}`,"error");return}e.dialog.setStatus("Sending…");const s=await r9(e.endpoint,r,e.headers,e.currentSubmit.signal,e.credentials);Sh("afterSubmit",{payload:r,response:s}),e.dialog.setSubmitting(!1),s.ok?(ua("submit:success",{payload:r,response:s}),e.dialog.setSubmitSucceeded(!0),e.dialog.setStatus(e.labels.sentSuccess,"success"),window.setTimeout(()=>{er===e&&e.dialog.close("submitted"),v_()},1500)):(ua("submit:error",{payload:r,error:new Error(`HTTP ${s.status}`)}),e.dialog.setStatus(`Failed (${s.status})`,"error"))}catch(i){e.dialog.setSubmitting(!1);const n=i instanceof Error?i:new Error(String(i));r&&ua("submit:error",{payload:r,error:n}),e.dialog.setStatus(`Failed: ${n.message}`,"error")}finally{e.currentSubmit=null}}function d7(e,t,r){var o;const i=f7(),n=(o=e.context)==null?void 0:o.call(e);return{description:t,severity:e.dialog.getSeverity(),metadata:i,...n?{context:n}:{},plugins:r}}function f7(){const e=window.location.href,t=document.referrer,r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return{url:e,...t?{referrer:t}:{},userAgent:navigator.userAgent,viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:navigator.language,theme:r,capturedAt:new Date().toISOString()}}m_();const w_="LaunchDeck";let gc=null;function p7(){"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()}function g7(e,t){if("Notification"in window&&Notification.permission==="granted"&&document.hidden){const r=e==="feedback"?t||"Claude is waiting for your feedback":"Claude sent new content";new Notification("LaunchDeck",{body:r,icon:"/favicon.ico"})}document.hidden&&m7(e==="feedback")}function m7(e){Tp();let t=!0;const r=e?"● LaunchDeck — Feedback needed":"● LaunchDeck — New content";gc=setInterval(()=>{document.title=t?r:w_,t=!t},1e3)}function Tp(){gc&&(clearInterval(gc),gc=null),document.title=w_}function y7({theme:e,setTheme:t}){const[r,i]=st.useState(!1),[n,o]=st.useState([]),[s,a]=st.useState(0),[l,c]=st.useState([]),[h,u]=st.useState(!1),[f,d]=st.useState([]),[p,g]=st.useState(null),x=st.useRef(null),m=st.useRef(),y=st.useRef(e);y.current=e;const b=st.useCallback(async()=>{try{const H=await(await fetch("/api/sessions")).json();c(H.sessions)}catch{}},[]),v=st.useCallback(async()=>{try{const H=await(await fetch("/api/deck/courses")).json();d(H.courses),g(G=>{var Q;return G??((Q=H.courses.find(Z=>Z.active))==null?void 0:Q.name)??null})}catch{}},[]),S=st.useCallback(async q=>{o(H=>{const G=H.findIndex(Q=>Q.id===q);return G>=0&&a(G),H});try{const H=await fetch(`/api/sessions/${encodeURIComponent(q)}`);if(!H.ok)return;const G=await H.json();o(Q=>{var Ct;const Z=Q.findIndex(_t=>_t.id===G.id),gt={id:G.id,mode:G.mode,blocks:G.blocks,prompt:G.prompt,selections:((Ct=Q[Z])==null?void 0:Ct.selections)??{},version:G.version};if(Z>=0){const _t=[...Q];return _t[Z]=gt,a(Z),_t}return a(Q.length),[...Q,gt]})}catch{}},[]),_=st.useCallback(async q=>{try{await fetch(`/api/sessions/${encodeURIComponent(q)}`,{method:"DELETE"}),await b()}catch{}},[b]),w=st.useCallback(async q=>{const H=await fetch(`/api/sessions/${encodeURIComponent(q)}/share`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p?{course:p}:{})}),G=await H.json().catch(()=>({}));if(!H.ok||!G.ok)throw new Error(G.error||`Share failed (${H.status})`);await b()},[b,p]),T=st.useCallback(async q=>{const H=await fetch(`/api/sessions/${encodeURIComponent(q)}/remote`,{method:"DELETE"}),G=await H.json().catch(()=>({}));if(!H.ok||!G.ok)throw new Error(G.error||`Cloud delete failed (${H.status})`);await b()},[b]);st.useEffect(()=>{p7()},[]);const D=st.useRef(null),A=st.useRef(null);st.useEffect(()=>{o7({endpoint:"/api/feedback",position:"hidden",plugins:[d9(),t7(),r7()],context:()=>{const H=A.current;return H?{sessionId:H.id,...Object.keys(H.selections).length>0?{selections:H.selections}:{}}:{}},labels:{triggerButton:"Respond",drawerTitle:"Your response",send:"Submit",sending:"Submitting…",sentSuccess:"Sent",descriptionLabel:"Comment",descriptionPlaceholder:"Type your response, or use the picker to annotate…",severityLabel:"Verdict",severityBug:"Blocker",severityIdea:"Iterate",severityUx:"Note",severityA11y:"Approve"}});const q=s7("submit:success",()=>{var G;const H=(G=A.current)==null?void 0:G.id;H&&(o(Q=>Q.map(Z=>Z.id===H?{...Z,mode:"show"}:Z)),Tp())});return()=>{q(),b_()}},[]),st.useEffect(()=>{b(),v();const q=window.location.hash.replace(/^#/,"");q&&S(decodeURIComponent(q))},[b,v,S]),st.useEffect(()=>{const q=()=>{const H=window.location.hash.replace(/^#/,"");if(!H)return;const G=decodeURIComponent(H);D.current!==G&&S(G)};return window.addEventListener("hashchange",q),()=>window.removeEventListener("hashchange",q)},[S]),st.useEffect(()=>{const q=n[s]??null;A.current=q,D.current=(q==null?void 0:q.id)??null;const H=q?`#${encodeURIComponent(q.id)}`:"";if(window.location.hash!==H){const G=`${window.location.pathname}${window.location.search}${H}`;window.history.replaceState(null,"",G)}},[s,n]),st.useEffect(()=>{document.querySelectorAll("iframe").forEach(q=>{var H;try{(H=q.contentWindow)==null||H.postMessage({type:"deck-theme",theme:e},"*")}catch{}})},[e]),st.useEffect(()=>{const q=H=>{var G;if(((G=H.data)==null?void 0:G.type)==="deck-iframe-ready"&&H.source)try{H.source.postMessage({type:"deck-theme",theme:y.current},"*")}catch{}};return window.addEventListener("message",q),()=>window.removeEventListener("message",q)},[]),st.useEffect(()=>{const q=()=>Tp(),H=()=>{document.documentElement.classList.toggle("deck-hidden-tab",document.hidden)};return window.addEventListener("focus",q),document.addEventListener("visibilitychange",H),()=>{window.removeEventListener("focus",q),document.removeEventListener("visibilitychange",H)}},[]);const F=st.useCallback(()=>{const q=window.location.protocol==="https:"?"wss:":"ws:",H=new WebSocket(`${q}//${window.location.host}`);H.onopen=()=>i(!0),H.onclose=()=>{i(!1),x.current=null,m.current=setTimeout(F,2e3)},H.onerror=()=>H.close(),H.onmessage=G=>{try{const Q=JSON.parse(G.data);if(Q.type==="session"&&Q.session){const Z={id:Q.session,mode:Q.mode??"show",blocks:Q.blocks??[],prompt:Q.prompt,selections:{},version:Q.version??1};o(gt=>{const Ct=gt.findIndex(_t=>_t.id===Q.session);if(Ct>=0){const _t=[...gt];return _t[Ct]={...Z,version:Q.version??gt[Ct].version+1},_t}return[...gt,Z]}),o(gt=>{const Ct=gt.findIndex(_t=>_t.id===Q.session);return Ct>=0&&a(Ct),gt}),g7(Q.mode??"show",Q.prompt),b()}Q.type==="clear_session"&&Q.session&&(o(Z=>Z.filter(Ct=>Ct.id!==Q.session)),a(Z=>Math.min(Z,Math.max(0,n.length-2))),b()),Q.type==="clear_all"&&(o([]),a(0),b())}catch{}},x.current=H},[b]);st.useEffect(()=>(F(),()=>{var q;clearTimeout(m.current),(q=x.current)==null||q.close()}),[F]);const V=n[s]??null,j=V?l.find(q=>q.id===V.id):void 0,P=(j==null?void 0:j.shared)??!1,I=(j==null?void 0:j.stale)??!1,$=st.useCallback(q=>{V&&o(H=>H.map(G=>G.id===V.id?{...G,selections:{...G.selections,[q]:!G.selections[q]}}:G))},[V]),O=st.useCallback(q=>{x.current&&x.current.send(JSON.stringify({type:"session_closed",session:q})),o(H=>H.filter(Q=>Q.id!==q)),a(H=>Math.min(H,Math.max(0,n.length-2)))},[n.length]),B=st.useCallback((q,H)=>{x.current&&x.current.send(JSON.stringify({type:"render_error",error:q,source:H}))},[]),z=V?V.mode==="feedback"?"feedback":"delivered":"idle",W=!h||!V;return M.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[W&&M.jsx(dE,{connected:r,theme:e,setTheme:t,status:z,availableSessions:l,onOpenSession:S,courses:f,selectedCourse:p,onSelectCourse:g}),M.jsx("div",{className:"flex flex-1 min-h-0 flex-col",children:M.jsx(qz,{sessions:n,activeSessionIndex:s,onSessionChange:a,onCloseSession:O,onToggleSelection:$,onMermaidError:B,theme:e,onRespond:C_,onShareSession:w,isActiveSessionShared:P,isActiveSessionStale:I,onDeleteSession:_,onDeleteRemote:T,immersive:h,onToggleImmersive:()=>u(q=>!q)})})]})}function x7({children:e}){const[t,r]=Ul.useState(()=>localStorage.getItem("launchdeck-theme")||"dark"),i=Ul.useCallback(n=>{r(n),localStorage.setItem("launchdeck-theme",n);const o=n==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n;document.documentElement.classList.toggle("dark",o==="dark")},[]);return Ul.useEffect(()=>{const n=t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;document.documentElement.classList.toggle("dark",n==="dark")},[t]),M.jsx(y7,{theme:t,setTheme:i})}Sd.createRoot(document.getElementById("root")).render(M.jsx(Ul.StrictMode,{children:M.jsx(x7,{})}));export{ek as $,S7 as A,ji as B,xE as C,Wt as D,JA as E,rm as F,Hb as G,EP as H,MM as I,D$ as J,iA as K,Ea as L,v7 as M,eu as N,$A as O,Jb as P,k0 as Q,wM as R,If as S,LP as T,Xa as U,Mr as V,N as W,R as X,qA as Y,bP as Z,C as _,VA as a,jI as a$,CM as a0,q0 as a1,z0 as a2,$7 as a3,L7 as a4,F7 as a5,A7 as a6,_7 as a7,Ig as a8,M7 as a9,jR as aA,WR as aB,YO as aC,Ib as aD,bM as aE,k7 as aF,tu as aG,ch as aH,Y2 as aI,$_ as aJ,xC as aK,il as aL,HO as aM,jO as aN,Ag as aO,Li as aP,Ma as aQ,I0 as aR,J5 as aS,GI as aT,H2 as aU,R2 as aV,K4 as aW,sh as aX,J4 as aY,el as aZ,hn as a_,B7 as aa,Xn as ab,P7 as ac,I7 as ad,E7 as ae,yR as af,iT as ag,U7 as ah,z$ as ai,$e as aj,vi as ak,Ts as al,im as am,K2 as an,Mn as ao,rw as ap,pt as aq,Vr as ar,tt as as,CD as at,H7 as au,Y7 as av,W7 as aw,nt as ax,j7 as ay,GR as az,YA as b,sx as b0,Dn as b1,tI as b2,Xg as b3,Z4 as b4,iI as b5,ss as b6,VI as b7,mP as b8,lI as b9,tn as bA,ex as bB,Qg as bC,N2 as bD,mp as bE,b7 as bF,vt as bG,cP as ba,Vg as bb,Zx as bc,it as bd,iw as be,je as bf,Y5 as bg,Eg as bh,gk as bi,Ka as bj,xk as bk,T7 as bl,yE as bm,gP as bn,lP as bo,yP as bp,Qh as bq,X4 as br,Gg as bs,j2 as bt,CP as bu,os as bv,tP as bw,WD as bx,tl as by,lh as bz,St as c,xt as d,tk as e,ee as f,XA as g,xi as h,Fr as i,q$ as j,Qa as k,U as l,tw as m,w7 as n,G7 as o,QA as p,ZA as q,V7 as r,GA as s,N$ as t,Tr as u,RR as v,MP as w,O7 as x,Go as y,UA as z};
|