@shaykec/bridge 0.4.18 → 0.4.20
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/canvas-dist/assets/{_basePickBy-BOTBlJNd.js → _basePickBy-CWoeT3J7.js} +1 -1
- package/canvas-dist/assets/{_baseUniq-EF6Y2_Wm.js → _baseUniq-Dtuvtwtn.js} +1 -1
- package/canvas-dist/assets/{arc-C_vIirh2.js → arc-YYWnrNJU.js} +1 -1
- package/canvas-dist/assets/{architectureDiagram-VXUJARFQ-EvM6tQ7I.js → architectureDiagram-VXUJARFQ-CegbV-RR.js} +1 -1
- package/canvas-dist/assets/{blockDiagram-VD42YOAC-B_rbZyqc.js → blockDiagram-VD42YOAC-C2e_j6ry.js} +1 -1
- package/canvas-dist/assets/{c4Diagram-YG6GDRKO-J9PHecY3.js → c4Diagram-YG6GDRKO-rIpnAud9.js} +1 -1
- package/canvas-dist/assets/channel-BzJVlie3.js +1 -0
- package/canvas-dist/assets/{chunk-4BX2VUAB-DjcN96Mk.js → chunk-4BX2VUAB-CpZGetnU.js} +1 -1
- package/canvas-dist/assets/{chunk-55IACEB6-CTdcUQSV.js → chunk-55IACEB6-L0OhcFdd.js} +1 -1
- package/canvas-dist/assets/{chunk-B4BG7PRW-Dcov7eRi.js → chunk-B4BG7PRW-Cv9vsAzg.js} +1 -1
- package/canvas-dist/assets/{chunk-DI55MBZ5-DUJCBZzM.js → chunk-DI55MBZ5-B3p1mU43.js} +1 -1
- package/canvas-dist/assets/{chunk-FMBD7UC4-EfGA9ufe.js → chunk-FMBD7UC4-JCLAHw5x.js} +1 -1
- package/canvas-dist/assets/{chunk-QN33PNHL-Cu6V1xBU.js → chunk-QN33PNHL-C9arKEVq.js} +1 -1
- package/canvas-dist/assets/{chunk-QZHKN3VN-avF3sH_r.js → chunk-QZHKN3VN-Bs1r3d9U.js} +1 -1
- package/canvas-dist/assets/{chunk-TZMSLE5B-CkWW-qpk.js → chunk-TZMSLE5B-_Ye6r84Y.js} +1 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-BTs-zEmB.js +1 -0
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-BTs-zEmB.js +1 -0
- package/canvas-dist/assets/clone-CXEfuXmc.js +1 -0
- package/canvas-dist/assets/{cose-bilkent-S5V4N54A-DDE4zf7X.js → cose-bilkent-S5V4N54A-2O2oovOj.js} +1 -1
- package/canvas-dist/assets/{dagre-6UL2VRFP-BD6MGb7B.js → dagre-6UL2VRFP-gRmGLrEW.js} +1 -1
- package/canvas-dist/assets/{diagram-PSM6KHXK-yyu-ytzf.js → diagram-PSM6KHXK-B7Li-xxw.js} +1 -1
- package/canvas-dist/assets/{diagram-QEK2KX5R-B_H957Uf.js → diagram-QEK2KX5R-B_NNUAm3.js} +1 -1
- package/canvas-dist/assets/{diagram-S2PKOQOG-DuebuBVv.js → diagram-S2PKOQOG-NcK-KHaA.js} +1 -1
- package/canvas-dist/assets/{erDiagram-Q2GNP2WA-AxqPt6IZ.js → erDiagram-Q2GNP2WA-CG7dqzk3.js} +1 -1
- package/canvas-dist/assets/{flowDiagram-NV44I4VS-mDhW3D3Q.js → flowDiagram-NV44I4VS-CBzCj5D6.js} +1 -1
- package/canvas-dist/assets/{ganttDiagram-JELNMOA3-sA8pHJPp.js → ganttDiagram-JELNMOA3-CHw-4qJC.js} +1 -1
- package/canvas-dist/assets/{gitGraphDiagram-V2S2FVAM-CvLzvhKr.js → gitGraphDiagram-V2S2FVAM-Dqrc4wUs.js} +1 -1
- package/canvas-dist/assets/{graph-BVZqMrwW.js → graph-X9Kzu-pf.js} +1 -1
- package/canvas-dist/assets/{index-CF3qc2Xb.js → index-BQFKo-II.js} +1 -1
- package/canvas-dist/assets/index-DJ49c6u-.js +426 -0
- package/canvas-dist/assets/{infoDiagram-HS3SLOUP-D1Kg3Q9d.js → infoDiagram-HS3SLOUP-CflnZPsm.js} +1 -1
- package/canvas-dist/assets/{journeyDiagram-XKPGCS4Q-D7ogbx9z.js → journeyDiagram-XKPGCS4Q-D2gkCipQ.js} +1 -1
- package/canvas-dist/assets/{kanban-definition-3W4ZIXB7-CDcnICM9.js → kanban-definition-3W4ZIXB7-CtLLz4o8.js} +1 -1
- package/canvas-dist/assets/{layout-CuaK7i3M.js → layout-CjvV_Dms.js} +1 -1
- package/canvas-dist/assets/{linear-CLSTOJ0g.js → linear-D3cIYHoS.js} +1 -1
- package/canvas-dist/assets/{mindmap-definition-VGOIOE7T-TrK7CIKt.js → mindmap-definition-VGOIOE7T-DSgjVg-P.js} +1 -1
- package/canvas-dist/assets/{pieDiagram-ADFJNKIX-BcIKTRbi.js → pieDiagram-ADFJNKIX-B_lYaGFj.js} +1 -1
- package/canvas-dist/assets/{quadrantDiagram-AYHSOK5B-EOHXFGoQ.js → quadrantDiagram-AYHSOK5B-DLZLTJe3.js} +1 -1
- package/canvas-dist/assets/{requirementDiagram-UZGBJVZJ-CJ8lImGs.js → requirementDiagram-UZGBJVZJ-CZE26rhL.js} +1 -1
- package/canvas-dist/assets/{sankeyDiagram-TZEHDZUN-4cANY87E.js → sankeyDiagram-TZEHDZUN-DQMRJAPV.js} +1 -1
- package/canvas-dist/assets/{sequenceDiagram-WL72ISMW-D9HrEsci.js → sequenceDiagram-WL72ISMW-BY723FEn.js} +1 -1
- package/canvas-dist/assets/{stateDiagram-FKZM4ZOC-qVbMjauZ.js → stateDiagram-FKZM4ZOC-C_UdOFhy.js} +1 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-DXIiFh0L.js +1 -0
- package/canvas-dist/assets/{timeline-definition-IT6M3QCI-DDBlkydm.js → timeline-definition-IT6M3QCI-DkrJqww0.js} +1 -1
- package/canvas-dist/assets/{treemap-GDKQZRPO-D4a8udjO.js → treemap-GDKQZRPO-B-6bMZqD.js} +1 -1
- package/canvas-dist/assets/{xychartDiagram-PRI3JC2R-DteXAAAu.js → xychartDiagram-PRI3JC2R-DkBhUy_D.js} +1 -1
- package/canvas-dist/index.html +1 -1
- package/package.json +3 -2
- package/src/server.e2e.test.js +10 -36
- package/src/server.js +302 -186
- package/canvas-dist/assets/channel-saCUO1KA.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-CBLbQwHx.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-CBLbQwHx.js +0 -1
- package/canvas-dist/assets/clone-DXnda9BY.js +0 -1
- package/canvas-dist/assets/index-DYNtb52W.js +0 -426
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-MT16RLO4.js +0 -1
- package/src/claude-session.js +0 -381
- package/src/claude-session.test.js +0 -312
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-6UL2VRFP-BD6MGb7B.js","assets/graph-BVZqMrwW.js","assets/_baseUniq-EF6Y2_Wm.js","assets/layout-CuaK7i3M.js","assets/_basePickBy-BOTBlJNd.js","assets/clone-DXnda9BY.js","assets/cose-bilkent-S5V4N54A-DDE4zf7X.js","assets/cytoscape.esm-BQaXIfA_.js","assets/c4Diagram-YG6GDRKO-J9PHecY3.js","assets/chunk-TZMSLE5B-CkWW-qpk.js","assets/flowDiagram-NV44I4VS-mDhW3D3Q.js","assets/chunk-FMBD7UC4-EfGA9ufe.js","assets/chunk-55IACEB6-CTdcUQSV.js","assets/chunk-QN33PNHL-Cu6V1xBU.js","assets/channel-saCUO1KA.js","assets/erDiagram-Q2GNP2WA-AxqPt6IZ.js","assets/gitGraphDiagram-V2S2FVAM-CvLzvhKr.js","assets/chunk-4BX2VUAB-DjcN96Mk.js","assets/chunk-QZHKN3VN-avF3sH_r.js","assets/treemap-GDKQZRPO-D4a8udjO.js","assets/ganttDiagram-JELNMOA3-sA8pHJPp.js","assets/linear-CLSTOJ0g.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-HS3SLOUP-D1Kg3Q9d.js","assets/pieDiagram-ADFJNKIX-BcIKTRbi.js","assets/arc-C_vIirh2.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-EOHXFGoQ.js","assets/xychartDiagram-PRI3JC2R-DteXAAAu.js","assets/requirementDiagram-UZGBJVZJ-CJ8lImGs.js","assets/sequenceDiagram-WL72ISMW-D9HrEsci.js","assets/classDiagram-2ON5EDUG-CBLbQwHx.js","assets/chunk-B4BG7PRW-Dcov7eRi.js","assets/classDiagram-v2-WZHVMYZB-CBLbQwHx.js","assets/stateDiagram-FKZM4ZOC-qVbMjauZ.js","assets/chunk-DI55MBZ5-DUJCBZzM.js","assets/stateDiagram-v2-4FDKWEC3-MT16RLO4.js","assets/journeyDiagram-XKPGCS4Q-D7ogbx9z.js","assets/timeline-definition-IT6M3QCI-DDBlkydm.js","assets/mindmap-definition-VGOIOE7T-TrK7CIKt.js","assets/kanban-definition-3W4ZIXB7-CDcnICM9.js","assets/sankeyDiagram-TZEHDZUN-4cANY87E.js","assets/diagram-S2PKOQOG-DuebuBVv.js","assets/diagram-QEK2KX5R-B_H957Uf.js","assets/blockDiagram-VD42YOAC-B_rbZyqc.js","assets/architectureDiagram-VXUJARFQ-EvM6tQ7I.js","assets/diagram-PSM6KHXK-yyu-ytzf.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var HS=Object.defineProperty;var qS=(e,t,r)=>t in e?HS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var se=(e,t,r)=>qS(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function BI(e){if(Object.prototype.hasOwnProperty.call(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 s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),r}var Wd={exports:{}},mo={},Hd={exports:{}},Ut={};/**
|
|
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 H0;function US(){if(H0)return Ut;H0=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,C={};function k(F,K,ut){this.props=F,this.context=K,this.refs=C,this.updater=ut||y}k.prototype.isReactComponent={},k.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,K,"setState")},k.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function _(){}_.prototype=k.prototype;function T(F,K,ut){this.props=F,this.context=K,this.refs=C,this.updater=ut||y}var E=T.prototype=new _;E.constructor=T,v(E,k.prototype),E.isPureReactComponent=!0;var B=Array.isArray,A=Object.prototype.hasOwnProperty,M={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function O(F,K,ut){var pt,dt={},ht=null,yt=null;if(K!=null)for(pt in K.ref!==void 0&&(yt=K.ref),K.key!==void 0&&(ht=""+K.key),K)A.call(K,pt)&&!R.hasOwnProperty(pt)&&(dt[pt]=K[pt]);var Lt=arguments.length-2;if(Lt===1)dt.children=ut;else if(1<Lt){for(var Pt=Array(Lt),Wt=0;Wt<Lt;Wt++)Pt[Wt]=arguments[Wt+2];dt.children=Pt}if(F&&F.defaultProps)for(pt in Lt=F.defaultProps,Lt)dt[pt]===void 0&&(dt[pt]=Lt[pt]);return{$$typeof:e,type:F,key:ht,ref:yt,props:dt,_owner:M.current}}function tt(F,K){return{$$typeof:e,type:F.type,key:K,ref:F.ref,props:F.props,_owner:F._owner}}function et(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function V(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ut){return K[ut]})}var nt=/\/+/g;function J(F,K){return typeof F=="object"&&F!==null&&F.key!=null?V(""+F.key):K.toString(36)}function Y(F,K,ut,pt,dt){var ht=typeof F;(ht==="undefined"||ht==="boolean")&&(F=null);var yt=!1;if(F===null)yt=!0;else switch(ht){case"string":case"number":yt=!0;break;case"object":switch(F.$$typeof){case e:case t:yt=!0}}if(yt)return yt=F,dt=dt(yt),F=pt===""?"."+J(yt,0):pt,B(dt)?(ut="",F!=null&&(ut=F.replace(nt,"$&/")+"/"),Y(dt,K,ut,"",function(Wt){return Wt})):dt!=null&&(et(dt)&&(dt=tt(dt,ut+(!dt.key||yt&&yt.key===dt.key?"":(""+dt.key).replace(nt,"$&/")+"/")+F)),K.push(dt)),1;if(yt=0,pt=pt===""?".":pt+":",B(F))for(var Lt=0;Lt<F.length;Lt++){ht=F[Lt];var Pt=pt+J(ht,Lt);yt+=Y(ht,K,ut,Pt,dt)}else if(Pt=m(F),typeof Pt=="function")for(F=Pt.call(F),Lt=0;!(ht=F.next()).done;)ht=ht.value,Pt=pt+J(ht,Lt++),yt+=Y(ht,K,ut,Pt,dt);else if(ht==="object")throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return yt}function W(F,K,ut){if(F==null)return F;var pt=[],dt=0;return Y(F,pt,"","",function(ht){return K.call(ut,ht,dt++)}),pt}function N(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(ut){(F._status===0||F._status===-1)&&(F._status=1,F._result=ut)},function(ut){(F._status===0||F._status===-1)&&(F._status=2,F._result=ut)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._result}var q={current:null},D={transition:null},Z={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:D,ReactCurrentOwner:M};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ut.Children={map:W,forEach:function(F,K,ut){W(F,function(){K.apply(this,arguments)},ut)},count:function(F){var K=0;return W(F,function(){K++}),K},toArray:function(F){return W(F,function(K){return K})||[]},only:function(F){if(!et(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},Ut.Component=k,Ut.Fragment=r,Ut.Profiler=s,Ut.PureComponent=T,Ut.StrictMode=i,Ut.Suspense=h,Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ut.act=Q,Ut.cloneElement=function(F,K,ut){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var pt=v({},F.props),dt=F.key,ht=F.ref,yt=F._owner;if(K!=null){if(K.ref!==void 0&&(ht=K.ref,yt=M.current),K.key!==void 0&&(dt=""+K.key),F.type&&F.type.defaultProps)var Lt=F.type.defaultProps;for(Pt in K)A.call(K,Pt)&&!R.hasOwnProperty(Pt)&&(pt[Pt]=K[Pt]===void 0&&Lt!==void 0?Lt[Pt]:K[Pt])}var Pt=arguments.length-2;if(Pt===1)pt.children=ut;else if(1<Pt){Lt=Array(Pt);for(var Wt=0;Wt<Pt;Wt++)Lt[Wt]=arguments[Wt+2];pt.children=Lt}return{$$typeof:e,type:F.type,key:dt,ref:ht,props:pt,_owner:yt}},Ut.createContext=function(F){return F={$$typeof:c,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:o,_context:F},F.Consumer=F},Ut.createElement=O,Ut.createFactory=function(F){var K=O.bind(null,F);return K.type=F,K},Ut.createRef=function(){return{current:null}},Ut.forwardRef=function(F){return{$$typeof:l,render:F}},Ut.isValidElement=et,Ut.lazy=function(F){return{$$typeof:f,_payload:{_status:-1,_result:F},_init:N}},Ut.memo=function(F,K){return{$$typeof:d,type:F,compare:K===void 0?null:K}},Ut.startTransition=function(F){var K=D.transition;D.transition={};try{F()}finally{D.transition=K}},Ut.unstable_act=Q,Ut.useCallback=function(F,K){return q.current.useCallback(F,K)},Ut.useContext=function(F){return q.current.useContext(F)},Ut.useDebugValue=function(){},Ut.useDeferredValue=function(F){return q.current.useDeferredValue(F)},Ut.useEffect=function(F,K){return q.current.useEffect(F,K)},Ut.useId=function(){return q.current.useId()},Ut.useImperativeHandle=function(F,K,ut){return q.current.useImperativeHandle(F,K,ut)},Ut.useInsertionEffect=function(F,K){return q.current.useInsertionEffect(F,K)},Ut.useLayoutEffect=function(F,K){return q.current.useLayoutEffect(F,K)},Ut.useMemo=function(F,K){return q.current.useMemo(F,K)},Ut.useReducer=function(F,K,ut){return q.current.useReducer(F,K,ut)},Ut.useRef=function(F){return q.current.useRef(F)},Ut.useState=function(F){return q.current.useState(F)},Ut.useSyncExternalStore=function(F,K,ut){return q.current.useSyncExternalStore(F,K,ut)},Ut.useTransition=function(){return q.current.useTransition()},Ut.version="18.3.1",Ut}var q0;function yp(){return q0||(q0=1,Hd.exports=US()),Hd.exports}/**
|
|
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 U0;function YS(){if(U0)return mo;U0=1;var e=yp(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(l,h,d){var f,g={},m=null,y=null;d!==void 0&&(m=""+d),h.key!==void 0&&(m=""+h.key),h.ref!==void 0&&(y=h.ref);for(f in h)i.call(h,f)&&!o.hasOwnProperty(f)&&(g[f]=h[f]);if(l&&l.defaultProps)for(f in h=l.defaultProps,h)g[f]===void 0&&(g[f]=h[f]);return{$$typeof:t,type:l,key:m,ref:y,props:g,_owner:s.current}}return mo.Fragment=r,mo.jsx=c,mo.jsxs=c,mo}var Y0;function VS(){return Y0||(Y0=1,Wd.exports=YS()),Wd.exports}var S=VS(),j=yp();const GS=mp(j);var Cc={},qd={exports:{}},Sr={},Ud={exports:{}},Yd={};/**
|
|
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
|
-
*/var V0;function XS(){return V0||(V0=1,(function(e){function t(D,Z){var Q=D.length;D.push(Z);t:for(;0<Q;){var F=Q-1>>>1,K=D[F];if(0<s(K,Z))D[F]=Z,D[Q]=K,Q=F;else break t}}function r(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var Z=D[0],Q=D.pop();if(Q!==Z){D[0]=Q;t:for(var F=0,K=D.length,ut=K>>>1;F<ut;){var pt=2*(F+1)-1,dt=D[pt],ht=pt+1,yt=D[ht];if(0>s(dt,Q))ht<K&&0>s(yt,dt)?(D[F]=yt,D[ht]=Q,F=ht):(D[F]=dt,D[pt]=Q,F=pt);else if(ht<K&&0>s(yt,Q))D[F]=yt,D[ht]=Q,F=ht;else break t}}return Z}function s(D,Z){var Q=D.sortIndex-Z.sortIndex;return Q!==0?Q:D.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,l=c.now();e.unstable_now=function(){return c.now()-l}}var h=[],d=[],f=1,g=null,m=3,y=!1,v=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(D){for(var Z=r(d);Z!==null;){if(Z.callback===null)i(d);else if(Z.startTime<=D)i(d),Z.sortIndex=Z.expirationTime,t(h,Z);else break;Z=r(d)}}function B(D){if(C=!1,E(D),!v)if(r(h)!==null)v=!0,N(A);else{var Z=r(d);Z!==null&&q(B,Z.startTime-D)}}function A(D,Z){v=!1,C&&(C=!1,_(O),O=-1),y=!0;var Q=m;try{for(E(Z),g=r(h);g!==null&&(!(g.expirationTime>Z)||D&&!V());){var F=g.callback;if(typeof F=="function"){g.callback=null,m=g.priorityLevel;var K=F(g.expirationTime<=Z);Z=e.unstable_now(),typeof K=="function"?g.callback=K:g===r(h)&&i(h),E(Z)}else i(h);g=r(h)}if(g!==null)var ut=!0;else{var pt=r(d);pt!==null&&q(B,pt.startTime-Z),ut=!1}return ut}finally{g=null,m=Q,y=!1}}var M=!1,R=null,O=-1,tt=5,et=-1;function V(){return!(e.unstable_now()-et<tt)}function nt(){if(R!==null){var D=e.unstable_now();et=D;var Z=!0;try{Z=R(!0,D)}finally{Z?J():(M=!1,R=null)}}else M=!1}var J;if(typeof T=="function")J=function(){T(nt)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,W=Y.port2;Y.port1.onmessage=nt,J=function(){W.postMessage(null)}}else J=function(){k(nt,0)};function N(D){R=D,M||(M=!0,J())}function q(D,Z){O=k(function(){D(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(D){D.callback=null},e.unstable_continueExecution=function(){v||y||(v=!0,N(A))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):tt=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(h)},e.unstable_next=function(D){switch(m){case 1:case 2:case 3:var Z=3;break;default:Z=m}var Q=m;m=Z;try{return D()}finally{m=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var Q=m;m=D;try{return Z()}finally{m=Q}},e.unstable_scheduleCallback=function(D,Z,Q){var F=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?F+Q:F):Q=F,D){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=Q+K,D={id:f++,callback:Z,priorityLevel:D,startTime:Q,expirationTime:K,sortIndex:-1},Q>F?(D.sortIndex=Q,t(d,D),r(h)===null&&D===r(d)&&(C?(_(O),O=-1):C=!0,q(B,Q-F))):(D.sortIndex=K,t(h,D),v||y||(v=!0,N(A))),D},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(D){var Z=m;return function(){var Q=m;m=Z;try{return D.apply(this,arguments)}finally{m=Q}}}})(Yd)),Yd}var G0;function QS(){return G0||(G0=1,Ud.exports=XS()),Ud.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 X0;function KS(){if(X0)return Sr;X0=1;var e=yp(),t=QS();function r(n){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+n,u=1;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function o(n,a){c(n,a),c(n+"Capture",a)}function c(n,a){for(s[n]=a,n=0;n<a.length;n++)i.add(a[n])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},g={};function m(n){return h.call(g,n)?!0:h.call(f,n)?!1:d.test(n)?g[n]=!0:(f[n]=!0,!1)}function y(n,a,u,p){if(u!==null&&u.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:u!==null?!u.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function v(n,a,u,p){if(a===null||typeof a>"u"||y(n,a,u,p))return!0;if(p)return!1;if(u!==null)switch(u.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function C(n,a,u,p,x,b,L){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=u,this.propertyName=n,this.type=a,this.sanitizeURL=b,this.removeEmptyString=L}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){k[n]=new C(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var a=n[0];k[a]=new C(a,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){k[n]=new C(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){k[n]=new C(n,2,!1,n,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(n){k[n]=new C(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){k[n]=new C(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){k[n]=new C(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){k[n]=new C(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){k[n]=new C(n,5,!1,n.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function T(n){return n[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(n){var a=n.replace(_,T);k[a]=new C(a,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var a=n.replace(_,T);k[a]=new C(a,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var a=n.replace(_,T);k[a]=new C(a,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){k[n]=new C(n,1,!1,n.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){k[n]=new C(n,1,!1,n.toLowerCase(),null,!0,!0)});function E(n,a,u,p){var x=k.hasOwnProperty(a)?k[a]:null;(x!==null?x.type!==0:p||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(v(a,u,x,p)&&(u=null),p||x===null?m(a)&&(u===null?n.removeAttribute(a):n.setAttribute(a,""+u)):x.mustUseProperty?n[x.propertyName]=u===null?x.type===3?!1:"":u:(a=x.attributeName,p=x.attributeNamespace,u===null?n.removeAttribute(a):(x=x.type,u=x===3||x===4&&u===!0?"":""+u,p?n.setAttributeNS(p,a,u):n.setAttribute(a,u))))}var B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),M=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),tt=Symbol.for("react.profiler"),et=Symbol.for("react.provider"),V=Symbol.for("react.context"),nt=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),D=Symbol.iterator;function Z(n){return n===null||typeof n!="object"?null:(n=D&&n[D]||n["@@iterator"],typeof n=="function"?n:null)}var Q=Object.assign,F;function K(n){if(F===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);F=a&&a[1]||""}return`
|
|
35
|
-
`+F+n}var ut=!1;function pt(n,a){if(!n||ut)return"";ut=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(X){var p=X}Reflect.construct(n,[],a)}else{try{a.call()}catch(X){p=X}n.call(a.prototype)}else{try{throw Error()}catch(X){p=X}n()}}catch(X){if(X&&p&&typeof X.stack=="string"){for(var x=X.stack.split(`
|
|
36
|
-
`),b=p.stack.split(`
|
|
37
|
-
`),L=x.length-1,$=b.length-1;1<=L&&0<=$&&x[L]!==b[$];)$--;for(;1<=L&&0<=$;L--,$--)if(x[L]!==b[$]){if(L!==1||$!==1)do if(L--,$--,0>$||x[L]!==b[$]){var I=`
|
|
38
|
-
`+x[L].replace(" at new "," at ");return n.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",n.displayName)),I}while(1<=L&&0<=$);break}}}finally{ut=!1,Error.prepareStackTrace=u}return(n=n?n.displayName||n.name:"")?K(n):""}function dt(n){switch(n.tag){case 5:return K(n.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return n=pt(n.type,!1),n;case 11:return n=pt(n.type.render,!1),n;case 1:return n=pt(n.type,!0),n;default:return""}}function ht(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case R:return"Fragment";case M:return"Portal";case tt:return"Profiler";case O:return"StrictMode";case J:return"Suspense";case Y:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case V:return(n.displayName||"Context")+".Consumer";case et:return(n._context.displayName||"Context")+".Provider";case nt:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case W:return a=n.displayName||null,a!==null?a:ht(n.type)||"Memo";case N:a=n._payload,n=n._init;try{return ht(n(a))}catch{}}return null}function yt(n){var a=n.type;switch(n.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=a.render,n=n.displayName||n.name||"",a.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ht(a);case 8:return a===O?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Lt(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Pt(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Wt(n){var a=Pt(n)?"checked":"value",u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a),p=""+n[a];if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var x=u.get,b=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return x.call(this)},set:function(L){p=""+L,b.call(this,L)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return p},setValue:function(L){p=""+L},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function ae(n){n._valueTracker||(n._valueTracker=Wt(n))}function Ve(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var u=a.getValue(),p="";return n&&(p=Pt(n)?n.checked?"true":"false":n.value),n=p,n!==u?(a.setValue(n),!0):!1}function _e(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function ar(n,a){var u=a.checked;return Q({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??n._wrapperState.initialChecked})}function Mr(n,a){var u=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;u=Lt(a.value!=null?a.value:u),n._wrapperState={initialChecked:p,initialValue:u,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Et(n,a){a=a.checked,a!=null&&E(n,"checked",a,!1)}function ce(n,a){Et(n,a);var u=Lt(a.value),p=a.type;if(u!=null)p==="number"?(u===0&&n.value===""||n.value!=u)&&(n.value=""+u):n.value!==""+u&&(n.value=""+u);else if(p==="submit"||p==="reset"){n.removeAttribute("value");return}a.hasOwnProperty("value")?yr(n,a.type,u):a.hasOwnProperty("defaultValue")&&yr(n,a.type,Lt(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(n.defaultChecked=!!a.defaultChecked)}function or(n,a,u){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+n._wrapperState.initialValue,u||a===n.value||(n.value=a),n.defaultValue=a}u=n.name,u!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,u!==""&&(n.name=u)}function yr(n,a,u){(a!=="number"||_e(n.ownerDocument)!==n)&&(u==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+u&&(n.defaultValue=""+u))}var lr=Array.isArray;function xr(n,a,u,p){if(n=n.options,a){a={};for(var x=0;x<u.length;x++)a["$"+u[x]]=!0;for(u=0;u<n.length;u++)x=a.hasOwnProperty("$"+n[u].value),n[u].selected!==x&&(n[u].selected=x),x&&p&&(n[u].defaultSelected=!0)}else{for(u=""+Lt(u),a=null,x=0;x<n.length;x++){if(n[x].value===u){n[x].selected=!0,p&&(n[x].defaultSelected=!0);return}a!==null||n[x].disabled||(a=n[x])}a!==null&&(a.selected=!0)}}function zn(n,a){if(a.dangerouslySetInnerHTML!=null)throw Error(r(91));return Q({},a,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Hi(n,a){var u=a.value;if(u==null){if(u=a.children,a=a.defaultValue,u!=null){if(a!=null)throw Error(r(92));if(lr(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),u=a}n._wrapperState={initialValue:Lt(u)}}function Nn(n,a){var u=Lt(a.value),p=Lt(a.defaultValue);u!=null&&(u=""+u,u!==n.value&&(n.value=u),a.defaultValue==null&&n.defaultValue!==u&&(n.defaultValue=u)),p!=null&&(n.defaultValue=""+p)}function Jr(n){var a=n.textContent;a===n._wrapperState.initialValue&&a!==""&&a!==null&&(n.value=a)}function Nr(n){switch(n){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 ze(n,a){return n==null||n==="http://www.w3.org/1999/xhtml"?Nr(a):n==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var tn,ai=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,u,p,x){MSApp.execUnsafeLocalFunction(function(){return n(a,u,p,x)})}:n})(function(n,a){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=a;else{for(tn=tn||document.createElement("div"),tn.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=tn.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;a.firstChild;)n.appendChild(a.firstChild)}});function Ne(n,a){if(a){var u=n.firstChild;if(u&&u===n.lastChild&&u.nodeType===3){u.nodeValue=a;return}}n.textContent=a}var ge={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},je=["Webkit","ms","Moz","O"];Object.keys(ge).forEach(function(n){je.forEach(function(a){a=a+n.charAt(0).toUpperCase()+n.substring(1),ge[a]=ge[n]})});function wn(n,a,u){return a==null||typeof a=="boolean"||a===""?"":u||typeof a!="number"||a===0||ge.hasOwnProperty(n)&&ge[n]?(""+a).trim():a+"px"}function en(n,a){n=n.style;for(var u in a)if(a.hasOwnProperty(u)){var p=u.indexOf("--")===0,x=wn(u,a[u],p);u==="float"&&(u="cssFloat"),p?n.setProperty(u,x):n[u]=x}}var rn=Q({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 kn(n,a){if(a){if(rn[n]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(r(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(r(61))}if(a.style!=null&&typeof a.style!="object")throw Error(r(62))}}function qi(n,a){if(n.indexOf("-")===-1)return typeof a.is=="string";switch(n){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 Ui=null;function Ma(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var oi=null,nn=null,li=null;function ci(n){if(n=to(n)){if(typeof oi!="function")throw Error(r(280));var a=n.stateNode;a&&(a=Il(a),oi(n.stateNode,n.type,a))}}function fl(n){nn?li?li.push(n):li=[n]:nn=n}function pl(){if(nn){var n=nn,a=li;if(li=nn=null,ci(n),a)for(n=0;n<a.length;n++)ci(a[n])}}function ve(n,a){return n(a)}function jn(){}var Ba=!1;function Aa(n,a,u){if(Ba)return n(a,u);Ba=!0;try{return ve(n,a,u)}finally{Ba=!1,(nn!==null||li!==null)&&(jn(),pl())}}function Wn(n,a){var u=n.stateNode;if(u===null)return null;var p=Il(u);if(p===null)return null;u=p[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(n=n.type,p=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!p;break t;default:n=!1}if(n)return null;if(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var Ms=!1;if(l)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Ms=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Ms=!1}function lh(n,a,u,p,x,b,L,$,I){var X=Array.prototype.slice.call(arguments,3);try{a.apply(u,X)}catch(at){this.onError(at)}}var Ge=!1,jr=null,Yi=!1,Bs=null,Ra={onError:function(n){Ge=!0,jr=n}};function gl(n,a,u,p,x,b,L,$,I){Ge=!1,jr=null,lh.apply(Ra,arguments)}function sn(n,a,u,p,x,b,L,$,I){if(gl.apply(this,arguments),Ge){if(Ge){var X=jr;Ge=!1,jr=null}else throw Error(r(198));Yi||(Yi=!0,Bs=X)}}function Sn(n){var a=n,u=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(u=a.return),n=a.return;while(n)}return a.tag===3?u:null}function $a(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function Fa(n){if(Sn(n)!==n)throw Error(r(188))}function ml(n){var a=n.alternate;if(!a){if(a=Sn(n),a===null)throw Error(r(188));return a!==n?null:n}for(var u=n,p=a;;){var x=u.return;if(x===null)break;var b=x.alternate;if(b===null){if(p=x.return,p!==null){u=p;continue}break}if(x.child===b.child){for(b=x.child;b;){if(b===u)return Fa(x),n;if(b===p)return Fa(x),a;b=b.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=b;else{for(var L=!1,$=x.child;$;){if($===u){L=!0,u=x,p=b;break}if($===p){L=!0,p=x,u=b;break}$=$.sibling}if(!L){for($=b.child;$;){if($===u){L=!0,u=b,p=x;break}if($===p){L=!0,p=b,u=x;break}$=$.sibling}if(!L)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?n:a}function yl(n){return n=ml(n),n!==null?Bt(n):null}function Bt(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var a=Bt(n);if(a!==null)return a;n=n.sibling}return null}var P=t.unstable_scheduleCallback,lt=t.unstable_cancelCallback,wt=t.unstable_shouldYield,oe=t.unstable_requestPaint,qt=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Wr=t.unstable_UserBlockingPriority,an=t.unstable_NormalPriority,Da=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Vi=null,Br=null;function ik(n){if(Br&&typeof Br.onCommitFiberRoot=="function")try{Br.onCommitFiberRoot(Vi,n,void 0,(n.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:ok,sk=Math.log,ak=Math.LN2;function ok(n){return n>>>=0,n===0?32:31-(sk(n)/ak|0)|0}var xl=64,vl=4194304;function Ia(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function bl(n,a){var u=n.pendingLanes;if(u===0)return 0;var p=0,x=n.suspendedLanes,b=n.pingedLanes,L=u&268435455;if(L!==0){var $=L&~x;$!==0?p=Ia($):(b&=L,b!==0&&(p=Ia(b)))}else L=u&~x,L!==0?p=Ia(L):b!==0&&(p=Ia(b));if(p===0)return 0;if(a!==0&&a!==p&&(a&x)===0&&(x=p&-p,b=a&-a,x>=b||x===16&&(b&4194240)!==0))return a;if((p&4)!==0&&(p|=u&16),a=n.entangledLanes,a!==0)for(n=n.entanglements,a&=p;0<a;)u=31-on(a),x=1<<u,p|=n[u],a&=~x;return p}function lk(n,a){switch(n){case 1:case 2:case 4:return a+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 a+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 ck(n,a){for(var u=n.suspendedLanes,p=n.pingedLanes,x=n.expirationTimes,b=n.pendingLanes;0<b;){var L=31-on(b),$=1<<L,I=x[L];I===-1?(($&u)===0||($&p)!==0)&&(x[L]=lk($,a)):I<=a&&(n.expiredLanes|=$),b&=~$}}function ch(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function bg(){var n=xl;return xl<<=1,(xl&4194240)===0&&(xl=64),n}function uh(n){for(var a=[],u=0;31>u;u++)a.push(n);return a}function Pa(n,a,u){n.pendingLanes|=a,a!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,a=31-on(a),n[a]=u}function uk(n,a){var u=n.pendingLanes&~a;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=a,n.mutableReadLanes&=a,n.entangledLanes&=a,a=n.entanglements;var p=n.eventTimes;for(n=n.expirationTimes;0<u;){var x=31-on(u),b=1<<x;a[x]=0,p[x]=-1,n[x]=-1,u&=~b}}function hh(n,a){var u=n.entangledLanes|=a;for(n=n.entanglements;u;){var p=31-on(u),x=1<<p;x&a|n[p]&a&&(n[p]|=a),u&=~x}}var ie=0;function Cg(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var wg,dh,kg,Sg,_g,fh=!1,Cl=[],hi=null,di=null,fi=null,Oa=new Map,za=new Map,pi=[],hk="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 Tg(n,a){switch(n){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Oa.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":za.delete(a.pointerId)}}function Na(n,a,u,p,x,b){return n===null||n.nativeEvent!==b?(n={blockedOn:a,domEventName:u,eventSystemFlags:p,nativeEvent:b,targetContainers:[x]},a!==null&&(a=to(a),a!==null&&dh(a)),n):(n.eventSystemFlags|=p,a=n.targetContainers,x!==null&&a.indexOf(x)===-1&&a.push(x),n)}function dk(n,a,u,p,x){switch(a){case"focusin":return hi=Na(hi,n,a,u,p,x),!0;case"dragenter":return di=Na(di,n,a,u,p,x),!0;case"mouseover":return fi=Na(fi,n,a,u,p,x),!0;case"pointerover":var b=x.pointerId;return Oa.set(b,Na(Oa.get(b)||null,n,a,u,p,x)),!0;case"gotpointercapture":return b=x.pointerId,za.set(b,Na(za.get(b)||null,n,a,u,p,x)),!0}return!1}function Lg(n){var a=Gi(n.target);if(a!==null){var u=Sn(a);if(u!==null){if(a=u.tag,a===13){if(a=$a(u),a!==null){n.blockedOn=a,_g(n.priority,function(){kg(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){n.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}n.blockedOn=null}function wl(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var u=gh(n.domEventName,n.eventSystemFlags,a[0],n.nativeEvent);if(u===null){u=n.nativeEvent;var p=new u.constructor(u.type,u);Ui=p,u.target.dispatchEvent(p),Ui=null}else return a=to(u),a!==null&&dh(a),n.blockedOn=u,!1;a.shift()}return!0}function Eg(n,a,u){wl(n)&&u.delete(a)}function fk(){fh=!1,hi!==null&&wl(hi)&&(hi=null),di!==null&&wl(di)&&(di=null),fi!==null&&wl(fi)&&(fi=null),Oa.forEach(Eg),za.forEach(Eg)}function ja(n,a){n.blockedOn===a&&(n.blockedOn=null,fh||(fh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,fk)))}function Wa(n){function a(x){return ja(x,n)}if(0<Cl.length){ja(Cl[0],n);for(var u=1;u<Cl.length;u++){var p=Cl[u];p.blockedOn===n&&(p.blockedOn=null)}}for(hi!==null&&ja(hi,n),di!==null&&ja(di,n),fi!==null&&ja(fi,n),Oa.forEach(a),za.forEach(a),u=0;u<pi.length;u++)p=pi[u],p.blockedOn===n&&(p.blockedOn=null);for(;0<pi.length&&(u=pi[0],u.blockedOn===null);)Lg(u),u.blockedOn===null&&pi.shift()}var As=B.ReactCurrentBatchConfig,kl=!0;function pk(n,a,u,p){var x=ie,b=As.transition;As.transition=null;try{ie=1,ph(n,a,u,p)}finally{ie=x,As.transition=b}}function gk(n,a,u,p){var x=ie,b=As.transition;As.transition=null;try{ie=4,ph(n,a,u,p)}finally{ie=x,As.transition=b}}function ph(n,a,u,p){if(kl){var x=gh(n,a,u,p);if(x===null)Rh(n,a,p,Sl,u),Tg(n,p);else if(dk(x,n,a,u,p))p.stopPropagation();else if(Tg(n,p),a&4&&-1<hk.indexOf(n)){for(;x!==null;){var b=to(x);if(b!==null&&wg(b),b=gh(n,a,u,p),b===null&&Rh(n,a,p,Sl,u),b===x)break;x=b}x!==null&&p.stopPropagation()}else Rh(n,a,p,null,u)}}var Sl=null;function gh(n,a,u,p){if(Sl=null,n=Ma(p),n=Gi(n),n!==null)if(a=Sn(n),a===null)n=null;else if(u=a.tag,u===13){if(n=$a(a),n!==null)return n;n=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null);return Sl=n,null}function Mg(n){switch(n){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(be()){case De:return 1;case Wr:return 4;case an:case Da:return 16;case Te:return 536870912;default:return 16}default:return 16}}var gi=null,mh=null,_l=null;function Bg(){if(_l)return _l;var n,a=mh,u=a.length,p,x="value"in gi?gi.value:gi.textContent,b=x.length;for(n=0;n<u&&a[n]===x[n];n++);var L=u-n;for(p=1;p<=L&&a[u-p]===x[b-p];p++);return _l=x.slice(n,1<p?1-p:void 0)}function Tl(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function Ll(){return!0}function Ag(){return!1}function Ar(n){function a(u,p,x,b,L){this._reactName=u,this._targetInst=x,this.type=p,this.nativeEvent=b,this.target=L,this.currentTarget=null;for(var $ in n)n.hasOwnProperty($)&&(u=n[$],this[$]=u?u(b):b[$]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ll:Ag,this.isPropagationStopped=Ag,this}return Q(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ll)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),a}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yh=Ar(Rs),Ha=Q({},Rs,{view:0,detail:0}),mk=Ar(Ha),xh,vh,qa,El=Q({},Ha,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ch,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==qa&&(qa&&n.type==="mousemove"?(xh=n.screenX-qa.screenX,vh=n.screenY-qa.screenY):vh=xh=0,qa=n),xh)},movementY:function(n){return"movementY"in n?n.movementY:vh}}),Rg=Ar(El),yk=Q({},El,{dataTransfer:0}),xk=Ar(yk),vk=Q({},Ha,{relatedTarget:0}),bh=Ar(vk),bk=Q({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),Ck=Ar(bk),wk=Q({},Rs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),kk=Ar(wk),Sk=Q({},Rs,{data:0}),$g=Ar(Sk),_k={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tk={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"},Lk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ek(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=Lk[n])?!!a[n]:!1}function Ch(){return Ek}var Mk=Q({},Ha,{key:function(n){if(n.key){var a=_k[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Tl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Tk[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ch,charCode:function(n){return n.type==="keypress"?Tl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Tl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Bk=Ar(Mk),Ak=Q({},El,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fg=Ar(Ak),Rk=Q({},Ha,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ch}),$k=Ar(Rk),Fk=Q({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dk=Ar(Fk),Ik=Q({},El,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Pk=Ar(Ik),Ok=[9,13,27,32],wh=l&&"CompositionEvent"in window,Ua=null;l&&"documentMode"in document&&(Ua=document.documentMode);var zk=l&&"TextEvent"in window&&!Ua,Dg=l&&(!wh||Ua&&8<Ua&&11>=Ua),Ig=" ",Pg=!1;function Og(n,a){switch(n){case"keyup":return Ok.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var $s=!1;function Nk(n,a){switch(n){case"compositionend":return zg(a);case"keypress":return a.which!==32?null:(Pg=!0,Ig);case"textInput":return n=a.data,n===Ig&&Pg?null:n;default:return null}}function jk(n,a){if($s)return n==="compositionend"||!wh&&Og(n,a)?(n=Bg(),_l=mh=gi=null,$s=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Dg&&a.locale!=="ko"?null:a.data;default:return null}}var Wk={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 Ng(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!Wk[n.type]:a==="textarea"}function jg(n,a,u,p){fl(p),a=$l(a,"onChange"),0<a.length&&(u=new yh("onChange","change",null,u,p),n.push({event:u,listeners:a}))}var Ya=null,Va=null;function Hk(n){sm(n,0)}function Ml(n){var a=Os(n);if(Ve(a))return n}function qk(n,a){if(n==="change")return a}var Wg=!1;if(l){var kh;if(l){var Sh="oninput"in document;if(!Sh){var Hg=document.createElement("div");Hg.setAttribute("oninput","return;"),Sh=typeof Hg.oninput=="function"}kh=Sh}else kh=!1;Wg=kh&&(!document.documentMode||9<document.documentMode)}function qg(){Ya&&(Ya.detachEvent("onpropertychange",Ug),Va=Ya=null)}function Ug(n){if(n.propertyName==="value"&&Ml(Va)){var a=[];jg(a,Va,n,Ma(n)),Aa(Hk,a)}}function Uk(n,a,u){n==="focusin"?(qg(),Ya=a,Va=u,Ya.attachEvent("onpropertychange",Ug)):n==="focusout"&&qg()}function Yk(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ml(Va)}function Vk(n,a){if(n==="click")return Ml(a)}function Gk(n,a){if(n==="input"||n==="change")return Ml(a)}function Xk(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var ln=typeof Object.is=="function"?Object.is:Xk;function Ga(n,a){if(ln(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var u=Object.keys(n),p=Object.keys(a);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var x=u[p];if(!h.call(a,x)||!ln(n[x],a[x]))return!1}return!0}function Yg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Vg(n,a){var u=Yg(n);n=0;for(var p;u;){if(u.nodeType===3){if(p=n+u.textContent.length,n<=a&&p>=a)return{node:u,offset:a-n};n=p}t:{for(;u;){if(u.nextSibling){u=u.nextSibling;break t}u=u.parentNode}u=void 0}u=Yg(u)}}function Gg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Gg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function Xg(){for(var n=window,a=_e();a instanceof n.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)n=a.contentWindow;else break;a=_e(n.document)}return a}function _h(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}function Qk(n){var a=Xg(),u=n.focusedElem,p=n.selectionRange;if(a!==u&&u&&u.ownerDocument&&Gg(u.ownerDocument.documentElement,u)){if(p!==null&&_h(u)){if(a=p.start,n=p.end,n===void 0&&(n=a),"selectionStart"in u)u.selectionStart=a,u.selectionEnd=Math.min(n,u.value.length);else if(n=(a=u.ownerDocument||document)&&a.defaultView||window,n.getSelection){n=n.getSelection();var x=u.textContent.length,b=Math.min(p.start,x);p=p.end===void 0?b:Math.min(p.end,x),!n.extend&&b>p&&(x=p,p=b,b=x),x=Vg(u,b);var L=Vg(u,p);x&&L&&(n.rangeCount!==1||n.anchorNode!==x.node||n.anchorOffset!==x.offset||n.focusNode!==L.node||n.focusOffset!==L.offset)&&(a=a.createRange(),a.setStart(x.node,x.offset),n.removeAllRanges(),b>p?(n.addRange(a),n.extend(L.node,L.offset)):(a.setEnd(L.node,L.offset),n.addRange(a)))}}for(a=[],n=u;n=n.parentNode;)n.nodeType===1&&a.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<a.length;u++)n=a[u],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Kk=l&&"documentMode"in document&&11>=document.documentMode,Fs=null,Th=null,Xa=null,Lh=!1;function Qg(n,a,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Lh||Fs==null||Fs!==_e(p)||(p=Fs,"selectionStart"in p&&_h(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Xa&&Ga(Xa,p)||(Xa=p,p=$l(Th,"onSelect"),0<p.length&&(a=new yh("onSelect","select",null,a,u),n.push({event:a,listeners:p}),a.target=Fs)))}function Bl(n,a){var u={};return u[n.toLowerCase()]=a.toLowerCase(),u["Webkit"+n]="webkit"+a,u["Moz"+n]="moz"+a,u}var Ds={animationend:Bl("Animation","AnimationEnd"),animationiteration:Bl("Animation","AnimationIteration"),animationstart:Bl("Animation","AnimationStart"),transitionend:Bl("Transition","TransitionEnd")},Eh={},Kg={};l&&(Kg=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Al(n){if(Eh[n])return Eh[n];if(!Ds[n])return n;var a=Ds[n],u;for(u in a)if(a.hasOwnProperty(u)&&u in Kg)return Eh[n]=a[u];return n}var Zg=Al("animationend"),Jg=Al("animationiteration"),tm=Al("animationstart"),em=Al("transitionend"),rm=new Map,nm="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 mi(n,a){rm.set(n,a),o(a,[n])}for(var Mh=0;Mh<nm.length;Mh++){var Bh=nm[Mh],Zk=Bh.toLowerCase(),Jk=Bh[0].toUpperCase()+Bh.slice(1);mi(Zk,"on"+Jk)}mi(Zg,"onAnimationEnd"),mi(Jg,"onAnimationIteration"),mi(tm,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(em,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qa="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(" "),tS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qa));function im(n,a,u){var p=n.type||"unknown-event";n.currentTarget=u,sn(p,a,void 0,n),n.currentTarget=null}function sm(n,a){a=(a&4)!==0;for(var u=0;u<n.length;u++){var p=n[u],x=p.event;p=p.listeners;t:{var b=void 0;if(a)for(var L=p.length-1;0<=L;L--){var $=p[L],I=$.instance,X=$.currentTarget;if($=$.listener,I!==b&&x.isPropagationStopped())break t;im(x,$,X),b=I}else for(L=0;L<p.length;L++){if($=p[L],I=$.instance,X=$.currentTarget,$=$.listener,I!==b&&x.isPropagationStopped())break t;im(x,$,X),b=I}}}if(Yi)throw n=Bs,Yi=!1,Bs=null,n}function ue(n,a){var u=a[Oh];u===void 0&&(u=a[Oh]=new Set);var p=n+"__bubble";u.has(p)||(am(a,n,2,!1),u.add(p))}function Ah(n,a,u){var p=0;a&&(p|=4),am(u,n,p,a)}var Rl="_reactListening"+Math.random().toString(36).slice(2);function Ka(n){if(!n[Rl]){n[Rl]=!0,i.forEach(function(u){u!=="selectionchange"&&(tS.has(u)||Ah(u,!1,n),Ah(u,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Rl]||(a[Rl]=!0,Ah("selectionchange",!1,a))}}function am(n,a,u,p){switch(Mg(a)){case 1:var x=pk;break;case 4:x=gk;break;default:x=ph}u=x.bind(null,a,u,n),x=void 0,!Ms||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(x=!0),p?x!==void 0?n.addEventListener(a,u,{capture:!0,passive:x}):n.addEventListener(a,u,!0):x!==void 0?n.addEventListener(a,u,{passive:x}):n.addEventListener(a,u,!1)}function Rh(n,a,u,p,x){var b=p;if((a&1)===0&&(a&2)===0&&p!==null)t:for(;;){if(p===null)return;var L=p.tag;if(L===3||L===4){var $=p.stateNode.containerInfo;if($===x||$.nodeType===8&&$.parentNode===x)break;if(L===4)for(L=p.return;L!==null;){var I=L.tag;if((I===3||I===4)&&(I=L.stateNode.containerInfo,I===x||I.nodeType===8&&I.parentNode===x))return;L=L.return}for(;$!==null;){if(L=Gi($),L===null)return;if(I=L.tag,I===5||I===6){p=b=L;continue t}$=$.parentNode}}p=p.return}Aa(function(){var X=b,at=Ma(u),ot=[];t:{var st=rm.get(n);if(st!==void 0){var mt=yh,vt=n;switch(n){case"keypress":if(Tl(u)===0)break t;case"keydown":case"keyup":mt=Bk;break;case"focusin":vt="focus",mt=bh;break;case"focusout":vt="blur",mt=bh;break;case"beforeblur":case"afterblur":mt=bh;break;case"click":if(u.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":mt=Rg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":mt=xk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":mt=$k;break;case Zg:case Jg:case tm:mt=Ck;break;case em:mt=Dk;break;case"scroll":mt=mk;break;case"wheel":mt=Pk;break;case"copy":case"cut":case"paste":mt=kk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":mt=Fg}var _t=(a&4)!==0,ke=!_t&&n==="scroll",U=_t?st!==null?st+"Capture":null:st;_t=[];for(var z=X,G;z!==null;){G=z;var ct=G.stateNode;if(G.tag===5&&ct!==null&&(G=ct,U!==null&&(ct=Wn(z,U),ct!=null&&_t.push(Za(z,ct,G)))),ke)break;z=z.return}0<_t.length&&(st=new mt(st,vt,null,u,at),ot.push({event:st,listeners:_t}))}}if((a&7)===0){t:{if(st=n==="mouseover"||n==="pointerover",mt=n==="mouseout"||n==="pointerout",st&&u!==Ui&&(vt=u.relatedTarget||u.fromElement)&&(Gi(vt)||vt[Hn]))break t;if((mt||st)&&(st=at.window===at?at:(st=at.ownerDocument)?st.defaultView||st.parentWindow:window,mt?(vt=u.relatedTarget||u.toElement,mt=X,vt=vt?Gi(vt):null,vt!==null&&(ke=Sn(vt),vt!==ke||vt.tag!==5&&vt.tag!==6)&&(vt=null)):(mt=null,vt=X),mt!==vt)){if(_t=Rg,ct="onMouseLeave",U="onMouseEnter",z="mouse",(n==="pointerout"||n==="pointerover")&&(_t=Fg,ct="onPointerLeave",U="onPointerEnter",z="pointer"),ke=mt==null?st:Os(mt),G=vt==null?st:Os(vt),st=new _t(ct,z+"leave",mt,u,at),st.target=ke,st.relatedTarget=G,ct=null,Gi(at)===X&&(_t=new _t(U,z+"enter",vt,u,at),_t.target=G,_t.relatedTarget=ke,ct=_t),ke=ct,mt&&vt)e:{for(_t=mt,U=vt,z=0,G=_t;G;G=Is(G))z++;for(G=0,ct=U;ct;ct=Is(ct))G++;for(;0<z-G;)_t=Is(_t),z--;for(;0<G-z;)U=Is(U),G--;for(;z--;){if(_t===U||U!==null&&_t===U.alternate)break e;_t=Is(_t),U=Is(U)}_t=null}else _t=null;mt!==null&&om(ot,st,mt,_t,!1),vt!==null&&ke!==null&&om(ot,ke,vt,_t,!0)}}t:{if(st=X?Os(X):window,mt=st.nodeName&&st.nodeName.toLowerCase(),mt==="select"||mt==="input"&&st.type==="file")var Mt=qk;else if(Ng(st))if(Wg)Mt=Gk;else{Mt=Yk;var Dt=Uk}else(mt=st.nodeName)&&mt.toLowerCase()==="input"&&(st.type==="checkbox"||st.type==="radio")&&(Mt=Vk);if(Mt&&(Mt=Mt(n,X))){jg(ot,Mt,u,at);break t}Dt&&Dt(n,st,X),n==="focusout"&&(Dt=st._wrapperState)&&Dt.controlled&&st.type==="number"&&yr(st,"number",st.value)}switch(Dt=X?Os(X):window,n){case"focusin":(Ng(Dt)||Dt.contentEditable==="true")&&(Fs=Dt,Th=X,Xa=null);break;case"focusout":Xa=Th=Fs=null;break;case"mousedown":Lh=!0;break;case"contextmenu":case"mouseup":case"dragend":Lh=!1,Qg(ot,u,at);break;case"selectionchange":if(Kk)break;case"keydown":case"keyup":Qg(ot,u,at)}var It;if(wh)t:{switch(n){case"compositionstart":var Nt="onCompositionStart";break t;case"compositionend":Nt="onCompositionEnd";break t;case"compositionupdate":Nt="onCompositionUpdate";break t}Nt=void 0}else $s?Og(n,u)&&(Nt="onCompositionEnd"):n==="keydown"&&u.keyCode===229&&(Nt="onCompositionStart");Nt&&(Dg&&u.locale!=="ko"&&($s||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&$s&&(It=Bg()):(gi=at,mh="value"in gi?gi.value:gi.textContent,$s=!0)),Dt=$l(X,Nt),0<Dt.length&&(Nt=new $g(Nt,n,null,u,at),ot.push({event:Nt,listeners:Dt}),It?Nt.data=It:(It=zg(u),It!==null&&(Nt.data=It)))),(It=zk?Nk(n,u):jk(n,u))&&(X=$l(X,"onBeforeInput"),0<X.length&&(at=new $g("onBeforeInput","beforeinput",null,u,at),ot.push({event:at,listeners:X}),at.data=It))}sm(ot,a)})}function Za(n,a,u){return{instance:n,listener:a,currentTarget:u}}function $l(n,a){for(var u=a+"Capture",p=[];n!==null;){var x=n,b=x.stateNode;x.tag===5&&b!==null&&(x=b,b=Wn(n,u),b!=null&&p.unshift(Za(n,b,x)),b=Wn(n,a),b!=null&&p.push(Za(n,b,x))),n=n.return}return p}function Is(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function om(n,a,u,p,x){for(var b=a._reactName,L=[];u!==null&&u!==p;){var $=u,I=$.alternate,X=$.stateNode;if(I!==null&&I===p)break;$.tag===5&&X!==null&&($=X,x?(I=Wn(u,b),I!=null&&L.unshift(Za(u,I,$))):x||(I=Wn(u,b),I!=null&&L.push(Za(u,I,$)))),u=u.return}L.length!==0&&n.push({event:a,listeners:L})}var eS=/\r\n?/g,rS=/\u0000|\uFFFD/g;function lm(n){return(typeof n=="string"?n:""+n).replace(eS,`
|
|
39
|
-
`).replace(rS,"")}function Fl(n,a,u){if(a=lm(a),lm(n)!==a&&u)throw Error(r(425))}function Dl(){}var $h=null,Fh=null;function Dh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Ih=typeof setTimeout=="function"?setTimeout:void 0,nS=typeof clearTimeout=="function"?clearTimeout:void 0,cm=typeof Promise=="function"?Promise:void 0,iS=typeof queueMicrotask=="function"?queueMicrotask:typeof cm<"u"?function(n){return cm.resolve(null).then(n).catch(sS)}:Ih;function sS(n){setTimeout(function(){throw n})}function Ph(n,a){var u=a,p=0;do{var x=u.nextSibling;if(n.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"){if(p===0){n.removeChild(x),Wa(a);return}p--}else u!=="$"&&u!=="$?"&&u!=="$!"||p++;u=x}while(u);Wa(a)}function yi(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return n}function um(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var u=n.data;if(u==="$"||u==="$!"||u==="$?"){if(a===0)return n;a--}else u==="/$"&&a++}n=n.previousSibling}return null}var Ps=Math.random().toString(36).slice(2),_n="__reactFiber$"+Ps,Ja="__reactProps$"+Ps,Hn="__reactContainer$"+Ps,Oh="__reactEvents$"+Ps,aS="__reactListeners$"+Ps,oS="__reactHandles$"+Ps;function Gi(n){var a=n[_n];if(a)return a;for(var u=n.parentNode;u;){if(a=u[Hn]||u[_n]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(n=um(n);n!==null;){if(u=n[_n])return u;n=um(n)}return a}n=u,u=n.parentNode}return null}function to(n){return n=n[_n]||n[Hn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Os(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function Il(n){return n[Ja]||null}var zh=[],zs=-1;function xi(n){return{current:n}}function he(n){0>zs||(n.current=zh[zs],zh[zs]=null,zs--)}function le(n,a){zs++,zh[zs]=n.current,n.current=a}var vi={},Xe=xi(vi),vr=xi(!1),Xi=vi;function Ns(n,a){var u=n.type.contextTypes;if(!u)return vi;var p=n.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var x={},b;for(b in u)x[b]=a[b];return p&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=a,n.__reactInternalMemoizedMaskedChildContext=x),x}function br(n){return n=n.childContextTypes,n!=null}function Pl(){he(vr),he(Xe)}function hm(n,a,u){if(Xe.current!==vi)throw Error(r(168));le(Xe,a),le(vr,u)}function dm(n,a,u){var p=n.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return u;p=p.getChildContext();for(var x in p)if(!(x in a))throw Error(r(108,yt(n)||"Unknown",x));return Q({},u,p)}function Ol(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||vi,Xi=Xe.current,le(Xe,n),le(vr,vr.current),!0}function fm(n,a,u){var p=n.stateNode;if(!p)throw Error(r(169));u?(n=dm(n,a,Xi),p.__reactInternalMemoizedMergedChildContext=n,he(vr),he(Xe),le(Xe,n)):he(vr),le(vr,u)}var qn=null,zl=!1,Nh=!1;function pm(n){qn===null?qn=[n]:qn.push(n)}function lS(n){zl=!0,pm(n)}function bi(){if(!Nh&&qn!==null){Nh=!0;var n=0,a=ie;try{var u=qn;for(ie=1;n<u.length;n++){var p=u[n];do p=p(!0);while(p!==null)}qn=null,zl=!1}catch(x){throw qn!==null&&(qn=qn.slice(n+1)),P(De,bi),x}finally{ie=a,Nh=!1}}return null}var js=[],Ws=0,Nl=null,jl=0,Hr=[],qr=0,Qi=null,Un=1,Yn="";function Ki(n,a){js[Ws++]=jl,js[Ws++]=Nl,Nl=n,jl=a}function gm(n,a,u){Hr[qr++]=Un,Hr[qr++]=Yn,Hr[qr++]=Qi,Qi=n;var p=Un;n=Yn;var x=32-on(p)-1;p&=~(1<<x),u+=1;var b=32-on(a)+x;if(30<b){var L=x-x%5;b=(p&(1<<L)-1).toString(32),p>>=L,x-=L,Un=1<<32-on(a)+x|u<<x|p,Yn=b+n}else Un=1<<b|u<<x|p,Yn=n}function jh(n){n.return!==null&&(Ki(n,1),gm(n,1,0))}function Wh(n){for(;n===Nl;)Nl=js[--Ws],js[Ws]=null,jl=js[--Ws],js[Ws]=null;for(;n===Qi;)Qi=Hr[--qr],Hr[qr]=null,Yn=Hr[--qr],Hr[qr]=null,Un=Hr[--qr],Hr[qr]=null}var Rr=null,$r=null,fe=!1,cn=null;function mm(n,a){var u=Gr(5,null,null,0);u.elementType="DELETED",u.stateNode=a,u.return=n,a=n.deletions,a===null?(n.deletions=[u],n.flags|=16):a.push(u)}function ym(n,a){switch(n.tag){case 5:var u=n.type;return a=a.nodeType!==1||u.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(n.stateNode=a,Rr=n,$r=yi(a.firstChild),!0):!1;case 6:return a=n.pendingProps===""||a.nodeType!==3?null:a,a!==null?(n.stateNode=a,Rr=n,$r=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(u=Qi!==null?{id:Un,overflow:Yn}:null,n.memoizedState={dehydrated:a,treeContext:u,retryLane:1073741824},u=Gr(18,null,null,0),u.stateNode=a,u.return=n,n.child=u,Rr=n,$r=null,!0):!1;default:return!1}}function Hh(n){return(n.mode&1)!==0&&(n.flags&128)===0}function qh(n){if(fe){var a=$r;if(a){var u=a;if(!ym(n,a)){if(Hh(n))throw Error(r(418));a=yi(u.nextSibling);var p=Rr;a&&ym(n,a)?mm(p,u):(n.flags=n.flags&-4097|2,fe=!1,Rr=n)}}else{if(Hh(n))throw Error(r(418));n.flags=n.flags&-4097|2,fe=!1,Rr=n}}}function xm(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Rr=n}function Wl(n){if(n!==Rr)return!1;if(!fe)return xm(n),fe=!0,!1;var a;if((a=n.tag!==3)&&!(a=n.tag!==5)&&(a=n.type,a=a!=="head"&&a!=="body"&&!Dh(n.type,n.memoizedProps)),a&&(a=$r)){if(Hh(n))throw vm(),Error(r(418));for(;a;)mm(n,a),a=yi(a.nextSibling)}if(xm(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));t:{for(n=n.nextSibling,a=0;n;){if(n.nodeType===8){var u=n.data;if(u==="/$"){if(a===0){$r=yi(n.nextSibling);break t}a--}else u!=="$"&&u!=="$!"&&u!=="$?"||a++}n=n.nextSibling}$r=null}}else $r=Rr?yi(n.stateNode.nextSibling):null;return!0}function vm(){for(var n=$r;n;)n=yi(n.nextSibling)}function Hs(){$r=Rr=null,fe=!1}function Uh(n){cn===null?cn=[n]:cn.push(n)}var cS=B.ReactCurrentBatchConfig;function eo(n,a,u){if(n=u.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(r(309));var p=u.stateNode}if(!p)throw Error(r(147,n));var x=p,b=""+n;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===b?a.ref:(a=function(L){var $=x.refs;L===null?delete $[b]:$[b]=L},a._stringRef=b,a)}if(typeof n!="string")throw Error(r(284));if(!u._owner)throw Error(r(290,n))}return n}function Hl(n,a){throw n=Object.prototype.toString.call(a),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n))}function bm(n){var a=n._init;return a(n._payload)}function Cm(n){function a(U,z){if(n){var G=U.deletions;G===null?(U.deletions=[z],U.flags|=16):G.push(z)}}function u(U,z){if(!n)return null;for(;z!==null;)a(U,z),z=z.sibling;return null}function p(U,z){for(U=new Map;z!==null;)z.key!==null?U.set(z.key,z):U.set(z.index,z),z=z.sibling;return U}function x(U,z){return U=Ei(U,z),U.index=0,U.sibling=null,U}function b(U,z,G){return U.index=G,n?(G=U.alternate,G!==null?(G=G.index,G<z?(U.flags|=2,z):G):(U.flags|=2,z)):(U.flags|=1048576,z)}function L(U){return n&&U.alternate===null&&(U.flags|=2),U}function $(U,z,G,ct){return z===null||z.tag!==6?(z=Id(G,U.mode,ct),z.return=U,z):(z=x(z,G),z.return=U,z)}function I(U,z,G,ct){var Mt=G.type;return Mt===R?at(U,z,G.props.children,ct,G.key):z!==null&&(z.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===N&&bm(Mt)===z.type)?(ct=x(z,G.props),ct.ref=eo(U,z,G),ct.return=U,ct):(ct=fc(G.type,G.key,G.props,null,U.mode,ct),ct.ref=eo(U,z,G),ct.return=U,ct)}function X(U,z,G,ct){return z===null||z.tag!==4||z.stateNode.containerInfo!==G.containerInfo||z.stateNode.implementation!==G.implementation?(z=Pd(G,U.mode,ct),z.return=U,z):(z=x(z,G.children||[]),z.return=U,z)}function at(U,z,G,ct,Mt){return z===null||z.tag!==7?(z=ss(G,U.mode,ct,Mt),z.return=U,z):(z=x(z,G),z.return=U,z)}function ot(U,z,G){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Id(""+z,U.mode,G),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case A:return G=fc(z.type,z.key,z.props,null,U.mode,G),G.ref=eo(U,null,z),G.return=U,G;case M:return z=Pd(z,U.mode,G),z.return=U,z;case N:var ct=z._init;return ot(U,ct(z._payload),G)}if(lr(z)||Z(z))return z=ss(z,U.mode,G,null),z.return=U,z;Hl(U,z)}return null}function st(U,z,G,ct){var Mt=z!==null?z.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Mt!==null?null:$(U,z,""+G,ct);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case A:return G.key===Mt?I(U,z,G,ct):null;case M:return G.key===Mt?X(U,z,G,ct):null;case N:return Mt=G._init,st(U,z,Mt(G._payload),ct)}if(lr(G)||Z(G))return Mt!==null?null:at(U,z,G,ct,null);Hl(U,G)}return null}function mt(U,z,G,ct,Mt){if(typeof ct=="string"&&ct!==""||typeof ct=="number")return U=U.get(G)||null,$(z,U,""+ct,Mt);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case A:return U=U.get(ct.key===null?G:ct.key)||null,I(z,U,ct,Mt);case M:return U=U.get(ct.key===null?G:ct.key)||null,X(z,U,ct,Mt);case N:var Dt=ct._init;return mt(U,z,G,Dt(ct._payload),Mt)}if(lr(ct)||Z(ct))return U=U.get(G)||null,at(z,U,ct,Mt,null);Hl(z,ct)}return null}function vt(U,z,G,ct){for(var Mt=null,Dt=null,It=z,Nt=z=0,Oe=null;It!==null&&Nt<G.length;Nt++){It.index>Nt?(Oe=It,It=null):Oe=It.sibling;var Zt=st(U,It,G[Nt],ct);if(Zt===null){It===null&&(It=Oe);break}n&&It&&Zt.alternate===null&&a(U,It),z=b(Zt,z,Nt),Dt===null?Mt=Zt:Dt.sibling=Zt,Dt=Zt,It=Oe}if(Nt===G.length)return u(U,It),fe&&Ki(U,Nt),Mt;if(It===null){for(;Nt<G.length;Nt++)It=ot(U,G[Nt],ct),It!==null&&(z=b(It,z,Nt),Dt===null?Mt=It:Dt.sibling=It,Dt=It);return fe&&Ki(U,Nt),Mt}for(It=p(U,It);Nt<G.length;Nt++)Oe=mt(It,U,Nt,G[Nt],ct),Oe!==null&&(n&&Oe.alternate!==null&&It.delete(Oe.key===null?Nt:Oe.key),z=b(Oe,z,Nt),Dt===null?Mt=Oe:Dt.sibling=Oe,Dt=Oe);return n&&It.forEach(function(Mi){return a(U,Mi)}),fe&&Ki(U,Nt),Mt}function _t(U,z,G,ct){var Mt=Z(G);if(typeof Mt!="function")throw Error(r(150));if(G=Mt.call(G),G==null)throw Error(r(151));for(var Dt=Mt=null,It=z,Nt=z=0,Oe=null,Zt=G.next();It!==null&&!Zt.done;Nt++,Zt=G.next()){It.index>Nt?(Oe=It,It=null):Oe=It.sibling;var Mi=st(U,It,Zt.value,ct);if(Mi===null){It===null&&(It=Oe);break}n&&It&&Mi.alternate===null&&a(U,It),z=b(Mi,z,Nt),Dt===null?Mt=Mi:Dt.sibling=Mi,Dt=Mi,It=Oe}if(Zt.done)return u(U,It),fe&&Ki(U,Nt),Mt;if(It===null){for(;!Zt.done;Nt++,Zt=G.next())Zt=ot(U,Zt.value,ct),Zt!==null&&(z=b(Zt,z,Nt),Dt===null?Mt=Zt:Dt.sibling=Zt,Dt=Zt);return fe&&Ki(U,Nt),Mt}for(It=p(U,It);!Zt.done;Nt++,Zt=G.next())Zt=mt(It,U,Nt,Zt.value,ct),Zt!==null&&(n&&Zt.alternate!==null&&It.delete(Zt.key===null?Nt:Zt.key),z=b(Zt,z,Nt),Dt===null?Mt=Zt:Dt.sibling=Zt,Dt=Zt);return n&&It.forEach(function(WS){return a(U,WS)}),fe&&Ki(U,Nt),Mt}function ke(U,z,G,ct){if(typeof G=="object"&&G!==null&&G.type===R&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case A:t:{for(var Mt=G.key,Dt=z;Dt!==null;){if(Dt.key===Mt){if(Mt=G.type,Mt===R){if(Dt.tag===7){u(U,Dt.sibling),z=x(Dt,G.props.children),z.return=U,U=z;break t}}else if(Dt.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===N&&bm(Mt)===Dt.type){u(U,Dt.sibling),z=x(Dt,G.props),z.ref=eo(U,Dt,G),z.return=U,U=z;break t}u(U,Dt);break}else a(U,Dt);Dt=Dt.sibling}G.type===R?(z=ss(G.props.children,U.mode,ct,G.key),z.return=U,U=z):(ct=fc(G.type,G.key,G.props,null,U.mode,ct),ct.ref=eo(U,z,G),ct.return=U,U=ct)}return L(U);case M:t:{for(Dt=G.key;z!==null;){if(z.key===Dt)if(z.tag===4&&z.stateNode.containerInfo===G.containerInfo&&z.stateNode.implementation===G.implementation){u(U,z.sibling),z=x(z,G.children||[]),z.return=U,U=z;break t}else{u(U,z);break}else a(U,z);z=z.sibling}z=Pd(G,U.mode,ct),z.return=U,U=z}return L(U);case N:return Dt=G._init,ke(U,z,Dt(G._payload),ct)}if(lr(G))return vt(U,z,G,ct);if(Z(G))return _t(U,z,G,ct);Hl(U,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,z!==null&&z.tag===6?(u(U,z.sibling),z=x(z,G),z.return=U,U=z):(u(U,z),z=Id(G,U.mode,ct),z.return=U,U=z),L(U)):u(U,z)}return ke}var qs=Cm(!0),wm=Cm(!1),ql=xi(null),Ul=null,Us=null,Yh=null;function Vh(){Yh=Us=Ul=null}function Gh(n){var a=ql.current;he(ql),n._currentValue=a}function Xh(n,a,u){for(;n!==null;){var p=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),n===u)break;n=n.return}}function Ys(n,a){Ul=n,Yh=Us=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&a)!==0&&(Cr=!0),n.firstContext=null)}function Ur(n){var a=n._currentValue;if(Yh!==n)if(n={context:n,memoizedValue:a,next:null},Us===null){if(Ul===null)throw Error(r(308));Us=n,Ul.dependencies={lanes:0,firstContext:n}}else Us=Us.next=n;return a}var Zi=null;function Qh(n){Zi===null?Zi=[n]:Zi.push(n)}function km(n,a,u,p){var x=a.interleaved;return x===null?(u.next=u,Qh(a)):(u.next=x.next,x.next=u),a.interleaved=u,Vn(n,p)}function Vn(n,a){n.lanes|=a;var u=n.alternate;for(u!==null&&(u.lanes|=a),u=n,n=n.return;n!==null;)n.childLanes|=a,u=n.alternate,u!==null&&(u.childLanes|=a),u=n,n=n.return;return u.tag===3?u.stateNode:null}var Ci=!1;function Kh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sm(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Gn(n,a){return{eventTime:n,lane:a,tag:0,payload:null,callback:null,next:null}}function wi(n,a,u){var p=n.updateQueue;if(p===null)return null;if(p=p.shared,(Qt&2)!==0){var x=p.pending;return x===null?a.next=a:(a.next=x.next,x.next=a),p.pending=a,Vn(n,u)}return x=p.interleaved,x===null?(a.next=a,Qh(p)):(a.next=x.next,x.next=a),p.interleaved=a,Vn(n,u)}function Yl(n,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194240)!==0)){var p=a.lanes;p&=n.pendingLanes,u|=p,a.lanes=u,hh(n,u)}}function _m(n,a){var u=n.updateQueue,p=n.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var x=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var L={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};b===null?x=b=L:b=b.next=L,u=u.next}while(u!==null);b===null?x=b=a:b=b.next=a}else x=b=a;u={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:b,shared:p.shared,effects:p.effects},n.updateQueue=u;return}n=u.lastBaseUpdate,n===null?u.firstBaseUpdate=a:n.next=a,u.lastBaseUpdate=a}function Vl(n,a,u,p){var x=n.updateQueue;Ci=!1;var b=x.firstBaseUpdate,L=x.lastBaseUpdate,$=x.shared.pending;if($!==null){x.shared.pending=null;var I=$,X=I.next;I.next=null,L===null?b=X:L.next=X,L=I;var at=n.alternate;at!==null&&(at=at.updateQueue,$=at.lastBaseUpdate,$!==L&&($===null?at.firstBaseUpdate=X:$.next=X,at.lastBaseUpdate=I))}if(b!==null){var ot=x.baseState;L=0,at=X=I=null,$=b;do{var st=$.lane,mt=$.eventTime;if((p&st)===st){at!==null&&(at=at.next={eventTime:mt,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});t:{var vt=n,_t=$;switch(st=a,mt=u,_t.tag){case 1:if(vt=_t.payload,typeof vt=="function"){ot=vt.call(mt,ot,st);break t}ot=vt;break t;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=_t.payload,st=typeof vt=="function"?vt.call(mt,ot,st):vt,st==null)break t;ot=Q({},ot,st);break t;case 2:Ci=!0}}$.callback!==null&&$.lane!==0&&(n.flags|=64,st=x.effects,st===null?x.effects=[$]:st.push($))}else mt={eventTime:mt,lane:st,tag:$.tag,payload:$.payload,callback:$.callback,next:null},at===null?(X=at=mt,I=ot):at=at.next=mt,L|=st;if($=$.next,$===null){if($=x.shared.pending,$===null)break;st=$,$=st.next,st.next=null,x.lastBaseUpdate=st,x.shared.pending=null}}while(!0);if(at===null&&(I=ot),x.baseState=I,x.firstBaseUpdate=X,x.lastBaseUpdate=at,a=x.shared.interleaved,a!==null){x=a;do L|=x.lane,x=x.next;while(x!==a)}else b===null&&(x.shared.lanes=0);es|=L,n.lanes=L,n.memoizedState=ot}}function Tm(n,a,u){if(n=a.effects,a.effects=null,n!==null)for(a=0;a<n.length;a++){var p=n[a],x=p.callback;if(x!==null){if(p.callback=null,p=u,typeof x!="function")throw Error(r(191,x));x.call(p)}}}var ro={},Tn=xi(ro),no=xi(ro),io=xi(ro);function Ji(n){if(n===ro)throw Error(r(174));return n}function Zh(n,a){switch(le(io,a),le(no,n),le(Tn,ro),n=a.nodeType,n){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:ze(null,"");break;default:n=n===8?a.parentNode:a,a=n.namespaceURI||null,n=n.tagName,a=ze(a,n)}he(Tn),le(Tn,a)}function Vs(){he(Tn),he(no),he(io)}function Lm(n){Ji(io.current);var a=Ji(Tn.current),u=ze(a,n.type);a!==u&&(le(no,n),le(Tn,u))}function Jh(n){no.current===n&&(he(Tn),he(no))}var me=xi(0);function Gl(n){for(var a=n;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var td=[];function ed(){for(var n=0;n<td.length;n++)td[n]._workInProgressVersionPrimary=null;td.length=0}var Xl=B.ReactCurrentDispatcher,rd=B.ReactCurrentBatchConfig,ts=0,ye=null,Me=null,Ie=null,Ql=!1,so=!1,ao=0,uS=0;function Qe(){throw Error(r(321))}function nd(n,a){if(a===null)return!1;for(var u=0;u<a.length&&u<n.length;u++)if(!ln(n[u],a[u]))return!1;return!0}function id(n,a,u,p,x,b){if(ts=b,ye=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Xl.current=n===null||n.memoizedState===null?pS:gS,n=u(p,x),so){b=0;do{if(so=!1,ao=0,25<=b)throw Error(r(301));b+=1,Ie=Me=null,a.updateQueue=null,Xl.current=mS,n=u(p,x)}while(so)}if(Xl.current=Jl,a=Me!==null&&Me.next!==null,ts=0,Ie=Me=ye=null,Ql=!1,a)throw Error(r(300));return n}function sd(){var n=ao!==0;return ao=0,n}function Ln(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ye.memoizedState=Ie=n:Ie=Ie.next=n,Ie}function Yr(){if(Me===null){var n=ye.alternate;n=n!==null?n.memoizedState:null}else n=Me.next;var a=Ie===null?ye.memoizedState:Ie.next;if(a!==null)Ie=a,Me=n;else{if(n===null)throw Error(r(310));Me=n,n={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ie===null?ye.memoizedState=Ie=n:Ie=Ie.next=n}return Ie}function oo(n,a){return typeof a=="function"?a(n):a}function ad(n){var a=Yr(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=n;var p=Me,x=p.baseQueue,b=u.pending;if(b!==null){if(x!==null){var L=x.next;x.next=b.next,b.next=L}p.baseQueue=x=b,u.pending=null}if(x!==null){b=x.next,p=p.baseState;var $=L=null,I=null,X=b;do{var at=X.lane;if((ts&at)===at)I!==null&&(I=I.next={lane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),p=X.hasEagerState?X.eagerState:n(p,X.action);else{var ot={lane:at,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null};I===null?($=I=ot,L=p):I=I.next=ot,ye.lanes|=at,es|=at}X=X.next}while(X!==null&&X!==b);I===null?L=p:I.next=$,ln(p,a.memoizedState)||(Cr=!0),a.memoizedState=p,a.baseState=L,a.baseQueue=I,u.lastRenderedState=p}if(n=u.interleaved,n!==null){x=n;do b=x.lane,ye.lanes|=b,es|=b,x=x.next;while(x!==n)}else x===null&&(u.lanes=0);return[a.memoizedState,u.dispatch]}function od(n){var a=Yr(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=n;var p=u.dispatch,x=u.pending,b=a.memoizedState;if(x!==null){u.pending=null;var L=x=x.next;do b=n(b,L.action),L=L.next;while(L!==x);ln(b,a.memoizedState)||(Cr=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),u.lastRenderedState=b}return[b,p]}function Em(){}function Mm(n,a){var u=ye,p=Yr(),x=a(),b=!ln(p.memoizedState,x);if(b&&(p.memoizedState=x,Cr=!0),p=p.queue,ld(Rm.bind(null,u,p,n),[n]),p.getSnapshot!==a||b||Ie!==null&&Ie.memoizedState.tag&1){if(u.flags|=2048,lo(9,Am.bind(null,u,p,x,a),void 0,null),Pe===null)throw Error(r(349));(ts&30)!==0||Bm(u,a,x)}return x}function Bm(n,a,u){n.flags|=16384,n={getSnapshot:a,value:u},a=ye.updateQueue,a===null?(a={lastEffect:null,stores:null},ye.updateQueue=a,a.stores=[n]):(u=a.stores,u===null?a.stores=[n]:u.push(n))}function Am(n,a,u,p){a.value=u,a.getSnapshot=p,$m(a)&&Fm(n)}function Rm(n,a,u){return u(function(){$m(a)&&Fm(n)})}function $m(n){var a=n.getSnapshot;n=n.value;try{var u=a();return!ln(n,u)}catch{return!0}}function Fm(n){var a=Vn(n,1);a!==null&&fn(a,n,1,-1)}function Dm(n){var a=Ln();return typeof n=="function"&&(n=n()),a.memoizedState=a.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oo,lastRenderedState:n},a.queue=n,n=n.dispatch=fS.bind(null,ye,n),[a.memoizedState,n]}function lo(n,a,u,p){return n={tag:n,create:a,destroy:u,deps:p,next:null},a=ye.updateQueue,a===null?(a={lastEffect:null,stores:null},ye.updateQueue=a,a.lastEffect=n.next=n):(u=a.lastEffect,u===null?a.lastEffect=n.next=n:(p=u.next,u.next=n,n.next=p,a.lastEffect=n)),n}function Im(){return Yr().memoizedState}function Kl(n,a,u,p){var x=Ln();ye.flags|=n,x.memoizedState=lo(1|a,u,void 0,p===void 0?null:p)}function Zl(n,a,u,p){var x=Yr();p=p===void 0?null:p;var b=void 0;if(Me!==null){var L=Me.memoizedState;if(b=L.destroy,p!==null&&nd(p,L.deps)){x.memoizedState=lo(a,u,b,p);return}}ye.flags|=n,x.memoizedState=lo(1|a,u,b,p)}function Pm(n,a){return Kl(8390656,8,n,a)}function ld(n,a){return Zl(2048,8,n,a)}function Om(n,a){return Zl(4,2,n,a)}function zm(n,a){return Zl(4,4,n,a)}function Nm(n,a){if(typeof a=="function")return n=n(),a(n),function(){a(null)};if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function jm(n,a,u){return u=u!=null?u.concat([n]):null,Zl(4,4,Nm.bind(null,a,n),u)}function cd(){}function Wm(n,a){var u=Yr();a=a===void 0?null:a;var p=u.memoizedState;return p!==null&&a!==null&&nd(a,p[1])?p[0]:(u.memoizedState=[n,a],n)}function Hm(n,a){var u=Yr();a=a===void 0?null:a;var p=u.memoizedState;return p!==null&&a!==null&&nd(a,p[1])?p[0]:(n=n(),u.memoizedState=[n,a],n)}function qm(n,a,u){return(ts&21)===0?(n.baseState&&(n.baseState=!1,Cr=!0),n.memoizedState=u):(ln(u,a)||(u=bg(),ye.lanes|=u,es|=u,n.baseState=!0),a)}function hS(n,a){var u=ie;ie=u!==0&&4>u?u:4,n(!0);var p=rd.transition;rd.transition={};try{n(!1),a()}finally{ie=u,rd.transition=p}}function Um(){return Yr().memoizedState}function dS(n,a,u){var p=Ti(n);if(u={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null},Ym(n))Vm(a,u);else if(u=km(n,a,u,p),u!==null){var x=ur();fn(u,n,p,x),Gm(u,a,p)}}function fS(n,a,u){var p=Ti(n),x={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ym(n))Vm(a,x);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var L=a.lastRenderedState,$=b(L,u);if(x.hasEagerState=!0,x.eagerState=$,ln($,L)){var I=a.interleaved;I===null?(x.next=x,Qh(a)):(x.next=I.next,I.next=x),a.interleaved=x;return}}catch{}finally{}u=km(n,a,x,p),u!==null&&(x=ur(),fn(u,n,p,x),Gm(u,a,p))}}function Ym(n){var a=n.alternate;return n===ye||a!==null&&a===ye}function Vm(n,a){so=Ql=!0;var u=n.pending;u===null?a.next=a:(a.next=u.next,u.next=a),n.pending=a}function Gm(n,a,u){if((u&4194240)!==0){var p=a.lanes;p&=n.pendingLanes,u|=p,a.lanes=u,hh(n,u)}}var Jl={readContext:Ur,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},pS={readContext:Ur,useCallback:function(n,a){return Ln().memoizedState=[n,a===void 0?null:a],n},useContext:Ur,useEffect:Pm,useImperativeHandle:function(n,a,u){return u=u!=null?u.concat([n]):null,Kl(4194308,4,Nm.bind(null,a,n),u)},useLayoutEffect:function(n,a){return Kl(4194308,4,n,a)},useInsertionEffect:function(n,a){return Kl(4,2,n,a)},useMemo:function(n,a){var u=Ln();return a=a===void 0?null:a,n=n(),u.memoizedState=[n,a],n},useReducer:function(n,a,u){var p=Ln();return a=u!==void 0?u(a):a,p.memoizedState=p.baseState=a,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:a},p.queue=n,n=n.dispatch=dS.bind(null,ye,n),[p.memoizedState,n]},useRef:function(n){var a=Ln();return n={current:n},a.memoizedState=n},useState:Dm,useDebugValue:cd,useDeferredValue:function(n){return Ln().memoizedState=n},useTransition:function(){var n=Dm(!1),a=n[0];return n=hS.bind(null,n[1]),Ln().memoizedState=n,[a,n]},useMutableSource:function(){},useSyncExternalStore:function(n,a,u){var p=ye,x=Ln();if(fe){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),Pe===null)throw Error(r(349));(ts&30)!==0||Bm(p,a,u)}x.memoizedState=u;var b={value:u,getSnapshot:a};return x.queue=b,Pm(Rm.bind(null,p,b,n),[n]),p.flags|=2048,lo(9,Am.bind(null,p,b,u,a),void 0,null),u},useId:function(){var n=Ln(),a=Pe.identifierPrefix;if(fe){var u=Yn,p=Un;u=(p&~(1<<32-on(p)-1)).toString(32)+u,a=":"+a+"R"+u,u=ao++,0<u&&(a+="H"+u.toString(32)),a+=":"}else u=uS++,a=":"+a+"r"+u.toString(32)+":";return n.memoizedState=a},unstable_isNewReconciler:!1},gS={readContext:Ur,useCallback:Wm,useContext:Ur,useEffect:ld,useImperativeHandle:jm,useInsertionEffect:Om,useLayoutEffect:zm,useMemo:Hm,useReducer:ad,useRef:Im,useState:function(){return ad(oo)},useDebugValue:cd,useDeferredValue:function(n){var a=Yr();return qm(a,Me.memoizedState,n)},useTransition:function(){var n=ad(oo)[0],a=Yr().memoizedState;return[n,a]},useMutableSource:Em,useSyncExternalStore:Mm,useId:Um,unstable_isNewReconciler:!1},mS={readContext:Ur,useCallback:Wm,useContext:Ur,useEffect:ld,useImperativeHandle:jm,useInsertionEffect:Om,useLayoutEffect:zm,useMemo:Hm,useReducer:od,useRef:Im,useState:function(){return od(oo)},useDebugValue:cd,useDeferredValue:function(n){var a=Yr();return Me===null?a.memoizedState=n:qm(a,Me.memoizedState,n)},useTransition:function(){var n=od(oo)[0],a=Yr().memoizedState;return[n,a]},useMutableSource:Em,useSyncExternalStore:Mm,useId:Um,unstable_isNewReconciler:!1};function un(n,a){if(n&&n.defaultProps){a=Q({},a),n=n.defaultProps;for(var u in n)a[u]===void 0&&(a[u]=n[u]);return a}return a}function ud(n,a,u,p){a=n.memoizedState,u=u(p,a),u=u==null?a:Q({},a,u),n.memoizedState=u,n.lanes===0&&(n.updateQueue.baseState=u)}var tc={isMounted:function(n){return(n=n._reactInternals)?Sn(n)===n:!1},enqueueSetState:function(n,a,u){n=n._reactInternals;var p=ur(),x=Ti(n),b=Gn(p,x);b.payload=a,u!=null&&(b.callback=u),a=wi(n,b,x),a!==null&&(fn(a,n,x,p),Yl(a,n,x))},enqueueReplaceState:function(n,a,u){n=n._reactInternals;var p=ur(),x=Ti(n),b=Gn(p,x);b.tag=1,b.payload=a,u!=null&&(b.callback=u),a=wi(n,b,x),a!==null&&(fn(a,n,x,p),Yl(a,n,x))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var u=ur(),p=Ti(n),x=Gn(u,p);x.tag=2,a!=null&&(x.callback=a),a=wi(n,x,p),a!==null&&(fn(a,n,p,u),Yl(a,n,p))}};function Xm(n,a,u,p,x,b,L){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(p,b,L):a.prototype&&a.prototype.isPureReactComponent?!Ga(u,p)||!Ga(x,b):!0}function Qm(n,a,u){var p=!1,x=vi,b=a.contextType;return typeof b=="object"&&b!==null?b=Ur(b):(x=br(a)?Xi:Xe.current,p=a.contextTypes,b=(p=p!=null)?Ns(n,x):vi),a=new a(u,b),n.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=tc,n.stateNode=a,a._reactInternals=n,p&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=x,n.__reactInternalMemoizedMaskedChildContext=b),a}function Km(n,a,u,p){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,p),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,p),a.state!==n&&tc.enqueueReplaceState(a,a.state,null)}function hd(n,a,u,p){var x=n.stateNode;x.props=u,x.state=n.memoizedState,x.refs={},Kh(n);var b=a.contextType;typeof b=="object"&&b!==null?x.context=Ur(b):(b=br(a)?Xi:Xe.current,x.context=Ns(n,b)),x.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(ud(n,a,b,u),x.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(a=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),a!==x.state&&tc.enqueueReplaceState(x,x.state,null),Vl(n,u,x,p),x.state=n.memoizedState),typeof x.componentDidMount=="function"&&(n.flags|=4194308)}function Gs(n,a){try{var u="",p=a;do u+=dt(p),p=p.return;while(p);var x=u}catch(b){x=`
|
|
40
|
-
Error generating stack: `+b.message+`
|
|
41
|
-
`+b.stack}return{value:n,source:a,stack:x,digest:null}}function dd(n,a,u){return{value:n,source:null,stack:u??null,digest:a??null}}function fd(n,a){try{console.error(a.value)}catch(u){setTimeout(function(){throw u})}}var yS=typeof WeakMap=="function"?WeakMap:Map;function Zm(n,a,u){u=Gn(-1,u),u.tag=3,u.payload={element:null};var p=a.value;return u.callback=function(){oc||(oc=!0,Ed=p),fd(n,a)},u}function Jm(n,a,u){u=Gn(-1,u),u.tag=3;var p=n.type.getDerivedStateFromError;if(typeof p=="function"){var x=a.value;u.payload=function(){return p(x)},u.callback=function(){fd(n,a)}}var b=n.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(u.callback=function(){fd(n,a),typeof p!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var L=a.stack;this.componentDidCatch(a.value,{componentStack:L!==null?L:""})}),u}function t0(n,a,u){var p=n.pingCache;if(p===null){p=n.pingCache=new yS;var x=new Set;p.set(a,x)}else x=p.get(a),x===void 0&&(x=new Set,p.set(a,x));x.has(u)||(x.add(u),n=AS.bind(null,n,a,u),a.then(n,n))}function e0(n){do{var a;if((a=n.tag===13)&&(a=n.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return n;n=n.return}while(n!==null);return null}function r0(n,a,u,p,x){return(n.mode&1)===0?(n===a?n.flags|=65536:(n.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(a=Gn(-1,1),a.tag=2,wi(u,a,1))),u.lanes|=1),n):(n.flags|=65536,n.lanes=x,n)}var xS=B.ReactCurrentOwner,Cr=!1;function cr(n,a,u,p){a.child=n===null?wm(a,null,u,p):qs(a,n.child,u,p)}function n0(n,a,u,p,x){u=u.render;var b=a.ref;return Ys(a,x),p=id(n,a,u,p,b,x),u=sd(),n!==null&&!Cr?(a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~x,Xn(n,a,x)):(fe&&u&&jh(a),a.flags|=1,cr(n,a,p,x),a.child)}function i0(n,a,u,p,x){if(n===null){var b=u.type;return typeof b=="function"&&!Dd(b)&&b.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(a.tag=15,a.type=b,s0(n,a,b,p,x)):(n=fc(u.type,null,p,a,a.mode,x),n.ref=a.ref,n.return=a,a.child=n)}if(b=n.child,(n.lanes&x)===0){var L=b.memoizedProps;if(u=u.compare,u=u!==null?u:Ga,u(L,p)&&n.ref===a.ref)return Xn(n,a,x)}return a.flags|=1,n=Ei(b,p),n.ref=a.ref,n.return=a,a.child=n}function s0(n,a,u,p,x){if(n!==null){var b=n.memoizedProps;if(Ga(b,p)&&n.ref===a.ref)if(Cr=!1,a.pendingProps=p=b,(n.lanes&x)!==0)(n.flags&131072)!==0&&(Cr=!0);else return a.lanes=n.lanes,Xn(n,a,x)}return pd(n,a,u,p,x)}function a0(n,a,u){var p=a.pendingProps,x=p.children,b=n!==null?n.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(Qs,Fr),Fr|=u;else{if((u&1073741824)===0)return n=b!==null?b.baseLanes|u:u,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:n,cachePool:null,transitions:null},a.updateQueue=null,le(Qs,Fr),Fr|=n,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=b!==null?b.baseLanes:u,le(Qs,Fr),Fr|=p}else b!==null?(p=b.baseLanes|u,a.memoizedState=null):p=u,le(Qs,Fr),Fr|=p;return cr(n,a,x,u),a.child}function o0(n,a){var u=a.ref;(n===null&&u!==null||n!==null&&n.ref!==u)&&(a.flags|=512,a.flags|=2097152)}function pd(n,a,u,p,x){var b=br(u)?Xi:Xe.current;return b=Ns(a,b),Ys(a,x),u=id(n,a,u,p,b,x),p=sd(),n!==null&&!Cr?(a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~x,Xn(n,a,x)):(fe&&p&&jh(a),a.flags|=1,cr(n,a,u,x),a.child)}function l0(n,a,u,p,x){if(br(u)){var b=!0;Ol(a)}else b=!1;if(Ys(a,x),a.stateNode===null)rc(n,a),Qm(a,u,p),hd(a,u,p,x),p=!0;else if(n===null){var L=a.stateNode,$=a.memoizedProps;L.props=$;var I=L.context,X=u.contextType;typeof X=="object"&&X!==null?X=Ur(X):(X=br(u)?Xi:Xe.current,X=Ns(a,X));var at=u.getDerivedStateFromProps,ot=typeof at=="function"||typeof L.getSnapshotBeforeUpdate=="function";ot||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||($!==p||I!==X)&&Km(a,L,p,X),Ci=!1;var st=a.memoizedState;L.state=st,Vl(a,p,L,x),I=a.memoizedState,$!==p||st!==I||vr.current||Ci?(typeof at=="function"&&(ud(a,u,at,p),I=a.memoizedState),($=Ci||Xm(a,u,$,p,st,I,X))?(ot||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(a.flags|=4194308)):(typeof L.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=I),L.props=p,L.state=I,L.context=X,p=$):(typeof L.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{L=a.stateNode,Sm(n,a),$=a.memoizedProps,X=a.type===a.elementType?$:un(a.type,$),L.props=X,ot=a.pendingProps,st=L.context,I=u.contextType,typeof I=="object"&&I!==null?I=Ur(I):(I=br(u)?Xi:Xe.current,I=Ns(a,I));var mt=u.getDerivedStateFromProps;(at=typeof mt=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||($!==ot||st!==I)&&Km(a,L,p,I),Ci=!1,st=a.memoizedState,L.state=st,Vl(a,p,L,x);var vt=a.memoizedState;$!==ot||st!==vt||vr.current||Ci?(typeof mt=="function"&&(ud(a,u,mt,p),vt=a.memoizedState),(X=Ci||Xm(a,u,X,p,st,vt,I)||!1)?(at||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(p,vt,I),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(p,vt,I)),typeof L.componentDidUpdate=="function"&&(a.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof L.componentDidUpdate!="function"||$===n.memoizedProps&&st===n.memoizedState||(a.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||$===n.memoizedProps&&st===n.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=vt),L.props=p,L.state=vt,L.context=I,p=X):(typeof L.componentDidUpdate!="function"||$===n.memoizedProps&&st===n.memoizedState||(a.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||$===n.memoizedProps&&st===n.memoizedState||(a.flags|=1024),p=!1)}return gd(n,a,u,p,b,x)}function gd(n,a,u,p,x,b){o0(n,a);var L=(a.flags&128)!==0;if(!p&&!L)return x&&fm(a,u,!1),Xn(n,a,b);p=a.stateNode,xS.current=a;var $=L&&typeof u.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,n!==null&&L?(a.child=qs(a,n.child,null,b),a.child=qs(a,null,$,b)):cr(n,a,$,b),a.memoizedState=p.state,x&&fm(a,u,!0),a.child}function c0(n){var a=n.stateNode;a.pendingContext?hm(n,a.pendingContext,a.pendingContext!==a.context):a.context&&hm(n,a.context,!1),Zh(n,a.containerInfo)}function u0(n,a,u,p,x){return Hs(),Uh(x),a.flags|=256,cr(n,a,u,p),a.child}var md={dehydrated:null,treeContext:null,retryLane:0};function yd(n){return{baseLanes:n,cachePool:null,transitions:null}}function h0(n,a,u){var p=a.pendingProps,x=me.current,b=!1,L=(a.flags&128)!==0,$;if(($=L)||($=n!==null&&n.memoizedState===null?!1:(x&2)!==0),$?(b=!0,a.flags&=-129):(n===null||n.memoizedState!==null)&&(x|=1),le(me,x&1),n===null)return qh(a),n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((a.mode&1)===0?a.lanes=1:n.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(L=p.children,n=p.fallback,b?(p=a.mode,b=a.child,L={mode:"hidden",children:L},(p&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=L):b=pc(L,p,0,null),n=ss(n,p,u,null),b.return=a,n.return=a,b.sibling=n,a.child=b,a.child.memoizedState=yd(u),a.memoizedState=md,n):xd(a,L));if(x=n.memoizedState,x!==null&&($=x.dehydrated,$!==null))return vS(n,a,L,p,$,x,u);if(b){b=p.fallback,L=a.mode,x=n.child,$=x.sibling;var I={mode:"hidden",children:p.children};return(L&1)===0&&a.child!==x?(p=a.child,p.childLanes=0,p.pendingProps=I,a.deletions=null):(p=Ei(x,I),p.subtreeFlags=x.subtreeFlags&14680064),$!==null?b=Ei($,b):(b=ss(b,L,u,null),b.flags|=2),b.return=a,p.return=a,p.sibling=b,a.child=p,p=b,b=a.child,L=n.child.memoizedState,L=L===null?yd(u):{baseLanes:L.baseLanes|u,cachePool:null,transitions:L.transitions},b.memoizedState=L,b.childLanes=n.childLanes&~u,a.memoizedState=md,p}return b=n.child,n=b.sibling,p=Ei(b,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=u),p.return=a,p.sibling=null,n!==null&&(u=a.deletions,u===null?(a.deletions=[n],a.flags|=16):u.push(n)),a.child=p,a.memoizedState=null,p}function xd(n,a){return a=pc({mode:"visible",children:a},n.mode,0,null),a.return=n,n.child=a}function ec(n,a,u,p){return p!==null&&Uh(p),qs(a,n.child,null,u),n=xd(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function vS(n,a,u,p,x,b,L){if(u)return a.flags&256?(a.flags&=-257,p=dd(Error(r(422))),ec(n,a,L,p)):a.memoizedState!==null?(a.child=n.child,a.flags|=128,null):(b=p.fallback,x=a.mode,p=pc({mode:"visible",children:p.children},x,0,null),b=ss(b,x,L,null),b.flags|=2,p.return=a,b.return=a,p.sibling=b,a.child=p,(a.mode&1)!==0&&qs(a,n.child,null,L),a.child.memoizedState=yd(L),a.memoizedState=md,b);if((a.mode&1)===0)return ec(n,a,L,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var $=p.dgst;return p=$,b=Error(r(419)),p=dd(b,p,void 0),ec(n,a,L,p)}if($=(L&n.childLanes)!==0,Cr||$){if(p=Pe,p!==null){switch(L&-L){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|L))!==0?0:x,x!==0&&x!==b.retryLane&&(b.retryLane=x,Vn(n,x),fn(p,n,x,-1))}return Fd(),p=dd(Error(r(421))),ec(n,a,L,p)}return x.data==="$?"?(a.flags|=128,a.child=n.child,a=RS.bind(null,n),x._reactRetry=a,null):(n=b.treeContext,$r=yi(x.nextSibling),Rr=a,fe=!0,cn=null,n!==null&&(Hr[qr++]=Un,Hr[qr++]=Yn,Hr[qr++]=Qi,Un=n.id,Yn=n.overflow,Qi=a),a=xd(a,p.children),a.flags|=4096,a)}function d0(n,a,u){n.lanes|=a;var p=n.alternate;p!==null&&(p.lanes|=a),Xh(n.return,a,u)}function vd(n,a,u,p,x){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:x}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=p,b.tail=u,b.tailMode=x)}function f0(n,a,u){var p=a.pendingProps,x=p.revealOrder,b=p.tail;if(cr(n,a,p.children,u),p=me.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(n!==null&&(n.flags&128)!==0)t:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&d0(n,u,a);else if(n.tag===19)d0(n,u,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break t;for(;n.sibling===null;){if(n.return===null||n.return===a)break t;n=n.return}n.sibling.return=n.return,n=n.sibling}p&=1}if(le(me,p),(a.mode&1)===0)a.memoizedState=null;else switch(x){case"forwards":for(u=a.child,x=null;u!==null;)n=u.alternate,n!==null&&Gl(n)===null&&(x=u),u=u.sibling;u=x,u===null?(x=a.child,a.child=null):(x=u.sibling,u.sibling=null),vd(a,!1,x,u,b);break;case"backwards":for(u=null,x=a.child,a.child=null;x!==null;){if(n=x.alternate,n!==null&&Gl(n)===null){a.child=x;break}n=x.sibling,x.sibling=u,u=x,x=n}vd(a,!0,u,null,b);break;case"together":vd(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function rc(n,a){(a.mode&1)===0&&n!==null&&(n.alternate=null,a.alternate=null,a.flags|=2)}function Xn(n,a,u){if(n!==null&&(a.dependencies=n.dependencies),es|=a.lanes,(u&a.childLanes)===0)return null;if(n!==null&&a.child!==n.child)throw Error(r(153));if(a.child!==null){for(n=a.child,u=Ei(n,n.pendingProps),a.child=u,u.return=a;n.sibling!==null;)n=n.sibling,u=u.sibling=Ei(n,n.pendingProps),u.return=a;u.sibling=null}return a.child}function bS(n,a,u){switch(a.tag){case 3:c0(a),Hs();break;case 5:Lm(a);break;case 1:br(a.type)&&Ol(a);break;case 4:Zh(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,x=a.memoizedProps.value;le(ql,p._currentValue),p._currentValue=x;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(le(me,me.current&1),a.flags|=128,null):(u&a.child.childLanes)!==0?h0(n,a,u):(le(me,me.current&1),n=Xn(n,a,u),n!==null?n.sibling:null);le(me,me.current&1);break;case 19:if(p=(u&a.childLanes)!==0,(n.flags&128)!==0){if(p)return f0(n,a,u);a.flags|=128}if(x=a.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),le(me,me.current),p)break;return null;case 22:case 23:return a.lanes=0,a0(n,a,u)}return Xn(n,a,u)}var p0,bd,g0,m0;p0=function(n,a){for(var u=a.child;u!==null;){if(u.tag===5||u.tag===6)n.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},bd=function(){},g0=function(n,a,u,p){var x=n.memoizedProps;if(x!==p){n=a.stateNode,Ji(Tn.current);var b=null;switch(u){case"input":x=ar(n,x),p=ar(n,p),b=[];break;case"select":x=Q({},x,{value:void 0}),p=Q({},p,{value:void 0}),b=[];break;case"textarea":x=zn(n,x),p=zn(n,p),b=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(n.onclick=Dl)}kn(u,p);var L;u=null;for(X in x)if(!p.hasOwnProperty(X)&&x.hasOwnProperty(X)&&x[X]!=null)if(X==="style"){var $=x[X];for(L in $)$.hasOwnProperty(L)&&(u||(u={}),u[L]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(s.hasOwnProperty(X)?b||(b=[]):(b=b||[]).push(X,null));for(X in p){var I=p[X];if($=x!=null?x[X]:void 0,p.hasOwnProperty(X)&&I!==$&&(I!=null||$!=null))if(X==="style")if($){for(L in $)!$.hasOwnProperty(L)||I&&I.hasOwnProperty(L)||(u||(u={}),u[L]="");for(L in I)I.hasOwnProperty(L)&&$[L]!==I[L]&&(u||(u={}),u[L]=I[L])}else u||(b||(b=[]),b.push(X,u)),u=I;else X==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,$=$?$.__html:void 0,I!=null&&$!==I&&(b=b||[]).push(X,I)):X==="children"?typeof I!="string"&&typeof I!="number"||(b=b||[]).push(X,""+I):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(s.hasOwnProperty(X)?(I!=null&&X==="onScroll"&&ue("scroll",n),b||$===I||(b=[])):(b=b||[]).push(X,I))}u&&(b=b||[]).push("style",u);var X=b;(a.updateQueue=X)&&(a.flags|=4)}},m0=function(n,a,u,p){u!==p&&(a.flags|=4)};function co(n,a){if(!fe)switch(n.tailMode){case"hidden":a=n.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n.tail=null:u.sibling=null;break;case"collapsed":u=n.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:p.sibling=null}}function Ke(n){var a=n.alternate!==null&&n.alternate.child===n.child,u=0,p=0;if(a)for(var x=n.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=n,x=x.sibling;else for(x=n.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=n,x=x.sibling;return n.subtreeFlags|=p,n.childLanes=u,a}function CS(n,a,u){var p=a.pendingProps;switch(Wh(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(a),null;case 1:return br(a.type)&&Pl(),Ke(a),null;case 3:return p=a.stateNode,Vs(),he(vr),he(Xe),ed(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(n===null||n.child===null)&&(Wl(a)?a.flags|=4:n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,cn!==null&&(Ad(cn),cn=null))),bd(n,a),Ke(a),null;case 5:Jh(a);var x=Ji(io.current);if(u=a.type,n!==null&&a.stateNode!=null)g0(n,a,u,p,x),n.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(r(166));return Ke(a),null}if(n=Ji(Tn.current),Wl(a)){p=a.stateNode,u=a.type;var b=a.memoizedProps;switch(p[_n]=a,p[Ja]=b,n=(a.mode&1)!==0,u){case"dialog":ue("cancel",p),ue("close",p);break;case"iframe":case"object":case"embed":ue("load",p);break;case"video":case"audio":for(x=0;x<Qa.length;x++)ue(Qa[x],p);break;case"source":ue("error",p);break;case"img":case"image":case"link":ue("error",p),ue("load",p);break;case"details":ue("toggle",p);break;case"input":Mr(p,b),ue("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!b.multiple},ue("invalid",p);break;case"textarea":Hi(p,b),ue("invalid",p)}kn(u,b),x=null;for(var L in b)if(b.hasOwnProperty(L)){var $=b[L];L==="children"?typeof $=="string"?p.textContent!==$&&(b.suppressHydrationWarning!==!0&&Fl(p.textContent,$,n),x=["children",$]):typeof $=="number"&&p.textContent!==""+$&&(b.suppressHydrationWarning!==!0&&Fl(p.textContent,$,n),x=["children",""+$]):s.hasOwnProperty(L)&&$!=null&&L==="onScroll"&&ue("scroll",p)}switch(u){case"input":ae(p),or(p,b,!0);break;case"textarea":ae(p),Jr(p);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(p.onclick=Dl)}p=x,a.updateQueue=p,p!==null&&(a.flags|=4)}else{L=x.nodeType===9?x:x.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=Nr(u)),n==="http://www.w3.org/1999/xhtml"?u==="script"?(n=L.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof p.is=="string"?n=L.createElement(u,{is:p.is}):(n=L.createElement(u),u==="select"&&(L=n,p.multiple?L.multiple=!0:p.size&&(L.size=p.size))):n=L.createElementNS(n,u),n[_n]=a,n[Ja]=p,p0(n,a,!1,!1),a.stateNode=n;t:{switch(L=qi(u,p),u){case"dialog":ue("cancel",n),ue("close",n),x=p;break;case"iframe":case"object":case"embed":ue("load",n),x=p;break;case"video":case"audio":for(x=0;x<Qa.length;x++)ue(Qa[x],n);x=p;break;case"source":ue("error",n),x=p;break;case"img":case"image":case"link":ue("error",n),ue("load",n),x=p;break;case"details":ue("toggle",n),x=p;break;case"input":Mr(n,p),x=ar(n,p),ue("invalid",n);break;case"option":x=p;break;case"select":n._wrapperState={wasMultiple:!!p.multiple},x=Q({},p,{value:void 0}),ue("invalid",n);break;case"textarea":Hi(n,p),x=zn(n,p),ue("invalid",n);break;default:x=p}kn(u,x),$=x;for(b in $)if($.hasOwnProperty(b)){var I=$[b];b==="style"?en(n,I):b==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&ai(n,I)):b==="children"?typeof I=="string"?(u!=="textarea"||I!=="")&&Ne(n,I):typeof I=="number"&&Ne(n,""+I):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?I!=null&&b==="onScroll"&&ue("scroll",n):I!=null&&E(n,b,I,L))}switch(u){case"input":ae(n),or(n,p,!1);break;case"textarea":ae(n),Jr(n);break;case"option":p.value!=null&&n.setAttribute("value",""+Lt(p.value));break;case"select":n.multiple=!!p.multiple,b=p.value,b!=null?xr(n,!!p.multiple,b,!1):p.defaultValue!=null&&xr(n,!!p.multiple,p.defaultValue,!0);break;default:typeof x.onClick=="function"&&(n.onclick=Dl)}switch(u){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break t;case"img":p=!0;break t;default:p=!1}}p&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Ke(a),null;case 6:if(n&&a.stateNode!=null)m0(n,a,n.memoizedProps,p);else{if(typeof p!="string"&&a.stateNode===null)throw Error(r(166));if(u=Ji(io.current),Ji(Tn.current),Wl(a)){if(p=a.stateNode,u=a.memoizedProps,p[_n]=a,(b=p.nodeValue!==u)&&(n=Rr,n!==null))switch(n.tag){case 3:Fl(p.nodeValue,u,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Fl(p.nodeValue,u,(n.mode&1)!==0)}b&&(a.flags|=4)}else p=(u.nodeType===9?u:u.ownerDocument).createTextNode(p),p[_n]=a,a.stateNode=p}return Ke(a),null;case 13:if(he(me),p=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(fe&&$r!==null&&(a.mode&1)!==0&&(a.flags&128)===0)vm(),Hs(),a.flags|=98560,b=!1;else if(b=Wl(a),p!==null&&p.dehydrated!==null){if(n===null){if(!b)throw Error(r(318));if(b=a.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[_n]=a}else Hs(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ke(a),b=!1}else cn!==null&&(Ad(cn),cn=null),b=!0;if(!b)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=u,a):(p=p!==null,p!==(n!==null&&n.memoizedState!==null)&&p&&(a.child.flags|=8192,(a.mode&1)!==0&&(n===null||(me.current&1)!==0?Be===0&&(Be=3):Fd())),a.updateQueue!==null&&(a.flags|=4),Ke(a),null);case 4:return Vs(),bd(n,a),n===null&&Ka(a.stateNode.containerInfo),Ke(a),null;case 10:return Gh(a.type._context),Ke(a),null;case 17:return br(a.type)&&Pl(),Ke(a),null;case 19:if(he(me),b=a.memoizedState,b===null)return Ke(a),null;if(p=(a.flags&128)!==0,L=b.rendering,L===null)if(p)co(b,!1);else{if(Be!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(L=Gl(n),L!==null){for(a.flags|=128,co(b,!1),p=L.updateQueue,p!==null&&(a.updateQueue=p,a.flags|=4),a.subtreeFlags=0,p=u,u=a.child;u!==null;)b=u,n=p,b.flags&=14680066,L=b.alternate,L===null?(b.childLanes=0,b.lanes=n,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=L.childLanes,b.lanes=L.lanes,b.child=L.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=L.memoizedProps,b.memoizedState=L.memoizedState,b.updateQueue=L.updateQueue,b.type=L.type,n=L.dependencies,b.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),u=u.sibling;return le(me,me.current&1|2),a.child}n=n.sibling}b.tail!==null&&qt()>Ks&&(a.flags|=128,p=!0,co(b,!1),a.lanes=4194304)}else{if(!p)if(n=Gl(L),n!==null){if(a.flags|=128,p=!0,u=n.updateQueue,u!==null&&(a.updateQueue=u,a.flags|=4),co(b,!0),b.tail===null&&b.tailMode==="hidden"&&!L.alternate&&!fe)return Ke(a),null}else 2*qt()-b.renderingStartTime>Ks&&u!==1073741824&&(a.flags|=128,p=!0,co(b,!1),a.lanes=4194304);b.isBackwards?(L.sibling=a.child,a.child=L):(u=b.last,u!==null?u.sibling=L:a.child=L,b.last=L)}return b.tail!==null?(a=b.tail,b.rendering=a,b.tail=a.sibling,b.renderingStartTime=qt(),a.sibling=null,u=me.current,le(me,p?u&1|2:u&1),a):(Ke(a),null);case 22:case 23:return $d(),p=a.memoizedState!==null,n!==null&&n.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(Fr&1073741824)!==0&&(Ke(a),a.subtreeFlags&6&&(a.flags|=8192)):Ke(a),null;case 24:return null;case 25:return null}throw Error(r(156,a.tag))}function wS(n,a){switch(Wh(a),a.tag){case 1:return br(a.type)&&Pl(),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Vs(),he(vr),he(Xe),ed(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 5:return Jh(a),null;case 13:if(he(me),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(r(340));Hs()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return he(me),null;case 4:return Vs(),null;case 10:return Gh(a.type._context),null;case 22:case 23:return $d(),null;case 24:return null;default:return null}}var nc=!1,Ze=!1,kS=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Xs(n,a){var u=n.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(p){Ce(n,a,p)}else u.current=null}function Cd(n,a,u){try{u()}catch(p){Ce(n,a,p)}}var y0=!1;function SS(n,a){if($h=kl,n=Xg(),_h(n)){if("selectionStart"in n)var u={start:n.selectionStart,end:n.selectionEnd};else t:{u=(u=n.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var x=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break t}var L=0,$=-1,I=-1,X=0,at=0,ot=n,st=null;e:for(;;){for(var mt;ot!==u||x!==0&&ot.nodeType!==3||($=L+x),ot!==b||p!==0&&ot.nodeType!==3||(I=L+p),ot.nodeType===3&&(L+=ot.nodeValue.length),(mt=ot.firstChild)!==null;)st=ot,ot=mt;for(;;){if(ot===n)break e;if(st===u&&++X===x&&($=L),st===b&&++at===p&&(I=L),(mt=ot.nextSibling)!==null)break;ot=st,st=ot.parentNode}ot=mt}u=$===-1||I===-1?null:{start:$,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(Fh={focusedElem:n,selectionRange:u},kl=!1,xt=a;xt!==null;)if(a=xt,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,xt=n;else for(;xt!==null;){a=xt;try{var vt=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(vt!==null){var _t=vt.memoizedProps,ke=vt.memoizedState,U=a.stateNode,z=U.getSnapshotBeforeUpdate(a.elementType===a.type?_t:un(a.type,_t),ke);U.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var G=a.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ct){Ce(a,a.return,ct)}if(n=a.sibling,n!==null){n.return=a.return,xt=n;break}xt=a.return}return vt=y0,y0=!1,vt}function uo(n,a,u){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&n)===n){var b=x.destroy;x.destroy=void 0,b!==void 0&&Cd(a,u,b)}x=x.next}while(x!==p)}}function ic(n,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var u=a=a.next;do{if((u.tag&n)===n){var p=u.create;u.destroy=p()}u=u.next}while(u!==a)}}function wd(n){var a=n.ref;if(a!==null){var u=n.stateNode;switch(n.tag){case 5:n=u;break;default:n=u}typeof a=="function"?a(n):a.current=n}}function x0(n){var a=n.alternate;a!==null&&(n.alternate=null,x0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&(delete a[_n],delete a[Ja],delete a[Oh],delete a[aS],delete a[oS])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function v0(n){return n.tag===5||n.tag===3||n.tag===4}function b0(n){t:for(;;){for(;n.sibling===null;){if(n.return===null||v0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function kd(n,a,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,a?u.nodeType===8?u.parentNode.insertBefore(n,a):u.insertBefore(n,a):(u.nodeType===8?(a=u.parentNode,a.insertBefore(n,u)):(a=u,a.appendChild(n)),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Dl));else if(p!==4&&(n=n.child,n!==null))for(kd(n,a,u),n=n.sibling;n!==null;)kd(n,a,u),n=n.sibling}function Sd(n,a,u){var p=n.tag;if(p===5||p===6)n=n.stateNode,a?u.insertBefore(n,a):u.appendChild(n);else if(p!==4&&(n=n.child,n!==null))for(Sd(n,a,u),n=n.sibling;n!==null;)Sd(n,a,u),n=n.sibling}var We=null,hn=!1;function ki(n,a,u){for(u=u.child;u!==null;)C0(n,a,u),u=u.sibling}function C0(n,a,u){if(Br&&typeof Br.onCommitFiberUnmount=="function")try{Br.onCommitFiberUnmount(Vi,u)}catch{}switch(u.tag){case 5:Ze||Xs(u,a);case 6:var p=We,x=hn;We=null,ki(n,a,u),We=p,hn=x,We!==null&&(hn?(n=We,u=u.stateNode,n.nodeType===8?n.parentNode.removeChild(u):n.removeChild(u)):We.removeChild(u.stateNode));break;case 18:We!==null&&(hn?(n=We,u=u.stateNode,n.nodeType===8?Ph(n.parentNode,u):n.nodeType===1&&Ph(n,u),Wa(n)):Ph(We,u.stateNode));break;case 4:p=We,x=hn,We=u.stateNode.containerInfo,hn=!0,ki(n,a,u),We=p,hn=x;break;case 0:case 11:case 14:case 15:if(!Ze&&(p=u.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var b=x,L=b.destroy;b=b.tag,L!==void 0&&((b&2)!==0||(b&4)!==0)&&Cd(u,a,L),x=x.next}while(x!==p)}ki(n,a,u);break;case 1:if(!Ze&&(Xs(u,a),p=u.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=u.memoizedProps,p.state=u.memoizedState,p.componentWillUnmount()}catch($){Ce(u,a,$)}ki(n,a,u);break;case 21:ki(n,a,u);break;case 22:u.mode&1?(Ze=(p=Ze)||u.memoizedState!==null,ki(n,a,u),Ze=p):ki(n,a,u);break;default:ki(n,a,u)}}function w0(n){var a=n.updateQueue;if(a!==null){n.updateQueue=null;var u=n.stateNode;u===null&&(u=n.stateNode=new kS),a.forEach(function(p){var x=$S.bind(null,n,p);u.has(p)||(u.add(p),p.then(x,x))})}}function dn(n,a){var u=a.deletions;if(u!==null)for(var p=0;p<u.length;p++){var x=u[p];try{var b=n,L=a,$=L;t:for(;$!==null;){switch($.tag){case 5:We=$.stateNode,hn=!1;break t;case 3:We=$.stateNode.containerInfo,hn=!0;break t;case 4:We=$.stateNode.containerInfo,hn=!0;break t}$=$.return}if(We===null)throw Error(r(160));C0(b,L,x),We=null,hn=!1;var I=x.alternate;I!==null&&(I.return=null),x.return=null}catch(X){Ce(x,a,X)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)k0(a,n),a=a.sibling}function k0(n,a){var u=n.alternate,p=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(dn(a,n),En(n),p&4){try{uo(3,n,n.return),ic(3,n)}catch(_t){Ce(n,n.return,_t)}try{uo(5,n,n.return)}catch(_t){Ce(n,n.return,_t)}}break;case 1:dn(a,n),En(n),p&512&&u!==null&&Xs(u,u.return);break;case 5:if(dn(a,n),En(n),p&512&&u!==null&&Xs(u,u.return),n.flags&32){var x=n.stateNode;try{Ne(x,"")}catch(_t){Ce(n,n.return,_t)}}if(p&4&&(x=n.stateNode,x!=null)){var b=n.memoizedProps,L=u!==null?u.memoizedProps:b,$=n.type,I=n.updateQueue;if(n.updateQueue=null,I!==null)try{$==="input"&&b.type==="radio"&&b.name!=null&&Et(x,b),qi($,L);var X=qi($,b);for(L=0;L<I.length;L+=2){var at=I[L],ot=I[L+1];at==="style"?en(x,ot):at==="dangerouslySetInnerHTML"?ai(x,ot):at==="children"?Ne(x,ot):E(x,at,ot,X)}switch($){case"input":ce(x,b);break;case"textarea":Nn(x,b);break;case"select":var st=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!b.multiple;var mt=b.value;mt!=null?xr(x,!!b.multiple,mt,!1):st!==!!b.multiple&&(b.defaultValue!=null?xr(x,!!b.multiple,b.defaultValue,!0):xr(x,!!b.multiple,b.multiple?[]:"",!1))}x[Ja]=b}catch(_t){Ce(n,n.return,_t)}}break;case 6:if(dn(a,n),En(n),p&4){if(n.stateNode===null)throw Error(r(162));x=n.stateNode,b=n.memoizedProps;try{x.nodeValue=b}catch(_t){Ce(n,n.return,_t)}}break;case 3:if(dn(a,n),En(n),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Wa(a.containerInfo)}catch(_t){Ce(n,n.return,_t)}break;case 4:dn(a,n),En(n);break;case 13:dn(a,n),En(n),x=n.child,x.flags&8192&&(b=x.memoizedState!==null,x.stateNode.isHidden=b,!b||x.alternate!==null&&x.alternate.memoizedState!==null||(Ld=qt())),p&4&&w0(n);break;case 22:if(at=u!==null&&u.memoizedState!==null,n.mode&1?(Ze=(X=Ze)||at,dn(a,n),Ze=X):dn(a,n),En(n),p&8192){if(X=n.memoizedState!==null,(n.stateNode.isHidden=X)&&!at&&(n.mode&1)!==0)for(xt=n,at=n.child;at!==null;){for(ot=xt=at;xt!==null;){switch(st=xt,mt=st.child,st.tag){case 0:case 11:case 14:case 15:uo(4,st,st.return);break;case 1:Xs(st,st.return);var vt=st.stateNode;if(typeof vt.componentWillUnmount=="function"){p=st,u=st.return;try{a=p,vt.props=a.memoizedProps,vt.state=a.memoizedState,vt.componentWillUnmount()}catch(_t){Ce(p,u,_t)}}break;case 5:Xs(st,st.return);break;case 22:if(st.memoizedState!==null){T0(ot);continue}}mt!==null?(mt.return=st,xt=mt):T0(ot)}at=at.sibling}t:for(at=null,ot=n;;){if(ot.tag===5){if(at===null){at=ot;try{x=ot.stateNode,X?(b=x.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):($=ot.stateNode,I=ot.memoizedProps.style,L=I!=null&&I.hasOwnProperty("display")?I.display:null,$.style.display=wn("display",L))}catch(_t){Ce(n,n.return,_t)}}}else if(ot.tag===6){if(at===null)try{ot.stateNode.nodeValue=X?"":ot.memoizedProps}catch(_t){Ce(n,n.return,_t)}}else if((ot.tag!==22&&ot.tag!==23||ot.memoizedState===null||ot===n)&&ot.child!==null){ot.child.return=ot,ot=ot.child;continue}if(ot===n)break t;for(;ot.sibling===null;){if(ot.return===null||ot.return===n)break t;at===ot&&(at=null),ot=ot.return}at===ot&&(at=null),ot.sibling.return=ot.return,ot=ot.sibling}}break;case 19:dn(a,n),En(n),p&4&&w0(n);break;case 21:break;default:dn(a,n),En(n)}}function En(n){var a=n.flags;if(a&2){try{t:{for(var u=n.return;u!==null;){if(v0(u)){var p=u;break t}u=u.return}throw Error(r(160))}switch(p.tag){case 5:var x=p.stateNode;p.flags&32&&(Ne(x,""),p.flags&=-33);var b=b0(n);Sd(n,b,x);break;case 3:case 4:var L=p.stateNode.containerInfo,$=b0(n);kd(n,$,L);break;default:throw Error(r(161))}}catch(I){Ce(n,n.return,I)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function _S(n,a,u){xt=n,S0(n)}function S0(n,a,u){for(var p=(n.mode&1)!==0;xt!==null;){var x=xt,b=x.child;if(x.tag===22&&p){var L=x.memoizedState!==null||nc;if(!L){var $=x.alternate,I=$!==null&&$.memoizedState!==null||Ze;$=nc;var X=Ze;if(nc=L,(Ze=I)&&!X)for(xt=x;xt!==null;)L=xt,I=L.child,L.tag===22&&L.memoizedState!==null?L0(x):I!==null?(I.return=L,xt=I):L0(x);for(;b!==null;)xt=b,S0(b),b=b.sibling;xt=x,nc=$,Ze=X}_0(n)}else(x.subtreeFlags&8772)!==0&&b!==null?(b.return=x,xt=b):_0(n)}}function _0(n){for(;xt!==null;){var a=xt;if((a.flags&8772)!==0){var u=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Ze||ic(5,a);break;case 1:var p=a.stateNode;if(a.flags&4&&!Ze)if(u===null)p.componentDidMount();else{var x=a.elementType===a.type?u.memoizedProps:un(a.type,u.memoizedProps);p.componentDidUpdate(x,u.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var b=a.updateQueue;b!==null&&Tm(a,b,p);break;case 3:var L=a.updateQueue;if(L!==null){if(u=null,a.child!==null)switch(a.child.tag){case 5:u=a.child.stateNode;break;case 1:u=a.child.stateNode}Tm(a,L,u)}break;case 5:var $=a.stateNode;if(u===null&&a.flags&4){u=$;var I=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&u.focus();break;case"img":I.src&&(u.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var X=a.alternate;if(X!==null){var at=X.memoizedState;if(at!==null){var ot=at.dehydrated;ot!==null&&Wa(ot)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ze||a.flags&512&&wd(a)}catch(st){Ce(a,a.return,st)}}if(a===n){xt=null;break}if(u=a.sibling,u!==null){u.return=a.return,xt=u;break}xt=a.return}}function T0(n){for(;xt!==null;){var a=xt;if(a===n){xt=null;break}var u=a.sibling;if(u!==null){u.return=a.return,xt=u;break}xt=a.return}}function L0(n){for(;xt!==null;){var a=xt;try{switch(a.tag){case 0:case 11:case 15:var u=a.return;try{ic(4,a)}catch(I){Ce(a,u,I)}break;case 1:var p=a.stateNode;if(typeof p.componentDidMount=="function"){var x=a.return;try{p.componentDidMount()}catch(I){Ce(a,x,I)}}var b=a.return;try{wd(a)}catch(I){Ce(a,b,I)}break;case 5:var L=a.return;try{wd(a)}catch(I){Ce(a,L,I)}}}catch(I){Ce(a,a.return,I)}if(a===n){xt=null;break}var $=a.sibling;if($!==null){$.return=a.return,xt=$;break}xt=a.return}}var TS=Math.ceil,sc=B.ReactCurrentDispatcher,_d=B.ReactCurrentOwner,Vr=B.ReactCurrentBatchConfig,Qt=0,Pe=null,Le=null,He=0,Fr=0,Qs=xi(0),Be=0,ho=null,es=0,ac=0,Td=0,fo=null,wr=null,Ld=0,Ks=1/0,Qn=null,oc=!1,Ed=null,Si=null,lc=!1,_i=null,cc=0,po=0,Md=null,uc=-1,hc=0;function ur(){return(Qt&6)!==0?qt():uc!==-1?uc:uc=qt()}function Ti(n){return(n.mode&1)===0?1:(Qt&2)!==0&&He!==0?He&-He:cS.transition!==null?(hc===0&&(hc=bg()),hc):(n=ie,n!==0||(n=window.event,n=n===void 0?16:Mg(n.type)),n)}function fn(n,a,u,p){if(50<po)throw po=0,Md=null,Error(r(185));Pa(n,u,p),((Qt&2)===0||n!==Pe)&&(n===Pe&&((Qt&2)===0&&(ac|=u),Be===4&&Li(n,He)),kr(n,p),u===1&&Qt===0&&(a.mode&1)===0&&(Ks=qt()+500,zl&&bi()))}function kr(n,a){var u=n.callbackNode;ck(n,a);var p=bl(n,n===Pe?He:0);if(p===0)u!==null&<(u),n.callbackNode=null,n.callbackPriority=0;else if(a=p&-p,n.callbackPriority!==a){if(u!=null&<(u),a===1)n.tag===0?lS(M0.bind(null,n)):pm(M0.bind(null,n)),iS(function(){(Qt&6)===0&&bi()}),u=null;else{switch(Cg(p)){case 1:u=De;break;case 4:u=Wr;break;case 16:u=an;break;case 536870912:u=Te;break;default:u=an}u=P0(u,E0.bind(null,n))}n.callbackPriority=a,n.callbackNode=u}}function E0(n,a){if(uc=-1,hc=0,(Qt&6)!==0)throw Error(r(327));var u=n.callbackNode;if(Zs()&&n.callbackNode!==u)return null;var p=bl(n,n===Pe?He:0);if(p===0)return null;if((p&30)!==0||(p&n.expiredLanes)!==0||a)a=dc(n,p);else{a=p;var x=Qt;Qt|=2;var b=A0();(Pe!==n||He!==a)&&(Qn=null,Ks=qt()+500,ns(n,a));do try{MS();break}catch($){B0(n,$)}while(!0);Vh(),sc.current=b,Qt=x,Le!==null?a=0:(Pe=null,He=0,a=Be)}if(a!==0){if(a===2&&(x=ch(n),x!==0&&(p=x,a=Bd(n,x))),a===1)throw u=ho,ns(n,0),Li(n,p),kr(n,qt()),u;if(a===6)Li(n,p);else{if(x=n.current.alternate,(p&30)===0&&!LS(x)&&(a=dc(n,p),a===2&&(b=ch(n),b!==0&&(p=b,a=Bd(n,b))),a===1))throw u=ho,ns(n,0),Li(n,p),kr(n,qt()),u;switch(n.finishedWork=x,n.finishedLanes=p,a){case 0:case 1:throw Error(r(345));case 2:is(n,wr,Qn);break;case 3:if(Li(n,p),(p&130023424)===p&&(a=Ld+500-qt(),10<a)){if(bl(n,0)!==0)break;if(x=n.suspendedLanes,(x&p)!==p){ur(),n.pingedLanes|=n.suspendedLanes&x;break}n.timeoutHandle=Ih(is.bind(null,n,wr,Qn),a);break}is(n,wr,Qn);break;case 4:if(Li(n,p),(p&4194240)===p)break;for(a=n.eventTimes,x=-1;0<p;){var L=31-on(p);b=1<<L,L=a[L],L>x&&(x=L),p&=~b}if(p=x,p=qt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*TS(p/1960))-p,10<p){n.timeoutHandle=Ih(is.bind(null,n,wr,Qn),p);break}is(n,wr,Qn);break;case 5:is(n,wr,Qn);break;default:throw Error(r(329))}}}return kr(n,qt()),n.callbackNode===u?E0.bind(null,n):null}function Bd(n,a){var u=fo;return n.current.memoizedState.isDehydrated&&(ns(n,a).flags|=256),n=dc(n,a),n!==2&&(a=wr,wr=u,a!==null&&Ad(a)),n}function Ad(n){wr===null?wr=n:wr.push.apply(wr,n)}function LS(n){for(var a=n;;){if(a.flags&16384){var u=a.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var p=0;p<u.length;p++){var x=u[p],b=x.getSnapshot;x=x.value;try{if(!ln(b(),x))return!1}catch{return!1}}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Li(n,a){for(a&=~Td,a&=~ac,n.suspendedLanes|=a,n.pingedLanes&=~a,n=n.expirationTimes;0<a;){var u=31-on(a),p=1<<u;n[u]=-1,a&=~p}}function M0(n){if((Qt&6)!==0)throw Error(r(327));Zs();var a=bl(n,0);if((a&1)===0)return kr(n,qt()),null;var u=dc(n,a);if(n.tag!==0&&u===2){var p=ch(n);p!==0&&(a=p,u=Bd(n,p))}if(u===1)throw u=ho,ns(n,0),Li(n,a),kr(n,qt()),u;if(u===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=a,is(n,wr,Qn),kr(n,qt()),null}function Rd(n,a){var u=Qt;Qt|=1;try{return n(a)}finally{Qt=u,Qt===0&&(Ks=qt()+500,zl&&bi())}}function rs(n){_i!==null&&_i.tag===0&&(Qt&6)===0&&Zs();var a=Qt;Qt|=1;var u=Vr.transition,p=ie;try{if(Vr.transition=null,ie=1,n)return n()}finally{ie=p,Vr.transition=u,Qt=a,(Qt&6)===0&&bi()}}function $d(){Fr=Qs.current,he(Qs)}function ns(n,a){n.finishedWork=null,n.finishedLanes=0;var u=n.timeoutHandle;if(u!==-1&&(n.timeoutHandle=-1,nS(u)),Le!==null)for(u=Le.return;u!==null;){var p=u;switch(Wh(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Pl();break;case 3:Vs(),he(vr),he(Xe),ed();break;case 5:Jh(p);break;case 4:Vs();break;case 13:he(me);break;case 19:he(me);break;case 10:Gh(p.type._context);break;case 22:case 23:$d()}u=u.return}if(Pe=n,Le=n=Ei(n.current,null),He=Fr=a,Be=0,ho=null,Td=ac=es=0,wr=fo=null,Zi!==null){for(a=0;a<Zi.length;a++)if(u=Zi[a],p=u.interleaved,p!==null){u.interleaved=null;var x=p.next,b=u.pending;if(b!==null){var L=b.next;b.next=x,p.next=L}u.pending=p}Zi=null}return n}function B0(n,a){do{var u=Le;try{if(Vh(),Xl.current=Jl,Ql){for(var p=ye.memoizedState;p!==null;){var x=p.queue;x!==null&&(x.pending=null),p=p.next}Ql=!1}if(ts=0,Ie=Me=ye=null,so=!1,ao=0,_d.current=null,u===null||u.return===null){Be=1,ho=a,Le=null;break}t:{var b=n,L=u.return,$=u,I=a;if(a=He,$.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var X=I,at=$,ot=at.tag;if((at.mode&1)===0&&(ot===0||ot===11||ot===15)){var st=at.alternate;st?(at.updateQueue=st.updateQueue,at.memoizedState=st.memoizedState,at.lanes=st.lanes):(at.updateQueue=null,at.memoizedState=null)}var mt=e0(L);if(mt!==null){mt.flags&=-257,r0(mt,L,$,b,a),mt.mode&1&&t0(b,X,a),a=mt,I=X;var vt=a.updateQueue;if(vt===null){var _t=new Set;_t.add(I),a.updateQueue=_t}else vt.add(I);break t}else{if((a&1)===0){t0(b,X,a),Fd();break t}I=Error(r(426))}}else if(fe&&$.mode&1){var ke=e0(L);if(ke!==null){(ke.flags&65536)===0&&(ke.flags|=256),r0(ke,L,$,b,a),Uh(Gs(I,$));break t}}b=I=Gs(I,$),Be!==4&&(Be=2),fo===null?fo=[b]:fo.push(b),b=L;do{switch(b.tag){case 3:b.flags|=65536,a&=-a,b.lanes|=a;var U=Zm(b,I,a);_m(b,U);break t;case 1:$=I;var z=b.type,G=b.stateNode;if((b.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(Si===null||!Si.has(G)))){b.flags|=65536,a&=-a,b.lanes|=a;var ct=Jm(b,$,a);_m(b,ct);break t}}b=b.return}while(b!==null)}$0(u)}catch(Mt){a=Mt,Le===u&&u!==null&&(Le=u=u.return);continue}break}while(!0)}function A0(){var n=sc.current;return sc.current=Jl,n===null?Jl:n}function Fd(){(Be===0||Be===3||Be===2)&&(Be=4),Pe===null||(es&268435455)===0&&(ac&268435455)===0||Li(Pe,He)}function dc(n,a){var u=Qt;Qt|=2;var p=A0();(Pe!==n||He!==a)&&(Qn=null,ns(n,a));do try{ES();break}catch(x){B0(n,x)}while(!0);if(Vh(),Qt=u,sc.current=p,Le!==null)throw Error(r(261));return Pe=null,He=0,Be}function ES(){for(;Le!==null;)R0(Le)}function MS(){for(;Le!==null&&!wt();)R0(Le)}function R0(n){var a=I0(n.alternate,n,Fr);n.memoizedProps=n.pendingProps,a===null?$0(n):Le=a,_d.current=null}function $0(n){var a=n;do{var u=a.alternate;if(n=a.return,(a.flags&32768)===0){if(u=CS(u,a,Fr),u!==null){Le=u;return}}else{if(u=wS(u,a),u!==null){u.flags&=32767,Le=u;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{Be=6,Le=null;return}}if(a=a.sibling,a!==null){Le=a;return}Le=a=n}while(a!==null);Be===0&&(Be=5)}function is(n,a,u){var p=ie,x=Vr.transition;try{Vr.transition=null,ie=1,BS(n,a,u,p)}finally{Vr.transition=x,ie=p}return null}function BS(n,a,u,p){do Zs();while(_i!==null);if((Qt&6)!==0)throw Error(r(327));u=n.finishedWork;var x=n.finishedLanes;if(u===null)return null;if(n.finishedWork=null,n.finishedLanes=0,u===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var b=u.lanes|u.childLanes;if(uk(n,b),n===Pe&&(Le=Pe=null,He=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||lc||(lc=!0,P0(an,function(){return Zs(),null})),b=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||b){b=Vr.transition,Vr.transition=null;var L=ie;ie=1;var $=Qt;Qt|=4,_d.current=null,SS(n,u),k0(u,n),Qk(Fh),kl=!!$h,Fh=$h=null,n.current=u,_S(u),oe(),Qt=$,ie=L,Vr.transition=b}else n.current=u;if(lc&&(lc=!1,_i=n,cc=x),b=n.pendingLanes,b===0&&(Si=null),ik(u.stateNode),kr(n,qt()),a!==null)for(p=n.onRecoverableError,u=0;u<a.length;u++)x=a[u],p(x.value,{componentStack:x.stack,digest:x.digest});if(oc)throw oc=!1,n=Ed,Ed=null,n;return(cc&1)!==0&&n.tag!==0&&Zs(),b=n.pendingLanes,(b&1)!==0?n===Md?po++:(po=0,Md=n):po=0,bi(),null}function Zs(){if(_i!==null){var n=Cg(cc),a=Vr.transition,u=ie;try{if(Vr.transition=null,ie=16>n?16:n,_i===null)var p=!1;else{if(n=_i,_i=null,cc=0,(Qt&6)!==0)throw Error(r(331));var x=Qt;for(Qt|=4,xt=n.current;xt!==null;){var b=xt,L=b.child;if((xt.flags&16)!==0){var $=b.deletions;if($!==null){for(var I=0;I<$.length;I++){var X=$[I];for(xt=X;xt!==null;){var at=xt;switch(at.tag){case 0:case 11:case 15:uo(8,at,b)}var ot=at.child;if(ot!==null)ot.return=at,xt=ot;else for(;xt!==null;){at=xt;var st=at.sibling,mt=at.return;if(x0(at),at===X){xt=null;break}if(st!==null){st.return=mt,xt=st;break}xt=mt}}}var vt=b.alternate;if(vt!==null){var _t=vt.child;if(_t!==null){vt.child=null;do{var ke=_t.sibling;_t.sibling=null,_t=ke}while(_t!==null)}}xt=b}}if((b.subtreeFlags&2064)!==0&&L!==null)L.return=b,xt=L;else t:for(;xt!==null;){if(b=xt,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:uo(9,b,b.return)}var U=b.sibling;if(U!==null){U.return=b.return,xt=U;break t}xt=b.return}}var z=n.current;for(xt=z;xt!==null;){L=xt;var G=L.child;if((L.subtreeFlags&2064)!==0&&G!==null)G.return=L,xt=G;else t:for(L=z;xt!==null;){if($=xt,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:ic(9,$)}}catch(Mt){Ce($,$.return,Mt)}if($===L){xt=null;break t}var ct=$.sibling;if(ct!==null){ct.return=$.return,xt=ct;break t}xt=$.return}}if(Qt=x,bi(),Br&&typeof Br.onPostCommitFiberRoot=="function")try{Br.onPostCommitFiberRoot(Vi,n)}catch{}p=!0}return p}finally{ie=u,Vr.transition=a}}return!1}function F0(n,a,u){a=Gs(u,a),a=Zm(n,a,1),n=wi(n,a,1),a=ur(),n!==null&&(Pa(n,1,a),kr(n,a))}function Ce(n,a,u){if(n.tag===3)F0(n,n,u);else for(;a!==null;){if(a.tag===3){F0(a,n,u);break}else if(a.tag===1){var p=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Si===null||!Si.has(p))){n=Gs(u,n),n=Jm(a,n,1),a=wi(a,n,1),n=ur(),a!==null&&(Pa(a,1,n),kr(a,n));break}}a=a.return}}function AS(n,a,u){var p=n.pingCache;p!==null&&p.delete(a),a=ur(),n.pingedLanes|=n.suspendedLanes&u,Pe===n&&(He&u)===u&&(Be===4||Be===3&&(He&130023424)===He&&500>qt()-Ld?ns(n,0):Td|=u),kr(n,a)}function D0(n,a){a===0&&((n.mode&1)===0?a=1:(a=vl,vl<<=1,(vl&130023424)===0&&(vl=4194304)));var u=ur();n=Vn(n,a),n!==null&&(Pa(n,a,u),kr(n,u))}function RS(n){var a=n.memoizedState,u=0;a!==null&&(u=a.retryLane),D0(n,u)}function $S(n,a){var u=0;switch(n.tag){case 13:var p=n.stateNode,x=n.memoizedState;x!==null&&(u=x.retryLane);break;case 19:p=n.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(a),D0(n,u)}var I0;I0=function(n,a,u){if(n!==null)if(n.memoizedProps!==a.pendingProps||vr.current)Cr=!0;else{if((n.lanes&u)===0&&(a.flags&128)===0)return Cr=!1,bS(n,a,u);Cr=(n.flags&131072)!==0}else Cr=!1,fe&&(a.flags&1048576)!==0&&gm(a,jl,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;rc(n,a),n=a.pendingProps;var x=Ns(a,Xe.current);Ys(a,u),x=id(null,a,p,n,x,u);var b=sd();return a.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,br(p)?(b=!0,Ol(a)):b=!1,a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Kh(a),x.updater=tc,a.stateNode=x,x._reactInternals=a,hd(a,p,n,u),a=gd(null,a,p,!0,b,u)):(a.tag=0,fe&&b&&jh(a),cr(null,a,x,u),a=a.child),a;case 16:p=a.elementType;t:{switch(rc(n,a),n=a.pendingProps,x=p._init,p=x(p._payload),a.type=p,x=a.tag=DS(p),n=un(p,n),x){case 0:a=pd(null,a,p,n,u);break t;case 1:a=l0(null,a,p,n,u);break t;case 11:a=n0(null,a,p,n,u);break t;case 14:a=i0(null,a,p,un(p.type,n),u);break t}throw Error(r(306,p,""))}return a;case 0:return p=a.type,x=a.pendingProps,x=a.elementType===p?x:un(p,x),pd(n,a,p,x,u);case 1:return p=a.type,x=a.pendingProps,x=a.elementType===p?x:un(p,x),l0(n,a,p,x,u);case 3:t:{if(c0(a),n===null)throw Error(r(387));p=a.pendingProps,b=a.memoizedState,x=b.element,Sm(n,a),Vl(a,p,null,u);var L=a.memoizedState;if(p=L.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){x=Gs(Error(r(423)),a),a=u0(n,a,p,u,x);break t}else if(p!==x){x=Gs(Error(r(424)),a),a=u0(n,a,p,u,x);break t}else for($r=yi(a.stateNode.containerInfo.firstChild),Rr=a,fe=!0,cn=null,u=wm(a,null,p,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Hs(),p===x){a=Xn(n,a,u);break t}cr(n,a,p,u)}a=a.child}return a;case 5:return Lm(a),n===null&&qh(a),p=a.type,x=a.pendingProps,b=n!==null?n.memoizedProps:null,L=x.children,Dh(p,x)?L=null:b!==null&&Dh(p,b)&&(a.flags|=32),o0(n,a),cr(n,a,L,u),a.child;case 6:return n===null&&qh(a),null;case 13:return h0(n,a,u);case 4:return Zh(a,a.stateNode.containerInfo),p=a.pendingProps,n===null?a.child=qs(a,null,p,u):cr(n,a,p,u),a.child;case 11:return p=a.type,x=a.pendingProps,x=a.elementType===p?x:un(p,x),n0(n,a,p,x,u);case 7:return cr(n,a,a.pendingProps,u),a.child;case 8:return cr(n,a,a.pendingProps.children,u),a.child;case 12:return cr(n,a,a.pendingProps.children,u),a.child;case 10:t:{if(p=a.type._context,x=a.pendingProps,b=a.memoizedProps,L=x.value,le(ql,p._currentValue),p._currentValue=L,b!==null)if(ln(b.value,L)){if(b.children===x.children&&!vr.current){a=Xn(n,a,u);break t}}else for(b=a.child,b!==null&&(b.return=a);b!==null;){var $=b.dependencies;if($!==null){L=b.child;for(var I=$.firstContext;I!==null;){if(I.context===p){if(b.tag===1){I=Gn(-1,u&-u),I.tag=2;var X=b.updateQueue;if(X!==null){X=X.shared;var at=X.pending;at===null?I.next=I:(I.next=at.next,at.next=I),X.pending=I}}b.lanes|=u,I=b.alternate,I!==null&&(I.lanes|=u),Xh(b.return,u,a),$.lanes|=u;break}I=I.next}}else if(b.tag===10)L=b.type===a.type?null:b.child;else if(b.tag===18){if(L=b.return,L===null)throw Error(r(341));L.lanes|=u,$=L.alternate,$!==null&&($.lanes|=u),Xh(L,u,a),L=b.sibling}else L=b.child;if(L!==null)L.return=b;else for(L=b;L!==null;){if(L===a){L=null;break}if(b=L.sibling,b!==null){b.return=L.return,L=b;break}L=L.return}b=L}cr(n,a,x.children,u),a=a.child}return a;case 9:return x=a.type,p=a.pendingProps.children,Ys(a,u),x=Ur(x),p=p(x),a.flags|=1,cr(n,a,p,u),a.child;case 14:return p=a.type,x=un(p,a.pendingProps),x=un(p.type,x),i0(n,a,p,x,u);case 15:return s0(n,a,a.type,a.pendingProps,u);case 17:return p=a.type,x=a.pendingProps,x=a.elementType===p?x:un(p,x),rc(n,a),a.tag=1,br(p)?(n=!0,Ol(a)):n=!1,Ys(a,u),Qm(a,p,x),hd(a,p,x,u),gd(null,a,p,!0,n,u);case 19:return f0(n,a,u);case 22:return a0(n,a,u)}throw Error(r(156,a.tag))};function P0(n,a){return P(n,a)}function FS(n,a,u,p){this.tag=n,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(n,a,u,p){return new FS(n,a,u,p)}function Dd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function DS(n){if(typeof n=="function")return Dd(n)?1:0;if(n!=null){if(n=n.$$typeof,n===nt)return 11;if(n===W)return 14}return 2}function Ei(n,a){var u=n.alternate;return u===null?(u=Gr(n.tag,a,n.key,n.mode),u.elementType=n.elementType,u.type=n.type,u.stateNode=n.stateNode,u.alternate=n,n.alternate=u):(u.pendingProps=a,u.type=n.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=n.flags&14680064,u.childLanes=n.childLanes,u.lanes=n.lanes,u.child=n.child,u.memoizedProps=n.memoizedProps,u.memoizedState=n.memoizedState,u.updateQueue=n.updateQueue,a=n.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=n.sibling,u.index=n.index,u.ref=n.ref,u}function fc(n,a,u,p,x,b){var L=2;if(p=n,typeof n=="function")Dd(n)&&(L=1);else if(typeof n=="string")L=5;else t:switch(n){case R:return ss(u.children,x,b,a);case O:L=8,x|=8;break;case tt:return n=Gr(12,u,a,x|2),n.elementType=tt,n.lanes=b,n;case J:return n=Gr(13,u,a,x),n.elementType=J,n.lanes=b,n;case Y:return n=Gr(19,u,a,x),n.elementType=Y,n.lanes=b,n;case q:return pc(u,x,b,a);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case et:L=10;break t;case V:L=9;break t;case nt:L=11;break t;case W:L=14;break t;case N:L=16,p=null;break t}throw Error(r(130,n==null?n:typeof n,""))}return a=Gr(L,u,a,x),a.elementType=n,a.type=p,a.lanes=b,a}function ss(n,a,u,p){return n=Gr(7,n,p,a),n.lanes=u,n}function pc(n,a,u,p){return n=Gr(22,n,p,a),n.elementType=q,n.lanes=u,n.stateNode={isHidden:!1},n}function Id(n,a,u){return n=Gr(6,n,null,a),n.lanes=u,n}function Pd(n,a,u){return a=Gr(4,n.children!==null?n.children:[],n.key,a),a.lanes=u,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}function IS(n,a,u,p,x){this.tag=a,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uh(0),this.expirationTimes=uh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uh(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Od(n,a,u,p,x,b,L,$,I){return n=new IS(n,a,u,$,I),a===1?(a=1,b===!0&&(a|=8)):a=0,b=Gr(3,null,null,a),n.current=b,b.stateNode=n,b.memoizedState={element:p,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kh(b),n}function PS(n,a,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:p==null?null:""+p,children:n,containerInfo:a,implementation:u}}function O0(n){if(!n)return vi;n=n._reactInternals;t:{if(Sn(n)!==n||n.tag!==1)throw Error(r(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(br(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(r(171))}if(n.tag===1){var u=n.type;if(br(u))return dm(n,u,a)}return a}function z0(n,a,u,p,x,b,L,$,I){return n=Od(u,p,!0,n,x,b,L,$,I),n.context=O0(null),u=n.current,p=ur(),x=Ti(u),b=Gn(p,x),b.callback=a??null,wi(u,b,x),n.current.lanes=x,Pa(n,x,p),kr(n,p),n}function gc(n,a,u,p){var x=a.current,b=ur(),L=Ti(x);return u=O0(u),a.context===null?a.context=u:a.pendingContext=u,a=Gn(b,L),a.payload={element:n},p=p===void 0?null:p,p!==null&&(a.callback=p),n=wi(x,a,L),n!==null&&(fn(n,x,L,b),Yl(n,x,L)),L}function mc(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function N0(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var u=n.retryLane;n.retryLane=u!==0&&u<a?u:a}}function zd(n,a){N0(n,a),(n=n.alternate)&&N0(n,a)}function OS(){return null}var j0=typeof reportError=="function"?reportError:function(n){console.error(n)};function Nd(n){this._internalRoot=n}yc.prototype.render=Nd.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(r(409));gc(n,a,null,null)},yc.prototype.unmount=Nd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;rs(function(){gc(null,n,null,null)}),a[Hn]=null}};function yc(n){this._internalRoot=n}yc.prototype.unstable_scheduleHydration=function(n){if(n){var a=Sg();n={blockedOn:null,target:n,priority:a};for(var u=0;u<pi.length&&a!==0&&a<pi[u].priority;u++);pi.splice(u,0,n),u===0&&Lg(n)}};function jd(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function xc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function W0(){}function zS(n,a,u,p,x){if(x){if(typeof p=="function"){var b=p;p=function(){var X=mc(L);b.call(X)}}var L=z0(a,p,n,0,null,!1,!1,"",W0);return n._reactRootContainer=L,n[Hn]=L.current,Ka(n.nodeType===8?n.parentNode:n),rs(),L}for(;x=n.lastChild;)n.removeChild(x);if(typeof p=="function"){var $=p;p=function(){var X=mc(I);$.call(X)}}var I=Od(n,0,!1,null,null,!1,!1,"",W0);return n._reactRootContainer=I,n[Hn]=I.current,Ka(n.nodeType===8?n.parentNode:n),rs(function(){gc(a,I,u,p)}),I}function vc(n,a,u,p,x){var b=u._reactRootContainer;if(b){var L=b;if(typeof x=="function"){var $=x;x=function(){var I=mc(L);$.call(I)}}gc(a,L,n,x)}else L=zS(u,a,n,x,p);return mc(L)}wg=function(n){switch(n.tag){case 3:var a=n.stateNode;if(a.current.memoizedState.isDehydrated){var u=Ia(a.pendingLanes);u!==0&&(hh(a,u|1),kr(a,qt()),(Qt&6)===0&&(Ks=qt()+500,bi()))}break;case 13:rs(function(){var p=Vn(n,1);if(p!==null){var x=ur();fn(p,n,1,x)}}),zd(n,1)}},dh=function(n){if(n.tag===13){var a=Vn(n,134217728);if(a!==null){var u=ur();fn(a,n,134217728,u)}zd(n,134217728)}},kg=function(n){if(n.tag===13){var a=Ti(n),u=Vn(n,a);if(u!==null){var p=ur();fn(u,n,a,p)}zd(n,a)}},Sg=function(){return ie},_g=function(n,a){var u=ie;try{return ie=n,a()}finally{ie=u}},oi=function(n,a,u){switch(a){case"input":if(ce(n,u),a=u.name,u.type==="radio"&&a!=null){for(u=n;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<u.length;a++){var p=u[a];if(p!==n&&p.form===n.form){var x=Il(p);if(!x)throw Error(r(90));Ve(p),ce(p,x)}}}break;case"textarea":Nn(n,u);break;case"select":a=u.value,a!=null&&xr(n,!!u.multiple,a,!1)}},ve=Rd,jn=rs;var NS={usingClientEntryPoint:!1,Events:[to,Os,Il,fl,pl,Rd]},go={findFiberByHostInstance:Gi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jS={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:B.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=yl(n),n===null?null:n.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||OS,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 bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bc.isDisabled&&bc.supportsFiber)try{Vi=bc.inject(jS),Br=bc}catch{}}return Sr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NS,Sr.createPortal=function(n,a){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jd(a))throw Error(r(200));return PS(n,a,null,u)},Sr.createRoot=function(n,a){if(!jd(n))throw Error(r(299));var u=!1,p="",x=j0;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=Od(n,1,!1,null,null,u,!1,p,x),n[Hn]=a.current,Ka(n.nodeType===8?n.parentNode:n),new Nd(a)},Sr.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=yl(a),n=n===null?null:n.stateNode,n},Sr.flushSync=function(n){return rs(n)},Sr.hydrate=function(n,a,u){if(!xc(a))throw Error(r(200));return vc(null,n,a,!0,u)},Sr.hydrateRoot=function(n,a,u){if(!jd(n))throw Error(r(405));var p=u!=null&&u.hydratedSources||null,x=!1,b="",L=j0;if(u!=null&&(u.unstable_strictMode===!0&&(x=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onRecoverableError!==void 0&&(L=u.onRecoverableError)),a=z0(a,null,n,1,u??null,x,!1,b,L),n[Hn]=a.current,Ka(n),p)for(n=0;n<p.length;n++)u=p[n],x=u._getVersion,x=x(u._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[u,x]:a.mutableSourceEagerHydrationData.push(u,x);return new yc(a)},Sr.render=function(n,a,u){if(!xc(a))throw Error(r(200));return vc(null,n,a,!1,u)},Sr.unmountComponentAtNode=function(n){if(!xc(n))throw Error(r(40));return n._reactRootContainer?(rs(function(){vc(null,null,n,!1,function(){n._reactRootContainer=null,n[Hn]=null})}),!0):!1},Sr.unstable_batchedUpdates=Rd,Sr.unstable_renderSubtreeIntoContainer=function(n,a,u,p){if(!xc(u))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return vc(n,a,u,!1,p)},Sr.version="18.3.1-next-f1338f8080-20240426",Sr}var Q0;function ZS(){if(Q0)return qd.exports;Q0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qd.exports=KS(),qd.exports}var K0;function JS(){if(K0)return Cc;K0=1;var e=ZS();return Cc.createRoot=e.createRoot,Cc.hydrateRoot=e.hydrateRoot,Cc}var t_=JS();const e_=mp(t_),r_="ws://localhost:3456/ws",n_="http://localhost:3456/sse",Z0="http://localhost:3456/api";function i_(e){const[t,r]=j.useState("disconnected"),[i,s]=j.useState(null),[o,c]=j.useState(null),l=j.useRef(null),h=j.useRef(null),d=j.useRef(0),f=j.useRef(null),g=j.useRef(!0),m=j.useRef(e);j.useEffect(()=>{m.current=e},[e]);const y=j.useCallback(()=>{l.current&&(l.current.onopen=null,l.current.onclose=null,l.current.onerror=null,l.current.onmessage=null,(l.current.readyState===WebSocket.OPEN||l.current.readyState===WebSocket.CONNECTING)&&l.current.close(),l.current=null),h.current&&(h.current.close(),h.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),v=j.useCallback(M=>{var R;try{const O=typeof M=="string"?JSON.parse(M):M;O.type==="sys:connect"&&O.source==="bridge"&&((R=O.payload)!=null&&R.clientId)&&c(O.payload.clientId),m.current&&m.current(O)}catch(O){console.warn("[useConnection] Failed to parse message:",O)}},[]),C=j.useCallback(M=>{var O;const R={v:1,type:"sys:connect",payload:{clientType:"canvas",protocolVersion:1,capabilities:["dashboard","canvas","quiz","playground"]},source:"canvas",timestamp:Date.now()};M==="ws"&&((O=l.current)==null?void 0:O.readyState)===WebSocket.OPEN?l.current.send(JSON.stringify(R)):M==="sse"&&fetch(`${Z0}/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}).catch(tt=>{console.warn("[useConnection] Failed to send connect handshake via REST:",tt)})},[]),k=j.useCallback(()=>{if(!g.current)return;const M=Math.min(1e3*Math.pow(2,d.current),3e4);d.current+=1,console.log(`[useConnection] Reconnecting in ${M}ms (attempt ${d.current})`),r("disconnected"),f.current=setTimeout(()=>{g.current&&T()},M)},[]),_=j.useCallback(()=>{if(g.current){console.log("[useConnection] Falling back to SSE"),r("connecting");try{const M=new EventSource(n_);h.current=M,M.onopen=()=>{g.current&&(console.log("[useConnection] SSE connected"),r("connected"),s("sse"),d.current=0,C("sse"))},M.onmessage=R=>{g.current&&v(R.data)},M.onerror=()=>{g.current&&(console.warn("[useConnection] SSE error"),M.close(),h.current=null,s(null),k())}}catch(M){console.warn("[useConnection] SSE failed to connect:",M),s(null),k()}}},[v,C,k]),T=j.useCallback(()=>{if(g.current){y(),r("connecting");try{const M=new WebSocket(r_);l.current=M,M.onopen=()=>{g.current&&(console.log("[useConnection] WebSocket connected"),r("connected"),s("ws"),d.current=0,C("ws"))},M.onmessage=R=>{g.current&&v(R.data)},M.onclose=R=>{g.current&&(console.log("[useConnection] WebSocket closed:",R.code,R.reason),l.current=null,s(null),R.code===1e3||d.current===0?_():k())},M.onerror=()=>{g.current&&(console.warn("[useConnection] WebSocket error — will try SSE"),d.current===0&&(l.current=null,s(null),_()))}}catch(M){console.warn("[useConnection] WebSocket failed:",M),_()}}},[y,v,C,_,k]),E=j.useCallback((M,R)=>{var tt;const O={v:1,type:M,payload:R,source:"canvas",timestamp:Date.now()};i==="ws"&&((tt=l.current)==null?void 0:tt.readyState)===WebSocket.OPEN?l.current.send(JSON.stringify(O)):fetch(`${Z0}/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}).catch(et=>{console.warn("[useConnection] Failed to send event via REST:",et)})},[i]);j.useEffect(()=>(g.current=!0,T(),()=>{g.current=!1,y()}),[]);const B=j.useCallback((M,R)=>{E("chat:send",{text:M,sessionId:R})},[E]),A=j.useCallback(M=>{E("chat:stop",{sessionId:M})},[E]);return{status:t,transport:i,clientId:o,sendEvent:E,sendChatMessage:B,stopChatGeneration:A}}function xp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ss=xp();function zx(e){Ss=e}var Oo={exec:()=>null};function te(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(dr.caret,"$1"),r=r.replace(s,c),i},getRegex:()=>new RegExp(r,t)};return i}var s_=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),dr={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")},a_=/^(?:[ \t]*(?:\n|$))+/,o_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,l_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vp=/(?:[*+-]|\d{1,9}[.)])/,Nx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jx=te(Nx).replace(/bull/g,vp).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(),u_=te(Nx).replace(/bull/g,vp).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(),bp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h_=/^[^\n]+/,Cp=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,d_=te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Cp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),f_=te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vp).getRegex(),Du="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",wp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,p_=te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wp).replace("tag",Du).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wx=te(bp).replace("hr",nl).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",Du).getRegex(),g_=te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wx).getRegex(),kp={blockquote:g_,code:o_,def:d_,fences:l_,heading:c_,hr:nl,html:p_,lheading:jx,list:f_,newline:a_,paragraph:Wx,table:Oo,text:h_},J0=te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",nl).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",Du).getRegex(),m_={...kp,lheading:u_,table:J0,paragraph:te(bp).replace("hr",nl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",J0).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",Du).getRegex()},y_={...kp,html:te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wp).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:Oo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:te(bp).replace("hr",nl).replace("heading",` *#{1,6} *[^
|
|
42
|
-
]`).replace("lheading",jx).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},x_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,v_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hx=/^( {2,}|\\)\n(?!\s*$)/,b_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Iu=/[\p{P}\p{S}]/u,Sp=/[\s\p{P}\p{S}]/u,qx=/[^\s\p{P}\p{S}]/u,C_=te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Sp).getRegex(),Ux=/(?!~)[\p{P}\p{S}]/u,w_=/(?!~)[\s\p{P}\p{S}]/u,k_=/(?:[^\s\p{P}\p{S}]|~)/u,S_=te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",s_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yx=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,__=te(Yx,"u").replace(/punct/g,Iu).getRegex(),T_=te(Yx,"u").replace(/punct/g,Ux).getRegex(),Vx="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",L_=te(Vx,"gu").replace(/notPunctSpace/g,qx).replace(/punctSpace/g,Sp).replace(/punct/g,Iu).getRegex(),E_=te(Vx,"gu").replace(/notPunctSpace/g,k_).replace(/punctSpace/g,w_).replace(/punct/g,Ux).getRegex(),M_=te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,qx).replace(/punctSpace/g,Sp).replace(/punct/g,Iu).getRegex(),B_=te(/\\(punct)/,"gu").replace(/punct/g,Iu).getRegex(),A_=te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),R_=te(wp).replace("(?:-->|$)","-->").getRegex(),$_=te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",R_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,F_=te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gx=te(/^!?\[(label)\]\[(ref)\]/).replace("label",Zc).replace("ref",Cp).getRegex(),Xx=te(/^!?\[(ref)\](?:\[\])?/).replace("ref",Cp).getRegex(),D_=te("reflink|nolink(?!\\()","g").replace("reflink",Gx).replace("nolink",Xx).getRegex(),ty=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_p={_backpedal:Oo,anyPunctuation:B_,autolink:A_,blockSkip:S_,br:Hx,code:v_,del:Oo,emStrongLDelim:__,emStrongRDelimAst:L_,emStrongRDelimUnd:M_,escape:x_,link:F_,nolink:Xx,punctuation:C_,reflink:Gx,reflinkSearch:D_,tag:$_,text:b_,url:Oo},I_={..._p,link:te(/^!?\[(label)\]\((.*?)\)/).replace("label",Zc).getRegex(),reflink:te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zc).getRegex()},yf={..._p,emStrongRDelimAst:E_,emStrongLDelim:T_,url:te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ty).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ty).getRegex()},P_={...yf,br:te(Hx).replace("{2,}","*").getRegex(),text:te(yf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wc={normal:kp,gfm:m_,pedantic:y_},yo={normal:_p,gfm:yf,breaks:P_,pedantic:I_},O_={"&":"&","<":"<",">":">",'"':""","'":"'"},ey=e=>O_[e];function Bn(e,t){if(t){if(dr.escapeTest.test(e))return e.replace(dr.escapeReplace,ey)}else if(dr.escapeTestNoEncode.test(e))return e.replace(dr.escapeReplaceNoEncode,ey);return e}function ry(e){try{e=encodeURI(e).replace(dr.percentDecode,"%")}catch{return null}return e}function ny(e,t){var o;let r=e.replace(dr.findPipe,(c,l,h)=>{let d=!1,f=l;for(;--f>=0&&h[f]==="\\";)d=!d;return d?"|":" |"}),i=r.split(dr.splitPipe),s=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(;s<i.length;s++)i[s]=i[s].trim().replace(dr.slashPipe,"|");return i}function xo(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function z_(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 iy(e,t,r,i,s){let o=t.href,c=t.title||null,l=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,h}function N_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
43
|
-
`).map(o=>{let c=o.match(r.other.beginningSpace);if(c===null)return o;let[l]=c;return l.length>=s.length?o.slice(s.length):o}).join(`
|
|
44
|
-
`)}var Jc=class{constructor(t){se(this,"options");se(this,"rules");se(this,"lexer");this.options=t||Ss}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:xo(i,`
|
|
45
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=N_(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:s}}}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 s=xo(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:xo(r[0],`
|
|
46
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=xo(r[0],`
|
|
47
|
-
`).split(`
|
|
48
|
-
`),s="",o="",c=[];for(;i.length>0;){let l=!1,h=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))h.push(i[d]),l=!0;else if(!l)h.push(i[d]);else break;i=i.slice(d);let f=h.join(`
|
|
49
|
-
`),g=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
50
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
51
|
-
${f}`:f,o=o?`${o}
|
|
52
|
-
${g}`:g;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=m,i.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let v=y,C=v.raw+`
|
|
53
|
-
`+i.join(`
|
|
54
|
-
`),k=this.blockquote(C);c[c.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,o=o.substring(0,o.length-v.text.length)+k.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,C=v.raw+`
|
|
55
|
-
`+i.join(`
|
|
56
|
-
`),k=this.list(C);c[c.length-1]=k,s=s.substring(0,s.length-y.raw.length)+k.raw,o=o.substring(0,o.length-v.raw.length)+k.raw,i=C.substring(c.at(-1).raw.length).split(`
|
|
57
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:c,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let c=this.rules.other.listItemRegex(i),l=!1;for(;t;){let d=!1,f="",g="";if(!(r=c.exec(t))||this.rules.block.hr.test(t))break;f=r[0],t=t.substring(f.length);let m=r[2].split(`
|
|
58
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=t.split(`
|
|
59
|
-
`,1)[0],v=!m.trim(),C=0;if(this.options.pedantic?(C=2,g=m.trimStart()):v?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=m.slice(C),C+=r[1].length),v&&this.rules.other.blankLine.test(y)&&(f+=y+`
|
|
60
|
-
`,t=t.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(C),E=this.rules.other.hrRegex(C),B=this.rules.other.fencesBeginRegex(C),A=this.rules.other.headingBeginRegex(C),M=this.rules.other.htmlBeginRegex(C);for(;t;){let R=t.split(`
|
|
61
|
-
`,1)[0],O;if(y=R,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),O=y):O=y.replace(this.rules.other.tabCharGlobal," "),B.test(y)||A.test(y)||M.test(y)||T.test(y)||E.test(y))break;if(O.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
|
|
62
|
-
`+O.slice(C);else{if(v||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(m)||A.test(m)||E.test(m))break;g+=`
|
|
63
|
-
`+y}!v&&!y.trim()&&(v=!0),f+=R+`
|
|
64
|
-
`,t=t.substring(R.length+1),m=O.slice(C)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0));let k=null,_;this.options.gfm&&(k=this.rules.other.listIsTask.exec(g),k&&(_=k[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!k,checked:_,loose:!1,text:g,tokens:[]}),o.raw+=f}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter(m=>m.type==="space"),g=f.length>0&&f.some(m=>this.rules.other.anyLine.test(m.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].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," "),s=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:s,title:o}}}table(t){var l;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ny(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=r[3])!=null&&l.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
65
|
-
`):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let h of s)this.rules.other.tableAlignRight.test(h)?c.align.push("right"):this.rules.other.tableAlignCenter.test(h)?c.align.push("center"):this.rules.other.tableAlignLeft.test(h)?c.align.push("left"):c.align.push(null);for(let h=0;h<i.length;h++)c.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:c.align[h]});for(let h of o)c.rows.push(ny(h,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}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)===`
|
|
66
|
-
`?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 c=xo(i.slice(0,-1),"\\");if((i.length-c.length)%2===0)return}else{let c=z_(r[2],"()");if(c===-2)return;if(c>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],o=c[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),iy(r,{href:s&&s.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let c=i[0].charAt(0);return{type:"text",raw:c,text:c}}return iy(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,c,l,h=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,r=r.slice(-1*t.length+o);(s=f.exec(r))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(l=[...c].length,s[3]||s[4]){h+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){d+=l;continue}if(h-=l,h>0)continue;l=Math.min(l,l+h+d);let g=[...s[0]][0].length,m=t.slice(0,o+s.index+g+l);if(Math.min(o,l)%2){let v=m.slice(1,-1);return{type:"em",raw:m,text:v,tokens:this.lexer.inlineTokens(v)}}let y=m.slice(2,-2);return{type:"strong",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw: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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,o;if(r[2]==="@")s=r[0],o="mailto:"+s;else{let c;do c=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(c!==r[0]);s=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},gn=class xf{constructor(t){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ss,this.options.tokenizer=this.options.tokenizer||new Jc,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:dr,block:wc.normal,inline:yo.normal};this.options.pedantic?(r.block=wc.pedantic,r.inline=yo.pedantic):this.options.gfm&&(r.block=wc.gfm,this.options.breaks?r.inline=yo.breaks:r.inline=yo.gfm),this.tokenizer.rules=r}static get rules(){return{block:wc,inline:yo}}static lex(t,r){return new xf(r).lex(t)}static lexInline(t,r){return new xf(r).inlineTokens(t)}lex(t){t=t.replace(dr.carriageReturn,`
|
|
67
|
-
`),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 s,o,c;for(this.options.pedantic&&(t=t.replace(dr.tabCharGlobal," ").replace(dr.spaceLine,""));t;){let l;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(d=>(l=d.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let d=r.at(-1);l.raw.length===1&&d!==void 0?d.raw+=`
|
|
68
|
-
`:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
69
|
-
`)?"":`
|
|
70
|
-
`)+l.raw,d.text+=`
|
|
71
|
-
`+l.text,this.inlineQueue.at(-1).src=d.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
72
|
-
`)?"":`
|
|
73
|
-
`)+l.raw,d.text+=`
|
|
74
|
-
`+l.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},r.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let h=t;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,f=t.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(h=t.substring(0,d+1))}if(this.state.top&&(l=this.tokenizer.paragraph(h))){let d=r.at(-1);i&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
75
|
-
`)?"":`
|
|
76
|
-
`)+l.raw,d.text+=`
|
|
77
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l),i=h.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
78
|
-
`)?"":`
|
|
79
|
-
`)+l.raw,d.text+=`
|
|
80
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var h,d,f,g,m;let i=t,s=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)y.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((d=(h=this.options.hooks)==null?void 0:h.emStrongMask)==null?void 0:d.call({lexer:this},i))??i;let c=!1,l="";for(;t;){c||(l=""),c=!1;let y;if((g=(f=this.options.extensions)==null?void 0:f.inline)!=null&&g.some(C=>(y=C.call({lexer:this},t,r))?(t=t.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(y.raw.length);let C=r.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(t,i,l)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(t)){t=t.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(t)){t=t.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(t))){t=t.substring(y.raw.length),r.push(y);continue}let v=t;if((m=this.options.extensions)!=null&&m.startInline){let C=1/0,k=t.slice(1),_;this.options.extensions.startInline.forEach(T=>{_=T.call({lexer:this},k),typeof _=="number"&&_>=0&&(C=Math.min(C,_))}),C<1/0&&C>=0&&(v=t.substring(0,C+1))}if(y=this.tokenizer.inlineText(v)){t=t.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(l=y.raw.slice(-1)),c=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);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 r}},tu=class{constructor(t){se(this,"options");se(this,"parser");this.options=t||Ss}space(t){return""}code({text:t,lang:r,escaped:i}){var c;let s=(c=(r||"").match(dr.notSpaceStart))==null?void 0:c[0],o=t.replace(dr.endingNewline,"")+`
|
|
81
|
-
`;return s?'<pre><code class="language-'+Bn(s)+'">'+(i?o:Bn(o,!0))+`</code></pre>
|
|
82
|
-
`:"<pre><code>"+(i?o:Bn(o,!0))+`</code></pre>
|
|
83
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
84
|
-
${this.parser.parse(t)}</blockquote>
|
|
85
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
86
|
-
`}hr(t){return`<hr>
|
|
87
|
-
`}list(t){let r=t.ordered,i=t.start,s="";for(let l=0;l<t.items.length;l++){let h=t.items[l];s+=this.listitem(h)}let o=r?"ol":"ul",c=r&&i!==1?' start="'+i+'"':"";return"<"+o+c+`>
|
|
88
|
-
`+s+"</"+o+`>
|
|
89
|
-
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+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=s+" "+Bn(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
90
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
91
|
-
`}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 s="";for(let o=0;o<t.rows.length;o++){let c=t.rows[o];i="";for(let l=0;l<c.length;l++)i+=this.tablecell(c[l]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
92
|
-
<thead>
|
|
93
|
-
`+r+`</thead>
|
|
94
|
-
`+s+`</table>
|
|
95
|
-
`}tablerow({text:t}){return`<tr>
|
|
96
|
-
${t}</tr>
|
|
97
|
-
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
98
|
-
`}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>${Bn(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 s=this.parser.parseInline(i),o=ry(t);if(o===null)return s;t=o;let c='<a href="'+t+'"';return r&&(c+=' title="'+Bn(r)+'"'),c+=">"+s+"</a>",c}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=ry(t);if(o===null)return Bn(i);t=o;let c=`<img src="${t}" alt="${i}"`;return r&&(c+=` title="${Bn(r)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Bn(t.text)}},Tp=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""}},mn=class vf{constructor(t){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=t||Ss,this.options.renderer=this.options.renderer||new tu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Tp}static parse(t,r){return new vf(r).parse(t)}static parseInline(t,r){return new vf(r).parseInline(t)}parse(t,r=!0){var s,o;let i="";for(let c=0;c<t.length;c++){let l=t[c];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[l.type]){let d=l,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){i+=f||"";continue}}let h=l;switch(h.type){case"space":{i+=this.renderer.space(h);continue}case"hr":{i+=this.renderer.hr(h);continue}case"heading":{i+=this.renderer.heading(h);continue}case"code":{i+=this.renderer.code(h);continue}case"table":{i+=this.renderer.table(h);continue}case"blockquote":{i+=this.renderer.blockquote(h);continue}case"list":{i+=this.renderer.list(h);continue}case"html":{i+=this.renderer.html(h);continue}case"def":{i+=this.renderer.def(h);continue}case"paragraph":{i+=this.renderer.paragraph(h);continue}case"text":{let d=h,f=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],f+=`
|
|
99
|
-
`+this.renderer.text(d);r?i+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):i+=f;continue}default:{let d='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}parseInline(t,r=this.renderer){var s,o;let i="";for(let c=0;c<t.length;c++){let l=t[c];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[l.type]){let d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){i+=d||"";continue}}let h=l;switch(h.type){case"escape":{i+=r.text(h);break}case"html":{i+=r.html(h);break}case"link":{i+=r.link(h);break}case"image":{i+=r.image(h);break}case"strong":{i+=r.strong(h);break}case"em":{i+=r.em(h);break}case"codespan":{i+=r.codespan(h);break}case"br":{i+=r.br(h);break}case"del":{i+=r.del(h);break}case"text":{i+=r.text(h);break}default:{let d='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}},Dc,Mo=(Dc=class{constructor(t){se(this,"options");se(this,"block");this.options=t||Ss}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?gn.lex:gn.lexInline}provideParser(){return this.block?mn.parse:mn.parseInline}},se(Dc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),se(Dc,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Dc),j_=class{constructor(...t){se(this,"defaults",xp());se(this,"options",this.setOptions);se(this,"parse",this.parseMarkdown(!0));se(this,"parseInline",this.parseMarkdown(!1));se(this,"Parser",mn);se(this,"Renderer",tu);se(this,"TextRenderer",Tp);se(this,"Lexer",gn);se(this,"Tokenizer",Jc);se(this,"Hooks",Mo);this.use(...t)}walkTokens(t,r){var s,o;let i=[];for(let c of t)switch(i=i.concat(r.call(this,c)),c.type){case"table":{let l=c;for(let h of l.header)i=i.concat(this.walkTokens(h.tokens,r));for(let h of l.rows)for(let d of h)i=i.concat(this.walkTokens(d.tokens,r));break}case"list":{let l=c;i=i.concat(this.walkTokens(l.items,r));break}default:{let l=c;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(h=>{let d=l[h].flat(1/0);i=i.concat(this.walkTokens(d,r))}):l.tokens&&(i=i.concat(this.walkTokens(l.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=r.renderers[o.name];c?r.renderers[o.name]=function(...l){let h=o.renderer.apply(this,l);return h===!1&&(h=c.apply(this,l)),h}: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 c=r[o.level];c?c.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)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new tu(this.defaults);for(let c in i.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let l=c,h=i.renderer[l],d=o[l];o[l]=(...f)=>{let g=h.apply(o,f);return g===!1&&(g=d.apply(o,f)),g||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Jc(this.defaults);for(let c in i.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let l=c,h=i.tokenizer[l],d=o[l];o[l]=(...f)=>{let g=h.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Mo;for(let c in i.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let l=c,h=i.hooks[l],d=o[l];Mo.passThroughHooks.has(c)?o[l]=f=>{if(this.defaults.async&&Mo.passThroughHooksRespectAsync.has(c))return(async()=>{let m=await h.call(o,f);return d.call(o,m)})();let g=h.call(o,f);return d.call(o,g)}:o[l]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await h.apply(o,f);return m===!1&&(m=await d.apply(o,f)),m})();let g=h.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,c=i.walkTokens;s.walkTokens=function(l){let h=[];return h.push(c.call(this,l)),o&&(h=h.concat(o.call(this,l))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return gn.lex(t,r??this.defaults)}parser(t,r){return mn.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(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 l=o.hooks?await o.hooks.preprocess(r):r,h=await(o.hooks?await o.hooks.provideLexer():t?gn.lex:gn.lexInline)(l,o),d=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():t?mn.parse:mn.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let l=(o.hooks?o.hooks.provideLexer():t?gn.lex:gn.lexInline)(r,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():t?mn.parse:mn.parseInline)(l,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(l){return c(l)}}}onError(t,r){return i=>{if(i.message+=`
|
|
100
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Bn(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ys=new j_;function Jt(e,t){return ys.parse(e,t)}Jt.options=Jt.setOptions=function(e){return ys.setOptions(e),Jt.defaults=ys.defaults,zx(Jt.defaults),Jt};Jt.getDefaults=xp;Jt.defaults=Ss;Jt.use=function(...e){return ys.use(...e),Jt.defaults=ys.defaults,zx(Jt.defaults),Jt};Jt.walkTokens=function(e,t){return ys.walkTokens(e,t)};Jt.parseInline=ys.parseInline;Jt.Parser=mn;Jt.parser=mn.parse;Jt.Renderer=tu;Jt.TextRenderer=Tp;Jt.Lexer=gn;Jt.lexer=gn.lex;Jt.Tokenizer=Jc;Jt.Hooks=Mo;Jt.parse=Jt;Jt.options;Jt.setOptions;Jt.use;Jt.walkTokens;Jt.parseInline;mn.parse;gn.lex;/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:Qx,setPrototypeOf:sy,isFrozen:W_,getPrototypeOf:H_,getOwnPropertyDescriptor:q_}=Object;let{freeze:gr,seal:Qr,create:Ic}=Object,{apply:bf,construct:Cf}=typeof Reflect<"u"&&Reflect;gr||(gr=function(t){return t});Qr||(Qr=function(t){return t});bf||(bf=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});Cf||(Cf=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const kc=mr(Array.prototype.forEach),U_=mr(Array.prototype.lastIndexOf),ay=mr(Array.prototype.pop),vo=mr(Array.prototype.push),Y_=mr(Array.prototype.splice),Pc=mr(String.prototype.toLowerCase),Vd=mr(String.prototype.toString),Gd=mr(String.prototype.match),bo=mr(String.prototype.replace),V_=mr(String.prototype.indexOf),G_=mr(String.prototype.trim),Pr=mr(Object.prototype.hasOwnProperty),hr=mr(RegExp.prototype.test),Co=X_(TypeError);function mr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return bf(e,t,i)}}function X_(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Cf(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pc;sy&&sy(e,null);let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(W_(t)||(t[i]=o),s=o)}e[s]=!0}return e}function Q_(e){for(let t=0;t<e.length;t++)Pr(e,t)||(e[t]=null);return e}function An(e){const t=Ic(null);for(const[r,i]of Qx(e))Pr(e,r)&&(Array.isArray(i)?t[r]=Q_(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=An(i):t[r]=i);return t}function wo(e,t){for(;e!==null;){const i=q_(e,t);if(i){if(i.get)return mr(i.get);if(typeof i.value=="function")return mr(i.value)}e=H_(e)}function r(){return null}return r}const oy=gr(["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"]),Xd=gr(["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"]),Qd=gr(["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"]),K_=gr(["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"]),Kd=gr(["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"]),Z_=gr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ly=gr(["#text"]),cy=gr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Zd=gr(["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"]),uy=gr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sc=gr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J_=Qr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tT=Qr(/<%[\w\W]*|[\w\W]*%>/gm),eT=Qr(/\$\{[\w\W]*/gm),rT=Qr(/^data-[\-\w.\u00B7-\uFFFF]+$/),nT=Qr(/^aria-[\-\w]+$/),Kx=Qr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),iT=Qr(/^(?:\w+script|data):/i),sT=Qr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zx=Qr(/^html$/i),aT=Qr(/^[a-z][.\w]*(-[.\w]+)+$/i);var hy=Object.freeze({__proto__:null,ARIA_ATTR:nT,ATTR_WHITESPACE:sT,CUSTOM_ELEMENT:aT,DATA_ATTR:rT,DOCTYPE_NAME:Zx,ERB_EXPR:tT,IS_ALLOWED_URI:Kx,IS_SCRIPT_OR_DATA:iT,MUSTACHE_EXPR:J_,TMPLIT_EXPR:eT});const ko={element:1,text:3,progressingInstruction:7,comment:8,document:9},oT=function(){return typeof window>"u"?null:window},lT=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},dy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Jx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oT();const t=Bt=>Jx(Bt);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==ko.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,s=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:c,Node:l,Element:h,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:m,trustedTypes:y}=e,v=h.prototype,C=wo(v,"cloneNode"),k=wo(v,"remove"),_=wo(v,"nextSibling"),T=wo(v,"childNodes"),E=wo(v,"parentNode");if(typeof c=="function"){const Bt=r.createElement("template");Bt.content&&Bt.content.ownerDocument&&(r=Bt.content.ownerDocument)}let B,A="";const{implementation:M,createNodeIterator:R,createDocumentFragment:O,getElementsByTagName:tt}=r,{importNode:et}=i;let V=dy();t.isSupported=typeof Qx=="function"&&typeof E=="function"&&M&&M.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:nt,ERB_EXPR:J,TMPLIT_EXPR:Y,DATA_ATTR:W,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:Z}=hy;let{IS_ALLOWED_URI:Q}=hy,F=null;const K=Yt({},[...oy,...Xd,...Qd,...Kd,...ly]);let ut=null;const pt=Yt({},[...cy,...Zd,...uy,...Sc]);let dt=Object.seal(Ic(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}})),ht=null,yt=null;const Lt=Object.seal(Ic(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pt=!0,Wt=!0,ae=!1,Ve=!0,_e=!1,ar=!0,Mr=!1,Et=!1,ce=!1,or=!1,yr=!1,lr=!1,xr=!0,zn=!1;const Hi="user-content-";let Nn=!0,Jr=!1,Nr={},ze=null;const tn=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 ai=null;const Ne=Yt({},["audio","video","img","source","image","track"]);let ge=null;const je=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wn="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml";let kn=rn,qi=!1,Ui=null;const Ma=Yt({},[wn,en,rn],Vd);let oi=Yt({},["mi","mo","mn","ms","mtext"]),nn=Yt({},["annotation-xml"]);const li=Yt({},["title","style","font","a","script"]);let ci=null;const fl=["application/xhtml+xml","text/html"],pl="text/html";let ve=null,jn=null;const Ba=r.createElement("form"),Aa=function(P){return P instanceof RegExp||P instanceof Function},Wn=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(jn&&jn===P)){if((!P||typeof P!="object")&&(P={}),P=An(P),ci=fl.indexOf(P.PARSER_MEDIA_TYPE)===-1?pl:P.PARSER_MEDIA_TYPE,ve=ci==="application/xhtml+xml"?Vd:Pc,F=Pr(P,"ALLOWED_TAGS")?Yt({},P.ALLOWED_TAGS,ve):K,ut=Pr(P,"ALLOWED_ATTR")?Yt({},P.ALLOWED_ATTR,ve):pt,Ui=Pr(P,"ALLOWED_NAMESPACES")?Yt({},P.ALLOWED_NAMESPACES,Vd):Ma,ge=Pr(P,"ADD_URI_SAFE_ATTR")?Yt(An(je),P.ADD_URI_SAFE_ATTR,ve):je,ai=Pr(P,"ADD_DATA_URI_TAGS")?Yt(An(Ne),P.ADD_DATA_URI_TAGS,ve):Ne,ze=Pr(P,"FORBID_CONTENTS")?Yt({},P.FORBID_CONTENTS,ve):tn,ht=Pr(P,"FORBID_TAGS")?Yt({},P.FORBID_TAGS,ve):An({}),yt=Pr(P,"FORBID_ATTR")?Yt({},P.FORBID_ATTR,ve):An({}),Nr=Pr(P,"USE_PROFILES")?P.USE_PROFILES:!1,Pt=P.ALLOW_ARIA_ATTR!==!1,Wt=P.ALLOW_DATA_ATTR!==!1,ae=P.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=P.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=P.SAFE_FOR_TEMPLATES||!1,ar=P.SAFE_FOR_XML!==!1,Mr=P.WHOLE_DOCUMENT||!1,or=P.RETURN_DOM||!1,yr=P.RETURN_DOM_FRAGMENT||!1,lr=P.RETURN_TRUSTED_TYPE||!1,ce=P.FORCE_BODY||!1,xr=P.SANITIZE_DOM!==!1,zn=P.SANITIZE_NAMED_PROPS||!1,Nn=P.KEEP_CONTENT!==!1,Jr=P.IN_PLACE||!1,Q=P.ALLOWED_URI_REGEXP||Kx,kn=P.NAMESPACE||rn,oi=P.MATHML_TEXT_INTEGRATION_POINTS||oi,nn=P.HTML_INTEGRATION_POINTS||nn,dt=P.CUSTOM_ELEMENT_HANDLING||{},P.CUSTOM_ELEMENT_HANDLING&&Aa(P.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(dt.tagNameCheck=P.CUSTOM_ELEMENT_HANDLING.tagNameCheck),P.CUSTOM_ELEMENT_HANDLING&&Aa(P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(dt.attributeNameCheck=P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),P.CUSTOM_ELEMENT_HANDLING&&typeof P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Wt=!1),yr&&(or=!0),Nr&&(F=Yt({},ly),ut=Ic(null),Nr.html===!0&&(Yt(F,oy),Yt(ut,cy)),Nr.svg===!0&&(Yt(F,Xd),Yt(ut,Zd),Yt(ut,Sc)),Nr.svgFilters===!0&&(Yt(F,Qd),Yt(ut,Zd),Yt(ut,Sc)),Nr.mathMl===!0&&(Yt(F,Kd),Yt(ut,uy),Yt(ut,Sc))),Pr(P,"ADD_TAGS")||(Lt.tagCheck=null),Pr(P,"ADD_ATTR")||(Lt.attributeCheck=null),P.ADD_TAGS&&(typeof P.ADD_TAGS=="function"?Lt.tagCheck=P.ADD_TAGS:(F===K&&(F=An(F)),Yt(F,P.ADD_TAGS,ve))),P.ADD_ATTR&&(typeof P.ADD_ATTR=="function"?Lt.attributeCheck=P.ADD_ATTR:(ut===pt&&(ut=An(ut)),Yt(ut,P.ADD_ATTR,ve))),P.ADD_URI_SAFE_ATTR&&Yt(ge,P.ADD_URI_SAFE_ATTR,ve),P.FORBID_CONTENTS&&(ze===tn&&(ze=An(ze)),Yt(ze,P.FORBID_CONTENTS,ve)),P.ADD_FORBID_CONTENTS&&(ze===tn&&(ze=An(ze)),Yt(ze,P.ADD_FORBID_CONTENTS,ve)),Nn&&(F["#text"]=!0),Mr&&Yt(F,["html","head","body"]),F.table&&(Yt(F,["tbody"]),delete ht.tbody),P.TRUSTED_TYPES_POLICY){if(typeof P.TRUSTED_TYPES_POLICY.createHTML!="function")throw Co('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof P.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Co('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');B=P.TRUSTED_TYPES_POLICY,A=B.createHTML("")}else B===void 0&&(B=lT(y,s)),B!==null&&typeof A=="string"&&(A=B.createHTML(""));gr&&gr(P),jn=P}},Ms=Yt({},[...Xd,...Qd,...K_]),ui=Yt({},[...Kd,...Z_]),lh=function(P){let lt=E(P);(!lt||!lt.tagName)&&(lt={namespaceURI:kn,tagName:"template"});const wt=Pc(P.tagName),oe=Pc(lt.tagName);return Ui[P.namespaceURI]?P.namespaceURI===en?lt.namespaceURI===rn?wt==="svg":lt.namespaceURI===wn?wt==="svg"&&(oe==="annotation-xml"||oi[oe]):!!Ms[wt]:P.namespaceURI===wn?lt.namespaceURI===rn?wt==="math":lt.namespaceURI===en?wt==="math"&&nn[oe]:!!ui[wt]:P.namespaceURI===rn?lt.namespaceURI===en&&!nn[oe]||lt.namespaceURI===wn&&!oi[oe]?!1:!ui[wt]&&(li[wt]||!Ms[wt]):!!(ci==="application/xhtml+xml"&&Ui[P.namespaceURI]):!1},Ge=function(P){vo(t.removed,{element:P});try{E(P).removeChild(P)}catch{k(P)}},jr=function(P,lt){try{vo(t.removed,{attribute:lt.getAttributeNode(P),from:lt})}catch{vo(t.removed,{attribute:null,from:lt})}if(lt.removeAttribute(P),P==="is")if(or||yr)try{Ge(lt)}catch{}else try{lt.setAttribute(P,"")}catch{}},Yi=function(P){let lt=null,wt=null;if(ce)P="<remove></remove>"+P;else{const be=Gd(P,/^[\r\n\t ]+/);wt=be&&be[0]}ci==="application/xhtml+xml"&&kn===rn&&(P='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+P+"</body></html>");const oe=B?B.createHTML(P):P;if(kn===rn)try{lt=new m().parseFromString(oe,ci)}catch{}if(!lt||!lt.documentElement){lt=M.createDocument(kn,"template",null);try{lt.documentElement.innerHTML=qi?A:oe}catch{}}const qt=lt.body||lt.documentElement;return P&&wt&&qt.insertBefore(r.createTextNode(wt),qt.childNodes[0]||null),kn===rn?tt.call(lt,Mr?"html":"body")[0]:Mr?lt.documentElement:qt},Bs=function(P){return R.call(P.ownerDocument||P,P,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ra=function(P){return P instanceof g&&(typeof P.nodeName!="string"||typeof P.textContent!="string"||typeof P.removeChild!="function"||!(P.attributes instanceof f)||typeof P.removeAttribute!="function"||typeof P.setAttribute!="function"||typeof P.namespaceURI!="string"||typeof P.insertBefore!="function"||typeof P.hasChildNodes!="function")},gl=function(P){return typeof l=="function"&&P instanceof l};function sn(Bt,P,lt){kc(Bt,wt=>{wt.call(t,P,lt,jn)})}const Sn=function(P){let lt=null;if(sn(V.beforeSanitizeElements,P,null),Ra(P))return Ge(P),!0;const wt=ve(P.nodeName);if(sn(V.uponSanitizeElement,P,{tagName:wt,allowedTags:F}),ar&&P.hasChildNodes()&&!gl(P.firstElementChild)&&hr(/<[/\w!]/g,P.innerHTML)&&hr(/<[/\w!]/g,P.textContent)||P.nodeType===ko.progressingInstruction||ar&&P.nodeType===ko.comment&&hr(/<[/\w]/g,P.data))return Ge(P),!0;if(!(Lt.tagCheck instanceof Function&&Lt.tagCheck(wt))&&(!F[wt]||ht[wt])){if(!ht[wt]&&Fa(wt)&&(dt.tagNameCheck instanceof RegExp&&hr(dt.tagNameCheck,wt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(wt)))return!1;if(Nn&&!ze[wt]){const oe=E(P)||P.parentNode,qt=T(P)||P.childNodes;if(qt&&oe){const be=qt.length;for(let De=be-1;De>=0;--De){const Wr=C(qt[De],!0);Wr.__removalCount=(P.__removalCount||0)+1,oe.insertBefore(Wr,_(P))}}}return Ge(P),!0}return P instanceof h&&!lh(P)||(wt==="noscript"||wt==="noembed"||wt==="noframes")&&hr(/<\/no(script|embed|frames)/i,P.innerHTML)?(Ge(P),!0):(_e&&P.nodeType===ko.text&&(lt=P.textContent,kc([nt,J,Y],oe=>{lt=bo(lt,oe," ")}),P.textContent!==lt&&(vo(t.removed,{element:P.cloneNode()}),P.textContent=lt)),sn(V.afterSanitizeElements,P,null),!1)},$a=function(P,lt,wt){if(yt[lt]||xr&&(lt==="id"||lt==="name")&&(wt in r||wt in Ba))return!1;if(!(Wt&&!yt[lt]&&hr(W,lt))){if(!(Pt&&hr(N,lt))){if(!(Lt.attributeCheck instanceof Function&&Lt.attributeCheck(lt,P))){if(!ut[lt]||yt[lt]){if(!(Fa(P)&&(dt.tagNameCheck instanceof RegExp&&hr(dt.tagNameCheck,P)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(P))&&(dt.attributeNameCheck instanceof RegExp&&hr(dt.attributeNameCheck,lt)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(lt,P))||lt==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&hr(dt.tagNameCheck,wt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(wt))))return!1}else if(!ge[lt]){if(!hr(Q,bo(wt,D,""))){if(!((lt==="src"||lt==="xlink:href"||lt==="href")&&P!=="script"&&V_(wt,"data:")===0&&ai[P])){if(!(ae&&!hr(q,bo(wt,D,"")))){if(wt)return!1}}}}}}}return!0},Fa=function(P){return P!=="annotation-xml"&&Gd(P,Z)},ml=function(P){sn(V.beforeSanitizeAttributes,P,null);const{attributes:lt}=P;if(!lt||Ra(P))return;const wt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut,forceKeepAttr:void 0};let oe=lt.length;for(;oe--;){const qt=lt[oe],{name:be,namespaceURI:De,value:Wr}=qt,an=ve(be),Da=Wr;let Te=be==="value"?Da:G_(Da);if(wt.attrName=an,wt.attrValue=Te,wt.keepAttr=!0,wt.forceKeepAttr=void 0,sn(V.uponSanitizeAttribute,P,wt),Te=wt.attrValue,zn&&(an==="id"||an==="name")&&(jr(be,P),Te=Hi+Te),ar&&hr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){jr(be,P);continue}if(an==="attributename"&&Gd(Te,"href")){jr(be,P);continue}if(wt.forceKeepAttr)continue;if(!wt.keepAttr){jr(be,P);continue}if(!Ve&&hr(/\/>/i,Te)){jr(be,P);continue}_e&&kc([nt,J,Y],Br=>{Te=bo(Te,Br," ")});const Vi=ve(P.nodeName);if(!$a(Vi,an,Te)){jr(be,P);continue}if(B&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!De)switch(y.getAttributeType(Vi,an)){case"TrustedHTML":{Te=B.createHTML(Te);break}case"TrustedScriptURL":{Te=B.createScriptURL(Te);break}}if(Te!==Da)try{De?P.setAttributeNS(De,be,Te):P.setAttribute(be,Te),Ra(P)?Ge(P):ay(t.removed)}catch{jr(be,P)}}sn(V.afterSanitizeAttributes,P,null)},yl=function Bt(P){let lt=null;const wt=Bs(P);for(sn(V.beforeSanitizeShadowDOM,P,null);lt=wt.nextNode();)sn(V.uponSanitizeShadowNode,lt,null),Sn(lt),ml(lt),lt.content instanceof o&&Bt(lt.content);sn(V.afterSanitizeShadowDOM,P,null)};return t.sanitize=function(Bt){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=null,wt=null,oe=null,qt=null;if(qi=!Bt,qi&&(Bt="<!-->"),typeof Bt!="string"&&!gl(Bt))if(typeof Bt.toString=="function"){if(Bt=Bt.toString(),typeof Bt!="string")throw Co("dirty is not a string, aborting")}else throw Co("toString is not a function");if(!t.isSupported)return Bt;if(Et||Wn(P),t.removed=[],typeof Bt=="string"&&(Jr=!1),Jr){if(Bt.nodeName){const Wr=ve(Bt.nodeName);if(!F[Wr]||ht[Wr])throw Co("root node is forbidden and cannot be sanitized in-place")}}else if(Bt instanceof l)lt=Yi("<!---->"),wt=lt.ownerDocument.importNode(Bt,!0),wt.nodeType===ko.element&&wt.nodeName==="BODY"||wt.nodeName==="HTML"?lt=wt:lt.appendChild(wt);else{if(!or&&!_e&&!Mr&&Bt.indexOf("<")===-1)return B&&lr?B.createHTML(Bt):Bt;if(lt=Yi(Bt),!lt)return or?null:lr?A:""}lt&&ce&&Ge(lt.firstChild);const be=Bs(Jr?Bt:lt);for(;oe=be.nextNode();)Sn(oe),ml(oe),oe.content instanceof o&&yl(oe.content);if(Jr)return Bt;if(or){if(yr)for(qt=O.call(lt.ownerDocument);lt.firstChild;)qt.appendChild(lt.firstChild);else qt=lt;return(ut.shadowroot||ut.shadowrootmode)&&(qt=et.call(i,qt,!0)),qt}let De=Mr?lt.outerHTML:lt.innerHTML;return Mr&&F["!doctype"]&<.ownerDocument&<.ownerDocument.doctype&<.ownerDocument.doctype.name&&hr(Zx,lt.ownerDocument.doctype.name)&&(De="<!DOCTYPE "+lt.ownerDocument.doctype.name+`>
|
|
101
|
-
`+De),_e&&kc([nt,J,Y],Wr=>{De=bo(De,Wr," ")}),B&&lr?B.createHTML(De):De},t.setConfig=function(){let Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wn(Bt),Et=!0},t.clearConfig=function(){jn=null,Et=!1},t.isValidAttribute=function(Bt,P,lt){jn||Wn({});const wt=ve(Bt),oe=ve(P);return $a(wt,oe,lt)},t.addHook=function(Bt,P){typeof P=="function"&&vo(V[Bt],P)},t.removeHook=function(Bt,P){if(P!==void 0){const lt=U_(V[Bt],P);return lt===-1?void 0:Y_(V[Bt],lt,1)[0]}return ay(V[Bt])},t.removeHooks=function(Bt){V[Bt]=[]},t.removeAllHooks=function(){V=dy()},t}var Fi=Jx();Jt.setOptions({breaks:!0,gfm:!0});function fy(e){try{return{__html:Fi.sanitize(Jt.parse(e))}}catch{return{__html:Fi.sanitize(e)}}}function py({tool:e}){const[t,r]=j.useState(!1),i=typeof e.input=="string"?e.input:JSON.stringify(e.input,null,2);return S.jsxs("div",{style:Kt.toolBlock,children:[S.jsxs("button",{style:Kt.toolHeader,onClick:()=>r(!t),children:[S.jsx("span",{style:Kt.toolChevron,children:t?"▼":"▶"}),S.jsx("span",{style:Kt.toolName,children:e.toolName}),e.output!==void 0&&S.jsx("span",{style:Kt.toolDone,children:"\\u2713"})]}),t&&S.jsxs("div",{style:Kt.toolBody,children:[i&&S.jsx("pre",{style:Kt.toolPre,children:i}),e.output!==void 0&&S.jsxs(S.Fragment,{children:[S.jsx("div",{style:Kt.toolOutputLabel,children:"Output"}),S.jsx("pre",{style:Kt.toolPre,children:typeof e.output=="string"?e.output:JSON.stringify(e.output,null,2)})]})]})]})}function cT({messages:e,streamingText:t,tools:r,chatStatus:i,onSend:s,onStop:o,onNewChat:c,onResume:l,sessions:h,sessionId:d}){const[f,g]=j.useState(""),m=j.useRef(null),y=j.useRef(null),v=j.useCallback(()=>{var E;(E=m.current)==null||E.scrollIntoView({behavior:"smooth"})},[]);j.useEffect(()=>{v()},[e,t,v]);const C=j.useCallback(()=>{const E=f.trim();!E||i==="thinking"||(s(E),g(""))},[f,i,s]),k=j.useCallback(E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),C())},[C]),_=i==="thinking"||i==="streaming",T=e.length===0&&!t;return S.jsxs("div",{style:Kt.container,children:[S.jsxs("div",{style:Kt.messageList,children:[T&&S.jsxs("div",{style:Kt.welcome,children:[S.jsx("div",{style:Kt.welcomeTitle,children:"ClaudeTeach"}),S.jsx("div",{style:Kt.welcomeSubtitle,children:"Ask me anything, or try a command:"}),S.jsx("div",{style:Kt.welcomeCommands,children:["/teach git","/learn react","/stats"].map(E=>S.jsx("button",{style:Kt.commandChip,onClick:()=>{var B;g(E),(B=y.current)==null||B.focus()},children:E},E))})]}),e.map((E,B)=>{var A;return S.jsxs("div",{style:E.role==="user"?Kt.userRow:Kt.assistantRow,children:[S.jsx("div",{style:Kt.roleLabel,children:E.role==="user"?"You":"Claude"}),E.role==="user"?S.jsx("div",{style:Kt.userBubble,children:E.text}):S.jsx("div",{style:Kt.assistantBubble,children:S.jsx("div",{style:Kt.markdown,dangerouslySetInnerHTML:fy(E.text)})}),(A=E.tools)==null?void 0:A.map((M,R)=>S.jsx(py,{tool:M},R))]},B)}),t&&S.jsxs("div",{style:Kt.assistantRow,children:[S.jsx("div",{style:Kt.roleLabel,children:"Claude"}),S.jsxs("div",{style:Kt.assistantBubble,children:[S.jsx("div",{style:Kt.markdown,dangerouslySetInnerHTML:fy(t)}),S.jsx("span",{style:Kt.cursor,children:"|"})]})]}),r.filter(E=>E.output===void 0).map((E,B)=>S.jsx(py,{tool:E},`active-${B}`)),i==="thinking"&&!t&&S.jsxs("div",{style:Kt.statusRow,children:[S.jsx("span",{style:Kt.statusDot}),"Thinking..."]}),S.jsx("div",{ref:m})]}),S.jsxs("div",{style:Kt.inputArea,children:[S.jsx("textarea",{ref:y,value:f,onChange:E=>g(E.target.value),onKeyDown:k,placeholder:"Type a message...",style:Kt.textarea,rows:1,disabled:!d}),_?S.jsx("button",{style:Kt.stopButton,onClick:o,children:"Stop"}):S.jsx("button",{style:{...Kt.sendButton,opacity:f.trim()&&d?1:.4},onClick:C,disabled:!f.trim()||!d,children:"Send"})]})]})}const Kt={container:{display:"flex",flexDirection:"column",height:"100%",minWidth:0},messageList:{flex:1,overflowY:"auto",padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},welcome:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,gap:12,paddingTop:80},welcomeTitle:{fontSize:28,fontWeight:700,color:"#58a6ff"},welcomeSubtitle:{fontSize:15,color:"#8b949e"},welcomeCommands:{display:"flex",gap:8,marginTop:8},commandChip:{padding:"6px 14px",fontSize:13,color:"#58a6ff",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:16,cursor:"pointer"},userRow:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:4},assistantRow:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:4},roleLabel:{fontSize:11,fontWeight:600,color:"#8b949e",textTransform:"uppercase",letterSpacing:"0.04em"},userBubble:{maxWidth:"80%",padding:"10px 14px",backgroundColor:"#1f6feb",color:"#fff",borderRadius:"16px 16px 4px 16px",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},assistantBubble:{maxWidth:"90%",padding:"10px 14px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:"16px 16px 16px 4px",fontSize:14,lineHeight:1.6},markdown:{color:"#c9d1d9",wordBreak:"break-word"},cursor:{color:"#58a6ff",animation:"blink 1s step-end infinite"},toolBlock:{maxWidth:"90%",border:"1px solid #30363d",borderRadius:8,overflow:"hidden",marginTop:4},toolHeader:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"6px 12px",fontSize:12,color:"#8b949e",backgroundColor:"#0d1117",border:"none",cursor:"pointer",textAlign:"left"},toolChevron:{fontSize:10,width:12},toolName:{fontFamily:"monospace",color:"#d2a8ff"},toolDone:{color:"#3fb950",marginLeft:"auto"},toolBody:{padding:"8px 12px",backgroundColor:"#0d1117",borderTop:"1px solid #21262d"},toolPre:{margin:0,padding:8,fontSize:12,fontFamily:"monospace",color:"#c9d1d9",backgroundColor:"#161b22",borderRadius:4,overflow:"auto",maxHeight:200,whiteSpace:"pre-wrap",wordBreak:"break-all"},toolOutputLabel:{fontSize:11,color:"#8b949e",marginTop:8,marginBottom:4},statusRow:{display:"flex",alignItems:"center",gap:8,fontSize:13,color:"#8b949e",padding:"4px 0"},statusDot:{width:8,height:8,borderRadius:"50%",backgroundColor:"#d29922",animation:"pulse 1.5s ease-in-out infinite"},inputArea:{display:"flex",alignItems:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #30363d",backgroundColor:"#0d1117"},textarea:{flex:1,padding:"10px 14px",fontSize:14,color:"#c9d1d9",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,resize:"none",outline:"none",fontFamily:"inherit",lineHeight:1.5,maxHeight:120,overflow:"auto"},sendButton:{padding:"10px 20px",fontSize:14,fontWeight:600,color:"#fff",backgroundColor:"#1f6feb",border:"none",borderRadius:12,cursor:"pointer",flexShrink:0},stopButton:{padding:"10px 20px",fontSize:14,fontWeight:600,color:"#fff",backgroundColor:"#da3633",border:"none",borderRadius:12,cursor:"pointer",flexShrink:0}};function uT({data:e,getBelt:t,getNextBelt:r,BELTS:i}){const s=(e==null?void 0:e.progress)||{xp:0,modules:[],streak:0},o=(e==null?void 0:e.recommendation)||null,c=s.xp||0,l=s.streak||0,h=j.useMemo(()=>t(c),[c,t]),d=j.useMemo(()=>r(c),[c,r]),f=s.modules||[],g=j.useMemo(()=>{if(!d)return 100;const m=h.minXP,y=d.minXP;return Math.min(100,Math.max(0,(c-m)/(y-m)*100))},[c,h,d]);return S.jsxs("div",{style:$t.container,children:[S.jsxs("div",{style:$t.heroSection,children:[S.jsxs("div",{style:$t.beltCard,children:[S.jsx("div",{style:{...$t.beltIcon,borderColor:h.color},children:S.jsx("span",{style:$t.beltEmoji,children:h.badge})}),S.jsxs("div",{style:$t.beltInfo,children:[S.jsxs("h2",{style:$t.beltName,children:[h.name," Belt"]}),S.jsxs("p",{style:$t.xpText,children:[c.toLocaleString()," XP"]})]})]}),S.jsxs("div",{style:$t.progressSection,children:[S.jsxs("div",{style:$t.progressHeader,children:[S.jsx("span",{style:$t.progressLabel,children:d?`Next: ${d.badge} ${d.name} Belt`:"Max Level!"}),S.jsx("span",{style:$t.progressValue,children:d?`${(d.minXP-c).toLocaleString()} XP to go`:""})]}),S.jsx("div",{style:$t.progressBar,children:S.jsx("div",{style:{...$t.progressFill,width:`${g}%`,backgroundColor:(d==null?void 0:d.color)||h.color}})})]}),S.jsxs("div",{style:$t.streakCard,children:[S.jsx("span",{style:$t.streakIcon,children:l>0?"🔥":"❄️"}),S.jsxs("div",{children:[S.jsxs("p",{style:$t.streakCount,children:[l," day streak"]}),S.jsx("p",{style:$t.streakSubtext,children:l>0?"Keep it going!":"Start learning today!"})]})]})]}),S.jsxs("div",{style:$t.section,children:[S.jsx("h3",{style:$t.sectionTitle,children:"Belt Roadmap"}),S.jsx("div",{style:$t.roadmap,children:i.map((m,y)=>{const v=c>=m.minXP,C=h.name===m.name;return S.jsxs("div",{style:{...$t.roadmapItem,opacity:v?1:.4},children:[S.jsx("div",{style:{...$t.roadmapDot,backgroundColor:v?m.color:"#30363d",border:C?`2px solid ${m.color}`:"2px solid transparent",boxShadow:C?`0 0 12px ${m.color}40`:"none"},children:S.jsx("span",{style:{fontSize:14},children:m.badge})}),S.jsx("span",{style:{...$t.roadmapLabel,color:C?"#c9d1d9":"#8b949e",fontWeight:C?600:400},children:m.name}),S.jsxs("span",{style:$t.roadmapXP,children:[m.minXP," XP"]}),y<i.length-1&&S.jsx("div",{style:{...$t.roadmapLine,backgroundColor:c>=i[y+1].minXP?m.color:"#30363d"}})]},m.name)})})]}),S.jsxs("div",{style:$t.section,children:[S.jsx("h3",{style:$t.sectionTitle,children:"Modules"}),f.length===0?S.jsxs("div",{style:$t.emptyState,children:[S.jsx("p",{style:$t.emptyTitle,children:"No modules yet"}),S.jsxs("p",{style:$t.emptySubtext,children:["Start a lesson in the terminal with ",S.jsx("code",{style:$t.code,children:"/teach"})," to begin learning"]})]}):S.jsx("div",{style:$t.moduleGrid,children:f.map(m=>S.jsx(hT,{module:m},m.slug))})]}),o&&S.jsxs("div",{style:$t.section,children:[S.jsx("h3",{style:$t.sectionTitle,children:"Recommended"}),S.jsxs("div",{style:$t.recommendCard,children:[S.jsx("div",{style:$t.recommendIcon,children:o.difficulty==="beginner"?"🌱":o.difficulty==="intermediate"?"🌿":"🌳"}),S.jsxs("div",{style:$t.recommendInfo,children:[S.jsx("h4",{style:$t.recommendTitle,children:o.title||o.slug}),S.jsx("p",{style:$t.recommendDesc,children:o.description||"Ready for your next challenge?"}),o.xp&&S.jsxs("span",{style:$t.recommendXP,children:[typeof o.xp=="number"?o.xp:Object.values(o.xp).reduce((m,y)=>m+y,0)," XP available"]})]}),S.jsxs("div",{style:$t.recommendAction,children:[S.jsx("span",{style:$t.recommendHint,children:"Type in terminal:"}),S.jsxs("code",{style:$t.recommendCommand,children:["/teach ",o.slug]})]})]})]})]})}function hT({module:e}){const{slug:t,title:r,status:i,xp_earned:s,quiz_score:o,walkthrough_step:c}=e,l=i==="completed",h=i==="in-progress",d=i==="locked",f=l?"#3fb950":h?"#58a6ff":"#30363d",g=d?.5:1;return S.jsxs("div",{style:{...$t.moduleCard,borderColor:f,opacity:g},children:[S.jsxs("div",{style:$t.moduleHeader,children:[S.jsx("span",{style:$t.moduleStatus,children:l?"✅":h?"🟦":"🔒"}),S.jsx("h4",{style:$t.moduleTitle,children:r||t})]}),S.jsxs("div",{style:$t.moduleDetails,children:[s>0&&S.jsxs("span",{style:$t.moduleXP,children:[s," XP"]}),o&&S.jsxs("span",{style:$t.moduleQuiz,children:["Quiz: ",o]}),h&&c&&S.jsxs("span",{style:$t.moduleStep,children:["Step ",c]})]}),d&&S.jsx("p",{style:$t.moduleLocked,children:"Complete prerequisites to unlock"})]})}const $t={container:{maxWidth:900,margin:"0 auto",display:"flex",flexDirection:"column",gap:28},heroSection:{display:"flex",gap:16,flexWrap:"wrap"},beltCard:{display:"flex",alignItems:"center",gap:16,padding:"20px 24px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,flex:"1 1 200px"},beltIcon:{width:56,height:56,borderRadius:"50%",border:"3px solid",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#21262d",flexShrink:0},beltEmoji:{fontSize:28},beltInfo:{display:"flex",flexDirection:"column",gap:4},beltName:{fontSize:20,fontWeight:700,color:"#e6edf3",margin:0},xpText:{fontSize:14,color:"#8b949e",margin:0},progressSection:{flex:"2 1 300px",padding:"20px 24px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},progressHeader:{display:"flex",justifyContent:"space-between",alignItems:"center"},progressLabel:{fontSize:14,color:"#c9d1d9",fontWeight:500},progressValue:{fontSize:13,color:"#8b949e"},progressBar:{height:10,backgroundColor:"#21262d",borderRadius:5,overflow:"hidden"},progressFill:{height:"100%",borderRadius:5,transition:"width 0.6s cubic-bezier(0.22, 1, 0.36, 1)"},streakCard:{display:"flex",alignItems:"center",gap:12,padding:"20px 24px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,flex:"0 1 180px"},streakIcon:{fontSize:28},streakCount:{fontSize:16,fontWeight:700,color:"#e6edf3",margin:0},streakSubtext:{fontSize:12,color:"#8b949e",margin:0},section:{display:"flex",flexDirection:"column",gap:12},sectionTitle:{fontSize:16,fontWeight:600,color:"#e6edf3",margin:0},roadmap:{display:"flex",gap:0,padding:"16px 0",overflowX:"auto"},roadmapItem:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,position:"relative",flex:"1 1 0",minWidth:70},roadmapDot:{width:36,height:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},roadmapLabel:{fontSize:12},roadmapXP:{fontSize:10,color:"#484f58"},roadmapLine:{position:"absolute",top:18,left:"55%",right:"-45%",height:2,zIndex:0},moduleGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:12},moduleCard:{padding:"16px 20px",backgroundColor:"#161b22",border:"2px solid",borderRadius:10,display:"flex",flexDirection:"column",gap:10,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},moduleHeader:{display:"flex",alignItems:"center",gap:8},moduleStatus:{fontSize:16},moduleTitle:{fontSize:14,fontWeight:600,color:"#e6edf3",margin:0},moduleDetails:{display:"flex",gap:12,flexWrap:"wrap"},moduleXP:{fontSize:12,color:"#58a6ff",backgroundColor:"#58a6ff18",padding:"2px 8px",borderRadius:4},moduleQuiz:{fontSize:12,color:"#3fb950",backgroundColor:"#3fb95018",padding:"2px 8px",borderRadius:4},moduleStep:{fontSize:12,color:"#d29922",backgroundColor:"#d2992218",padding:"2px 8px",borderRadius:4},moduleLocked:{fontSize:12,color:"#484f58",fontStyle:"italic",margin:0},emptyState:{textAlign:"center",padding:"48px 24px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12},emptyTitle:{fontSize:16,fontWeight:600,color:"#e6edf3",margin:"0 0 8px"},emptySubtext:{fontSize:14,color:"#8b949e",margin:0},code:{backgroundColor:"#21262d",padding:"2px 6px",borderRadius:4,fontSize:13,fontFamily:"monospace",color:"#58a6ff"},recommendCard:{display:"flex",alignItems:"center",gap:16,padding:"16px 20px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,flexWrap:"wrap"},recommendIcon:{fontSize:32,flexShrink:0},recommendInfo:{flex:"1 1 200px",display:"flex",flexDirection:"column",gap:4},recommendTitle:{fontSize:15,fontWeight:600,color:"#e6edf3",margin:0},recommendDesc:{fontSize:13,color:"#8b949e",margin:0},recommendXP:{fontSize:12,color:"#3fb950"},recommendAction:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:4},recommendHint:{fontSize:11,color:"#484f58"},recommendCommand:{fontSize:13,fontFamily:"monospace",color:"#58a6ff",backgroundColor:"#21262d",padding:"4px 10px",borderRadius:6}},dT="modulepreload",fT=function(e){return"/"+e},gy={},ee=function(t,r,i){let s=Promise.resolve();if(r&&r.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),h=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=c(r.map(d=>{if(d=fT(d),d in gy)return;gy[d]=!0;const f=d.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":dT,f||(m.as="script"),m.crossOrigin="",m.href=d,h&&m.setAttribute("nonce",h),document.head.appendChild(m),f)return new Promise((y,v)=>{m.addEventListener("load",y),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=c,window.dispatchEvent(l),!l.defaultPrevented)throw c}return s.then(c=>{for(const l of c||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};var my={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Oc={exports:{}},pT=Oc.exports,yy;function gT(){return yy||(yy=1,(function(e,t){(function(r,i){e.exports=i()})(pT,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",c="second",l="minute",h="hour",d="day",f="week",g="month",m="quarter",y="year",v="date",C="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var W=["th","st","nd","rd"],N=Y%100;return"["+Y+(W[(N-20)%10]||W[N]||W[0])+"]"}},E=function(Y,W,N){var q=String(Y);return!q||q.length>=W?Y:""+Array(W+1-q.length).join(N)+Y},B={s:E,z:function(Y){var W=-Y.utcOffset(),N=Math.abs(W),q=Math.floor(N/60),D=N%60;return(W<=0?"+":"-")+E(q,2,"0")+":"+E(D,2,"0")},m:function Y(W,N){if(W.date()<N.date())return-Y(N,W);var q=12*(N.year()-W.year())+(N.month()-W.month()),D=W.clone().add(q,g),Z=N-D<0,Q=W.clone().add(q+(Z?-1:1),g);return+(-(q+(N-D)/(Z?D-Q:Q-D))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:g,y,w:f,d,D:v,h,m:l,s:c,ms:o,Q:m}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},A="en",M={};M[A]=T;var R="$isDayjsObject",O=function(Y){return Y instanceof nt||!(!Y||!Y[R])},tt=function Y(W,N,q){var D;if(!W)return A;if(typeof W=="string"){var Z=W.toLowerCase();M[Z]&&(D=Z),N&&(M[Z]=N,D=Z);var Q=W.split("-");if(!D&&Q.length>1)return Y(Q[0])}else{var F=W.name;M[F]=W,D=F}return!q&&D&&(A=D),D||!q&&A},et=function(Y,W){if(O(Y))return Y.clone();var N=typeof W=="object"?W:{};return N.date=Y,N.args=arguments,new nt(N)},V=B;V.l=tt,V.i=O,V.w=function(Y,W){return et(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var nt=(function(){function Y(N){this.$L=tt(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[R]=!0}var W=Y.prototype;return W.parse=function(N){this.$d=(function(q){var D=q.date,Z=q.utc;if(D===null)return new Date(NaN);if(V.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Q=D.match(k);if(Q){var F=Q[2]-1||0,K=(Q[7]||"0").substring(0,3);return Z?new Date(Date.UTC(Q[1],F,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,K)):new Date(Q[1],F,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,K)}}return new Date(D)})(N),this.init()},W.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},W.$utils=function(){return V},W.isValid=function(){return this.$d.toString()!==C},W.isSame=function(N,q){var D=et(N);return this.startOf(q)<=D&&D<=this.endOf(q)},W.isAfter=function(N,q){return et(N)<this.startOf(q)},W.isBefore=function(N,q){return this.endOf(q)<et(N)},W.$g=function(N,q,D){return V.u(N)?this[q]:this.set(D,N)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(N,q){var D=this,Z=!!V.u(q)||q,Q=V.p(N),F=function(Pt,Wt){var ae=V.w(D.$u?Date.UTC(D.$y,Wt,Pt):new Date(D.$y,Wt,Pt),D);return Z?ae:ae.endOf(d)},K=function(Pt,Wt){return V.w(D.toDate()[Pt].apply(D.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(Wt)),D)},ut=this.$W,pt=this.$M,dt=this.$D,ht="set"+(this.$u?"UTC":"");switch(Q){case y:return Z?F(1,0):F(31,11);case g:return Z?F(1,pt):F(0,pt+1);case f:var yt=this.$locale().weekStart||0,Lt=(ut<yt?ut+7:ut)-yt;return F(Z?dt-Lt:dt+(6-Lt),pt);case d:case v:return K(ht+"Hours",0);case h:return K(ht+"Minutes",1);case l:return K(ht+"Seconds",2);case c:return K(ht+"Milliseconds",3);default:return this.clone()}},W.endOf=function(N){return this.startOf(N,!1)},W.$set=function(N,q){var D,Z=V.p(N),Q="set"+(this.$u?"UTC":""),F=(D={},D[d]=Q+"Date",D[v]=Q+"Date",D[g]=Q+"Month",D[y]=Q+"FullYear",D[h]=Q+"Hours",D[l]=Q+"Minutes",D[c]=Q+"Seconds",D[o]=Q+"Milliseconds",D)[Z],K=Z===d?this.$D+(q-this.$W):q;if(Z===g||Z===y){var ut=this.clone().set(v,1);ut.$d[F](K),ut.init(),this.$d=ut.set(v,Math.min(this.$D,ut.daysInMonth())).$d}else F&&this.$d[F](K);return this.init(),this},W.set=function(N,q){return this.clone().$set(N,q)},W.get=function(N){return this[V.p(N)]()},W.add=function(N,q){var D,Z=this;N=Number(N);var Q=V.p(q),F=function(pt){var dt=et(Z);return V.w(dt.date(dt.date()+Math.round(pt*N)),Z)};if(Q===g)return this.set(g,this.$M+N);if(Q===y)return this.set(y,this.$y+N);if(Q===d)return F(1);if(Q===f)return F(7);var K=(D={},D[l]=i,D[h]=s,D[c]=r,D)[Q]||1,ut=this.$d.getTime()+N*K;return V.w(ut,this)},W.subtract=function(N,q){return this.add(-1*N,q)},W.format=function(N){var q=this,D=this.$locale();if(!this.isValid())return D.invalidDate||C;var Z=N||"YYYY-MM-DDTHH:mm:ssZ",Q=V.z(this),F=this.$H,K=this.$m,ut=this.$M,pt=D.weekdays,dt=D.months,ht=D.meridiem,yt=function(Wt,ae,Ve,_e){return Wt&&(Wt[ae]||Wt(q,Z))||Ve[ae].slice(0,_e)},Lt=function(Wt){return V.s(F%12||12,Wt,"0")},Pt=ht||function(Wt,ae,Ve){var _e=Wt<12?"AM":"PM";return Ve?_e.toLowerCase():_e};return Z.replace(_,(function(Wt,ae){return ae||(function(Ve){switch(Ve){case"YY":return String(q.$y).slice(-2);case"YYYY":return V.s(q.$y,4,"0");case"M":return ut+1;case"MM":return V.s(ut+1,2,"0");case"MMM":return yt(D.monthsShort,ut,dt,3);case"MMMM":return yt(dt,ut);case"D":return q.$D;case"DD":return V.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return yt(D.weekdaysMin,q.$W,pt,2);case"ddd":return yt(D.weekdaysShort,q.$W,pt,3);case"dddd":return pt[q.$W];case"H":return String(F);case"HH":return V.s(F,2,"0");case"h":return Lt(1);case"hh":return Lt(2);case"a":return Pt(F,K,!0);case"A":return Pt(F,K,!1);case"m":return String(K);case"mm":return V.s(K,2,"0");case"s":return String(q.$s);case"ss":return V.s(q.$s,2,"0");case"SSS":return V.s(q.$ms,3,"0");case"Z":return Q}return null})(Wt)||Q.replace(":","")}))},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(N,q,D){var Z,Q=this,F=V.p(q),K=et(N),ut=(K.utcOffset()-this.utcOffset())*i,pt=this-K,dt=function(){return V.m(Q,K)};switch(F){case y:Z=dt()/12;break;case g:Z=dt();break;case m:Z=dt()/3;break;case f:Z=(pt-ut)/6048e5;break;case d:Z=(pt-ut)/864e5;break;case h:Z=pt/s;break;case l:Z=pt/i;break;case c:Z=pt/r;break;default:Z=pt}return D?Z:V.a(Z)},W.daysInMonth=function(){return this.endOf(g).$D},W.$locale=function(){return M[this.$L]},W.locale=function(N,q){if(!N)return this.$L;var D=this.clone(),Z=tt(N,q,!0);return Z&&(D.$L=Z),D},W.clone=function(){return V.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},Y})(),J=nt.prototype;return et.prototype=J,[["$ms",o],["$s",c],["$m",l],["$H",h],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function(Y){J[Y[1]]=function(W){return this.$g(W,Y[0],Y[1])}})),et.extend=function(Y,W){return Y.$i||(Y(W,nt,et),Y.$i=!0),et},et.locale=tt,et.isDayjs=O,et.unix=function(Y){return et(1e3*Y)},et.en=M[A],et.Ls=M,et.p={},et}))})(Oc)),Oc.exports}var mT=gT();const yT=mp(mT);var t1=Object.defineProperty,w=(e,t)=>t1(e,"name",{value:t,configurable:!0}),xT=(e,t)=>{for(var r in t)t1(e,r,{get:t[r],enumerable:!0})},Kn={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},rt={trace:w((...e)=>{},"trace"),debug:w((...e)=>{},"debug"),info:w((...e)=>{},"info"),warn:w((...e)=>{},"warn"),error:w((...e)=>{},"error"),fatal:w((...e)=>{},"fatal")},Lp=w(function(e="fatal"){let t=Kn.fatal;typeof e=="string"?e.toLowerCase()in Kn&&(t=Kn[e]):typeof e=="number"&&(t=e),rt.trace=()=>{},rt.debug=()=>{},rt.info=()=>{},rt.warn=()=>{},rt.error=()=>{},rt.fatal=()=>{},t<=Kn.fatal&&(rt.fatal=console.error?console.error.bind(console,Xr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Xr("FATAL"))),t<=Kn.error&&(rt.error=console.error?console.error.bind(console,Xr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Xr("ERROR"))),t<=Kn.warn&&(rt.warn=console.warn?console.warn.bind(console,Xr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Xr("WARN"))),t<=Kn.info&&(rt.info=console.info?console.info.bind(console,Xr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Xr("INFO"))),t<=Kn.debug&&(rt.debug=console.debug?console.debug.bind(console,Xr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xr("DEBUG"))),t<=Kn.trace&&(rt.trace=console.debug?console.debug.bind(console,Xr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xr("TRACE")))},"setLogLevel"),Xr=w(e=>`%c${yT().format("ss.SSS")} : ${e} : `,"format");const zc={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 s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return zc.hue2rgb(o,s,e+1/3)*255;case"g":return zc.hue2rgb(o,s,e)*255;case"b":return zc.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),c=(s+o)/2;if(i==="l")return c*100;if(s===o)return 0;const l=s-o,h=c>.5?l/(2-s-o):l/(s+o);if(i==="s")return h*100;switch(s){case e:return((t-r)/l+(t<r?6:0))*60;case t:return((r-e)/l+2)*60;case r:return((e-t)/l+4)*60;default:return-1}}},vT={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},bT={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},jt={channel:zc,lang:vT,unit:bT},Bi={};for(let e=0;e<=255;e++)Bi[e]=jt.unit.dec2hex(e);const tr={ALL:0,RGB:1,HSL:2};class CT{constructor(){this.type=tr.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=tr.ALL}is(t){return this.type===t}}class wT{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new CT}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=tr.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=jt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=jt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=jt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=jt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=jt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=jt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(tr.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(tr.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(tr.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(tr.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(tr.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(tr.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(tr.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(tr.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(tr.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(tr.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(tr.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(tr.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Pu=new wT({r:0,g:0,b:0,a:0},"transparent"),ia={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ia.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,c=s>4,l=c?1:17,h=c?8:4,d=o?0:-1,f=c?255:15;return Pu.set({r:(i>>h*(d+3)&f)*l,g:(i>>h*(d+2)&f)*l,b:(i>>h*(d+1)&f)*l,a:o?(i&f)*l/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Bi[Math.round(t)]}${Bi[Math.round(r)]}${Bi[Math.round(i)]}${Bi[Math.round(s*255)]}`:`#${Bi[Math.round(t)]}${Bi[Math.round(r)]}${Bi[Math.round(i)]}`}},us={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(us.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return jt.channel.clamp.h(parseFloat(r)*.9);case"rad":return jt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return jt.channel.clamp.h(parseFloat(r)*360)}}return jt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(us.re);if(!r)return;const[,i,s,o,c,l]=r;return Pu.set({h:us._hue2deg(i),s:jt.channel.clamp.s(parseFloat(s)),l:jt.channel.clamp.l(parseFloat(o)),a:c?jt.channel.clamp.a(l?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${jt.lang.round(t)}, ${jt.lang.round(r)}%, ${jt.lang.round(i)}%, ${s})`:`hsl(${jt.lang.round(t)}, ${jt.lang.round(r)}%, ${jt.lang.round(i)}%)`}},zo={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=zo.colors[e];if(t)return ia.parse(t)},stringify:e=>{const t=ia.stringify(e);for(const r in zo.colors)if(zo.colors[r]===t)return r}},Bo={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(Bo.re);if(!r)return;const[,i,s,o,c,l,h,d,f]=r;return Pu.set({r:jt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:jt.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:jt.channel.clamp.b(h?parseFloat(l)*2.55:parseFloat(l)),a:d?jt.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${jt.lang.round(t)}, ${jt.lang.round(r)}, ${jt.lang.round(i)}, ${jt.lang.round(s)})`:`rgb(${jt.lang.round(t)}, ${jt.lang.round(r)}, ${jt.lang.round(i)})`}},Dn={format:{keyword:zo,hex:ia,rgb:Bo,rgba:Bo,hsl:us,hsla:us},parse:e=>{if(typeof e!="string")return e;const t=ia.parse(e)||Bo.parse(e)||us.parse(e)||zo.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(tr.HSL)||e.data.r===void 0?us.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Bo.stringify(e):ia.stringify(e)},e1=(e,t)=>{const r=Dn.parse(e);for(const i in t)r[i]=jt.channel.clamp[i](t[i]);return Dn.stringify(r)},No=(e,t,r=0,i=1)=>{if(typeof e!="number")return e1(e,{a:t});const s=Pu.set({r:jt.channel.clamp.r(e),g:jt.channel.clamp.g(t),b:jt.channel.clamp.b(r),a:jt.channel.clamp.a(i)});return Dn.stringify(s)},kT=e=>{const{r:t,g:r,b:i}=Dn.parse(e),s=.2126*jt.channel.toLinear(t)+.7152*jt.channel.toLinear(r)+.0722*jt.channel.toLinear(i);return jt.lang.round(s)},ST=e=>kT(e)>=.5,il=e=>!ST(e),r1=(e,t,r)=>{const i=Dn.parse(e),s=i[t],o=jt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Dn.stringify(i)},bt=(e,t)=>r1(e,"l",t),Rt=(e,t)=>r1(e,"l",-t),H=(e,t)=>{const r=Dn.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return e1(e,i)},_T=(e,t,r=50)=>{const{r:i,g:s,b:o,a:c}=Dn.parse(e),{r:l,g:h,b:d,a:f}=Dn.parse(t),g=r/100,m=g*2-1,y=c-f,C=((m*y===-1?m:(m+y)/(1+m*y))+1)/2,k=1-C,_=i*C+l*k,T=s*C+h*k,E=o*C+d*k,B=c*g+f*(1-g);return No(_,T,E,B)},ft=(e,t=100)=>{const r=Dn.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_T(r,e,t)};var n1=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,jo=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,TT=/\s*%%.*\n/gm,oa,i1=(oa=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},w(oa,"UnknownDiagramError"),oa),xs={},Ep=w(function(e,t){e=e.replace(n1,"").replace(jo,"").replace(TT,`
|
|
102
|
-
`);for(const[r,{detector:i}]of Object.entries(xs))if(i(e,t))return r;throw new i1(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),wf=w((...e)=>{for(const{id:t,detector:r,loader:i}of e)s1(t,r,i)},"registerLazyLoadedDiagrams"),s1=w((e,t,r)=>{xs[e]&&rt.warn(`Detector with key ${e} already exists. Overwriting.`),xs[e]={detector:t,loader:r},rt.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),LT=w(e=>xs[e].loader,"getDiagramLoader"),kf=w((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>kf(e,o,s)),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"&&(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"),Re=kf,Ou="#ffffff",zu="#f2f2f2",fr=w((e,t)=>t?H(e,{s:-40,l:10}):H(e,{s:-40,l:-10}),"mkBorder"),la,ET=(la=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,s,o,c,l,h,d,f,g,m,y,v,C,k,_,T,E,B,A,M;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||fr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||fr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||fr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||fr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ft(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ft(this.tertiaryColor),this.lineColor=this.lineColor||ft(this.background),this.arrowheadColor=this.arrowheadColor||ft(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?Rt(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||Rt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ft(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||bt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Rt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||bt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||bt(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||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.darkMode)for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=Rt(this["cScale"+R],75);else for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=Rt(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||ft(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||bt(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||Rt(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||H(this.mainBkg,{h:180,s:-15,l:t*(5+R*3)}),this["surfacePeer"+R]=this["surfacePeer"+R]||H(this.mainBkg,{h:180,s:-15,l:t*(8+R*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||H(this.primaryColor,{h:64}),this.fillType3=this.fillType3||H(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||H(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||H(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||H(this.primaryColor,{h:128}),this.fillType7=this.fillType7||H(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||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-10}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((l=this.radar)==null?void 0:l.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||il(this.quadrant1Fill)?bt(this.quadrant1Fill):Rt(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Rt(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||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(this.git7,25)):(this.git0=Rt(this.git0,25),this.git1=Rt(this.git1,25),this.git2=Rt(this.git2,25),this.git3=Rt(this.git3,25),this.git4=Rt(this.git4,25),this.git5=Rt(this.git5,25),this.git6=Rt(this.git6,25),this.git7=Rt(this.git7,25)),this.gitInv0=this.gitInv0||ft(this.git0),this.gitInv1=this.gitInv1||ft(this.git1),this.gitInv2=this.gitInv2||ft(this.git2),this.gitInv3=this.gitInv3||ft(this.git3),this.gitInv4=this.gitInv4||ft(this.git4),this.gitInv5=this.gitInv5||ft(this.git5),this.gitInv6=this.gitInv6||ft(this.git6),this.gitInv7=this.gitInv7||ft(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||Ou,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zu}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]})}},w(la,"Theme"),la),MT=w(e=>{const t=new ET;return t.calculate(e),t},"getThemeVariables"),ca,BT=(ca=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=bt(this.primaryColor,16),this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.background),this.secondaryBorderColor=fr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ft(this.primaryColor),this.secondaryTextColor=ft(this.secondaryColor),this.tertiaryTextColor=ft(this.tertiaryColor),this.lineColor=ft(this.background),this.textColor=ft(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=bt(ft("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=No(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Rt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Rt(this.sectionBkgColor,10),this.taskBorderColor=No(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=No(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||bt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Rt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,s,o,c,l,h,d,f,g,m,y,v,C,k,_,T,E,B,A;this.secondBkg=bt(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=bt(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=bt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(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||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||ft(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||bt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||H(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||H(this.mainBkg,{h:30,s:-30,l:-(-7+M*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||il(this.quadrant1Fill)?bt(this.quadrant1Fill):Rt(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,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((A=this.radar)==null?void 0:A.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?Rt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=bt(this.secondaryColor,20),this.git1=bt(this.pie2||this.secondaryColor,20),this.git2=bt(this.pie3||this.tertiaryColor,20),this.git3=bt(this.pie4||H(this.primaryColor,{h:-30}),20),this.git4=bt(this.pie5||H(this.primaryColor,{h:-60}),20),this.git5=bt(this.pie6||H(this.primaryColor,{h:-90}),10),this.git6=bt(this.pie7||H(this.primaryColor,{h:60}),10),this.git7=bt(this.pie8||H(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ft(this.git0),this.gitInv1=this.gitInv1||ft(this.git1),this.gitInv2=this.gitInv2||ft(this.git2),this.gitInv3=this.gitInv3||ft(this.git3),this.gitInv4=this.gitInv4||ft(this.git4),this.gitInv5=this.gitInv5||ft(this.git5),this.gitInv6=this.gitInv6||ft(this.git6),this.gitInv7=this.gitInv7||ft(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ft(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ft(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||bt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||bt(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]})}},w(ca,"Theme"),ca),AT=w(e=>{const t=new BT;return t.calculate(e),t},"getThemeVariables"),ua,RT=(ua=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=H(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=fr(this.primaryColor,this.darkMode),this.secondaryBorderColor=fr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ft(this.primaryColor),this.secondaryTextColor=ft(this.secondaryColor),this.tertiaryTextColor=ft(this.tertiaryColor),this.lineColor=ft(this.background),this.textColor=ft(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=No(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,s,o,c,l,h,d,f,g,m,y,v,C,k,_,T,E,B,A;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Rt(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=Rt(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||Rt(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||H(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||H(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||H(this.mainBkg,{h:30,l:-(7+M*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ft(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ft(this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=bt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||bt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||bt(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=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||H(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-30}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||H(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||il(this.quadrant1Fill)?bt(this.quadrant1Fill):Rt(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,xAxisTitleColor:((y=this.xyChart)==null?void 0:y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_=this.xyChart)==null?void 0:_.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((T=this.xyChart)==null?void 0:T.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(this.git7,25)):(this.git0=Rt(this.git0,25),this.git1=Rt(this.git1,25),this.git2=Rt(this.git2,25),this.git3=Rt(this.git3,25),this.git4=Rt(this.git4,25),this.git5=Rt(this.git5,25),this.git6=Rt(this.git6,25),this.git7=Rt(this.git7,25)),this.gitInv0=this.gitInv0||Rt(ft(this.git0),25),this.gitInv1=this.gitInv1||ft(this.git1),this.gitInv2=this.gitInv2||ft(this.git2),this.gitInv3=this.gitInv3||ft(this.git3),this.gitInv4=this.gitInv4||ft(this.git4),this.gitInv5=this.gitInv5||ft(this.git5),this.gitInv6=this.gitInv6||ft(this.git6),this.gitInv7=this.gitInv7||ft(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ft(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ft(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||Ou,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zu}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]})}},w(ua,"Theme"),ua),$T=w(e=>{const t=new RT;return t.calculate(e),t},"getThemeVariables"),ha,FT=(ha=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=bt("#cde498",10),this.primaryBorderColor=fr(this.primaryColor,this.darkMode),this.secondaryBorderColor=fr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ft(this.primaryColor),this.secondaryTextColor=ft(this.secondaryColor),this.tertiaryTextColor=ft(this.primaryColor),this.lineColor=ft(this.background),this.textColor=ft(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,s,o,c,l,h,d,f,g,m,y,v,C,k,_,T,E,B,A;this.actorBorder=Rt(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||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Rt(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=Rt(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||Rt(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||H(this["cScale"+M],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||H(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||H(this.mainBkg,{h:30,s:-30,l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||bt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||bt(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=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(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||H(this.primaryColor,{l:-30}),this.pie5=this.pie5||H(this.secondaryColor,{l:-30}),this.pie6=this.pie6||H(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||il(this.quadrant1Fill)?bt(this.quadrant1Fill):Rt(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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,xAxisTitleColor:((y=this.xyChart)==null?void 0:y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_=this.xyChart)==null?void 0:_.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((T=this.xyChart)==null?void 0:T.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(this.git7,25)):(this.git0=Rt(this.git0,25),this.git1=Rt(this.git1,25),this.git2=Rt(this.git2,25),this.git3=Rt(this.git3,25),this.git4=Rt(this.git4,25),this.git5=Rt(this.git5,25),this.git6=Rt(this.git6,25),this.git7=Rt(this.git7,25)),this.gitInv0=this.gitInv0||ft(this.git0),this.gitInv1=this.gitInv1||ft(this.git1),this.gitInv2=this.gitInv2||ft(this.git2),this.gitInv3=this.gitInv3||ft(this.git3),this.gitInv4=this.gitInv4||ft(this.git4),this.gitInv5=this.gitInv5||ft(this.git5),this.gitInv6=this.gitInv6||ft(this.git6),this.gitInv7=this.gitInv7||ft(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ft(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ft(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||Ou,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zu}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]})}},w(ha,"Theme"),ha),DT=w(e=>{const t=new FT;return t.calculate(e),t},"getThemeVariables"),da,IT=(da=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=bt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=fr(this.primaryColor,this.darkMode),this.secondaryBorderColor=fr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ft(this.primaryColor),this.secondaryTextColor=ft(this.secondaryColor),this.tertiaryTextColor=ft(this.tertiaryColor),this.lineColor=ft(this.background),this.textColor=ft(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||bt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,s,o,c,l,h,d,f,g,m,y,v,C,k,_,T,E,B,A;this.secondBkg=bt(this.contrast,55),this.border2=this.contrast,this.actorBorder=bt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||ft(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||bt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||Rt(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||H(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||H(this.mainBkg,{l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=bt(this.contrast,30),this.sectionBkgColor2=bt(this.contrast,30),this.taskBorderColor=Rt(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=bt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Rt(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=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||il(this.quadrant1Fill)?bt(this.quadrant1Fill):Rt(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,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((A=this.radar)==null?void 0:A.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=Rt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||H(this.primaryColor,{h:-30}),this.git4=this.pie5||H(this.primaryColor,{h:-60}),this.git5=this.pie6||H(this.primaryColor,{h:-90}),this.git6=this.pie7||H(this.primaryColor,{h:60}),this.git7=this.pie8||H(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ft(this.git0),this.gitInv1=this.gitInv1||ft(this.git1),this.gitInv2=this.gitInv2||ft(this.git2),this.gitInv3=this.gitInv3||ft(this.git3),this.gitInv4=this.gitInv4||ft(this.git4),this.gitInv5=this.gitInv5||ft(this.git5),this.gitInv6=this.gitInv6||ft(this.git6),this.gitInv7=this.gitInv7||ft(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||Ou,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zu}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]})}},w(da,"Theme"),da),PT=w(e=>{const t=new IT;return t.calculate(e),t},"getThemeVariables"),ei={base:{getThemeVariables:MT},dark:{getThemeVariables:AT},default:{getThemeVariables:$T},forest:{getThemeVariables:DT},neutral:{getThemeVariables:PT}},Mn={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},a1={...Mn,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ei.default.getThemeVariables(),sequence:{...Mn.sequence,messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:w(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:w(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Mn.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Mn.c4,useWidth:void 0,personFont:w(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Mn.flowchart,inheritDir:!1},external_personFont:w(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:w(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:w(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:w(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:w(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:w(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:w(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:w(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:w(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:w(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:w(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:w(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:w(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:w(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:w(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:w(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:w(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:w(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:w(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:w(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Mn.pie,useWidth:984},xyChart:{...Mn.xyChart,useWidth:void 0},requirement:{...Mn.requirement,useWidth:void 0},packet:{...Mn.packet},radar:{...Mn.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},o1=w((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...o1(e[i],"")]:[...r,t+i],[]),"keyify"),OT=new Set(o1(a1,"")),l1=a1,eu=w(e=>{if(rt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>eu(t));return}for(const t of Object.keys(e)){if(rt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!OT.has(t)||e[t]==null){rt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){rt.debug("sanitizing object",t),eu(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(rt.debug("sanitizing css option",t),e[t]=zT(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]="")}rt.debug("After sanitization",e)}},"sanitizeDirective"),zT=w(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"),ga=Object.freeze(l1),Tr=Re({},ga),ru,vs=[],Wo=Re({},ga),Nu=w((e,t)=>{let r=Re({},e),i={};for(const s of t)h1(s),i=Re(i,s);if(r=Re(r,i),i.theme&&i.theme in ei){const s=Re({},ru),o=Re(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in ei&&(r.themeVariables=ei[r.theme].getThemeVariables(o))}return Wo=r,d1(Wo),Wo},"updateCurrentConfig"),NT=w(e=>(Tr=Re({},ga),Tr=Re(Tr,e),e.theme&&ei[e.theme]&&(Tr.themeVariables=ei[e.theme].getThemeVariables(e.themeVariables)),Nu(Tr,vs),Tr),"setSiteConfig"),jT=w(e=>{ru=Re({},e)},"saveConfigFromInitialize"),WT=w(e=>(Tr=Re(Tr,e),Nu(Tr,vs),Tr),"updateSiteConfig"),c1=w(()=>Re({},Tr),"getSiteConfig"),u1=w(e=>(d1(e),Re(Wo,e),rr()),"setConfig"),rr=w(()=>Re({},Wo),"getConfig"),h1=w(e=>{e&&(["secure",...Tr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(rt.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"&&h1(e[t])}))},"sanitize"),HT=w(e=>{var t;eu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),vs.push(e),Nu(Tr,vs)},"addDirective"),nu=w((e=Tr)=>{vs=[],Nu(e,vs)},"reset"),qT={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},xy={},UT=w(e=>{xy[e]||(rt.warn(qT[e]),xy[e]=!0)},"issueWarning"),d1=w(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&UT("LAZY_LOAD_DEPRECATED")},"checkConfig"),II=w(()=>{let e={};ru&&(e=Re(e,ru));for(const t of vs)e=Re(e,t);return e},"getUserDefinedConfig"),sl=/<br\s*\/?>/gi,YT=w(e=>e?g1(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),VT=(()=>{let e=!1;return()=>{e||(f1(),e=!0)}})();function f1(){const e="data-temp-href-target";Fi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Fi.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"))})}w(f1,"setupDompurifyHooks");var p1=w(e=>(VT(),Fi.sanitize(e)),"removeScript"),vy=w((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=p1(e):i!=="loose"&&(e=g1(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=KT(e))}return e},"sanitizeMore"),Kr=w((e,t)=>e&&(t.dompurifyConfig?e=Fi.sanitize(vy(e,t),t.dompurifyConfig).toString():e=Fi.sanitize(vy(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),GT=w((e,t)=>typeof e=="string"?Kr(e,t):e.flat().map(r=>Kr(r,t)),"sanitizeTextOrArray"),XT=w(e=>sl.test(e),"hasBreaks"),QT=w(e=>e.split(sl),"splitBreaks"),KT=w(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),g1=w(e=>e.replace(sl,"#br#"),"breakToPlaceholder"),ZT=w(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Fe=w(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),JT=w(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),t3=w(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),by=w(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],c=t[i+1];e3(o,c)&&(s=o+","+c,i++,r.pop())}r.push(r3(s))}return r.join("")},"parseGenericTypes"),Sf=w((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),e3=w((e,t)=>{const r=Sf(e,"~"),i=Sf(t,"~");return r===1&&i===1},"shouldCombineSets"),r3=w(e=>{const t=Sf(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Cy=w(()=>window.MathMLElement!==void 0,"isMathMLSupported"),_f=/\$\$(.*)\$\$/g,ma=w(e=>{var t;return(((t=e.match(_f))==null?void 0:t.length)??0)>0},"hasKatex"),PI=w(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Mp(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 s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),n3=w(async(e,t)=>{if(!ma(e))return e;if(!(Cy()||t.legacyMathML||t.forceLegacyMathML))return e.replace(_f,"MathML is unsupported in this environment.");{const{default:r}=await ee(async()=>{const{default:s}=await import("./katex-BlHpptmG.js");return{default:s}},[]),i=t.forceLegacyMathML||!Cy()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(sl).map(s=>ma(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(_f,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Mp=w(async(e,t)=>Kr(await n3(e,t),t),"renderKatexSanitized"),ka={getRows:YT,sanitizeText:Kr,sanitizeTextOrArray:GT,hasBreaks:XT,splitBreaks:QT,lineBreakRegex:sl,removeScript:p1,getUrl:ZT,evaluate:Fe,getMax:JT,getMin:t3},i3=w(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),s3=w(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"),m1=w(function(e,t,r,i){const s=s3(t,r,i);i3(e,s)},"configureSvgSize"),a3=w(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,c=s.height;rt.info(`SVG bounds: ${o}x${c}`,s);let l=0,h=0;rt.info(`Graph bounds: ${l}x${h}`,e),l=o+r*2,h=c+r*2,rt.info(`Calculated bounds: ${l}x${h}`),m1(t,h,l,i);const d=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",d)},"setupGraphViewbox"),Nc={},o3=w((e,t,r)=>{let i="";return e in Nc&&Nc[e]?i=Nc[e](r):rt.warn(`No theme found for ${e}`),` & {
|
|
103
|
-
font-family: ${r.fontFamily};
|
|
104
|
-
font-size: ${r.fontSize};
|
|
105
|
-
fill: ${r.textColor}
|
|
106
|
-
}
|
|
107
|
-
@keyframes edge-animation-frame {
|
|
108
|
-
from {
|
|
109
|
-
stroke-dashoffset: 0;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
@keyframes dash {
|
|
113
|
-
to {
|
|
114
|
-
stroke-dashoffset: 0;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
& .edge-animation-slow {
|
|
118
|
-
stroke-dasharray: 9,5 !important;
|
|
119
|
-
stroke-dashoffset: 900;
|
|
120
|
-
animation: dash 50s linear infinite;
|
|
121
|
-
stroke-linecap: round;
|
|
122
|
-
}
|
|
123
|
-
& .edge-animation-fast {
|
|
124
|
-
stroke-dasharray: 9,5 !important;
|
|
125
|
-
stroke-dashoffset: 900;
|
|
126
|
-
animation: dash 20s linear infinite;
|
|
127
|
-
stroke-linecap: round;
|
|
128
|
-
}
|
|
129
|
-
/* Classes common for multiple diagrams */
|
|
130
|
-
|
|
131
|
-
& .error-icon {
|
|
132
|
-
fill: ${r.errorBkgColor};
|
|
133
|
-
}
|
|
134
|
-
& .error-text {
|
|
135
|
-
fill: ${r.errorTextColor};
|
|
136
|
-
stroke: ${r.errorTextColor};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
& .edge-thickness-normal {
|
|
140
|
-
stroke-width: 1px;
|
|
141
|
-
}
|
|
142
|
-
& .edge-thickness-thick {
|
|
143
|
-
stroke-width: 3.5px
|
|
144
|
-
}
|
|
145
|
-
& .edge-pattern-solid {
|
|
146
|
-
stroke-dasharray: 0;
|
|
147
|
-
}
|
|
148
|
-
& .edge-thickness-invisible {
|
|
149
|
-
stroke-width: 0;
|
|
150
|
-
fill: none;
|
|
151
|
-
}
|
|
152
|
-
& .edge-pattern-dashed{
|
|
153
|
-
stroke-dasharray: 3;
|
|
154
|
-
}
|
|
155
|
-
.edge-pattern-dotted {
|
|
156
|
-
stroke-dasharray: 2;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
& .marker {
|
|
160
|
-
fill: ${r.lineColor};
|
|
161
|
-
stroke: ${r.lineColor};
|
|
162
|
-
}
|
|
163
|
-
& .marker.cross {
|
|
164
|
-
stroke: ${r.lineColor};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
& svg {
|
|
168
|
-
font-family: ${r.fontFamily};
|
|
169
|
-
font-size: ${r.fontSize};
|
|
170
|
-
}
|
|
171
|
-
& p {
|
|
172
|
-
margin: 0
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
${i}
|
|
176
|
-
|
|
177
|
-
${t}
|
|
178
|
-
`},"getStyles"),l3=w((e,t)=>{t!==void 0&&(Nc[e]=t)},"addStylesForDiagram"),c3=o3,y1={};xT(y1,{clear:()=>u3,getAccDescription:()=>p3,getAccTitle:()=>d3,getDiagramTitle:()=>m3,setAccDescription:()=>f3,setAccTitle:()=>h3,setDiagramTitle:()=>g3});var Bp="",Ap="",Rp="",$p=w(e=>Kr(e,rr()),"sanitizeText"),u3=w(()=>{Bp="",Rp="",Ap=""},"clear"),h3=w(e=>{Bp=$p(e).replace(/^\s+/g,"")},"setAccTitle"),d3=w(()=>Bp,"getAccTitle"),f3=w(e=>{Rp=$p(e).replace(/\n\s+/g,`
|
|
179
|
-
`)},"setAccDescription"),p3=w(()=>Rp,"getAccDescription"),g3=w(e=>{Ap=$p(e)},"setDiagramTitle"),m3=w(()=>Ap,"getDiagramTitle"),wy=rt,y3=Lp,ne=rr,OI=u1,zI=ga,Fp=w(e=>Kr(e,ne()),"sanitizeText"),x3=a3,v3=w(()=>y1,"getCommonDb"),iu={},su=w((e,t,r)=>{var i;iu[e]&&wy.warn(`Diagram with id ${e} already registered. Overwriting.`),iu[e]=t,r&&s1(e,r),l3(e,t.styles),(i=t.injectUtils)==null||i.call(t,wy,y3,ne,Fp,x3,v3(),()=>{})},"registerDiagram"),Tf=w(e=>{if(e in iu)return iu[e];throw new b3(e)},"getDiagram"),fa,b3=(fa=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},w(fa,"DiagramNotFoundError"),fa),C3={value:()=>{}};function x1(){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 jc(r)}function jc(e){this._=e}function w3(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}jc.prototype=x1.prototype={constructor:jc,on:function(e,t){var r=this._,i=w3(e+"",r),s,o=-1,c=i.length;if(arguments.length<2){for(;++o<c;)if((s=(e=i[o]).type)&&(s=k3(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<c;)if(s=(e=i[o]).type)r[s]=ky(r[s],e.name,t);else if(t==null)for(s in r)r[s]=ky(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new jc(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++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],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function k3(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function ky(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=C3,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Lf="http://www.w3.org/1999/xhtml";const Sy={svg:"http://www.w3.org/2000/svg",xhtml:Lf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ju(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sy.hasOwnProperty(t)?{space:Sy[t],local:e}:e}function S3(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Lf&&t.documentElement.namespaceURI===Lf?t.createElement(e):t.createElementNS(r,e)}}function _3(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function v1(e){var t=ju(e);return(t.local?_3:S3)(t)}function T3(){}function Dp(e){return e==null?T3:function(){return this.querySelector(e)}}function L3(e){typeof e!="function"&&(e=Dp(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],c=o.length,l=i[s]=new Array(c),h,d,f=0;f<c;++f)(h=o[f])&&(d=e.call(h,h.__data__,f,o))&&("__data__"in h&&(d.__data__=h.__data__),l[f]=d);return new zr(i,this._parents)}function E3(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function M3(){return[]}function b1(e){return e==null?M3:function(){return this.querySelectorAll(e)}}function B3(e){return function(){return E3(e.apply(this,arguments))}}function A3(e){typeof e=="function"?e=B3(e):e=b1(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var c=t[o],l=c.length,h,d=0;d<l;++d)(h=c[d])&&(i.push(e.call(h,h.__data__,d,c)),s.push(h));return new zr(i,s)}function C1(e){return function(){return this.matches(e)}}function w1(e){return function(t){return t.matches(e)}}var R3=Array.prototype.find;function $3(e){return function(){return R3.call(this.children,e)}}function F3(){return this.firstElementChild}function D3(e){return this.select(e==null?F3:$3(typeof e=="function"?e:w1(e)))}var I3=Array.prototype.filter;function P3(){return Array.from(this.children)}function O3(e){return function(){return I3.call(this.children,e)}}function z3(e){return this.selectAll(e==null?P3:O3(typeof e=="function"?e:w1(e)))}function N3(e){typeof e!="function"&&(e=C1(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],c=o.length,l=i[s]=[],h,d=0;d<c;++d)(h=o[d])&&e.call(h,h.__data__,d,o)&&l.push(h);return new zr(i,this._parents)}function k1(e){return new Array(e.length)}function j3(){return new zr(this._enter||this._groups.map(k1),this._parents)}function au(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}au.prototype={constructor:au,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 H3(e,t,r,i,s,o){for(var c=0,l,h=t.length,d=o.length;c<d;++c)(l=t[c])?(l.__data__=o[c],i[c]=l):r[c]=new au(e,o[c]);for(;c<h;++c)(l=t[c])&&(s[c]=l)}function q3(e,t,r,i,s,o,c){var l,h,d=new Map,f=t.length,g=o.length,m=new Array(f),y;for(l=0;l<f;++l)(h=t[l])&&(m[l]=y=c.call(h,h.__data__,l,t)+"",d.has(y)?s[l]=h:d.set(y,h));for(l=0;l<g;++l)y=c.call(e,o[l],l,o)+"",(h=d.get(y))?(i[l]=h,h.__data__=o[l],d.delete(y)):r[l]=new au(e,o[l]);for(l=0;l<f;++l)(h=t[l])&&d.get(m[l])===h&&(s[l]=h)}function U3(e){return e.__data__}function Y3(e,t){if(!arguments.length)return Array.from(this,U3);var r=t?q3:H3,i=this._parents,s=this._groups;typeof e!="function"&&(e=W3(e));for(var o=s.length,c=new Array(o),l=new Array(o),h=new Array(o),d=0;d<o;++d){var f=i[d],g=s[d],m=g.length,y=V3(e.call(f,f&&f.__data__,d,i)),v=y.length,C=l[d]=new Array(v),k=c[d]=new Array(v),_=h[d]=new Array(m);r(f,g,C,k,_,y,t);for(var T=0,E=0,B,A;T<v;++T)if(B=C[T]){for(T>=E&&(E=T+1);!(A=k[E])&&++E<v;);B._next=A||null}}return c=new zr(c,i),c._enter=l,c._exit=h,c}function V3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function G3(){return new zr(this._exit||this._groups.map(k1),this._parents)}function X3(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function Q3(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,c=Math.min(s,o),l=new Array(s),h=0;h<c;++h)for(var d=r[h],f=i[h],g=d.length,m=l[h]=new Array(g),y,v=0;v<g;++v)(y=d[v]||f[v])&&(m[v]=y);for(;h<s;++h)l[h]=r[h];return new zr(l,this._parents)}function K3(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],c;--s>=0;)(c=i[s])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function Z3(e){e||(e=J3);function t(g,m){return g&&m?e(g.__data__,m.__data__):!g-!m}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var c=r[o],l=c.length,h=s[o]=new Array(l),d,f=0;f<l;++f)(d=c[f])&&(h[f]=d);h.sort(t)}return new zr(s,this._parents).order()}function J3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function tL(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function eL(){return Array.from(this)}function rL(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var c=i[s];if(c)return c}return null}function nL(){let e=0;for(const t of this)++e;return e}function iL(){return!this.node()}function sL(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,c=s.length,l;o<c;++o)(l=s[o])&&e.call(l,l.__data__,o,s);return this}function aL(e){return function(){this.removeAttribute(e)}}function oL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function lL(e,t){return function(){this.setAttribute(e,t)}}function cL(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function uL(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function hL(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 dL(e,t){var r=ju(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?oL:aL:typeof t=="function"?r.local?hL:uL:r.local?cL:lL)(r,t))}function S1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fL(e){return function(){this.style.removeProperty(e)}}function pL(e,t,r){return function(){this.style.setProperty(e,t,r)}}function gL(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function mL(e,t,r){return arguments.length>1?this.each((t==null?fL:typeof t=="function"?gL:pL)(e,t,r??"")):ya(this.node(),e)}function ya(e,t){return e.style.getPropertyValue(t)||S1(e).getComputedStyle(e,null).getPropertyValue(t)}function yL(e){return function(){delete this[e]}}function xL(e,t){return function(){this[e]=t}}function vL(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function bL(e,t){return arguments.length>1?this.each((t==null?yL:typeof t=="function"?vL:xL)(e,t)):this.node()[e]}function _1(e){return e.trim().split(/^|\s+/)}function Ip(e){return e.classList||new T1(e)}function T1(e){this._node=e,this._names=_1(e.getAttribute("class")||"")}T1.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 L1(e,t){for(var r=Ip(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function E1(e,t){for(var r=Ip(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function CL(e){return function(){L1(this,e)}}function wL(e){return function(){E1(this,e)}}function kL(e,t){return function(){(t.apply(this,arguments)?L1:E1)(this,e)}}function SL(e,t){var r=_1(e+"");if(arguments.length<2){for(var i=Ip(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?kL:t?CL:wL)(r,t))}function _L(){this.textContent=""}function TL(e){return function(){this.textContent=e}}function LL(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function EL(e){return arguments.length?this.each(e==null?_L:(typeof e=="function"?LL:TL)(e)):this.node().textContent}function ML(){this.innerHTML=""}function BL(e){return function(){this.innerHTML=e}}function AL(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function RL(e){return arguments.length?this.each(e==null?ML:(typeof e=="function"?AL:BL)(e)):this.node().innerHTML}function $L(){this.nextSibling&&this.parentNode.appendChild(this)}function FL(){return this.each($L)}function DL(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function IL(){return this.each(DL)}function PL(e){var t=typeof e=="function"?e:v1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function OL(){return null}function zL(e,t){var r=typeof e=="function"?e:v1(e),i=t==null?OL:typeof t=="function"?t:Dp(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function NL(){var e=this.parentNode;e&&e.removeChild(this)}function jL(){return this.each(NL)}function WL(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function HL(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qL(e){return this.select(e?HL:WL)}function UL(e){return arguments.length?this.property("__data__",e):this.node().__data__}function YL(e){return function(t){e.call(this,t,this.__data__)}}function VL(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 GL(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++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 XL(e,t,r){return function(){var i=this.__on,s,o=YL(t);if(i){for(var c=0,l=i.length;c<l;++c)if((s=i[c]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function QL(e,t,r){var i=VL(e+""),s,o=i.length,c;if(arguments.length<2){var l=this.node().__on;if(l){for(var h=0,d=l.length,f;h<d;++h)for(s=0,f=l[h];s<o;++s)if((c=i[s]).type===f.type&&c.name===f.name)return f.value}return}for(l=t?XL:GL,s=0;s<o;++s)this.each(l(i[s],t,r));return this}function M1(e,t,r){var i=S1(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function KL(e,t){return function(){return M1(this,e,t)}}function ZL(e,t){return function(){return M1(this,e,t.apply(this,arguments))}}function JL(e,t){return this.each((typeof t=="function"?ZL:KL)(e,t))}function*tE(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,c;s<o;++s)(c=i[s])&&(yield c)}var B1=[null];function zr(e,t){this._groups=e,this._parents=t}function al(){return new zr([[document.documentElement]],B1)}function eE(){return this}zr.prototype=al.prototype={constructor:zr,select:L3,selectAll:A3,selectChild:D3,selectChildren:z3,filter:N3,data:Y3,enter:j3,exit:G3,join:X3,merge:Q3,selection:eE,order:K3,sort:Z3,call:tL,nodes:eL,node:rL,size:nL,empty:iL,each:sL,attr:dL,style:mL,property:bL,classed:SL,text:EL,html:RL,raise:FL,lower:IL,append:PL,insert:zL,remove:jL,clone:qL,datum:UL,on:QL,dispatch:JL,[Symbol.iterator]:tE};function Xt(e){return typeof e=="string"?new zr([[document.querySelector(e)]],[document.documentElement]):new zr([[e]],B1)}function Pp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function A1(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ol(){}var qo=.7,ou=1/qo,sa="\\s*([+-]?\\d+)\\s*",Uo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rE=/^#([0-9a-f]{3,8})$/,nE=new RegExp(`^rgb\\(${sa},${sa},${sa}\\)$`),iE=new RegExp(`^rgb\\(${Fn},${Fn},${Fn}\\)$`),sE=new RegExp(`^rgba\\(${sa},${sa},${sa},${Uo}\\)$`),aE=new RegExp(`^rgba\\(${Fn},${Fn},${Fn},${Uo}\\)$`),oE=new RegExp(`^hsl\\(${Uo},${Fn},${Fn}\\)$`),lE=new RegExp(`^hsla\\(${Uo},${Fn},${Fn},${Uo}\\)$`),_y={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};Pp(ol,Yo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ty,formatHex:Ty,formatHex8:cE,formatHsl:uE,formatRgb:Ly,toString:Ly});function Ty(){return this.rgb().formatHex()}function cE(){return this.rgb().formatHex8()}function uE(){return R1(this).formatHsl()}function Ly(){return this.rgb().formatRgb()}function Yo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=rE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ey(t):r===3?new Er(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?_c(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?_c(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=nE.exec(e))?new Er(t[1],t[2],t[3],1):(t=iE.exec(e))?new Er(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sE.exec(e))?_c(t[1],t[2],t[3],t[4]):(t=aE.exec(e))?_c(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oE.exec(e))?Ay(t[1],t[2]/100,t[3]/100,1):(t=lE.exec(e))?Ay(t[1],t[2]/100,t[3]/100,t[4]):_y.hasOwnProperty(e)?Ey(_y[e]):e==="transparent"?new Er(NaN,NaN,NaN,0):null}function Ey(e){return new Er(e>>16&255,e>>8&255,e&255,1)}function _c(e,t,r,i){return i<=0&&(e=t=r=NaN),new Er(e,t,r,i)}function hE(e){return e instanceof ol||(e=Yo(e)),e?(e=e.rgb(),new Er(e.r,e.g,e.b,e.opacity)):new Er}function Ef(e,t,r,i){return arguments.length===1?hE(e):new Er(e,t,r,i??1)}function Er(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Pp(Er,Ef,A1(ol,{brighter(e){return e=e==null?ou:Math.pow(ou,e),new Er(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qo:Math.pow(qo,e),new Er(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Er(gs(this.r),gs(this.g),gs(this.b),lu(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:My,formatHex:My,formatHex8:dE,formatRgb:By,toString:By}));function My(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function dE(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function By(){const e=lu(this.opacity);return`${e===1?"rgb(":"rgba("}${gs(this.r)}, ${gs(this.g)}, ${gs(this.b)}${e===1?")":`, ${e})`}`}function lu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hs(e){return e=gs(e),(e<16?"0":"")+e.toString(16)}function Ay(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,r,i)}function R1(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof ol||(e=Yo(e)),!e)return new yn;if(e instanceof yn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),c=NaN,l=o-s,h=(o+s)/2;return l?(t===o?c=(r-i)/l+(r<i)*6:r===o?c=(i-t)/l+2:c=(t-r)/l+4,l/=h<.5?o+s:2-o-s,c*=60):l=h>0&&h<1?0:c,new yn(c,l,h,e.opacity)}function fE(e,t,r,i){return arguments.length===1?R1(e):new yn(e,t,r,i??1)}function yn(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Pp(yn,fE,A1(ol,{brighter(e){return e=e==null?ou:Math.pow(ou,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qo:Math.pow(qo,e),new yn(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,s=2*r-i;return new Er(Jd(e>=240?e-240:e+120,s,i),Jd(e,s,i),Jd(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new yn(Ry(this.h),Tc(this.s),Tc(this.l),lu(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=lu(this.opacity);return`${e===1?"hsl(":"hsla("}${Ry(this.h)}, ${Tc(this.s)*100}%, ${Tc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ry(e){return e=(e||0)%360,e<0?e+360:e}function Tc(e){return Math.max(0,Math.min(1,e||0))}function Jd(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 Op=e=>()=>e;function $1(e,t){return function(r){return e+r*t}}function pE(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 NI(e,t){var r=t-e;return r?$1(e,r>180||r<-180?r-360*Math.round(r/360):r):Op(isNaN(e)?t:e)}function gE(e){return(e=+e)==1?F1:function(t,r){return r-t?pE(t,r,e):Op(isNaN(t)?r:t)}}function F1(e,t){var r=t-e;return r?$1(e,r):Op(isNaN(e)?t:e)}const $y=(function e(t){var r=gE(t);function i(s,o){var c=r((s=Ef(s)).r,(o=Ef(o)).r),l=r(s.g,o.g),h=r(s.b,o.b),d=F1(s.opacity,o.opacity);return function(f){return s.r=c(f),s.g=l(f),s.b=h(f),s.opacity=d(f),s+""}}return i.gamma=e,i})(1);function Ai(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Mf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tf=new RegExp(Mf.source,"g");function mE(e){return function(){return e}}function yE(e){return function(t){return e(t)+""}}function xE(e,t){var r=Mf.lastIndex=tf.lastIndex=0,i,s,o,c=-1,l=[],h=[];for(e=e+"",t=t+"";(i=Mf.exec(e))&&(s=tf.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),l[c]?l[c]+=o:l[++c]=o),(i=i[0])===(s=s[0])?l[c]?l[c]+=s:l[++c]=s:(l[++c]=null,h.push({i:c,x:Ai(i,s)})),r=tf.lastIndex;return r<t.length&&(o=t.slice(r),l[c]?l[c]+=o:l[++c]=o),l.length<2?h[0]?yE(h[0].x):mE(t):(t=h.length,function(d){for(var f=0,g;f<t;++f)l[(g=h[f]).i]=g.x(d);return l.join("")})}var Fy=180/Math.PI,Bf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function D1(e,t,r,i,s,o){var c,l,h;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(h=e*r+t*i)&&(r-=e*h,i-=t*h),(l=Math.sqrt(r*r+i*i))&&(r/=l,i/=l,h/=l),e*i<t*r&&(e=-e,t=-t,h=-h,c=-c),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Fy,skewX:Math.atan(h)*Fy,scaleX:c,scaleY:l}}var Lc;function vE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bf:D1(t.a,t.b,t.c,t.d,t.e,t.f)}function bE(e){return e==null||(Lc||(Lc=document.createElementNS("http://www.w3.org/2000/svg","g")),Lc.setAttribute("transform",e),!(e=Lc.transform.baseVal.consolidate()))?Bf:(e=e.matrix,D1(e.a,e.b,e.c,e.d,e.e,e.f))}function I1(e,t,r,i){function s(d){return d.length?d.pop()+" ":""}function o(d,f,g,m,y,v){if(d!==g||f!==m){var C=y.push("translate(",null,t,null,r);v.push({i:C-4,x:Ai(d,g)},{i:C-2,x:Ai(f,m)})}else(g||m)&&y.push("translate("+g+t+m+r)}function c(d,f,g,m){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),m.push({i:g.push(s(g)+"rotate(",null,i)-2,x:Ai(d,f)})):f&&g.push(s(g)+"rotate("+f+i)}function l(d,f,g,m){d!==f?m.push({i:g.push(s(g)+"skewX(",null,i)-2,x:Ai(d,f)}):f&&g.push(s(g)+"skewX("+f+i)}function h(d,f,g,m,y,v){if(d!==g||f!==m){var C=y.push(s(y)+"scale(",null,",",null,")");v.push({i:C-4,x:Ai(d,g)},{i:C-2,x:Ai(f,m)})}else(g!==1||m!==1)&&y.push(s(y)+"scale("+g+","+m+")")}return function(d,f){var g=[],m=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,g,m),c(d.rotate,f.rotate,g,m),l(d.skewX,f.skewX,g,m),h(d.scaleX,d.scaleY,f.scaleX,f.scaleY,g,m),d=f=null,function(y){for(var v=-1,C=m.length,k;++v<C;)g[(k=m[v]).i]=k.x(y);return g.join("")}}}var CE=I1(vE,"px, ","px)","deg)"),wE=I1(bE,", ",")",")"),xa=0,Ao=0,So=0,P1=1e3,cu,Ro,uu=0,bs=0,Wu=0,Vo=typeof performance=="object"&&performance.now?performance:Date,O1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zp(){return bs||(O1(kE),bs=Vo.now()+Wu)}function kE(){bs=0}function hu(){this._call=this._time=this._next=null}hu.prototype=z1.prototype={constructor:hu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?zp():+r)+(t==null?0:+t),!this._next&&Ro!==this&&(Ro?Ro._next=this:cu=this,Ro=this),this._call=e,this._time=r,Af()},stop:function(){this._call&&(this._call=null,this._time=1/0,Af())}};function z1(e,t,r){var i=new hu;return i.restart(e,t,r),i}function SE(){zp(),++xa;for(var e=cu,t;e;)(t=bs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xa}function Dy(){bs=(uu=Vo.now())+Wu,xa=Ao=0;try{SE()}finally{xa=0,TE(),bs=0}}function _E(){var e=Vo.now(),t=e-uu;t>P1&&(Wu-=t,uu=e)}function TE(){for(var e,t=cu,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:cu=r);Ro=e,Af(i)}function Af(e){if(!xa){Ao&&(Ao=clearTimeout(Ao));var t=e-bs;t>24?(e<1/0&&(Ao=setTimeout(Dy,e-Vo.now()-Wu)),So&&(So=clearInterval(So))):(So||(uu=Vo.now(),So=setInterval(_E,P1)),xa=1,O1(Dy))}}function Iy(e,t,r){var i=new hu;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var LE=x1("start","end","cancel","interrupt"),EE=[],N1=0,Py=1,Rf=2,Wc=3,Oy=4,$f=5,Hc=6;function Hu(e,t,r,i,s,o){var c=e.__transition;if(!c)e.__transition={};else if(r in c)return;ME(e,r,{name:t,index:i,group:s,on:LE,tween:EE,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:N1})}function Np(e,t){var r=Cn(e,t);if(r.state>N1)throw new Error("too late; already scheduled");return r}function Pn(e,t){var r=Cn(e,t);if(r.state>Wc)throw new Error("too late; already running");return r}function Cn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function ME(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=z1(o,0,r.time);function o(d){r.state=Py,r.timer.restart(c,r.delay,r.time),r.delay<=d&&c(d-r.delay)}function c(d){var f,g,m,y;if(r.state!==Py)return h();for(f in i)if(y=i[f],y.name===r.name){if(y.state===Wc)return Iy(c);y.state===Oy?(y.state=Hc,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete i[f]):+f<t&&(y.state=Hc,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete i[f])}if(Iy(function(){r.state===Wc&&(r.state=Oy,r.timer.restart(l,r.delay,r.time),l(d))}),r.state=Rf,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Rf){for(r.state=Wc,s=new Array(m=r.tween.length),f=0,g=-1;f<m;++f)(y=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(s[++g]=y);s.length=g+1}}function l(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(h),r.state=$f,1),g=-1,m=s.length;++g<m;)s[g].call(e,f);r.state===$f&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=Hc,r.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function BE(e,t){var r=e.__transition,i,s,o=!0,c;if(r){t=t==null?null:t+"";for(c in r){if((i=r[c]).name!==t){o=!1;continue}s=i.state>Rf&&i.state<$f,i.state=Hc,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[c]}o&&delete e.__transition}}function AE(e){return this.each(function(){BE(this,e)})}function RE(e,t){var r,i;return function(){var s=Pn(this,e),o=s.tween;if(o!==r){i=r=o;for(var c=0,l=i.length;c<l;++c)if(i[c].name===t){i=i.slice(),i.splice(c,1);break}}s.tween=i}}function $E(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=Pn(this,e),c=o.tween;if(c!==i){s=(i=c).slice();for(var l={name:t,value:r},h=0,d=s.length;h<d;++h)if(s[h].name===t){s[h]=l;break}h===d&&s.push(l)}o.tween=s}}function FE(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Cn(this.node(),r).tween,s=0,o=i.length,c;s<o;++s)if((c=i[s]).name===e)return c.value;return null}return this.each((t==null?RE:$E)(r,e,t))}function jp(e,t,r){var i=e._id;return e.each(function(){var s=Pn(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Cn(s,i).value[t]}}function j1(e,t){var r;return(typeof t=="number"?Ai:t instanceof Yo?$y:(r=Yo(t))?(t=r,$y):xE)(e,t)}function DE(e){return function(){this.removeAttribute(e)}}function IE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PE(e,t,r){var i,s=r+"",o;return function(){var c=this.getAttribute(e);return c===s?null:c===i?o:o=t(i=c,r)}}function OE(e,t,r){var i,s=r+"",o;return function(){var c=this.getAttributeNS(e.space,e.local);return c===s?null:c===i?o:o=t(i=c,r)}}function zE(e,t,r){var i,s,o;return function(){var c,l=r(this),h;return l==null?void this.removeAttribute(e):(c=this.getAttribute(e),h=l+"",c===h?null:c===i&&h===s?o:(s=h,o=t(i=c,l)))}}function NE(e,t,r){var i,s,o;return function(){var c,l=r(this),h;return l==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),h=l+"",c===h?null:c===i&&h===s?o:(s=h,o=t(i=c,l)))}}function jE(e,t){var r=ju(e),i=r==="transform"?wE:j1;return this.attrTween(e,typeof t=="function"?(r.local?NE:zE)(r,i,jp(this,"attr."+e,t)):t==null?(r.local?IE:DE)(r):(r.local?OE:PE)(r,i,t))}function WE(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function HE(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function qE(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&HE(e,o)),r}return s._value=t,s}function UE(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&WE(e,o)),r}return s._value=t,s}function YE(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=ju(e);return this.tween(r,(i.local?qE:UE)(i,t))}function VE(e,t){return function(){Np(this,e).delay=+t.apply(this,arguments)}}function GE(e,t){return t=+t,function(){Np(this,e).delay=t}}function XE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?VE:GE)(t,e)):Cn(this.node(),t).delay}function QE(e,t){return function(){Pn(this,e).duration=+t.apply(this,arguments)}}function KE(e,t){return t=+t,function(){Pn(this,e).duration=t}}function ZE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?QE:KE)(t,e)):Cn(this.node(),t).duration}function JE(e,t){if(typeof t!="function")throw new Error;return function(){Pn(this,e).ease=t}}function tM(e){var t=this._id;return arguments.length?this.each(JE(t,e)):Cn(this.node(),t).ease}function eM(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Pn(this,e).ease=r}}function rM(e){if(typeof e!="function")throw new Error;return this.each(eM(this._id,e))}function nM(e){typeof e!="function"&&(e=C1(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],c=o.length,l=i[s]=[],h,d=0;d<c;++d)(h=o[d])&&e.call(h,h.__data__,d,o)&&l.push(h);return new ni(i,this._parents,this._name,this._id)}function iM(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),c=new Array(i),l=0;l<o;++l)for(var h=t[l],d=r[l],f=h.length,g=c[l]=new Array(f),m,y=0;y<f;++y)(m=h[y]||d[y])&&(g[y]=m);for(;l<i;++l)c[l]=t[l];return new ni(c,this._parents,this._name,this._id)}function sM(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 aM(e,t,r){var i,s,o=sM(t)?Np:Pn;return function(){var c=o(this,e),l=c.on;l!==i&&(s=(i=l).copy()).on(t,r),c.on=s}}function oM(e,t){var r=this._id;return arguments.length<2?Cn(this.node(),r).on.on(e):this.each(aM(r,e,t))}function lM(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function cM(){return this.on("end.remove",lM(this._id))}function uM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Dp(e));for(var i=this._groups,s=i.length,o=new Array(s),c=0;c<s;++c)for(var l=i[c],h=l.length,d=o[c]=new Array(h),f,g,m=0;m<h;++m)(f=l[m])&&(g=e.call(f,f.__data__,m,l))&&("__data__"in f&&(g.__data__=f.__data__),d[m]=g,Hu(d[m],t,r,m,d,Cn(f,r)));return new ni(o,this._parents,t,r)}function hM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=b1(e));for(var i=this._groups,s=i.length,o=[],c=[],l=0;l<s;++l)for(var h=i[l],d=h.length,f,g=0;g<d;++g)if(f=h[g]){for(var m=e.call(f,f.__data__,g,h),y,v=Cn(f,r),C=0,k=m.length;C<k;++C)(y=m[C])&&Hu(y,t,r,C,m,v);o.push(m),c.push(f)}return new ni(o,c,t,r)}var dM=al.prototype.constructor;function fM(){return new dM(this._groups,this._parents)}function pM(e,t){var r,i,s;return function(){var o=ya(this,e),c=(this.style.removeProperty(e),ya(this,e));return o===c?null:o===r&&c===i?s:s=t(r=o,i=c)}}function W1(e){return function(){this.style.removeProperty(e)}}function gM(e,t,r){var i,s=r+"",o;return function(){var c=ya(this,e);return c===s?null:c===i?o:o=t(i=c,r)}}function mM(e,t,r){var i,s,o;return function(){var c=ya(this,e),l=r(this),h=l+"";return l==null&&(h=l=(this.style.removeProperty(e),ya(this,e))),c===h?null:c===i&&h===s?o:(s=h,o=t(i=c,l))}}function yM(e,t){var r,i,s,o="style."+t,c="end."+o,l;return function(){var h=Pn(this,e),d=h.on,f=h.value[o]==null?l||(l=W1(t)):void 0;(d!==r||s!==f)&&(i=(r=d).copy()).on(c,s=f),h.on=i}}function xM(e,t,r){var i=(e+="")=="transform"?CE:j1;return t==null?this.styleTween(e,pM(e,i)).on("end.style."+e,W1(e)):typeof t=="function"?this.styleTween(e,mM(e,i,jp(this,"style."+e,t))).each(yM(this._id,e)):this.styleTween(e,gM(e,i,t),r).on("end.style."+e,null)}function vM(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function bM(e,t,r){var i,s;function o(){var c=t.apply(this,arguments);return c!==s&&(i=(s=c)&&vM(e,c,r)),i}return o._value=t,o}function CM(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,bM(e,t,r??""))}function wM(e){return function(){this.textContent=e}}function kM(e){return function(){var t=e(this);this.textContent=t??""}}function SM(e){return this.tween("text",typeof e=="function"?kM(jp(this,"text",e)):wM(e==null?"":e+""))}function _M(e){return function(t){this.textContent=e.call(this,t)}}function TM(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&_M(s)),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,TM(e))}function EM(){for(var e=this._name,t=this._id,r=H1(),i=this._groups,s=i.length,o=0;o<s;++o)for(var c=i[o],l=c.length,h,d=0;d<l;++d)if(h=c[d]){var f=Cn(h,t);Hu(h,e,r,d,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ni(i,this._parents,e,r)}function MM(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,c){var l={value:c},h={value:function(){--s===0&&o()}};r.each(function(){var d=Pn(this,i),f=d.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(h)),d.on=t}),s===0&&o()})}var BM=0;function ni(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function H1(){return++BM}var Zn=al.prototype;ni.prototype={constructor:ni,select:uM,selectAll:hM,selectChild:Zn.selectChild,selectChildren:Zn.selectChildren,filter:nM,merge:iM,selection:fM,transition:EM,call:Zn.call,nodes:Zn.nodes,node:Zn.node,size:Zn.size,empty:Zn.empty,each:Zn.each,on:oM,attr:jE,attrTween:YE,style:xM,styleTween:CM,text:SM,textTween:LM,remove:cM,tween:FE,delay:XE,duration:ZE,ease:tM,easeVarying:rM,end:MM,[Symbol.iterator]:Zn[Symbol.iterator]};function AM(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var RM={time:null,delay:0,duration:250,ease:AM};function $M(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 FM(e){var t,r;e instanceof ni?(t=e._id,e=e._name):(t=H1(),(r=RM).time=zp(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var c=i[o],l=c.length,h,d=0;d<l;++d)(h=c[d])&&Hu(h,e,t,d,c,r||$M(h,t));return new ni(i,this._parents,e,t)}al.prototype.interrupt=AE;al.prototype.transition=FM;const Ff=Math.PI,Df=2*Ff,os=1e-6,DM=Df-os;function q1(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function IM(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return q1;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class PM{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?q1:IM(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,c){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+c}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,l=this._y1,h=i-t,d=s-r,f=c-t,g=l-r,m=f*f+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(m>os)if(!(Math.abs(g*h-d*f)>os)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let y=i-c,v=s-l,C=h*h+d*d,k=y*y+v*v,_=Math.sqrt(C),T=Math.sqrt(m),E=o*Math.tan((Ff-Math.acos((C+m-k)/(2*_*T)))/2),B=E/T,A=E/_;Math.abs(B-1)>os&&this._append`L${t+B*f},${r+B*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=t+A*h},${this._y1=r+A*d}`}}arc(t,r,i,s,o,c){if(t=+t,r=+r,i=+i,c=!!c,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(s),h=i*Math.sin(s),d=t+l,f=r+h,g=1^c,m=c?s-o:o-s;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>os||Math.abs(this._y1-f)>os)&&this._append`L${d},${f}`,i&&(m<0&&(m=m%Df+Df),m>DM?this._append`A${i},${i},0,1,${g},${t-l},${r-h}A${i},${i},0,1,${g},${this._x1=d},${this._y1=f}`:m>os&&this._append`A${i},${i},0,${+(m>=Ff)},${g},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Js(e){return function(){return e}}const jI=Math.abs,WI=Math.atan2,HI=Math.cos,qI=Math.max,UI=Math.min,YI=Math.sin,VI=Math.sqrt,zy=1e-12,Wp=Math.PI,Ny=Wp/2,GI=2*Wp;function XI(e){return e>1?0:e<-1?Wp:Math.acos(e)}function QI(e){return e>=1?Ny:e<=-1?-Ny:Math.asin(e)}function OM(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 PM(t)}function zM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function U1(e){this._context=e}U1.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 du(e){return new U1(e)}function NM(e){return e[0]}function jM(e){return e[1]}function WM(e,t){var r=Js(!0),i=null,s=du,o=null,c=OM(l);e=typeof e=="function"?e:e===void 0?NM:Js(e),t=typeof t=="function"?t:t===void 0?jM:Js(t);function l(h){var d,f=(h=zM(h)).length,g,m=!1,y;for(i==null&&(o=s(y=c())),d=0;d<=f;++d)!(d<f&&r(g=h[d],d,h))===m&&((m=!m)?o.lineStart():o.lineEnd()),m&&o.point(+e(g,d,h),+t(g,d,h));if(y)return o=null,y+""||null}return l.x=function(h){return arguments.length?(e=typeof h=="function"?h:Js(+h),l):e},l.y=function(h){return arguments.length?(t=typeof h=="function"?h:Js(+h),l):t},l.defined=function(h){return arguments.length?(r=typeof h=="function"?h:Js(!!h),l):r},l.curve=function(h){return arguments.length?(s=h,i!=null&&(o=s(i)),l):s},l.context=function(h){return arguments.length?(h==null?i=o=null:o=s(i=h),l):i},l}class Y1{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 V1(e){return new Y1(e,!0)}function G1(e){return new Y1(e,!1)}function Di(){}function fu(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 qu(e){this._context=e}qu.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:fu(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:fu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qc(e){return new qu(e)}function X1(e){this._context=e}X1.prototype={areaStart:Di,areaEnd:Di,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:fu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function HM(e){return new X1(e)}function Q1(e){this._context=e}Q1.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:fu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qM(e){return new Q1(e)}function K1(e,t){this._basis=new qu(e),this._beta=t}K1.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],s=t[0],o=e[r]-i,c=t[r]-s,l=-1,h;++l<=r;)h=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+h*o),this._beta*t[l]+(1-this._beta)*(s+h*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const UM=(function e(t){function r(i){return t===1?new qu(i):new K1(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function pu(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 Hp(e,t){this._context=e,this._k=(1-t)/6}Hp.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:pu(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:pu(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 Z1=(function e(t){function r(i){return new Hp(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qp(e,t){this._context=e,this._k=(1-t)/6}qp.prototype={areaStart:Di,areaEnd:Di,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:pu(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 YM=(function e(t){function r(i){return new qp(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Up(e,t){this._context=e,this._k=(1-t)/6}Up.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:pu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const VM=(function e(t){function r(i){return new Up(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Yp(e,t,r){var i=e._x1,s=e._y1,o=e._x2,c=e._y2;if(e._l01_a>zy){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,s=(s*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>zy){var d=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*d+e._x1*e._l23_2a-t*e._l12_2a)/f,c=(c*d+e._y1*e._l23_2a-r*e._l12_2a)/f}e._context.bezierCurveTo(i,s,o,c,e._x2,e._y2)}function J1(e,t){this._context=e,this._alpha=t}J1.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:Yp(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 tv=(function e(t){function r(i){return t?new J1(i,t):new Hp(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ev(e,t){this._context=e,this._alpha=t}ev.prototype={areaStart:Di,areaEnd:Di,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:Yp(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 GM=(function e(t){function r(i){return t?new ev(i,t):new qp(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rv(e,t){this._context=e,this._alpha=t}rv.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:Yp(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 XM=(function e(t){function r(i){return t?new rv(i,t):new Up(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function nv(e){this._context=e}nv.prototype={areaStart:Di,areaEnd:Di,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function QM(e){return new nv(e)}function jy(e){return e<0?-1:1}function Wy(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),c=(r-e._y1)/(s||i<0&&-0),l=(o*s+c*i)/(i+s);return(jy(o)+jy(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(l))||0}function Hy(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ef(e,t,r){var i=e._x0,s=e._y0,o=e._x1,c=e._y1,l=(o-i)/3;e._context.bezierCurveTo(i+l,s+l*t,o-l,c-l*r,o,c)}function gu(e){this._context=e}gu.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:ef(this,this._t0,Hy(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,ef(this,Hy(this,r=Wy(this,e,t)),r);break;default:ef(this,this._t0,r=Wy(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function iv(e){this._context=new sv(e)}(iv.prototype=Object.create(gu.prototype)).point=function(e,t){gu.prototype.point.call(this,t,e)};function sv(e){this._context=e}sv.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,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function av(e){return new gu(e)}function ov(e){return new iv(e)}function lv(e){this._context=e}lv.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=qy(e),s=qy(t),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[c],t[c]);(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 qy(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),c=new Array(r);for(s[0]=0,o[0]=2,c[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,c[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,c[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,c[t]-=i*c[t-1];for(s[r-1]=c[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(c[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function cv(e){return new lv(e)}function Uu(e,t){this._context=e,this._t=t}Uu.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 uv(e){return new Uu(e,.5)}function hv(e){return new Uu(e,0)}function dv(e){return new Uu(e,1)}function $o(e,t,r){this.k=e,this.x=t,this.y=r}$o.prototype={constructor:$o,scale:function(e){return e===1?this:new $o(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $o(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+")"}};$o.prototype;var KM=w(e=>{var s;const{securityLevel:t}=ne();let r=Xt("body");if(t==="sandbox"){const c=((s=Xt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Xt(c.body)}return r.select(`#${e}`)},"selectSvgElement");function Vp(e){return typeof e>"u"||e===null}w(Vp,"isNothing");function fv(e){return typeof e=="object"&&e!==null}w(fv,"isObject");function pv(e){return Array.isArray(e)?e:Vp(e)?[]:[e]}w(pv,"toArray");function gv(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}w(gv,"extend");function mv(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}w(mv,"repeat");function yv(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}w(yv,"isNegativeZero");var ZM=Vp,JM=fv,tB=pv,eB=mv,rB=yv,nB=gv,$e={isNothing:ZM,isObject:JM,toArray:tB,repeat:eB,isNegativeZero:rB,extend:nB};function Gp(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+=`
|
|
180
|
-
|
|
181
|
-
`+e.mark.snippet),i+" "+r):i}w(Gp,"formatError");function va(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Gp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}w(va,"YAMLException$1");va.prototype=Object.create(Error.prototype);va.prototype.constructor=va;va.prototype.toString=w(function(t){return this.name+": "+Gp(this,t)},"toString");var Lr=va;function Uc(e,t,r,i,s){var o="",c="",l=Math.floor(s/2)-1;return i-t>l&&(o=" ... ",t=i-l+o.length),r-i>l&&(c=" ...",r=i+l-c.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+c,pos:i-t+o.length}}w(Uc,"getLine");function Yc(e,t){return $e.repeat(" ",t-e.length)+e}w(Yc,"padStart");function xv(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],s=[],o,c=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&c<0&&(c=i.length-2);c<0&&(c=i.length-1);var l="",h,d,f=Math.min(e.line+t.linesAfter,s.length).toString().length,g=t.maxLength-(t.indent+f+3);for(h=1;h<=t.linesBefore&&!(c-h<0);h++)d=Uc(e.buffer,i[c-h],s[c-h],e.position-(i[c]-i[c-h]),g),l=$e.repeat(" ",t.indent)+Yc((e.line-h+1).toString(),f)+" | "+d.str+`
|
|
182
|
-
`+l;for(d=Uc(e.buffer,i[c],s[c],e.position,g),l+=$e.repeat(" ",t.indent)+Yc((e.line+1).toString(),f)+" | "+d.str+`
|
|
183
|
-
`,l+=$e.repeat("-",t.indent+f+3+d.pos)+`^
|
|
184
|
-
`,h=1;h<=t.linesAfter&&!(c+h>=s.length);h++)d=Uc(e.buffer,i[c+h],s[c+h],e.position-(i[c]-i[c+h]),g),l+=$e.repeat(" ",t.indent)+Yc((e.line+h+1).toString(),f)+" | "+d.str+`
|
|
185
|
-
`;return l.replace(/\n$/,"")}w(xv,"makeSnippet");var iB=xv,sB=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],aB=["scalar","sequence","mapping"];function vv(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}w(vv,"compileStyleAliases");function bv(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(sB.indexOf(r)===-1)throw new Lr('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=vv(t.styleAliases||null),aB.indexOf(this.kind)===-1)throw new Lr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}w(bv,"Type$1");var nr=bv;function If(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,c){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=c)}),r[s]=i}),r}w(If,"compileList");function Cv(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(w(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}w(Cv,"compileMap");function mu(e){return this.extend(e)}w(mu,"Schema$1");mu.prototype.extend=w(function(t){var r=[],i=[];if(t instanceof nr)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 Lr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof nr))throw new Lr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Lr("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 Lr("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 nr))throw new Lr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(mu.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=If(s,"implicit"),s.compiledExplicit=If(s,"explicit"),s.compiledTypeMap=Cv(s.compiledImplicit,s.compiledExplicit),s},"extend");var oB=mu,lB=new nr("tag:yaml.org,2002:str",{kind:"scalar",construct:w(function(e){return e!==null?e:""},"construct")}),cB=new nr("tag:yaml.org,2002:seq",{kind:"sequence",construct:w(function(e){return e!==null?e:[]},"construct")}),uB=new nr("tag:yaml.org,2002:map",{kind:"mapping",construct:w(function(e){return e!==null?e:{}},"construct")}),hB=new oB({explicit:[lB,cB,uB]});function wv(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}w(wv,"resolveYamlNull");function kv(){return null}w(kv,"constructYamlNull");function Sv(e){return e===null}w(Sv,"isNull");var dB=new nr("tag:yaml.org,2002:null",{kind:"scalar",resolve:wv,construct:kv,predicate:Sv,represent:{canonical:w(function(){return"~"},"canonical"),lowercase:w(function(){return"null"},"lowercase"),uppercase:w(function(){return"NULL"},"uppercase"),camelcase:w(function(){return"Null"},"camelcase"),empty:w(function(){return""},"empty")},defaultStyle:"lowercase"});function _v(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")}w(_v,"resolveYamlBoolean");function Tv(e){return e==="true"||e==="True"||e==="TRUE"}w(Tv,"constructYamlBoolean");function Lv(e){return Object.prototype.toString.call(e)==="[object Boolean]"}w(Lv,"isBoolean");var fB=new nr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_v,construct:Tv,predicate:Lv,represent:{lowercase:w(function(e){return e?"true":"false"},"lowercase"),uppercase:w(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:w(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ev(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}w(Ev,"isHexCode");function Mv(e){return 48<=e&&e<=55}w(Mv,"isOctCode");function Bv(e){return 48<=e&&e<=57}w(Bv,"isDecCode");function Av(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Ev(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Mv(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Bv(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}w(Av,"resolveYamlInteger");function Rv(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)}w(Rv,"constructYamlInteger");function $v(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!$e.isNegativeZero(e)}w($v,"isInteger");var pB=new nr("tag:yaml.org,2002:int",{kind:"scalar",resolve:Av,construct:Rv,predicate:$v,represent:{binary:w(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:w(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:w(function(e){return e.toString(10)},"decimal"),hexadecimal:w(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"]}}),gB=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fv(e){return!(e===null||!gB.test(e)||e[e.length-1]==="_")}w(Fv,"resolveYamlFloat");function Dv(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)}w(Dv,"constructYamlFloat");var mB=/^[-+]?[0-9]+e/;function Iv(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($e.isNegativeZero(e))return"-0.0";return r=e.toString(10),mB.test(r)?r.replace("e",".e"):r}w(Iv,"representYamlFloat");function Pv(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$e.isNegativeZero(e))}w(Pv,"isFloat");var yB=new nr("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fv,construct:Dv,predicate:Pv,represent:Iv,defaultStyle:"lowercase"}),Ov=hB.extend({implicit:[dB,fB,pB,yB]}),xB=Ov,zv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Nv=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 jv(e){return e===null?!1:zv.exec(e)!==null||Nv.exec(e)!==null}w(jv,"resolveYamlTimestamp");function Wv(e){var t,r,i,s,o,c,l,h=0,d=null,f,g,m;if(t=zv.exec(e),t===null&&(t=Nv.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],c=+t[5],l=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(f=+t[10],g=+(t[11]||0),d=(f*60+g)*6e4,t[9]==="-"&&(d=-d)),m=new Date(Date.UTC(r,i,s,o,c,l,h)),d&&m.setTime(m.getTime()-d),m}w(Wv,"constructYamlTimestamp");function Hv(e){return e.toISOString()}w(Hv,"representYamlTimestamp");var vB=new nr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:jv,construct:Wv,instanceOf:Date,represent:Hv});function qv(e){return e==="<<"||e===null}w(qv,"resolveYamlMerge");var bB=new nr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qv}),Xp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
186
|
-
\r`;function Uv(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=Xp;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}w(Uv,"resolveYamlBinary");function Yv(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=Xp,c=0,l=[];for(t=0;t<s;t++)t%4===0&&t&&(l.push(c>>16&255),l.push(c>>8&255),l.push(c&255)),c=c<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(l.push(c>>16&255),l.push(c>>8&255),l.push(c&255)):r===18?(l.push(c>>10&255),l.push(c>>2&255)):r===12&&l.push(c>>4&255),new Uint8Array(l)}w(Yv,"constructYamlBinary");function Vv(e){var t="",r=0,i,s,o=e.length,c=Xp;for(i=0;i<o;i++)i%3===0&&i&&(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]):s===2?(t+=c[r>>10&63],t+=c[r>>4&63],t+=c[r<<2&63],t+=c[64]):s===1&&(t+=c[r>>2&63],t+=c[r<<4&63],t+=c[64],t+=c[64]),t}w(Vv,"representYamlBinary");function Gv(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}w(Gv,"isBinary");var CB=new nr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Uv,construct:Yv,predicate:Gv,represent:Vv}),wB=Object.prototype.hasOwnProperty,kB=Object.prototype.toString;function Xv(e){if(e===null)return!0;var t=[],r,i,s,o,c,l=e;for(r=0,i=l.length;r<i;r+=1){if(s=l[r],c=!1,kB.call(s)!=="[object Object]")return!1;for(o in s)if(wB.call(s,o))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}w(Xv,"resolveYamlOmap");function Qv(e){return e!==null?e:[]}w(Qv,"constructYamlOmap");var SB=new nr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Xv,construct:Qv}),_B=Object.prototype.toString;function Kv(e){if(e===null)return!0;var t,r,i,s,o,c=e;for(o=new Array(c.length),t=0,r=c.length;t<r;t+=1){if(i=c[t],_B.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}w(Kv,"resolveYamlPairs");function Zv(e){if(e===null)return[];var t,r,i,s,o,c=e;for(o=new Array(c.length),t=0,r=c.length;t<r;t+=1)i=c[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}w(Zv,"constructYamlPairs");var TB=new nr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Kv,construct:Zv}),LB=Object.prototype.hasOwnProperty;function Jv(e){if(e===null)return!0;var t,r=e;for(t in r)if(LB.call(r,t)&&r[t]!==null)return!1;return!0}w(Jv,"resolveYamlSet");function t2(e){return e!==null?e:{}}w(t2,"constructYamlSet");var EB=new nr("tag:yaml.org,2002:set",{kind:"mapping",resolve:Jv,construct:t2}),e2=xB.extend({implicit:[vB,bB],explicit:[CB,SB,TB,EB]}),Ii=Object.prototype.hasOwnProperty,yu=1,r2=2,n2=3,xu=4,rf=1,MB=2,Uy=3,BB=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,AB=/[\x85\u2028\u2029]/,RB=/[,\[\]\{\}]/,i2=/^(?:!|!!|![a-z\-]+!)$/i,s2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Pf(e){return Object.prototype.toString.call(e)}w(Pf,"_class");function vn(e){return e===10||e===13}w(vn,"is_EOL");function $i(e){return e===9||e===32}w($i,"is_WHITE_SPACE");function pr(e){return e===9||e===32||e===10||e===13}w(pr,"is_WS_OR_EOL");function ds(e){return e===44||e===91||e===93||e===123||e===125}w(ds,"is_FLOW_INDICATOR");function a2(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}w(a2,"fromHexCode");function o2(e){return e===120?2:e===117?4:e===85?8:0}w(o2,"escapedHexLen");function l2(e){return 48<=e&&e<=57?e-48:-1}w(l2,"fromDecimalCode");function Of(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
187
|
-
`: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":""}w(Of,"simpleEscapeSequence");function c2(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}w(c2,"charFromCodepoint");var u2=new Array(256),h2=new Array(256);for(as=0;as<256;as++)u2[as]=Of(as)?1:0,h2[as]=Of(as);var as;function d2(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||e2,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=[]}w(d2,"State$1");function Qp(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=iB(r),new Lr(t,r)}w(Qp,"generateError");function At(e,t){throw Qp(e,t)}w(At,"throwError");function Go(e,t){e.onWarning&&e.onWarning.call(null,Qp(e,t))}w(Go,"throwWarning");var Yy={YAML:w(function(t,r,i){var s,o,c;t.version!==null&&At(t,"duplication of %YAML directive"),i.length!==1&&At(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&At(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),c=parseInt(s[2],10),o!==1&&At(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&Go(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:w(function(t,r,i){var s,o;i.length!==2&&At(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],i2.test(s)||At(t,"ill-formed tag handle (first argument) of the TAG directive"),Ii.call(t.tagMap,s)&&At(t,'there is a previously declared suffix for "'+s+'" tag handle'),s2.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[s]=o},"handleTagDirective")};function ri(e,t,r,i){var s,o,c,l;if(t<r){if(l=e.input.slice(t,r),i)for(s=0,o=l.length;s<o;s+=1)c=l.charCodeAt(s),c===9||32<=c&&c<=1114111||At(e,"expected valid JSON character");else BB.test(l)&&At(e,"the stream contains non-printable characters");e.result+=l}}w(ri,"captureSegment");function zf(e,t,r,i){var s,o,c,l;for($e.isObject(r)||At(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),c=0,l=s.length;c<l;c+=1)o=s[c],Ii.call(t,o)||(t[o]=r[o],i[o]=!0)}w(zf,"mergeMappings");function fs(e,t,r,i,s,o,c,l,h){var d,f;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),d=0,f=s.length;d<f;d+=1)Array.isArray(s[d])&&At(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Pf(s[d])==="[object Object]"&&(s[d]="[object Object]");if(typeof s=="object"&&Pf(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(d=0,f=o.length;d<f;d+=1)zf(e,t,o[d],r);else zf(e,t,o,r);else!e.json&&!Ii.call(r,s)&&Ii.call(t,s)&&(e.line=c||e.line,e.lineStart=l||e.lineStart,e.position=h||e.position,At(e,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(t,s,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[s]=o,delete r[s];return t}w(fs,"storeMappingPair");function Yu(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}w(Yu,"readLineBreak");function Se(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;$i(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(vn(s))for(Yu(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Go(e,"deficient indentation"),i}w(Se,"skipSeparationSpace");function ll(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||pr(r)))}w(ll,"testDocumentSeparator");function Vu(e,t){t===1?e.result+=" ":t>1&&(e.result+=$e.repeat(`
|
|
188
|
-
`,t-1))}w(Vu,"writeFoldedLines");function f2(e,t,r){var i,s,o,c,l,h,d,f,g=e.kind,m=e.result,y;if(y=e.input.charCodeAt(e.position),pr(y)||ds(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(s=e.input.charCodeAt(e.position+1),pr(s)||r&&ds(s)))return!1;for(e.kind="scalar",e.result="",o=c=e.position,l=!1;y!==0;){if(y===58){if(s=e.input.charCodeAt(e.position+1),pr(s)||r&&ds(s))break}else if(y===35){if(i=e.input.charCodeAt(e.position-1),pr(i))break}else{if(e.position===e.lineStart&&ll(e)||r&&ds(y))break;if(vn(y))if(h=e.line,d=e.lineStart,f=e.lineIndent,Se(e,!1,-1),e.lineIndent>=t){l=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=h,e.lineStart=d,e.lineIndent=f;break}}l&&(ri(e,o,c,!1),Vu(e,e.line-h),o=c=e.position,l=!1),$i(y)||(c=e.position+1),y=e.input.charCodeAt(++e.position)}return ri(e,o,c,!1),e.result?!0:(e.kind=g,e.result=m,!1)}w(f2,"readPlainScalar");function p2(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ri(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else vn(r)?(ri(e,i,s,!0),Vu(e,Se(e,!1,t)),i=s=e.position):e.position===e.lineStart&&ll(e)?At(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);At(e,"unexpected end of the stream within a single quoted scalar")}w(p2,"readSingleQuotedScalar");function g2(e,t){var r,i,s,o,c,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return ri(e,r,e.position,!0),e.position++,!0;if(l===92){if(ri(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),vn(l))Se(e,!1,t);else if(l<256&&u2[l])e.result+=h2[l],e.position++;else if((c=o2(l))>0){for(s=c,o=0;s>0;s--)l=e.input.charCodeAt(++e.position),(c=a2(l))>=0?o=(o<<4)+c:At(e,"expected hexadecimal character");e.result+=c2(o),e.position++}else At(e,"unknown escape sequence");r=i=e.position}else vn(l)?(ri(e,r,i,!0),Vu(e,Se(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ll(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")}w(g2,"readDoubleQuotedScalar");function m2(e,t){var r=!0,i,s,o,c=e.tag,l,h=e.anchor,d,f,g,m,y,v=Object.create(null),C,k,_,T;if(T=e.input.charCodeAt(e.position),T===91)f=93,y=!1,l=[];else if(T===123)f=125,y=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),T=e.input.charCodeAt(++e.position);T!==0;){if(Se(e,!0,t),T=e.input.charCodeAt(e.position),T===f)return e.position++,e.tag=c,e.anchor=h,e.kind=y?"mapping":"sequence",e.result=l,!0;r?T===44&&At(e,"expected the node content, but found ','"):At(e,"missed comma between flow collection entries"),k=C=_=null,g=m=!1,T===63&&(d=e.input.charCodeAt(e.position+1),pr(d)&&(g=m=!0,e.position++,Se(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,Cs(e,t,yu,!1,!0),k=e.tag,C=e.result,Se(e,!0,t),T=e.input.charCodeAt(e.position),(m||e.line===i)&&T===58&&(g=!0,T=e.input.charCodeAt(++e.position),Se(e,!0,t),Cs(e,t,yu,!1,!0),_=e.result),y?fs(e,l,v,k,C,_,i,s,o):g?l.push(fs(e,null,v,k,C,_,i,s,o)):l.push(C),Se(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(r=!0,T=e.input.charCodeAt(++e.position)):r=!1}At(e,"unexpected end of the stream within a flow collection")}w(m2,"readFlowCollection");function y2(e,t){var r,i,s=rf,o=!1,c=!1,l=t,h=0,d=!1,f,g;if(g=e.input.charCodeAt(e.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)rf===s?s=g===43?Uy:MB:At(e,"repeat of a chomping mode identifier");else if((f=l2(g))>=0)f===0?At(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?At(e,"repeat of an indentation width identifier"):(l=t+f-1,c=!0);else break;if($i(g)){do g=e.input.charCodeAt(++e.position);while($i(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!vn(g)&&g!==0)}for(;g!==0;){for(Yu(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),vn(g)){h++;continue}if(e.lineIndent<l){s===Uy?e.result+=$e.repeat(`
|
|
189
|
-
`,o?1+h:h):s===rf&&o&&(e.result+=`
|
|
190
|
-
`);break}for(i?$i(g)?(d=!0,e.result+=$e.repeat(`
|
|
191
|
-
`,o?1+h:h)):d?(d=!1,e.result+=$e.repeat(`
|
|
192
|
-
`,h+1)):h===0?o&&(e.result+=" "):e.result+=$e.repeat(`
|
|
193
|
-
`,h):e.result+=$e.repeat(`
|
|
194
|
-
`,o?1+h:h),o=!0,c=!0,h=0,r=e.position;!vn(g)&&g!==0;)g=e.input.charCodeAt(++e.position);ri(e,r,e.position,!1)}return!0}w(y2,"readBlockScalar");function Nf(e,t){var r,i=e.tag,s=e.anchor,o=[],c,l=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),!(h!==45||(c=e.input.charCodeAt(e.position+1),!pr(c))));){if(l=!0,e.position++,Se(e,!0,-1)&&e.lineIndent<=t){o.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Cs(e,t,n2,!1,!0),o.push(e.result),Se(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)At(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}w(Nf,"readBlockSequence");function x2(e,t,r){var i,s,o,c,l,h,d=e.tag,f=e.anchor,g={},m=Object.create(null),y=null,v=null,C=null,k=!1,_=!1,T;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),T=e.input.charCodeAt(e.position);T!==0;){if(!k&&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,(T===63||T===58)&&pr(i))T===63?(k&&(fs(e,g,m,y,v,null,c,l,h),y=v=C=null),_=!0,k=!0,s=!0):k?(k=!1,s=!0):At(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,T=i;else{if(c=e.line,l=e.lineStart,h=e.position,!Cs(e,r,r2,!1,!0))break;if(e.line===o){for(T=e.input.charCodeAt(e.position);$i(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),pr(T)||At(e,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(fs(e,g,m,y,v,null,c,l,h),y=v=C=null),_=!0,k=!1,s=!1,y=e.tag,v=e.result;else if(_)At(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=f,!0}else if(_)At(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=f,!0}if((e.line===o||e.lineIndent>t)&&(k&&(c=e.line,l=e.lineStart,h=e.position),Cs(e,t,xu,!0,s)&&(k?v=e.result:C=e.result),k||(fs(e,g,m,y,v,C,c,l,h),y=v=C=null),Se(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&T!==0)At(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return k&&fs(e,g,m,y,v,null,c,l,h),_&&(e.tag=d,e.anchor=f,e.kind="mapping",e.result=g),_}w(x2,"readBlockMapping");function v2(e){var t,r=!1,i=!1,s,o,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&At(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(r=!0,c=e.input.charCodeAt(++e.position)):c===33?(i=!0,s="!!",c=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(o=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):At(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!pr(c);)c===33&&(i?At(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),i2.test(s)||At(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),RB.test(o)&&At(e,"tag suffix cannot contain flow indicator characters")}o&&!s2.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:Ii.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:At(e,'undeclared tag handle "'+s+'"'),!0}w(v2,"readTagProperty");function b2(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&&!pr(r)&&!ds(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}w(b2,"readAnchorProperty");function C2(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&&!pr(i)&&!ds(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),Ii.call(e.anchorMap,r)||At(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Se(e,!0,-1),!0}w(C2,"readAlias");function Cs(e,t,r,i,s){var o,c,l,h=1,d=!1,f=!1,g,m,y,v,C,k;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=c=l=xu===r||n2===r,i&&Se(e,!0,-1)&&(d=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;v2(e)||b2(e);)Se(e,!0,-1)?(d=!0,l=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):l=!1;if(l&&(l=d||s),(h===1||xu===r)&&(yu===r||r2===r?C=t:C=t+1,k=e.position-e.lineStart,h===1?l&&(Nf(e,k)||x2(e,k,C))||m2(e,C)?f=!0:(c&&y2(e,C)||p2(e,C)||g2(e,C)?f=!0:C2(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&At(e,"alias node should not have any properties")):f2(e,C,yu===r)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(f=l&&Nf(e,k))),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+'"'),g=0,m=e.implicitTypes.length;g<m;g+=1)if(v=e.implicitTypes[g],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ii.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,y=e.typeMap.multi[e.kind||"fallback"],g=0,m=y.length;g<m;g+=1)if(e.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||At(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&At(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.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||f}w(Cs,"composeNode");function w2(e){var t=e.position,r,i,s,o=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(c=e.input.charCodeAt(e.position))!==0&&(Se(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(o=!0,c=e.input.charCodeAt(++e.position),r=e.position;c!==0&&!pr(c);)c=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&At(e,"directive name must not be less than one character in length");c!==0;){for(;$i(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!vn(c));break}if(vn(c))break;for(r=e.position;c!==0&&!pr(c);)c=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}c!==0&&Yu(e),Ii.call(Yy,i)?Yy[i](e,i,s):Go(e,'unknown document directive "'+i+'"')}if(Se(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,Se(e,!0,-1)):o&&At(e,"directives end mark is expected"),Cs(e,e.lineIndent-1,xu,!1,!0),Se(e,!0,-1),e.checkLineBreaks&&AB.test(e.input.slice(t,e.position))&&Go(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ll(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Se(e,!0,-1));return}if(e.position<e.length-1)At(e,"end of the stream or a document separator is expected");else return}w(w2,"readDocument");function Kp(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
195
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new d2(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;)w2(r);return r.documents}w(Kp,"loadDocuments");function $B(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Kp(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}w($B,"loadAll$1");function k2(e,t){var r=Kp(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Lr("expected a single document in the stream, but found more")}}w(k2,"load$1");var FB=k2,DB={load:FB},S2=Object.prototype.toString,_2=Object.prototype.hasOwnProperty,Zp=65279,IB=9,Xo=10,PB=13,OB=32,zB=33,NB=34,jf=35,jB=37,WB=38,HB=39,qB=42,T2=44,UB=45,vu=58,YB=61,VB=62,GB=63,XB=64,L2=91,E2=93,QB=96,M2=123,KB=124,B2=125,sr={};sr[0]="\\0";sr[7]="\\a";sr[8]="\\b";sr[9]="\\t";sr[10]="\\n";sr[11]="\\v";sr[12]="\\f";sr[13]="\\r";sr[27]="\\e";sr[34]='\\"';sr[92]="\\\\";sr[133]="\\N";sr[160]="\\_";sr[8232]="\\L";sr[8233]="\\P";var ZB=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],JB=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function A2(e,t){var r,i,s,o,c,l,h;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)c=i[s],l=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),h=e.compiledTypeMap.fallback[c],h&&_2.call(h.styleAliases,l)&&(l=h.styleAliases[l]),r[c]=l;return r}w(A2,"compileStyleMap");function R2(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 Lr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+$e.repeat("0",i-t.length)+t}w(R2,"encodeHex");var tA=1,Qo=2;function $2(e){this.schema=e.schema||e2,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=$e.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=A2(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==='"'?Qo:tA,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}w($2,"State");function Wf(e,t){for(var r=$e.repeat(" ",t),i=0,s=-1,o="",c,l=e.length;i<l;)s=e.indexOf(`
|
|
196
|
-
`,i),s===-1?(c=e.slice(i),i=l):(c=e.slice(i,s+1),i=s+1),c.length&&c!==`
|
|
197
|
-
`&&(o+=r),o+=c;return o}w(Wf,"indentString");function bu(e,t){return`
|
|
198
|
-
`+$e.repeat(" ",e.indent*t)}w(bu,"generateNextLine");function F2(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}w(F2,"testImplicitResolving");function Ko(e){return e===OB||e===IB}w(Ko,"isWhitespace");function ba(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Zp||65536<=e&&e<=1114111}w(ba,"isPrintable");function Hf(e){return ba(e)&&e!==Zp&&e!==PB&&e!==Xo}w(Hf,"isNsCharOrWhitespace");function qf(e,t,r){var i=Hf(e),s=i&&!Ko(e);return(r?i:i&&e!==T2&&e!==L2&&e!==E2&&e!==M2&&e!==B2)&&e!==jf&&!(t===vu&&!s)||Hf(t)&&!Ko(t)&&e===jf||t===vu&&s}w(qf,"isPlainSafe");function D2(e){return ba(e)&&e!==Zp&&!Ko(e)&&e!==UB&&e!==GB&&e!==vu&&e!==T2&&e!==L2&&e!==E2&&e!==M2&&e!==B2&&e!==jf&&e!==WB&&e!==qB&&e!==zB&&e!==KB&&e!==YB&&e!==VB&&e!==HB&&e!==NB&&e!==jB&&e!==XB&&e!==QB}w(D2,"isPlainSafeFirst");function I2(e){return!Ko(e)&&e!==vu}w(I2,"isPlainSafeLast");function na(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}w(na,"codePointAt");function Jp(e){var t=/^\n* /;return t.test(e)}w(Jp,"needIndentIndicator");var P2=1,Uf=2,O2=3,z2=4,ea=5;function N2(e,t,r,i,s,o,c,l){var h,d=0,f=null,g=!1,m=!1,y=i!==-1,v=-1,C=D2(na(e,0))&&I2(na(e,e.length-1));if(t||c)for(h=0;h<e.length;d>=65536?h+=2:h++){if(d=na(e,h),!ba(d))return ea;C=C&&qf(d,f,l),f=d}else{for(h=0;h<e.length;d>=65536?h+=2:h++){if(d=na(e,h),d===Xo)g=!0,y&&(m=m||h-v-1>i&&e[v+1]!==" ",v=h);else if(!ba(d))return ea;C=C&&qf(d,f,l),f=d}m=m||y&&h-v-1>i&&e[v+1]!==" "}return!g&&!m?C&&!c&&!s(e)?P2:o===Qo?ea:Uf:r>9&&Jp(e)?ea:c?o===Qo?ea:Uf:m?z2:O2}w(N2,"chooseScalarStyle");function j2(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Qo?'""':"''";if(!e.noCompatMode&&(ZB.indexOf(t)!==-1||JB.test(t)))return e.quotingType===Qo?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=i||e.flowLevel>-1&&r>=e.flowLevel;function h(d){return F2(e,d)}switch(w(h,"testAmbiguity"),N2(t,l,e.indent,c,h,e.quotingType,e.forceQuotes&&!i,s)){case P2:return t;case Uf:return"'"+t.replace(/'/g,"''")+"'";case O2:return"|"+Yf(t,e.indent)+Vf(Wf(t,o));case z2:return">"+Yf(t,e.indent)+Vf(Wf(W2(t,c),o));case ea:return'"'+H2(t)+'"';default:throw new Lr("impossible error: invalid scalar style")}})()}w(j2,"writeScalar");function Yf(e,t){var r=Jp(e)?String(t):"",i=e[e.length-1]===`
|
|
199
|
-
`,s=i&&(e[e.length-2]===`
|
|
200
|
-
`||e===`
|
|
201
|
-
`),o=s?"+":i?"":"-";return r+o+`
|
|
202
|
-
`}w(Yf,"blockHeader");function Vf(e){return e[e.length-1]===`
|
|
203
|
-
`?e.slice(0,-1):e}w(Vf,"dropEndingNewline");function W2(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var d=e.indexOf(`
|
|
204
|
-
`);return d=d!==-1?d:e.length,r.lastIndex=d,Gf(e.slice(0,d),t)})(),s=e[0]===`
|
|
205
|
-
`||e[0]===" ",o,c;c=r.exec(e);){var l=c[1],h=c[2];o=h[0]===" ",i+=l+(!s&&!o&&h!==""?`
|
|
206
|
-
`:"")+Gf(h,t),s=o}return i}w(W2,"foldString");function Gf(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,c=0,l=0,h="";i=r.exec(e);)l=i.index,l-s>t&&(o=c>s?c:l,h+=`
|
|
207
|
-
`+e.slice(s,o),s=o+1),c=l;return h+=`
|
|
208
|
-
`,e.length-s>t&&c>s?h+=e.slice(s,c)+`
|
|
209
|
-
`+e.slice(c+1):h+=e.slice(s),h.slice(1)}w(Gf,"foldLine");function H2(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=na(e,s),i=sr[r],!i&&ba(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||R2(r);return t}w(H2,"escapeString");function q2(e,t,r){var i="",s=e.tag,o,c,l;for(o=0,c=r.length;o<c;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(In(e,t,l,!1,!1)||typeof l>"u"&&In(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}w(q2,"writeFlowSequence");function Xf(e,t,r,i){var s="",o=e.tag,c,l,h;for(c=0,l=r.length;c<l;c+=1)h=r[c],e.replacer&&(h=e.replacer.call(r,String(c),h)),(In(e,t+1,h,!0,!0,!1,!0)||typeof h>"u"&&In(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=bu(e,t)),e.dump&&Xo===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}w(Xf,"writeBlockSequence");function U2(e,t,r){var i="",s=e.tag,o=Object.keys(r),c,l,h,d,f;for(c=0,l=o.length;c<l;c+=1)f="",i!==""&&(f+=", "),e.condenseFlow&&(f+='"'),h=o[c],d=r[h],e.replacer&&(d=e.replacer.call(r,h,d)),In(e,t,h,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),In(e,t,d,!1,!1)&&(f+=e.dump,i+=f));e.tag=s,e.dump="{"+i+"}"}w(U2,"writeFlowMapping");function Y2(e,t,r,i){var s="",o=e.tag,c=Object.keys(r),l,h,d,f,g,m;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new Lr("sortKeys must be a boolean or a function");for(l=0,h=c.length;l<h;l+=1)m="",(!i||s!=="")&&(m+=bu(e,t)),d=c[l],f=r[d],e.replacer&&(f=e.replacer.call(r,d,f)),In(e,t+1,d,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Xo===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,g&&(m+=bu(e,t)),In(e,t+1,f,!0,g)&&(e.dump&&Xo===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,s+=m));e.tag=o,e.dump=s||"{}"}w(Y2,"writeBlockMapping");function Qf(e,t,r){var i,s,o,c,l,h;for(s=r?e.explicitTypes:e.implicitTypes,o=0,c=s.length;o<c;o+=1)if(l=s[o],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(h=e.styleMap[l.tag]||l.defaultStyle,S2.call(l.represent)==="[object Function]")i=l.represent(t,h);else if(_2.call(l.represent,h))i=l.represent[h](t,h);else throw new Lr("!<"+l.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}w(Qf,"detectType");function In(e,t,r,i,s,o,c){e.tag=null,e.dump=r,Qf(e,r,!1)||Qf(e,r,!0);var l=S2.call(e.dump),h=i,d;i&&(i=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",g,m;if(f&&(g=e.duplicates.indexOf(r),m=g!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(s=!1),m&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(f&&m&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?(Y2(e,t,e.dump,s),m&&(e.dump="&ref_"+g+e.dump)):(U2(e,t,e.dump),m&&(e.dump="&ref_"+g+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?Xf(e,t-1,e.dump,s):Xf(e,t,e.dump,s),m&&(e.dump="&ref_"+g+e.dump)):(q2(e,t,e.dump),m&&(e.dump="&ref_"+g+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&j2(e,e.dump,t,o,h);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Lr("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}w(In,"writeNode");function V2(e,t){var r=[],i=[],s,o;for(Cu(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}w(V2,"getDuplicateReferences");function Cu(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)Cu(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)Cu(e[i[s]],t,r)}w(Cu,"inspectNode");function eA(e,t){t=t||{};var r=new $2(t);r.noRefs||V2(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),In(r,0,i,!0,!0)?r.dump+`
|
|
210
|
-
`:""}w(eA,"dump$1");function rA(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.")}}w(rA,"renamed");var nA=Ov,iA=DB.load;/*! Bundled license information:
|
|
211
|
-
|
|
212
|
-
js-yaml/dist/js-yaml.mjs:
|
|
213
|
-
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
214
|
-
*/var er={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Vy={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Fo(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=pe(e),t=pe(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],c=s-r,l=o-i;return{angle:Math.atan(l/c),deltaX:c,deltaY:l}}w(Fo,"calculateDeltaAndAngle");var pe=w(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),sA=w(e=>({x:w(function(t,r,i){let s=0;const o=pe(i[0]).x<pe(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(er,e.arrowTypeStart)){const{angle:y,deltaX:v}=Fo(i[0],i[1]);s=er[e.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(er,e.arrowTypeEnd)){const{angle:y,deltaX:v}=Fo(i[i.length-1],i[i.length-2]);s=er[e.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(pe(t).x-pe(i[i.length-1]).x),l=Math.abs(pe(t).y-pe(i[i.length-1]).y),h=Math.abs(pe(t).x-pe(i[0]).x),d=Math.abs(pe(t).y-pe(i[0]).y),f=er[e.arrowTypeStart],g=er[e.arrowTypeEnd],m=1;if(c<g&&c>0&&l<g){let y=g+m-c;y*=o==="right"?-1:1,s-=y}if(h<f&&h>0&&d<f){let y=f+m-h;y*=o==="right"?-1:1,s+=y}return pe(t).x+s},"x"),y:w(function(t,r,i){let s=0;const o=pe(i[0]).y<pe(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(er,e.arrowTypeStart)){const{angle:y,deltaY:v}=Fo(i[0],i[1]);s=er[e.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(er,e.arrowTypeEnd)){const{angle:y,deltaY:v}=Fo(i[i.length-1],i[i.length-2]);s=er[e.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(pe(t).y-pe(i[i.length-1]).y),l=Math.abs(pe(t).x-pe(i[i.length-1]).x),h=Math.abs(pe(t).y-pe(i[0]).y),d=Math.abs(pe(t).x-pe(i[0]).x),f=er[e.arrowTypeStart],g=er[e.arrowTypeEnd],m=1;if(c<g&&c>0&&l<g){let y=g+m-c;y*=o==="up"?-1:1,s-=y}if(h<f&&h>0&&d<f){let y=f+m-h;y*=o==="up"?-1:1,s+=y}return pe(t).y+s},"y")}),"getLineFunctionsWithOffset"),tg=w(({flowchart:e})=>{var s,o;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.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"),aA=w(e=>{const{handDrawnSeed:t}=ne();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Sa=w(e=>{const t=oA([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),oA=w(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),G2=w(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"),St=w(e=>{const{stylesArray:t}=Sa(e),r=[],i=[],s=[],o=[];return t.forEach(c=>{const l=c[0];G2(l)?r.push(c.join(":")+" !important"):(i.push(c.join(":")+" !important"),l.includes("stroke")&&s.push(c.join(":")+" !important"),l==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),kt=w((e,t)=>{var h;const{themeVariables:r,handDrawnSeed:i}=ne(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:c}=Sa(e);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||s,seed:i,strokeWidth:((h=c.get("stroke-width"))==null?void 0:h.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:lA(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),lA=w(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Ec={},Ae={},Gy;function cA(){return Gy||(Gy=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.BLANK_URL=Ae.relativeFirstCharacters=Ae.whitespaceEscapeCharsRegex=Ae.urlSchemeRegex=Ae.ctrlCharactersRegex=Ae.htmlCtrlEntityRegex=Ae.htmlEntitiesRegex=Ae.invalidProtocolRegex=void 0,Ae.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ae.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ae.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ae.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ae.urlSchemeRegex=/^.+(:|:)/gim,Ae.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ae.relativeFirstCharacters=[".","/"],Ae.BLANK_URL="about:blank"),Ae}var Xy;function uA(){if(Xy)return Ec;Xy=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.sanitizeUrl=o;var e=cA();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function r(c){var l=c.replace(e.ctrlCharactersRegex,"");return l.replace(e.htmlEntitiesRegex,function(h,d){return String.fromCharCode(d)})}function i(c){return URL.canParse(c)}function s(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return e.BLANK_URL;var l,h=s(c.trim());do h=r(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=s(h),l=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(l&&l.length>0);var d=h;if(!d)return e.BLANK_URL;if(t(d))return d;var f=d.trimStart(),g=f.match(e.urlSchemeRegex);if(!g)return d;var m=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(m))return e.BLANK_URL;var y=f.replace(/\\/g,"/");if(m==="mailto:"||m.includes("://"))return y;if(m==="http:"||m==="https:"){if(!i(y))return e.BLANK_URL;var v=new URL(y);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return y}return Ec}var hA=uA(),X2=typeof global=="object"&&global&&global.Object===Object&&global,dA=typeof self=="object"&&self&&self.Object===Object&&self,On=X2||dA||Function("return this")(),wu=On.Symbol,Q2=Object.prototype,fA=Q2.hasOwnProperty,pA=Q2.toString,_o=wu?wu.toStringTag:void 0;function gA(e){var t=fA.call(e,_o),r=e[_o];try{e[_o]=void 0;var i=!0}catch{}var s=pA.call(e);return i&&(t?e[_o]=r:delete e[_o]),s}var mA=Object.prototype,yA=mA.toString;function xA(e){return yA.call(e)}var vA="[object Null]",bA="[object Undefined]",Qy=wu?wu.toStringTag:void 0;function _a(e){return e==null?e===void 0?bA:vA:Qy&&Qy in Object(e)?gA(e):xA(e)}function _s(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var CA="[object AsyncFunction]",wA="[object Function]",kA="[object GeneratorFunction]",SA="[object Proxy]";function eg(e){if(!_s(e))return!1;var t=_a(e);return t==wA||t==kA||t==CA||t==SA}var nf=On["__core-js_shared__"],Ky=(function(){var e=/[^.]+$/.exec(nf&&nf.keys&&nf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function _A(e){return!!Ky&&Ky in e}var TA=Function.prototype,LA=TA.toString;function Ts(e){if(e!=null){try{return LA.call(e)}catch{}try{return e+""}catch{}}return""}var EA=/[\\^$.*+?()[\]{}|]/g,MA=/^\[object .+?Constructor\]$/,BA=Function.prototype,AA=Object.prototype,RA=BA.toString,$A=AA.hasOwnProperty,FA=RegExp("^"+RA.call($A).replace(EA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DA(e){if(!_s(e)||_A(e))return!1;var t=eg(e)?FA:MA;return t.test(Ts(e))}function IA(e,t){return e==null?void 0:e[t]}function Ls(e,t){var r=IA(e,t);return DA(r)?r:void 0}var Zo=Ls(Object,"create");function PA(){this.__data__=Zo?Zo(null):{},this.size=0}function OA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zA="__lodash_hash_undefined__",NA=Object.prototype,jA=NA.hasOwnProperty;function WA(e){var t=this.__data__;if(Zo){var r=t[e];return r===zA?void 0:r}return jA.call(t,e)?t[e]:void 0}var HA=Object.prototype,qA=HA.hasOwnProperty;function UA(e){var t=this.__data__;return Zo?t[e]!==void 0:qA.call(t,e)}var YA="__lodash_hash_undefined__";function VA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zo&&t===void 0?YA:t,this}function ws(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])}}ws.prototype.clear=PA;ws.prototype.delete=OA;ws.prototype.get=WA;ws.prototype.has=UA;ws.prototype.set=VA;function GA(){this.__data__=[],this.size=0}function Gu(e,t){return e===t||e!==e&&t!==t}function Xu(e,t){for(var r=e.length;r--;)if(Gu(e[r][0],t))return r;return-1}var XA=Array.prototype,QA=XA.splice;function KA(e){var t=this.__data__,r=Xu(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():QA.call(t,r,1),--this.size,!0}function ZA(e){var t=this.__data__,r=Xu(t,e);return r<0?void 0:t[r][1]}function JA(e){return Xu(this.__data__,e)>-1}function t5(e,t){var r=this.__data__,i=Xu(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function si(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])}}si.prototype.clear=GA;si.prototype.delete=KA;si.prototype.get=ZA;si.prototype.has=JA;si.prototype.set=t5;var Jo=Ls(On,"Map");function e5(){this.size=0,this.__data__={hash:new ws,map:new(Jo||si),string:new ws}}function r5(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qu(e,t){var r=e.__data__;return r5(t)?r[typeof t=="string"?"string":"hash"]:r.map}function n5(e){var t=Qu(this,e).delete(e);return this.size-=t?1:0,t}function i5(e){return Qu(this,e).get(e)}function s5(e){return Qu(this,e).has(e)}function a5(e,t){var r=Qu(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function zi(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])}}zi.prototype.clear=e5;zi.prototype.delete=n5;zi.prototype.get=i5;zi.prototype.has=s5;zi.prototype.set=a5;var o5="Expected a function";function cl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(o5);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);var c=e.apply(this,i);return r.cache=o.set(s,c)||o,c};return r.cache=new(cl.Cache||zi),r}cl.Cache=zi;function l5(){this.__data__=new si,this.size=0}function c5(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function u5(e){return this.__data__.get(e)}function h5(e){return this.__data__.has(e)}var d5=200;function f5(e,t){var r=this.__data__;if(r instanceof si){var i=r.__data__;if(!Jo||i.length<d5-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new zi(i)}return r.set(e,t),this.size=r.size,this}function Ta(e){var t=this.__data__=new si(e);this.size=t.size}Ta.prototype.clear=l5;Ta.prototype.delete=c5;Ta.prototype.get=u5;Ta.prototype.has=h5;Ta.prototype.set=f5;var ku=(function(){try{var e=Ls(Object,"defineProperty");return e({},"",{}),e}catch{}})();function rg(e,t,r){t=="__proto__"&&ku?ku(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Kf(e,t,r){(r!==void 0&&!Gu(e[t],r)||r===void 0&&!(t in e))&&rg(e,t,r)}function p5(e){return function(t,r,i){for(var s=-1,o=Object(t),c=i(t),l=c.length;l--;){var h=c[++s];if(r(o[h],h,o)===!1)break}return t}}var g5=p5(),K2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zy=K2&&typeof module=="object"&&module&&!module.nodeType&&module,m5=Zy&&Zy.exports===K2,Jy=m5?On.Buffer:void 0,tx=Jy?Jy.allocUnsafe:void 0;function y5(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=On.Uint8Array;function x5(e){var t=new e.constructor(e.byteLength);return new ex(t).set(new ex(e)),t}function v5(e,t){var r=t?x5(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function b5(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,C5=(function(){function e(){}return function(t){if(!_s(t))return{};if(rx)return rx(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Z2(e,t){return function(r){return e(t(r))}}var J2=Z2(Object.getPrototypeOf,Object),w5=Object.prototype;function Ku(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||w5;return e===r}function k5(e){return typeof e.constructor=="function"&&!Ku(e)?C5(J2(e)):{}}function ul(e){return e!=null&&typeof e=="object"}var S5="[object Arguments]";function nx(e){return ul(e)&&_a(e)==S5}var tb=Object.prototype,_5=tb.hasOwnProperty,T5=tb.propertyIsEnumerable,Su=nx((function(){return arguments})())?nx:function(e){return ul(e)&&_5.call(e,"callee")&&!T5.call(e,"callee")},_u=Array.isArray,L5=9007199254740991;function eb(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=L5}function Zu(e){return e!=null&&eb(e.length)&&!eg(e)}function E5(e){return ul(e)&&Zu(e)}function M5(){return!1}var rb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ix=rb&&typeof module=="object"&&module&&!module.nodeType&&module,B5=ix&&ix.exports===rb,sx=B5?On.Buffer:void 0,A5=sx?sx.isBuffer:void 0,ng=A5||M5,R5="[object Object]",$5=Function.prototype,F5=Object.prototype,nb=$5.toString,D5=F5.hasOwnProperty,I5=nb.call(Object);function P5(e){if(!ul(e)||_a(e)!=R5)return!1;var t=J2(e);if(t===null)return!0;var r=D5.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nb.call(r)==I5}var O5="[object Arguments]",z5="[object Array]",N5="[object Boolean]",j5="[object Date]",W5="[object Error]",H5="[object Function]",q5="[object Map]",U5="[object Number]",Y5="[object Object]",V5="[object RegExp]",G5="[object Set]",X5="[object String]",Q5="[object WeakMap]",K5="[object ArrayBuffer]",Z5="[object DataView]",J5="[object Float32Array]",t4="[object Float64Array]",e4="[object Int8Array]",r4="[object Int16Array]",n4="[object Int32Array]",i4="[object Uint8Array]",s4="[object Uint8ClampedArray]",a4="[object Uint16Array]",o4="[object Uint32Array]",de={};de[J5]=de[t4]=de[e4]=de[r4]=de[n4]=de[i4]=de[s4]=de[a4]=de[o4]=!0;de[O5]=de[z5]=de[K5]=de[N5]=de[Z5]=de[j5]=de[W5]=de[H5]=de[q5]=de[U5]=de[Y5]=de[V5]=de[G5]=de[X5]=de[Q5]=!1;function l4(e){return ul(e)&&eb(e.length)&&!!de[_a(e)]}function c4(e){return function(t){return e(t)}}var ib=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ho=ib&&typeof module=="object"&&module&&!module.nodeType&&module,u4=Ho&&Ho.exports===ib,sf=u4&&X2.process,ax=(function(){try{var e=Ho&&Ho.require&&Ho.require("util").types;return e||sf&&sf.binding&&sf.binding("util")}catch{}})(),ox=ax&&ax.isTypedArray,ig=ox?c4(ox):l4;function Zf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var h4=Object.prototype,d4=h4.hasOwnProperty;function f4(e,t,r){var i=e[t];(!(d4.call(e,t)&&Gu(i,r))||r===void 0&&!(t in e))&&rg(e,t,r)}function p4(e,t,r,i){var s=!r;r||(r={});for(var o=-1,c=t.length;++o<c;){var l=t[o],h=void 0;h===void 0&&(h=e[l]),s?rg(r,l,h):f4(r,l,h)}return r}function g4(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var m4=9007199254740991,y4=/^(?:0|[1-9]\d*)$/;function sb(e,t){var r=typeof e;return t=t??m4,!!t&&(r=="number"||r!="symbol"&&y4.test(e))&&e>-1&&e%1==0&&e<t}var x4=Object.prototype,v4=x4.hasOwnProperty;function b4(e,t){var r=_u(e),i=!r&&Su(e),s=!r&&!i&&ng(e),o=!r&&!i&&!s&&ig(e),c=r||i||s||o,l=c?g4(e.length,String):[],h=l.length;for(var d in e)(t||v4.call(e,d))&&!(c&&(d=="length"||s&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||sb(d,h)))&&l.push(d);return l}function C4(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var w4=Object.prototype,k4=w4.hasOwnProperty;function S4(e){if(!_s(e))return C4(e);var t=Ku(e),r=[];for(var i in e)i=="constructor"&&(t||!k4.call(e,i))||r.push(i);return r}function ab(e){return Zu(e)?b4(e,!0):S4(e)}function _4(e){return p4(e,ab(e))}function T4(e,t,r,i,s,o,c){var l=Zf(e,r),h=Zf(t,r),d=c.get(h);if(d){Kf(e,r,d);return}var f=o?o(l,h,r+"",e,t,c):void 0,g=f===void 0;if(g){var m=_u(h),y=!m&&ng(h),v=!m&&!y&&ig(h);f=h,m||y||v?_u(l)?f=l:E5(l)?f=b5(l):y?(g=!1,f=y5(h,!0)):v?(g=!1,f=v5(h,!0)):f=[]:P5(h)||Su(h)?(f=l,Su(l)?f=_4(l):(!_s(l)||eg(l))&&(f=k5(h))):g=!1}g&&(c.set(h,f),s(f,h,i,o,c),c.delete(h)),Kf(e,r,f)}function ob(e,t,r,i,s){e!==t&&g5(t,function(o,c){if(s||(s=new Ta),_s(o))T4(e,t,c,r,ob,i,s);else{var l=i?i(Zf(e,c),o,c+"",e,t,s):void 0;l===void 0&&(l=o),Kf(e,c,l)}},ab)}function lb(e){return e}function L4(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 E4(e,t,r){return t=lx(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=lx(i.length-t,0),c=Array(o);++s<o;)c[s]=i[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=i[s];return l[t]=r(c),L4(e,this,l)}}function M4(e){return function(){return e}}var B4=ku?function(e,t){return ku(e,"toString",{configurable:!0,enumerable:!1,value:M4(t),writable:!0})}:lb,A4=800,R4=16,$4=Date.now;function F4(e){var t=0,r=0;return function(){var i=$4(),s=R4-(i-r);if(r=i,s>0){if(++t>=A4)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var D4=F4(B4);function I4(e,t){return D4(E4(e,t,lb),e+"")}function P4(e,t,r){if(!_s(r))return!1;var i=typeof t;return(i=="number"?Zu(r)&&sb(t,r.length):i=="string"&&t in r)?Gu(r[t],e):!1}function O4(e){return I4(function(t,r){var i=-1,s=r.length,o=s>1?r[s-1]:void 0,c=s>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(s--,o):void 0,c&&P4(r[0],r[1],c)&&(o=s<3?void 0:o,s=1),t=Object(t);++i<s;){var l=r[i];l&&e(t,l,i,o)}return t})}var z4=O4(function(e,t,r){ob(e,t,r)}),N4="",j4={curveBasis:qc,curveBasisClosed:HM,curveBasisOpen:qM,curveBumpX:V1,curveBumpY:G1,curveBundle:UM,curveCardinalClosed:YM,curveCardinalOpen:VM,curveCardinal:Z1,curveCatmullRomClosed:GM,curveCatmullRomOpen:XM,curveCatmullRom:tv,curveLinear:du,curveLinearClosed:QM,curveMonotoneX:av,curveMonotoneY:ov,curveNatural:cv,curveStep:uv,curveStepAfter:dv,curveStepBefore:hv},W4=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,H4=w(function(e,t){const r=cb(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const c=r.map(l=>l.args);eu(c),i=Re(i,[...c])}else i=r.args;if(!i)return;let s=Ep(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),cb=w(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${W4.source})(?=[}][%]{2}).*
|
|
215
|
-
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),rt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const c=[];for(;(o=jo.exec(e))!==null;)if(o.index===jo.lastIndex&&jo.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const l=o[1]?o[1]:o[2],h=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:l,args:h})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(s){return rt.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),q4=w(function(e){return e.replace(jo,"")},"removeDirectives"),U4=w(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function sg(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return j4[r]??t}w(sg,"interpolateToCurve");function ub(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?hA.sanitizeUrl(r):r}w(ub,"formatUrl");var Y4=w((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let c=0;c<i;c++)if(o=o[r[c]],!o){rt.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function ag(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}w(ag,"distance");function hb(e){let t,r=0;e.forEach(s=>{r+=ag(s,t),t=s});const i=r/2;return og(e,i)}w(hb,"traverseEdge");function db(e){return e.length===1?e[0]:hb(e)}w(db,"calcLabelPosition");var cx=w((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),og=w((e,t)=>{let r,i=t;for(const s of e){if(r){const o=ag(s,r);if(o===0)return r;if(o<i)i-=o;else{const c=i/o;if(c<=0)return r;if(c>=1)return{x:s.x,y:s.y};if(c>0&&c<1)return{x:cx((1-c)*r.x+c*s.x,5),y:cx((1-c)*r.y+c*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),V4=w((e,t,r)=>{rt.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=og(t,25),o=e?10:5,c=Math.atan2(t[0].y-s.y,t[0].x-s.x),l={x:0,y:0};return l.x=Math.sin(c)*o+(t[0].x+s.x)/2,l.y=-Math.cos(c)*o+(t[0].y+s.y)/2,l},"calcCardinalityPosition");function fb(e,t,r){const i=structuredClone(r);rt.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=og(i,s),c=10+e*.5,l=Math.atan2(i[0].y-o.y,i[0].x-o.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(l+Math.PI)*c+(i[0].x+o.x)/2,h.y=-Math.cos(l+Math.PI)*c+(i[0].y+o.y)/2):t==="end_right"?(h.x=Math.sin(l-Math.PI)*c+(i[0].x+o.x)/2-5,h.y=-Math.cos(l-Math.PI)*c+(i[0].y+o.y)/2-5):t==="end_left"?(h.x=Math.sin(l)*c+(i[0].x+o.x)/2-5,h.y=-Math.cos(l)*c+(i[0].y+o.y)/2-5):(h.x=Math.sin(l)*c+(i[0].x+o.x)/2,h.y=-Math.cos(l)*c+(i[0].y+o.y)/2),h}w(fb,"calcTerminalLabelPosition");function pb(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}}w(pb,"getStylesFromArray");var ux=0,G4=w(()=>(ux++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ux),"generateId");function gb(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}w(gb,"makeRandomHex");var X4=w(e=>gb(e.length),"random"),Q4=w(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"),K4=w(function(e,t){const r=t.text.replace(ka.lineBreakRegex," "),[,i]=Ju(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),Z4=cl((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ka.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((c,l)=>{const h=ii(`${c} `,r),d=ii(o,r);if(h>t){const{hyphenatedStrings:m,remainingWord:y}=J4(c,t,"-",r);s.push(o,...m),o=y}else d+h>=t?(s.push(o),o=c):o=[o,c].filter(Boolean).join(" ");l+1===i.length&&s.push(o)}),s.filter(c=>c!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),J4=cl((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let c="";return s.forEach((l,h)=>{const d=`${c}${l}`;if(ii(d,i)>=t){const g=h+1,m=s.length===g,y=`${d}${r}`;o.push(m?d:y),c=""}else c=d}),{hyphenatedStrings:o,remainingWord:c}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function mb(e,t){return lg(e,t).height}w(mb,"calculateTextHeight");function ii(e,t){return lg(e,t).width}w(ii,"calculateTextWidth");var lg=cl((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Ju(r),c=["sans-serif",i],l=e.split(ka.lineBreakRegex),h=[],d=Xt("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const f=d.append("svg");for(const m of c){let y=0;const v={width:0,height:0,lineHeight:0};for(const C of l){const k=Q4();k.text=C||N4;const _=K4(f,k).style("font-size",o).style("font-weight",s).style("font-family",m),T=(_._groups||_)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),y=Math.round(T.height),v.height+=y,v.lineHeight=Math.round(Math.max(v.lineHeight,y))}h.push(v)}f.remove();const g=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),pa,tR=(pa=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},w(pa,"InitIDGenerator"),pa),Mc,eR=w(function(e){return Mc=Mc||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Mc.innerHTML=e,unescape(Mc.textContent)},"entityDecode");function cg(e){return"str"in e}w(cg,"isDetailedError");var rR=w((e,t,r,i)=>{var o;if(!i)return;const s=(o=e.node())==null?void 0:o.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ju=w(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 ug(e,t){return z4({},e,t)}w(ug,"cleanAndMerge");var xn={assignWithDepth:Re,wrapLabel:Z4,calculateTextHeight:mb,calculateTextWidth:ii,calculateTextDimensions:lg,cleanAndMerge:ug,detectInit:H4,detectDirective:cb,isSubstringInArray:U4,interpolateToCurve:sg,calcLabelPosition:db,calcCardinalityPosition:V4,calcTerminalLabelPosition:fb,formatUrl:ub,getStylesFromArray:pb,generateId:G4,random:X4,runFunc:Y4,entityDecode:eR,insertTitle:rR,isLabelCoordinateInPath:yb,parseFontSize:Ju,InitIDGenerator:tR},nR=w(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"),Es=w(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),KI=w((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ir(e){return e??null}w(ir,"handleUndefinedAttr");function yb(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}w(yb,"isLabelCoordinateInPath");const iR=Object.freeze({left:0,top:0,width:16,height:16}),Tu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xb=Object.freeze({...iR,...Tu}),sR=Object.freeze({...xb,body:"",hidden:!1}),aR=Object.freeze({width:null,height:null}),oR=Object.freeze({...aR,...Tu}),lR=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const l=s.pop(),h=s.pop(),d={provider:s.length>0?s[0]:i,prefix:h,name:l};return af(d)?d:null}const o=s[0],c=o.split("-");if(c.length>1){const l={provider:i,prefix:c.shift(),name:c.join("-")};return af(l)?l:null}if(r&&i===""){const l={provider:i,prefix:"",name:o};return af(l,r)?l:null}return null},af=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cR(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 hx(e,t){const r=cR(e,t);for(const i in sR)i in Tu?i in e&&!(i in r)&&(r[i]=Tu[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function uR(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(c){if(r[c])return s[c]=[];if(!(c in s)){s[c]=null;const l=i[c]&&i[c].parent,h=l&&o(l);h&&(s[c]=[l].concat(h))}return s[c]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function dx(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function c(l){o=hx(i[l]||s[l],o)}return c(t),r.forEach(c),hx(e,o)}function hR(e,t){if(e.icons[t])return dx(e,t,[]);const r=uR(e,[t])[t];return r?dx(e,t,r):null}const dR=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fR=/^-?[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(dR);if(i===null||!i.length)return e;const s=[];let o=i.shift(),c=fR.test(o);for(;;){if(c){const l=parseFloat(o);isNaN(l)?s.push(o):s.push(Math.ceil(l*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");c=!c}}function pR(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const c=e.indexOf(">",o);if(c===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(c+1)}return{defs:r,content:e}}function gR(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mR(e,t,r){const i=pR(e);return gR(i.defs,t+i.content+r)}const yR=e=>e==="unset"||e==="undefined"||e==="none";function xR(e,t){const r={...xb,...e},i={...oR,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(C=>{const k=[],_=C.hFlip,T=C.vFlip;let E=C.rotate;_?T?E+=2:(k.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),k.push("scale(-1 1)"),s.top=s.left=0):T&&(k.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),k.push("scale(1 -1)"),s.top=s.left=0);let B;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:B=s.height/2+s.top,k.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:k.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:B=s.width/2+s.left,k.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}E%2===1&&(s.left!==s.top&&(B=s.left,s.left=s.top,s.top=B),s.width!==s.height&&(B=s.width,s.width=s.height,s.height=B)),k.length&&(o=mR(o,'<g transform="'+k.join(" ")+'">',"</g>"))});const c=i.width,l=i.height,h=s.width,d=s.height;let f,g;c===null?(g=l===null?"1em":l==="auto"?d:l,f=fx(g,h/d)):(f=c==="auto"?h:c,g=l===null?fx(f,d/h):l==="auto"?d:l);const m={},y=(C,k)=>{yR(k)||(m[C]=k.toString())};y("width",f),y("height",g);const v=[s.left,s.top,h,d];return m.viewBox=v.join(" "),{attributes:m,viewBox:v,body:o}}const vR=/\sid="(\S+)"/g,px=new Map;function bR(e){e=e.replace(/[0-9]+$/,"")||"a";const t=px.get(e)||0;return px.set(e,t+1),t?`${e}${t}`:e}function CR(e){const t=[];let r;for(;r=vR.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=bR(s),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function wR(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 vb(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 s=i.reduce(function(l,h){var d=h.match(/\n([\t ]+|(?!\s).)/g);return d?l.concat(d.map(function(f){var g,m;return(m=(g=f.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&m!==void 0?m:0})):l},[]);if(s.length){var o=new RegExp(`
|
|
216
|
-
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(l){return l.replace(o,`
|
|
217
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var c=i[0];return t.forEach(function(l,h){var d=c.match(/(?:^|\n)( *)$/),f=d?d[1]:"",g=l;typeof l=="string"&&l.includes(`
|
|
218
|
-
`)&&(g=String(l).split(`
|
|
219
|
-
`).map(function(m,y){return y===0?m:""+f+m}).join(`
|
|
220
|
-
`)),c+=g+i[h+1]}),c}var kR={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},Jf=new Map,bb=new Map,SR=w(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(rt.debug("Registering icon pack:",t.name),"loader"in t)bb.set(t.name,t.loader);else if("icons"in t)Jf.set(t.name,t.icons);else throw rt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Cb=w(async(e,t)=>{const r=lR(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 s=Jf.get(i);if(!s){const c=bb.get(i);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await c(),prefix:i},Jf.set(i,s)}catch(l){throw rt.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=hR(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),_R=w(async e=>{try{return await Cb(e),!0}catch{return!1}},"isIconAvailable"),hl=w(async(e,t,r)=>{let i;try{i=await Cb(e,t==null?void 0:t.fallbackPrefix)}catch(c){rt.error(c),i=kR}const s=xR(i,t),o=wR(CR(s.body),{...s.attributes,...r});return Kr(o,rr())},"getIconSVG");function wb(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
221
|
-
`).replace(/\n{2,}/g,`
|
|
222
|
-
`),s=vb(i);return t===!1?s.replace(/ /g," "):s}w(wb,"preprocessMarkdown");function kb(e,t={}){const r=wb(e,t),i=Jt.lexer(r),s=[[]];let o=0;function c(l,h="normal"){l.type==="text"?l.text.split(`
|
|
223
|
-
`).forEach((f,g)=>{g!==0&&(o++,s.push([])),f.split(" ").forEach(m=>{m=m.replace(/'/g,"'"),m&&s[o].push({content:m,type:h})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(d=>{c(d,l.type)}):l.type==="html"&&s[o].push({content:l.text,type:"normal"})}return w(c,"processNode"),i.forEach(l=>{var h;l.type==="paragraph"?(h=l.tokens)==null||h.forEach(d=>{c(d)}):l.type==="html"?s[o].push({content:l.text,type:"normal"}):s[o].push({content:l.raw,type:"normal"})}),s}w(kb,"markdownToLines");function Sb(e,{markdownAutoWrap:t}={}){const r=Jt.lexer(e);function i(s){var o,c,l;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(o=s.tokens)==null?void 0:o.map(i).join("")}</strong>`:s.type==="em"?`<em>${(c=s.tokens)==null?void 0:c.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(l=s.tokens)==null?void 0:l.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(rt.warn(`Unsupported markdown: ${s.type}`),s.raw)}return w(i,"output"),r.map(i).join("")}w(Sb,"markdownToHTML");function _b(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}w(_b,"splitTextToChars");function Tb(e,t){const r=_b(t.content);return hg(e,[],r,t.type)}w(Tb,"splitWordToFitWidth");function hg(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,c=[...t,s];return e([{content:c.join(""),type:i}])?hg(e,c,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}w(hg,"splitWordToFitWidthRecursion");function Lb(e,t){if(e.some(({content:r})=>r.includes(`
|
|
224
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Lu(e,t)}w(Lb,"splitLineToFitWidth");function Lu(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},c=[...i];if(s!==""&&c.push({content:s,type:"normal"}),c.push(o),t(c))return Lu(e,t,r,c);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[l,h]=Tb(t,o);r.push([l]),h.content&&e.unshift(h)}return Lu(e,t,r)}w(Lu,"splitLineToFitWidthRecursion");function tp(e,t){t&&e.attr("style",t)}w(tp,"applyStyle");async function Eb(e,t,r,i,s=!1,o=rr()){const c=e.append("foreignObject");c.attr("width",`${10*r}px`),c.attr("height",`${10*r}px`);const l=c.append("xhtml:div"),h=ma(t.label)?await Mp(t.label.replace(ka.lineBreakRegex,`
|
|
225
|
-
`),o):Kr(t.label,o),d=t.isNode?"nodeLabel":"edgeLabel",f=l.append("span");f.html(h),tp(f,t.labelStyle),f.attr("class",`${d} ${i}`),tp(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&l.attr("class","labelBkg");let g=l.node().getBoundingClientRect();return g.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),g=l.node().getBoundingClientRect()),c.node()}w(Eb,"addHtmlSpan");function th(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}w(th,"createTspan");function Mb(e,t,r){const i=e.append("text"),s=th(i,1,t);eh(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}w(Mb,"computeWidthOfText");function TR(e,t,r){var c;const i=e.append("text"),s=th(i,1,t);eh(s,[{content:r,type:"normal"}]);const o=(c=s.node())==null?void 0:c.getBoundingClientRect();return o&&i.remove(),o}w(TR,"computeDimensionOfText");function Bb(e,t,r,i=!1){const o=t.append("g"),c=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");let h=0;for(const d of r){const f=w(m=>Mb(o,1.1,m)<=e,"checkWidth"),g=f(d)?[d]:Lb(d,f);for(const m of g){const y=th(l,h,1.1);eh(y,m),h++}}if(i){const d=l.node().getBBox(),f=2;return c.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return l.node()}w(Bb,"createFormattedText");function eh(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(r.content):s.text(" "+r.content)})}w(eh,"updateTextContentAndStyles");async function Ab(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,c)=>(r.push((async()=>{const l=`${o}:${c}`;return await _R(l)?await hl(l,void 0,{class:"label-icon"}):`<i class='${Kr(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}w(Ab,"replaceIconSubstring");var Ni=w(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,isNode:c=!0,width:l=200,addSvgBackground:h=!1}={},d)=>{if(rt.debug("XYZ createText",t,r,i,s,o,c,"addSvgBackground: ",h),o){const f=Sb(t,d),g=await Ab(Es(f),d),m=t.replace(/\\\\/g,"\\"),y={isNode:c,label:ma(t)?m:g,labelStyle:r.replace("fill:","color:")};return await Eb(e,y,l,s,h,d)}else{const f=t.replace(/<br\s*\/?>/g,"<br/>"),g=kb(f.replace("<br>","<br/>"),d),m=Bb(l,e,g,t?h:!1);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).select("text").attr("style",v)}return m}},"createText");function of(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,c=Math.cos(o),l=Math.sin(o);for(const h of e){const[d,f]=h;h[0]=(d-i)*c-(f-s)*l+i,h[1]=(d-i)*l+(f-s)*c+s}}}function LR(e,t){return e[0]===t[0]&&e[1]===t[1]}function ER(e,t,r,i=1){const s=r,o=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(s)for(const d of c)of(d,l,s);const h=(function(d,f,g){const m=[];for(const T of d){const E=[...T];LR(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&m.push(E)}const y=[];f=Math.max(f,.1);const v=[];for(const T of m)for(let E=0;E<T.length-1;E++){const B=T[E],A=T[E+1];if(B[1]!==A[1]){const M=Math.min(B[1],A[1]);v.push({ymin:M,ymax:Math.max(B[1],A[1]),x:M===B[1]?B[0]:A[0],islope:(A[0]-B[0])/(A[1]-B[1])})}}if(v.sort(((T,E)=>T.ymin<E.ymin?-1:T.ymin>E.ymin?1:T.x<E.x?-1:T.x>E.x?1:T.ymax===E.ymax?0:(T.ymax-E.ymax)/Math.abs(T.ymax-E.ymax))),!v.length)return y;let C=[],k=v[0].ymin,_=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let E=0;E<v.length&&!(v[E].ymin>k);E++)T=E;v.splice(0,T+1).forEach((E=>{C.push({s:k,edge:E})}))}if(C=C.filter((T=>!(T.edge.ymax<=k))),C.sort(((T,E)=>T.edge.x===E.edge.x?0:(T.edge.x-E.edge.x)/Math.abs(T.edge.x-E.edge.x))),(g!==1||_%f==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const E=T+1;if(E>=C.length)break;const B=C[T].edge,A=C[E].edge;y.push([[Math.round(B.x),k],[Math.round(A.x),k]])}k+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),_++}return y})(c,o,i);if(s){for(const d of c)of(d,l,-s);(function(d,f,g){const m=[];d.forEach((y=>m.push(...y))),of(m,f,g)})(h,l,-s)}return h}function dl(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),ER(e,s,i,o||1)}class dg{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=dl(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function rh(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 MR extends dg{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=dl(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,c=[],l=.5*i*Math.cos(o),h=.5*i*Math.sin(o);for(const[d,f]of s)rh([d,f])&&c.push([[d[0]-l,d[1]+h],[...f]],[[d[0]+l,d[1]-h],[...f]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}}class BR extends dg{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class AR{constructor(t){this.helper=t}fillPolygons(t,r){const i=dl(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const c=s/4;for(const l of t){const h=rh(l),d=h/s,f=Math.ceil(d)-1,g=h-f*s,m=(l[0][0]+l[1][0])/2-s/4,y=Math.min(l[0][1],l[1][1]);for(let v=0;v<f;v++){const C=y+g+v*s,k=m-c+2*Math.random()*c,_=C-c+2*Math.random()*c,T=this.helper.ellipse(k,_,o,o,r);i.push(...T.ops)}}return{type:"fillSketch",ops:i}}}class RR{constructor(t){this.helper=t}fillPolygons(t,r){const i=dl(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((c=>{const l=rh(c),h=Math.floor(l/(i+s)),d=(l+s-h*(i+s))/2;let f=c[0],g=c[1];f[0]>g[0]&&(f=c[1],g=c[0]);const m=Math.atan((g[1]-f[1])/(g[0]-f[0]));for(let y=0;y<h;y++){const v=y*(i+s),C=v+i,k=[f[0]+v*Math.cos(m)+d*Math.cos(m),f[1]+v*Math.sin(m)+d*Math.sin(m)],_=[f[0]+C*Math.cos(m)+d*Math.cos(m),f[1]+C*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(k[0],k[1],_[0],_[1],r))}})),o}}class $R{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=dl(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const c=rh(o),l=Math.round(c/(2*r));let h=o[0],d=o[1];h[0]>d[0]&&(h=o[1],d=o[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<l;g++){const m=2*g*r,y=2*(g+1)*r,v=Math.sqrt(2*Math.pow(r,2)),C=[h[0]+m*Math.cos(f),h[1]+m*Math.sin(f)],k=[h[0]+y*Math.cos(f),h[1]+y*Math.sin(f)],_=[C[0]+v*Math.cos(f+Math.PI/4),C[1]+v*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(C[0],C[1],_[0],_[1],i),...this.helper.doubleLineOps(_[0],_[1],k[0],k[1],i))}})),s}}const _r={};class FR{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const DR=0,lf=1,gx=2,Bc={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 cf(e,t){return e.type===t}function fg(e){const t=[],r=(function(c){const l=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:DR,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:lf,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return l[l.length]={type:gx,text:""},l})(e);let i="BOD",s=0,o=r[s];for(;!cf(o,gx);){let c=0;const l=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return fg("M0,0"+e);s++,c=Bc[o.text],i=o.text}else cf(o,lf)?c=Bc[i]:(s++,c=Bc[o.text],i=o.text);if(!(s+c<r.length))throw new Error("Path data ended short");for(let h=s;h<s+c;h++){const d=r[h];if(!cf(d,lf))throw new Error("Param not a number: "+i+","+d.text);l[l.length]=+d.text}if(typeof Bc[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:l};t.push(h),s+=c,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Rb(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:c,data:l}of e)switch(c){case"M":o.push({key:"M",data:[...l]}),[t,r]=l,[i,s]=l;break;case"m":t+=l[0],r+=l[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...l]}),[t,r]=l;break;case"l":t+=l[0],r+=l[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...l]}),t=l[4],r=l[5];break;case"c":{const h=l.map(((d,f)=>f%2?d+r:d+t));o.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":o.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{const h=l.map(((d,f)=>f%2?d+r:d+t));o.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":o.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],o.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":o.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{const h=l.map(((d,f)=>f%2?d+r:d+t));o.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":o.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function $b(e){const t=[];let r="",i=0,s=0,o=0,c=0,l=0,h=0;for(const{key:d,data:f}of e){switch(d){case"M":t.push({key:"M",data:[...f]}),[i,s]=f,[o,c]=f;break;case"C":t.push({key:"C",data:[...f]}),i=f[4],s=f[5],l=f[2],h=f[3];break;case"L":t.push({key:"L",data:[...f]}),[i,s]=f;break;case"H":i=f[0],t.push({key:"L",data:[i,s]});break;case"V":s=f[0],t.push({key:"L",data:[i,s]});break;case"S":{let g=0,m=0;r==="C"||r==="S"?(g=i+(i-l),m=s+(s-h)):(g=i,m=s),t.push({key:"C",data:[g,m,...f]}),l=f[0],h=f[1],i=f[2],s=f[3];break}case"T":{const[g,m]=f;let y=0,v=0;r==="Q"||r==="T"?(y=i+(i-l),v=s+(s-h)):(y=i,v=s);const C=i+2*(y-i)/3,k=s+2*(v-s)/3,_=g+2*(y-g)/3,T=m+2*(v-m)/3;t.push({key:"C",data:[C,k,_,T,g,m]}),l=y,h=v,i=g,s=m;break}case"Q":{const[g,m,y,v]=f,C=i+2*(g-i)/3,k=s+2*(m-s)/3,_=y+2*(g-y)/3,T=v+2*(m-v)/3;t.push({key:"C",data:[C,k,_,T,y,v]}),l=g,h=m,i=y,s=v;break}case"A":{const g=Math.abs(f[0]),m=Math.abs(f[1]),y=f[2],v=f[3],C=f[4],k=f[5],_=f[6];g===0||m===0?(t.push({key:"C",data:[i,s,k,_,k,_]}),i=k,s=_):(i!==k||s!==_)&&(Fb(i,s,k,_,g,m,y,v,C).forEach((function(T){t.push({key:"C",data:T})})),i=k,s=_);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=c}r=d}return t}function To(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Fb(e,t,r,i,s,o,c,l,h,d){const f=(g=c,Math.PI*g/180);var g;let m=[],y=0,v=0,C=0,k=0;if(d)[y,v,C,k]=d;else{[e,t]=To(e,t,-f),[r,i]=To(r,i,-f);const J=(e-r)/2,Y=(t-i)/2;let W=J*J/(s*s)+Y*Y/(o*o);W>1&&(W=Math.sqrt(W),s*=W,o*=W);const N=s*s,q=o*o,D=N*q-N*Y*Y-q*J*J,Z=N*Y*Y+q*J*J,Q=(l===h?-1:1)*Math.sqrt(Math.abs(D/Z));C=Q*s*Y/o+(e+r)/2,k=Q*-o*J/s+(t+i)/2,y=Math.asin(parseFloat(((t-k)/o).toFixed(9))),v=Math.asin(parseFloat(((i-k)/o).toFixed(9))),e<C&&(y=Math.PI-y),r<C&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),h&&y>v&&(y-=2*Math.PI),!h&&v>y&&(v-=2*Math.PI)}let _=v-y;if(Math.abs(_)>120*Math.PI/180){const J=v,Y=r,W=i;v=h&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,m=Fb(r=C+s*Math.cos(v),i=k+o*Math.sin(v),Y,W,s,o,c,0,h,[v,J,C,k])}_=v-y;const T=Math.cos(y),E=Math.sin(y),B=Math.cos(v),A=Math.sin(v),M=Math.tan(_/4),R=4/3*s*M,O=4/3*o*M,tt=[e,t],et=[e+R*E,t-O*T],V=[r+R*A,i-O*B],nt=[r,i];if(et[0]=2*tt[0]-et[0],et[1]=2*tt[1]-et[1],d)return[et,V,nt].concat(m);{m=[et,V,nt].concat(m);const J=[];for(let Y=0;Y<m.length;Y+=3){const W=To(m[Y][0],m[Y][1],f),N=To(m[Y+1][0],m[Y+1][1],f),q=To(m[Y+2][0],m[Y+2][1],f);J.push([W[0],W[1],N[0],N[1],q[0],q[1]])}return J}}const IR={randOffset:function(e,t){return zt(e,t)},randOffsetWithRange:function(e,t,r){return Eu(e,t,r)},ellipse:function(e,t,r,i,s){const o=Ib(r,i,s);return ep(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Pi(e,t,r,i,s,!0)}};function Db(e,t,r,i,s){return{type:"path",ops:Pi(e,t,r,i,s)}}function Vc(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Pi(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Pi(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Db(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function PR(e,t,r,i,s){return(function(o,c){return Vc(o,!0,c)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function mx(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ac(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ac(r[0],1.5*(1+.22*t.roughness),vx(t));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const l=Ac(c,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:Ac(c,1.5*(1+.22*t.roughness),vx(t));for(const d of l)d.op!=="move"&&i.push(d);for(const d of h)d.op!=="move"&&s.push(d)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Ib(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let c=Math.abs(e/2),l=Math.abs(t/2);const h=1-r.curveFitting;return c+=zt(c*h,r),l+=zt(l*h,r),{increment:o,rx:c,ry:l}}function ep(e,t,r,i){const[s,o]=bx(i.increment,e,t,i.rx,i.ry,1,i.increment*Eu(.1,Eu(.4,1,r),r),r);let c=Mu(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[l]=bx(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=Mu(l,null,r);c=c.concat(h)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function yx(e,t,r,i,s,o,c,l,h){const d=e,f=t;let g=Math.abs(r/2),m=Math.abs(i/2);g+=zt(.01*g,h),m+=zt(.01*m,h);let y=s,v=o;for(;y<0;)y+=2*Math.PI,v+=2*Math.PI;v-y>2*Math.PI&&(y=0,v=2*Math.PI);const C=2*Math.PI/h.curveStepCount,k=Math.min(C/2,(v-y)/2),_=Cx(k,d,f,g,m,y,v,1,h);if(!h.disableMultiStroke){const T=Cx(k,d,f,g,m,y,v,1.5,h);_.push(...T)}return c&&(l?_.push(...Pi(d,f,d+g*Math.cos(y),f+m*Math.sin(y),h),...Pi(d,f,d+g*Math.cos(v),f+m*Math.sin(v),h)):_.push({op:"lineTo",data:[d,f]},{op:"lineTo",data:[d+g*Math.cos(y),f+m*Math.sin(y)]})),{type:"path",ops:_}}function xx(e,t){const r=$b(Rb(fg(e))),i=[];let s=[0,0],o=[0,0];for(const{key:c,data:l}of r)switch(c){case"M":o=[l[0],l[1]],s=[l[0],l[1]];break;case"L":i.push(...Pi(o[0],o[1],l[0],l[1],t)),o=[l[0],l[1]];break;case"C":{const[h,d,f,g,m,y]=l;i.push(...OR(h,d,f,g,m,y,o,t)),o=[m,y];break}case"Z":i.push(...Pi(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function uf(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+zt(s,t),i[0][1]+zt(s,t)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[i[c][0]+zt(s,t),i[c][1]+zt(s,t)]})}}return{type:"fillPath",ops:r}}function ta(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!_r[s])switch(s){case"zigzag":_r[s]||(_r[s]=new MR(i));break;case"cross-hatch":_r[s]||(_r[s]=new BR(i));break;case"dots":_r[s]||(_r[s]=new AR(i));break;case"dashed":_r[s]||(_r[s]=new RR(i));break;case"zigzag-line":_r[s]||(_r[s]=new $R(i));break;default:s="hachure",_r[s]||(_r[s]=new dg(i))}return _r[s]})(t,IR).fillPolygons(e,t)}function vx(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Pb(e){return e.randomizer||(e.randomizer=new FR(e.seed||0)),e.randomizer.next()}function Eu(e,t,r,i=1){return r.roughness*i*(Pb(r)*(t-e)+e)}function zt(e,t,r=1){return Eu(-e,e,t,r)}function Pi(e,t,r,i,s,o=!1){const c=o?s.disableMultiStrokeFill:s.disableMultiStroke,l=rp(e,t,r,i,s,!0,!1);if(c)return l;const h=rp(e,t,r,i,s,!0,!0);return l.concat(h)}function rp(e,t,r,i,s,o,c){const l=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(l);let d=1;d=h<200?1:h>500?.4:-.0016668*h+1.233334;let f=s.maxRandomnessOffset||0;f*f*100>l&&(f=h/10);const g=f/2,m=.2+.2*Pb(s);let y=s.bowing*s.maxRandomnessOffset*(i-t)/200,v=s.bowing*s.maxRandomnessOffset*(e-r)/200;y=zt(y,s,d),v=zt(v,s,d);const C=[],k=()=>zt(g,s,d),_=()=>zt(f,s,d),T=s.preserveVertices;return c?C.push({op:"move",data:[e+(T?0:k()),t+(T?0:k())]}):C.push({op:"move",data:[e+(T?0:zt(f,s,d)),t+(T?0:zt(f,s,d))]}),c?C.push({op:"bcurveTo",data:[y+e+(r-e)*m+k(),v+t+(i-t)*m+k(),y+e+2*(r-e)*m+k(),v+t+2*(i-t)*m+k(),r+(T?0:k()),i+(T?0:k())]}):C.push({op:"bcurveTo",data:[y+e+(r-e)*m+_(),v+t+(i-t)*m+_(),y+e+2*(r-e)*m+_(),v+t+2*(i-t)*m+_(),r+(T?0:_()),i+(T?0:_())]}),C}function Ac(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]),i.push([e[0][0]+zt(t,r),e[0][1]+zt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+zt(t,r),e[s][1]+zt(t,r)]),s===e.length-1&&i.push([e[s][0]+zt(t,r),e[s][1]+zt(t,r)]);return Mu(i,null,r)}function Mu(e,t,r){const i=e.length,s=[];if(i>3){const o=[],c=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+2<i;l++){const h=e[l];o[0]=[h[0],h[1]],o[1]=[h[0]+(c*e[l+1][0]-c*e[l-1][0])/6,h[1]+(c*e[l+1][1]-c*e[l-1][1])/6],o[2]=[e[l+1][0]+(c*e[l][0]-c*e[l+2][0])/6,e[l+1][1]+(c*e[l][1]-c*e[l+2][1])/6],o[3]=[e[l+1][0],e[l+1][1]],s.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?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...rp(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function bx(e,t,r,i,s,o,c,l){const h=[],d=[];if(l.roughness===0){e/=4,d.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let f=0;f<=2*Math.PI;f+=e){const g=[t+i*Math.cos(f),r+s*Math.sin(f)];h.push(g),d.push(g)}d.push([t+i*Math.cos(0),r+s*Math.sin(0)]),d.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const f=zt(.5,l)-Math.PI/2;d.push([zt(o,l)+t+.9*i*Math.cos(f-e),zt(o,l)+r+.9*s*Math.sin(f-e)]);const g=2*Math.PI+f-.01;for(let m=f;m<g;m+=e){const y=[zt(o,l)+t+i*Math.cos(m),zt(o,l)+r+s*Math.sin(m)];h.push(y),d.push(y)}d.push([zt(o,l)+t+i*Math.cos(f+2*Math.PI+.5*c),zt(o,l)+r+s*Math.sin(f+2*Math.PI+.5*c)]),d.push([zt(o,l)+t+.98*i*Math.cos(f+c),zt(o,l)+r+.98*s*Math.sin(f+c)]),d.push([zt(o,l)+t+.9*i*Math.cos(f+.5*c),zt(o,l)+r+.9*s*Math.sin(f+.5*c)])}return[d,h]}function Cx(e,t,r,i,s,o,c,l,h){const d=o+zt(.1,h),f=[];f.push([zt(l,h)+t+.9*i*Math.cos(d-e),zt(l,h)+r+.9*s*Math.sin(d-e)]);for(let g=d;g<=c;g+=e)f.push([zt(l,h)+t+i*Math.cos(g),zt(l,h)+r+s*Math.sin(g)]);return f.push([t+i*Math.cos(c),r+s*Math.sin(c)]),f.push([t+i*Math.cos(c),r+s*Math.sin(c)]),Mu(f,null,h)}function OR(e,t,r,i,s,o,c,l){const h=[],d=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let f=[0,0];const g=l.disableMultiStroke?1:2,m=l.preserveVertices;for(let y=0;y<g;y++)y===0?h.push({op:"move",data:[c[0],c[1]]}):h.push({op:"move",data:[c[0]+(m?0:zt(d[0],l)),c[1]+(m?0:zt(d[0],l))]}),f=m?[s,o]:[s+zt(d[y],l),o+zt(d[y],l)],h.push({op:"bcurveTo",data:[e+zt(d[y],l),t+zt(d[y],l),r+zt(d[y],l),i+zt(d[y],l),f[0],f[1]]});return h}function Lo(e){return[...e]}function wx(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(Lo(e[0]),Lo(e[1]),Lo(e[2]),Lo(e[2]));else{const s=[];s.push(e[0],e[0]);for(let l=1;l<e.length;l++)s.push(e[l]),l===e.length-1&&s.push(e[l]);const o=[],c=1-t;i.push(Lo(s[0]));for(let l=1;l+2<s.length;l++){const h=s[l];o[0]=[h[0],h[1]],o[1]=[h[0]+(c*s[l+1][0]-c*s[l-1][0])/6,h[1]+(c*s[l+1][1]-c*s[l-1][1])/6],o[2]=[s[l+1][0]+(c*s[l][0]-c*s[l+2][0])/6,s[l+1][1]+(c*s[l][1]-c*s[l+2][1])/6],o[3]=[s[l+1][0],s[l+1][1]],i.push(o[1],o[2],o[3])}}return i}function Gc(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zR(e,t,r){const i=Gc(t,r);if(i===0)return Gc(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Gc(e,ls(t,r,s))}function ls(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function np(e,t,r,i){const s=i||[];if((function(l,h){const d=l[h+0],f=l[h+1],g=l[h+2],m=l[h+3];let y=3*f[0]-2*d[0]-m[0];y*=y;let v=3*f[1]-2*d[1]-m[1];v*=v;let C=3*g[0]-2*m[0]-d[0];C*=C;let k=3*g[1]-2*m[1]-d[1];return k*=k,y<C&&(y=C),v<k&&(v=k),y+v})(e,t)<r){const l=e[t+0];s.length?(o=s[s.length-1],c=l,Math.sqrt(Gc(o,c))>1&&s.push(l)):s.push(l),s.push(e[t+3])}else{const h=e[t+0],d=e[t+1],f=e[t+2],g=e[t+3],m=ls(h,d,.5),y=ls(d,f,.5),v=ls(f,g,.5),C=ls(m,y,.5),k=ls(y,v,.5),_=ls(C,k,.5);np([h,m,C,_],0,r,s),np([_,k,v,g],0,r,s)}var o,c;return s}function NR(e,t){return Bu(e,0,e.length,t)}function Bu(e,t,r,i,s){const o=s||[],c=e[t],l=e[r-1];let h=0,d=1;for(let f=t+1;f<r-1;++f){const g=zR(e[f],c,l);g>h&&(h=g,d=f)}return Math.sqrt(h)>i?(Bu(e,t,d+1,i,o),Bu(e,d,r,i,o)):(o.length||o.push(c),o.push(l)),o}function hf(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)np(e,3*o,t,i);return r&&r>0?Bu(i,0,i.length,r):i}const Dr="none";class Au{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,s,o){const c=this._o(o);return this._d("line",[Db(t,r,i,s,c)],c)}rectangle(t,r,i,s,o){const c=this._o(o),l=[],h=PR(t,r,i,s,c);if(c.fill){const d=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];c.fillStyle==="solid"?l.push(uf([d],c)):l.push(ta([d],c))}return c.stroke!==Dr&&l.push(h),this._d("rectangle",l,c)}ellipse(t,r,i,s,o){const c=this._o(o),l=[],h=Ib(i,s,c),d=ep(t,r,c,h);if(c.fill)if(c.fillStyle==="solid"){const f=ep(t,r,c,h).opset;f.type="fillPath",l.push(f)}else l.push(ta([d.estimatedPoints],c));return c.stroke!==Dr&&l.push(d.opset),this._d("ellipse",l,c)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Vc(t,!1,i)],i)}arc(t,r,i,s,o,c,l=!1,h){const d=this._o(h),f=[],g=yx(t,r,i,s,o,c,l,!0,d);if(l&&d.fill)if(d.fillStyle==="solid"){const m=Object.assign({},d);m.disableMultiStroke=!0;const y=yx(t,r,i,s,o,c,!0,!1,m);y.type="fillPath",f.push(y)}else f.push((function(m,y,v,C,k,_,T){const E=m,B=y;let A=Math.abs(v/2),M=Math.abs(C/2);A+=zt(.01*A,T),M+=zt(.01*M,T);let R=k,O=_;for(;R<0;)R+=2*Math.PI,O+=2*Math.PI;O-R>2*Math.PI&&(R=0,O=2*Math.PI);const tt=(O-R)/T.curveStepCount,et=[];for(let V=R;V<=O;V+=tt)et.push([E+A*Math.cos(V),B+M*Math.sin(V)]);return et.push([E+A*Math.cos(O),B+M*Math.sin(O)]),et.push([E,B]),ta([et],T)})(t,r,i,s,o,c,d));return d.stroke!==Dr&&f.push(g),this._d("arc",f,d)}curve(t,r){const i=this._o(r),s=[],o=mx(t,i);if(i.fill&&i.fill!==Dr)if(i.fillStyle==="solid"){const c=mx(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],l=t;if(l.length){const h=typeof l[0][0]=="number"?[l]:l;for(const d of h)d.length<3?c.push(...d):d.length===3?c.push(...hf(wx([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):c.push(...hf(wx(d),10,(1+i.roughness)/2))}c.length&&s.push(ta([c],i))}return i.stroke!==Dr&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Vc(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(uf([t],i)):s.push(ta([t],i))),i.stroke!==Dr&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Dr,c=i.stroke!==Dr,l=!!(i.simplification&&i.simplification<1),h=(function(f,g,m){const y=$b(Rb(fg(f))),v=[];let C=[],k=[0,0],_=[];const T=()=>{_.length>=4&&C.push(...hf(_,g)),_=[]},E=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:A,data:M}of y)switch(A){case"M":E(),k=[M[0],M[1]],C.push(k);break;case"L":T(),C.push([M[0],M[1]]);break;case"C":if(!_.length){const R=C.length?C[C.length-1]:k;_.push([R[0],R[1]])}_.push([M[0],M[1]]),_.push([M[2],M[3]]),_.push([M[4],M[5]]);break;case"Z":T(),C.push([k[0],k[1]])}if(E(),!m)return v;const B=[];for(const A of v){const M=NR(A,m);M.length&&B.push(M)}return B})(t,1,l?4-4*(i.simplification||1):(1+i.roughness)/2),d=xx(t,i);if(o)if(i.fillStyle==="solid")if(h.length===1){const f=xx(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(uf(h,i));else s.push(ta(h,i));return c&&(l?h.forEach((f=>{s.push(Vc(f,!1,i))})):s.push(d)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((c=>+c.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Dr};break;case"fillPath":c={d:this.opsToPath(o),stroke:Dr,strokeWidth:0,fill:i.fill||Dr};break;case"fillSketch":c=this.fillSketch(o,i)}c&&s.push(c)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Dr,strokeWidth:i,fill:Dr}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class jR{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Au(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const c of r)switch(c.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,c,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,c,o,l),s.restore();break}case"fillSketch":this.fillSketch(s,c,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const c=typeof i=="number"&&i>=0?o.data.map((l=>+l.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(c[0],c[1]);break;case"bcurveTo":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":t.lineTo(c[0],c[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const c=this.gen.line(t,r,i,s,o);return this.draw(c),c}rectangle(t,r,i,s,o){const c=this.gen.rectangle(t,r,i,s,o);return this.draw(c),c}ellipse(t,r,i,s,o){const c=this.gen.ellipse(t,r,i,s,o);return this.draw(c),c}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);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,s,o,c,l=!1,h){const d=this.gen.arc(t,r,i,s,o,c,l,h);return this.draw(d),d}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 Rc="http://www.w3.org/2000/svg";class WR{constructor(t,r){this.svg=t,this.gen=new Au(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Rc,"g"),c=t.options.fixedDecimalPlaceDigits;for(const l of r){let h=null;switch(l.type){case"path":h=s.createElementNS(Rc,"path"),h.setAttribute("d",this.opsToPath(l,c)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Rc,"path"),h.setAttribute("d",this.opsToPath(l,c)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,l,i)}h&&o.appendChild(h)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Rc,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const c=this.gen.line(t,r,i,s,o);return this.draw(c)}rectangle(t,r,i,s,o){const c=this.gen.rectangle(t,r,i,s,o);return this.draw(c)}ellipse(t,r,i,s,o){const c=this.gen.ellipse(t,r,i,s,o);return this.draw(c)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);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,s,o,c,l=!1,h){const d=this.gen.arc(t,r,i,s,o,c,l,h);return this.draw(d)}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 Ct={canvas:(e,t)=>new jR(e,t),svg:(e,t)=>new WR(e,t),generator:e=>new Au(e),newSeed:()=>Au.newSeed()},Ot=w(async(e,t,r)=>{var g,m;let i;const s=t.useHtmlLabels||Fe((g=ne())==null?void 0:g.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),c=o.insert("g").attr("class","label").attr("style",ir(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const h=await Ni(c,Kr(Es(l),ne()),{useHtmlLabels:s,width:t.width||((m=ne().flowchart)==null?void 0:m.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let d=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(s){const y=h.children[0],v=Xt(h),C=y.getElementsByTagName("img");if(C){const k=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...C].map(_=>new Promise(T=>{function E(){if(_.style.display="flex",_.style.flexDirection="column",k){const B=ne().fontSize?ne().fontSize:window.getComputedStyle(document.body).fontSize,A=5,[M=l1.fontSize]=Ju(B),R=M*A+"px";_.style.minWidth=R,_.style.maxWidth=R}else _.style.width="100%";T(_)}w(E,"setupImage"),setTimeout(()=>{_.complete&&E()}),_.addEventListener("error",E),_.addEventListener("load",E)})))}d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height)}return s?c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):c.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:f,label:c}},"labelHelper"),df=w(async(e,t,r)=>{var h,d,f,g,m,y;const i=r.useHtmlLabels||Fe((d=(h=ne())==null?void 0:h.flowchart)==null?void 0:d.htmlLabels),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Ni(s,Kr(Es(t),ne()),{useHtmlLabels:i,width:r.width||((g=(f=ne())==null?void 0:f.flowchart)==null?void 0:g.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=o.getBBox();const l=r.padding/2;if(Fe((y=(m=ne())==null?void 0:m.flowchart)==null?void 0:y.htmlLabels)){const v=o.children[0],C=Xt(o);c=v.getBoundingClientRect(),C.attr("width",c.width),C.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:l,label:s}},"insertLabel"),Tt=w((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Ft=w((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Gt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}w(Gt,"createPathFromPoints");function Oi(e,t,r,i,s,o){const c=[],h=r-e,d=i-t,f=h/o,g=2*Math.PI/f,m=t+d/2;for(let y=0;y<=50;y++){const v=y/50,C=e+v*h,k=m+s*Math.sin(g*(C-e));c.push({x:C,y:k})}return c}w(Oi,"generateFullSineWavePoints");function tl(e,t,r,i,s,o){const c=[],l=s*Math.PI/180,f=(o*Math.PI/180-l)/(i-1);for(let g=0;g<i;g++){const m=l+g*f,y=e+r*Math.cos(m),v=t+r*Math.sin(m);c.push({x:-y,y:-v})}return c}w(tl,"generateCirclePoints");var HR=w((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,c=e.width/2,l=e.height/2,h,d;return Math.abs(o)*c>Math.abs(s)*l?(o<0&&(l=-l),h=o===0?0:l*s/o,d=l):(s<0&&(c=-c),h=c,d=s===0?0:c*o/s),{x:r+h,y:i+d}},"intersectRect"),La=HR;function Ob(e,t){t&&e.attr("style",t)}w(Ob,"applyStyle");async function zb(e){const t=Xt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ne();let s=e.label;e.label&&ma(e.label)&&(s=await Mp(e.label.replace(ka.lineBreakRegex,`
|
|
226
|
-
`),i));const c='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+s+"</span>";return r.html(Kr(c,i)),Ob(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}w(zb,"addHtmlLabel");var qR=w(async(e,t,r,i)=>{let s=e||"";if(typeof s=="object"&&(s=s[0]),Fe(ne().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),rt.info("vertexText"+s);const o={isNode:i,label:Es(s).replace(/fa[blrs]?:fa-[\w-]+/g,l=>`<i class='${l.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await zb(o)}else{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let c=[];typeof s=="string"?c=s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?c=s:c=[];for(const l of c){const h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),r?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=l.trim(),o.appendChild(h)}return o}},"createLabel"),ps=qR,ji=w((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Nb=w(async(e,t)=>{rt.info("Creating subgraph rect for ",t.id,t);const r=ne(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:c}=i,{labelStyles:l,nodeStyles:h,borderStyles:d,backgroundStyles:f}=St(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),m=Fe(r.flowchart.htmlLabels),y=g.insert("g").attr("class","cluster-label "),v=await Ni(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0});let C=v.getBBox();if(Fe(r.flowchart.htmlLabels)){const R=v.children[0],O=Xt(v);C=R.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height,T=t.x-k/2,E=t.y-_/2;rt.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const R=Ct.svg(g),O=kt(t,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:s}),tt=R.path(ji(T,E,k,_,0),O);B=g.insert(()=>(rt.debug("Rough node insert CXC",tt),tt),":first-child"),B.select("path:nth-child(2)").attr("style",d.join(";")),B.select("path").attr("style",f.join(";").replace("fill","stroke"))}else B=g.insert("rect",":first-child"),B.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",E).attr("width",k).attr("height",_);const{subGraphTitleTopMargin:A}=tg(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),l){const R=y.select("span");R&&R.attr("style",l)}const M=B.node().getBBox();return t.offsetX=0,t.width=M.width,t.height=M.height,t.offsetY=C.height-t.padding/2,t.intersect=function(R){return La(t,R)},{cluster:g,labelBBox:C}},"rect"),UR=w((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/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+s).attr("height",t.height+s).attr("fill","none");const c=i.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(l){return La(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),YR=w(async(e,t)=>{const r=ne(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:c,compositeTitleBackground:l,nodeBorder:h}=i,d=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),f=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let m=d.append("rect");const y=g.node().appendChild(await ps(t.label,t.labelStyle,void 0,!0));let v=y.getBBox();if(Fe(r.flowchart.htmlLabels)){const tt=y.children[0],et=Xt(y);v=tt.getBoundingClientRect(),et.attr("width",v.width),et.attr("height",v.height)}const C=0*t.padding,k=C/2,_=(t.width<=v.width+t.padding?v.width+t.padding:t.width)+C;t.width<=v.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+C,E=t.height+C-v.height-6,B=t.x-_/2,A=t.y-T/2;t.width=_;const M=t.y-t.height/2-k+v.height+2;let R;if(t.look==="handDrawn"){const tt=t.cssClasses.includes("statediagram-cluster-alt"),et=Ct.svg(d),V=t.rx||t.ry?et.path(ji(B,A,_,T,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:h,seed:s}):et.rectangle(B,A,_,T,{seed:s});R=d.insert(()=>V,":first-child");const nt=et.rectangle(B,M,_,E,{fill:tt?o:c,fillStyle:tt?"hachure":"solid",stroke:h,seed:s});R=d.insert(()=>V,":first-child"),m=d.insert(()=>nt)}else R=f.insert("rect",":first-child"),R.attr("class","outer").attr("x",B).attr("y",A).attr("width",_).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",B).attr("y",M).attr("width",_).attr("height",E);g.attr("transform",`translate(${t.x-v.width/2}, ${A+1-(Fe(r.flowchart.htmlLabels)?0:3)})`);const O=R.node().getBBox();return t.height=O.height,t.offsetX=0,t.offsetY=v.height-t.padding/2,t.labelBBox=v,t.intersect=function(tt){return La(t,tt)},{cluster:d,labelBBox:v}},"roundedWithTitle"),VR=w(async(e,t)=>{rt.info("Creating subgraph rect for ",t.id,t);const r=ne(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:c}=i,{labelStyles:l,nodeStyles:h,borderStyles:d,backgroundStyles:f}=St(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),m=Fe(r.flowchart.htmlLabels),y=g.insert("g").attr("class","cluster-label "),v=await Ni(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width});let C=v.getBBox();if(Fe(r.flowchart.htmlLabels)){const R=v.children[0],O=Xt(v);C=R.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height,T=t.x-k/2,E=t.y-_/2;rt.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const R=Ct.svg(g),O=kt(t,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:s}),tt=R.path(ji(T,E,k,_,t.rx),O);B=g.insert(()=>(rt.debug("Rough node insert CXC",tt),tt),":first-child"),B.select("path:nth-child(2)").attr("style",d.join(";")),B.select("path").attr("style",f.join(";").replace("fill","stroke"))}else B=g.insert("rect",":first-child"),B.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",E).attr("width",k).attr("height",_);const{subGraphTitleTopMargin:A}=tg(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),l){const R=y.select("span");R&&R.attr("style",l)}const M=B.node().getBBox();return t.offsetX=0,t.width=M.width,t.height=M.height,t.offsetY=C.height-t.padding/2,t.intersect=function(R){return La(t,R)},{cluster:g,labelBBox:C}},"kanbanSection"),GR=w((e,t)=>{const r=ne(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),l=c.insert("g",":first-child"),h=0*t.padding,d=t.width+h;t.diff=-t.padding;const f=t.height+h,g=t.x-d/2,m=t.y-f/2;t.width=d;let y;if(t.look==="handDrawn"){const k=Ct.svg(c).rectangle(g,m,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});y=c.insert(()=>k,":first-child")}else y=l.insert("rect",":first-child"),y.attr("class","divider").attr("x",g).attr("y",m).attr("width",d).attr("height",f).attr("data-look",t.look);const v=y.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=0,t.intersect=function(C){return La(t,C)},{cluster:c,labelBBox:{}}},"divider"),XR=Nb,QR={rect:Nb,squareRect:XR,roundedWithTitle:YR,noteGroup:UR,divider:GR,kanbanSection:VR},jb=new Map,KR=w(async(e,t)=>{const r=t.shape||"rect",i=await QR[r](e,t);return jb.set(t.id,i),i},"insertCluster"),ZI=w(()=>{jb=new Map},"clear");function Wb(e,t){return e.intersect(t)}w(Wb,"intersectNode");var ZR=Wb;function Hb(e,t,r,i){var s=e.x,o=e.y,c=s-i.x,l=o-i.y,h=Math.sqrt(t*t*l*l+r*r*c*c),d=Math.abs(t*r*c/h);i.x<s&&(d=-d);var f=Math.abs(t*r*l/h);return i.y<o&&(f=-f),{x:s+d,y:o+f}}w(Hb,"intersectEllipse");var qb=Hb;function Ub(e,t,r){return qb(e,t,t,r)}w(Ub,"intersectCircle");var JR=Ub;function Yb(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,c=t.x*e.y-e.x*t.y,l=s*r.x+o*r.y+c,h=s*i.x+o*i.y+c,d=1e-6;if(l!==0&&h!==0&&ip(l,h))return;const f=i.y-r.y,g=r.x-i.x,m=i.x*r.y-r.x*i.y,y=f*e.x+g*e.y+m,v=f*t.x+g*t.y+m;if(Math.abs(y)<d&&Math.abs(v)<d&&ip(y,v))return;const C=s*g-f*o;if(C===0)return;const k=Math.abs(C/2);let _=o*m-g*c;const T=_<0?(_-k)/C:(_+k)/C;_=f*c-s*m;const E=_<0?(_-k)/C:(_+k)/C;return{x:T,y:E}}}w(Yb,"intersectLine");function ip(e,t){return e*t>0}w(ip,"sameSign");var t$=Yb;function Vb(e,t,r){let i=e.x,s=e.y,o=[],c=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(f){c=Math.min(c,f.x),l=Math.min(l,f.y)}):(c=Math.min(c,t.x),l=Math.min(l,t.y));let h=i-e.width/2-c,d=s-e.height/2-l;for(let f=0;f<t.length;f++){let g=t[f],m=t[f<t.length-1?f+1:0],y=t$(e,r,{x:h+g.x,y:d+g.y},{x:h+m.x,y:d+m.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(f,g){let m=f.x-r.x,y=f.y-r.y,v=Math.sqrt(m*m+y*y),C=g.x-r.x,k=g.y-r.y,_=Math.sqrt(C*C+k*k);return v<_?-1:v===_?0:1}),o[0]):e}w(Vb,"intersectPolygon");var e$=Vb,gt={node:ZR,circle:JR,ellipse:qb,polygon:e$,rect:La};function Gb(e,t){const{labelStyles:r}=St(t);t.labelStyle=r;const i=Ft(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=1,{cssStyles:l}=t,h=Ct.svg(o),d=kt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);const f=h.circle(0,0,c*2,d),g=o.insert(()=>f,":first-child");return g.attr("class","anchor").attr("style",ir(l)),Tt(t,g),t.intersect=function(m){return rt.info("Circle intersect",t,c,m),gt.circle(t,c,m)},o}w(Gb,"anchor");function sp(e,t,r,i,s,o,c){const h=(e+r)/2,d=(t+i)/2,f=Math.atan2(i-t,r-e),g=(r-e)/2,m=(i-t)/2,y=g/s,v=m/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-C**2),_=h+k*o*Math.sin(f)*(c?-1:1),T=d-k*s*Math.cos(f)*(c?-1:1),E=Math.atan2((t-T)/o,(e-_)/s);let A=Math.atan2((i-T)/o,(r-_)/s)-E;c&&A<0&&(A+=2*Math.PI),!c&&A>0&&(A-=2*Math.PI);const M=[];for(let R=0;R<20;R++){const O=R/19,tt=E+O*A,et=_+s*Math.cos(tt),V=T+o*Math.sin(tt);M.push({x:et,y:V})}return M}w(sp,"generateArcPoints");async function Xb(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.width+t.padding+20,l=o.height+t.padding,h=l/2,d=h/(2.5+l/50),{cssStyles:f}=t,g=[{x:c/2,y:-l/2},{x:-c/2,y:-l/2},...sp(-c/2,-l/2,-c/2,l/2,d,h,!1),{x:c/2,y:l/2},...sp(c/2,l/2,c/2,-l/2,d,h,!0)],m=Ct.svg(s),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=Gt(g),C=m.path(v,y),k=s.insert(()=>C,":first-child");return k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${d/2}, 0)`),Tt(t,k),t.intersect=function(_){return gt.polygon(t,g,_)},s}w(Xb,"bowTieRect");function Wi(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}w(Wi,"insertPolygonShape");async function Qb(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.height+t.padding,l=12,h=o.width+t.padding+l,d=0,f=h,g=-c,m=0,y=[{x:d+l,y:g},{x:f,y:g},{x:f,y:m},{x:d,y:m},{x:d,y:g+l},{x:d+l,y:g}];let v;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=Ct.svg(s),_=kt(t,{}),T=Gt(y),E=k.path(T,_);v=s.insert(()=>E,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&v.attr("style",C)}else v=Wi(s,h,c,y);return i&&v.attr("style",i),Tt(t,v),t.intersect=function(k){return gt.polygon(t,y,k)},s}w(Qb,"card");function Kb(e,t){const{nodeStyles:r}=St(t);t.label="";const i=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=Ct.svg(i),h=kt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=Gt(c),f=l.path(d,h),g=i.insert(()=>f,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(m){return gt.polygon(t,c,m)},i}w(Kb,"choice");async function pg(e,t,r){const{labelStyles:i,nodeStyles:s}=St(t);t.labelStyle=i;const{shapeSvg:o,bbox:c,halfPadding:l}=await Ot(e,t,Ft(t)),h=(r==null?void 0:r.padding)??l,d=c.width/2+h;let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=Ct.svg(o),y=kt(t,{}),v=m.circle(0,0,d*2,y);f=o.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",ir(g))}else f=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",d).attr("cx",0).attr("cy",0);return Tt(t,f),t.calcIntersect=function(m,y){const v=m.width/2;return gt.circle(m,v,y)},t.intersect=function(m){return rt.info("Circle intersect",t,d,m),gt.circle(t,d,m)},o}w(pg,"circle");function Zb(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},c={x:-(i/2)*t,y:-(i/2)*r},l={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${l.x},${l.y}
|
|
227
|
-
M ${s.x},${s.y} L ${c.x},${c.y}`}w(Zb,"createLine");function Jb(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,l=Ct.svg(s),h=kt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=l.circle(0,0,o*2,h),f=Zb(o),g=l.path(f,h),m=s.insert(()=>d,":first-child");return m.insert(()=>g),c&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),Tt(t,m),t.intersect=function(y){return rt.info("crossedCircle intersect",t,{radius:o,point:y}),gt.circle(t,o,y)},s}w(Jb,"crossedCircle");function Jn(e,t,r,i=100,s=0,o=180){const c=[],l=s*Math.PI/180,f=(o*Math.PI/180-l)/(i-1);for(let g=0;g<i;g++){const m=l+g*f,y=e+r*Math.cos(m),v=t+r*Math.sin(m);c.push({x:-y,y:-v})}return c}w(Jn,"generateCirclePoints");async function tC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=o.width+(t.padding??0),h=o.height+(t.padding??0),d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...Jn(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...Jn(l/2+d*2,-d,d,20,-180,-270),...Jn(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...Jn(l/2,h/2,d,20,0,90)],m=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...Jn(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...Jn(l/2+l*.1,-d,d,20,-180,-270),...Jn(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...Jn(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2,y:h/2+d}],y=Ct.svg(s),v=kt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=Gt(g).replace("Z",""),_=y.path(k,v),T=Gt(m),E=y.path(T,{...v}),B=s.insert("g",":first-child");return B.insert(()=>E,":first-child").attr("stroke-opacity",0),B.insert(()=>_,":first-child"),B.attr("class","text"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),c.attr("transform",`translate(${-l/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Tt(t,B),t.intersect=function(A){return gt.polygon(t,m,A)},s}w(tC,"curlyBraceLeft");function ti(e,t,r,i=100,s=0,o=180){const c=[],l=s*Math.PI/180,f=(o*Math.PI/180-l)/(i-1);for(let g=0;g<i;g++){const m=l+g*f,y=e+r*Math.cos(m),v=t+r*Math.sin(m);c.push({x:y,y:v})}return c}w(ti,"generateCirclePoints");async function eC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=o.width+(t.padding??0),h=o.height+(t.padding??0),d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...ti(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...ti(l/2+d*2,-d,d,20,-180,-270),...ti(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:h/2},...ti(l/2,h/2,d,20,0,90)],m=[{x:-l/2,y:-h/2-d},{x:l/2,y:-h/2-d},...ti(l/2,-h/2,d,20,-90,0),{x:l/2+d,y:-d},...ti(l/2+d*2,-d,d,20,-180,-270),...ti(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:h/2},...ti(l/2,h/2,d,20,0,90),{x:l/2,y:h/2+d},{x:-l/2,y:h/2+d}],y=Ct.svg(s),v=kt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=Gt(g).replace("Z",""),_=y.path(k,v),T=Gt(m),E=y.path(T,{...v}),B=s.insert("g",":first-child");return B.insert(()=>E,":first-child").attr("stroke-opacity",0),B.insert(()=>_,":first-child"),B.attr("class","text"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),c.attr("transform",`translate(${-l/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Tt(t,B),t.intersect=function(A){return gt.polygon(t,m,A)},s}w(eC,"curlyBraceRight");function Ue(e,t,r,i=100,s=0,o=180){const c=[],l=s*Math.PI/180,f=(o*Math.PI/180-l)/(i-1);for(let g=0;g<i;g++){const m=l+g*f,y=e+r*Math.cos(m),v=t+r*Math.sin(m);c.push({x:-y,y:-v})}return c}w(Ue,"generateCirclePoints");async function rC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=o.width+(t.padding??0),h=o.height+(t.padding??0),d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...Ue(l/2,-h/2,d,30,-90,0),{x:-l/2-d,y:d},...Ue(l/2+d*2,-d,d,20,-180,-270),...Ue(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-h/2},...Ue(l/2,h/2,d,20,0,90)],m=[...Ue(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Ue(-l/2-d/2,-d,d,20,0,90),...Ue(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Ue(-l/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:l/2,y:-h/2-d},{x:-l/2,y:-h/2-d},...Ue(l/2,-h/2,d,20,-90,0),{x:-l/2-d,y:-d},...Ue(l/2+d*2,-d,d,20,-180,-270),...Ue(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:h/2},...Ue(l/2,h/2,d,20,0,90),{x:-l/2,y:h/2+d},{x:l/2-d-d/2,y:h/2+d},...Ue(-l/2+d+d/2,-h/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Ue(-l/2-d/2,-d,d,20,0,90),...Ue(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Ue(-l/2+d+d/2,h/2,d,30,-180,-270)],v=Ct.svg(s),C=kt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=Gt(g).replace("Z",""),T=v.path(_,C),B=Gt(m).replace("Z",""),A=v.path(B,C),M=Gt(y),R=v.path(M,{...C}),O=s.insert("g",":first-child");return O.insert(()=>R,":first-child").attr("stroke-opacity",0),O.insert(()=>T,":first-child"),O.insert(()=>A,":first-child"),O.attr("class","text"),f&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${d-d/4}, 0)`),c.attr("transform",`translate(${-l/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Tt(t,O),t.intersect=function(tt){return gt.polygon(t,y,tt)},s}w(rC,"curlyBraces");async function nC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=80,l=20,h=Math.max(c,(o.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(l,o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:g}=t,m=Ct.svg(s),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=h,C=d,k=v-f,_=C/4,T=[{x:k,y:0},{x:_,y:0},{x:0,y:C/2},{x:_,y:C},{x:k,y:C},...tl(-k,-C/2,f,50,270,90)],E=Gt(T),B=m.path(E,y),A=s.insert(()=>B,":first-child");return A.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(${-h/2}, ${-d/2})`),Tt(t,A),t.intersect=function(M){return gt.polygon(t,T,M)},s}w(nC,"curvedTrapezoid");var r$=w((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),n$=w((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),i$=w((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function iC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+t.padding,t.width??0),h=l/2,d=h/(2.5+l/50),f=Math.max(o.height+d+t.padding,t.height??0);let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Ct.svg(s),v=n$(0,0,l,f,h,d),C=i$(0,d,l,f,h,d),k=y.path(v,kt(t,{})),_=y.path(C,kt(t,{fill:"none"}));g=s.insert(()=>_,":first-child"),g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const y=r$(0,0,l,f,h,d);g=s.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",ir(m)).attr("style",i)}return g.attr("label-offset-y",d),g.attr("transform",`translate(${-l/2}, ${-(f/2+d)})`),Tt(t,g),c.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(y){const v=gt.rect(t,y),C=v.x-(t.x??0);if(h!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(v.y-(t.y??0))>(t.height??0)/2-d)){let k=d*d*(1-C*C/(h*h));k>0&&(k=Math.sqrt(k)),k=d-k,y.y-(t.y??0)>0&&(k=-k),v.y+=k}return v},s}w(iC,"cylinder");async function sC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=o.width+t.padding,h=o.height+t.padding,d=h*.2,f=-l/2,g=-h/2-d/2,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:f,y:g+d},{x:-f,y:g+d},{x:-f,y:-g},{x:f,y:-g},{x:f,y:g},{x:-f,y:g},{x:-f,y:g+d}],k=y.polygon(C.map(T=>[T.x,T.y]),v),_=s.insert(()=>k,":first-child");return _.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),c.attr("transform",`translate(${f+(t.padding??0)/2-(o.x-(o.left??0))}, ${g+d+(t.padding??0)/2-(o.y-(o.top??0))})`),Tt(t,_),t.intersect=function(T){return gt.rect(t,T)},s}w(sC,"dividedRectangle");async function aC(e,t){var m,y;const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:c}=await Ot(e,t,Ft(t)),h=o.width/2+c+5,d=o.width/2+c;let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const v=Ct.svg(s),C=kt(t,{roughness:.2,strokeWidth:2.5}),k=kt(t,{roughness:.2,strokeWidth:1.5}),_=v.circle(0,0,h*2,C),T=v.circle(0,0,d*2,k);f=s.insert("g",":first-child"),f.attr("class",ir(t.cssClasses)).attr("style",ir(g)),(m=f.node())==null||m.appendChild(_),(y=f.node())==null||y.appendChild(T)}else{f=s.insert("g",":first-child");const v=f.insert("circle",":first-child"),C=f.insert("circle");f.attr("class","basic label-container").attr("style",i),v.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Tt(t,f),t.intersect=function(v){return rt.info("DoubleCircle intersect",t,h,v),gt.circle(t,h,v)},s}w(aC,"doublecircle");function oC(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=St(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),c=7,{cssStyles:l}=t,h=Ct.svg(o),{nodeBorder:d}=r,f=kt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const g=h.circle(0,0,c*2,f),m=o.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${d} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",l),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),Tt(t,m),t.intersect=function(y){return rt.info("filledCircle intersect",t,{radius:c,point:y}),gt.circle(t,c,y)},o}w(oC,"filledCircle");async function lC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=o.width+(t.padding??0),h=l+o.height,d=l+o.height,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:g}=t,m=Ct.svg(s),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=Gt(f),C=m.path(v,y),k=s.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=h,Tt(t,k),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(_){return rt.info("Triangle intersect",t,f,_),gt.polygon(t,f,_)},s}w(lC,"flippedTriangle");function cC(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=St(t);t.label="";const c=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:l}=t;let h=Math.max(70,(t==null?void 0:t.width)??0),d=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(h=Math.max(10,(t==null?void 0:t.width)??0),d=Math.max(70,(t==null?void 0:t.height)??0));const f=-1*h/2,g=-1*d/2,m=Ct.svg(c),y=kt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=m.rectangle(f,g,h,d,y),C=c.insert(()=>v,":first-child");l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),o&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",o),Tt(t,C);const k=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=k/2||0,t.height+=k/2||0),t.intersect=function(_){return gt.rect(t,_)},c}w(cC,"forkJoin");async function uC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const s=80,o=50,{shapeSvg:c,bbox:l}=await Ot(e,t,Ft(t)),h=Math.max(s,l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(o,l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:g}=t,m=Ct.svg(c),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...tl(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],C=Gt(v),k=m.path(C,y),_=c.insert(()=>k,":first-child");return _.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),Tt(t,_),t.intersect=function(T){return rt.info("Pill intersect",t,{radius:f,point:T}),gt.polygon(t,v,T)},c}w(uC,"halfRoundedRectangle");async function hC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.height+(t.padding??0),l=o.width+(t.padding??0)*2.5,{cssStyles:h}=t,d=Ct.svg(s),f=kt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=l/2;const m=g/6;g=g+m;const y=c/2,v=y/2,C=g-v,k=[{x:-C,y:-y},{x:0,y:-y},{x:C,y:-y},{x:g,y:0},{x:C,y},{x:0,y},{x:-C,y},{x:-g,y:0}],_=Gt(k),T=d.path(_,f),E=s.insert(()=>T,":first-child");return E.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),t.width=l,t.height=c,Tt(t,E),t.intersect=function(B){return gt.polygon(t,k,B)},s}w(hC,"hexagon");async function dC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Ot(e,t,Ft(t)),o=Math.max(30,(t==null?void 0:t.width)??0),c=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:l}=t,h=Ct.svg(s),d=kt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=Gt(f),m=h.path(g,d),y=s.insert(()=>m,":first-child");return y.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-o/2}, ${-c/2})`),Tt(t,y),t.intersect=function(v){return rt.info("Pill intersect",t,{points:f}),gt.polygon(t,f,v)},s}w(dC,"hourglass");async function fC(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=St(t);t.labelStyle=s;const o=t.assetHeight??48,c=t.assetWidth??48,l=Math.max(o,c),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,h??0);const{shapeSvg:d,bbox:f,label:g}=await Ot(e,t,"icon-shape default"),m=t.pos==="t",y=l,v=l,{nodeBorder:C}=r,{stylesMap:k}=Sa(t),_=-v/2,T=-y/2,E=t.label?8:0,B=Ct.svg(d),A=kt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=B.rectangle(_,T,v,y,A),R=Math.max(v,f.width),O=y+f.height+E,tt=B.rectangle(-R/2,-O/2,R,O,{...A,fill:"transparent",stroke:"none"}),et=d.insert(()=>M,":first-child"),V=d.insert(()=>tt);if(t.icon){const nt=d.append("g");nt.html(`<g>${await hl(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const J=nt.node().getBBox(),Y=J.width,W=J.height,N=J.x,q=J.y;nt.attr("transform",`translate(${-Y/2-N},${m?f.height/2+E/2-W/2-q:-f.height/2-E/2-W/2-q})`),nt.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-O/2:O/2-f.height})`),et.attr("transform",`translate(0,${m?f.height/2+E/2:-f.height/2-E/2})`),Tt(t,V),t.intersect=function(nt){if(rt.info("iconSquare intersect",t,nt),!t.label)return gt.rect(t,nt);const J=t.x??0,Y=t.y??0,W=t.height??0;let N=[];return m?N=[{x:J-f.width/2,y:Y-W/2},{x:J+f.width/2,y:Y-W/2},{x:J+f.width/2,y:Y-W/2+f.height+E},{x:J+v/2,y:Y-W/2+f.height+E},{x:J+v/2,y:Y+W/2},{x:J-v/2,y:Y+W/2},{x:J-v/2,y:Y-W/2+f.height+E},{x:J-f.width/2,y:Y-W/2+f.height+E}]:N=[{x:J-v/2,y:Y-W/2},{x:J+v/2,y:Y-W/2},{x:J+v/2,y:Y-W/2+y},{x:J+f.width/2,y:Y-W/2+y},{x:J+f.width/2/2,y:Y+W/2},{x:J-f.width/2,y:Y+W/2},{x:J-f.width/2,y:Y-W/2+y},{x:J-v/2,y:Y-W/2+y}],gt.polygon(t,N,nt)},d}w(fC,"icon");async function pC(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=St(t);t.labelStyle=s;const o=t.assetHeight??48,c=t.assetWidth??48,l=Math.max(o,c),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,h??0);const{shapeSvg:d,bbox:f,label:g}=await Ot(e,t,"icon-shape default"),m=20,y=t.label?8:0,v=t.pos==="t",{nodeBorder:C,mainBkg:k}=r,{stylesMap:_}=Sa(t),T=Ct.svg(d),E=kt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=_.get("fill");E.stroke=B??k;const A=d.append("g");t.icon&&A.html(`<g>${await hl(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const M=A.node().getBBox(),R=M.width,O=M.height,tt=M.x,et=M.y,V=Math.max(R,O)*Math.SQRT2+m*2,nt=T.circle(0,0,V,E),J=Math.max(V,f.width),Y=V+f.height+y,W=T.rectangle(-J/2,-Y/2,J,Y,{...E,fill:"transparent",stroke:"none"}),N=d.insert(()=>nt,":first-child"),q=d.insert(()=>W);return A.attr("transform",`translate(${-R/2-tt},${v?f.height/2+y/2-O/2-et:-f.height/2-y/2-O/2-et})`),A.attr("style",`color: ${_.get("stroke")??C};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-Y/2:Y/2-f.height})`),N.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),Tt(t,q),t.intersect=function(D){return rt.info("iconSquare intersect",t,D),gt.rect(t,D)},d}w(pC,"iconCircle");async function gC(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=St(t);t.labelStyle=s;const o=t.assetHeight??48,c=t.assetWidth??48,l=Math.max(o,c),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,h??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:m}=await Ot(e,t,"icon-shape default"),y=t.pos==="t",v=l+g*2,C=l+g*2,{nodeBorder:k,mainBkg:_}=r,{stylesMap:T}=Sa(t),E=-C/2,B=-v/2,A=t.label?8:0,M=Ct.svg(d),R=kt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const O=T.get("fill");R.stroke=O??_;const tt=M.path(ji(E,B,C,v,5),R),et=Math.max(C,f.width),V=v+f.height+A,nt=M.rectangle(-et/2,-V/2,et,V,{...R,fill:"transparent",stroke:"none"}),J=d.insert(()=>tt,":first-child").attr("class","icon-shape2"),Y=d.insert(()=>nt);if(t.icon){const W=d.append("g");W.html(`<g>${await hl(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const N=W.node().getBBox(),q=N.width,D=N.height,Z=N.x,Q=N.y;W.attr("transform",`translate(${-q/2-Z},${y?f.height/2+A/2-D/2-Q:-f.height/2-A/2-D/2-Q})`),W.attr("style",`color: ${T.get("stroke")??k};`)}return m.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-V/2:V/2-f.height})`),J.attr("transform",`translate(0,${y?f.height/2+A/2:-f.height/2-A/2})`),Tt(t,Y),t.intersect=function(W){if(rt.info("iconSquare intersect",t,W),!t.label)return gt.rect(t,W);const N=t.x??0,q=t.y??0,D=t.height??0;let Z=[];return y?Z=[{x:N-f.width/2,y:q-D/2},{x:N+f.width/2,y:q-D/2},{x:N+f.width/2,y:q-D/2+f.height+A},{x:N+C/2,y:q-D/2+f.height+A},{x:N+C/2,y:q+D/2},{x:N-C/2,y:q+D/2},{x:N-C/2,y:q-D/2+f.height+A},{x:N-f.width/2,y:q-D/2+f.height+A}]:Z=[{x:N-C/2,y:q-D/2},{x:N+C/2,y:q-D/2},{x:N+C/2,y:q-D/2+v},{x:N+f.width/2,y:q-D/2+v},{x:N+f.width/2/2,y:q+D/2},{x:N-f.width/2,y:q+D/2},{x:N-f.width/2,y:q-D/2+v},{x:N-C/2,y:q-D/2+v}],gt.polygon(t,Z,W)},d}w(gC,"iconRounded");async function mC(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=St(t);t.labelStyle=s;const o=t.assetHeight??48,c=t.assetWidth??48,l=Math.max(o,c),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(l,h??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:m}=await Ot(e,t,"icon-shape default"),y=t.pos==="t",v=l+g*2,C=l+g*2,{nodeBorder:k,mainBkg:_}=r,{stylesMap:T}=Sa(t),E=-C/2,B=-v/2,A=t.label?8:0,M=Ct.svg(d),R=kt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const O=T.get("fill");R.stroke=O??_;const tt=M.path(ji(E,B,C,v,.1),R),et=Math.max(C,f.width),V=v+f.height+A,nt=M.rectangle(-et/2,-V/2,et,V,{...R,fill:"transparent",stroke:"none"}),J=d.insert(()=>tt,":first-child"),Y=d.insert(()=>nt);if(t.icon){const W=d.append("g");W.html(`<g>${await hl(t.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const N=W.node().getBBox(),q=N.width,D=N.height,Z=N.x,Q=N.y;W.attr("transform",`translate(${-q/2-Z},${y?f.height/2+A/2-D/2-Q:-f.height/2-A/2-D/2-Q})`),W.attr("style",`color: ${T.get("stroke")??k};`)}return m.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-V/2:V/2-f.height})`),J.attr("transform",`translate(0,${y?f.height/2+A/2:-f.height/2-A/2})`),Tt(t,Y),t.intersect=function(W){if(rt.info("iconSquare intersect",t,W),!t.label)return gt.rect(t,W);const N=t.x??0,q=t.y??0,D=t.height??0;let Z=[];return y?Z=[{x:N-f.width/2,y:q-D/2},{x:N+f.width/2,y:q-D/2},{x:N+f.width/2,y:q-D/2+f.height+A},{x:N+C/2,y:q-D/2+f.height+A},{x:N+C/2,y:q+D/2},{x:N-C/2,y:q+D/2},{x:N-C/2,y:q-D/2+f.height+A},{x:N-f.width/2,y:q-D/2+f.height+A}]:Z=[{x:N-C/2,y:q-D/2},{x:N+C/2,y:q-D/2},{x:N+C/2,y:q-D/2+v},{x:N+f.width/2,y:q-D/2+v},{x:N+f.width/2/2,y:q+D/2},{x:N-f.width/2,y:q+D/2},{x:N-f.width/2,y:q-D/2+v},{x:N-C/2,y:q-D/2+v}],gt.polygon(t,Z,W)},d}w(mC,"iconSquare");async function yC(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:c}=St(t);t.labelStyle=c;const l=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const h=Math.max(t.label?l??0:0,(t==null?void 0:t.assetWidth)??s),d=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:h,f=t.constraint==="on"?d/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(d,l??0);const{shapeSvg:g,bbox:m,label:y}=await Ot(e,t,"image-shape default"),v=t.pos==="t",C=-d/2,k=-f/2,_=t.label?8:0,T=Ct.svg(g),E=kt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=T.rectangle(C,k,d,f,E),A=Math.max(d,m.width),M=f+m.height+_,R=T.rectangle(-A/2,-M/2,A,M,{...E,fill:"none",stroke:"none"}),O=g.insert(()=>B,":first-child"),tt=g.insert(()=>R);if(t.img){const et=g.append("image");et.attr("href",t.img),et.attr("width",d),et.attr("height",f),et.attr("preserveAspectRatio","none"),et.attr("transform",`translate(${-d/2},${v?M/2-f:-M/2})`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${v?-f/2-m.height/2-_/2:f/2-m.height/2+_/2})`),O.attr("transform",`translate(0,${v?m.height/2+_/2:-m.height/2-_/2})`),Tt(t,tt),t.intersect=function(et){if(rt.info("iconSquare intersect",t,et),!t.label)return gt.rect(t,et);const V=t.x??0,nt=t.y??0,J=t.height??0;let Y=[];return v?Y=[{x:V-m.width/2,y:nt-J/2},{x:V+m.width/2,y:nt-J/2},{x:V+m.width/2,y:nt-J/2+m.height+_},{x:V+d/2,y:nt-J/2+m.height+_},{x:V+d/2,y:nt+J/2},{x:V-d/2,y:nt+J/2},{x:V-d/2,y:nt-J/2+m.height+_},{x:V-m.width/2,y:nt-J/2+m.height+_}]:Y=[{x:V-d/2,y:nt-J/2},{x:V+d/2,y:nt-J/2},{x:V+d/2,y:nt-J/2+f},{x:V+m.width/2,y:nt-J/2+f},{x:V+m.width/2/2,y:nt+J/2},{x:V-m.width/2,y:nt+J/2},{x:V-m.width/2,y:nt-J/2+f},{x:V-d/2,y:nt-J/2+f}],gt.polygon(t,Y,et)},g}w(yC,"imageSquare");async function xC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=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),h=[{x:0,y:0},{x:c,y:0},{x:c+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Ct.svg(s),m=kt(t,{}),y=Gt(h),v=g.path(y,m);d=s.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),f&&d.attr("style",f)}else d=Wi(s,c,l,h);return i&&d.attr("style",i),t.width=c,t.height=l,Tt(t,d),t.intersect=function(g){return gt.polygon(t,h,g)},s}w(xC,"inv_trapezoid");async function nh(e,t,r){const{labelStyles:i,nodeStyles:s}=St(t);t.labelStyle=i;const{shapeSvg:o,bbox:c}=await Ot(e,t,Ft(t)),l=Math.max(c.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),h=Math.max(c.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),d=-l/2,f=-h/2;let g,{rx:m,ry:y}=t;const{cssStyles:v}=t;if(r!=null&&r.rx&&r.ry&&(m=r.rx,y=r.ry),t.look==="handDrawn"){const C=Ct.svg(o),k=kt(t,{}),_=m||y?C.path(ji(d,f,l,h,m||0),k):C.rectangle(d,f,l,h,k);g=o.insert(()=>_,":first-child"),g.attr("class","basic label-container").attr("style",ir(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",s).attr("rx",ir(m)).attr("ry",ir(y)).attr("x",d).attr("y",f).attr("width",l).attr("height",h);return Tt(t,g),t.calcIntersect=function(C,k){return gt.rect(C,k)},t.intersect=function(C){return gt.rect(t,C)},o}w(nh,"drawRect");async function vC(e,t){const{shapeSvg:r,bbox:i,label:s}=await Ot(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Tt(t,o),t.intersect=function(h){return gt.rect(t,h)},r}w(vC,"labelRect");async function bC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),h=[{x:0,y:0},{x:c+3*l/6,y:0},{x:c,y:-l},{x:-(3*l)/6,y:-l}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Ct.svg(s),m=kt(t,{}),y=Gt(h),v=g.path(y,m);d=s.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),f&&d.attr("style",f)}else d=Wi(s,c,l,h);return i&&d.attr("style",i),t.width=c,t.height=l,Tt(t,d),t.intersect=function(g){return gt.polygon(t,h,g)},s}w(bC,"lean_left");async function CC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),h=[{x:-3*l/6,y:0},{x:c,y:0},{x:c+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Ct.svg(s),m=kt(t,{}),y=Gt(h),v=g.path(y,m);d=s.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),f&&d.attr("style",f)}else d=Wi(s,c,l,h);return i&&d.attr("style",i),t.width=c,t.height=l,Tt(t,d),t.intersect=function(g){return gt.polygon(t,h,g)},s}w(CC,"lean_right");function wC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,c=Math.max(35,(t==null?void 0:t.width)??0),l=Math.max(35,(t==null?void 0:t.height)??0),h=7,d=[{x:c,y:0},{x:0,y:l+h/2},{x:c-2*h,y:l+h/2},{x:0,y:2*l},{x:c,y:l-h/2},{x:2*h,y:l-h/2}],f=Ct.svg(s),g=kt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=Gt(d),y=f.path(m,g),v=s.insert(()=>y,":first-child");return o&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(-${c/2},${-l})`),Tt(t,v),t.intersect=function(C){return rt.info("lightningBolt intersect",t,C),gt.polygon(t,d,C)},s}w(wC,"lightningBolt");var s$=w((e,t,r,i,s,o,c)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+c}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),a$=w((e,t,r,i,s,o,c)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+c}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),o$=w((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function kC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0),t.width??0),h=l/2,d=h/(2.5+l/50),f=Math.max(o.height+d+(t.padding??0),t.height??0),g=f*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const v=Ct.svg(s),C=a$(0,0,l,f,h,d,g),k=o$(0,d,l,f,h,d),_=kt(t,{}),T=v.path(C,_),E=v.path(k,_);s.insert(()=>E,":first-child").attr("class","line"),m=s.insert(()=>T,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const v=s$(0,0,l,f,h,d,g);m=s.insert("path",":first-child").attr("d",v).attr("class","basic label-container").attr("style",ir(y)).attr("style",i)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-l/2}, ${-(f/2+d)})`),Tt(t,m),c.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+d-(o.y-(o.top??0))})`),t.intersect=function(v){const C=gt.rect(t,v),k=C.x-(t.x??0);if(h!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-d)){let _=d*d*(1-k*k/(h*h));_>0&&(_=Math.sqrt(_)),_=d-_,v.y-(t.y??0)>0&&(_=-_),C.y+=_}return C},s}w(kC,"linedCylinder");async function SC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=h/4,f=h+d,{cssStyles:g}=t,m=Ct.svg(s),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...Oi(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,d,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],C=m.polygon(v.map(_=>[_.x,_.y]),y),k=s.insert(()=>C,":first-child");return k.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)-d/2-(o.y-(o.top??0))})`),Tt(t,k),t.intersect=function(_){return gt.polygon(t,v,_)},s}w(SC,"linedWaveEdgedRect");async function _C(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=5,f=-l/2,g=-h/2,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{}),C=[{x:f-d,y:g+d},{x:f-d,y:g+h+d},{x:f+l-d,y:g+h+d},{x:f+l-d,y:g+h},{x:f+l,y:g+h},{x:f+l,y:g+h-d},{x:f+l+d,y:g+h-d},{x:f+l+d,y:g-d},{x:f+d,y:g-d},{x:f+d,y:g},{x:f,y:g},{x:f,y:g+d}],k=[{x:f,y:g+d},{x:f+l-d,y:g+d},{x:f+l-d,y:g+h},{x:f+l,y:g+h},{x:f+l,y:g},{x:f,y:g}];t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=Gt(C),T=y.path(_,v),E=Gt(k),B=y.path(E,{...v,fill:"none"}),A=s.insert(()=>B,":first-child");return A.insert(()=>T,":first-child"),A.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(o.width/2)-d-(o.x-(o.left??0))}, ${-(o.height/2)+d-(o.y-(o.top??0))})`),Tt(t,A),t.intersect=function(M){return gt.polygon(t,C,M)},s}w(_C,"multiRect");async function TC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=h/4,f=h+d,g=-l/2,m=-f/2,y=5,{cssStyles:v}=t,C=Oi(g-y,m+f+y,g+l-y,m+f+y,d,.8),k=C==null?void 0:C[C.length-1],_=[{x:g-y,y:m+y},{x:g-y,y:m+f+y},...C,{x:g+l-y,y:k.y-y},{x:g+l,y:k.y-y},{x:g+l,y:k.y-2*y},{x:g+l+y,y:k.y-2*y},{x:g+l+y,y:m-y},{x:g+y,y:m-y},{x:g+y,y:m},{x:g,y:m},{x:g,y:m+y}],T=[{x:g,y:m+y},{x:g+l-y,y:m+y},{x:g+l-y,y:k.y-y},{x:g+l,y:k.y-y},{x:g+l,y:m},{x:g,y:m}],E=Ct.svg(s),B=kt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const A=Gt(_),M=E.path(A,B),R=Gt(T),O=E.path(R,B),tt=s.insert(()=>M,":first-child");return tt.insert(()=>O),tt.attr("class","basic label-container"),v&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",i),tt.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-(o.width/2)-y-(o.x-(o.left??0))}, ${-(o.height/2)+y-d/2-(o.y-(o.top??0))})`),Tt(t,tt),t.intersect=function(et){return gt.polygon(t,_,et)},s}w(TC,"multiWaveEdgedRectangle");async function LC(e,t,{config:{themeVariables:r}}){var T;const{labelStyles:i,nodeStyles:s}=St(t);t.labelStyle=i,t.useHtmlLabels||((T=rr().flowchart)==null?void 0:T.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:c,bbox:l,label:h}=await Ot(e,t,Ft(t)),d=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),f=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),g=-d/2,m=-f/2,{cssStyles:y}=t,v=Ct.svg(c),C=kt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=v.rectangle(g,m,d,f,C),_=c.insert(()=>k,":first-child");return _.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",y),s&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",s),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Tt(t,_),t.intersect=function(E){return gt.rect(t,E)},c}w(LC,"note");var l$=w((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 EC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.width+t.padding,l=o.height+t.padding,h=c+l,d=.5,f=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Ct.svg(s),v=kt(t,{}),C=l$(0,0,h),k=y.path(C,v);g=s.insert(()=>k,":first-child").attr("transform",`translate(${-h/2+d}, ${h/2})`),m&&g.attr("style",m)}else g=Wi(s,h,h,f),g.attr("transform",`translate(${-h/2+d}, ${h/2})`);return i&&g.attr("style",i),Tt(t,g),t.calcIntersect=function(y,v){const C=y.width,k=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],_=gt.polygon(y,k,v);return{x:_.x-.5,y:_.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},s}w(EC,"question");async function MC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),d=-l/2,f=-h/2,g=f/2,m=[{x:d+g,y:f},{x:d,y:0},{x:d+g,y:-f},{x:-d,y:-f},{x:-d,y:f}],{cssStyles:y}=t,v=Ct.svg(s),C=kt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Gt(m),_=v.path(k,C),T=s.insert(()=>_,":first-child");return T.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Tt(t,T),t.intersect=function(E){return gt.polygon(t,m,E)},s}w(MC,"rect_left_inv_arrow");async function BC(e,t){var O,tt;const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=o.insert("g"),l=o.insert("g").attr("class","label").attr("style",i),h=t.description,d=t.label,f=l.node().appendChild(await ps(d,t.labelStyle,!0,!0));let g={width:0,height:0};if(Fe((tt=(O=ne())==null?void 0:O.flowchart)==null?void 0:tt.htmlLabels)){const et=f.children[0],V=Xt(f);g=et.getBoundingClientRect(),V.attr("width",g.width),V.attr("height",g.height)}rt.info("Text 2",h);const m=h||[],y=f.getBBox(),v=l.node().appendChild(await ps(m.join?m.join("<br/>"):m,t.labelStyle,!0,!0)),C=v.children[0],k=Xt(v);g=C.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height);const _=(t.padding||0)/2;Xt(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+_+5)+")"),Xt(f).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=l.node().getBBox(),l.attr("transform","translate("+-g.width/2+", "+(-g.height/2-_+3)+")");const T=g.width+(t.padding||0),E=g.height+(t.padding||0),B=-g.width/2-_,A=-g.height/2-_;let M,R;if(t.look==="handDrawn"){const et=Ct.svg(o),V=kt(t,{}),nt=et.path(ji(B,A,T,E,t.rx||0),V),J=et.line(-g.width/2-_,-g.height/2-_+y.height+_,g.width/2+_,-g.height/2-_+y.height+_,V);R=o.insert(()=>(rt.debug("Rough node insert CXC",nt),J),":first-child"),M=o.insert(()=>(rt.debug("Rough node insert CXC",nt),nt),":first-child")}else M=c.insert("rect",":first-child"),R=c.insert("line"),M.attr("class","outer title-state").attr("style",i).attr("x",-g.width/2-_).attr("y",-g.height/2-_).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),R.attr("class","divider").attr("x1",-g.width/2-_).attr("x2",g.width/2+_).attr("y1",-g.height/2-_+y.height+_).attr("y2",-g.height/2-_+y.height+_);return Tt(t,M),t.intersect=function(et){return gt.rect(t,et)},o}w(BC,"rectWithTitle");function Do(e,t,r,i,s,o,c){const h=(e+r)/2,d=(t+i)/2,f=Math.atan2(i-t,r-e),g=(r-e)/2,m=(i-t)/2,y=g/s,v=m/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-C**2),_=h+k*o*Math.sin(f)*(c?-1:1),T=d-k*s*Math.cos(f)*(c?-1:1),E=Math.atan2((t-T)/o,(e-_)/s);let A=Math.atan2((i-T)/o,(r-_)/s)-E;c&&A<0&&(A+=2*Math.PI),!c&&A>0&&(A-=2*Math.PI);const M=[];for(let R=0;R<20;R++){const O=R/19,tt=E+O*A,et=_+s*Math.cos(tt),V=T+o*Math.sin(tt);M.push({x:et,y:V})}return M}w(Do,"generateArcPoints");async function AC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=(t==null?void 0:t.padding)??0,l=(t==null?void 0:t.padding)??0,h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+c*2,d=(t!=null&&t.height?t==null?void 0:t.height:o.height)+l*2,f=t.radius||5,g=t.taper||5,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{});t.stroke&&(v.stroke=t.stroke),t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-h/2+g,y:-d/2},{x:h/2-g,y:-d/2},...Do(h/2-g,-d/2,h/2,-d/2+g,f,f,!0),{x:h/2,y:-d/2+g},{x:h/2,y:d/2-g},...Do(h/2,d/2-g,h/2-g,d/2,f,f,!0),{x:h/2-g,y:d/2},{x:-h/2+g,y:d/2},...Do(-h/2+g,d/2,-h/2,d/2-g,f,f,!0),{x:-h/2,y:d/2-g},{x:-h/2,y:-d/2+g},...Do(-h/2,-d/2+g,-h/2+g,-d/2,f,f,!0)],k=Gt(C),_=y.path(k,v),T=s.insert(()=>_,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Tt(t,T),t.intersect=function(E){return gt.polygon(t,C,E)},s}w(AC,"roundedRect");async function RC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=(t==null?void 0:t.padding)??0,h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=-o.width/2-l,g=-o.height/2-l,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:f,y:g},{x:f+h+8,y:g},{x:f+h+8,y:g+d},{x:f-8,y:g+d},{x:f-8,y:g},{x:f,y:g},{x:f,y:g+d}],k=y.polygon(C.map(T=>[T.x,T.y]),v),_=s.insert(()=>k,":first-child");return _.attr("class","basic label-container").attr("style",ir(m)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h/2+4+(t.padding??0)-(o.x-(o.left??0))},${-d/2+(t.padding??0)-(o.y-(o.top??0))})`),Tt(t,_),t.intersect=function(T){return gt.rect(t,T)},s}w(RC,"shadedProcess");async function $C(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-l/2,f=-h/2,{cssStyles:g}=t,m=Ct.svg(s),y=kt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:d,y:f},{x:d,y:f+h},{x:d+l,y:f+h},{x:d+l,y:f-h/2}],C=Gt(v),k=m.path(C,y),_=s.insert(()=>k,":first-child");return _.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${h/4})`),c.attr("transform",`translate(${-l/2+(t.padding??0)-(o.x-(o.left??0))}, ${-h/4+(t.padding??0)-(o.y-(o.top??0))})`),Tt(t,_),t.intersect=function(T){return gt.polygon(t,v,T)},s}w($C,"slopedRect");async function FC(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return nh(e,t,r)}w(FC,"squareRect");async function DC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.height+t.padding,l=o.width+c/4+t.padding,h=c/2,{cssStyles:d}=t,f=Ct.svg(s),g=kt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...tl(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},...tl(l/2-h,0,h,50,270,450)],y=Gt(m),v=f.path(y,g),C=s.insert(()=>v,":first-child");return C.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),Tt(t,C),t.intersect=function(k){return gt.polygon(t,m,k)},s}w(DC,"stadium");async function IC(e,t){return nh(e,t,{rx:5,ry:5})}w(IC,"state");function PC(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=St(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:c,stateBorder:l,nodeBorder:h}=r,d=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),f=Ct.svg(d),g=kt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=f.circle(0,0,14,{...g,stroke:c,strokeWidth:2}),y=l??h,v=f.circle(0,0,5,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=d.insert(()=>m,":first-child");return C.insert(()=>v),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),Tt(t,C),t.intersect=function(k){return gt.circle(t,7,k)},d}w(PC,"stateEnd");function OC(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const l=Ct.svg(s).circle(0,0,14,aA(i));o=s.insert(()=>l),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Tt(t,o),t.intersect=function(c){return gt.circle(t,7,c)},s}w(OC,"stateStart");async function zC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=((t==null?void 0:t.padding)||0)/2,l=o.width+t.padding,h=o.height+t.padding,d=-o.width/2-c,f=-o.height/2-c,g=[{x:0,y:0},{x:l,y:0},{x:l,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Ct.svg(s),y=kt(t,{}),v=m.rectangle(d-8,f,l+16,h,y),C=m.line(d,f,d,f+h,y),k=m.line(d+l,f,d+l,f+h,y);s.insert(()=>C,":first-child"),s.insert(()=>k,":first-child");const _=s.insert(()=>v,":first-child"),{cssStyles:T}=t;_.attr("class","basic label-container").attr("style",ir(T)),Tt(t,_)}else{const m=Wi(s,l,h,g);i&&m.attr("style",i),Tt(t,m)}return t.intersect=function(m){return gt.polygon(t,g,m)},s}w(zC,"subroutine");async function NC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=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),h=-c/2,d=-l/2,f=.2*l,g=.2*l,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{}),C=[{x:h-f/2,y:d},{x:h+c+f/2,y:d},{x:h+c+f/2,y:d+l},{x:h-f/2,y:d+l}],k=[{x:h+c-f/2,y:d+l},{x:h+c+f/2,y:d+l},{x:h+c+f/2,y:d+l-g}];t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=Gt(C),T=y.path(_,v),E=Gt(k),B=y.path(E,{...v,fillStyle:"solid"}),A=s.insert(()=>B,":first-child");return A.insert(()=>T,":first-child"),A.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),Tt(t,A),t.intersect=function(M){return gt.polygon(t,C,M)},s}w(NC,"taggedRect");async function jC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=h/4,f=.2*l,g=.2*h,m=h+d,{cssStyles:y}=t,v=Ct.svg(s),C=kt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:m/2},...Oi(-l/2-l/2*.1,m/2,l/2+l/2*.1,m/2,d,.8),{x:l/2+l/2*.1,y:-m/2},{x:-l/2-l/2*.1,y:-m/2}],_=-l/2+l/2*.1,T=-m/2-g*.4,E=[{x:_+l-f,y:(T+h)*1.4},{x:_+l,y:T+h-g},{x:_+l,y:(T+h)*.9},...Oi(_+l,(T+h)*1.3,_+l-f,(T+h)*1.5,-h*.03,.5)],B=Gt(k),A=v.path(B,C),M=Gt(E),R=v.path(M,{...C,fillStyle:"solid"}),O=s.insert(()=>R,":first-child");return O.insert(()=>A,":first-child"),O.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-d/2-(o.y-(o.top??0))})`),Tt(t,O),t.intersect=function(tt){return gt.polygon(t,k,tt)},s}w(jC,"taggedWaveEdgedRectangle");async function WC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=Math.max(o.width+t.padding,(t==null?void 0:t.width)||0),l=Math.max(o.height+t.padding,(t==null?void 0:t.height)||0),h=-c/2,d=-l/2,f=s.insert("rect",":first-child");return f.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",d).attr("width",c).attr("height",l),Tt(t,f),t.intersect=function(g){return gt.rect(t,g)},s}w(WC,"text");var c$=w((e,t,r,i,s,o)=>`M${e},${t}
|
|
228
|
-
a${s},${o} 0,0,1 0,${-i}
|
|
229
|
-
l${r},0
|
|
230
|
-
a${s},${o} 0,0,1 0,${i}
|
|
231
|
-
M${r},${-i}
|
|
232
|
-
a${s},${o} 0,0,0 0,${i}
|
|
233
|
-
l${-r},0`,"createCylinderPathD"),u$=w((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),h$=w((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function HC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c,halfPadding:l}=await Ot(e,t,Ft(t)),h=t.look==="neo"?l*2:l,d=o.height+h,f=d/2,g=f/(2.5+d/50),m=o.width+g+h,{cssStyles:y}=t;let v;if(t.look==="handDrawn"){const C=Ct.svg(s),k=u$(0,0,m,d,g,f),_=h$(0,0,m,d,g,f),T=C.path(k,kt(t,{})),E=C.path(_,kt(t,{fill:"none"}));v=s.insert(()=>E,":first-child"),v=s.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=c$(0,0,m,d,g,f);v=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ir(y)).attr("style",i),v.attr("class","basic label-container"),y&&v.selectAll("path").attr("style",y),i&&v.selectAll("path").attr("style",i)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-m/2}, ${d/2} )`),c.attr("transform",`translate(${-(o.width/2)-g-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Tt(t,v),t.intersect=function(C){const k=gt.rect(t,C),_=k.y-(t.y??0);if(f!=0&&(Math.abs(_)<(t.height??0)/2||Math.abs(_)==(t.height??0)/2&&Math.abs(k.x-(t.x??0))>(t.width??0)/2-g)){let T=g*g*(1-_*_/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(t.x??0)>0&&(T=-T),k.x+=T}return k},s}w(HC,"tiltedCylinder");async function qC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=o.width+t.padding,l=o.height+t.padding,h=[{x:-3*l/6,y:0},{x:c+3*l/6,y:0},{x:c,y:-l},{x:0,y:-l}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Ct.svg(s),m=kt(t,{}),y=Gt(h),v=g.path(y,m);d=s.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),f&&d.attr("style",f)}else d=Wi(s,c,l,h);return i&&d.attr("style",i),t.width=c,t.height=l,Tt(t,d),t.intersect=function(g){return gt.polygon(t,h,g)},s}w(qC,"trapezoid");async function UC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=60,l=20,h=Math.max(c,o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(l,o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:f}=t,g=Ct.svg(s),m=kt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2*.8,y:-d/2},{x:h/2*.8,y:-d/2},{x:h/2,y:-d/2*.6},{x:h/2,y:d/2},{x:-h/2,y:d/2},{x:-h/2,y:-d/2*.6}],v=Gt(y),C=g.path(v,m),k=s.insert(()=>C,":first-child");return k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Tt(t,k),t.intersect=function(_){return gt.polygon(t,y,_)},s}w(UC,"trapezoidalPentagon");async function YC(e,t){var T;const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Fe((T=ne().flowchart)==null?void 0:T.htmlLabels),h=o.width+(t.padding??0),d=h+o.height,f=h+o.height,g=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=Gt(g),k=y.path(C,v),_=s.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=h,t.height=d,Tt(t,_),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${d/2-(o.height+(t.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(E){return rt.info("Triangle intersect",t,g,E),gt.polygon(t,g,E)},s}w(YC,"triangle");async function VC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=h/8,f=h+d,{cssStyles:g}=t,y=70-l,v=y>0?y/2:0,C=Ct.svg(s),k=kt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=[{x:-l/2-v,y:f/2},...Oi(-l/2-v,f/2,l/2+v,f/2,d,.8),{x:l/2+v,y:-f/2},{x:-l/2-v,y:-f/2}],T=Gt(_),E=C.path(T,k),B=s.insert(()=>E,":first-child");return B.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-d-(o.y-(o.top??0))})`),Tt(t,B),t.intersect=function(A){return gt.polygon(t,_,A)},s}w(VC,"waveEdgedRectangle");async function GC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ot(e,t,Ft(t)),c=100,l=50,h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=h/d;let g=h,m=d;g>m*f?m=g/f:g=m*f,g=Math.max(g,c),m=Math.max(m,l);const y=Math.min(m*.2,m/4),v=m+y*2,{cssStyles:C}=t,k=Ct.svg(s),_=kt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=[{x:-g/2,y:v/2},...Oi(-g/2,v/2,g/2,v/2,y,1),{x:g/2,y:-v/2},...Oi(g/2,-v/2,-g/2,-v/2,y,-1)],E=Gt(T),B=k.path(E,_),A=s.insert(()=>B,":first-child");return A.attr("class","basic label-container"),C&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),Tt(t,A),t.intersect=function(M){return gt.polygon(t,T,M)},s}w(GC,"waveRectangle");async function XC(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:c}=await Ot(e,t,Ft(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=5,f=-l/2,g=-h/2,{cssStyles:m}=t,y=Ct.svg(s),v=kt(t,{}),C=[{x:f-d,y:g-d},{x:f-d,y:g+h},{x:f+l,y:g+h},{x:f+l,y:g-d}],k=`M${f-d},${g-d} L${f+l},${g-d} L${f+l},${g+h} L${f-d},${g+h} L${f-d},${g-d}
|
|
234
|
-
M${f-d},${g} L${f+l},${g}
|
|
235
|
-
M${f},${g-d} L${f},${g+h}`;t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=y.path(k,v),T=s.insert(()=>_,":first-child");return T.attr("transform",`translate(${d/2}, ${d/2})`),T.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(o.width/2)+d/2-(o.x-(o.left??0))}, ${-(o.height/2)+d/2-(o.y-(o.top??0))})`),Tt(t,T),t.intersect=function(E){return gt.polygon(t,C,E)},s}w(XC,"windowPane");async function gg(e,t){var K,ut,pt,dt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:ht}=rr(),{background:yt}=ht,Lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${yt}`]};await gg(e,Lt)}const i=rr();t.useHtmlLabels=i.htmlLabels;let s=((K=i.er)==null?void 0:K.diagramPadding)??10,o=((ut=i.er)==null?void 0:ut.entityPadding)??6;const{cssStyles:c}=t,{labelStyles:l,nodeStyles:h}=St(t);if(r.attributes.length===0&&t.label){const ht={rx:0,ry:0,labelPaddingX:s,labelPaddingY:s*1.5};ii(t.label,i)+ht.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const yt=await nh(e,t,ht);if(!Fe(i.htmlLabels)){const Lt=yt.select("text"),Pt=(pt=Lt.node())==null?void 0:pt.getBBox();Lt.attr("transform",`translate(${-Pt.width/2}, 0)`)}return yt}i.htmlLabels||(s*=1.25,o*=1.25);let d=Ft(t);d||(d="node default");const f=e.insert("g").attr("class",d).attr("id",t.domId||t.id),g=await ra(f,t.label??"",i,0,0,["name"],l);g.height+=o;let m=0;const y=[],v=[];let C=0,k=0,_=0,T=0,E=!0,B=!0;for(const ht of r.attributes){const yt=await ra(f,ht.type,i,0,m,["attribute-type"],l);C=Math.max(C,yt.width+s);const Lt=await ra(f,ht.name,i,0,m,["attribute-name"],l);k=Math.max(k,Lt.width+s);const Pt=await ra(f,ht.keys.join(),i,0,m,["attribute-keys"],l);_=Math.max(_,Pt.width+s);const Wt=await ra(f,ht.comment,i,0,m,["attribute-comment"],l);T=Math.max(T,Wt.width+s);const ae=Math.max(yt.height,Lt.height,Pt.height,Wt.height)+o;v.push({yOffset:m,rowHeight:ae}),m+=ae}let A=4;_<=s&&(E=!1,_=0,A--),T<=s&&(B=!1,T=0,A--);const M=f.node().getBBox();if(g.width+s*2-(C+k+_+T)>0){const ht=g.width+s*2-(C+k+_+T);C+=ht/A,k+=ht/A,_>0&&(_+=ht/A),T>0&&(T+=ht/A)}const R=C+k+_+T,O=Ct.svg(f),tt=kt(t,{});t.look!=="handDrawn"&&(tt.roughness=0,tt.fillStyle="solid");let et=0;v.length>0&&(et=v.reduce((ht,yt)=>ht+((yt==null?void 0:yt.rowHeight)??0),0));const V=Math.max(M.width+s*2,(t==null?void 0:t.width)||0,R),nt=Math.max((et??0)+g.height,(t==null?void 0:t.height)||0),J=-V/2,Y=-nt/2;f.selectAll("g:not(:first-child)").each((ht,yt,Lt)=>{const Pt=Xt(Lt[yt]),Wt=Pt.attr("transform");let ae=0,Ve=0;if(Wt){const ar=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Wt);ar&&(ae=parseFloat(ar[1]),Ve=parseFloat(ar[2]),Pt.attr("class").includes("attribute-name")?ae+=C:Pt.attr("class").includes("attribute-keys")?ae+=C+k:Pt.attr("class").includes("attribute-comment")&&(ae+=C+k+_))}Pt.attr("transform",`translate(${J+s/2+ae}, ${Ve+Y+g.height+o/2})`)}),f.select(".name").attr("transform","translate("+-g.width/2+", "+(Y+o/2)+")");const W=O.rectangle(J,Y,V,nt,tt),N=f.insert(()=>W,":first-child").attr("style",c.join("")),{themeVariables:q}=rr(),{rowEven:D,rowOdd:Z,nodeBorder:Q}=q;y.push(0);for(const[ht,yt]of v.entries()){const Pt=(ht+1)%2===0&&yt.yOffset!==0,Wt=O.rectangle(J,g.height+Y+(yt==null?void 0:yt.yOffset),V,yt==null?void 0:yt.rowHeight,{...tt,fill:Pt?D:Z,stroke:Q});f.insert(()=>Wt,"g.label").attr("style",c.join("")).attr("class",`row-rect-${Pt?"even":"odd"}`)}let F=O.line(J,g.height+Y,V+J,g.height+Y,tt);f.insert(()=>F).attr("class","divider"),F=O.line(C+J,g.height+Y,C+J,nt+Y,tt),f.insert(()=>F).attr("class","divider"),E&&(F=O.line(C+k+J,g.height+Y,C+k+J,nt+Y,tt),f.insert(()=>F).attr("class","divider")),B&&(F=O.line(C+k+_+J,g.height+Y,C+k+_+J,nt+Y,tt),f.insert(()=>F).attr("class","divider"));for(const ht of y)F=O.line(J,g.height+Y+ht,V+J,g.height+Y+ht,tt),f.insert(()=>F).attr("class","divider");if(Tt(t,N),h&&t.look!=="handDrawn"){const ht=h.split(";"),yt=(dt=ht==null?void 0:ht.filter(Lt=>Lt.includes("stroke")))==null?void 0:dt.map(Lt=>`${Lt}`).join("; ");f.selectAll("path").attr("style",yt??""),f.selectAll(".row-rect-even path").attr("style",h)}return t.intersect=function(ht){return gt.rect(t,ht)},f}w(gg,"erBox");async function ra(e,t,r,i=0,s=0,o=[],c=""){const l=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",c);t!==by(t)&&(t=by(t),t=t.replaceAll("<","<").replaceAll(">",">"));const h=l.node().appendChild(await Ni(l,t,{width:ii(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let f=h.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let d=h.getBBox();if(Fe(r.htmlLabels)){const f=h.children[0];f.style.textAlign="start";const g=Xt(h);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}w(ra,"addText");async function QC(e,t,r,i,s=r.class.padding??12){const o=i?0:3,c=e.insert("g").attr("class",Ft(t)).attr("id",t.domId||t.id);let l=null,h=null,d=null,f=null,g=0,m=0,y=0;if(l=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const T=t.annotations[0];await Io(l,{text:`«${T}»`},0),g=l.node().getBBox().height}h=c.insert("g").attr("class","label-group text"),await Io(h,t,0,["font-weight: bolder"]);const v=h.node().getBBox();m=v.height,d=c.insert("g").attr("class","members-group text");let C=0;for(const T of t.members){const E=await Io(d,T,C,[T.parseClassifier()]);C+=E+o}y=d.node().getBBox().height,y<=0&&(y=s/2),f=c.insert("g").attr("class","methods-group text");let k=0;for(const T of t.methods){const E=await Io(f,T,k,[T.parseClassifier()]);k+=E+o}let _=c.node().getBBox();if(l!==null){const T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return h.attr("transform",`translate(${-v.width/2}, ${g})`),_=c.node().getBBox(),d.attr("transform",`translate(0, ${g+m+s*2})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${g+m+(y?y+s*4:s*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}w(QC,"textHelper");async function Io(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=rr();let c="useHtmlLabels"in t?t.useHtmlLabels:Fe(o.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!c&&l.startsWith("\\")&&(l=l.substring(1)),ma(l)&&(c=!0);const h=await Ni(s,Fp(Es(l)),{width:ii(l,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,f=1;if(c){const g=h.children[0],m=Xt(h);f=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(f+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const v=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(C=>new Promise(k=>{function _(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const E=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,A=parseInt(E,10)*5+"px";C.style.minWidth=A,C.style.maxWidth=A}else C.style.width="100%";k(C)}w(_,"setupImage"),setTimeout(()=>{C.complete&&_()}),C.addEventListener("error",_),C.addEventListener("load",_)})))}d=g.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}else{i.includes("font-weight: bolder")&&Xt(h).selectAll("tspan").attr("font-weight",""),f=h.children.length;const g=h.children[0];(h.textContent===""||h.textContent.includes(">"))&&(g.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),d=h.getBBox()}return s.attr("transform","translate(0,"+(-d.height/(2*f)+r)+")"),d.height}w(Io,"addText");async function KC(e,t){var tt,et;const r=ne(),i=r.class.padding??12,s=i,o=t.useHtmlLabels??Fe(r.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];const{shapeSvg:l,bbox:h}=await QC(e,t,r,o,s),{labelStyles:d,nodeStyles:f}=St(t);t.labelStyle=d,t.cssStyles=c.styles||"";const g=((tt=c.styles)==null?void 0:tt.join(";"))||f||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const m=c.members.length===0&&c.methods.length===0&&!((et=r.class)!=null&&et.hideEmptyMembersBox),y=Ct.svg(l),v=kt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=h.width;let k=h.height;c.members.length===0&&c.methods.length===0?k+=s:c.members.length>0&&c.methods.length===0&&(k+=s*2);const _=-C/2,T=-k/2,E=y.rectangle(_-i,T-i-(m?i:c.members.length===0&&c.methods.length===0?-i/2:0),C+2*i,k+2*i+(m?i*2:c.members.length===0&&c.methods.length===0?-i:0),v),B=l.insert(()=>E,":first-child");B.attr("class","basic label-container");const A=B.node().getBBox();l.selectAll(".text").each((V,nt,J)=>{var Z;const Y=Xt(J[nt]),W=Y.attr("transform");let N=0;if(W){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);F&&(N=parseFloat(F[2]))}let q=N+T+i-(m?i:c.members.length===0&&c.methods.length===0?-i/2:0);o||(q-=4);let D=_;(Y.attr("class").includes("label-group")||Y.attr("class").includes("annotation-group"))&&(D=-((Z=Y.node())==null?void 0:Z.getBBox().width)/2||0,l.selectAll("text").each(function(Q,F,K){window.getComputedStyle(K[F]).textAnchor==="middle"&&(D=0)})),Y.attr("transform",`translate(${D}, ${q})`)});const M=l.select(".annotation-group").node().getBBox().height-(m?i/2:0)||0,R=l.select(".label-group").node().getBBox().height-(m?i/2:0)||0,O=l.select(".members-group").node().getBBox().height-(m?i/2:0)||0;if(c.members.length>0||c.methods.length>0||m){const V=y.line(A.x,M+R+T+i,A.x+A.width,M+R+T+i,v);l.insert(()=>V).attr("class","divider").attr("style",g)}if(m||c.members.length>0||c.methods.length>0){const V=y.line(A.x,M+R+O+T+s*2+i,A.x+A.width,M+R+O+T+i+s*2,v);l.insert(()=>V).attr("class","divider").attr("style",g)}if(c.look!=="handDrawn"&&l.selectAll("path").attr("style",g),B.select(":nth-child(2)").attr("style",g),l.selectAll(".divider").select("path").attr("style",g),t.labelStyle?l.selectAll("span").attr("style",t.labelStyle):l.selectAll("span").attr("style",g),!o){const V=RegExp(/color\s*:\s*([^;]*)/),nt=V.exec(g);if(nt){const J=nt[0].replace("color","fill");l.selectAll("tspan").attr("style",J)}else if(d){const J=V.exec(d);if(J){const Y=J[0].replace("color","fill");l.selectAll("tspan").attr("style",Y)}}}return Tt(t,B),t.intersect=function(V){return gt.rect(t,V)},l}w(KC,"classBox");async function ZC(e,t){var M,R;const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const s=t,o=t,c=20,l=20,h="verifyMethod"in t,d=Ft(t),f=e.insert("g").attr("class",d).attr("id",t.domId??t.id);let g;h?g=await Rn(f,`<<${s.type}>>`,0,t.labelStyle):g=await Rn(f,"<<Element>>",0,t.labelStyle);let m=g;const y=await Rn(f,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+l,h){const O=await Rn(f,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=O;const tt=await Rn(f,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=tt;const et=await Rn(f,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=et,await Rn(f,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const O=await Rn(f,`${o.type?`Type: ${o.type}`:""}`,m,t.labelStyle);m+=O,await Rn(f,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,t.labelStyle)}const v=(((M=f.node())==null?void 0:M.getBBox().width)??200)+c,C=(((R=f.node())==null?void 0:R.getBBox().height)??200)+c,k=-v/2,_=-C/2,T=Ct.svg(f),E=kt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=T.rectangle(k,_,v,C,E),A=f.insert(()=>B,":first-child");if(A.attr("class","basic label-container").attr("style",i),f.selectAll(".label").each((O,tt,et)=>{const V=Xt(et[tt]),nt=V.attr("transform");let J=0,Y=0;if(nt){const D=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);D&&(J=parseFloat(D[1]),Y=parseFloat(D[2]))}const W=Y-C/2;let N=k+c/2;(tt===0||tt===1)&&(N=J),V.attr("transform",`translate(${N}, ${W+c})`)}),m>g+y+l){const O=T.line(k,_+g+y+l,k+v,_+g+y+l,E);f.insert(()=>O).attr("style",i)}return Tt(t,A),t.intersect=function(O){return gt.rect(t,O)},f}w(ZC,"requirementBox");async function Rn(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=ne(),c=o.htmlLabels??!0,l=await Ni(s,Fp(Es(t)),{width:ii(t,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},o);let h;if(c){const d=l.children[0],f=Xt(l);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{const d=l.children[0];for(const f of d.children)f.textContent=f.textContent.replaceAll(">",">").replaceAll("<","<"),i&&f.setAttribute("style",i);h=l.getBBox(),h.height+=6}return s.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}w(Rn,"addText");var d$=w(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 JC(e,t,{config:r}){var nt,J;const{labelStyles:i,nodeStyles:s}=St(t);t.labelStyle=i||"";const o=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:h,label:d}=await Ot(e,t,Ft(t)),f=t.padding||10;let g="",m;"ticket"in t&&t.ticket&&((nt=r==null?void 0:r.kanban)!=null&&nt.ticketBaseUrl)&&(g=(J=r==null?void 0:r.kanban)==null?void 0:J.ticketBaseUrl.replace("#TICKET#",t.ticket),m=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let v,C;m?{label:v,bbox:C}=await df(m,"ticket"in t&&t.ticket||"",y):{label:v,bbox:C}=await df(l,"ticket"in t&&t.ticket||"",y);const{label:k,bbox:_}=await df(l,"assigned"in t&&t.assigned||"",y);t.width=c;const T=10,E=(t==null?void 0:t.width)||0,B=Math.max(C.height,_.height)/2,A=Math.max(h.height+T*2,(t==null?void 0:t.height)||0)+B,M=-E/2,R=-A/2;d.attr("transform","translate("+(f-E/2)+", "+(-B-h.height/2)+")"),v.attr("transform","translate("+(f-E/2)+", "+(-B+h.height/2)+")"),k.attr("transform","translate("+(f+E/2-_.width-2*o)+", "+(-B+h.height/2)+")");let O;const{rx:tt,ry:et}=t,{cssStyles:V}=t;if(t.look==="handDrawn"){const Y=Ct.svg(l),W=kt(t,{}),N=tt||et?Y.path(ji(M,R,E,A,tt||0),W):Y.rectangle(M,R,E,A,W);O=l.insert(()=>N,":first-child"),O.attr("class","basic label-container").attr("style",V||null)}else{O=l.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",s).attr("rx",tt??5).attr("ry",et??5).attr("x",M).attr("y",R).attr("width",E).attr("height",A);const Y="priority"in t&&t.priority;if(Y){const W=l.append("line"),N=M+2,q=R+Math.floor((tt??0)/2),D=R+A-Math.floor((tt??0)/2);W.attr("x1",N).attr("y1",q).attr("x2",N).attr("y2",D).attr("stroke-width","4").attr("stroke",d$(Y))}}return Tt(t,O),t.height=A,t.intersect=function(Y){return gt.rect(t,Y)},l}w(JC,"kanbanItem");async function tw(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:c,label:l}=await Ot(e,t,Ft(t)),h=o.width+10*c,d=o.height+8*c,f=.15*h,{cssStyles:g}=t,m=o.width+20,y=o.height+20,v=Math.max(h,m),C=Math.max(d,y);l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let k;const _=`M0 0
|
|
236
|
-
a${f},${f} 1 0,0 ${v*.25},${-1*C*.1}
|
|
237
|
-
a${f},${f} 1 0,0 ${v*.25},0
|
|
238
|
-
a${f},${f} 1 0,0 ${v*.25},0
|
|
239
|
-
a${f},${f} 1 0,0 ${v*.25},${C*.1}
|
|
240
|
-
|
|
241
|
-
a${f},${f} 1 0,0 ${v*.15},${C*.33}
|
|
242
|
-
a${f*.8},${f*.8} 1 0,0 0,${C*.34}
|
|
243
|
-
a${f},${f} 1 0,0 ${-1*v*.15},${C*.33}
|
|
244
|
-
|
|
245
|
-
a${f},${f} 1 0,0 ${-1*v*.25},${C*.15}
|
|
246
|
-
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
247
|
-
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
248
|
-
a${f},${f} 1 0,0 ${-1*v*.25},${-1*C*.15}
|
|
249
|
-
|
|
250
|
-
a${f},${f} 1 0,0 ${-1*v*.1},${-1*C*.33}
|
|
251
|
-
a${f*.8},${f*.8} 1 0,0 0,${-1*C*.34}
|
|
252
|
-
a${f},${f} 1 0,0 ${v*.1},${-1*C*.33}
|
|
253
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const T=Ct.svg(s),E=kt(t,{}),B=T.path(_,E);k=s.insert(()=>B,":first-child"),k.attr("class","basic label-container").attr("style",ir(g))}else k=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",_);return k.attr("transform",`translate(${-v/2}, ${-C/2})`),Tt(t,k),t.calcIntersect=function(T,E){return gt.rect(T,E)},t.intersect=function(T){return rt.info("Bang intersect",t,T),gt.rect(t,T)},s}w(tw,"bang");async function ew(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:c,label:l}=await Ot(e,t,Ft(t)),h=o.width+2*c,d=o.height+2*c,f=.15*h,g=.25*h,m=.35*h,y=.2*h,{cssStyles:v}=t;let C;const k=`M0 0
|
|
254
|
-
a${f},${f} 0 0,1 ${h*.25},${-1*h*.1}
|
|
255
|
-
a${m},${m} 1 0,1 ${h*.4},${-1*h*.1}
|
|
256
|
-
a${g},${g} 1 0,1 ${h*.35},${h*.2}
|
|
257
|
-
|
|
258
|
-
a${f},${f} 1 0,1 ${h*.15},${d*.35}
|
|
259
|
-
a${y},${y} 1 0,1 ${-1*h*.15},${d*.65}
|
|
260
|
-
|
|
261
|
-
a${g},${f} 1 0,1 ${-1*h*.25},${h*.15}
|
|
262
|
-
a${m},${m} 1 0,1 ${-1*h*.5},0
|
|
263
|
-
a${f},${f} 1 0,1 ${-1*h*.25},${-1*h*.15}
|
|
264
|
-
|
|
265
|
-
a${f},${f} 1 0,1 ${-1*h*.1},${-1*d*.35}
|
|
266
|
-
a${y},${y} 1 0,1 ${h*.1},${-1*d*.65}
|
|
267
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const _=Ct.svg(s),T=kt(t,{}),E=_.path(k,T);C=s.insert(()=>E,":first-child"),C.attr("class","basic label-container").attr("style",ir(v))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",k);return l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-h/2}, ${-d/2})`),Tt(t,C),t.calcIntersect=function(_,T){return gt.rect(_,T)},t.intersect=function(_){return rt.info("Cloud intersect",t,_),gt.rect(t,_)},s}w(ew,"cloud");async function rw(e,t){const{labelStyles:r,nodeStyles:i}=St(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:c,label:l}=await Ot(e,t,Ft(t)),h=o.width+8*c,d=o.height+2*c,f=5,g=`
|
|
268
|
-
M${-h/2} ${d/2-f}
|
|
269
|
-
v${-d+2*f}
|
|
270
|
-
q0,-${f} ${f},-${f}
|
|
271
|
-
h${h-2*f}
|
|
272
|
-
q${f},0 ${f},${f}
|
|
273
|
-
v${d-2*f}
|
|
274
|
-
q0,${f} -${f},${f}
|
|
275
|
-
h${-h+2*f}
|
|
276
|
-
q-${f},0 -${f},-${f}
|
|
277
|
-
Z
|
|
278
|
-
`,m=s.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",g);return s.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",d/2).attr("x2",h/2).attr("y2",d/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>l.node()),Tt(t,m),t.calcIntersect=function(y,v){return gt.rect(y,v)},t.intersect=function(y){return gt.rect(t,y)},s}w(rw,"defaultMindmapNode");async function nw(e,t){const r={padding:t.padding??0};return pg(e,t,r)}w(nw,"mindmapCircle");var f$=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:FC},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:AC},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:DC},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zC},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:iC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:pg},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:tw},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ew},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:EC},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:hC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:CC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:bC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:qC},{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:xC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:aC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:WC},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Qb},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:RC},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:OC},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PC},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:wC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:VC},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:uC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:HC},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:kC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:YC},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:XC},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:oC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:UC},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$C},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:TC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:_C},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xb},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Jb},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jC},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:NC},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:GC},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:MC},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:SC}],p$=w(()=>{const t=[...Object.entries({state:IC,choice:Kb,note:LC,rectWithTitle:BC,labelRect:vC,iconSquare:mC,iconCircle:pC,icon:fC,iconRounded:gC,imageSquare:yC,anchor:Gb,kanbanItem:JC,mindmapCircle:nw,defaultMindmapNode:rw,classBox:KC,erBox:gg,requirementBox:ZC}),...f$.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),iw=p$();function g$(e){return e in iw}w(g$,"isValidShape");var ih=new Map;async function sw(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?iw[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;r.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return t.tooltip&&s.attr("title",t.tooltip),ih.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}w(sw,"insertNode");var JI=w((e,t)=>{ih.set(t.id,e)},"setNodeElem"),t8=w(()=>{ih.clear()},"clear"),e8=w(e=>{const t=ih.get(e.id);rt.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"),m$=w((e,t,r,i,s,o)=>{t.arrowTypeStart&&kx(e,"start",t.arrowTypeStart,r,i,s,o),t.arrowTypeEnd&&kx(e,"end",t.arrowTypeEnd,r,i,s,o)},"addEdgeMarkers"),y$={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},kx=w((e,t,r,i,s,o,c)=>{var g;const l=y$[r];if(!l){rt.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${o}-${h}${t==="start"?"Start":"End"}`;if(c&&c.trim()!==""){const m=c.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const v=document.getElementById(f);if(v){const C=v.cloneNode(!0);C.id=y,C.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",c),l.fill&&_.setAttribute("fill",c)}),(g=v.parentNode)==null||g.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),Ru=new Map,Ye=new Map,r8=w(()=>{Ru.clear(),Ye.clear()},"clear"),$c=w(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),x$=w(async(e,t)=>{let r=Fe(ne().flowchart.htmlLabels);const{labelStyles:i}=St(t);t.labelStyle=i;const s=await Ni(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});rt.info("abc82",t,t.labelType);const o=e.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",t.id);c.node().appendChild(s);let l=s.getBBox();if(r){const d=s.children[0],f=Xt(s);l=d.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}c.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),Ru.set(t.id,o),t.width=l.width,t.height=l.height;let h;if(t.startLabelLeft){const d=await ps(t.startLabelLeft,$c(t.labelStyle)),f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner");h=g.node().appendChild(d);const m=d.getBBox();g.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Ye.get(t.id)||Ye.set(t.id,{}),Ye.get(t.id).startLeft=f,Po(h,t.startLabelLeft)}if(t.startLabelRight){const d=await ps(t.startLabelRight,$c(t.labelStyle)),f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner");h=f.node().appendChild(d),g.node().appendChild(d);const m=d.getBBox();g.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Ye.get(t.id)||Ye.set(t.id,{}),Ye.get(t.id).startRight=f,Po(h,t.startLabelRight)}if(t.endLabelLeft){const d=await ps(t.endLabelLeft,$c(t.labelStyle)),f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner");h=g.node().appendChild(d);const m=d.getBBox();g.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),f.node().appendChild(d),Ye.get(t.id)||Ye.set(t.id,{}),Ye.get(t.id).endLeft=f,Po(h,t.endLabelLeft)}if(t.endLabelRight){const d=await ps(t.endLabelRight,$c(t.labelStyle)),f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner");h=g.node().appendChild(d);const m=d.getBBox();g.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),f.node().appendChild(d),Ye.get(t.id)||Ye.set(t.id,{}),Ye.get(t.id).endRight=f,Po(h,t.endLabelRight)}return s},"insertEdgeLabel");function Po(e,t){ne().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}w(Po,"setTerminalWidth");var v$=w((e,t)=>{rt.debug("Moving label abc88 ",e.id,e.label,Ru.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ne(),{subGraphTitleTotalMargin:s}=tg(i);if(e.label){const o=Ru.get(e.id);let c=e.x,l=e.y;if(r){const h=xn.calcLabelPosition(r);rt.debug("Moving label "+e.label+" from (",c,",",l,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(c=h.x,l=h.y)}o.attr("transform",`translate(${c}, ${l+s/2})`)}if(e.startLabelLeft){const o=Ye.get(e.id).startLeft;let c=e.x,l=e.y;if(r){const h=xn.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);c=h.x,l=h.y}o.attr("transform",`translate(${c}, ${l})`)}if(e.startLabelRight){const o=Ye.get(e.id).startRight;let c=e.x,l=e.y;if(r){const h=xn.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);c=h.x,l=h.y}o.attr("transform",`translate(${c}, ${l})`)}if(e.endLabelLeft){const o=Ye.get(e.id).endLeft;let c=e.x,l=e.y;if(r){const h=xn.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);c=h.x,l=h.y}o.attr("transform",`translate(${c}, ${l})`)}if(e.endLabelRight){const o=Ye.get(e.id).endRight;let c=e.x,l=e.y;if(r){const h=xn.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);c=h.x,l=h.y}o.attr("transform",`translate(${c}, ${l})`)}},"positionEdgeLabel"),b$=w((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),c=e.width/2,l=e.height/2;return s>=c||o>=l},"outsideNode"),C$=w((e,t,r)=>{rt.debug(`intersection calc abc89:
|
|
279
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
280
|
-
insidePoint : ${JSON.stringify(r)}
|
|
281
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),c=e.width/2;let l=r.x<t.x?c-o:c+o;const h=e.height/2,d=Math.abs(t.y-r.y),f=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*c>Math.abs(i-t.x)*h){let g=r.y<t.y?t.y-h-s:s-h-t.y;l=f*g/d;const m={x:r.x<t.x?r.x+l:r.x-f+l,y:r.y<t.y?r.y+d-g:r.y-d+g};return l===0&&(m.x=t.x,m.y=t.y),f===0&&(m.x=t.x),d===0&&(m.y=t.y),rt.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${f}, r ${l}`,m),m}else{r.x<t.x?l=t.x-c-i:l=i-c-t.x;let g=d*l/f,m=r.x<t.x?r.x+f-l:r.x-f+l,y=r.y<t.y?r.y+g:r.y-g;return rt.debug(`sides calc abc89, Q ${d}, q ${g}, R ${f}, r ${l}`,{_x:m,_y:y}),l===0&&(m=t.x,y=t.y),f===0&&(m=t.x),d===0&&(y=t.y),{x:m,y}}},"intersection"),Sx=w((e,t)=>{rt.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(rt.info("abc88 checking point",o,t),!b$(t,o)&&!s){const c=C$(t,i,o);rt.debug("abc88 inside",o,i,c),rt.debug("abc88 intersection",c,t);let l=!1;r.forEach(h=>{l=l||h.x===c.x&&h.y===c.y}),r.some(h=>h.x===c.x&&h.y===c.y)?rt.warn("abc88 no intersect",c,r):r.push(c),s=!0}else rt.warn("abc88 outside",o,i),i=o,s||r.push(o)}),rt.debug("returning points",r),r},"cutPathAtIntersect");function aw(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],c=e[i+1];(s.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===c.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-c.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}w(aw,"extractCornerPoints");var _x=w(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),c=r/o;return{x:t.x-c*i,y:t.y-c*s}},"findAdjacentPoint"),w$=w(function(e){const{cornerPointPositions:t}=aw(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],c=e[i],l=_x(s,c,5),h=_x(o,c,5),d=h.x-l.x,f=h.y-l.y;r.push(l);const g=Math.sqrt(2)*2;let m={x:c.x,y:c.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){rt.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const y=5;c.x===l.x?m={x:d<0?l.x-y+g:l.x+y-g,y:f<0?l.y-g:l.y+g}:m={x:d<0?l.x-g:l.x+g,y:f<0?l.y-y+g:l.y+y-g}}else rt.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(m,h)}else r.push(e[i]);return r},"fixCorners"),k$=w((e,t,r)=>{const i=e-t-r,s=2,o=2,c=s+o,l=Math.floor(i/c),h=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),S$=w(function(e,t,r,i,s,o,c,l=!1){var Y;const{handDrawnSeed:h}=ne();let d=t.points,f=!1;const g=s;var m=o;const y=[];for(const W in t.cssCompiledStyles)G2(W)||y.push(t.cssCompiledStyles[W]);rt.debug("UIO intersect check",t.points,m.x,g.x),m.intersect&&g.intersect&&!l&&(d=d.slice(1,t.points.length-1),d.unshift(g.intersect(d[0])),rt.debug("Last point UIO",t.start,"-->",t.end,d[d.length-1],m,m.intersect(d[d.length-1])),d.push(m.intersect(d[d.length-1])));const v=btoa(JSON.stringify(d));t.toCluster&&(rt.info("to cluster abc88",r.get(t.toCluster)),d=Sx(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(rt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=Sx(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let C=d.filter(W=>!Number.isNaN(W.y));C=w$(C);let k=qc;switch(k=du,t.curve){case"linear":k=du;break;case"basis":k=qc;break;case"cardinal":k=Z1;break;case"bumpX":k=V1;break;case"bumpY":k=G1;break;case"catmullRom":k=tv;break;case"monotoneX":k=av;break;case"monotoneY":k=ov;break;case"natural":k=cv;break;case"step":k=uv;break;case"stepAfter":k=dv;break;case"stepBefore":k=hv;break;default:k=qc}const{x:_,y:T}=sA(t),E=WM().x(_).y(T).curve(k);let B;switch(t.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(t.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let A,M=t.curve==="rounded"?ow(lw(C,t),5):E(C);const R=Array.isArray(t.style)?t.style:[t.style];let O=R.find(W=>W==null?void 0:W.startsWith("stroke:")),tt=!1;if(t.look==="handDrawn"){const W=Ct.svg(e);Object.assign([],C);const N=W.path(M,{roughness:.3,seed:h});B+=" transition",A=Xt(N).select("path").attr("id",t.id).attr("class"," "+B+(t.classes?" "+t.classes:"")).attr("style",R?R.reduce((D,Z)=>D+";"+Z,""):"");let q=A.attr("d");A.attr("d",q),e.node().appendChild(A.node())}else{const W=y.join(";"),N=R?R.reduce((ut,pt)=>ut+pt+";",""):"";let q="";t.animate&&(q=" edge-animation-fast"),t.animation&&(q=" edge-animation-"+t.animation);const D=(W?W+";"+N+";":N)+";"+(R?R.reduce((ut,pt)=>ut+";"+pt,""):"");A=e.append("path").attr("d",M).attr("id",t.id).attr("class"," "+B+(t.classes?" "+t.classes:"")+(q??"")).attr("style",D),O=(Y=D.match(/stroke:([^;]+)/))==null?void 0:Y[1],tt=t.animate===!0||!!t.animation||W.includes("animation");const Z=A.node(),Q=typeof Z.getTotalLength=="function"?Z.getTotalLength():0,F=Vy[t.arrowTypeStart]||0,K=Vy[t.arrowTypeEnd]||0;if(t.look==="neo"&&!tt){const pt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?k$(Q,F,K):`0 ${F} ${Q-F-K} ${K}`}; stroke-dashoffset: 0;`;A.attr("style",pt+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",t.id),A.attr("data-points",v),t.showPoints&&C.forEach(W=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",W.x).attr("cy",W.y)});let et="";(ne().flowchart.arrowMarkerAbsolute||ne().state.arrowMarkerAbsolute)&&(et=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,et=et.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),rt.info("arrowTypeStart",t.arrowTypeStart),rt.info("arrowTypeEnd",t.arrowTypeEnd),m$(A,t,et,c,i,O);const V=Math.floor(d.length/2),nt=d[V];xn.isLabelCoordinateInPath(nt,A.attr("d"))||(f=!0);let J={};return f&&(J.updatedPath=d),J.originalPath=t.points,J},"insertEdge");function ow(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const c=e[o],l=e[o-1],h=e[o+1];if(o===0)r+=`M${c.x},${c.y}`;else if(o===i-1)r+=`L${c.x},${c.y}`;else{const d=c.x-l.x,f=c.y-l.y,g=h.x-c.x,m=h.y-c.y,y=Math.hypot(d,f),v=Math.hypot(g,m);if(y<s||v<s){r+=`L${c.x},${c.y}`;continue}const C=d/y,k=f/y,_=g/v,T=m/v,E=C*_+k*T,B=Math.max(-1,Math.min(1,E)),A=Math.acos(B);if(A<s||Math.abs(Math.PI-A)<s){r+=`L${c.x},${c.y}`;continue}const M=Math.min(t/Math.sin(A/2),y/2,v/2),R=c.x-C*M,O=c.y-k*M,tt=c.x+_*M,et=c.y+T*M;r+=`L${R},${O}`,r+=`Q${c.x},${c.y} ${tt},${et}`}}return r}w(ow,"generateRoundedPath");function ap(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}}w(ap,"calculateDeltaAndAngle");function lw(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&er[t.arrowTypeStart]){const s=er[t.arrowTypeStart],o=e[0],c=e[1],{angle:l}=ap(o,c),h=s*Math.cos(l),d=s*Math.sin(l);r[0].x=o.x+h,r[0].y=o.y+d}const i=e.length;if(i>=2&&er[t.arrowTypeEnd]){const s=er[t.arrowTypeEnd],o=e[i-1],c=e[i-2],{angle:l}=ap(c,o),h=s*Math.cos(l),d=s*Math.sin(l);r[i-1].x=o.x-h,r[i-1].y=o.y-d}return r}w(lw,"applyMarkerOffsetsToPoints");var _$=w((e,t,r,i)=>{t.forEach(s=>{j$[s](e,r,i)})},"insertMarkers"),T$=w((e,t,r)=>{rt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),L$=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),E$=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),M$=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),B$=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),A$=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),R$=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),$$=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),F$=w((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"),D$=w((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"),I$=w((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),P$=w((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"),O$=w((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),z$=w((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
|
|
282
|
-
L20,10
|
|
283
|
-
M20,10
|
|
284
|
-
L0,20`)},"requirement_arrow"),N$=w((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"),j$={extension:T$,composition:L$,aggregation:E$,dependency:M$,lollipop:B$,point:A$,circle:R$,cross:$$,barb:F$,only_one:D$,zero_or_one:I$,one_or_more:P$,zero_or_more:O$,requirement_arrow:z$,requirement_contains:N$},W$=_$,H$={common:ka,getConfig:rr,insertCluster:KR,insertEdge:S$,insertEdgeLabel:x$,insertMarkers:W$,insertNode:sw,interpolateToCurve:sg,labelHelper:Ot,log:rt,positionEdgeLabel:v$},el={},cw=w(e=>{for(const t of e)el[t.name]=t},"registerLayoutLoaders"),q$=w(()=>{cw([{name:"dagre",loader:w(async()=>await ee(()=>import("./dagre-6UL2VRFP-BD6MGb7B.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:w(async()=>await ee(()=>import("./cose-bilkent-S5V4N54A-DDE4zf7X.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");q$();var n8=w(async(e,t)=>{if(!(e.layoutAlgorithm in el))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=el[e.layoutAlgorithm];return(await r.loader()).render(e,t,H$,{algorithm:r.algorithm})},"render"),i8=w((e="",{fallback:t="dagre"}={})=>{if(e in el)return e;if(t in el)return rt.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"),uw="comm",hw="rule",dw="decl",U$="@import",Y$="@namespace",V$="@keyframes",G$="@layer",fw=Math.abs,mg=String.fromCharCode;function pw(e){return e.trim()}function Xc(e,t,r){return e.replace(t,r)}function X$(e,t,r){return e.indexOf(t,r)}function aa(e,t){return e.charCodeAt(t)|0}function Ca(e,t,r){return e.slice(t,r)}function $n(e){return e.length}function Q$(e){return e.length}function Fc(e,t){return t.push(e),e}var sh=1,wa=1,gw=0,Zr=0,Ee=0,Ea="";function yg(e,t,r,i,s,o,c,l){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:sh,column:wa,length:c,return:"",siblings:l}}function K$(){return Ee}function Z$(){return Ee=Zr>0?aa(Ea,--Zr):0,wa--,Ee===10&&(wa=1,sh--),Ee}function bn(){return Ee=Zr<gw?aa(Ea,Zr++):0,wa++,Ee===10&&(wa=1,sh++),Ee}function Ri(){return aa(Ea,Zr)}function Qc(){return Zr}function ah(e,t){return Ca(Ea,e,t)}function rl(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 J$(e){return sh=wa=1,gw=$n(Ea=e),Zr=0,[]}function t6(e){return Ea="",e}function ff(e){return pw(ah(Zr-1,op(e===91?e+2:e===40?e+1:e)))}function e6(e){for(;(Ee=Ri())&&Ee<33;)bn();return rl(e)>2||rl(Ee)>3?"":" "}function r6(e,t){for(;--t&&bn()&&!(Ee<48||Ee>102||Ee>57&&Ee<65||Ee>70&&Ee<97););return ah(e,Qc()+(t<6&&Ri()==32&&bn()==32))}function op(e){for(;bn();)switch(Ee){case e:return Zr;case 34:case 39:e!==34&&e!==39&&op(Ee);break;case 40:e===41&&op(e);break;case 92:bn();break}return Zr}function n6(e,t){for(;bn()&&e+Ee!==57;)if(e+Ee===84&&Ri()===47)break;return"/*"+ah(t,Zr-1)+"*"+mg(e===47?e:bn())}function i6(e){for(;!rl(Ri());)bn();return ah(e,Zr)}function s6(e){return t6(Kc("",null,null,null,[""],e=J$(e),0,[0],e))}function Kc(e,t,r,i,s,o,c,l,h){for(var d=0,f=0,g=c,m=0,y=0,v=0,C=1,k=1,_=1,T=0,E="",B=s,A=o,M=i,R=E;k;)switch(v=T,T=bn()){case 40:if(v!=108&&aa(R,g-1)==58){X$(R+=Xc(ff(T),"&","&\f"),"&\f",fw(d?l[d-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:R+=ff(T);break;case 9:case 10:case 13:case 32:R+=e6(v);break;case 92:R+=r6(Qc()-1,7);continue;case 47:switch(Ri()){case 42:case 47:Fc(a6(n6(bn(),Qc()),t,r,h),h),(rl(v||1)==5||rl(Ri()||1)==5)&&$n(R)&&Ca(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*C:l[d++]=$n(R)*_;case 125*C:case 59:case 0:switch(T){case 0:case 125:k=0;case 59+f:_==-1&&(R=Xc(R,/\f/g,"")),y>0&&($n(R)-g||C===0&&v===47)&&Fc(y>32?Lx(R+";",i,r,g-1,h):Lx(Xc(R," ","")+";",i,r,g-2,h),h);break;case 59:R+=";";default:if(Fc(M=Tx(R,t,r,d,f,s,l,E,B=[],A=[],g,o),o),T===123)if(f===0)Kc(R,t,M,M,B,o,g,l,A);else{switch(m){case 99:if(aa(R,3)===110)break;case 108:if(aa(R,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Kc(e,M,M,i&&Fc(Tx(e,M,M,0,0,s,l,E,s,B=[],g,A),A),s,A,g,l,i?B:A):Kc(R,M,M,M,[""],A,0,l,A)}}d=f=y=0,C=_=1,E=R="",g=c;break;case 58:g=1+$n(R),y=v;default:if(C<1){if(T==123)--C;else if(T==125&&C++==0&&Z$()==125)continue}switch(R+=mg(T),T*C){case 38:_=f>0?1:(R+="\f",-1);break;case 44:l[d++]=($n(R)-1)*_,_=1;break;case 64:Ri()===45&&(R+=ff(bn())),m=Ri(),f=g=$n(E=R+=i6(Qc())),T++;break;case 45:v===45&&$n(R)==2&&(C=0)}}return o}function Tx(e,t,r,i,s,o,c,l,h,d,f,g){for(var m=s-1,y=s===0?o:[""],v=Q$(y),C=0,k=0,_=0;C<i;++C)for(var T=0,E=Ca(e,m+1,m=fw(k=c[C])),B=e;T<v;++T)(B=pw(k>0?y[T]+" "+E:Xc(E,/&\f/g,y[T])))&&(h[_++]=B);return yg(e,t,r,s===0?hw:l,h,d,f,g)}function a6(e,t,r,i){return yg(e,t,r,uw,mg(K$()),Ca(e,2,-2),0,i)}function Lx(e,t,r,i,s){return yg(e,t,r,dw,Ca(e,0,i),Ca(e,i+1,-1),i,s)}function lp(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function o6(e,t,r,i){switch(e.type){case G$:if(e.children.length)break;case U$:case Y$:case dw:return e.return=e.return||e.value;case uw:return"";case V$:return e.return=e.value+"{"+lp(e.children,i)+"}";case hw:if(!$n(e.value=e.props.join(",")))return""}return $n(r=lp(e.children,i))?e.return=e.value+"{"+r+"}":""}var l6=Z2(Object.keys,Object),c6=Object.prototype,u6=c6.hasOwnProperty;function h6(e){if(!Ku(e))return l6(e);var t=[];for(var r in Object(e))u6.call(e,r)&&r!="constructor"&&t.push(r);return t}var cp=Ls(On,"DataView"),up=Ls(On,"Promise"),hp=Ls(On,"Set"),dp=Ls(On,"WeakMap"),Ex="[object Map]",d6="[object Object]",Mx="[object Promise]",Bx="[object Set]",Ax="[object WeakMap]",Rx="[object DataView]",f6=Ts(cp),p6=Ts(Jo),g6=Ts(up),m6=Ts(hp),y6=Ts(dp),cs=_a;(cp&&cs(new cp(new ArrayBuffer(1)))!=Rx||Jo&&cs(new Jo)!=Ex||up&&cs(up.resolve())!=Mx||hp&&cs(new hp)!=Bx||dp&&cs(new dp)!=Ax)&&(cs=function(e){var t=_a(e),r=t==d6?e.constructor:void 0,i=r?Ts(r):"";if(i)switch(i){case f6:return Rx;case p6:return Ex;case g6:return Mx;case m6:return Bx;case y6:return Ax}return t});var x6="[object Map]",v6="[object Set]",b6=Object.prototype,C6=b6.hasOwnProperty;function $x(e){if(e==null)return!0;if(Zu(e)&&(_u(e)||typeof e=="string"||typeof e.splice=="function"||ng(e)||ig(e)||Su(e)))return!e.length;var t=cs(e);if(t==x6||t==v6)return!e.size;if(Ku(e))return!h6(e).length;for(var r in e)if(C6.call(e,r))return!1;return!0}var mw="c4",w6=w(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),k6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-J9PHecY3.js");return{diagram:t}},__vite__mapDeps([8,9]));return{id:mw,diagram:e}},"loader"),S6={id:mw,detector:w6,loader:k6},_6=S6,yw="flowchart",T6=w((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"),L6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-mDhW3D3Q.js");return{diagram:t}},__vite__mapDeps([10,11,12,13,14]));return{id:yw,diagram:e}},"loader"),E6={id:yw,detector:T6,loader:L6},M6=E6,xw="flowchart-v2",B6=w((e,t)=>{var r,i,s;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)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),A6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-mDhW3D3Q.js");return{diagram:t}},__vite__mapDeps([10,11,12,13,14]));return{id:xw,diagram:e}},"loader"),R6={id:xw,detector:B6,loader:A6},$6=R6,vw="er",F6=w(e=>/^\s*erDiagram/.test(e),"detector"),D6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-AxqPt6IZ.js");return{diagram:t}},__vite__mapDeps([15,12,13,14]));return{id:vw,diagram:e}},"loader"),I6={id:vw,detector:F6,loader:D6},P6=I6,bw="gitGraph",O6=w(e=>/^\s*gitGraph/.test(e),"detector"),z6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-CvLzvhKr.js");return{diagram:t}},__vite__mapDeps([16,17,18,19,2,4,5]));return{id:bw,diagram:e}},"loader"),N6={id:bw,detector:O6,loader:z6},j6=N6,Cw="gantt",W6=w(e=>/^\s*gantt/.test(e),"detector"),H6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-sA8pHJPp.js");return{diagram:t}},__vite__mapDeps([20,21,22,23]));return{id:Cw,diagram:e}},"loader"),q6={id:Cw,detector:W6,loader:H6},U6=q6,ww="info",Y6=w(e=>/^\s*info/.test(e),"detector"),V6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-D1Kg3Q9d.js");return{diagram:t}},__vite__mapDeps([24,19,2,4,5]));return{id:ww,diagram:e}},"loader"),G6={id:ww,detector:Y6,loader:V6},kw="pie",X6=w(e=>/^\s*pie/.test(e),"detector"),Q6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-BcIKTRbi.js");return{diagram:t}},__vite__mapDeps([25,17,19,2,4,5,26,27,22]));return{id:kw,diagram:e}},"loader"),K6={id:kw,detector:X6,loader:Q6},Sw="quadrantChart",Z6=w(e=>/^\s*quadrantChart/.test(e),"detector"),J6=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-EOHXFGoQ.js");return{diagram:t}},__vite__mapDeps([28,21,22,23]));return{id:Sw,diagram:e}},"loader"),tF={id:Sw,detector:Z6,loader:J6},eF=tF,_w="xychart",rF=w(e=>/^\s*xychart(-beta)?/.test(e),"detector"),nF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-DteXAAAu.js");return{diagram:t}},__vite__mapDeps([29,22,27,21,23]));return{id:_w,diagram:e}},"loader"),iF={id:_w,detector:rF,loader:nF},sF=iF,Tw="requirement",aF=w(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-CJ8lImGs.js");return{diagram:t}},__vite__mapDeps([30,12,13]));return{id:Tw,diagram:e}},"loader"),lF={id:Tw,detector:aF,loader:oF},cF=lF,Lw="sequence",uF=w(e=>/^\s*sequenceDiagram/.test(e),"detector"),hF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-D9HrEsci.js");return{diagram:t}},__vite__mapDeps([31,9,18]));return{id:Lw,diagram:e}},"loader"),dF={id:Lw,detector:uF,loader:hF},fF=dF,Ew="class",pF=w((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"),gF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-CBLbQwHx.js");return{diagram:t}},__vite__mapDeps([32,33,11,12,13]));return{id:Ew,diagram:e}},"loader"),mF={id:Ew,detector:pF,loader:gF},yF=mF,Mw="classDiagram",xF=w((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"),vF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-CBLbQwHx.js");return{diagram:t}},__vite__mapDeps([34,33,11,12,13]));return{id:Mw,diagram:e}},"loader"),bF={id:Mw,detector:xF,loader:vF},CF=bF,Bw="state",wF=w((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"),kF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-qVbMjauZ.js");return{diagram:t}},__vite__mapDeps([35,36,12,13,1,2,3,4]));return{id:Bw,diagram:e}},"loader"),SF={id:Bw,detector:wF,loader:kF},_F=SF,Aw="stateDiagram",TF=w((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"),LF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-MT16RLO4.js");return{diagram:t}},__vite__mapDeps([37,36,12,13]));return{id:Aw,diagram:e}},"loader"),EF={id:Aw,detector:TF,loader:LF},MF=EF,Rw="journey",BF=w(e=>/^\s*journey/.test(e),"detector"),AF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-D7ogbx9z.js");return{diagram:t}},__vite__mapDeps([38,9,11,26]));return{id:Rw,diagram:e}},"loader"),RF={id:Rw,detector:BF,loader:AF},$F=RF,FF=w((e,t,r)=>{rt.debug(`rendering svg for syntax error
|
|
285
|
-
`);const i=KM(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),m1(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),$w={draw:FF},DF=$w,IF={db:{},renderer:$w,parser:{parse:w(()=>{},"parse")}},PF=IF,Fw="flowchart-elk",OF=w((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"),zF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-mDhW3D3Q.js");return{diagram:t}},__vite__mapDeps([10,11,12,13,14]));return{id:Fw,diagram:e}},"loader"),NF={id:Fw,detector:OF,loader:zF},jF=NF,Dw="timeline",WF=w(e=>/^\s*timeline/.test(e),"detector"),HF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-DDBlkydm.js");return{diagram:t}},__vite__mapDeps([39,26]));return{id:Dw,diagram:e}},"loader"),qF={id:Dw,detector:WF,loader:HF},UF=qF,Iw="mindmap",YF=w(e=>/^\s*mindmap/.test(e),"detector"),VF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-TrK7CIKt.js");return{diagram:t}},__vite__mapDeps([40,12,13]));return{id:Iw,diagram:e}},"loader"),GF={id:Iw,detector:YF,loader:VF},XF=GF,Pw="kanban",QF=w(e=>/^\s*kanban/.test(e),"detector"),KF=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-CDcnICM9.js");return{diagram:t}},__vite__mapDeps([41,11]));return{id:Pw,diagram:e}},"loader"),ZF={id:Pw,detector:QF,loader:KF},JF=ZF,Ow="sankey",tD=w(e=>/^\s*sankey(-beta)?/.test(e),"detector"),eD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-4cANY87E.js");return{diagram:t}},__vite__mapDeps([42,27,22]));return{id:Ow,diagram:e}},"loader"),rD={id:Ow,detector:tD,loader:eD},nD=rD,zw="packet",iD=w(e=>/^\s*packet(-beta)?/.test(e),"detector"),sD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-DuebuBVv.js");return{diagram:t}},__vite__mapDeps([43,17,19,2,4,5]));return{id:zw,diagram:e}},"loader"),aD={id:zw,detector:iD,loader:sD},Nw="radar",oD=w(e=>/^\s*radar-beta/.test(e),"detector"),lD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-B_H957Uf.js");return{diagram:t}},__vite__mapDeps([44,17,19,2,4,5]));return{id:Nw,diagram:e}},"loader"),cD={id:Nw,detector:oD,loader:lD},jw="block",uD=w(e=>/^\s*block(-beta)?/.test(e),"detector"),hD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-B_rbZyqc.js");return{diagram:t}},__vite__mapDeps([45,11,5,2,1,14]));return{id:jw,diagram:e}},"loader"),dD={id:jw,detector:uD,loader:hD},fD=dD,Ww="architecture",pD=w(e=>/^\s*architecture/.test(e),"detector"),gD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-EvM6tQ7I.js");return{diagram:t}},__vite__mapDeps([46,17,19,2,4,5,7]));return{id:Ww,diagram:e}},"loader"),mD={id:Ww,detector:pD,loader:gD},yD=mD,Hw="treemap",xD=w(e=>/^\s*treemap/.test(e),"detector"),vD=w(async()=>{const{diagram:e}=await ee(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-yyu-ytzf.js");return{diagram:t}},__vite__mapDeps([47,13,17,19,2,4,5,23,27,22]));return{id:Hw,diagram:e}},"loader"),bD={id:Hw,detector:xD,loader:vD},Fx=!1,oh=w(()=>{Fx||(Fx=!0,su("error",PF,e=>e.toLowerCase().trim()==="error"),su("---",{db:{clear:w(()=>{},"clear")},styles:{},renderer:{draw:w(()=>{},"draw")},parser:{parse:w(()=>{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:w(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),wf(jF,XF,yD),wf(_6,JF,CF,yF,P6,U6,G6,K6,cF,fF,$6,M6,UF,j6,MF,_F,$F,eF,nD,aD,sF,fD,cD,bD))},"addDiagrams"),CD=w(async()=>{rt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(xs).map(async([r,{detector:i,loader:s}])=>{if(s)try{Tf(r)}catch{try{const{diagram:o,id:c}=await s();su(c,o,i)}catch(o){throw rt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete xs[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){rt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)rt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),wD="graphics-document document";function qw(e,t){e.attr("role",wD),t!==""&&e.attr("aria-roledescription",t)}w(qw,"setA11yDiagramInfo");function Uw(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}w(Uw,"addSVGa11yTitleDescription");var ms,fp=(ms=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){var d,f;const i=rr(),s=Ep(t,i);t=nR(t)+`
|
|
286
|
-
`;try{Tf(s)}catch{const g=LT(s);if(!g)throw new i1(`Diagram ${s} not found.`);const{id:m,diagram:y}=await g();su(m,y)}const{db:o,parser:c,renderer:l,init:h}=Tf(s);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),h==null||h(i),r.title&&((f=o.setDiagramTitle)==null||f.call(o,r.title)),await c.parse(t),new ms(s,t,o,c,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},w(ms,"Diagram"),ms),Dx=[],kD=w(()=>{Dx.forEach(e=>{e()}),Dx=[]},"attachFunctions"),SD=w(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Yw(e){const t=e.match(n1);if(!t)return{text:e,metadata:{}};let r=iA(t[1],{schema:nA})??{};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}}w(Yw,"extractFrontMatter");var _D=w(e=>e.replace(/\r\n?/g,`
|
|
287
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),TD=w(e=>{const{text:t,metadata:r}=Yw(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),LD=w(e=>{const t=xn.detectInit(e)??{},r=xn.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:q4(e),directive:t}},"processDirectives");function xg(e){const t=_D(e),r=TD(t),i=LD(r.text),s=ug(r.config,i.directive);return e=SD(i.text),{code:e,title:r.title,config:s}}w(xg,"preprocessDiagram");function Vw(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}w(Vw,"toBase64");var ED=5e4,MD="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",BD="sandbox",AD="loose",RD="http://www.w3.org/2000/svg",$D="http://www.w3.org/1999/xlink",FD="http://www.w3.org/1999/xhtml",DD="100%",ID="100%",PD="border:0;margin:0;",OD="margin:0",zD="allow-top-navigation-by-user-activation allow-popups",ND='The "iframe" tag is not supported by your browser.',jD=["foreignobject"],WD=["dominant-baseline"];function vg(e){const t=xg(e);return nu(),HT(t.config??{}),t}w(vg,"processAndSetConfigs");async function Gw(e,t){oh();try{const{code:r,config:i}=vg(e);return{diagramType:(await Qw(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}w(Gw,"parse");var Ix=w((e,t,r=[])=>`
|
|
288
|
-
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),HD=w((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
289
|
-
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
290
|
-
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
291
|
-
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const l=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(h=>{$x(h.styles)||l.forEach(d=>{r+=Ix(h.id,d,h.styles)}),$x(h.textStyles)||(r+=Ix(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(d=>d.replace("color","fill"))))})}return r},"createCssStyles"),qD=w((e,t,r,i)=>{const s=HD(e,r),o=c3(t,s,e.themeVariables);return lp(s6(`${i}{${o}}`),o6)},"createUserStyles"),UD=w((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Es(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),YD=w((e="",t)=>{var s,o;const r=(o=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":ID,i=Vw(`<body style="${OD}">${e}</body>`);return`<iframe style="width:${DD};height:${r};${PD}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${zD}">
|
|
292
|
-
${ND}
|
|
293
|
-
</iframe>`},"putIntoIFrame"),Px=w((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const c=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",RD);return s&&c.attr("xmlns:xlink",s),c.append("g"),e},"appendDivSvgG");function pp(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}w(pp,"sandboxedIframe");var VD=w((e,t,r,i)=>{var s,o,c;(s=e.getElementById(t))==null||s.remove(),(o=e.getElementById(r))==null||o.remove(),(c=e.getElementById(i))==null||c.remove()},"removeExistingElements"),GD=w(async function(e,t,r){var nt,J,Y,W,N,q;oh();const i=vg(t);t=i.code;const s=rr();rt.debug(s),t.length>((s==null?void 0:s.maxTextSize)??ED)&&(t=MD);const o="#"+e,c="i"+e,l="#"+c,h="d"+e,d="#"+h,f=w(()=>{const Z=Xt(m?l:d).node();Z&&"remove"in Z&&Z.remove()},"removeTempElements");let g=Xt("body");const m=s.securityLevel===BD,y=s.securityLevel===AD,v=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const D=pp(Xt(r),c);g=Xt(D.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt(r);Px(g,e,h,`font-family: ${v}`,$D)}else{if(VD(document,e,h,c),m){const D=pp(Xt("body"),c);g=Xt(D.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt("body");Px(g,e,h)}let C,k;try{C=await fp.fromText(t,{title:i.title})}catch(D){if(s.suppressErrorRendering)throw f(),D;C=await fp.fromText("error"),k=D}const _=g.select(d).node(),T=C.type,E=_.firstChild,B=E.firstChild,A=(J=(nt=C.renderer).getClasses)==null?void 0:J.call(nt,t,C),M=qD(s,T,A,o),R=document.createElement("style");R.innerHTML=M,E.insertBefore(R,B);try{await C.renderer.draw(t,e,my.version,C)}catch(D){throw s.suppressErrorRendering?f():DF.draw(t,e,my.version),D}const O=g.select(`${d} svg`),tt=(W=(Y=C.db).getAccTitle)==null?void 0:W.call(Y),et=(q=(N=C.db).getAccDescription)==null?void 0:q.call(N);Kw(T,O,tt,et),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",FD);let V=g.select(d).node().innerHTML;if(rt.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),V=UD(V,m,Fe(s.arrowMarkerAbsolute)),m){const D=g.select(d+" svg").node();V=YD(V,D)}else y||(V=Fi.sanitize(V,{ADD_TAGS:jD,ADD_ATTR:WD,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kD(),k)throw k;return f(),{diagramType:T,svg:V,bindFunctions:C.db.bindFunctions}},"render");function Xw(e={}){var i;const t=Re({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),jT(t),t!=null&&t.theme&&t.theme in ei?t.themeVariables=ei[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ei.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?NT(t):c1();Lp(r.logLevel),oh()}w(Xw,"initialize");var Qw=w((e,t={})=>{const{code:r}=xg(e);return fp.fromText(r,t)},"getDiagramFromText");function Kw(e,t,r,i){qw(t,e),Uw(t,r,i,t.attr("id"))}w(Kw,"addA11yInfo");var ks=Object.freeze({render:GD,parse:Gw,getDiagramFromText:Qw,initialize:Xw,getConfig:rr,setConfig:u1,getSiteConfig:c1,updateSiteConfig:WT,reset:w(()=>{nu()},"reset"),globalReset:w(()=>{nu(ga)},"globalReset"),defaultConfig:ga});Lp(rr().logLevel);nu(rr());var XD=w((e,t,r)=>{rt.warn(e),cg(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"),Zw=w(async function(e={querySelector:".mermaid"}){try{await QD(e)}catch(t){if(cg(t)&&rt.error(t.str),Or.parseError&&Or.parseError(t),!e.suppressErrors)throw rt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),QD=w(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ks.getConfig();rt.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");rt.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(rt.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),ks.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new xn.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let c;const l=[];for(const h of Array.from(s)){if(rt.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=h.innerHTML,c=vb(xn.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=xn.detectInit(c);f&&rt.debug("Detected early reinit: ",f);try{const{svg:g,bindFunctions:m}=await rk(d,c,h);h.innerHTML=g,e&&await e(d),m&&m(h)}catch(g){XD(g,l,Or.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Jw=w(function(e){ks.initialize(e)},"initialize"),KD=w(async function(e,t,r){rt.warn("mermaid.init is deprecated. Please use run instead."),e&&Jw(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Zw(i)},"init"),ZD=w(async(e,{lazyLoad:t=!0}={})=>{oh(),wf(...e),t===!1&&await CD()},"registerExternalDiagrams"),tk=w(function(){if(Or.startOnLoad){const{startOnLoad:e}=ks.getConfig();e&&Or.run().catch(t=>rt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",tk,!1);var JD=w(function(e){Or.parseError=e},"setParseErrorHandler"),$u=[],pf=!1,ek=w(async()=>{if(!pf){for(pf=!0;$u.length>0;){const e=$u.shift();if(e)try{await e()}catch(t){rt.error("Error executing queue",t)}}pf=!1}},"executeQueue"),tI=w(async(e,t)=>new Promise((r,i)=>{const s=w(()=>new Promise((o,c)=>{ks.parse(e,t).then(l=>{o(l),r(l)},l=>{var h;rt.error("Error parsing",l),(h=Or.parseError)==null||h.call(Or,l),c(l),i(l)})}),"performCall");$u.push(s),ek().catch(i)}),"parse"),rk=w((e,t,r)=>new Promise((i,s)=>{const o=w(()=>new Promise((c,l)=>{ks.render(e,t,r).then(h=>{c(h),i(h)},h=>{var d;rt.error("Error parsing",h),(d=Or.parseError)==null||d.call(Or,h),l(h),s(h)})}),"performCall");$u.push(o),ek().catch(s)}),"render"),eI=w(()=>Object.keys(xs).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Or={startOnLoad:!0,mermaidAPI:ks,parse:tI,render:rk,init:KD,run:Zw,registerExternalDiagrams:ZD,registerLayoutLoaders:cw,initialize:Jw,parseError:void 0,contentLoaded:tk,setParseErrorHandler:JD,detectType:Ep,registerIconPacks:SR,getRegisteredDiagramsMetadata:eI},nk=Or;/*! Check if previously processed *//*!
|
|
294
|
-
* Wait for document loaded before starting the execution
|
|
295
|
-
*/nk.initialize({startOnLoad:!1,theme:"dark",themeVariables:{darkMode:!0,background:"#161b22",primaryColor:"#21262d",primaryTextColor:"#c9d1d9",primaryBorderColor:"#30363d",lineColor:"#58a6ff",secondaryColor:"#21262d",tertiaryColor:"#161b22",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',fontSize:"14px",nodeBorder:"#58a6ff",mainBkg:"#21262d",nodeTextColor:"#c9d1d9",edgeLabelBackground:"#161b22"},flowchart:{htmlLabels:!0,curve:"basis"}});let rI=0;function nI({data:e}){const t=j.useRef(null),[r,i]=j.useState(0),[s,o]=j.useState(!1),[c,l]=j.useState(null),h=(e==null?void 0:e.format)||"mermaid",d=(e==null?void 0:e.content)||"",f=(e==null?void 0:e.steps)||[],g=(e==null?void 0:e.animate)&&f.length>0,m=(e==null?void 0:e.module)||null,y=(e==null?void 0:e.step)||null;j.useEffect(()=>{!d&&f.length===0||(l(null),i(0),g?_():v(d,h))},[d,h,f.length]);async function v(E,B){const A=t.current;if(A)try{B==="mermaid"?await C(A,E):B==="svg"?k(A,E):B==="d3"?A.innerHTML=`
|
|
296
|
-
<div style="text-align:center; padding:40px; color:#8b949e;">
|
|
297
|
-
<p>D3 visualization support coming soon</p>
|
|
298
|
-
</div>
|
|
299
|
-
`:l(`Unsupported diagram format: ${B}`)}catch(M){console.error("[Canvas] Render error:",M),l(M.message||"Failed to render diagram")}}async function C(E,B){E.innerHTML="";const A=`mermaid-${++rI}`;try{const{svg:M}=await nk.render(A,B);E.innerHTML=`<div class="mermaid-output" style="display:flex;justify-content:center;align-items:center;min-height:200px;">${M}</div>`}catch(M){const R=document.getElementById(A);throw R&&R.remove(),M}}function k(E,B){E.innerHTML=`<div style="display:flex;justify-content:center;align-items:center;min-height:200px;">${B}</div>`}async function _(){o(!0);for(let E=0;E<f.length;E++){i(E);const B=f[E],A=B.content||B,M=B.format||h;if(await v(A,M),E<f.length-1){const R=B.delay||1500;await new Promise(O=>setTimeout(O,R))}}o(!1)}function T(E){if(s||E<0||E>=f.length)return;i(E);const B=f[E],A=B.content||B,M=B.format||h;v(A,M)}return e?S.jsxs("div",{style:xe.container,children:[(m||y)&&S.jsxs("div",{style:xe.breadcrumb,children:[m&&S.jsx("span",{style:xe.breadcrumbModule,children:m}),m&&y&&S.jsx("span",{style:xe.breadcrumbSep,children:"/"}),y&&S.jsx("span",{style:xe.breadcrumbStep,children:y})]}),S.jsx("div",{style:xe.diagramWrapper,children:c?S.jsxs("div",{style:xe.errorBox,children:[S.jsx("p",{style:xe.errorTitle,children:"Render Error"}),S.jsx("pre",{style:xe.errorMessage,children:c}),S.jsx("p",{style:xe.errorHint,children:"The diagram syntax may be invalid."})]}):S.jsx("div",{ref:t,style:xe.diagram})}),f.length>0&&S.jsxs("div",{style:xe.stepControls,children:[S.jsxs("button",{onClick:()=>T(r-1),disabled:r===0||s,style:{...xe.stepButton,opacity:r===0||s?.4:1},children:["◀"," Prev"]}),S.jsx("div",{style:xe.stepIndicators,children:f.map((E,B)=>S.jsx("button",{onClick:()=>T(B),disabled:s,style:{...xe.stepDot,backgroundColor:B===r?"#58a6ff":"#30363d"}},B))}),S.jsx("span",{style:xe.stepLabel,children:s?"Animating...":`Step ${r+1} of ${f.length}`}),S.jsxs("button",{onClick:()=>T(r+1),disabled:r>=f.length-1||s,style:{...xe.stepButton,opacity:r>=f.length-1||s?.4:1},children:["Next ","▶"]})]}),(e==null?void 0:e.awaitingAnswer)&&S.jsxs("div",{style:xe.answerPrompt,children:[S.jsx("span",{style:xe.promptIcon,children:"💬"}),S.jsx("span",{children:"Answer in the terminal"})]})]}):S.jsxs("div",{style:xe.empty,children:[S.jsx("div",{style:xe.emptyIcon,children:"🎨"}),S.jsx("p",{style:xe.emptyTitle,children:"Canvas Ready"}),S.jsx("p",{style:xe.emptySubtext,children:"Diagrams and visualizations will appear here during lessons."})]})}const xe={container:{display:"flex",flexDirection:"column",gap:16,maxWidth:1e3,margin:"0 auto"},breadcrumb:{display:"flex",alignItems:"center",gap:8,fontSize:13,color:"#8b949e"},breadcrumbModule:{color:"#58a6ff",fontWeight:500},breadcrumbSep:{color:"#484f58"},breadcrumbStep:{color:"#c9d1d9"},diagramWrapper:{backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,padding:24,minHeight:300,display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto"},diagram:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},stepControls:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,padding:"12px 0"},stepButton:{padding:"6px 14px",fontSize:13,fontWeight:500,color:"#c9d1d9",backgroundColor:"#21262d",border:"1px solid #30363d",borderRadius:6,cursor:"pointer",transition:"opacity 0.15s ease"},stepIndicators:{display:"flex",gap:6},stepDot:{width:10,height:10,borderRadius:"50%",border:"none",cursor:"pointer",transition:"background-color 0.2s ease"},stepLabel:{fontSize:12,color:"#8b949e",minWidth:100,textAlign:"center"},answerPrompt:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"14px 20px",backgroundColor:"#21262d",border:"1px solid #30363d",borderRadius:10,fontSize:14,color:"#c9d1d9",animation:"pulse 2s infinite"},promptIcon:{fontSize:18},errorBox:{textAlign:"center",padding:24,color:"#f85149"},errorTitle:{fontSize:16,fontWeight:600,margin:"0 0 8px"},errorMessage:{fontSize:13,fontFamily:"monospace",backgroundColor:"#21262d",padding:"8px 12px",borderRadius:6,margin:"0 0 8px",whiteSpace:"pre-wrap",textAlign:"left",color:"#f85149"},errorHint:{fontSize:13,color:"#8b949e",margin:0},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0}};function iI({data:e,sendEvent:t}){if(!e)return S.jsxs("div",{style:Ht.empty,children:[S.jsx("div",{style:Ht.emptyIcon,children:"🧠"}),S.jsx("p",{style:Ht.emptyTitle,children:"Quiz Mode"}),S.jsx("p",{style:Ht.emptySubtext,children:"Interactive quizzes will appear here during lessons."})]});const{quizType:r,question:i,items:s,timeLimit:o,options:c,pairs:l,code:h,blanks:d}=e;switch(r){case"drag-order":return S.jsx(sI,{question:i,items:s||[],sendEvent:t});case"timed-choice":return S.jsx(aI,{question:i,options:c||s||[],timeLimit:o||30,sendEvent:t});case"matching":return S.jsx(oI,{question:i,pairs:l||s||[],sendEvent:t});case"fill-blank":return S.jsx(lI,{question:i,code:h||"",blanks:d||[],sendEvent:t});default:return S.jsx("div",{style:Ht.errorBox,children:S.jsxs("p",{children:["Unknown quiz type: ",r]})})}}function sI({question:e,items:t,sendEvent:r}){const[i,s]=j.useState(t),[o,c]=j.useState(null),[l,h]=j.useState(null),[d,f]=j.useState(!1),[g,m]=j.useState(null);j.useEffect(()=>{s(t),f(!1),m(null)},[t]);function y(T,E){c(E),T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("text/plain",E.toString()),T.target&&(T.target.style.opacity="0.5")}function v(T){T.target&&(T.target.style.opacity="1"),c(null),h(null)}function C(T,E){T.preventDefault(),T.dataTransfer.dropEffect="move",E!==l&&h(E)}function k(T,E){T.preventDefault();const B=o;if(B===null||B===E)return;const A=[...i],[M]=A.splice(B,1);A.splice(E,0,M),s(A),c(null),h(null)}function _(){f(!0);const T=i.map(E=>typeof E=="string"?E:E.id||E.label);r("event:quiz-answer",{quizType:"drag-order",answer:T}),m("pending")}return S.jsxs("div",{style:Ht.quizContainer,children:[S.jsx("h2",{style:Ht.question,children:e}),S.jsx("p",{style:Ht.hint,children:"Drag items to reorder them"}),S.jsx("div",{style:Ht.dragList,children:i.map((T,E)=>{const B=typeof T=="string"?T:T.label||T.text||T.id,A=l===E,M=o===E;return S.jsxs("div",{draggable:!d,onDragStart:R=>y(R,E),onDragEnd:v,onDragOver:R=>C(R,E),onDrop:R=>k(R,E),style:{...Ht.dragItem,borderColor:A?"#58a6ff":"#30363d",backgroundColor:M?"#21262d":"#161b22",transform:A?"scale(1.01)":"scale(1)",opacity:d?.7:1,cursor:d?"default":"grab"},children:[S.jsx("span",{style:Ht.dragHandle,children:"☰"}),S.jsx("span",{style:Ht.dragIndex,children:E+1}),S.jsx("span",{style:Ht.dragLabel,children:B})]},`${B}-${E}`)})}),!d&&S.jsx("button",{onClick:_,style:Ht.submitButton,children:"Submit Order"}),d&&g==="pending"&&S.jsx("div",{style:Ht.pendingResult,children:"Checking your answer..."})]})}function aI({question:e,options:t,timeLimit:r,sendEvent:i}){const[s,o]=j.useState(null),[c,l]=j.useState(!1),[h,d]=j.useState(r),[f,g]=j.useState(null),m=j.useRef(null);j.useEffect(()=>(o(null),l(!1),d(r),g(null),m.current=setInterval(()=>{d(k=>k<=1?(clearInterval(m.current),0):k-1)},1e3),()=>{m.current&&clearInterval(m.current)}),[e,r]),j.useEffect(()=>{h===0&&!c&&y(null)},[h,c]);function y(k){if(c)return;l(!0),o(k),m.current&&clearInterval(m.current);const _=k!==null?typeof k=="string"?k:k.id||k.label||k:null;i("event:quiz-answer",{quizType:"timed-choice",answer:_,timeMs:(r-h)*1e3})}const v=h/r*100,C=h>r*.5?"#3fb950":h>r*.2?"#d29922":"#f85149";return S.jsxs("div",{style:Ht.quizContainer,children:[S.jsx("div",{style:Ht.timerBar,children:S.jsx("div",{style:{...Ht.timerFill,width:`${v}%`,backgroundColor:C}})}),S.jsx("div",{style:Ht.timerLabel,children:S.jsxs("span",{children:["⏱"," ",h,"s"]})}),S.jsx("h2",{style:Ht.question,children:e}),S.jsx("div",{style:Ht.choiceGrid,children:t.map((k,_)=>{const T=typeof k=="string"?k:k.label||k.text,E=typeof k=="string"?k:k.id||k.label,B=s!==null&&(typeof s=="string"?s:s.id||s.label)===E;return S.jsxs("button",{onClick:()=>!c&&y(k),disabled:c,style:{...Ht.choiceButton,borderColor:B?"#58a6ff":"#30363d",backgroundColor:B?"#58a6ff18":"#161b22",cursor:c?"default":"pointer",opacity:c&&!B?.5:1},children:[S.jsx("span",{style:Ht.choiceLetter,children:String.fromCharCode(65+_)}),S.jsx("span",{style:Ht.choiceText,children:T})]},`${E}-${_}`)})}),c&&S.jsx("div",{style:Ht.pendingResult,children:h===0&&s===null?"Time's up! No answer submitted.":"Checking your answer..."})]})}function oI({question:e,pairs:t,sendEvent:r}){const[i]=j.useState(()=>t.map(k=>k.left||k.a||k.term)),[s]=j.useState(()=>[...t.map(_=>_.right||_.b||_.definition)].sort(()=>Math.random()-.5)),[o,c]=j.useState({}),[l,h]=j.useState(null),[d,f]=j.useState(!1);j.useEffect(()=>{c({}),h(null),f(!1)},[e]);function g(k){d||h(l===k?null:k)}function m(k){if(d||!l)return;const _={...o};delete _[l];for(const[T,E]of Object.entries(_))E===k&&delete _[T];_[l]=k,c(_),h(null)}function y(){f(!0),r("event:quiz-answer",{quizType:"matching",answer:o})}const v=Object.keys(o).length===i.length,C=new Set(Object.values(o));return S.jsxs("div",{style:Ht.quizContainer,children:[S.jsx("h2",{style:Ht.question,children:e}),S.jsx("p",{style:Ht.hint,children:"Click a left item, then click its match on the right"}),S.jsxs("div",{style:Ht.matchingContainer,children:[S.jsx("div",{style:Ht.matchingColumn,children:i.map((k,_)=>{const T=l===k,E=k in o;return S.jsxs("button",{onClick:()=>g(k),disabled:d,style:{...Ht.matchItem,borderColor:T?"#58a6ff":E?"#3fb950":"#30363d",backgroundColor:T?"#58a6ff18":E?"#3fb95010":"#161b22",cursor:d?"default":"pointer"},children:[k,E&&S.jsx("span",{style:Ht.matchCheck,children:"✔"})]},`left-${_}`)})}),S.jsx("div",{style:Ht.matchingArrows,children:i.map((k,_)=>S.jsx("div",{style:Ht.arrowRow,children:o[k]?S.jsx("span",{style:Ht.arrowConnected,children:"──▶"}):S.jsx("span",{style:Ht.arrowEmpty,children:"···"})},_))}),S.jsx("div",{style:Ht.matchingColumn,children:s.map((k,_)=>{const T=C.has(k);return S.jsx("button",{onClick:()=>m(k),disabled:d||!l,style:{...Ht.matchItem,borderColor:T?"#3fb950":"#30363d",backgroundColor:T?"#3fb95010":"#161b22",cursor:d||!l?"default":"pointer",opacity:d&&!T?.5:1},children:k},`right-${_}`)})})]}),!d&&S.jsx("button",{onClick:y,disabled:!v,style:{...Ht.submitButton,opacity:v?1:.5,cursor:v?"pointer":"not-allowed"},children:"Submit Matches"}),d&&S.jsx("div",{style:Ht.pendingResult,children:"Checking your matches..."})]})}function lI({question:e,code:t,blanks:r,sendEvent:i}){const[s,o]=j.useState(()=>r.map(()=>"")),[c,l]=j.useState(!1);j.useEffect(()=>{o(r.map(()=>"")),l(!1)},[e,t]);function h(m,y){if(c)return;const v=[...s];v[m]=y,o(v)}function d(){l(!0),i("event:quiz-answer",{quizType:"fill-blank",answer:s})}function f(){return t.split(/(___\d+___)/g).map((y,v)=>{var k,_;const C=y.match(/___(\d+)___/);if(C){const T=parseInt(C[1],10),E=r[T]||{};return S.jsx("input",{type:"text",value:s[T]||"",onChange:B=>h(T,B.target.value),disabled:c,placeholder:E.placeholder||"...",style:{...Ht.blankInput,width:Math.max(80,(((k=s[T])==null?void 0:k.length)||((_=E.placeholder)==null?void 0:_.length)||3)*9+20)}},`blank-${v}`)}return S.jsx("span",{children:y},`code-${v}`)})}const g=s.every(m=>m.trim().length>0);return S.jsxs("div",{style:Ht.quizContainer,children:[S.jsx("h2",{style:Ht.question,children:e}),S.jsx("pre",{style:Ht.codeBlock,children:S.jsx("code",{children:f()})}),!c&&S.jsx("button",{onClick:d,disabled:!g,style:{...Ht.submitButton,opacity:g?1:.5,cursor:g?"pointer":"not-allowed"},children:"Submit Answer"}),c&&S.jsx("div",{style:Ht.pendingResult,children:"Checking your answer..."})]})}const Ht={quizContainer:{maxWidth:700,margin:"0 auto",display:"flex",flexDirection:"column",gap:20},question:{fontSize:22,fontWeight:700,color:"#e6edf3",margin:0,lineHeight:1.4},hint:{fontSize:13,color:"#8b949e",margin:0},submitButton:{alignSelf:"center",padding:"10px 28px",fontSize:14,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:8,cursor:"pointer",transition:"background-color 0.15s ease"},pendingResult:{textAlign:"center",padding:"12px 20px",backgroundColor:"#21262d",borderRadius:8,fontSize:14,color:"#8b949e"},errorBox:{textAlign:"center",padding:40,color:"#f85149",fontSize:16},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0},dragList:{display:"flex",flexDirection:"column",gap:8},dragItem:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid",borderRadius:8,transition:"border-color 0.15s ease, transform 0.1s ease, background-color 0.15s ease",userSelect:"none"},dragHandle:{fontSize:16,color:"#484f58",cursor:"grab"},dragIndex:{width:24,height:24,borderRadius:"50%",backgroundColor:"#21262d",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"#8b949e",flexShrink:0},dragLabel:{fontSize:14,color:"#c9d1d9"},timerBar:{height:4,backgroundColor:"#21262d",borderRadius:2,overflow:"hidden"},timerFill:{height:"100%",borderRadius:2,transition:"width 1s linear, background-color 0.3s ease"},timerLabel:{textAlign:"right",fontSize:13,color:"#8b949e"},choiceGrid:{display:"flex",flexDirection:"column",gap:10},choiceButton:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",border:"1px solid",borderRadius:10,textAlign:"left",transition:"border-color 0.15s ease, background-color 0.15s ease",width:"100%",fontSize:14,color:"#c9d1d9",fontFamily:"inherit"},choiceLetter:{width:28,height:28,borderRadius:"50%",backgroundColor:"#21262d",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:"#8b949e",flexShrink:0},choiceText:{flex:1},matchingContainer:{display:"flex",gap:16,alignItems:"flex-start"},matchingColumn:{flex:1,display:"flex",flexDirection:"column",gap:8},matchingArrows:{display:"flex",flexDirection:"column",gap:8,justifyContent:"flex-start",paddingTop:0},arrowRow:{height:46,display:"flex",alignItems:"center",justifyContent:"center"},arrowConnected:{color:"#3fb950",fontFamily:"monospace",fontSize:14},arrowEmpty:{color:"#30363d",fontFamily:"monospace",fontSize:14},matchItem:{padding:"10px 16px",border:"1px solid",borderRadius:8,fontSize:14,color:"#c9d1d9",backgroundColor:"#161b22",fontFamily:"inherit",width:"100%",textAlign:"left",transition:"border-color 0.15s ease, background-color 0.15s ease",display:"flex",alignItems:"center",justifyContent:"space-between"},matchCheck:{color:"#3fb950",marginLeft:8},codeBlock:{backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:10,padding:"20px 24px",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:14,lineHeight:1.7,color:"#c9d1d9",overflow:"auto",whiteSpace:"pre-wrap"},blankInput:{display:"inline-block",padding:"2px 8px",fontSize:14,fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',color:"#58a6ff",backgroundColor:"#0d1117",border:"1px solid #58a6ff",borderRadius:4,outline:"none",verticalAlign:"baseline"}},cI=j.lazy(()=>ee(()=>import("./index-CF3qc2Xb.js"),[]));function uI({data:e,sendEvent:t}){const[r,i]=j.useState(""),[s,o]=j.useState(""),[c,l]=j.useState(""),[h,d]=j.useState(!1),[f,g]=j.useState("javascript");j.useEffect(()=>{if(!e)return;const k=e.starter||"";o(k),i(k),l(""),g(e.language||"javascript"),d(!1)},[e]);const m=j.useCallback(()=>{h||(d(!0),l("Running..."),t("event:code-run",{code:r,language:f}),setTimeout(()=>{d(!1),l(k=>k==="Running..."?"Waiting for execution result from server...":k)},5e3))},[r,f,h,t]),y=j.useCallback(()=>{i(s),l("")},[s]),v=j.useCallback(()=>{t("event:click",{element:"hint",data:{language:f,code:r}})},[f,r,t]),C={bash:"shell",sh:"shell",javascript:"javascript",js:"javascript",python:"python",py:"python",typescript:"typescript",ts:"typescript"}[f]||f;return e?S.jsxs("div",{style:we.container,children:[S.jsxs("div",{style:we.header,children:[S.jsxs("div",{style:we.headerLeft,children:[S.jsx("span",{style:we.langBadge,children:f}),e.instructions&&S.jsx("span",{style:we.instructions,children:e.instructions})]}),S.jsxs("div",{style:we.headerRight,children:[S.jsxs("button",{onClick:v,style:we.hintButton,children:["💡"," Hint"]}),S.jsxs("button",{onClick:y,style:we.resetButton,children:["↺"," Reset"]}),S.jsx("button",{onClick:m,disabled:h,style:{...we.runButton,opacity:h?.7:1},children:h?"⏳ Running...":"▶ Run"})]})]}),S.jsx("div",{style:we.editorContainer,children:S.jsx(j.Suspense,{fallback:S.jsx(hI,{code:r,onChange:i}),children:S.jsx(cI,{height:"350px",language:C,value:r,onChange:k=>i(k||""),theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,wordWrap:"on",padding:{top:12},renderLineHighlight:"none",overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8}}})})}),S.jsxs("div",{style:we.outputContainer,children:[S.jsxs("div",{style:we.outputHeader,children:[S.jsx("span",{style:we.outputTitle,children:"Output"}),c&&S.jsx("button",{onClick:()=>l(""),style:we.clearButton,children:"Clear"})]}),S.jsx("pre",{style:we.outputContent,children:c||"Run your code to see output here."})]})]}):S.jsxs("div",{style:we.empty,children:[S.jsx("div",{style:we.emptyIcon,children:"💻"}),S.jsx("p",{style:we.emptyTitle,children:"Code Playground"}),S.jsx("p",{style:we.emptySubtext,children:"Interactive code exercises will appear here during lessons."})]})}function hI({code:e,onChange:t}){return S.jsxs("div",{style:we.fallbackContainer,children:[S.jsx("div",{style:we.fallbackLoading,children:"Loading editor..."}),S.jsx("textarea",{value:e,onChange:r=>t(r.target.value),style:we.fallbackTextarea,spellCheck:!1})]})}const we={container:{display:"flex",flexDirection:"column",gap:0,maxWidth:900,margin:"0 auto",border:"1px solid #30363d",borderRadius:12,overflow:"hidden"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#161b22",borderBottom:"1px solid #30363d",flexWrap:"wrap",gap:8},headerLeft:{display:"flex",alignItems:"center",gap:12},langBadge:{fontSize:12,fontWeight:600,color:"#c9d1d9",backgroundColor:"#21262d",padding:"3px 10px",borderRadius:12,textTransform:"uppercase",letterSpacing:"0.05em"},instructions:{fontSize:13,color:"#8b949e"},headerRight:{display:"flex",alignItems:"center",gap:8},hintButton:{padding:"5px 12px",fontSize:13,color:"#d29922",backgroundColor:"transparent",border:"1px solid #d2992240",borderRadius:6,cursor:"pointer",transition:"background-color 0.15s ease"},resetButton:{padding:"5px 12px",fontSize:13,color:"#8b949e",backgroundColor:"transparent",border:"1px solid #30363d",borderRadius:6,cursor:"pointer",transition:"background-color 0.15s ease"},runButton:{padding:"5px 16px",fontSize:13,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:6,cursor:"pointer",transition:"opacity 0.15s ease"},editorContainer:{backgroundColor:"#1e1e1e",minHeight:350},outputContainer:{backgroundColor:"#0d1117",borderTop:"1px solid #30363d"},outputHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderBottom:"1px solid #21262d"},outputTitle:{fontSize:12,fontWeight:600,color:"#8b949e",textTransform:"uppercase",letterSpacing:"0.05em"},clearButton:{fontSize:11,color:"#484f58",backgroundColor:"transparent",border:"none",cursor:"pointer"},outputContent:{padding:"12px 16px",margin:0,fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:13,lineHeight:1.6,color:"#8b949e",minHeight:80,maxHeight:200,overflow:"auto",whiteSpace:"pre-wrap"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0},fallbackContainer:{position:"relative",height:350},fallbackLoading:{position:"absolute",top:12,right:16,fontSize:12,color:"#484f58",zIndex:1},fallbackTextarea:{width:"100%",height:"100%",padding:"12px 16px",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:14,lineHeight:1.6,color:"#c9d1d9",backgroundColor:"#1e1e1e",border:"none",outline:"none",resize:"none"}},dI="http://localhost:3456";function fI({data:e,sendEvent:t}){const[r,i]=j.useState([]),[s,o]=j.useState("~"),[c,l]=j.useState(""),[h,d]=j.useState(!1),[f,g]=j.useState(null),[m,y]=j.useState([]),[v,C]=j.useState(-1),k=j.useRef(null),_=j.useRef(null);j.useEffect(()=>{e&&(e.cwd&&o(e.cwd),e.resetHistory&&(i([]),g(null),y([]),C(-1)))},[e]),j.useEffect(()=>{k.current&&typeof k.current.scrollIntoView=="function"&&k.current.scrollIntoView({behavior:"smooth"})},[r]),j.useEffect(()=>{var O;h||(O=_.current)==null||O.focus()},[h,e]);const T=j.useCallback(async O=>{if(O.trim()){d(!0),i(tt=>[...tt,{type:"command",cwd:s,text:O}]),y(tt=>[...tt,O]),C(-1);try{const et=await(await fetch(`${dI}/api/terminal/exec`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:O,sessionId:f,cwd:e==null?void 0:e.cwd})})).json();!f&&et.sessionId&&g(et.sessionId),et.cwd&&o(et.cwd),et.output&&i(V=>[...V,{type:"output",text:et.output,exitCode:et.exitCode}])}catch{i(et=>[...et,{type:"output",text:"Error: Could not connect to bridge server. Is it running?",exitCode:1}])}finally{d(!1)}}},[s,f,e==null?void 0:e.cwd]),E=j.useCallback(O=>{if(O.key==="Enter"&&!h){O.preventDefault();const tt=c.trim();tt&&(T(tt),l(""))}else if(O.key==="ArrowUp"){if(O.preventDefault(),m.length===0)return;const tt=v===-1?m.length-1:Math.max(0,v-1);C(tt),l(m[tt])}else if(O.key==="ArrowDown"){if(O.preventDefault(),v===-1)return;const tt=v+1;tt>=m.length?(C(-1),l("")):(C(tt),l(m[tt]))}else O.key==="l"&&O.ctrlKey&&(O.preventDefault(),i([]))},[c,h,T,m,v]),B=Ox(s);if(!e)return S.jsxs("div",{style:Vt.empty,children:[S.jsx("div",{style:Vt.emptyIcon,children:">_"}),S.jsx("p",{style:Vt.emptyTitle,children:"Practice Terminal"}),S.jsx("p",{style:Vt.emptySubtext,children:"A hands-on terminal will appear here during lessons."})]});const A=e.validations||[],M=A.filter(O=>O.passed).length,R=A.length>0&&M===A.length;return S.jsxs("div",{style:Vt.container,children:[S.jsxs("div",{style:Vt.taskPanel,children:[S.jsxs("div",{style:Vt.taskHeader,children:[S.jsx("span",{style:Vt.taskLabel,children:"Task"}),e.module&&S.jsx("span",{style:Vt.moduleBadge,children:e.module}),A.length>0&&S.jsxs("span",{style:{...Vt.progressBadge,color:R?"#3fb950":"#d29922"},children:[M,"/",A.length]})]}),S.jsx("p",{style:Vt.taskText,children:e.task}),A.length>0&&S.jsx("div",{style:Vt.validations,children:A.map((O,tt)=>S.jsxs("div",{style:Vt.validationRow,children:[S.jsx("span",{style:{...Vt.validationCheck,color:O.passed?"#3fb950":"#484f58"},children:O.passed?"✓":"○"}),S.jsx("span",{style:{...Vt.validationLabel,color:O.passed?"#8b949e":"#c9d1d9",textDecoration:O.passed?"line-through":"none"},children:O.label})]},tt))}),e.feedback&&S.jsxs("div",{style:Vt.feedbackBox,children:[S.jsx("span",{style:Vt.feedbackIcon,children:R?"✓":"→"}),S.jsx("span",{style:Vt.feedbackText,children:e.feedback})]}),e.hints&&e.hints.length>0&&S.jsx(pI,{hints:e.hints})]}),S.jsxs("div",{style:Vt.terminalArea,onClick:()=>{var O;return(O=_.current)==null?void 0:O.focus()},children:[S.jsxs("div",{style:Vt.terminalHeader,children:[S.jsxs("div",{style:Vt.terminalDots,children:[S.jsx("span",{style:{...Vt.dot,backgroundColor:"#f85149"}}),S.jsx("span",{style:{...Vt.dot,backgroundColor:"#d29922"}}),S.jsx("span",{style:{...Vt.dot,backgroundColor:"#3fb950"}})]}),S.jsx("span",{style:Vt.terminalTitle,children:B})]}),S.jsxs("div",{style:Vt.terminalBody,children:[r.map((O,tt)=>S.jsx("div",{children:O.type==="command"?S.jsxs("div",{style:Vt.cmdLine,children:[S.jsxs("span",{style:Vt.prompt,children:[Ox(O.cwd)," $"]}),S.jsx("span",{style:Vt.cmdText,children:O.text})]}):S.jsx("pre",{style:{...Vt.outputText,color:O.exitCode!==0?"#f85149":"#8b949e"},children:O.text})},tt)),S.jsxs("div",{style:Vt.cmdLine,children:[S.jsxs("span",{style:Vt.prompt,children:[B," $"]}),S.jsx("input",{ref:_,type:"text",value:c,onChange:O=>l(O.target.value),onKeyDown:E,disabled:h,style:Vt.cmdInput,spellCheck:!1,autoComplete:"off",placeholder:h?"Running...":"Type a command..."})]}),S.jsx("div",{ref:k})]})]})]})}function pI({hints:e}){const[t,r]=j.useState(!1),[i,s]=j.useState(0);return S.jsx("div",{style:Vt.hintSection,children:t?S.jsxs("div",{children:[S.jsx("p",{style:Vt.hintText,children:e[i]}),S.jsx("div",{style:Vt.hintNav,children:i<e.length-1&&S.jsxs("button",{onClick:()=>s(o=>o+1),style:Vt.hintButton,children:["Next hint (",i+1,"/",e.length,")"]})})]}):S.jsx("button",{onClick:()=>r(!0),style:Vt.hintButton,children:"Show hint"})})}function Ox(e){if(!e)return"~";const t=e.replace(/^\/Users\/[^/]+/,"~").replace(/^\/home\/[^/]+/,"~"),r=t.split("/");return r.length<=3?t:r[0]+"/.../"+r.slice(-2).join("/")}const Vt={container:{display:"flex",flexDirection:"column",gap:0,maxWidth:900,margin:"0 auto",border:"1px solid #30363d",borderRadius:12,overflow:"hidden",height:"calc(100vh - 120px)"},taskPanel:{padding:"16px 20px",backgroundColor:"#161b22",borderBottom:"1px solid #30363d",flexShrink:0},taskHeader:{display:"flex",alignItems:"center",gap:10,marginBottom:8},taskLabel:{fontSize:11,fontWeight:700,color:"#58a6ff",textTransform:"uppercase",letterSpacing:"0.08em"},moduleBadge:{fontSize:11,color:"#8b949e",backgroundColor:"#21262d",padding:"2px 8px",borderRadius:8},progressBadge:{fontSize:11,fontWeight:600,marginLeft:"auto"},taskText:{fontSize:14,lineHeight:1.6,color:"#e6edf3",margin:0},validations:{marginTop:12,display:"flex",flexDirection:"column",gap:4},validationRow:{display:"flex",alignItems:"center",gap:8},validationCheck:{fontSize:14,fontWeight:700,width:18,textAlign:"center"},validationLabel:{fontSize:13},feedbackBox:{marginTop:12,padding:"10px 14px",backgroundColor:"#0d1117",border:"1px solid #30363d",borderRadius:8,display:"flex",alignItems:"flex-start",gap:10},feedbackIcon:{color:"#58a6ff",fontSize:14,fontWeight:700,flexShrink:0,marginTop:1},feedbackText:{fontSize:13,lineHeight:1.5,color:"#c9d1d9"},hintSection:{marginTop:10},hintButton:{fontSize:12,color:"#d29922",backgroundColor:"transparent",border:"1px solid #d2992240",borderRadius:6,padding:"4px 10px",cursor:"pointer"},hintText:{fontSize:13,color:"#d29922",margin:"6px 0",lineHeight:1.5},hintNav:{display:"flex",gap:8},terminalArea:{flex:1,display:"flex",flexDirection:"column",backgroundColor:"#0d1117",overflow:"hidden",cursor:"text"},terminalHeader:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",backgroundColor:"#161b22",borderBottom:"1px solid #21262d",flexShrink:0},terminalDots:{display:"flex",gap:6},dot:{width:10,height:10,borderRadius:"50%"},terminalTitle:{fontSize:12,color:"#484f58",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace'},terminalBody:{flex:1,overflow:"auto",padding:"12px 14px",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:13,lineHeight:1.6},cmdLine:{display:"flex",alignItems:"baseline",gap:8,minHeight:22},prompt:{color:"#3fb950",fontWeight:600,whiteSpace:"nowrap",flexShrink:0},cmdText:{color:"#e6edf3"},outputText:{margin:"2px 0 8px 0",fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",whiteSpace:"pre-wrap",wordBreak:"break-word"},cmdInput:{flex:1,backgroundColor:"transparent",border:"none",outline:"none",color:"#e6edf3",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:13,lineHeight:1.6,padding:0,caretColor:"#58a6ff"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5,fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',color:"#3fb950"},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0}};function gI({data:e,getBelt:t}){const[r,i]=j.useState(!1),[s,o]=j.useState([]),c=(e==null?void 0:e.type)||"xp",l=(e==null?void 0:e.xpAwarded)||0,h=(e==null?void 0:e.newBelt)||null;j.useMemo(()=>h&&t?t(h==="string"?0:99999):null,[h,t]);const f=h&&{white:{badge:"⬜",color:"#e6e6e6"},yellow:{badge:"🟨",color:"#f0c040"},green:{badge:"🟩",color:"#3fb950"},blue:{badge:"🟦",color:"#58a6ff"},purple:{badge:"🟪",color:"#bc8cff"},brown:{badge:"🟫",color:"#a0522d"},black:{badge:"⬛",color:"#484f58"}}[h.toLowerCase()]||null;return j.useEffect(()=>{i(!0);const g=["#58a6ff","#3fb950","#f0c040","#bc8cff","#f85149","#d29922","#e6edf3"],y=Array.from({length:c==="perfect-score"?80:c==="level-up"?60:40},(v,C)=>({id:C,x:Math.random()*100,delay:Math.random()*.8,duration:1.5+Math.random()*2,color:g[Math.floor(Math.random()*g.length)],size:4+Math.random()*8,shape:Math.random()>.5?"square":"circle",rotation:Math.random()*360,drift:(Math.random()-.5)*40}));o(y)},[c]),S.jsxs("div",{style:{...Ir.overlay,opacity:r?1:0},children:[S.jsx("div",{style:Ir.confettiContainer,children:s.map(g=>S.jsx("div",{style:{position:"absolute",left:`${g.x}%`,top:"-10px",width:g.size,height:g.shape==="circle"?g.size:g.size*1.5,backgroundColor:g.color,borderRadius:g.shape==="circle"?"50%":"2px",transform:`rotate(${g.rotation}deg)`,animation:`confettiFall ${g.duration}s ${g.delay}s ease-in forwards`,opacity:0}},g.id))}),S.jsxs("div",{style:Ir.content,children:[l>0&&S.jsxs("div",{style:Ir.xpAward,children:["+",l," XP"]},`xp-${l}`),c==="level-up"&&f&&S.jsxs("div",{style:Ir.levelUp,children:[S.jsx("div",{style:{...Ir.beltGlow,boxShadow:`0 0 40px ${f.color}60, 0 0 80px ${f.color}30`,borderColor:f.color},children:S.jsx("span",{style:Ir.beltEmoji,children:f.badge})}),S.jsxs("h2",{style:Ir.levelUpTitle,children:["You earned ",h.charAt(0).toUpperCase()+h.slice(1)," Belt!"]})]}),c==="perfect-score"&&S.jsxs("div",{style:Ir.perfectScore,children:[S.jsx("span",{style:Ir.perfectIcon,children:"⭐"}),S.jsx("h2",{style:Ir.perfectTitle,children:"Perfect Score!"})]}),c==="xp"&&!h&&S.jsx("div",{style:Ir.simpleXP,children:S.jsx("span",{style:Ir.checkIcon,children:"✅"})})]}),S.jsx("style",{children:`
|
|
300
|
-
@keyframes confettiFall {
|
|
301
|
-
0% {
|
|
302
|
-
opacity: 1;
|
|
303
|
-
transform: translateY(0) rotate(0deg);
|
|
304
|
-
}
|
|
305
|
-
100% {
|
|
306
|
-
opacity: 0;
|
|
307
|
-
transform: translateY(100vh) rotate(720deg);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
@keyframes floatUp {
|
|
311
|
-
0% {
|
|
312
|
-
opacity: 0;
|
|
313
|
-
transform: translateY(20px) scale(0.8);
|
|
314
|
-
}
|
|
315
|
-
20% {
|
|
316
|
-
opacity: 1;
|
|
317
|
-
transform: translateY(0) scale(1.1);
|
|
318
|
-
}
|
|
319
|
-
40% {
|
|
320
|
-
transform: translateY(-10px) scale(1);
|
|
321
|
-
}
|
|
322
|
-
100% {
|
|
323
|
-
opacity: 0;
|
|
324
|
-
transform: translateY(-60px) scale(0.9);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
@keyframes pulseGlow {
|
|
328
|
-
0%, 100% {
|
|
329
|
-
transform: scale(1);
|
|
330
|
-
}
|
|
331
|
-
50% {
|
|
332
|
-
transform: scale(1.1);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
@keyframes bounceIn {
|
|
336
|
-
0% {
|
|
337
|
-
opacity: 0;
|
|
338
|
-
transform: scale(0.3);
|
|
339
|
-
}
|
|
340
|
-
50% {
|
|
341
|
-
opacity: 1;
|
|
342
|
-
transform: scale(1.05);
|
|
343
|
-
}
|
|
344
|
-
70% {
|
|
345
|
-
transform: scale(0.95);
|
|
346
|
-
}
|
|
347
|
-
100% {
|
|
348
|
-
transform: scale(1);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
`})]})}const Ir={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(13, 17, 23, 0.75)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,transition:"opacity 0.3s ease",pointerEvents:"none"},confettiContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden",pointerEvents:"none"},content:{display:"flex",flexDirection:"column",alignItems:"center",gap:20,zIndex:1},xpAward:{fontSize:48,fontWeight:800,color:"#3fb950",textShadow:"0 0 20px #3fb95060",animation:"floatUp 2.5s ease-out forwards"},levelUp:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,animation:"bounceIn 0.6s ease-out"},beltGlow:{width:100,height:100,borderRadius:"50%",border:"3px solid",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#21262d",animation:"pulseGlow 1.5s ease-in-out infinite"},beltEmoji:{fontSize:48},levelUpTitle:{fontSize:28,fontWeight:800,color:"#e6edf3",margin:0,textAlign:"center"},perfectScore:{display:"flex",flexDirection:"column",alignItems:"center",gap:12,animation:"bounceIn 0.6s ease-out"},perfectIcon:{fontSize:64,animation:"pulseGlow 1s ease-in-out infinite"},perfectTitle:{fontSize:28,fontWeight:800,color:"#f0c040",margin:0,textShadow:"0 0 20px #f0c04060"},simpleXP:{animation:"bounceIn 0.5s ease-out"},checkIcon:{fontSize:64}},mI=[{name:"/teach",desc:"Socratic teaching — learn any topic through guided dialogue"},{name:"/teach:ask",desc:"Ask questions about any topic covered by learning modules"},{name:"/teach:stats",desc:"View your XP, belt rank, and module progress"},{name:"/teach:level-up",desc:"See your belt roadmap and what to learn next"},{name:"/teach:canvas",desc:"Open the visual canvas — diagrams, quizzes, dashboards"},{name:"/teach:author",desc:"Create a learning module with guided scaffolding"},{name:"/teach:author-pack",desc:"Create a complete module pack with multiple modules"},{name:"/teach:dev",desc:"Developer workflow — run tests, validate, build"}];function yI(){const[e,t]=j.useState(!1),[r,i]=j.useState(null),s=async()=>{t(!0),i(null);try{const c=await(await fetch("/api/open-extension",{method:"POST"})).json();c.ok?i({ok:!0,path:c.path}):i({ok:!1,error:c.error})}catch(o){i({ok:!1,error:o.message})}t(!1)};return S.jsxs("div",{style:re.container,children:[S.jsxs("div",{style:re.hero,children:[S.jsx("h1",{style:re.title,children:"Welcome to ClaudeTeach"}),S.jsx("p",{style:re.subtitle,children:"A Socratic AI teaching platform with gamification and visual learning. Learn through guided dialogue — the AI asks YOU questions."})]}),S.jsxs(Eo,{title:"Getting Started",icon:"1",children:[S.jsx("p",{style:re.text,children:"Launch Claude Code with teaching skills in one command:"}),S.jsx(gp,{children:"claude-teach start"}),S.jsx("p",{style:re.textSmall,children:"This starts the bridge server (for visuals) and launches Claude Code with all teaching skills loaded. You can also pass flags through:"}),S.jsx(gp,{children:'claude-teach start -p "teach me git"'})]}),S.jsxs(Eo,{title:"Teaching Skills",icon:"2",children:[S.jsx("p",{style:re.text,children:"Once Claude Code is running with ClaudeTeach, these skills are available:"}),S.jsx("div",{style:re.skillGrid,children:mI.map(o=>S.jsxs("div",{style:re.skillCard,children:[S.jsx("span",{style:re.skillName,children:o.name}),S.jsx("span",{style:re.skillDesc,children:o.desc})]},o.name))})]}),S.jsxs(Eo,{title:"Chrome Extension",icon:"3",children:[S.jsx("p",{style:re.text,children:'The ClaudeTeach extension adds context-aware learning suggestions, "Teach me this" right-click menus, and real-time connection to the visual canvas.'}),S.jsx("button",{style:{...re.installButton,opacity:e?.7:1},onClick:s,disabled:e,children:e?"Opening...":"Install Extension"}),r&&r.ok&&S.jsxs("div",{style:re.installSteps,children:[S.jsx("p",{style:re.stepTitle,children:"Extension folder opened. Now:"}),S.jsxs("ol",{style:re.stepList,children:[S.jsxs("li",{children:["Enable ",S.jsx("strong",{children:"Developer mode"})," (toggle, top-right of Chrome Extensions)"]}),S.jsxs("li",{children:["Click ",S.jsx("strong",{children:"Load unpacked"})]}),S.jsx("li",{children:"Select the folder that just opened"})]}),S.jsxs("p",{style:re.textSmall,children:["Path: ",r.path]})]}),r&&!r.ok&&S.jsx("p",{style:re.error,children:r.error})]}),S.jsxs(Eo,{title:"Visual Canvas",icon:"4",children:[S.jsx("p",{style:re.text,children:"The bridge server powers browser-based visuals during lessons:"}),S.jsxs("ul",{style:re.featureList,children:[S.jsx("li",{children:"Mermaid diagrams and flowcharts"}),S.jsx("li",{children:"Interactive drag-and-drop quizzes"}),S.jsx("li",{children:"Timed multiple-choice challenges"}),S.jsx("li",{children:"Live code playgrounds"}),S.jsx("li",{children:"XP dashboard with belt progression"})]})]}),S.jsx(Eo,{title:"Quick Start",icon:"5",children:S.jsxs("div",{style:re.quickSteps,children:[S.jsx(gf,{n:"1",text:"Run:",code:"claude-teach start"}),S.jsx(gf,{n:"2",text:"In Claude Code, type:",code:"/teach git"}),S.jsx(gf,{n:"3",text:"Follow the Socratic dialogue — you write the code, the AI guides you."})]})})]})}function Eo({title:e,icon:t,children:r}){return S.jsxs("div",{style:re.section,children:[S.jsxs("div",{style:re.sectionHeader,children:[S.jsx("span",{style:re.sectionIcon,children:t}),S.jsx("h2",{style:re.sectionTitle,children:e})]}),S.jsx("div",{style:re.sectionBody,children:r})]})}function gp({children:e}){return S.jsx("pre",{style:re.codeBlock,children:S.jsx("code",{children:e})})}function gf({n:e,text:t,code:r}){return S.jsxs("div",{style:re.step,children:[S.jsx("span",{style:re.stepNum,children:e}),S.jsxs("div",{children:[S.jsx("span",{style:re.text,children:t}),r&&S.jsx(gp,{children:r})]})]})}const re={container:{maxWidth:720,margin:"0 auto",padding:"20px 0 60px"},hero:{textAlign:"center",marginBottom:40,padding:"32px 0"},title:{fontSize:32,fontWeight:700,color:"#58a6ff",margin:0,letterSpacing:"-0.02em"},subtitle:{fontSize:16,color:"#8b949e",marginTop:12,lineHeight:1.6},section:{marginBottom:32,backgroundColor:"#161b22",borderRadius:12,border:"1px solid #30363d",overflow:"hidden"},sectionHeader:{display:"flex",alignItems:"center",gap:12,padding:"16px 20px",borderBottom:"1px solid #30363d"},sectionIcon:{width:28,height:28,borderRadius:"50%",backgroundColor:"#58a6ff",color:"#0d1117",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:700,flexShrink:0},sectionTitle:{fontSize:18,fontWeight:600,color:"#c9d1d9",margin:0},sectionBody:{padding:"16px 20px"},text:{fontSize:14,color:"#c9d1d9",lineHeight:1.6,margin:"0 0 12px"},textSmall:{fontSize:13,color:"#8b949e",lineHeight:1.5,margin:"8px 0 0"},codeBlock:{backgroundColor:"#0d1117",border:"1px solid #30363d",borderRadius:8,padding:"10px 14px",fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',color:"#3fb950",margin:"8px 0 12px",overflow:"auto"},skillGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:8,marginTop:8},skillCard:{display:"flex",flexDirection:"column",gap:4,padding:"10px 12px",backgroundColor:"#0d1117",borderRadius:8,border:"1px solid #30363d"},skillName:{fontSize:13,fontWeight:600,color:"#58a6ff",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace'},skillDesc:{fontSize:12,color:"#8b949e",lineHeight:1.4},installButton:{padding:"10px 24px",fontSize:14,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:8,cursor:"pointer",transition:"background-color 0.15s ease",marginTop:4},installSteps:{marginTop:16,padding:"12px 16px",backgroundColor:"#0d1117",borderRadius:8,border:"1px solid #30363d"},stepTitle:{fontSize:14,fontWeight:600,color:"#3fb950",margin:"0 0 8px"},stepList:{margin:0,paddingLeft:20,fontSize:13,color:"#c9d1d9",lineHeight:1.8},error:{fontSize:13,color:"#f85149",marginTop:8},featureList:{margin:"8px 0 0",paddingLeft:20,fontSize:14,color:"#c9d1d9",lineHeight:1.8},quickSteps:{display:"flex",flexDirection:"column",gap:16},step:{display:"flex",gap:12,alignItems:"flex-start"},stepNum:{width:24,height:24,borderRadius:"50%",backgroundColor:"#30363d",color:"#58a6ff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,flexShrink:0,marginTop:2}};function xI({data:e}){const t=j.useRef(null),[r,i]=j.useState(300),s=(e==null?void 0:e.html)||"",o=(e==null?void 0:e.title)||"",c=(e==null?void 0:e.module)||null,l=`<!DOCTYPE html>
|
|
352
|
-
<html>
|
|
353
|
-
<head>
|
|
354
|
-
<meta charset="utf-8">
|
|
355
|
-
<style>
|
|
356
|
-
*, *::before, *::after { box-sizing: border-box; }
|
|
357
|
-
body {
|
|
358
|
-
margin: 0;
|
|
359
|
-
padding: 16px;
|
|
360
|
-
background: #0d1117;
|
|
361
|
-
color: #c9d1d9;
|
|
362
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
|
|
363
|
-
font-size: 14px;
|
|
364
|
-
line-height: 1.6;
|
|
365
|
-
overflow-x: hidden;
|
|
366
|
-
}
|
|
367
|
-
img {
|
|
368
|
-
max-width: 100%;
|
|
369
|
-
height: auto;
|
|
370
|
-
border-radius: 8px;
|
|
371
|
-
}
|
|
372
|
-
video, audio {
|
|
373
|
-
max-width: 100%;
|
|
374
|
-
border-radius: 8px;
|
|
375
|
-
}
|
|
376
|
-
iframe {
|
|
377
|
-
border: 0;
|
|
378
|
-
border-radius: 8px;
|
|
379
|
-
}
|
|
380
|
-
a {
|
|
381
|
-
color: #58a6ff;
|
|
382
|
-
text-decoration: none;
|
|
383
|
-
}
|
|
384
|
-
a:hover {
|
|
385
|
-
text-decoration: underline;
|
|
386
|
-
}
|
|
387
|
-
h1, h2, h3 {
|
|
388
|
-
color: #e6edf3;
|
|
389
|
-
margin-top: 0;
|
|
390
|
-
}
|
|
391
|
-
p {
|
|
392
|
-
margin: 8px 0;
|
|
393
|
-
}
|
|
394
|
-
.card {
|
|
395
|
-
background: #161b22;
|
|
396
|
-
border: 1px solid #30363d;
|
|
397
|
-
border-radius: 10px;
|
|
398
|
-
padding: 16px;
|
|
399
|
-
margin: 8px 0;
|
|
400
|
-
}
|
|
401
|
-
.caption {
|
|
402
|
-
color: #8b949e;
|
|
403
|
-
font-size: 13px;
|
|
404
|
-
margin-top: 8px;
|
|
405
|
-
text-align: center;
|
|
406
|
-
}
|
|
407
|
-
</style>
|
|
408
|
-
</head>
|
|
409
|
-
<body>
|
|
410
|
-
${s}
|
|
411
|
-
<script>
|
|
412
|
-
// Send height to parent for auto-resize
|
|
413
|
-
function sendHeight() {
|
|
414
|
-
const h = document.documentElement.scrollHeight;
|
|
415
|
-
window.parent.postMessage({ type: 'iframe-resize', height: h }, '*');
|
|
416
|
-
}
|
|
417
|
-
// Observe size changes
|
|
418
|
-
const ro = new ResizeObserver(sendHeight);
|
|
419
|
-
ro.observe(document.body);
|
|
420
|
-
// Also send on load (for images/iframes)
|
|
421
|
-
window.addEventListener('load', sendHeight);
|
|
422
|
-
sendHeight();
|
|
423
|
-
<\/script>
|
|
424
|
-
</body>
|
|
425
|
-
</html>`;return j.useEffect(()=>{function h(d){var f;((f=d.data)==null?void 0:f.type)==="iframe-resize"&&typeof d.data.height=="number"&&i(Math.max(100,Math.min(d.data.height+32,2e3)))}return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]),e?S.jsxs("div",{style:pn.container,children:[(c||o)&&S.jsxs("div",{style:pn.breadcrumb,children:[c&&S.jsx("span",{style:pn.breadcrumbModule,children:c}),c&&o&&S.jsx("span",{style:pn.breadcrumbSep,children:"/"}),o&&S.jsx("span",{style:pn.breadcrumbTitle,children:o})]}),S.jsx("div",{style:pn.iframeWrapper,children:S.jsx("iframe",{ref:t,srcDoc:l,sandbox:"allow-scripts allow-same-origin",style:{...pn.iframe,height:r},title:o||"Rich content"})})]}):S.jsxs("div",{style:pn.empty,children:[S.jsx("div",{style:pn.emptyIcon,children:"</>"}),S.jsx("p",{style:pn.emptyTitle,children:"HTML Content"}),S.jsx("p",{style:pn.emptySubtext,children:"Rich media and custom content will appear here during lessons."})]})}const pn={container:{display:"flex",flexDirection:"column",gap:16,maxWidth:1e3,margin:"0 auto"},breadcrumb:{display:"flex",alignItems:"center",gap:8,fontSize:13,color:"#8b949e"},breadcrumbModule:{color:"#58a6ff",fontWeight:500},breadcrumbSep:{color:"#484f58"},breadcrumbTitle:{color:"#c9d1d9"},iframeWrapper:{backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:12,overflow:"hidden"},iframe:{width:"100%",border:"none",display:"block",transition:"height 0.2s ease"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',color:"#58a6ff"},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0}};function vI({data:e,sendEvent:t}){const[r,i]=j.useState(!1),[s,o]=j.useState(null);j.useEffect(()=>{i(!1),o(null)},[e]);const c=j.useCallback(d=>{const f=d.accuracy>=1?3:d.accuracy>=.7?2:d.accuracy>=.4?1:0,g={...d,stars:f};o(g),i(!0),t("event:game-result",g)},[t]),l=j.useCallback(()=>{i(!1),o(null)},[]);if(!e)return S.jsxs("div",{style:it.empty,children:[S.jsx("div",{style:it.emptyIcon,children:"🎮"}),S.jsx("p",{style:it.emptyTitle,children:"Game Mode"}),S.jsx("p",{style:it.emptySubtext,children:"Interactive games will appear here to practice module topics."})]});if(r&&s)return S.jsx(TI,{result:s,gameTitle:e.title,onPlayAgain:l});const{gameType:h}=e;switch(h){case"speed-round":return S.jsx(bI,{data:e,onEnd:c});case"bug-hunt":return S.jsx(CI,{data:e,onEnd:c});case"classify":return S.jsx(wI,{data:e,onEnd:c});case"scenario":return S.jsx(kI,{data:e,onEnd:c});case"command-sprint":return S.jsx(SI,{data:e,onEnd:c});case"memory-match":return S.jsx(_I,{data:e,onEnd:c});default:return S.jsx("div",{style:it.errorBox,children:S.jsxs("p",{children:["Unknown game type: ",h]})})}}function bI({data:e,onEnd:t}){var et;const{rounds:r=[],title:i}=e,[s,o]=j.useState(0),[c,l]=j.useState(3),[h,d]=j.useState(0),[f,g]=j.useState(0),[m,y]=j.useState(0),[v,C]=j.useState(((et=r[0])==null?void 0:et.timeLimit)||15),[k,_]=j.useState(null),[T,E]=j.useState(null),[B]=j.useState(Date.now()),A=j.useRef(null),M=r[s];j.useEffect(()=>{if(!(!M||c<=0))return C(M.timeLimit||15),_(null),E(null),A.current=setInterval(()=>{C(V=>V<=1?(clearInterval(A.current),0):V-1)},1e3),()=>clearInterval(A.current)},[s,M,c]),j.useEffect(()=>{v===0&&k===null&&M&&R(-1)},[v]);function R(V){if(k!==null)return;_(V),clearInterval(A.current);const nt=V===M.answer;E(nt?"correct":"wrong");const J=nt?f+1:0,Y=J>=5?3:J>=3?2:1,W=nt?100*Y:0,N=nt?c:c-1;d(q=>q+W),g(J),y(q=>Math.max(q,J)),l(N),setTimeout(()=>{if(N<=0){const q=s+(nt?1:0);t({gameType:"speed-round",score:h+W,maxScore:r.length*300,accuracy:q/r.length,timeMs:Date.now()-B,streakMax:Math.max(m,J),correct:q,total:r.length});return}if(s+1>=r.length){const q=s+(nt?1:0);t({gameType:"speed-round",score:h+W,maxScore:r.length*300,accuracy:q/r.length,timeMs:Date.now()-B,streakMax:Math.max(m,J),correct:q,total:r.length});return}o(q=>q+1)},800)}if(!M)return null;const O=v/(M.timeLimit||15)*100,tt=v>10?"#3fb950":v>5?"#d29922":"#f85149";return S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:i||"Speed Round"}),S.jsxs("span",{style:it.roundCounter,children:[s+1," / ",r.length]})]}),S.jsxs("div",{style:it.statusBar,children:[S.jsx("div",{style:it.livesDisplay,children:Array.from({length:3},(V,nt)=>S.jsx("span",{style:{opacity:nt<c?1:.2,fontSize:20},children:"❤️"},nt))}),f>=3&&S.jsxs("span",{style:it.streakBadge,children:[f>=5?"3x":"2x"," streak!"]}),S.jsxs("span",{style:it.scoreDisplay,children:[h," pts"]})]}),S.jsx("div",{style:it.timerBar,children:S.jsx("div",{style:{...it.timerFill,width:`${O}%`,backgroundColor:tt}})}),S.jsx("h2",{style:it.question,children:M.question}),S.jsx("div",{style:it.choiceGrid,children:(M.options||[]).map((V,nt)=>{const J=typeof V=="string"?V:V.label,Y=k===nt,W=nt===M.answer,N=k!==null;let q="#30363d",D="#161b22";return N&&W?(q="#3fb950",D="#3fb95018"):N&&Y&&!W?(q="#f85149",D="#f8514918"):Y&&(q="#58a6ff"),S.jsxs("button",{onClick:()=>R(nt),disabled:k!==null,style:{...it.choiceButton,borderColor:q,backgroundColor:D,cursor:k!==null?"default":"pointer",opacity:N&&!Y&&!W?.4:1,animation:N&&Y&&!W?"shake 0.3s ease":void 0},children:[S.jsx("span",{style:it.choiceLetter,children:String.fromCharCode(65+nt)}),S.jsx("span",{style:it.choiceText,children:J})]},nt)})})]})}function CI({data:e,onEnd:t}){const{snippets:r=[],title:i}=e,[s,o]=j.useState(0),[c,l]=j.useState(null),[h,d]=j.useState(!1),[f,g]=j.useState(!1),m=j.useRef(0),[y]=j.useState(Date.now()),v=r[s];function C(T){c===null&&(l(T),T===v.bugLine&&(m.current+=1),d(!0))}function k(){const T=m.current;if(s+1>=r.length){t({gameType:"bug-hunt",score:T,maxScore:r.length,accuracy:T/r.length,timeMs:Date.now()-y,streakMax:0,correct:T,total:r.length});return}o(E=>E+1),l(null),d(!1),g(!1)}if(!v)return null;const _=v.code.split(`
|
|
426
|
-
`);return S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:i||"Bug Hunt"}),S.jsxs("span",{style:it.roundCounter,children:[s+1," / ",r.length]})]}),S.jsx("p",{style:it.hint,children:"Find the buggy line. Click to select."}),!f&&c===null&&v.hint&&S.jsx("button",{onClick:()=>g(!0),style:it.hintButton,children:"Show Hint"}),f&&c===null&&S.jsx("div",{style:it.hintBox,children:S.jsx("p",{style:it.hintText,children:v.hint})}),S.jsx("div",{style:it.codeBlock,children:_.map((T,E)=>{const B=E+1,A=c===B,M=B===v.bugLine,R=c!==null;let O="transparent";return R&&M?O="#3fb95020":R&&A&&!M&&(O="#f8514920"),S.jsxs("div",{onClick:()=>C(B),style:{...it.codeLine,backgroundColor:O,cursor:c!==null?"default":"pointer",borderLeft:A?"3px solid "+(M?"#3fb950":"#f85149"):R&&M?"3px solid #3fb950":"3px solid transparent"},children:[S.jsx("span",{style:it.lineNumber,children:B}),S.jsx("span",{style:it.lineContent,children:T||" "})]},E)})}),h&&S.jsxs("div",{style:{...it.explanationBox,borderColor:c===v.bugLine?"#3fb950":"#f85149"},children:[S.jsx("p",{style:it.explanationLabel,children:c===v.bugLine?"Correct!":`Wrong — the bug is on line ${v.bugLine}`}),S.jsx("p",{style:it.explanationText,children:v.explanation}),S.jsx("button",{onClick:k,style:it.nextButton,children:s+1>=r.length?"See Results":"Next Snippet"})]})]})}function wI({data:e,onEnd:t}){const{categories:r=[],items:i=[],title:s}=e,[o]=j.useState(()=>[...i].sort(()=>Math.random()-.5)),[c,l]=j.useState(0),[h,d]=j.useState(3),[f,g]=j.useState(0),[m,y]=j.useState(null),[v]=j.useState(Date.now()),C=o[c];function k(T){if(!C||m)return;const E=C.category===T;y({category:T,correct:E}),E?g(B=>B+1):d(B=>B-1),setTimeout(()=>{if(y(null),(E?h:h-1)<=0||c+1>=o.length){const A=f+(E?1:0);t({gameType:"classify",score:A,maxScore:o.length,accuracy:A/o.length,timeMs:Date.now()-v,streakMax:0,correct:A,total:o.length});return}l(A=>A+1)},600)}if(!C)return null;const _=["#58a6ff","#3fb950","#d29922","#bc8cff"];return S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:s||"Classify"}),S.jsxs("span",{style:it.roundCounter,children:[c+1," / ",o.length]})]}),S.jsxs("div",{style:it.statusBar,children:[S.jsx("div",{style:it.livesDisplay,children:Array.from({length:3},(T,E)=>S.jsx("span",{style:{opacity:E<h?1:.2,fontSize:20},children:"❤️"},E))}),S.jsxs("span",{style:it.scoreDisplay,children:[f," / ",o.length]})]}),S.jsx("div",{style:it.bucketsRow,children:r.map((T,E)=>{const B=typeof T=="string"?T:T.name,A=typeof T=="object"&&T.color||_[E%_.length],M=m&&m.category===B,R=M?m.correct?"#3fb95030":"#f8514930":`${A}10`;return S.jsx("button",{onClick:()=>k(B),style:{...it.bucket,borderColor:A,backgroundColor:R,transform:M&&!m.correct?"translateX(4px)":"none",transition:"all 0.2s ease"},children:S.jsx("span",{style:{color:A,fontWeight:700,fontSize:14},children:B})},B)})}),S.jsx("div",{style:it.itemCard,children:S.jsx("p",{style:it.itemText,children:C.text})})]})}function kI({data:e,onEnd:t}){var B;const{steps:r=[],title:i,startHealth:s=5}=e,[o,c]=j.useState(((B=r[0])==null?void 0:B.id)||0),[l,h]=j.useState(s),[d,f]=j.useState(null),[g,m]=j.useState(0),[y,v]=j.useState(0),[C]=j.useState(Date.now()),k=r.find(A=>A.id===o)||r[g];function _(A,M){if(d!==null)return;f(M);const R=Math.max(0,l+(A.health||0));h(R),A.health>=0&&v(O=>O+1),setTimeout(()=>{if(R<=0||!A.next||A.next==="end"){const O=g+1;t({gameType:"scenario",score:y+(A.health>=0?1:0),maxScore:O,accuracy:(y+(A.health>=0?1:0))/O,timeMs:Date.now()-C,streakMax:0,correct:y+(A.health>=0?1:0),total:O,healthRemaining:R});return}c(A.next),m(O=>O+1),f(null)},1800)}if(!k)return null;const T=l/s*100,E=T>60?"#3fb950":T>30?"#d29922":"#f85149";return S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:i||"Scenario"}),S.jsxs("span",{style:it.roundCounter,children:["Step ",g+1]})]}),S.jsx("div",{style:it.healthBarOuter,children:S.jsx("div",{style:{...it.healthBarInner,width:`${T}%`,backgroundColor:E}})}),S.jsxs("div",{style:{textAlign:"right",fontSize:12,color:"#8b949e",marginBottom:16},children:["Health: ",l," / ",s]}),S.jsx("div",{style:it.scenarioPanel,children:S.jsx("p",{style:it.situationText,children:k.situation})}),S.jsx("div",{style:it.choiceGrid,children:(k.choices||[]).map((A,M)=>{const R=d===M;return S.jsxs("div",{children:[S.jsx("button",{onClick:()=>_(A,M),disabled:d!==null,style:{...it.scenarioChoice,borderColor:R?"#58a6ff":"#30363d",backgroundColor:R?"#58a6ff18":"#161b22",cursor:d!==null?"default":"pointer",opacity:d!==null&&!R?.4:1},children:A.text}),R&&S.jsxs("div",{style:{...it.consequenceBox,borderColor:A.health>=0?"#3fb950":"#f85149"},children:[S.jsx("p",{style:it.consequenceText,children:A.consequence}),A.health!==0&&S.jsxs("span",{style:{color:A.health>0?"#3fb950":"#f85149",fontWeight:700,fontSize:13},children:[A.health>0?"+":"",A.health," health"]})]})]},M)})})]})}function SI({data:e,onEnd:t}){var E;const{challenges:r=[],title:i}=e,[s,o]=j.useState(0),[c,l]=j.useState(""),[h,d]=j.useState(null),[f,g]=j.useState(0),[m]=j.useState(Date.now()),[y,v]=j.useState(((E=r[0])==null?void 0:E.timeLimit)||30),C=j.useRef(null),k=j.useRef(null),_=r[s];j.useEffect(()=>(l(""),d(null),v((_==null?void 0:_.timeLimit)||30),C.current&&C.current.focus(),k.current=setInterval(()=>{v(B=>B<=1?(clearInterval(k.current),0):B-1)},1e3),()=>clearInterval(k.current)),[s]),j.useEffect(()=>{y===0&&h===null&&_&&(clearInterval(k.current),d("wrong"),setTimeout(()=>{if(s+1>=r.length){t({gameType:"command-sprint",score:f,maxScore:r.length,accuracy:f/r.length,timeMs:Date.now()-m,streakMax:0,correct:f,total:r.length});return}o(B=>B+1)},1e3))},[y]);function T(B){if(B.preventDefault(),h!==null||!_)return;clearInterval(k.current);const A=c.trim(),R=[_.answer,..._.alternates||[]].some(O=>O.toLowerCase()===A.toLowerCase());d(R?"correct":"wrong"),R&&g(O=>O+1),setTimeout(()=>{if(s+1>=r.length){const O=f+(R?1:0);t({gameType:"command-sprint",score:O,maxScore:r.length,accuracy:O/r.length,timeMs:Date.now()-m,streakMax:0,correct:O,total:r.length});return}o(O=>O+1)},1e3)}return _?S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:i||"Command Sprint"}),S.jsxs("span",{style:it.roundCounter,children:[s+1," / ",r.length]})]}),S.jsx("div",{style:it.timerBar,children:S.jsx("div",{style:{...it.timerFill,width:`${y/(_.timeLimit||30)*100}%`,backgroundColor:y>10?"#3fb950":y>5?"#d29922":"#f85149"}})}),S.jsx("div",{style:it.sprintPrompt,children:S.jsx("p",{style:it.sprintTask,children:_.prompt})}),S.jsxs("form",{onSubmit:T,style:it.sprintForm,children:[S.jsxs("div",{style:{...it.sprintInputWrapper,borderColor:h==="correct"?"#3fb950":h==="wrong"?"#f85149":"#58a6ff"},children:[S.jsx("span",{style:it.sprintCaret,children:">"}),S.jsx("input",{ref:C,type:"text",value:c,onChange:B=>l(B.target.value),disabled:h!==null,placeholder:"Type your command...",autoComplete:"off",autoCapitalize:"off",spellCheck:!1,style:it.sprintInput})]}),h===null&&S.jsx("button",{type:"submit",style:it.submitButton,children:"Submit"})]}),h==="wrong"&&S.jsxs("div",{style:it.sprintAnswer,children:[S.jsx("span",{style:{color:"#f85149"},children:"Expected: "}),S.jsx("code",{style:it.sprintCode,children:_.answer})]}),h==="correct"&&S.jsx("div",{style:{...it.sprintAnswer,borderColor:"#3fb950"},children:S.jsx("span",{style:{color:"#3fb950"},children:"Correct!"})})]}):null}function _I({data:e,onEnd:t}){const{pairs:r=[],title:i}=e,[s,o]=j.useState([]),[c,l]=j.useState([]),[h,d]=j.useState(new Set),[f,g]=j.useState(0),[m]=j.useState(Date.now()),y=j.useRef(!1);j.useEffect(()=>{const k=[];r.forEach((_,T)=>{k.push({id:`t-${T}`,pairId:T,text:_.term,side:"term"}),k.push({id:`d-${T}`,pairId:T,text:_.definition,side:"def"})});for(let _=k.length-1;_>0;_--){const T=Math.floor(Math.random()*(_+1));[k[_],k[T]]=[k[T],k[_]]}o(k),l([]),d(new Set),g(0)},[r]);function v(k){if(y.current||c.includes(k)||h.has(s[k].pairId))return;const _=[...c,k];if(l(_),_.length===2){g(B=>B+1),y.current=!0;const[T,E]=_;if(s[T].pairId===s[E].pairId){const B=new Set(h);B.add(s[T].pairId),setTimeout(()=>{if(d(B),l([]),y.current=!1,B.size===r.length){const A=f+1,M=r.length;t({gameType:"memory-match",score:Math.max(0,M*2-A),maxScore:M,accuracy:Math.min(1,M/A),timeMs:Date.now()-m,streakMax:0,correct:B.size,total:r.length,moves:A})}},500)}else setTimeout(()=>{l([]),y.current=!1},800)}}const C=s.length<=12?4:6;return S.jsxs("div",{style:it.gameContainer,children:[S.jsxs("div",{style:it.gameHeader,children:[S.jsx("span",{style:it.gameTitle,children:i||"Memory Match"}),S.jsxs("span",{style:it.roundCounter,children:["Moves: ",f]})]}),S.jsx("p",{style:it.hint,children:"Flip cards to find matching term-definition pairs"}),S.jsx("div",{style:{...it.cardGrid,gridTemplateColumns:`repeat(${C}, 1fr)`},children:s.map((k,_)=>{const T=c.includes(_),E=h.has(k.pairId),B=T||E;return S.jsx("button",{onClick:()=>v(_),disabled:E,style:{...it.memoryCard,backgroundColor:E?"#3fb95015":B?"#161b22":"#21262d",borderColor:E?"#3fb950":B?"#58a6ff":"#30363d",cursor:E?"default":"pointer",transform:"rotateY(0deg)"},children:B?S.jsx("span",{style:{...it.cardText,color:k.side==="term"?"#58a6ff":"#c9d1d9",fontSize:k.text.length>30?11:13},children:k.text}):S.jsx("span",{style:it.cardBack,children:"?"})},k.id)})}),S.jsxs("div",{style:{textAlign:"center",marginTop:16,fontSize:13,color:"#8b949e"},children:[h.size," / ",r.length," pairs found"]})]})}function TI({result:e,gameTitle:t,onPlayAgain:r}){const{score:i=0,maxScore:s=1,accuracy:o=0,timeMs:c=0,streakMax:l=0,stars:h=0,correct:d=0,total:f=0,moves:g}=e,m=Math.round(c/1e3),y=Math.floor(m/60),v=m%60,C=y>0?`${y}m ${v}s`:`${v}s`,k=Math.round(o*100),_=Array.from({length:3},(T,E)=>E<h?"⭐":"☆").join(" ");return S.jsx("div",{style:it.gameContainer,children:S.jsxs("div",{style:it.resultsCard,children:[S.jsx("h2",{style:it.resultsTitle,children:t||"Game Complete"}),S.jsx("div",{style:it.starsRow,children:_}),S.jsxs("div",{style:it.resultsGrid,children:[S.jsxs("div",{style:it.resultStat,children:[S.jsxs("span",{style:it.resultValue,children:[k,"%"]}),S.jsx("span",{style:it.resultLabel,children:"Accuracy"})]}),S.jsxs("div",{style:it.resultStat,children:[S.jsxs("span",{style:it.resultValue,children:[d,"/",f]}),S.jsx("span",{style:it.resultLabel,children:"Correct"})]}),S.jsxs("div",{style:it.resultStat,children:[S.jsx("span",{style:it.resultValue,children:C}),S.jsx("span",{style:it.resultLabel,children:"Time"})]}),l>0&&S.jsxs("div",{style:it.resultStat,children:[S.jsx("span",{style:it.resultValue,children:l}),S.jsx("span",{style:it.resultLabel,children:"Best Streak"})]}),g!==void 0&&S.jsxs("div",{style:it.resultStat,children:[S.jsx("span",{style:it.resultValue,children:g}),S.jsx("span",{style:it.resultLabel,children:"Moves"})]})]}),S.jsxs("div",{style:it.xpEarned,children:["+",h===3?40:25," XP"]}),S.jsx("button",{onClick:r,style:it.playAgainButton,children:"Play Again"})]})})}const it={gameContainer:{maxWidth:700,margin:"0 auto",display:"flex",flexDirection:"column",gap:16},gameHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},gameTitle:{fontSize:20,fontWeight:700,color:"#e6edf3"},roundCounter:{fontSize:14,color:"#8b949e",padding:"4px 10px",backgroundColor:"#21262d",borderRadius:6},statusBar:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},livesDisplay:{display:"flex",gap:4},streakBadge:{fontSize:13,fontWeight:700,color:"#d29922",padding:"2px 8px",backgroundColor:"#d2992218",borderRadius:4},scoreDisplay:{fontSize:16,fontWeight:700,color:"#58a6ff"},timerBar:{height:4,backgroundColor:"#21262d",borderRadius:2,overflow:"hidden"},timerFill:{height:"100%",borderRadius:2,transition:"width 1s linear, background-color 0.3s ease"},question:{fontSize:20,fontWeight:700,color:"#e6edf3",margin:0,lineHeight:1.4},hint:{fontSize:13,color:"#8b949e",margin:0},choiceGrid:{display:"flex",flexDirection:"column",gap:10},choiceButton:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",border:"1px solid",borderRadius:10,textAlign:"left",transition:"border-color 0.15s ease, background-color 0.15s ease, opacity 0.3s ease",width:"100%",fontSize:14,color:"#c9d1d9",fontFamily:"inherit",cursor:"pointer"},choiceLetter:{width:28,height:28,borderRadius:"50%",backgroundColor:"#21262d",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:"#8b949e",flexShrink:0},choiceText:{flex:1},submitButton:{alignSelf:"center",padding:"10px 28px",fontSize:14,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:8,cursor:"pointer"},nextButton:{padding:"8px 20px",fontSize:13,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:6,cursor:"pointer",marginTop:8},errorBox:{textAlign:"center",padding:40,color:"#f85149",fontSize:16},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,gap:12},emptyIcon:{fontSize:48,opacity:.5},emptyTitle:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0},emptySubtext:{fontSize:14,color:"#8b949e",margin:0},hintButton:{alignSelf:"flex-start",padding:"6px 14px",fontSize:13,fontWeight:600,color:"#d29922",backgroundColor:"transparent",border:"1px solid #d29922",borderRadius:6,cursor:"pointer",fontFamily:"inherit"},hintBox:{padding:"12px 16px",border:"1px solid #d29922",borderRadius:8,backgroundColor:"#d2992210"},hintText:{color:"#d29922",fontSize:14,margin:0,lineHeight:1.5},codeBlock:{backgroundColor:"#0d1117",border:"1px solid #30363d",borderRadius:10,overflow:"hidden",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:14,lineHeight:1.6},codeLine:{display:"flex",alignItems:"flex-start",padding:"2px 12px 2px 0",transition:"background-color 0.15s ease"},lineNumber:{width:40,textAlign:"right",paddingRight:12,color:"#484f58",userSelect:"none",flexShrink:0},lineContent:{color:"#c9d1d9",whiteSpace:"pre"},explanationBox:{padding:"16px 20px",border:"1px solid",borderRadius:8,backgroundColor:"#161b22"},explanationLabel:{fontSize:15,fontWeight:700,color:"#e6edf3",margin:"0 0 8px 0"},explanationText:{fontSize:14,color:"#8b949e",margin:0,lineHeight:1.5},bucketsRow:{display:"flex",gap:10,justifyContent:"center",flexWrap:"wrap"},bucket:{flex:"1 1 120px",maxWidth:200,padding:"16px 12px",border:"2px solid",borderRadius:10,backgroundColor:"transparent",cursor:"pointer",textAlign:"center",fontFamily:"inherit",transition:"all 0.2s ease"},itemCard:{padding:"24px 20px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:10,textAlign:"center"},itemText:{fontSize:16,color:"#e6edf3",margin:0,lineHeight:1.5},healthBarOuter:{height:8,backgroundColor:"#21262d",borderRadius:4,overflow:"hidden"},healthBarInner:{height:"100%",borderRadius:4,transition:"width 0.5s ease, background-color 0.3s ease"},scenarioPanel:{padding:"24px 20px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:10},situationText:{fontSize:16,color:"#e6edf3",margin:0,lineHeight:1.6},scenarioChoice:{display:"block",width:"100%",padding:"14px 18px",border:"1px solid",borderRadius:10,fontSize:14,color:"#c9d1d9",fontFamily:"inherit",textAlign:"left",transition:"border-color 0.15s ease, background-color 0.15s ease, opacity 0.3s ease"},consequenceBox:{margin:"8px 0 0 16px",padding:"12px 16px",border:"1px solid",borderRadius:8,backgroundColor:"#0d1117"},consequenceText:{fontSize:14,color:"#c9d1d9",margin:0,lineHeight:1.5},sprintPrompt:{padding:"20px 24px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:10,textAlign:"center"},sprintTask:{fontSize:18,fontWeight:600,color:"#e6edf3",margin:0,lineHeight:1.4},sprintForm:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},sprintInputWrapper:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"12px 16px",backgroundColor:"#0d1117",border:"2px solid",borderRadius:8,transition:"border-color 0.2s ease"},sprintCaret:{color:"#3fb950",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontWeight:700,fontSize:16,flexShrink:0},sprintInput:{flex:1,background:"none",border:"none",outline:"none",color:"#c9d1d9",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',fontSize:15},sprintAnswer:{padding:"12px 16px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:8,fontSize:14,textAlign:"center"},sprintCode:{fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',color:"#58a6ff"},cardGrid:{display:"grid",gap:10,justifyContent:"center"},memoryCard:{aspectRatio:"1 / 1",minHeight:80,display:"flex",alignItems:"center",justifyContent:"center",padding:8,border:"2px solid",borderRadius:10,fontFamily:"inherit",transition:"all 0.2s ease",cursor:"pointer"},cardText:{textAlign:"center",lineHeight:1.3,wordBreak:"break-word"},cardBack:{fontSize:24,fontWeight:700,color:"#484f58"},resultsCard:{maxWidth:500,margin:"40px auto 0",padding:"40px 32px",backgroundColor:"#161b22",border:"1px solid #30363d",borderRadius:16,textAlign:"center",display:"flex",flexDirection:"column",gap:20},resultsTitle:{fontSize:24,fontWeight:700,color:"#e6edf3",margin:0},starsRow:{fontSize:32,letterSpacing:8},resultsGrid:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:24},resultStat:{display:"flex",flexDirection:"column",alignItems:"center",gap:4},resultValue:{fontSize:28,fontWeight:700,color:"#58a6ff"},resultLabel:{fontSize:12,color:"#8b949e",textTransform:"uppercase",letterSpacing:1},xpEarned:{fontSize:20,fontWeight:700,color:"#3fb950",padding:"8px 16px",backgroundColor:"#3fb95015",borderRadius:8,alignSelf:"center"},playAgainButton:{padding:"12px 32px",fontSize:15,fontWeight:600,color:"#ffffff",backgroundColor:"#238636",border:"1px solid #2ea043",borderRadius:8,cursor:"pointer",alignSelf:"center"}},Je={dashboard:"dashboard",canvas:"canvas",quiz:"quiz",playground:"playground",terminal:"terminal",game:"game",html:"html",welcome:"welcome"},Fu=[{name:"White",minXP:0,badge:"⬜",color:"#e6e6e6"},{name:"Yellow",minXP:50,badge:"🟨",color:"#f0c040"},{name:"Green",minXP:150,badge:"🟩",color:"#3fb950"},{name:"Blue",minXP:400,badge:"🟦",color:"#58a6ff"},{name:"Purple",minXP:800,badge:"🟪",color:"#bc8cff"},{name:"Brown",minXP:1500,badge:"🟫",color:"#a0522d"},{name:"Black",minXP:3e3,badge:"⬛",color:"#484f58"}];function mf(e){let t=Fu[0];for(const r of Fu)e>=r.minXP&&(t=r);return t}function LI(e){for(const t of Fu)if(e<t.minXP)return t;return null}function EI(){var Mr;const[e,t]=j.useState(null),[r,i]=j.useState(null),[s,o]=j.useState(null),[c,l]=j.useState(null),[h,d]=j.useState(null),[f,g]=j.useState(null),[m,y]=j.useState(null),[v,C]=j.useState(null),[k,_]=j.useState(null),[T,E]=j.useState(null),[B,A]=j.useState([]),[M,R]=j.useState(""),[O,tt]=j.useState([]),[et,V]=j.useState("idle"),[nt,J]=j.useState(null),[Y,W]=j.useState([]),[N,q]=j.useState(null),D=j.useRef(""),Z=j.useRef([]),Q=j.useRef(!1),F=j.useCallback(Et=>{t(Et)},[]),K=j.useCallback(()=>{t(null)},[]),ut=j.useCallback(Et=>{var ce,or,yr,lr,xr,zn,Hi,Nn,Jr,Nr,ze,tn,ai;if(!(!Et||!Et.type)){switch(Et.type){case"canvas:dashboard":i(Et.payload),F(Je.dashboard);break;case"canvas:diagram":o(Et.payload),F(Je.canvas);break;case"canvas:quiz":l(Et.payload),F(Je.quiz);break;case"canvas:code":d(Et.payload),F(Je.playground);break;case"canvas:terminal":g(Et.payload),F(Je.terminal);break;case"canvas:game":y(Et.payload),F(Je.game);break;case"canvas:html":C(Et.payload),F(Je.html);break;case"canvas:welcome":F(Je.welcome);break;case"canvas:celebrate":_(Et.payload),setTimeout(()=>_(null),3e3);break;case"chat:stream":D.current+=((ce=Et.payload)==null?void 0:ce.delta)||"",R(D.current),V("streaming");break;case"chat:assistant":{const Ne=((or=Et.payload)==null?void 0:or.text)||D.current;Ne&&A(ge=>{const je=ge[ge.length-1];return je&&je.role==="assistant"&&je._pending?[...ge.slice(0,-1),{role:"assistant",text:Ne,tools:je.tools}]:[...ge,{role:"assistant",text:Ne,tools:[]}]}),D.current="",R("");break}case"chat:tool-use":{const Ne={toolName:(yr=Et.payload)==null?void 0:yr.toolName,toolId:(lr=Et.payload)==null?void 0:lr.toolId,input:(xr=Et.payload)==null?void 0:xr.input};Z.current=[...Z.current,Ne],tt(Z.current);break}case"chat:tool-result":{const Ne=(zn=Et.payload)==null?void 0:zn.toolId;Z.current=Z.current.map(ge=>{var je;return ge.toolId===Ne?{...ge,output:(je=Et.payload)==null?void 0:je.output}:ge}),tt(Z.current),A(ge=>{const je=ge[ge.length-1];if(je&&je.role==="assistant"){const wn=Z.current.find(en=>en.toolId===Ne);if(wn){const en=[...je.tools||[],wn];return[...ge.slice(0,-1),{...je,tools:en}]}}return ge});break}case"chat:status":V(((Hi=Et.payload)==null?void 0:Hi.status)||"idle"),(Nn=Et.payload)!=null&&Nn.sessionId&&J(Et.payload.sessionId),((Jr=Et.payload)==null?void 0:Jr.status)==="idle"&&(Z.current=[],tt([]),D.current="",R("")),((Nr=Et.payload)==null?void 0:Nr.status)==="error"&&q(Et.payload.message),(((ze=Et.payload)==null?void 0:ze.status)==="started"||((tn=Et.payload)==null?void 0:tn.status)==="resumed")&&q(null);break}(ai=Et.payload)!=null&&ai.module&&E(Et.payload.module)}},[F]),{status:pt,clientId:dt,sendEvent:ht,sendChatMessage:yt,stopChatGeneration:Lt}=i_(ut),Pt=j.useCallback(Et=>{A(ce=>[...ce,{role:"user",text:Et}]),D.current="",R(""),(!nt||nt==="pending")&&!Q.current?(Q.current=!0,fetch("http://localhost:3456/api/chat/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:dt})}).then(ce=>ce.json()).then(ce=>{Q.current=!1,ce.sessionId&&J(ce.sessionId),yt(Et,ce.sessionId)}).catch(()=>{Q.current=!1,yt(Et)})):yt(Et,nt)},[nt,dt,yt]),Wt=j.useCallback(()=>{A([]),R(""),Z.current=[],tt([]),V("idle"),J(null),q(null),D.current="",Q.current=!1},[]),ae=j.useCallback(Et=>{Wt(),fetch("http://localhost:3456/api/chat/resume",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:Et,clientId:dt})}).then(ce=>ce.json()).then(ce=>{ce.sessionId&&J(ce.sessionId)}).catch(()=>{})},[Wt,dt]);j.useEffect(()=>{pt!=="connected"||!dt||nt||Q.current||(Q.current=!0,fetch("http://localhost:3456/api/chat/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:dt})}).then(Et=>Et.json()).then(Et=>{Q.current=!1,J(Et.sessionId||"pending")}).catch(()=>{Q.current=!1,J("pending")}))},[pt,dt]),j.useEffect(()=>{pt==="connected"&&fetch("http://localhost:3456/api/chat/sessions").then(Et=>Et.json()).then(Et=>{Et.sessions&&W(Et.sessions)}).catch(()=>{})},[pt]),j.useEffect(()=>{pt==="connected"&&fetch("http://localhost:3456/api/progress").then(Et=>Et.ok?Et.json():null).then(Et=>{var or,yr;if(!Et||r)return;const ce=Object.entries(Et.modules||{}).map(([lr,xr])=>({slug:lr,...xr}));i({progress:{xp:((or=Et.user)==null?void 0:or.xp)||0,belt:(yr=Et.user)==null?void 0:yr.belt,modules:ce}})}).catch(()=>{})},[pt]);const Ve=((Mr=r==null?void 0:r.progress)==null?void 0:Mr.xp)??0,_e=mf(Ve),ar=e!==null;return S.jsxs("div",{style:qe.container,children:[S.jsxs("header",{style:qe.header,children:[S.jsxs("div",{style:qe.headerLeft,children:[S.jsx("span",{style:qe.logo,children:"ClaudeTeach"}),T&&S.jsx("span",{style:qe.moduleName,children:T})]}),S.jsxs("div",{style:qe.headerRight,children:[S.jsx("button",{style:qe.headerButton,onClick:Wt,children:"New Chat"}),S.jsxs("span",{style:qe.beltDisplay,children:[_e.badge," ",_e.name]}),S.jsx("span",{style:{...qe.connectionDot,backgroundColor:N?"#f85149":pt==="connected"?"#3fb950":pt==="connecting"?"#d29922":"#f85149"}}),S.jsx("span",{style:qe.connectionLabel,children:N?"Error":pt==="connected"?"Online":pt==="connecting"?"Connecting...":"Offline"})]})]}),N&&S.jsxs("div",{style:qe.errorBanner,children:[S.jsxs("span",{children:["Connection to Claude lost: ",N]}),S.jsx("button",{style:qe.reconnectButton,onClick:()=>{q(null),Wt()},children:"Reconnect"})]}),S.jsxs("div",{style:qe.splitPane,children:[S.jsx("div",{style:{...qe.chatPane,width:ar?"40%":"100%"},children:S.jsx(cT,{messages:B,streamingText:M,tools:O,chatStatus:et,onSend:Pt,onStop:Lt,onNewChat:Wt,onResume:ae,sessions:Y,sessionId:nt})}),ar&&S.jsxs("div",{style:qe.visualPane,children:[S.jsx("button",{style:qe.closeVisual,onClick:K,children:"\\u2715"}),S.jsxs("div",{style:qe.visualContent,children:[e===Je.dashboard&&S.jsx(uT,{data:r,getBelt:mf,getNextBelt:LI,BELTS:Fu}),e===Je.canvas&&S.jsx(nI,{data:s}),e===Je.quiz&&S.jsx(iI,{data:c,sendEvent:ht}),e===Je.playground&&S.jsx(uI,{data:h,sendEvent:ht}),e===Je.terminal&&S.jsx(fI,{data:f,sendEvent:ht}),e===Je.game&&S.jsx(vI,{data:m,sendEvent:ht}),e===Je.html&&S.jsx(xI,{data:v}),e===Je.welcome&&S.jsx(yI,{})]})]})]}),k&&S.jsx(gI,{data:k,getBelt:mf})]})}const qe={container:{display:"flex",flexDirection:"column",height:"100vh",backgroundColor:"#0d1117",color:"#c9d1d9"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 20px",height:52,backgroundColor:"#161b22",borderBottom:"1px solid #30363d",flexShrink:0},headerLeft:{display:"flex",alignItems:"center",gap:12},logo:{fontSize:16,fontWeight:700,color:"#58a6ff",letterSpacing:"-0.02em"},moduleName:{fontSize:13,color:"#8b949e",padding:"2px 8px",backgroundColor:"#21262d",borderRadius:6},headerRight:{display:"flex",alignItems:"center",gap:10},headerButton:{padding:"5px 12px",fontSize:12,fontWeight:500,color:"#c9d1d9",backgroundColor:"#21262d",border:"1px solid #30363d",borderRadius:6,cursor:"pointer"},beltDisplay:{fontSize:13,fontWeight:500},connectionDot:{width:8,height:8,borderRadius:"50%",marginLeft:4},connectionLabel:{fontSize:12,color:"#8b949e"},errorBanner:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",backgroundColor:"#3d1416",borderBottom:"1px solid #f85149",fontSize:13,color:"#f85149",flexShrink:0},reconnectButton:{padding:"4px 12px",fontSize:12,color:"#fff",backgroundColor:"#da3633",border:"none",borderRadius:6,cursor:"pointer"},splitPane:{display:"flex",flex:1,overflow:"hidden"},chatPane:{display:"flex",flexDirection:"column",transition:"width 0.25s ease",borderRight:"1px solid #30363d",minWidth:0},visualPane:{flex:1,display:"flex",flexDirection:"column",position:"relative",minWidth:0,overflow:"hidden"},closeVisual:{position:"absolute",top:8,right:8,zIndex:10,width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,color:"#8b949e",backgroundColor:"#21262d",border:"1px solid #30363d",borderRadius:6,cursor:"pointer"},visualContent:{flex:1,overflow:"auto",padding:24}};e_.createRoot(document.getElementById("root")).render(S.jsx(GS.StrictMode,{children:S.jsx(EI,{})}));export{y1 as $,No as A,xT as B,x3 as C,ug as D,l1 as E,rr as F,X4 as G,KM as H,my as I,nA as J,$T as K,ma as L,PI as M,Ju as N,ZT as O,Mp as P,by as Q,WM as R,qc as S,G4 as T,sl as U,a3 as V,il as W,bt as X,Rt as Y,N4 as Z,w as _,d3 as a,f4 as a$,OM as a0,Ny as a1,zy as a2,GI as a3,HI as a4,YI as a5,UI as a6,jI as a7,Wp as a8,VI as a9,I4 as aA,E5 as aB,M4 as aC,eg as aD,$x as aE,TR as aF,zM as aG,II as aH,mp as aI,hl as aJ,SR as aK,kR as aL,j as aM,GS as aN,Op as aO,Ai as aP,Yo as aQ,$y as aR,xE as aS,_s as aT,P4 as aU,ab as aV,Gu as aW,Zu as aX,_u as aY,lb as aZ,sb as a_,WI as aa,Js as ab,QI as ac,XI as ad,qI as ae,KR as af,sw as ag,e8 as ah,sA as ai,Fe as aj,Ni as ak,tg as al,Ab as am,Es as an,pb as ao,jt as ap,Dn as aq,W$ as ar,t8 as as,r8 as at,ZI as au,Tt as av,JI as aw,S$ as ax,v$ as ay,x$ as az,h3 as b,St as b0,G2 as b1,Er as b2,hE as b3,Pp as b4,A1 as b5,ol as b6,F1 as b7,NI as b8,yT as b9,ig as bA,eb as bB,hp as bC,O4 as bD,Ku as bE,BI as bF,ee as bG,D4 as ba,E4 as bb,g5 as bc,rg as bd,c4 as be,z4 as bf,ul as bg,_a as bh,wu as bi,b4 as bj,h6 as bk,cl as bl,Su as bm,p4 as bn,J2 as bo,x5 as bp,v5 as bq,cs as br,ax as bs,b5 as bt,ng as bu,y5 as bv,k5 as bw,Ta as bx,zi as by,ex as bz,ne as c,Xt as d,m1 as e,Re as f,p3 as g,ii as h,Kr as i,hA as j,ka as k,rt as l,mb as m,OI as n,i8 as o,g3 as p,m3 as q,n8 as r,f3 as s,iA as t,xn as u,g$ as v,Z4 as w,KI as x,u3 as y,zI as z};
|