@riligar/elysia-sqlite 1.1.0 → 1.1.4
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/package.json +6 -3
- package/src/ui/dist/assets/_baseUniq-CtjpPx06.js +1 -0
- package/src/ui/dist/assets/arc-BFeA2lFC.js +1 -0
- package/src/ui/dist/assets/architectureDiagram-VXUJARFQ-cJh390m5.js +36 -0
- package/src/ui/dist/assets/blockDiagram-VD42YOAC-BhDUcRai.js +122 -0
- package/src/ui/dist/assets/c4Diagram-YG6GDRKO-CMTMP654.js +10 -0
- package/src/ui/dist/assets/channel-DVo75U_z.js +1 -0
- package/src/ui/dist/assets/chunk-4BX2VUAB-hf_dt5BT.js +1 -0
- package/src/ui/dist/assets/chunk-55IACEB6-xClE-JKq.js +1 -0
- package/src/ui/dist/assets/chunk-B4BG7PRW-D6pt13Ec.js +165 -0
- package/src/ui/dist/assets/chunk-DI55MBZ5-Dj9Qg80I.js +220 -0
- package/src/ui/dist/assets/chunk-FMBD7UC4-1ZlekxIE.js +15 -0
- package/src/ui/dist/assets/chunk-QN33PNHL-DAmen2cg.js +1 -0
- package/src/ui/dist/assets/chunk-QZHKN3VN-C-3XzKoW.js +1 -0
- package/src/ui/dist/assets/chunk-TZMSLE5B-bM4mxnvE.js +1 -0
- package/src/ui/dist/assets/classDiagram-2ON5EDUG-DQalC8tR.js +1 -0
- package/src/ui/dist/assets/classDiagram-v2-WZHVMYZB-DQalC8tR.js +1 -0
- package/src/ui/dist/assets/clone-VeB9KXOY.js +1 -0
- package/src/ui/dist/assets/cose-bilkent-S5V4N54A-BxFitB5E.js +1 -0
- package/src/ui/dist/assets/cytoscape.esm-BQaXIfA_.js +331 -0
- package/src/ui/dist/assets/dagre-6UL2VRFP-DZSkvetS.js +4 -0
- package/src/ui/dist/assets/defaultLocale-C4B-KCzX.js +1 -0
- package/src/ui/dist/assets/diagram-PSM6KHXK-CYnji4ok.js +24 -0
- package/src/ui/dist/assets/diagram-QEK2KX5R-BlF0GwV_.js +43 -0
- package/src/ui/dist/assets/diagram-S2PKOQOG-BMf9iQYN.js +24 -0
- package/src/ui/dist/assets/erDiagram-Q2GNP2WA-B9nG6AIS.js +60 -0
- package/src/ui/dist/assets/flowDiagram-NV44I4VS-cRvIpj4q.js +162 -0
- package/src/ui/dist/assets/ganttDiagram-JELNMOA3-D5PauD1v.js +267 -0
- package/src/ui/dist/assets/gitGraphDiagram-NY62KEGX-BPtCepD0.js +65 -0
- package/src/ui/dist/assets/graph-C9jtFm6q.js +1 -0
- package/src/ui/dist/assets/index-D564tWvR.js +525 -0
- package/src/ui/dist/assets/index-DXG21mfz.css +1 -0
- package/src/ui/dist/assets/infoDiagram-WHAUD3N6-0hbOLvdM.js +2 -0
- package/src/ui/dist/assets/init-Gi6I4Gst.js +1 -0
- package/src/ui/dist/assets/journeyDiagram-XKPGCS4Q-CBy5upkf.js +139 -0
- package/src/ui/dist/assets/kanban-definition-3W4ZIXB7-DrobDgMJ.js +89 -0
- package/src/ui/dist/assets/katex-Cu_Erd72.js +261 -0
- package/src/ui/dist/assets/layout-DM9qC5Az.js +1 -0
- package/src/ui/dist/assets/linear-Fky2CJQk.js +1 -0
- package/src/ui/dist/assets/min-Bjr2uZ4W.js +1 -0
- package/src/ui/dist/assets/mindmap-definition-VGOIOE7T-CIlFmeVI.js +68 -0
- package/src/ui/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/src/ui/dist/assets/pieDiagram-ADFJNKIX-DMIZSQUQ.js +30 -0
- package/src/ui/dist/assets/quadrantDiagram-AYHSOK5B-DBCuVneU.js +7 -0
- package/src/ui/dist/assets/requirementDiagram-UZGBJVZJ-Dc87Li5r.js +64 -0
- package/src/ui/dist/assets/sankeyDiagram-TZEHDZUN-SnjPjzIj.js +10 -0
- package/src/ui/dist/assets/sequenceDiagram-WL72ISMW-CegtRWdp.js +145 -0
- package/src/ui/dist/assets/stateDiagram-FKZM4ZOC-DRXLGy91.js +1 -0
- package/src/ui/dist/assets/stateDiagram-v2-4FDKWEC3-DfAIcXf2.js +1 -0
- package/src/ui/dist/assets/timeline-definition-IT6M3QCI-Dfw0Almx.js +61 -0
- package/src/ui/dist/assets/treemap-KMMF4GRG-HxWgHRrr.js +128 -0
- package/src/ui/dist/assets/xychartDiagram-PRI3JC2R-C86J7PBK.js +7 -0
- package/src/ui/{index.html → dist/index.html} +2 -1
- package/src/ui/bun.lock +0 -612
- package/src/ui/package.json +0 -29
- package/src/ui/postcss.config.cjs +0 -14
- package/src/ui/src/App.jsx +0 -2103
- package/src/ui/src/components/DataGrid.jsx +0 -122
- package/src/ui/src/components/EditableCell.jsx +0 -166
- package/src/ui/src/components/ExportButton.jsx +0 -95
- package/src/ui/src/components/FKPreview.jsx +0 -106
- package/src/ui/src/components/Filter.jsx +0 -302
- package/src/ui/src/components/HoldButton.jsx +0 -230
- package/src/ui/src/components/Login.jsx +0 -148
- package/src/ui/src/components/Onboarding.jsx +0 -127
- package/src/ui/src/components/Pagination.jsx +0 -35
- package/src/ui/src/components/SecuritySettings.jsx +0 -273
- package/src/ui/src/components/TableSelector.jsx +0 -75
- package/src/ui/src/hooks/useFilter.js +0 -120
- package/src/ui/src/index.css +0 -123
- package/src/ui/src/main.jsx +0 -115
- package/src/ui/vite.config.js +0 -19
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-6UL2VRFP-DZSkvetS.js","./graph-C9jtFm6q.js","./_baseUniq-CtjpPx06.js","./layout-DM9qC5Az.js","./min-Bjr2uZ4W.js","./clone-VeB9KXOY.js","./cose-bilkent-S5V4N54A-BxFitB5E.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-YG6GDRKO-CMTMP654.js","./chunk-TZMSLE5B-bM4mxnvE.js","./flowDiagram-NV44I4VS-cRvIpj4q.js","./chunk-FMBD7UC4-1ZlekxIE.js","./chunk-55IACEB6-xClE-JKq.js","./chunk-QN33PNHL-DAmen2cg.js","./channel-DVo75U_z.js","./erDiagram-Q2GNP2WA-B9nG6AIS.js","./gitGraphDiagram-NY62KEGX-BPtCepD0.js","./chunk-4BX2VUAB-hf_dt5BT.js","./chunk-QZHKN3VN-C-3XzKoW.js","./treemap-KMMF4GRG-HxWgHRrr.js","./ganttDiagram-JELNMOA3-D5PauD1v.js","./linear-Fky2CJQk.js","./init-Gi6I4Gst.js","./defaultLocale-C4B-KCzX.js","./infoDiagram-WHAUD3N6-0hbOLvdM.js","./pieDiagram-ADFJNKIX-DMIZSQUQ.js","./arc-BFeA2lFC.js","./ordinal-Cboi1Yqb.js","./quadrantDiagram-AYHSOK5B-DBCuVneU.js","./xychartDiagram-PRI3JC2R-C86J7PBK.js","./requirementDiagram-UZGBJVZJ-Dc87Li5r.js","./sequenceDiagram-WL72ISMW-CegtRWdp.js","./classDiagram-2ON5EDUG-DQalC8tR.js","./chunk-B4BG7PRW-D6pt13Ec.js","./classDiagram-v2-WZHVMYZB-DQalC8tR.js","./stateDiagram-FKZM4ZOC-DRXLGy91.js","./chunk-DI55MBZ5-Dj9Qg80I.js","./stateDiagram-v2-4FDKWEC3-DfAIcXf2.js","./journeyDiagram-XKPGCS4Q-CBy5upkf.js","./timeline-definition-IT6M3QCI-Dfw0Almx.js","./mindmap-definition-VGOIOE7T-CIlFmeVI.js","./kanban-definition-3W4ZIXB7-DrobDgMJ.js","./sankeyDiagram-TZEHDZUN-SnjPjzIj.js","./diagram-S2PKOQOG-BMf9iQYN.js","./diagram-QEK2KX5R-BlF0GwV_.js","./blockDiagram-VD42YOAC-BhDUcRai.js","./architectureDiagram-VXUJARFQ-cJh390m5.js","./diagram-PSM6KHXK-CYnji4ok.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var fR=Object.defineProperty;var pR=(t,e,r)=>e in t?fR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ke=(t,e,r)=>pR(t,typeof e!="symbol"?e+"":e,r);function mR(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Ff(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cg={exports:{}},Lc={},Sg={exports:{}},ie={};/**
|
|
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 $w;function gR(){if($w)return ie;$w=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function m(N){return N===null||typeof N!="object"?null:(N=f&&N[f]||N["@@iterator"],typeof N=="function"?N:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,x={};function w(N,Z,ot){this.props=N,this.context=Z,this.refs=x,this.updater=ot||g}w.prototype.isReactComponent={},w.prototype.setState=function(N,Z){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,Z,"setState")},w.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function S(){}S.prototype=w.prototype;function k(N,Z,ot){this.props=N,this.context=Z,this.refs=x,this.updater=ot||g}var E=k.prototype=new S;E.constructor=k,v(E,w.prototype),E.isPureReactComponent=!0;var L=Array.isArray,A=Object.prototype.hasOwnProperty,M={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function D(N,Z,ot){var yt,dt={},lt=null,mt=null;if(Z!=null)for(yt in Z.ref!==void 0&&(mt=Z.ref),Z.key!==void 0&&(lt=""+Z.key),Z)A.call(Z,yt)&&!B.hasOwnProperty(yt)&&(dt[yt]=Z[yt]);var xt=arguments.length-2;if(xt===1)dt.children=ot;else if(1<xt){for(var St=Array(xt),Tt=0;Tt<xt;Tt++)St[Tt]=arguments[Tt+2];dt.children=St}if(N&&N.defaultProps)for(yt in xt=N.defaultProps,xt)dt[yt]===void 0&&(dt[yt]=xt[yt]);return{$$typeof:t,type:N,key:lt,ref:mt,props:dt,_owner:M.current}}function q(N,Z){return{$$typeof:t,type:N.type,key:Z,ref:N.ref,props:N.props,_owner:N._owner}}function U(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function H(N){var Z={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ot){return Z[ot]})}var K=/\/+/g;function V(N,Z){return typeof N=="object"&&N!==null&&N.key!=null?H(""+N.key):Z.toString(36)}function W(N,Z,ot,yt,dt){var lt=typeof N;(lt==="undefined"||lt==="boolean")&&(N=null);var mt=!1;if(N===null)mt=!0;else switch(lt){case"string":case"number":mt=!0;break;case"object":switch(N.$$typeof){case t:case e:mt=!0}}if(mt)return mt=N,dt=dt(mt),N=yt===""?"."+V(mt,0):yt,L(dt)?(ot="",N!=null&&(ot=N.replace(K,"$&/")+"/"),W(dt,Z,ot,"",function(Tt){return Tt})):dt!=null&&(U(dt)&&(dt=q(dt,ot+(!dt.key||mt&&mt.key===dt.key?"":(""+dt.key).replace(K,"$&/")+"/")+N)),Z.push(dt)),1;if(mt=0,yt=yt===""?".":yt+":",L(N))for(var xt=0;xt<N.length;xt++){lt=N[xt];var St=yt+V(lt,xt);mt+=W(lt,Z,ot,St,dt)}else if(St=m(N),typeof St=="function")for(N=St.call(N),xt=0;!(lt=N.next()).done;)lt=lt.value,St=yt+V(lt,xt++),mt+=W(lt,Z,ot,St,dt);else if(lt==="object")throw Z=String(N),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return mt}function I(N,Z,ot){if(N==null)return N;var yt=[],dt=0;return W(N,yt,"","",function(lt){return Z.call(ot,lt,dt++)}),yt}function O(N){if(N._status===-1){var Z=N._result;Z=Z(),Z.then(function(ot){(N._status===0||N._status===-1)&&(N._status=1,N._result=ot)},function(ot){(N._status===0||N._status===-1)&&(N._status=2,N._result=ot)}),N._status===-1&&(N._status=0,N._result=Z)}if(N._status===1)return N._result.default;throw N._result}var F={current:null},P={transition:null},z={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:P,ReactCurrentOwner:M};function X(){throw Error("act(...) is not supported in production builds of React.")}return ie.Children={map:I,forEach:function(N,Z,ot){I(N,function(){Z.apply(this,arguments)},ot)},count:function(N){var Z=0;return I(N,function(){Z++}),Z},toArray:function(N){return I(N,function(Z){return Z})||[]},only:function(N){if(!U(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ie.Component=w,ie.Fragment=r,ie.Profiler=i,ie.PureComponent=k,ie.StrictMode=n,ie.Suspense=u,ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,ie.act=X,ie.cloneElement=function(N,Z,ot){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var yt=v({},N.props),dt=N.key,lt=N.ref,mt=N._owner;if(Z!=null){if(Z.ref!==void 0&&(lt=Z.ref,mt=M.current),Z.key!==void 0&&(dt=""+Z.key),N.type&&N.type.defaultProps)var xt=N.type.defaultProps;for(St in Z)A.call(Z,St)&&!B.hasOwnProperty(St)&&(yt[St]=Z[St]===void 0&&xt!==void 0?xt[St]:Z[St])}var St=arguments.length-2;if(St===1)yt.children=ot;else if(1<St){xt=Array(St);for(var Tt=0;Tt<St;Tt++)xt[Tt]=arguments[Tt+2];yt.children=xt}return{$$typeof:t,type:N.type,key:dt,ref:lt,props:yt,_owner:mt}},ie.createContext=function(N){return N={$$typeof:a,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:o,_context:N},N.Consumer=N},ie.createElement=D,ie.createFactory=function(N){var Z=D.bind(null,N);return Z.type=N,Z},ie.createRef=function(){return{current:null}},ie.forwardRef=function(N){return{$$typeof:l,render:N}},ie.isValidElement=U,ie.lazy=function(N){return{$$typeof:d,_payload:{_status:-1,_result:N},_init:O}},ie.memo=function(N,Z){return{$$typeof:h,type:N,compare:Z===void 0?null:Z}},ie.startTransition=function(N){var Z=P.transition;P.transition={};try{N()}finally{P.transition=Z}},ie.unstable_act=X,ie.useCallback=function(N,Z){return F.current.useCallback(N,Z)},ie.useContext=function(N){return F.current.useContext(N)},ie.useDebugValue=function(){},ie.useDeferredValue=function(N){return F.current.useDeferredValue(N)},ie.useEffect=function(N,Z){return F.current.useEffect(N,Z)},ie.useId=function(){return F.current.useId()},ie.useImperativeHandle=function(N,Z,ot){return F.current.useImperativeHandle(N,Z,ot)},ie.useInsertionEffect=function(N,Z){return F.current.useInsertionEffect(N,Z)},ie.useLayoutEffect=function(N,Z){return F.current.useLayoutEffect(N,Z)},ie.useMemo=function(N,Z){return F.current.useMemo(N,Z)},ie.useReducer=function(N,Z,ot){return F.current.useReducer(N,Z,ot)},ie.useRef=function(N){return F.current.useRef(N)},ie.useState=function(N){return F.current.useState(N)},ie.useSyncExternalStore=function(N,Z,ot){return F.current.useSyncExternalStore(N,Z,ot)},ie.useTransition=function(){return F.current.useTransition()},ie.version="18.3.1",ie}var Lw;function D0(){return Lw||(Lw=1,Sg.exports=gR()),Sg.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 Mw;function yR(){if(Mw)return Lc;Mw=1;var t=D0(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,h){var d,f={},m=null,g=null;h!==void 0&&(m=""+h),u.key!==void 0&&(m=""+u.key),u.ref!==void 0&&(g=u.ref);for(d in u)n.call(u,d)&&!o.hasOwnProperty(d)&&(f[d]=u[d]);if(l&&l.defaultProps)for(d in u=l.defaultProps,u)f[d]===void 0&&(f[d]=u[d]);return{$$typeof:e,type:l,key:m,ref:g,props:f,_owner:i.current}}return Lc.Fragment=r,Lc.jsx=a,Lc.jsxs=a,Lc}var Aw;function vR(){return Aw||(Aw=1,Cg.exports=yR()),Cg.exports}var b=vR(),$=D0();const kr=Ff($),xR=mR({__proto__:null,default:kr},[$]);var Zh={},kg={exports:{}},vn={},_g={exports:{}},Tg={};/**
|
|
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 Rw;function bR(){return Rw||(Rw=1,(function(t){function e(P,z){var X=P.length;P.push(z);t:for(;0<X;){var N=X-1>>>1,Z=P[N];if(0<i(Z,z))P[N]=z,P[X]=Z,X=N;else break t}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var z=P[0],X=P.pop();if(X!==z){P[0]=X;t:for(var N=0,Z=P.length,ot=Z>>>1;N<ot;){var yt=2*(N+1)-1,dt=P[yt],lt=yt+1,mt=P[lt];if(0>i(dt,X))lt<Z&&0>i(mt,dt)?(P[N]=mt,P[lt]=X,N=lt):(P[N]=dt,P[yt]=X,N=yt);else if(lt<Z&&0>i(mt,X))P[N]=mt,P[lt]=X,N=lt;else break t}}return z}function i(P,z){var X=P.sortIndex-z.sortIndex;return X!==0?X:P.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var u=[],h=[],d=1,f=null,m=3,g=!1,v=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=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(P){for(var z=r(h);z!==null;){if(z.callback===null)n(h);else if(z.startTime<=P)n(h),z.sortIndex=z.expirationTime,e(u,z);else break;z=r(h)}}function L(P){if(x=!1,E(P),!v)if(r(u)!==null)v=!0,O(A);else{var z=r(h);z!==null&&F(L,z.startTime-P)}}function A(P,z){v=!1,x&&(x=!1,S(D),D=-1),g=!0;var X=m;try{for(E(z),f=r(u);f!==null&&(!(f.expirationTime>z)||P&&!H());){var N=f.callback;if(typeof N=="function"){f.callback=null,m=f.priorityLevel;var Z=N(f.expirationTime<=z);z=t.unstable_now(),typeof Z=="function"?f.callback=Z:f===r(u)&&n(u),E(z)}else n(u);f=r(u)}if(f!==null)var ot=!0;else{var yt=r(h);yt!==null&&F(L,yt.startTime-z),ot=!1}return ot}finally{f=null,m=X,g=!1}}var M=!1,B=null,D=-1,q=5,U=-1;function H(){return!(t.unstable_now()-U<q)}function K(){if(B!==null){var P=t.unstable_now();U=P;var z=!0;try{z=B(!0,P)}finally{z?V():(M=!1,B=null)}}else M=!1}var V;if(typeof k=="function")V=function(){k(K)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,I=W.port2;W.port1.onmessage=K,V=function(){I.postMessage(null)}}else V=function(){w(K,0)};function O(P){B=P,M||(M=!0,V())}function F(P,z){D=w(function(){P(t.unstable_now())},z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){v||g||(v=!0,O(A))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(P){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var X=m;m=z;try{return P()}finally{m=X}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var X=m;m=P;try{return z()}finally{m=X}},t.unstable_scheduleCallback=function(P,z,X){var N=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?N+X:N):X=N,P){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=X+Z,P={id:d++,callback:z,priorityLevel:P,startTime:X,expirationTime:Z,sortIndex:-1},X>N?(P.sortIndex=X,e(h,P),r(u)===null&&P===r(h)&&(x?(S(D),D=-1):x=!0,F(L,X-N))):(P.sortIndex=Z,e(u,P),v||g||(v=!0,O(A))),P},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(P){var z=m;return function(){var X=m;m=z;try{return P.apply(this,arguments)}finally{m=X}}}})(Tg)),Tg}var Pw;function wR(){return Pw||(Pw=1,_g.exports=bR()),_g.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 Bw;function CR(){if(Bw)return vn;Bw=1;var t=D0(),e=wR();function r(s){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+s,p=1;p<arguments.length;p++)c+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(s,c){a(s,c),a(s+"Capture",c)}function a(s,c){for(i[s]=c,s=0;s<c.length;s++)n.add(c[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,d={},f={};function m(s){return u.call(f,s)?!0:u.call(d,s)?!1:h.test(s)?f[s]=!0:(d[s]=!0,!1)}function g(s,c,p,y){if(p!==null&&p.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return y?!1:p!==null?!p.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function v(s,c,p,y){if(c===null||typeof c>"u"||g(s,c,p,y))return!0;if(y)return!1;if(p!==null)switch(p.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function x(s,c,p,y,C,_,R){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=y,this.attributeNamespace=C,this.mustUseProperty=p,this.propertyName=s,this.type=c,this.sanitizeURL=_,this.removeEmptyString=R}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){w[s]=new x(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var c=s[0];w[c]=new x(c,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){w[s]=new x(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){w[s]=new x(s,2,!1,s,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(s){w[s]=new x(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){w[s]=new x(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){w[s]=new x(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){w[s]=new x(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){w[s]=new x(s,5,!1,s.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function k(s){return s[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(s){var c=s.replace(S,k);w[c]=new x(c,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var c=s.replace(S,k);w[c]=new x(c,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var c=s.replace(S,k);w[c]=new x(c,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){w[s]=new x(s,1,!1,s.toLowerCase(),null,!1,!1)}),w.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){w[s]=new x(s,1,!1,s.toLowerCase(),null,!0,!0)});function E(s,c,p,y){var C=w.hasOwnProperty(c)?w[c]:null;(C!==null?C.type!==0:y||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(v(c,p,C,y)&&(p=null),y||C===null?m(c)&&(p===null?s.removeAttribute(c):s.setAttribute(c,""+p)):C.mustUseProperty?s[C.propertyName]=p===null?C.type===3?!1:"":p:(c=C.attributeName,y=C.attributeNamespace,p===null?s.removeAttribute(c):(C=C.type,p=C===3||C===4&&p===!0?"":""+p,y?s.setAttributeNS(y,c,p):s.setAttribute(c,p))))}var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),M=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),H=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),P=Symbol.iterator;function z(s){return s===null||typeof s!="object"?null:(s=P&&s[P]||s["@@iterator"],typeof s=="function"?s:null)}var X=Object.assign,N;function Z(s){if(N===void 0)try{throw Error()}catch(p){var c=p.stack.trim().match(/\n( *(at )?)/);N=c&&c[1]||""}return`
|
|
35
|
+
`+N+s}var ot=!1;function yt(s,c){if(!s||ot)return"";ot=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(nt){var y=nt}Reflect.construct(s,[],c)}else{try{c.call()}catch(nt){y=nt}s.call(c.prototype)}else{try{throw Error()}catch(nt){y=nt}s()}}catch(nt){if(nt&&y&&typeof nt.stack=="string"){for(var C=nt.stack.split(`
|
|
36
|
+
`),_=y.stack.split(`
|
|
37
|
+
`),R=C.length-1,j=_.length-1;1<=R&&0<=j&&C[R]!==_[j];)j--;for(;1<=R&&0<=j;R--,j--)if(C[R]!==_[j]){if(R!==1||j!==1)do if(R--,j--,0>j||C[R]!==_[j]){var Y=`
|
|
38
|
+
`+C[R].replace(" at new "," at ");return s.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",s.displayName)),Y}while(1<=R&&0<=j);break}}}finally{ot=!1,Error.prepareStackTrace=p}return(s=s?s.displayName||s.name:"")?Z(s):""}function dt(s){switch(s.tag){case 5:return Z(s.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return s=yt(s.type,!1),s;case 11:return s=yt(s.type.render,!1),s;case 1:return s=yt(s.type,!0),s;default:return""}}function lt(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case B:return"Fragment";case M:return"Portal";case q:return"Profiler";case D:return"StrictMode";case V:return"Suspense";case W:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case H:return(s.displayName||"Context")+".Consumer";case U:return(s._context.displayName||"Context")+".Provider";case K:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case I:return c=s.displayName||null,c!==null?c:lt(s.type)||"Memo";case O:c=s._payload,s=s._init;try{return lt(s(c))}catch{}}return null}function mt(s){var c=s.type;switch(s.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=c.render,s=s.displayName||s.name||"",c.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lt(c);case 8:return c===D?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function xt(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function St(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Tt(s){var c=St(s)?"checked":"value",p=Object.getOwnPropertyDescriptor(s.constructor.prototype,c),y=""+s[c];if(!s.hasOwnProperty(c)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var C=p.get,_=p.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return C.call(this)},set:function(R){y=""+R,_.call(this,R)}}),Object.defineProperty(s,c,{enumerable:p.enumerable}),{getValue:function(){return y},setValue:function(R){y=""+R},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function ee(s){s._valueTracker||(s._valueTracker=Tt(s))}function Ee(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var p=c.getValue(),y="";return s&&(y=St(s)?s.checked?"true":"false":s.value),s=y,s!==p?(c.setValue(s),!0):!1}function pe(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Oe(s,c){var p=c.checked;return X({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??s._wrapperState.initialChecked})}function Ue(s,c){var p=c.defaultValue==null?"":c.defaultValue,y=c.checked!=null?c.checked:c.defaultChecked;p=xt(c.value!=null?c.value:p),s._wrapperState={initialChecked:y,initialValue:p,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function xr(s,c){c=c.checked,c!=null&&E(s,"checked",c,!1)}function sr(s,c){xr(s,c);var p=xt(c.value),y=c.type;if(p!=null)y==="number"?(p===0&&s.value===""||s.value!=p)&&(s.value=""+p):s.value!==""+p&&(s.value=""+p);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}c.hasOwnProperty("value")?$e(s,c.type,p):c.hasOwnProperty("defaultValue")&&$e(s,c.type,xt(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(s.defaultChecked=!!c.defaultChecked)}function ar(s,c,p){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var y=c.type;if(!(y!=="submit"&&y!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+s._wrapperState.initialValue,p||c===s.value||(s.value=c),s.defaultValue=c}p=s.name,p!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,p!==""&&(s.name=p)}function $e(s,c,p){(c!=="number"||pe(s.ownerDocument)!==s)&&(p==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+p&&(s.defaultValue=""+p))}var le=Array.isArray;function we(s,c,p,y){if(s=s.options,c){c={};for(var C=0;C<p.length;C++)c["$"+p[C]]=!0;for(p=0;p<s.length;p++)C=c.hasOwnProperty("$"+s[p].value),s[p].selected!==C&&(s[p].selected=C),C&&y&&(s[p].defaultSelected=!0)}else{for(p=""+xt(p),c=null,C=0;C<s.length;C++){if(s[C].value===p){s[C].selected=!0,y&&(s[C].defaultSelected=!0);return}c!==null||s[C].disabled||(c=s[C])}c!==null&&(c.selected=!0)}}function ze(s,c){if(c.dangerouslySetInnerHTML!=null)throw Error(r(91));return X({},c,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function nr(s,c){var p=c.value;if(p==null){if(p=c.children,c=c.defaultValue,p!=null){if(c!=null)throw Error(r(92));if(le(p)){if(1<p.length)throw Error(r(93));p=p[0]}c=p}c==null&&(c=""),p=c}s._wrapperState={initialValue:xt(p)}}function Ke(s,c){var p=xt(c.value),y=xt(c.defaultValue);p!=null&&(p=""+p,p!==s.value&&(s.value=p),c.defaultValue==null&&s.defaultValue!==p&&(s.defaultValue=p)),y!=null&&(s.defaultValue=""+y)}function We(s){var c=s.textContent;c===s._wrapperState.initialValue&&c!==""&&c!==null&&(s.value=c)}function lr(s){switch(s){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 He(s,c){return s==null||s==="http://www.w3.org/1999/xhtml"?lr(c):s==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Qe,Fe=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,p,y,C){MSApp.execUnsafeLocalFunction(function(){return s(c,p,y,C)})}:s})(function(s,c){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=c;else{for(Qe=Qe||document.createElement("div"),Qe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Qe.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;c.firstChild;)s.appendChild(c.firstChild)}});function Ye(s,c){if(c){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=c;return}}s.textContent=c}var Ce={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},Qi=["Webkit","ms","Moz","O"];Object.keys(Ce).forEach(function(s){Qi.forEach(function(c){c=c+s.charAt(0).toUpperCase()+s.substring(1),Ce[c]=Ce[s]})});function ei(s,c,p){return c==null||typeof c=="boolean"||c===""?"":p||typeof c!="number"||c===0||Ce.hasOwnProperty(s)&&Ce[s]?(""+c).trim():c+"px"}function jn(s,c){s=s.style;for(var p in c)if(c.hasOwnProperty(p)){var y=p.indexOf("--")===0,C=ei(p,c[p],y);p==="float"&&(p="cssFloat"),y?s.setProperty(p,C):s[p]=C}}var me=X({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 Me(s,c){if(c){if(me[s]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(r(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(r(61))}if(c.style!=null&&typeof c.style!="object")throw Error(r(62))}}function br(s,c){if(s.indexOf("-")===-1)return typeof c.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ri=null;function Rr(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var _r=null,cr=null,ni=null;function Ti(s){if(s=pc(s)){if(typeof _r!="function")throw Error(r(280));var c=s.stateNode;c&&(c=fh(c),_r(s.stateNode,s.type,c))}}function Ei(s){cr?ni?ni.push(s):ni=[s]:cr=s}function xa(){if(cr){var s=cr,c=ni;if(ni=cr=null,Ti(s),c)for(s=0;s<c.length;s++)Ti(c[s])}}function Se(s,c){return s(c)}function cn(){}var Zi=!1;function bs(s,c,p){if(Zi)return s(c,p);Zi=!0;try{return Se(s,c,p)}finally{Zi=!1,(cr!==null||ni!==null)&&(cn(),xa())}}function Yr(s,c){var p=s.stateNode;if(p===null)return null;var y=fh(p);if(y===null)return null;p=y[c];t:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break t;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,c,typeof p));return p}var ii=!1;if(l)try{var un={};Object.defineProperty(un,"passive",{get:function(){ii=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{ii=!1}function Xl(s,c,p,y,C,_,R,j,Y){var nt=Array.prototype.slice.call(arguments,3);try{c.apply(p,nt)}catch(ht){this.onError(ht)}}var ur=!1,hn=null,Ji=!1,Po=null,Bo={onError:function(s){ur=!0,hn=s}};function ba(s,c,p,y,C,_,R,j,Y){ur=!1,hn=null,Xl.apply(Bo,arguments)}function En(s,c,p,y,C,_,R,j,Y){if(ba.apply(this,arguments),ur){if(ur){var nt=hn;ur=!1,hn=null}else throw Error(r(198));Ji||(Ji=!0,Po=nt)}}function dn(s){var c=s,p=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(p=c.return),s=c.return;while(s)}return c.tag===3?p:null}function No(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function ws(s){if(dn(s)!==s)throw Error(r(188))}function wa(s){var c=s.alternate;if(!c){if(c=dn(s),c===null)throw Error(r(188));return c!==s?null:s}for(var p=s,y=c;;){var C=p.return;if(C===null)break;var _=C.alternate;if(_===null){if(y=C.return,y!==null){p=y;continue}break}if(C.child===_.child){for(_=C.child;_;){if(_===p)return ws(C),s;if(_===y)return ws(C),c;_=_.sibling}throw Error(r(188))}if(p.return!==y.return)p=C,y=_;else{for(var R=!1,j=C.child;j;){if(j===p){R=!0,p=C,y=_;break}if(j===y){R=!0,y=C,p=_;break}j=j.sibling}if(!R){for(j=_.child;j;){if(j===p){R=!0,p=_,y=C;break}if(j===y){R=!0,y=_,p=C;break}j=j.sibling}if(!R)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:c}function Ca(s){return s=wa(s),s!==null?Dt(s):null}function Dt(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var c=Dt(s);if(c!==null)return c;s=s.sibling}return null}var G=e.unstable_scheduleCallback,pt=e.unstable_cancelCallback,Lt=e.unstable_shouldYield,xe=e.unstable_requestPaint,re=e.unstable_now,Ae=e.unstable_getCurrentPriorityLevel,rt=e.unstable_ImmediatePriority,gt=e.unstable_UserBlockingPriority,bt=e.unstable_NormalPriority,Et=e.unstable_LowPriority,$t=e.unstable_IdlePriority,ne=null,ae=null;function Gr(s){if(ae&&typeof ae.onCommitFiberRoot=="function")try{ae.onCommitFiberRoot(ne,s,void 0,(s.current.flags&128)===128)}catch{}}var Xr=Math.clz32?Math.clz32:AA,Cs=Math.log,MA=Math.LN2;function AA(s){return s>>>=0,s===0?32:31-(Cs(s)/MA|0)|0}var Xu=64,Ku=4194304;function Kl(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Qu(s,c){var p=s.pendingLanes;if(p===0)return 0;var y=0,C=s.suspendedLanes,_=s.pingedLanes,R=p&268435455;if(R!==0){var j=R&~C;j!==0?y=Kl(j):(_&=R,_!==0&&(y=Kl(_)))}else R=p&~C,R!==0?y=Kl(R):_!==0&&(y=Kl(_));if(y===0)return 0;if(c!==0&&c!==y&&(c&C)===0&&(C=y&-y,_=c&-c,C>=_||C===16&&(_&4194240)!==0))return c;if((y&4)!==0&&(y|=p&16),c=s.entangledLanes,c!==0)for(s=s.entanglements,c&=y;0<c;)p=31-Xr(c),C=1<<p,y|=s[p],c&=~C;return y}function RA(s,c){switch(s){case 1:case 2:case 4:return c+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 c+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 PA(s,c){for(var p=s.suspendedLanes,y=s.pingedLanes,C=s.expirationTimes,_=s.pendingLanes;0<_;){var R=31-Xr(_),j=1<<R,Y=C[R];Y===-1?((j&p)===0||(j&y)!==0)&&(C[R]=RA(j,c)):Y<=c&&(s.expiredLanes|=j),_&=~j}}function Hp(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function o1(){var s=Xu;return Xu<<=1,(Xu&4194240)===0&&(Xu=64),s}function qp(s){for(var c=[],p=0;31>p;p++)c.push(s);return c}function Ql(s,c,p){s.pendingLanes|=c,c!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,c=31-Xr(c),s[c]=p}function BA(s,c){var p=s.pendingLanes&~c;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=c,s.mutableReadLanes&=c,s.entangledLanes&=c,c=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<p;){var C=31-Xr(p),_=1<<C;c[C]=0,y[C]=-1,s[C]=-1,p&=~_}}function Vp(s,c){var p=s.entangledLanes|=c;for(s=s.entanglements;p;){var y=31-Xr(p),C=1<<y;C&c|s[y]&c&&(s[y]|=c),p&=~C}}var be=0;function s1(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var a1,Up,l1,c1,u1,Yp=!1,Zu=[],Oo=null,Fo=null,Do=null,Zl=new Map,Jl=new Map,Io=[],NA="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 h1(s,c){switch(s){case"focusin":case"focusout":Oo=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":Do=null;break;case"pointerover":case"pointerout":Zl.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jl.delete(c.pointerId)}}function tc(s,c,p,y,C,_){return s===null||s.nativeEvent!==_?(s={blockedOn:c,domEventName:p,eventSystemFlags:y,nativeEvent:_,targetContainers:[C]},c!==null&&(c=pc(c),c!==null&&Up(c)),s):(s.eventSystemFlags|=y,c=s.targetContainers,C!==null&&c.indexOf(C)===-1&&c.push(C),s)}function OA(s,c,p,y,C){switch(c){case"focusin":return Oo=tc(Oo,s,c,p,y,C),!0;case"dragenter":return Fo=tc(Fo,s,c,p,y,C),!0;case"mouseover":return Do=tc(Do,s,c,p,y,C),!0;case"pointerover":var _=C.pointerId;return Zl.set(_,tc(Zl.get(_)||null,s,c,p,y,C)),!0;case"gotpointercapture":return _=C.pointerId,Jl.set(_,tc(Jl.get(_)||null,s,c,p,y,C)),!0}return!1}function d1(s){var c=Ss(s.target);if(c!==null){var p=dn(c);if(p!==null){if(c=p.tag,c===13){if(c=No(p),c!==null){s.blockedOn=c,u1(s.priority,function(){l1(p)});return}}else if(c===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Ju(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var p=Xp(s.domEventName,s.eventSystemFlags,c[0],s.nativeEvent);if(p===null){p=s.nativeEvent;var y=new p.constructor(p.type,p);ri=y,p.target.dispatchEvent(y),ri=null}else return c=pc(p),c!==null&&Up(c),s.blockedOn=p,!1;c.shift()}return!0}function f1(s,c,p){Ju(s)&&p.delete(c)}function FA(){Yp=!1,Oo!==null&&Ju(Oo)&&(Oo=null),Fo!==null&&Ju(Fo)&&(Fo=null),Do!==null&&Ju(Do)&&(Do=null),Zl.forEach(f1),Jl.forEach(f1)}function ec(s,c){s.blockedOn===c&&(s.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FA)))}function rc(s){function c(C){return ec(C,s)}if(0<Zu.length){ec(Zu[0],s);for(var p=1;p<Zu.length;p++){var y=Zu[p];y.blockedOn===s&&(y.blockedOn=null)}}for(Oo!==null&&ec(Oo,s),Fo!==null&&ec(Fo,s),Do!==null&&ec(Do,s),Zl.forEach(c),Jl.forEach(c),p=0;p<Io.length;p++)y=Io[p],y.blockedOn===s&&(y.blockedOn=null);for(;0<Io.length&&(p=Io[0],p.blockedOn===null);)d1(p),p.blockedOn===null&&Io.shift()}var Sa=L.ReactCurrentBatchConfig,th=!0;function DA(s,c,p,y){var C=be,_=Sa.transition;Sa.transition=null;try{be=1,Gp(s,c,p,y)}finally{be=C,Sa.transition=_}}function IA(s,c,p,y){var C=be,_=Sa.transition;Sa.transition=null;try{be=4,Gp(s,c,p,y)}finally{be=C,Sa.transition=_}}function Gp(s,c,p,y){if(th){var C=Xp(s,c,p,y);if(C===null)dm(s,c,y,eh,p),h1(s,y);else if(OA(C,s,c,p,y))y.stopPropagation();else if(h1(s,y),c&4&&-1<NA.indexOf(s)){for(;C!==null;){var _=pc(C);if(_!==null&&a1(_),_=Xp(s,c,p,y),_===null&&dm(s,c,y,eh,p),_===C)break;C=_}C!==null&&y.stopPropagation()}else dm(s,c,y,null,p)}}var eh=null;function Xp(s,c,p,y){if(eh=null,s=Rr(y),s=Ss(s),s!==null)if(c=dn(s),c===null)s=null;else if(p=c.tag,p===13){if(s=No(c),s!==null)return s;s=null}else if(p===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null);return eh=s,null}function p1(s){switch(s){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(Ae()){case rt:return 1;case gt:return 4;case bt:case Et:return 16;case $t:return 536870912;default:return 16}default:return 16}}var jo=null,Kp=null,rh=null;function m1(){if(rh)return rh;var s,c=Kp,p=c.length,y,C="value"in jo?jo.value:jo.textContent,_=C.length;for(s=0;s<p&&c[s]===C[s];s++);var R=p-s;for(y=1;y<=R&&c[p-y]===C[_-y];y++);return rh=C.slice(s,1<y?1-y:void 0)}function nh(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function ih(){return!0}function g1(){return!1}function $n(s){function c(p,y,C,_,R){this._reactName=p,this._targetInst=C,this.type=y,this.nativeEvent=_,this.target=R,this.currentTarget=null;for(var j in s)s.hasOwnProperty(j)&&(p=s[j],this[j]=p?p(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?ih:g1,this.isPropagationStopped=g1,this}return X(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=ih)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=ih)},persist:function(){},isPersistent:ih}),c}var ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qp=$n(ka),nc=X({},ka,{view:0,detail:0}),jA=$n(nc),Zp,Jp,ic,oh=X({},nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:em,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ic&&(ic&&s.type==="mousemove"?(Zp=s.screenX-ic.screenX,Jp=s.screenY-ic.screenY):Jp=Zp=0,ic=s),Zp)},movementY:function(s){return"movementY"in s?s.movementY:Jp}}),y1=$n(oh),zA=X({},oh,{dataTransfer:0}),WA=$n(zA),HA=X({},nc,{relatedTarget:0}),tm=$n(HA),qA=X({},ka,{animationName:0,elapsedTime:0,pseudoElement:0}),VA=$n(qA),UA=X({},ka,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),YA=$n(UA),GA=X({},ka,{data:0}),v1=$n(GA),XA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KA={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"},QA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZA(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=QA[s])?!!c[s]:!1}function em(){return ZA}var JA=X({},nc,{key:function(s){if(s.key){var c=XA[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=nh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?KA[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:em,charCode:function(s){return s.type==="keypress"?nh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?nh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),t5=$n(JA),e5=X({},oh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),x1=$n(e5),r5=X({},nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:em}),n5=$n(r5),i5=X({},ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),o5=$n(i5),s5=X({},oh,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),a5=$n(s5),l5=[9,13,27,32],rm=l&&"CompositionEvent"in window,oc=null;l&&"documentMode"in document&&(oc=document.documentMode);var c5=l&&"TextEvent"in window&&!oc,b1=l&&(!rm||oc&&8<oc&&11>=oc),w1=" ",C1=!1;function S1(s,c){switch(s){case"keyup":return l5.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k1(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var _a=!1;function u5(s,c){switch(s){case"compositionend":return k1(c);case"keypress":return c.which!==32?null:(C1=!0,w1);case"textInput":return s=c.data,s===w1&&C1?null:s;default:return null}}function h5(s,c){if(_a)return s==="compositionend"||!rm&&S1(s,c)?(s=m1(),rh=Kp=jo=null,_a=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return b1&&c.locale!=="ko"?null:c.data;default:return null}}var d5={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 _1(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!d5[s.type]:c==="textarea"}function T1(s,c,p,y){Ei(y),c=uh(c,"onChange"),0<c.length&&(p=new Qp("onChange","change",null,p,y),s.push({event:p,listeners:c}))}var sc=null,ac=null;function f5(s){q1(s,0)}function sh(s){var c=Ma(s);if(Ee(c))return s}function p5(s,c){if(s==="change")return c}var E1=!1;if(l){var nm;if(l){var im="oninput"in document;if(!im){var $1=document.createElement("div");$1.setAttribute("oninput","return;"),im=typeof $1.oninput=="function"}nm=im}else nm=!1;E1=nm&&(!document.documentMode||9<document.documentMode)}function L1(){sc&&(sc.detachEvent("onpropertychange",M1),ac=sc=null)}function M1(s){if(s.propertyName==="value"&&sh(ac)){var c=[];T1(c,ac,s,Rr(s)),bs(f5,c)}}function m5(s,c,p){s==="focusin"?(L1(),sc=c,ac=p,sc.attachEvent("onpropertychange",M1)):s==="focusout"&&L1()}function g5(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sh(ac)}function y5(s,c){if(s==="click")return sh(c)}function v5(s,c){if(s==="input"||s==="change")return sh(c)}function x5(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var oi=typeof Object.is=="function"?Object.is:x5;function lc(s,c){if(oi(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var p=Object.keys(s),y=Object.keys(c);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var C=p[y];if(!u.call(c,C)||!oi(s[C],c[C]))return!1}return!0}function A1(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function R1(s,c){var p=A1(s);s=0;for(var y;p;){if(p.nodeType===3){if(y=s+p.textContent.length,s<=c&&y>=c)return{node:p,offset:c-s};s=y}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=A1(p)}}function P1(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?P1(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function B1(){for(var s=window,c=pe();c instanceof s.HTMLIFrameElement;){try{var p=typeof c.contentWindow.location.href=="string"}catch{p=!1}if(p)s=c.contentWindow;else break;c=pe(s.document)}return c}function om(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}function b5(s){var c=B1(),p=s.focusedElem,y=s.selectionRange;if(c!==p&&p&&p.ownerDocument&&P1(p.ownerDocument.documentElement,p)){if(y!==null&&om(p)){if(c=y.start,s=y.end,s===void 0&&(s=c),"selectionStart"in p)p.selectionStart=c,p.selectionEnd=Math.min(s,p.value.length);else if(s=(c=p.ownerDocument||document)&&c.defaultView||window,s.getSelection){s=s.getSelection();var C=p.textContent.length,_=Math.min(y.start,C);y=y.end===void 0?_:Math.min(y.end,C),!s.extend&&_>y&&(C=y,y=_,_=C),C=R1(p,_);var R=R1(p,y);C&&R&&(s.rangeCount!==1||s.anchorNode!==C.node||s.anchorOffset!==C.offset||s.focusNode!==R.node||s.focusOffset!==R.offset)&&(c=c.createRange(),c.setStart(C.node,C.offset),s.removeAllRanges(),_>y?(s.addRange(c),s.extend(R.node,R.offset)):(c.setEnd(R.node,R.offset),s.addRange(c)))}}for(c=[],s=p;s=s.parentNode;)s.nodeType===1&&c.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<c.length;p++)s=c[p],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var w5=l&&"documentMode"in document&&11>=document.documentMode,Ta=null,sm=null,cc=null,am=!1;function N1(s,c,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;am||Ta==null||Ta!==pe(y)||(y=Ta,"selectionStart"in y&&om(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),cc&&lc(cc,y)||(cc=y,y=uh(sm,"onSelect"),0<y.length&&(c=new Qp("onSelect","select",null,c,p),s.push({event:c,listeners:y}),c.target=Ta)))}function ah(s,c){var p={};return p[s.toLowerCase()]=c.toLowerCase(),p["Webkit"+s]="webkit"+c,p["Moz"+s]="moz"+c,p}var Ea={animationend:ah("Animation","AnimationEnd"),animationiteration:ah("Animation","AnimationIteration"),animationstart:ah("Animation","AnimationStart"),transitionend:ah("Transition","TransitionEnd")},lm={},O1={};l&&(O1=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function lh(s){if(lm[s])return lm[s];if(!Ea[s])return s;var c=Ea[s],p;for(p in c)if(c.hasOwnProperty(p)&&p in O1)return lm[s]=c[p];return s}var F1=lh("animationend"),D1=lh("animationiteration"),I1=lh("animationstart"),j1=lh("transitionend"),z1=new Map,W1="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 zo(s,c){z1.set(s,c),o(c,[s])}for(var cm=0;cm<W1.length;cm++){var um=W1[cm],C5=um.toLowerCase(),S5=um[0].toUpperCase()+um.slice(1);zo(C5,"on"+S5)}zo(F1,"onAnimationEnd"),zo(D1,"onAnimationIteration"),zo(I1,"onAnimationStart"),zo("dblclick","onDoubleClick"),zo("focusin","onFocus"),zo("focusout","onBlur"),zo(j1,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("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 uc="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(" "),k5=new Set("cancel close invalid load scroll toggle".split(" ").concat(uc));function H1(s,c,p){var y=s.type||"unknown-event";s.currentTarget=p,En(y,c,void 0,s),s.currentTarget=null}function q1(s,c){c=(c&4)!==0;for(var p=0;p<s.length;p++){var y=s[p],C=y.event;y=y.listeners;t:{var _=void 0;if(c)for(var R=y.length-1;0<=R;R--){var j=y[R],Y=j.instance,nt=j.currentTarget;if(j=j.listener,Y!==_&&C.isPropagationStopped())break t;H1(C,j,nt),_=Y}else for(R=0;R<y.length;R++){if(j=y[R],Y=j.instance,nt=j.currentTarget,j=j.listener,Y!==_&&C.isPropagationStopped())break t;H1(C,j,nt),_=Y}}}if(Ji)throw s=Po,Ji=!1,Po=null,s}function Re(s,c){var p=c[vm];p===void 0&&(p=c[vm]=new Set);var y=s+"__bubble";p.has(y)||(V1(c,s,2,!1),p.add(y))}function hm(s,c,p){var y=0;c&&(y|=4),V1(p,s,y,c)}var ch="_reactListening"+Math.random().toString(36).slice(2);function hc(s){if(!s[ch]){s[ch]=!0,n.forEach(function(p){p!=="selectionchange"&&(k5.has(p)||hm(p,!1,s),hm(p,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[ch]||(c[ch]=!0,hm("selectionchange",!1,c))}}function V1(s,c,p,y){switch(p1(c)){case 1:var C=DA;break;case 4:C=IA;break;default:C=Gp}p=C.bind(null,c,p,s),C=void 0,!ii||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(C=!0),y?C!==void 0?s.addEventListener(c,p,{capture:!0,passive:C}):s.addEventListener(c,p,!0):C!==void 0?s.addEventListener(c,p,{passive:C}):s.addEventListener(c,p,!1)}function dm(s,c,p,y,C){var _=y;if((c&1)===0&&(c&2)===0&&y!==null)t:for(;;){if(y===null)return;var R=y.tag;if(R===3||R===4){var j=y.stateNode.containerInfo;if(j===C||j.nodeType===8&&j.parentNode===C)break;if(R===4)for(R=y.return;R!==null;){var Y=R.tag;if((Y===3||Y===4)&&(Y=R.stateNode.containerInfo,Y===C||Y.nodeType===8&&Y.parentNode===C))return;R=R.return}for(;j!==null;){if(R=Ss(j),R===null)return;if(Y=R.tag,Y===5||Y===6){y=_=R;continue t}j=j.parentNode}}y=y.return}bs(function(){var nt=_,ht=Rr(p),ft=[];t:{var ut=z1.get(s);if(ut!==void 0){var _t=Qp,At=s;switch(s){case"keypress":if(nh(p)===0)break t;case"keydown":case"keyup":_t=t5;break;case"focusin":At="focus",_t=tm;break;case"focusout":At="blur",_t=tm;break;case"beforeblur":case"afterblur":_t=tm;break;case"click":if(p.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_t=y1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_t=WA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_t=n5;break;case F1:case D1:case I1:_t=VA;break;case j1:_t=o5;break;case"scroll":_t=jA;break;case"wheel":_t=a5;break;case"copy":case"cut":case"paste":_t=YA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_t=x1}var Ot=(c&4)!==0,Ze=!Ot&&s==="scroll",tt=Ot?ut!==null?ut+"Capture":null:ut;Ot=[];for(var Q=nt,et;Q!==null;){et=Q;var vt=et.stateNode;if(et.tag===5&&vt!==null&&(et=vt,tt!==null&&(vt=Yr(Q,tt),vt!=null&&Ot.push(dc(Q,vt,et)))),Ze)break;Q=Q.return}0<Ot.length&&(ut=new _t(ut,At,null,p,ht),ft.push({event:ut,listeners:Ot}))}}if((c&7)===0){t:{if(ut=s==="mouseover"||s==="pointerover",_t=s==="mouseout"||s==="pointerout",ut&&p!==ri&&(At=p.relatedTarget||p.fromElement)&&(Ss(At)||At[to]))break t;if((_t||ut)&&(ut=ht.window===ht?ht:(ut=ht.ownerDocument)?ut.defaultView||ut.parentWindow:window,_t?(At=p.relatedTarget||p.toElement,_t=nt,At=At?Ss(At):null,At!==null&&(Ze=dn(At),At!==Ze||At.tag!==5&&At.tag!==6)&&(At=null)):(_t=null,At=nt),_t!==At)){if(Ot=y1,vt="onMouseLeave",tt="onMouseEnter",Q="mouse",(s==="pointerout"||s==="pointerover")&&(Ot=x1,vt="onPointerLeave",tt="onPointerEnter",Q="pointer"),Ze=_t==null?ut:Ma(_t),et=At==null?ut:Ma(At),ut=new Ot(vt,Q+"leave",_t,p,ht),ut.target=Ze,ut.relatedTarget=et,vt=null,Ss(ht)===nt&&(Ot=new Ot(tt,Q+"enter",At,p,ht),Ot.target=et,Ot.relatedTarget=Ze,vt=Ot),Ze=vt,_t&&At)e:{for(Ot=_t,tt=At,Q=0,et=Ot;et;et=$a(et))Q++;for(et=0,vt=tt;vt;vt=$a(vt))et++;for(;0<Q-et;)Ot=$a(Ot),Q--;for(;0<et-Q;)tt=$a(tt),et--;for(;Q--;){if(Ot===tt||tt!==null&&Ot===tt.alternate)break e;Ot=$a(Ot),tt=$a(tt)}Ot=null}else Ot=null;_t!==null&&U1(ft,ut,_t,Ot,!1),At!==null&&Ze!==null&&U1(ft,Ze,At,Ot,!0)}}t:{if(ut=nt?Ma(nt):window,_t=ut.nodeName&&ut.nodeName.toLowerCase(),_t==="select"||_t==="input"&&ut.type==="file")var It=p5;else if(_1(ut))if(E1)It=v5;else{It=g5;var Vt=m5}else(_t=ut.nodeName)&&_t.toLowerCase()==="input"&&(ut.type==="checkbox"||ut.type==="radio")&&(It=y5);if(It&&(It=It(s,nt))){T1(ft,It,p,ht);break t}Vt&&Vt(s,ut,nt),s==="focusout"&&(Vt=ut._wrapperState)&&Vt.controlled&&ut.type==="number"&&$e(ut,"number",ut.value)}switch(Vt=nt?Ma(nt):window,s){case"focusin":(_1(Vt)||Vt.contentEditable==="true")&&(Ta=Vt,sm=nt,cc=null);break;case"focusout":cc=sm=Ta=null;break;case"mousedown":am=!0;break;case"contextmenu":case"mouseup":case"dragend":am=!1,N1(ft,p,ht);break;case"selectionchange":if(w5)break;case"keydown":case"keyup":N1(ft,p,ht)}var Ut;if(rm)t:{switch(s){case"compositionstart":var Kt="onCompositionStart";break t;case"compositionend":Kt="onCompositionEnd";break t;case"compositionupdate":Kt="onCompositionUpdate";break t}Kt=void 0}else _a?S1(s,p)&&(Kt="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Kt="onCompositionStart");Kt&&(b1&&p.locale!=="ko"&&(_a||Kt!=="onCompositionStart"?Kt==="onCompositionEnd"&&_a&&(Ut=m1()):(jo=ht,Kp="value"in jo?jo.value:jo.textContent,_a=!0)),Vt=uh(nt,Kt),0<Vt.length&&(Kt=new v1(Kt,s,null,p,ht),ft.push({event:Kt,listeners:Vt}),Ut?Kt.data=Ut:(Ut=k1(p),Ut!==null&&(Kt.data=Ut)))),(Ut=c5?u5(s,p):h5(s,p))&&(nt=uh(nt,"onBeforeInput"),0<nt.length&&(ht=new v1("onBeforeInput","beforeinput",null,p,ht),ft.push({event:ht,listeners:nt}),ht.data=Ut))}q1(ft,c)})}function dc(s,c,p){return{instance:s,listener:c,currentTarget:p}}function uh(s,c){for(var p=c+"Capture",y=[];s!==null;){var C=s,_=C.stateNode;C.tag===5&&_!==null&&(C=_,_=Yr(s,p),_!=null&&y.unshift(dc(s,_,C)),_=Yr(s,c),_!=null&&y.push(dc(s,_,C))),s=s.return}return y}function $a(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function U1(s,c,p,y,C){for(var _=c._reactName,R=[];p!==null&&p!==y;){var j=p,Y=j.alternate,nt=j.stateNode;if(Y!==null&&Y===y)break;j.tag===5&&nt!==null&&(j=nt,C?(Y=Yr(p,_),Y!=null&&R.unshift(dc(p,Y,j))):C||(Y=Yr(p,_),Y!=null&&R.push(dc(p,Y,j)))),p=p.return}R.length!==0&&s.push({event:c,listeners:R})}var _5=/\r\n?/g,T5=/\u0000|\uFFFD/g;function Y1(s){return(typeof s=="string"?s:""+s).replace(_5,`
|
|
39
|
+
`).replace(T5,"")}function hh(s,c,p){if(c=Y1(c),Y1(s)!==c&&p)throw Error(r(425))}function dh(){}var fm=null,pm=null;function mm(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var gm=typeof setTimeout=="function"?setTimeout:void 0,E5=typeof clearTimeout=="function"?clearTimeout:void 0,G1=typeof Promise=="function"?Promise:void 0,$5=typeof queueMicrotask=="function"?queueMicrotask:typeof G1<"u"?function(s){return G1.resolve(null).then(s).catch(L5)}:gm;function L5(s){setTimeout(function(){throw s})}function ym(s,c){var p=c,y=0;do{var C=p.nextSibling;if(s.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"){if(y===0){s.removeChild(C),rc(c);return}y--}else p!=="$"&&p!=="$?"&&p!=="$!"||y++;p=C}while(p);rc(c)}function Wo(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return s}function X1(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"){if(c===0)return s;c--}else p==="/$"&&c++}s=s.previousSibling}return null}var La=Math.random().toString(36).slice(2),$i="__reactFiber$"+La,fc="__reactProps$"+La,to="__reactContainer$"+La,vm="__reactEvents$"+La,M5="__reactListeners$"+La,A5="__reactHandles$"+La;function Ss(s){var c=s[$i];if(c)return c;for(var p=s.parentNode;p;){if(c=p[to]||p[$i]){if(p=c.alternate,c.child!==null||p!==null&&p.child!==null)for(s=X1(s);s!==null;){if(p=s[$i])return p;s=X1(s)}return c}s=p,p=s.parentNode}return null}function pc(s){return s=s[$i]||s[to],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Ma(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function fh(s){return s[fc]||null}var xm=[],Aa=-1;function Ho(s){return{current:s}}function Pe(s){0>Aa||(s.current=xm[Aa],xm[Aa]=null,Aa--)}function Le(s,c){Aa++,xm[Aa]=s.current,s.current=c}var qo={},Pr=Ho(qo),fn=Ho(!1),ks=qo;function Ra(s,c){var p=s.type.contextTypes;if(!p)return qo;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var C={},_;for(_ in p)C[_]=c[_];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=c,s.__reactInternalMemoizedMaskedChildContext=C),C}function pn(s){return s=s.childContextTypes,s!=null}function ph(){Pe(fn),Pe(Pr)}function K1(s,c,p){if(Pr.current!==qo)throw Error(r(168));Le(Pr,c),Le(fn,p)}function Q1(s,c,p){var y=s.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return p;y=y.getChildContext();for(var C in y)if(!(C in c))throw Error(r(108,mt(s)||"Unknown",C));return X({},p,y)}function mh(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||qo,ks=Pr.current,Le(Pr,s),Le(fn,fn.current),!0}function Z1(s,c,p){var y=s.stateNode;if(!y)throw Error(r(169));p?(s=Q1(s,c,ks),y.__reactInternalMemoizedMergedChildContext=s,Pe(fn),Pe(Pr),Le(Pr,s)):Pe(fn),Le(fn,p)}var eo=null,gh=!1,bm=!1;function J1(s){eo===null?eo=[s]:eo.push(s)}function R5(s){gh=!0,J1(s)}function Vo(){if(!bm&&eo!==null){bm=!0;var s=0,c=be;try{var p=eo;for(be=1;s<p.length;s++){var y=p[s];do y=y(!0);while(y!==null)}eo=null,gh=!1}catch(C){throw eo!==null&&(eo=eo.slice(s+1)),G(rt,Vo),C}finally{be=c,bm=!1}}return null}var Pa=[],Ba=0,yh=null,vh=0,zn=[],Wn=0,_s=null,ro=1,no="";function Ts(s,c){Pa[Ba++]=vh,Pa[Ba++]=yh,yh=s,vh=c}function tb(s,c,p){zn[Wn++]=ro,zn[Wn++]=no,zn[Wn++]=_s,_s=s;var y=ro;s=no;var C=32-Xr(y)-1;y&=~(1<<C),p+=1;var _=32-Xr(c)+C;if(30<_){var R=C-C%5;_=(y&(1<<R)-1).toString(32),y>>=R,C-=R,ro=1<<32-Xr(c)+C|p<<C|y,no=_+s}else ro=1<<_|p<<C|y,no=s}function wm(s){s.return!==null&&(Ts(s,1),tb(s,1,0))}function Cm(s){for(;s===yh;)yh=Pa[--Ba],Pa[Ba]=null,vh=Pa[--Ba],Pa[Ba]=null;for(;s===_s;)_s=zn[--Wn],zn[Wn]=null,no=zn[--Wn],zn[Wn]=null,ro=zn[--Wn],zn[Wn]=null}var Ln=null,Mn=null,De=!1,si=null;function eb(s,c){var p=Un(5,null,null,0);p.elementType="DELETED",p.stateNode=c,p.return=s,c=s.deletions,c===null?(s.deletions=[p],s.flags|=16):c.push(p)}function rb(s,c){switch(s.tag){case 5:var p=s.type;return c=c.nodeType!==1||p.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(s.stateNode=c,Ln=s,Mn=Wo(c.firstChild),!0):!1;case 6:return c=s.pendingProps===""||c.nodeType!==3?null:c,c!==null?(s.stateNode=c,Ln=s,Mn=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(p=_s!==null?{id:ro,overflow:no}:null,s.memoizedState={dehydrated:c,treeContext:p,retryLane:1073741824},p=Un(18,null,null,0),p.stateNode=c,p.return=s,s.child=p,Ln=s,Mn=null,!0):!1;default:return!1}}function Sm(s){return(s.mode&1)!==0&&(s.flags&128)===0}function km(s){if(De){var c=Mn;if(c){var p=c;if(!rb(s,c)){if(Sm(s))throw Error(r(418));c=Wo(p.nextSibling);var y=Ln;c&&rb(s,c)?eb(y,p):(s.flags=s.flags&-4097|2,De=!1,Ln=s)}}else{if(Sm(s))throw Error(r(418));s.flags=s.flags&-4097|2,De=!1,Ln=s}}}function nb(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Ln=s}function xh(s){if(s!==Ln)return!1;if(!De)return nb(s),De=!0,!1;var c;if((c=s.tag!==3)&&!(c=s.tag!==5)&&(c=s.type,c=c!=="head"&&c!=="body"&&!mm(s.type,s.memoizedProps)),c&&(c=Mn)){if(Sm(s))throw ib(),Error(r(418));for(;c;)eb(s,c),c=Wo(c.nextSibling)}if(nb(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));t:{for(s=s.nextSibling,c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"){if(c===0){Mn=Wo(s.nextSibling);break t}c--}else p!=="$"&&p!=="$!"&&p!=="$?"||c++}s=s.nextSibling}Mn=null}}else Mn=Ln?Wo(s.stateNode.nextSibling):null;return!0}function ib(){for(var s=Mn;s;)s=Wo(s.nextSibling)}function Na(){Mn=Ln=null,De=!1}function _m(s){si===null?si=[s]:si.push(s)}var P5=L.ReactCurrentBatchConfig;function mc(s,c,p){if(s=p.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(r(309));var y=p.stateNode}if(!y)throw Error(r(147,s));var C=y,_=""+s;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===_?c.ref:(c=function(R){var j=C.refs;R===null?delete j[_]:j[_]=R},c._stringRef=_,c)}if(typeof s!="string")throw Error(r(284));if(!p._owner)throw Error(r(290,s))}return s}function bh(s,c){throw s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s))}function ob(s){var c=s._init;return c(s._payload)}function sb(s){function c(tt,Q){if(s){var et=tt.deletions;et===null?(tt.deletions=[Q],tt.flags|=16):et.push(Q)}}function p(tt,Q){if(!s)return null;for(;Q!==null;)c(tt,Q),Q=Q.sibling;return null}function y(tt,Q){for(tt=new Map;Q!==null;)Q.key!==null?tt.set(Q.key,Q):tt.set(Q.index,Q),Q=Q.sibling;return tt}function C(tt,Q){return tt=Jo(tt,Q),tt.index=0,tt.sibling=null,tt}function _(tt,Q,et){return tt.index=et,s?(et=tt.alternate,et!==null?(et=et.index,et<Q?(tt.flags|=2,Q):et):(tt.flags|=2,Q)):(tt.flags|=1048576,Q)}function R(tt){return s&&tt.alternate===null&&(tt.flags|=2),tt}function j(tt,Q,et,vt){return Q===null||Q.tag!==6?(Q=gg(et,tt.mode,vt),Q.return=tt,Q):(Q=C(Q,et),Q.return=tt,Q)}function Y(tt,Q,et,vt){var It=et.type;return It===B?ht(tt,Q,et.props.children,vt,et.key):Q!==null&&(Q.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===O&&ob(It)===Q.type)?(vt=C(Q,et.props),vt.ref=mc(tt,Q,et),vt.return=tt,vt):(vt=qh(et.type,et.key,et.props,null,tt.mode,vt),vt.ref=mc(tt,Q,et),vt.return=tt,vt)}function nt(tt,Q,et,vt){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==et.containerInfo||Q.stateNode.implementation!==et.implementation?(Q=yg(et,tt.mode,vt),Q.return=tt,Q):(Q=C(Q,et.children||[]),Q.return=tt,Q)}function ht(tt,Q,et,vt,It){return Q===null||Q.tag!==7?(Q=Bs(et,tt.mode,vt,It),Q.return=tt,Q):(Q=C(Q,et),Q.return=tt,Q)}function ft(tt,Q,et){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Q=gg(""+Q,tt.mode,et),Q.return=tt,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case A:return et=qh(Q.type,Q.key,Q.props,null,tt.mode,et),et.ref=mc(tt,null,Q),et.return=tt,et;case M:return Q=yg(Q,tt.mode,et),Q.return=tt,Q;case O:var vt=Q._init;return ft(tt,vt(Q._payload),et)}if(le(Q)||z(Q))return Q=Bs(Q,tt.mode,et,null),Q.return=tt,Q;bh(tt,Q)}return null}function ut(tt,Q,et,vt){var It=Q!==null?Q.key:null;if(typeof et=="string"&&et!==""||typeof et=="number")return It!==null?null:j(tt,Q,""+et,vt);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case A:return et.key===It?Y(tt,Q,et,vt):null;case M:return et.key===It?nt(tt,Q,et,vt):null;case O:return It=et._init,ut(tt,Q,It(et._payload),vt)}if(le(et)||z(et))return It!==null?null:ht(tt,Q,et,vt,null);bh(tt,et)}return null}function _t(tt,Q,et,vt,It){if(typeof vt=="string"&&vt!==""||typeof vt=="number")return tt=tt.get(et)||null,j(Q,tt,""+vt,It);if(typeof vt=="object"&&vt!==null){switch(vt.$$typeof){case A:return tt=tt.get(vt.key===null?et:vt.key)||null,Y(Q,tt,vt,It);case M:return tt=tt.get(vt.key===null?et:vt.key)||null,nt(Q,tt,vt,It);case O:var Vt=vt._init;return _t(tt,Q,et,Vt(vt._payload),It)}if(le(vt)||z(vt))return tt=tt.get(et)||null,ht(Q,tt,vt,It,null);bh(Q,vt)}return null}function At(tt,Q,et,vt){for(var It=null,Vt=null,Ut=Q,Kt=Q=0,Sr=null;Ut!==null&&Kt<et.length;Kt++){Ut.index>Kt?(Sr=Ut,Ut=null):Sr=Ut.sibling;var de=ut(tt,Ut,et[Kt],vt);if(de===null){Ut===null&&(Ut=Sr);break}s&&Ut&&de.alternate===null&&c(tt,Ut),Q=_(de,Q,Kt),Vt===null?It=de:Vt.sibling=de,Vt=de,Ut=Sr}if(Kt===et.length)return p(tt,Ut),De&&Ts(tt,Kt),It;if(Ut===null){for(;Kt<et.length;Kt++)Ut=ft(tt,et[Kt],vt),Ut!==null&&(Q=_(Ut,Q,Kt),Vt===null?It=Ut:Vt.sibling=Ut,Vt=Ut);return De&&Ts(tt,Kt),It}for(Ut=y(tt,Ut);Kt<et.length;Kt++)Sr=_t(Ut,tt,Kt,et[Kt],vt),Sr!==null&&(s&&Sr.alternate!==null&&Ut.delete(Sr.key===null?Kt:Sr.key),Q=_(Sr,Q,Kt),Vt===null?It=Sr:Vt.sibling=Sr,Vt=Sr);return s&&Ut.forEach(function(ts){return c(tt,ts)}),De&&Ts(tt,Kt),It}function Ot(tt,Q,et,vt){var It=z(et);if(typeof It!="function")throw Error(r(150));if(et=It.call(et),et==null)throw Error(r(151));for(var Vt=It=null,Ut=Q,Kt=Q=0,Sr=null,de=et.next();Ut!==null&&!de.done;Kt++,de=et.next()){Ut.index>Kt?(Sr=Ut,Ut=null):Sr=Ut.sibling;var ts=ut(tt,Ut,de.value,vt);if(ts===null){Ut===null&&(Ut=Sr);break}s&&Ut&&ts.alternate===null&&c(tt,Ut),Q=_(ts,Q,Kt),Vt===null?It=ts:Vt.sibling=ts,Vt=ts,Ut=Sr}if(de.done)return p(tt,Ut),De&&Ts(tt,Kt),It;if(Ut===null){for(;!de.done;Kt++,de=et.next())de=ft(tt,de.value,vt),de!==null&&(Q=_(de,Q,Kt),Vt===null?It=de:Vt.sibling=de,Vt=de);return De&&Ts(tt,Kt),It}for(Ut=y(tt,Ut);!de.done;Kt++,de=et.next())de=_t(Ut,tt,Kt,de.value,vt),de!==null&&(s&&de.alternate!==null&&Ut.delete(de.key===null?Kt:de.key),Q=_(de,Q,Kt),Vt===null?It=de:Vt.sibling=de,Vt=de);return s&&Ut.forEach(function(dR){return c(tt,dR)}),De&&Ts(tt,Kt),It}function Ze(tt,Q,et,vt){if(typeof et=="object"&&et!==null&&et.type===B&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case A:t:{for(var It=et.key,Vt=Q;Vt!==null;){if(Vt.key===It){if(It=et.type,It===B){if(Vt.tag===7){p(tt,Vt.sibling),Q=C(Vt,et.props.children),Q.return=tt,tt=Q;break t}}else if(Vt.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===O&&ob(It)===Vt.type){p(tt,Vt.sibling),Q=C(Vt,et.props),Q.ref=mc(tt,Vt,et),Q.return=tt,tt=Q;break t}p(tt,Vt);break}else c(tt,Vt);Vt=Vt.sibling}et.type===B?(Q=Bs(et.props.children,tt.mode,vt,et.key),Q.return=tt,tt=Q):(vt=qh(et.type,et.key,et.props,null,tt.mode,vt),vt.ref=mc(tt,Q,et),vt.return=tt,tt=vt)}return R(tt);case M:t:{for(Vt=et.key;Q!==null;){if(Q.key===Vt)if(Q.tag===4&&Q.stateNode.containerInfo===et.containerInfo&&Q.stateNode.implementation===et.implementation){p(tt,Q.sibling),Q=C(Q,et.children||[]),Q.return=tt,tt=Q;break t}else{p(tt,Q);break}else c(tt,Q);Q=Q.sibling}Q=yg(et,tt.mode,vt),Q.return=tt,tt=Q}return R(tt);case O:return Vt=et._init,Ze(tt,Q,Vt(et._payload),vt)}if(le(et))return At(tt,Q,et,vt);if(z(et))return Ot(tt,Q,et,vt);bh(tt,et)}return typeof et=="string"&&et!==""||typeof et=="number"?(et=""+et,Q!==null&&Q.tag===6?(p(tt,Q.sibling),Q=C(Q,et),Q.return=tt,tt=Q):(p(tt,Q),Q=gg(et,tt.mode,vt),Q.return=tt,tt=Q),R(tt)):p(tt,Q)}return Ze}var Oa=sb(!0),ab=sb(!1),wh=Ho(null),Ch=null,Fa=null,Tm=null;function Em(){Tm=Fa=Ch=null}function $m(s){var c=wh.current;Pe(wh),s._currentValue=c}function Lm(s,c,p){for(;s!==null;){var y=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),s===p)break;s=s.return}}function Da(s,c){Ch=s,Tm=Fa=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&c)!==0&&(mn=!0),s.firstContext=null)}function Hn(s){var c=s._currentValue;if(Tm!==s)if(s={context:s,memoizedValue:c,next:null},Fa===null){if(Ch===null)throw Error(r(308));Fa=s,Ch.dependencies={lanes:0,firstContext:s}}else Fa=Fa.next=s;return c}var Es=null;function Mm(s){Es===null?Es=[s]:Es.push(s)}function lb(s,c,p,y){var C=c.interleaved;return C===null?(p.next=p,Mm(c)):(p.next=C.next,C.next=p),c.interleaved=p,io(s,y)}function io(s,c){s.lanes|=c;var p=s.alternate;for(p!==null&&(p.lanes|=c),p=s,s=s.return;s!==null;)s.childLanes|=c,p=s.alternate,p!==null&&(p.childLanes|=c),p=s,s=s.return;return p.tag===3?p.stateNode:null}var Uo=!1;function Am(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cb(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function oo(s,c){return{eventTime:s,lane:c,tag:0,payload:null,callback:null,next:null}}function Yo(s,c,p){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(he&2)!==0){var C=y.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),y.pending=c,io(s,p)}return C=y.interleaved,C===null?(c.next=c,Mm(y)):(c.next=C.next,C.next=c),y.interleaved=c,io(s,p)}function Sh(s,c,p){if(c=c.updateQueue,c!==null&&(c=c.shared,(p&4194240)!==0)){var y=c.lanes;y&=s.pendingLanes,p|=y,c.lanes=p,Vp(s,p)}}function ub(s,c){var p=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var C=null,_=null;if(p=p.firstBaseUpdate,p!==null){do{var R={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};_===null?C=_=R:_=_.next=R,p=p.next}while(p!==null);_===null?C=_=c:_=_.next=c}else C=_=c;p={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:_,shared:y.shared,effects:y.effects},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=c:s.next=c,p.lastBaseUpdate=c}function kh(s,c,p,y){var C=s.updateQueue;Uo=!1;var _=C.firstBaseUpdate,R=C.lastBaseUpdate,j=C.shared.pending;if(j!==null){C.shared.pending=null;var Y=j,nt=Y.next;Y.next=null,R===null?_=nt:R.next=nt,R=Y;var ht=s.alternate;ht!==null&&(ht=ht.updateQueue,j=ht.lastBaseUpdate,j!==R&&(j===null?ht.firstBaseUpdate=nt:j.next=nt,ht.lastBaseUpdate=Y))}if(_!==null){var ft=C.baseState;R=0,ht=nt=Y=null,j=_;do{var ut=j.lane,_t=j.eventTime;if((y&ut)===ut){ht!==null&&(ht=ht.next={eventTime:_t,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});t:{var At=s,Ot=j;switch(ut=c,_t=p,Ot.tag){case 1:if(At=Ot.payload,typeof At=="function"){ft=At.call(_t,ft,ut);break t}ft=At;break t;case 3:At.flags=At.flags&-65537|128;case 0:if(At=Ot.payload,ut=typeof At=="function"?At.call(_t,ft,ut):At,ut==null)break t;ft=X({},ft,ut);break t;case 2:Uo=!0}}j.callback!==null&&j.lane!==0&&(s.flags|=64,ut=C.effects,ut===null?C.effects=[j]:ut.push(j))}else _t={eventTime:_t,lane:ut,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ht===null?(nt=ht=_t,Y=ft):ht=ht.next=_t,R|=ut;if(j=j.next,j===null){if(j=C.shared.pending,j===null)break;ut=j,j=ut.next,ut.next=null,C.lastBaseUpdate=ut,C.shared.pending=null}}while(!0);if(ht===null&&(Y=ft),C.baseState=Y,C.firstBaseUpdate=nt,C.lastBaseUpdate=ht,c=C.shared.interleaved,c!==null){C=c;do R|=C.lane,C=C.next;while(C!==c)}else _===null&&(C.shared.lanes=0);Ms|=R,s.lanes=R,s.memoizedState=ft}}function hb(s,c,p){if(s=c.effects,c.effects=null,s!==null)for(c=0;c<s.length;c++){var y=s[c],C=y.callback;if(C!==null){if(y.callback=null,y=p,typeof C!="function")throw Error(r(191,C));C.call(y)}}}var gc={},Li=Ho(gc),yc=Ho(gc),vc=Ho(gc);function $s(s){if(s===gc)throw Error(r(174));return s}function Rm(s,c){switch(Le(vc,c),Le(yc,s),Le(Li,gc),s=c.nodeType,s){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:He(null,"");break;default:s=s===8?c.parentNode:c,c=s.namespaceURI||null,s=s.tagName,c=He(c,s)}Pe(Li),Le(Li,c)}function Ia(){Pe(Li),Pe(yc),Pe(vc)}function db(s){$s(vc.current);var c=$s(Li.current),p=He(c,s.type);c!==p&&(Le(yc,s),Le(Li,p))}function Pm(s){yc.current===s&&(Pe(Li),Pe(yc))}var qe=Ho(0);function _h(s){for(var c=s;c!==null;){if(c.tag===13){var p=c.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Bm=[];function Nm(){for(var s=0;s<Bm.length;s++)Bm[s]._workInProgressVersionPrimary=null;Bm.length=0}var Th=L.ReactCurrentDispatcher,Om=L.ReactCurrentBatchConfig,Ls=0,Ve=null,hr=null,wr=null,Eh=!1,xc=!1,bc=0,B5=0;function Br(){throw Error(r(321))}function Fm(s,c){if(c===null)return!1;for(var p=0;p<c.length&&p<s.length;p++)if(!oi(s[p],c[p]))return!1;return!0}function Dm(s,c,p,y,C,_){if(Ls=_,Ve=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,Th.current=s===null||s.memoizedState===null?D5:I5,s=p(y,C),xc){_=0;do{if(xc=!1,bc=0,25<=_)throw Error(r(301));_+=1,wr=hr=null,c.updateQueue=null,Th.current=j5,s=p(y,C)}while(xc)}if(Th.current=Mh,c=hr!==null&&hr.next!==null,Ls=0,wr=hr=Ve=null,Eh=!1,c)throw Error(r(300));return s}function Im(){var s=bc!==0;return bc=0,s}function Mi(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wr===null?Ve.memoizedState=wr=s:wr=wr.next=s,wr}function qn(){if(hr===null){var s=Ve.alternate;s=s!==null?s.memoizedState:null}else s=hr.next;var c=wr===null?Ve.memoizedState:wr.next;if(c!==null)wr=c,hr=s;else{if(s===null)throw Error(r(310));hr=s,s={memoizedState:hr.memoizedState,baseState:hr.baseState,baseQueue:hr.baseQueue,queue:hr.queue,next:null},wr===null?Ve.memoizedState=wr=s:wr=wr.next=s}return wr}function wc(s,c){return typeof c=="function"?c(s):c}function jm(s){var c=qn(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var y=hr,C=y.baseQueue,_=p.pending;if(_!==null){if(C!==null){var R=C.next;C.next=_.next,_.next=R}y.baseQueue=C=_,p.pending=null}if(C!==null){_=C.next,y=y.baseState;var j=R=null,Y=null,nt=_;do{var ht=nt.lane;if((Ls&ht)===ht)Y!==null&&(Y=Y.next={lane:0,action:nt.action,hasEagerState:nt.hasEagerState,eagerState:nt.eagerState,next:null}),y=nt.hasEagerState?nt.eagerState:s(y,nt.action);else{var ft={lane:ht,action:nt.action,hasEagerState:nt.hasEagerState,eagerState:nt.eagerState,next:null};Y===null?(j=Y=ft,R=y):Y=Y.next=ft,Ve.lanes|=ht,Ms|=ht}nt=nt.next}while(nt!==null&&nt!==_);Y===null?R=y:Y.next=j,oi(y,c.memoizedState)||(mn=!0),c.memoizedState=y,c.baseState=R,c.baseQueue=Y,p.lastRenderedState=y}if(s=p.interleaved,s!==null){C=s;do _=C.lane,Ve.lanes|=_,Ms|=_,C=C.next;while(C!==s)}else C===null&&(p.lanes=0);return[c.memoizedState,p.dispatch]}function zm(s){var c=qn(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var y=p.dispatch,C=p.pending,_=c.memoizedState;if(C!==null){p.pending=null;var R=C=C.next;do _=s(_,R.action),R=R.next;while(R!==C);oi(_,c.memoizedState)||(mn=!0),c.memoizedState=_,c.baseQueue===null&&(c.baseState=_),p.lastRenderedState=_}return[_,y]}function fb(){}function pb(s,c){var p=Ve,y=qn(),C=c(),_=!oi(y.memoizedState,C);if(_&&(y.memoizedState=C,mn=!0),y=y.queue,Wm(yb.bind(null,p,y,s),[s]),y.getSnapshot!==c||_||wr!==null&&wr.memoizedState.tag&1){if(p.flags|=2048,Cc(9,gb.bind(null,p,y,C,c),void 0,null),Cr===null)throw Error(r(349));(Ls&30)!==0||mb(p,c,C)}return C}function mb(s,c,p){s.flags|=16384,s={getSnapshot:c,value:p},c=Ve.updateQueue,c===null?(c={lastEffect:null,stores:null},Ve.updateQueue=c,c.stores=[s]):(p=c.stores,p===null?c.stores=[s]:p.push(s))}function gb(s,c,p,y){c.value=p,c.getSnapshot=y,vb(c)&&xb(s)}function yb(s,c,p){return p(function(){vb(c)&&xb(s)})}function vb(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!oi(s,p)}catch{return!0}}function xb(s){var c=io(s,1);c!==null&&ui(c,s,1,-1)}function bb(s){var c=Mi();return typeof s=="function"&&(s=s()),c.memoizedState=c.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wc,lastRenderedState:s},c.queue=s,s=s.dispatch=F5.bind(null,Ve,s),[c.memoizedState,s]}function Cc(s,c,p,y){return s={tag:s,create:c,destroy:p,deps:y,next:null},c=Ve.updateQueue,c===null?(c={lastEffect:null,stores:null},Ve.updateQueue=c,c.lastEffect=s.next=s):(p=c.lastEffect,p===null?c.lastEffect=s.next=s:(y=p.next,p.next=s,s.next=y,c.lastEffect=s)),s}function wb(){return qn().memoizedState}function $h(s,c,p,y){var C=Mi();Ve.flags|=s,C.memoizedState=Cc(1|c,p,void 0,y===void 0?null:y)}function Lh(s,c,p,y){var C=qn();y=y===void 0?null:y;var _=void 0;if(hr!==null){var R=hr.memoizedState;if(_=R.destroy,y!==null&&Fm(y,R.deps)){C.memoizedState=Cc(c,p,_,y);return}}Ve.flags|=s,C.memoizedState=Cc(1|c,p,_,y)}function Cb(s,c){return $h(8390656,8,s,c)}function Wm(s,c){return Lh(2048,8,s,c)}function Sb(s,c){return Lh(4,2,s,c)}function kb(s,c){return Lh(4,4,s,c)}function _b(s,c){if(typeof c=="function")return s=s(),c(s),function(){c(null)};if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function Tb(s,c,p){return p=p!=null?p.concat([s]):null,Lh(4,4,_b.bind(null,c,s),p)}function Hm(){}function Eb(s,c){var p=qn();c=c===void 0?null:c;var y=p.memoizedState;return y!==null&&c!==null&&Fm(c,y[1])?y[0]:(p.memoizedState=[s,c],s)}function $b(s,c){var p=qn();c=c===void 0?null:c;var y=p.memoizedState;return y!==null&&c!==null&&Fm(c,y[1])?y[0]:(s=s(),p.memoizedState=[s,c],s)}function Lb(s,c,p){return(Ls&21)===0?(s.baseState&&(s.baseState=!1,mn=!0),s.memoizedState=p):(oi(p,c)||(p=o1(),Ve.lanes|=p,Ms|=p,s.baseState=!0),c)}function N5(s,c){var p=be;be=p!==0&&4>p?p:4,s(!0);var y=Om.transition;Om.transition={};try{s(!1),c()}finally{be=p,Om.transition=y}}function Mb(){return qn().memoizedState}function O5(s,c,p){var y=Qo(s);if(p={lane:y,action:p,hasEagerState:!1,eagerState:null,next:null},Ab(s))Rb(c,p);else if(p=lb(s,c,p,y),p!==null){var C=Qr();ui(p,s,y,C),Pb(p,c,y)}}function F5(s,c,p){var y=Qo(s),C={lane:y,action:p,hasEagerState:!1,eagerState:null,next:null};if(Ab(s))Rb(c,C);else{var _=s.alternate;if(s.lanes===0&&(_===null||_.lanes===0)&&(_=c.lastRenderedReducer,_!==null))try{var R=c.lastRenderedState,j=_(R,p);if(C.hasEagerState=!0,C.eagerState=j,oi(j,R)){var Y=c.interleaved;Y===null?(C.next=C,Mm(c)):(C.next=Y.next,Y.next=C),c.interleaved=C;return}}catch{}finally{}p=lb(s,c,C,y),p!==null&&(C=Qr(),ui(p,s,y,C),Pb(p,c,y))}}function Ab(s){var c=s.alternate;return s===Ve||c!==null&&c===Ve}function Rb(s,c){xc=Eh=!0;var p=s.pending;p===null?c.next=c:(c.next=p.next,p.next=c),s.pending=c}function Pb(s,c,p){if((p&4194240)!==0){var y=c.lanes;y&=s.pendingLanes,p|=y,c.lanes=p,Vp(s,p)}}var Mh={readContext:Hn,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},D5={readContext:Hn,useCallback:function(s,c){return Mi().memoizedState=[s,c===void 0?null:c],s},useContext:Hn,useEffect:Cb,useImperativeHandle:function(s,c,p){return p=p!=null?p.concat([s]):null,$h(4194308,4,_b.bind(null,c,s),p)},useLayoutEffect:function(s,c){return $h(4194308,4,s,c)},useInsertionEffect:function(s,c){return $h(4,2,s,c)},useMemo:function(s,c){var p=Mi();return c=c===void 0?null:c,s=s(),p.memoizedState=[s,c],s},useReducer:function(s,c,p){var y=Mi();return c=p!==void 0?p(c):c,y.memoizedState=y.baseState=c,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:c},y.queue=s,s=s.dispatch=O5.bind(null,Ve,s),[y.memoizedState,s]},useRef:function(s){var c=Mi();return s={current:s},c.memoizedState=s},useState:bb,useDebugValue:Hm,useDeferredValue:function(s){return Mi().memoizedState=s},useTransition:function(){var s=bb(!1),c=s[0];return s=N5.bind(null,s[1]),Mi().memoizedState=s,[c,s]},useMutableSource:function(){},useSyncExternalStore:function(s,c,p){var y=Ve,C=Mi();if(De){if(p===void 0)throw Error(r(407));p=p()}else{if(p=c(),Cr===null)throw Error(r(349));(Ls&30)!==0||mb(y,c,p)}C.memoizedState=p;var _={value:p,getSnapshot:c};return C.queue=_,Cb(yb.bind(null,y,_,s),[s]),y.flags|=2048,Cc(9,gb.bind(null,y,_,p,c),void 0,null),p},useId:function(){var s=Mi(),c=Cr.identifierPrefix;if(De){var p=no,y=ro;p=(y&~(1<<32-Xr(y)-1)).toString(32)+p,c=":"+c+"R"+p,p=bc++,0<p&&(c+="H"+p.toString(32)),c+=":"}else p=B5++,c=":"+c+"r"+p.toString(32)+":";return s.memoizedState=c},unstable_isNewReconciler:!1},I5={readContext:Hn,useCallback:Eb,useContext:Hn,useEffect:Wm,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:kb,useMemo:$b,useReducer:jm,useRef:wb,useState:function(){return jm(wc)},useDebugValue:Hm,useDeferredValue:function(s){var c=qn();return Lb(c,hr.memoizedState,s)},useTransition:function(){var s=jm(wc)[0],c=qn().memoizedState;return[s,c]},useMutableSource:fb,useSyncExternalStore:pb,useId:Mb,unstable_isNewReconciler:!1},j5={readContext:Hn,useCallback:Eb,useContext:Hn,useEffect:Wm,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:kb,useMemo:$b,useReducer:zm,useRef:wb,useState:function(){return zm(wc)},useDebugValue:Hm,useDeferredValue:function(s){var c=qn();return hr===null?c.memoizedState=s:Lb(c,hr.memoizedState,s)},useTransition:function(){var s=zm(wc)[0],c=qn().memoizedState;return[s,c]},useMutableSource:fb,useSyncExternalStore:pb,useId:Mb,unstable_isNewReconciler:!1};function ai(s,c){if(s&&s.defaultProps){c=X({},c),s=s.defaultProps;for(var p in s)c[p]===void 0&&(c[p]=s[p]);return c}return c}function qm(s,c,p,y){c=s.memoizedState,p=p(y,c),p=p==null?c:X({},c,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var Ah={isMounted:function(s){return(s=s._reactInternals)?dn(s)===s:!1},enqueueSetState:function(s,c,p){s=s._reactInternals;var y=Qr(),C=Qo(s),_=oo(y,C);_.payload=c,p!=null&&(_.callback=p),c=Yo(s,_,C),c!==null&&(ui(c,s,C,y),Sh(c,s,C))},enqueueReplaceState:function(s,c,p){s=s._reactInternals;var y=Qr(),C=Qo(s),_=oo(y,C);_.tag=1,_.payload=c,p!=null&&(_.callback=p),c=Yo(s,_,C),c!==null&&(ui(c,s,C,y),Sh(c,s,C))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var p=Qr(),y=Qo(s),C=oo(p,y);C.tag=2,c!=null&&(C.callback=c),c=Yo(s,C,y),c!==null&&(ui(c,s,y,p),Sh(c,s,y))}};function Bb(s,c,p,y,C,_,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,_,R):c.prototype&&c.prototype.isPureReactComponent?!lc(p,y)||!lc(C,_):!0}function Nb(s,c,p){var y=!1,C=qo,_=c.contextType;return typeof _=="object"&&_!==null?_=Hn(_):(C=pn(c)?ks:Pr.current,y=c.contextTypes,_=(y=y!=null)?Ra(s,C):qo),c=new c(p,_),s.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ah,s.stateNode=c,c._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=C,s.__reactInternalMemoizedMaskedChildContext=_),c}function Ob(s,c,p,y){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(p,y),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(p,y),c.state!==s&&Ah.enqueueReplaceState(c,c.state,null)}function Vm(s,c,p,y){var C=s.stateNode;C.props=p,C.state=s.memoizedState,C.refs={},Am(s);var _=c.contextType;typeof _=="object"&&_!==null?C.context=Hn(_):(_=pn(c)?ks:Pr.current,C.context=Ra(s,_)),C.state=s.memoizedState,_=c.getDerivedStateFromProps,typeof _=="function"&&(qm(s,c,_,p),C.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(c=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),c!==C.state&&Ah.enqueueReplaceState(C,C.state,null),kh(s,p,C,y),C.state=s.memoizedState),typeof C.componentDidMount=="function"&&(s.flags|=4194308)}function ja(s,c){try{var p="",y=c;do p+=dt(y),y=y.return;while(y);var C=p}catch(_){C=`
|
|
40
|
+
Error generating stack: `+_.message+`
|
|
41
|
+
`+_.stack}return{value:s,source:c,stack:C,digest:null}}function Um(s,c,p){return{value:s,source:null,stack:p??null,digest:c??null}}function Ym(s,c){try{console.error(c.value)}catch(p){setTimeout(function(){throw p})}}var z5=typeof WeakMap=="function"?WeakMap:Map;function Fb(s,c,p){p=oo(-1,p),p.tag=3,p.payload={element:null};var y=c.value;return p.callback=function(){Dh||(Dh=!0,lg=y),Ym(s,c)},p}function Db(s,c,p){p=oo(-1,p),p.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var C=c.value;p.payload=function(){return y(C)},p.callback=function(){Ym(s,c)}}var _=s.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(p.callback=function(){Ym(s,c),typeof y!="function"&&(Xo===null?Xo=new Set([this]):Xo.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})}),p}function Ib(s,c,p){var y=s.pingCache;if(y===null){y=s.pingCache=new z5;var C=new Set;y.set(c,C)}else C=y.get(c),C===void 0&&(C=new Set,y.set(c,C));C.has(p)||(C.add(p),s=eR.bind(null,s,c,p),c.then(s,s))}function jb(s){do{var c;if((c=s.tag===13)&&(c=s.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return s;s=s.return}while(s!==null);return null}function zb(s,c,p,y,C){return(s.mode&1)===0?(s===c?s.flags|=65536:(s.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(c=oo(-1,1),c.tag=2,Yo(p,c,1))),p.lanes|=1),s):(s.flags|=65536,s.lanes=C,s)}var W5=L.ReactCurrentOwner,mn=!1;function Kr(s,c,p,y){c.child=s===null?ab(c,null,p,y):Oa(c,s.child,p,y)}function Wb(s,c,p,y,C){p=p.render;var _=c.ref;return Da(c,C),y=Dm(s,c,p,y,_,C),p=Im(),s!==null&&!mn?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~C,so(s,c,C)):(De&&p&&wm(c),c.flags|=1,Kr(s,c,y,C),c.child)}function Hb(s,c,p,y,C){if(s===null){var _=p.type;return typeof _=="function"&&!mg(_)&&_.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(c.tag=15,c.type=_,qb(s,c,_,y,C)):(s=qh(p.type,null,y,c,c.mode,C),s.ref=c.ref,s.return=c,c.child=s)}if(_=s.child,(s.lanes&C)===0){var R=_.memoizedProps;if(p=p.compare,p=p!==null?p:lc,p(R,y)&&s.ref===c.ref)return so(s,c,C)}return c.flags|=1,s=Jo(_,y),s.ref=c.ref,s.return=c,c.child=s}function qb(s,c,p,y,C){if(s!==null){var _=s.memoizedProps;if(lc(_,y)&&s.ref===c.ref)if(mn=!1,c.pendingProps=y=_,(s.lanes&C)!==0)(s.flags&131072)!==0&&(mn=!0);else return c.lanes=s.lanes,so(s,c,C)}return Gm(s,c,p,y,C)}function Vb(s,c,p){var y=c.pendingProps,C=y.children,_=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(Wa,An),An|=p;else{if((p&1073741824)===0)return s=_!==null?_.baseLanes|p:p,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:s,cachePool:null,transitions:null},c.updateQueue=null,Le(Wa,An),An|=s,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=_!==null?_.baseLanes:p,Le(Wa,An),An|=y}else _!==null?(y=_.baseLanes|p,c.memoizedState=null):y=p,Le(Wa,An),An|=y;return Kr(s,c,C,p),c.child}function Ub(s,c){var p=c.ref;(s===null&&p!==null||s!==null&&s.ref!==p)&&(c.flags|=512,c.flags|=2097152)}function Gm(s,c,p,y,C){var _=pn(p)?ks:Pr.current;return _=Ra(c,_),Da(c,C),p=Dm(s,c,p,y,_,C),y=Im(),s!==null&&!mn?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~C,so(s,c,C)):(De&&y&&wm(c),c.flags|=1,Kr(s,c,p,C),c.child)}function Yb(s,c,p,y,C){if(pn(p)){var _=!0;mh(c)}else _=!1;if(Da(c,C),c.stateNode===null)Ph(s,c),Nb(c,p,y),Vm(c,p,y,C),y=!0;else if(s===null){var R=c.stateNode,j=c.memoizedProps;R.props=j;var Y=R.context,nt=p.contextType;typeof nt=="object"&&nt!==null?nt=Hn(nt):(nt=pn(p)?ks:Pr.current,nt=Ra(c,nt));var ht=p.getDerivedStateFromProps,ft=typeof ht=="function"||typeof R.getSnapshotBeforeUpdate=="function";ft||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(j!==y||Y!==nt)&&Ob(c,R,y,nt),Uo=!1;var ut=c.memoizedState;R.state=ut,kh(c,y,R,C),Y=c.memoizedState,j!==y||ut!==Y||fn.current||Uo?(typeof ht=="function"&&(qm(c,p,ht,y),Y=c.memoizedState),(j=Uo||Bb(c,p,j,y,ut,Y,nt))?(ft||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=Y),R.props=y,R.state=Y,R.context=nt,y=j):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{R=c.stateNode,cb(s,c),j=c.memoizedProps,nt=c.type===c.elementType?j:ai(c.type,j),R.props=nt,ft=c.pendingProps,ut=R.context,Y=p.contextType,typeof Y=="object"&&Y!==null?Y=Hn(Y):(Y=pn(p)?ks:Pr.current,Y=Ra(c,Y));var _t=p.getDerivedStateFromProps;(ht=typeof _t=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(j!==ft||ut!==Y)&&Ob(c,R,y,Y),Uo=!1,ut=c.memoizedState,R.state=ut,kh(c,y,R,C);var At=c.memoizedState;j!==ft||ut!==At||fn.current||Uo?(typeof _t=="function"&&(qm(c,p,_t,y),At=c.memoizedState),(nt=Uo||Bb(c,p,nt,y,ut,At,Y)||!1)?(ht||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(y,At,Y),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(y,At,Y)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||j===s.memoizedProps&&ut===s.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||j===s.memoizedProps&&ut===s.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=At),R.props=y,R.state=At,R.context=Y,y=nt):(typeof R.componentDidUpdate!="function"||j===s.memoizedProps&&ut===s.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||j===s.memoizedProps&&ut===s.memoizedState||(c.flags|=1024),y=!1)}return Xm(s,c,p,y,_,C)}function Xm(s,c,p,y,C,_){Ub(s,c);var R=(c.flags&128)!==0;if(!y&&!R)return C&&Z1(c,p,!1),so(s,c,_);y=c.stateNode,W5.current=c;var j=R&&typeof p.getDerivedStateFromError!="function"?null:y.render();return c.flags|=1,s!==null&&R?(c.child=Oa(c,s.child,null,_),c.child=Oa(c,null,j,_)):Kr(s,c,j,_),c.memoizedState=y.state,C&&Z1(c,p,!0),c.child}function Gb(s){var c=s.stateNode;c.pendingContext?K1(s,c.pendingContext,c.pendingContext!==c.context):c.context&&K1(s,c.context,!1),Rm(s,c.containerInfo)}function Xb(s,c,p,y,C){return Na(),_m(C),c.flags|=256,Kr(s,c,p,y),c.child}var Km={dehydrated:null,treeContext:null,retryLane:0};function Qm(s){return{baseLanes:s,cachePool:null,transitions:null}}function Kb(s,c,p){var y=c.pendingProps,C=qe.current,_=!1,R=(c.flags&128)!==0,j;if((j=R)||(j=s!==null&&s.memoizedState===null?!1:(C&2)!==0),j?(_=!0,c.flags&=-129):(s===null||s.memoizedState!==null)&&(C|=1),Le(qe,C&1),s===null)return km(c),s=c.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((c.mode&1)===0?c.lanes=1:s.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(R=y.children,s=y.fallback,_?(y=c.mode,_=c.child,R={mode:"hidden",children:R},(y&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=R):_=Vh(R,y,0,null),s=Bs(s,y,p,null),_.return=c,s.return=c,_.sibling=s,c.child=_,c.child.memoizedState=Qm(p),c.memoizedState=Km,s):Zm(c,R));if(C=s.memoizedState,C!==null&&(j=C.dehydrated,j!==null))return H5(s,c,R,y,j,C,p);if(_){_=y.fallback,R=c.mode,C=s.child,j=C.sibling;var Y={mode:"hidden",children:y.children};return(R&1)===0&&c.child!==C?(y=c.child,y.childLanes=0,y.pendingProps=Y,c.deletions=null):(y=Jo(C,Y),y.subtreeFlags=C.subtreeFlags&14680064),j!==null?_=Jo(j,_):(_=Bs(_,R,p,null),_.flags|=2),_.return=c,y.return=c,y.sibling=_,c.child=y,y=_,_=c.child,R=s.child.memoizedState,R=R===null?Qm(p):{baseLanes:R.baseLanes|p,cachePool:null,transitions:R.transitions},_.memoizedState=R,_.childLanes=s.childLanes&~p,c.memoizedState=Km,y}return _=s.child,s=_.sibling,y=Jo(_,{mode:"visible",children:y.children}),(c.mode&1)===0&&(y.lanes=p),y.return=c,y.sibling=null,s!==null&&(p=c.deletions,p===null?(c.deletions=[s],c.flags|=16):p.push(s)),c.child=y,c.memoizedState=null,y}function Zm(s,c){return c=Vh({mode:"visible",children:c},s.mode,0,null),c.return=s,s.child=c}function Rh(s,c,p,y){return y!==null&&_m(y),Oa(c,s.child,null,p),s=Zm(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function H5(s,c,p,y,C,_,R){if(p)return c.flags&256?(c.flags&=-257,y=Um(Error(r(422))),Rh(s,c,R,y)):c.memoizedState!==null?(c.child=s.child,c.flags|=128,null):(_=y.fallback,C=c.mode,y=Vh({mode:"visible",children:y.children},C,0,null),_=Bs(_,C,R,null),_.flags|=2,y.return=c,_.return=c,y.sibling=_,c.child=y,(c.mode&1)!==0&&Oa(c,s.child,null,R),c.child.memoizedState=Qm(R),c.memoizedState=Km,_);if((c.mode&1)===0)return Rh(s,c,R,null);if(C.data==="$!"){if(y=C.nextSibling&&C.nextSibling.dataset,y)var j=y.dgst;return y=j,_=Error(r(419)),y=Um(_,y,void 0),Rh(s,c,R,y)}if(j=(R&s.childLanes)!==0,mn||j){if(y=Cr,y!==null){switch(R&-R){case 4:C=2;break;case 16:C=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:C=32;break;case 536870912:C=268435456;break;default:C=0}C=(C&(y.suspendedLanes|R))!==0?0:C,C!==0&&C!==_.retryLane&&(_.retryLane=C,io(s,C),ui(y,s,C,-1))}return pg(),y=Um(Error(r(421))),Rh(s,c,R,y)}return C.data==="$?"?(c.flags|=128,c.child=s.child,c=rR.bind(null,s),C._reactRetry=c,null):(s=_.treeContext,Mn=Wo(C.nextSibling),Ln=c,De=!0,si=null,s!==null&&(zn[Wn++]=ro,zn[Wn++]=no,zn[Wn++]=_s,ro=s.id,no=s.overflow,_s=c),c=Zm(c,y.children),c.flags|=4096,c)}function Qb(s,c,p){s.lanes|=c;var y=s.alternate;y!==null&&(y.lanes|=c),Lm(s.return,c,p)}function Jm(s,c,p,y,C){var _=s.memoizedState;_===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:C}:(_.isBackwards=c,_.rendering=null,_.renderingStartTime=0,_.last=y,_.tail=p,_.tailMode=C)}function Zb(s,c,p){var y=c.pendingProps,C=y.revealOrder,_=y.tail;if(Kr(s,c,y.children,p),y=qe.current,(y&2)!==0)y=y&1|2,c.flags|=128;else{if(s!==null&&(s.flags&128)!==0)t:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Qb(s,p,c);else if(s.tag===19)Qb(s,p,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break t;for(;s.sibling===null;){if(s.return===null||s.return===c)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(Le(qe,y),(c.mode&1)===0)c.memoizedState=null;else switch(C){case"forwards":for(p=c.child,C=null;p!==null;)s=p.alternate,s!==null&&_h(s)===null&&(C=p),p=p.sibling;p=C,p===null?(C=c.child,c.child=null):(C=p.sibling,p.sibling=null),Jm(c,!1,C,p,_);break;case"backwards":for(p=null,C=c.child,c.child=null;C!==null;){if(s=C.alternate,s!==null&&_h(s)===null){c.child=C;break}s=C.sibling,C.sibling=p,p=C,C=s}Jm(c,!0,p,null,_);break;case"together":Jm(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Ph(s,c){(c.mode&1)===0&&s!==null&&(s.alternate=null,c.alternate=null,c.flags|=2)}function so(s,c,p){if(s!==null&&(c.dependencies=s.dependencies),Ms|=c.lanes,(p&c.childLanes)===0)return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,p=Jo(s,s.pendingProps),c.child=p,p.return=c;s.sibling!==null;)s=s.sibling,p=p.sibling=Jo(s,s.pendingProps),p.return=c;p.sibling=null}return c.child}function q5(s,c,p){switch(c.tag){case 3:Gb(c),Na();break;case 5:db(c);break;case 1:pn(c.type)&&mh(c);break;case 4:Rm(c,c.stateNode.containerInfo);break;case 10:var y=c.type._context,C=c.memoizedProps.value;Le(wh,y._currentValue),y._currentValue=C;break;case 13:if(y=c.memoizedState,y!==null)return y.dehydrated!==null?(Le(qe,qe.current&1),c.flags|=128,null):(p&c.child.childLanes)!==0?Kb(s,c,p):(Le(qe,qe.current&1),s=so(s,c,p),s!==null?s.sibling:null);Le(qe,qe.current&1);break;case 19:if(y=(p&c.childLanes)!==0,(s.flags&128)!==0){if(y)return Zb(s,c,p);c.flags|=128}if(C=c.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Le(qe,qe.current),y)break;return null;case 22:case 23:return c.lanes=0,Vb(s,c,p)}return so(s,c,p)}var Jb,tg,tw,ew;Jb=function(s,c){for(var p=c.child;p!==null;){if(p.tag===5||p.tag===6)s.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===c)break;for(;p.sibling===null;){if(p.return===null||p.return===c)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},tg=function(){},tw=function(s,c,p,y){var C=s.memoizedProps;if(C!==y){s=c.stateNode,$s(Li.current);var _=null;switch(p){case"input":C=Oe(s,C),y=Oe(s,y),_=[];break;case"select":C=X({},C,{value:void 0}),y=X({},y,{value:void 0}),_=[];break;case"textarea":C=ze(s,C),y=ze(s,y),_=[];break;default:typeof C.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=dh)}Me(p,y);var R;p=null;for(nt in C)if(!y.hasOwnProperty(nt)&&C.hasOwnProperty(nt)&&C[nt]!=null)if(nt==="style"){var j=C[nt];for(R in j)j.hasOwnProperty(R)&&(p||(p={}),p[R]="")}else nt!=="dangerouslySetInnerHTML"&&nt!=="children"&&nt!=="suppressContentEditableWarning"&&nt!=="suppressHydrationWarning"&&nt!=="autoFocus"&&(i.hasOwnProperty(nt)?_||(_=[]):(_=_||[]).push(nt,null));for(nt in y){var Y=y[nt];if(j=C!=null?C[nt]:void 0,y.hasOwnProperty(nt)&&Y!==j&&(Y!=null||j!=null))if(nt==="style")if(j){for(R in j)!j.hasOwnProperty(R)||Y&&Y.hasOwnProperty(R)||(p||(p={}),p[R]="");for(R in Y)Y.hasOwnProperty(R)&&j[R]!==Y[R]&&(p||(p={}),p[R]=Y[R])}else p||(_||(_=[]),_.push(nt,p)),p=Y;else nt==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,j=j?j.__html:void 0,Y!=null&&j!==Y&&(_=_||[]).push(nt,Y)):nt==="children"?typeof Y!="string"&&typeof Y!="number"||(_=_||[]).push(nt,""+Y):nt!=="suppressContentEditableWarning"&&nt!=="suppressHydrationWarning"&&(i.hasOwnProperty(nt)?(Y!=null&&nt==="onScroll"&&Re("scroll",s),_||j===Y||(_=[])):(_=_||[]).push(nt,Y))}p&&(_=_||[]).push("style",p);var nt=_;(c.updateQueue=nt)&&(c.flags|=4)}},ew=function(s,c,p,y){p!==y&&(c.flags|=4)};function Sc(s,c){if(!De)switch(s.tailMode){case"hidden":c=s.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Nr(s){var c=s.alternate!==null&&s.alternate.child===s.child,p=0,y=0;if(c)for(var C=s.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags&14680064,y|=C.flags&14680064,C.return=s,C=C.sibling;else for(C=s.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=s,C=C.sibling;return s.subtreeFlags|=y,s.childLanes=p,c}function V5(s,c,p){var y=c.pendingProps;switch(Cm(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nr(c),null;case 1:return pn(c.type)&&ph(),Nr(c),null;case 3:return y=c.stateNode,Ia(),Pe(fn),Pe(Pr),Nm(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(xh(c)?c.flags|=4:s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,si!==null&&(hg(si),si=null))),tg(s,c),Nr(c),null;case 5:Pm(c);var C=$s(vc.current);if(p=c.type,s!==null&&c.stateNode!=null)tw(s,c,p,y,C),s.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!y){if(c.stateNode===null)throw Error(r(166));return Nr(c),null}if(s=$s(Li.current),xh(c)){y=c.stateNode,p=c.type;var _=c.memoizedProps;switch(y[$i]=c,y[fc]=_,s=(c.mode&1)!==0,p){case"dialog":Re("cancel",y),Re("close",y);break;case"iframe":case"object":case"embed":Re("load",y);break;case"video":case"audio":for(C=0;C<uc.length;C++)Re(uc[C],y);break;case"source":Re("error",y);break;case"img":case"image":case"link":Re("error",y),Re("load",y);break;case"details":Re("toggle",y);break;case"input":Ue(y,_),Re("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!_.multiple},Re("invalid",y);break;case"textarea":nr(y,_),Re("invalid",y)}Me(p,_),C=null;for(var R in _)if(_.hasOwnProperty(R)){var j=_[R];R==="children"?typeof j=="string"?y.textContent!==j&&(_.suppressHydrationWarning!==!0&&hh(y.textContent,j,s),C=["children",j]):typeof j=="number"&&y.textContent!==""+j&&(_.suppressHydrationWarning!==!0&&hh(y.textContent,j,s),C=["children",""+j]):i.hasOwnProperty(R)&&j!=null&&R==="onScroll"&&Re("scroll",y)}switch(p){case"input":ee(y),ar(y,_,!0);break;case"textarea":ee(y),We(y);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(y.onclick=dh)}y=C,c.updateQueue=y,y!==null&&(c.flags|=4)}else{R=C.nodeType===9?C:C.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=lr(p)),s==="http://www.w3.org/1999/xhtml"?p==="script"?(s=R.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=R.createElement(p,{is:y.is}):(s=R.createElement(p),p==="select"&&(R=s,y.multiple?R.multiple=!0:y.size&&(R.size=y.size))):s=R.createElementNS(s,p),s[$i]=c,s[fc]=y,Jb(s,c,!1,!1),c.stateNode=s;t:{switch(R=br(p,y),p){case"dialog":Re("cancel",s),Re("close",s),C=y;break;case"iframe":case"object":case"embed":Re("load",s),C=y;break;case"video":case"audio":for(C=0;C<uc.length;C++)Re(uc[C],s);C=y;break;case"source":Re("error",s),C=y;break;case"img":case"image":case"link":Re("error",s),Re("load",s),C=y;break;case"details":Re("toggle",s),C=y;break;case"input":Ue(s,y),C=Oe(s,y),Re("invalid",s);break;case"option":C=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},C=X({},y,{value:void 0}),Re("invalid",s);break;case"textarea":nr(s,y),C=ze(s,y),Re("invalid",s);break;default:C=y}Me(p,C),j=C;for(_ in j)if(j.hasOwnProperty(_)){var Y=j[_];_==="style"?jn(s,Y):_==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,Y!=null&&Fe(s,Y)):_==="children"?typeof Y=="string"?(p!=="textarea"||Y!=="")&&Ye(s,Y):typeof Y=="number"&&Ye(s,""+Y):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?Y!=null&&_==="onScroll"&&Re("scroll",s):Y!=null&&E(s,_,Y,R))}switch(p){case"input":ee(s),ar(s,y,!1);break;case"textarea":ee(s),We(s);break;case"option":y.value!=null&&s.setAttribute("value",""+xt(y.value));break;case"select":s.multiple=!!y.multiple,_=y.value,_!=null?we(s,!!y.multiple,_,!1):y.defaultValue!=null&&we(s,!!y.multiple,y.defaultValue,!0);break;default:typeof C.onClick=="function"&&(s.onclick=dh)}switch(p){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break t;case"img":y=!0;break t;default:y=!1}}y&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return Nr(c),null;case 6:if(s&&c.stateNode!=null)ew(s,c,s.memoizedProps,y);else{if(typeof y!="string"&&c.stateNode===null)throw Error(r(166));if(p=$s(vc.current),$s(Li.current),xh(c)){if(y=c.stateNode,p=c.memoizedProps,y[$i]=c,(_=y.nodeValue!==p)&&(s=Ln,s!==null))switch(s.tag){case 3:hh(y.nodeValue,p,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&hh(y.nodeValue,p,(s.mode&1)!==0)}_&&(c.flags|=4)}else y=(p.nodeType===9?p:p.ownerDocument).createTextNode(y),y[$i]=c,c.stateNode=y}return Nr(c),null;case 13:if(Pe(qe),y=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(De&&Mn!==null&&(c.mode&1)!==0&&(c.flags&128)===0)ib(),Na(),c.flags|=98560,_=!1;else if(_=xh(c),y!==null&&y.dehydrated!==null){if(s===null){if(!_)throw Error(r(318));if(_=c.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[$i]=c}else Na(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Nr(c),_=!1}else si!==null&&(hg(si),si=null),_=!0;if(!_)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=p,c):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(c.child.flags|=8192,(c.mode&1)!==0&&(s===null||(qe.current&1)!==0?dr===0&&(dr=3):pg())),c.updateQueue!==null&&(c.flags|=4),Nr(c),null);case 4:return Ia(),tg(s,c),s===null&&hc(c.stateNode.containerInfo),Nr(c),null;case 10:return $m(c.type._context),Nr(c),null;case 17:return pn(c.type)&&ph(),Nr(c),null;case 19:if(Pe(qe),_=c.memoizedState,_===null)return Nr(c),null;if(y=(c.flags&128)!==0,R=_.rendering,R===null)if(y)Sc(_,!1);else{if(dr!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(R=_h(s),R!==null){for(c.flags|=128,Sc(_,!1),y=R.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),c.subtreeFlags=0,y=p,p=c.child;p!==null;)_=p,s=y,_.flags&=14680066,R=_.alternate,R===null?(_.childLanes=0,_.lanes=s,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=R.childLanes,_.lanes=R.lanes,_.child=R.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=R.memoizedProps,_.memoizedState=R.memoizedState,_.updateQueue=R.updateQueue,_.type=R.type,s=R.dependencies,_.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),p=p.sibling;return Le(qe,qe.current&1|2),c.child}s=s.sibling}_.tail!==null&&re()>Ha&&(c.flags|=128,y=!0,Sc(_,!1),c.lanes=4194304)}else{if(!y)if(s=_h(R),s!==null){if(c.flags|=128,y=!0,p=s.updateQueue,p!==null&&(c.updateQueue=p,c.flags|=4),Sc(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!De)return Nr(c),null}else 2*re()-_.renderingStartTime>Ha&&p!==1073741824&&(c.flags|=128,y=!0,Sc(_,!1),c.lanes=4194304);_.isBackwards?(R.sibling=c.child,c.child=R):(p=_.last,p!==null?p.sibling=R:c.child=R,_.last=R)}return _.tail!==null?(c=_.tail,_.rendering=c,_.tail=c.sibling,_.renderingStartTime=re(),c.sibling=null,p=qe.current,Le(qe,y?p&1|2:p&1),c):(Nr(c),null);case 22:case 23:return fg(),y=c.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(c.flags|=8192),y&&(c.mode&1)!==0?(An&1073741824)!==0&&(Nr(c),c.subtreeFlags&6&&(c.flags|=8192)):Nr(c),null;case 24:return null;case 25:return null}throw Error(r(156,c.tag))}function U5(s,c){switch(Cm(c),c.tag){case 1:return pn(c.type)&&ph(),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Ia(),Pe(fn),Pe(Pr),Nm(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 5:return Pm(c),null;case 13:if(Pe(qe),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));Na()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return Pe(qe),null;case 4:return Ia(),null;case 10:return $m(c.type._context),null;case 22:case 23:return fg(),null;case 24:return null;default:return null}}var Bh=!1,Or=!1,Y5=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function za(s,c){var p=s.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(y){Ge(s,c,y)}else p.current=null}function eg(s,c,p){try{p()}catch(y){Ge(s,c,y)}}var rw=!1;function G5(s,c){if(fm=th,s=B1(),om(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else t:{p=(p=s.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var C=y.anchorOffset,_=y.focusNode;y=y.focusOffset;try{p.nodeType,_.nodeType}catch{p=null;break t}var R=0,j=-1,Y=-1,nt=0,ht=0,ft=s,ut=null;e:for(;;){for(var _t;ft!==p||C!==0&&ft.nodeType!==3||(j=R+C),ft!==_||y!==0&&ft.nodeType!==3||(Y=R+y),ft.nodeType===3&&(R+=ft.nodeValue.length),(_t=ft.firstChild)!==null;)ut=ft,ft=_t;for(;;){if(ft===s)break e;if(ut===p&&++nt===C&&(j=R),ut===_&&++ht===y&&(Y=R),(_t=ft.nextSibling)!==null)break;ft=ut,ut=ft.parentNode}ft=_t}p=j===-1||Y===-1?null:{start:j,end:Y}}else p=null}p=p||{start:0,end:0}}else p=null;for(pm={focusedElem:s,selectionRange:p},th=!1,Mt=c;Mt!==null;)if(c=Mt,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Mt=s;else for(;Mt!==null;){c=Mt;try{var At=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(At!==null){var Ot=At.memoizedProps,Ze=At.memoizedState,tt=c.stateNode,Q=tt.getSnapshotBeforeUpdate(c.elementType===c.type?Ot:ai(c.type,Ot),Ze);tt.__reactInternalSnapshotBeforeUpdate=Q}break;case 3:var et=c.stateNode.containerInfo;et.nodeType===1?et.textContent="":et.nodeType===9&&et.documentElement&&et.removeChild(et.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(vt){Ge(c,c.return,vt)}if(s=c.sibling,s!==null){s.return=c.return,Mt=s;break}Mt=c.return}return At=rw,rw=!1,At}function kc(s,c,p){var y=c.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var C=y=y.next;do{if((C.tag&s)===s){var _=C.destroy;C.destroy=void 0,_!==void 0&&eg(c,p,_)}C=C.next}while(C!==y)}}function Nh(s,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&s)===s){var y=p.create;p.destroy=y()}p=p.next}while(p!==c)}}function rg(s){var c=s.ref;if(c!==null){var p=s.stateNode;switch(s.tag){case 5:s=p;break;default:s=p}typeof c=="function"?c(s):c.current=s}}function nw(s){var c=s.alternate;c!==null&&(s.alternate=null,nw(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&(delete c[$i],delete c[fc],delete c[vm],delete c[M5],delete c[A5])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function iw(s){return s.tag===5||s.tag===3||s.tag===4}function ow(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||iw(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ng(s,c,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?p.nodeType===8?p.parentNode.insertBefore(s,c):p.insertBefore(s,c):(p.nodeType===8?(c=p.parentNode,c.insertBefore(s,p)):(c=p,c.appendChild(s)),p=p._reactRootContainer,p!=null||c.onclick!==null||(c.onclick=dh));else if(y!==4&&(s=s.child,s!==null))for(ng(s,c,p),s=s.sibling;s!==null;)ng(s,c,p),s=s.sibling}function ig(s,c,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?p.insertBefore(s,c):p.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(ig(s,c,p),s=s.sibling;s!==null;)ig(s,c,p),s=s.sibling}var Tr=null,li=!1;function Go(s,c,p){for(p=p.child;p!==null;)sw(s,c,p),p=p.sibling}function sw(s,c,p){if(ae&&typeof ae.onCommitFiberUnmount=="function")try{ae.onCommitFiberUnmount(ne,p)}catch{}switch(p.tag){case 5:Or||za(p,c);case 6:var y=Tr,C=li;Tr=null,Go(s,c,p),Tr=y,li=C,Tr!==null&&(li?(s=Tr,p=p.stateNode,s.nodeType===8?s.parentNode.removeChild(p):s.removeChild(p)):Tr.removeChild(p.stateNode));break;case 18:Tr!==null&&(li?(s=Tr,p=p.stateNode,s.nodeType===8?ym(s.parentNode,p):s.nodeType===1&&ym(s,p),rc(s)):ym(Tr,p.stateNode));break;case 4:y=Tr,C=li,Tr=p.stateNode.containerInfo,li=!0,Go(s,c,p),Tr=y,li=C;break;case 0:case 11:case 14:case 15:if(!Or&&(y=p.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){C=y=y.next;do{var _=C,R=_.destroy;_=_.tag,R!==void 0&&((_&2)!==0||(_&4)!==0)&&eg(p,c,R),C=C.next}while(C!==y)}Go(s,c,p);break;case 1:if(!Or&&(za(p,c),y=p.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=p.memoizedProps,y.state=p.memoizedState,y.componentWillUnmount()}catch(j){Ge(p,c,j)}Go(s,c,p);break;case 21:Go(s,c,p);break;case 22:p.mode&1?(Or=(y=Or)||p.memoizedState!==null,Go(s,c,p),Or=y):Go(s,c,p);break;default:Go(s,c,p)}}function aw(s){var c=s.updateQueue;if(c!==null){s.updateQueue=null;var p=s.stateNode;p===null&&(p=s.stateNode=new Y5),c.forEach(function(y){var C=nR.bind(null,s,y);p.has(y)||(p.add(y),y.then(C,C))})}}function ci(s,c){var p=c.deletions;if(p!==null)for(var y=0;y<p.length;y++){var C=p[y];try{var _=s,R=c,j=R;t:for(;j!==null;){switch(j.tag){case 5:Tr=j.stateNode,li=!1;break t;case 3:Tr=j.stateNode.containerInfo,li=!0;break t;case 4:Tr=j.stateNode.containerInfo,li=!0;break t}j=j.return}if(Tr===null)throw Error(r(160));sw(_,R,C),Tr=null,li=!1;var Y=C.alternate;Y!==null&&(Y.return=null),C.return=null}catch(nt){Ge(C,c,nt)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)lw(c,s),c=c.sibling}function lw(s,c){var p=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ci(c,s),Ai(s),y&4){try{kc(3,s,s.return),Nh(3,s)}catch(Ot){Ge(s,s.return,Ot)}try{kc(5,s,s.return)}catch(Ot){Ge(s,s.return,Ot)}}break;case 1:ci(c,s),Ai(s),y&512&&p!==null&&za(p,p.return);break;case 5:if(ci(c,s),Ai(s),y&512&&p!==null&&za(p,p.return),s.flags&32){var C=s.stateNode;try{Ye(C,"")}catch(Ot){Ge(s,s.return,Ot)}}if(y&4&&(C=s.stateNode,C!=null)){var _=s.memoizedProps,R=p!==null?p.memoizedProps:_,j=s.type,Y=s.updateQueue;if(s.updateQueue=null,Y!==null)try{j==="input"&&_.type==="radio"&&_.name!=null&&xr(C,_),br(j,R);var nt=br(j,_);for(R=0;R<Y.length;R+=2){var ht=Y[R],ft=Y[R+1];ht==="style"?jn(C,ft):ht==="dangerouslySetInnerHTML"?Fe(C,ft):ht==="children"?Ye(C,ft):E(C,ht,ft,nt)}switch(j){case"input":sr(C,_);break;case"textarea":Ke(C,_);break;case"select":var ut=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!_.multiple;var _t=_.value;_t!=null?we(C,!!_.multiple,_t,!1):ut!==!!_.multiple&&(_.defaultValue!=null?we(C,!!_.multiple,_.defaultValue,!0):we(C,!!_.multiple,_.multiple?[]:"",!1))}C[fc]=_}catch(Ot){Ge(s,s.return,Ot)}}break;case 6:if(ci(c,s),Ai(s),y&4){if(s.stateNode===null)throw Error(r(162));C=s.stateNode,_=s.memoizedProps;try{C.nodeValue=_}catch(Ot){Ge(s,s.return,Ot)}}break;case 3:if(ci(c,s),Ai(s),y&4&&p!==null&&p.memoizedState.isDehydrated)try{rc(c.containerInfo)}catch(Ot){Ge(s,s.return,Ot)}break;case 4:ci(c,s),Ai(s);break;case 13:ci(c,s),Ai(s),C=s.child,C.flags&8192&&(_=C.memoizedState!==null,C.stateNode.isHidden=_,!_||C.alternate!==null&&C.alternate.memoizedState!==null||(ag=re())),y&4&&aw(s);break;case 22:if(ht=p!==null&&p.memoizedState!==null,s.mode&1?(Or=(nt=Or)||ht,ci(c,s),Or=nt):ci(c,s),Ai(s),y&8192){if(nt=s.memoizedState!==null,(s.stateNode.isHidden=nt)&&!ht&&(s.mode&1)!==0)for(Mt=s,ht=s.child;ht!==null;){for(ft=Mt=ht;Mt!==null;){switch(ut=Mt,_t=ut.child,ut.tag){case 0:case 11:case 14:case 15:kc(4,ut,ut.return);break;case 1:za(ut,ut.return);var At=ut.stateNode;if(typeof At.componentWillUnmount=="function"){y=ut,p=ut.return;try{c=y,At.props=c.memoizedProps,At.state=c.memoizedState,At.componentWillUnmount()}catch(Ot){Ge(y,p,Ot)}}break;case 5:za(ut,ut.return);break;case 22:if(ut.memoizedState!==null){hw(ft);continue}}_t!==null?(_t.return=ut,Mt=_t):hw(ft)}ht=ht.sibling}t:for(ht=null,ft=s;;){if(ft.tag===5){if(ht===null){ht=ft;try{C=ft.stateNode,nt?(_=C.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(j=ft.stateNode,Y=ft.memoizedProps.style,R=Y!=null&&Y.hasOwnProperty("display")?Y.display:null,j.style.display=ei("display",R))}catch(Ot){Ge(s,s.return,Ot)}}}else if(ft.tag===6){if(ht===null)try{ft.stateNode.nodeValue=nt?"":ft.memoizedProps}catch(Ot){Ge(s,s.return,Ot)}}else if((ft.tag!==22&&ft.tag!==23||ft.memoizedState===null||ft===s)&&ft.child!==null){ft.child.return=ft,ft=ft.child;continue}if(ft===s)break t;for(;ft.sibling===null;){if(ft.return===null||ft.return===s)break t;ht===ft&&(ht=null),ft=ft.return}ht===ft&&(ht=null),ft.sibling.return=ft.return,ft=ft.sibling}}break;case 19:ci(c,s),Ai(s),y&4&&aw(s);break;case 21:break;default:ci(c,s),Ai(s)}}function Ai(s){var c=s.flags;if(c&2){try{t:{for(var p=s.return;p!==null;){if(iw(p)){var y=p;break t}p=p.return}throw Error(r(160))}switch(y.tag){case 5:var C=y.stateNode;y.flags&32&&(Ye(C,""),y.flags&=-33);var _=ow(s);ig(s,_,C);break;case 3:case 4:var R=y.stateNode.containerInfo,j=ow(s);ng(s,j,R);break;default:throw Error(r(161))}}catch(Y){Ge(s,s.return,Y)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function X5(s,c,p){Mt=s,cw(s)}function cw(s,c,p){for(var y=(s.mode&1)!==0;Mt!==null;){var C=Mt,_=C.child;if(C.tag===22&&y){var R=C.memoizedState!==null||Bh;if(!R){var j=C.alternate,Y=j!==null&&j.memoizedState!==null||Or;j=Bh;var nt=Or;if(Bh=R,(Or=Y)&&!nt)for(Mt=C;Mt!==null;)R=Mt,Y=R.child,R.tag===22&&R.memoizedState!==null?dw(C):Y!==null?(Y.return=R,Mt=Y):dw(C);for(;_!==null;)Mt=_,cw(_),_=_.sibling;Mt=C,Bh=j,Or=nt}uw(s)}else(C.subtreeFlags&8772)!==0&&_!==null?(_.return=C,Mt=_):uw(s)}}function uw(s){for(;Mt!==null;){var c=Mt;if((c.flags&8772)!==0){var p=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:Or||Nh(5,c);break;case 1:var y=c.stateNode;if(c.flags&4&&!Or)if(p===null)y.componentDidMount();else{var C=c.elementType===c.type?p.memoizedProps:ai(c.type,p.memoizedProps);y.componentDidUpdate(C,p.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var _=c.updateQueue;_!==null&&hb(c,_,y);break;case 3:var R=c.updateQueue;if(R!==null){if(p=null,c.child!==null)switch(c.child.tag){case 5:p=c.child.stateNode;break;case 1:p=c.child.stateNode}hb(c,R,p)}break;case 5:var j=c.stateNode;if(p===null&&c.flags&4){p=j;var Y=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":Y.autoFocus&&p.focus();break;case"img":Y.src&&(p.src=Y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var nt=c.alternate;if(nt!==null){var ht=nt.memoizedState;if(ht!==null){var ft=ht.dehydrated;ft!==null&&rc(ft)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Or||c.flags&512&&rg(c)}catch(ut){Ge(c,c.return,ut)}}if(c===s){Mt=null;break}if(p=c.sibling,p!==null){p.return=c.return,Mt=p;break}Mt=c.return}}function hw(s){for(;Mt!==null;){var c=Mt;if(c===s){Mt=null;break}var p=c.sibling;if(p!==null){p.return=c.return,Mt=p;break}Mt=c.return}}function dw(s){for(;Mt!==null;){var c=Mt;try{switch(c.tag){case 0:case 11:case 15:var p=c.return;try{Nh(4,c)}catch(Y){Ge(c,p,Y)}break;case 1:var y=c.stateNode;if(typeof y.componentDidMount=="function"){var C=c.return;try{y.componentDidMount()}catch(Y){Ge(c,C,Y)}}var _=c.return;try{rg(c)}catch(Y){Ge(c,_,Y)}break;case 5:var R=c.return;try{rg(c)}catch(Y){Ge(c,R,Y)}}}catch(Y){Ge(c,c.return,Y)}if(c===s){Mt=null;break}var j=c.sibling;if(j!==null){j.return=c.return,Mt=j;break}Mt=c.return}}var K5=Math.ceil,Oh=L.ReactCurrentDispatcher,og=L.ReactCurrentOwner,Vn=L.ReactCurrentBatchConfig,he=0,Cr=null,ir=null,Er=0,An=0,Wa=Ho(0),dr=0,_c=null,Ms=0,Fh=0,sg=0,Tc=null,gn=null,ag=0,Ha=1/0,ao=null,Dh=!1,lg=null,Xo=null,Ih=!1,Ko=null,jh=0,Ec=0,cg=null,zh=-1,Wh=0;function Qr(){return(he&6)!==0?re():zh!==-1?zh:zh=re()}function Qo(s){return(s.mode&1)===0?1:(he&2)!==0&&Er!==0?Er&-Er:P5.transition!==null?(Wh===0&&(Wh=o1()),Wh):(s=be,s!==0||(s=window.event,s=s===void 0?16:p1(s.type)),s)}function ui(s,c,p,y){if(50<Ec)throw Ec=0,cg=null,Error(r(185));Ql(s,p,y),((he&2)===0||s!==Cr)&&(s===Cr&&((he&2)===0&&(Fh|=p),dr===4&&Zo(s,Er)),yn(s,y),p===1&&he===0&&(c.mode&1)===0&&(Ha=re()+500,gh&&Vo()))}function yn(s,c){var p=s.callbackNode;PA(s,c);var y=Qu(s,s===Cr?Er:0);if(y===0)p!==null&&pt(p),s.callbackNode=null,s.callbackPriority=0;else if(c=y&-y,s.callbackPriority!==c){if(p!=null&&pt(p),c===1)s.tag===0?R5(pw.bind(null,s)):J1(pw.bind(null,s)),$5(function(){(he&6)===0&&Vo()}),p=null;else{switch(s1(y)){case 1:p=rt;break;case 4:p=gt;break;case 16:p=bt;break;case 536870912:p=$t;break;default:p=bt}p=Cw(p,fw.bind(null,s))}s.callbackPriority=c,s.callbackNode=p}}function fw(s,c){if(zh=-1,Wh=0,(he&6)!==0)throw Error(r(327));var p=s.callbackNode;if(qa()&&s.callbackNode!==p)return null;var y=Qu(s,s===Cr?Er:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||c)c=Hh(s,y);else{c=y;var C=he;he|=2;var _=gw();(Cr!==s||Er!==c)&&(ao=null,Ha=re()+500,Rs(s,c));do try{J5();break}catch(j){mw(s,j)}while(!0);Em(),Oh.current=_,he=C,ir!==null?c=0:(Cr=null,Er=0,c=dr)}if(c!==0){if(c===2&&(C=Hp(s),C!==0&&(y=C,c=ug(s,C))),c===1)throw p=_c,Rs(s,0),Zo(s,y),yn(s,re()),p;if(c===6)Zo(s,y);else{if(C=s.current.alternate,(y&30)===0&&!Q5(C)&&(c=Hh(s,y),c===2&&(_=Hp(s),_!==0&&(y=_,c=ug(s,_))),c===1))throw p=_c,Rs(s,0),Zo(s,y),yn(s,re()),p;switch(s.finishedWork=C,s.finishedLanes=y,c){case 0:case 1:throw Error(r(345));case 2:Ps(s,gn,ao);break;case 3:if(Zo(s,y),(y&130023424)===y&&(c=ag+500-re(),10<c)){if(Qu(s,0)!==0)break;if(C=s.suspendedLanes,(C&y)!==y){Qr(),s.pingedLanes|=s.suspendedLanes&C;break}s.timeoutHandle=gm(Ps.bind(null,s,gn,ao),c);break}Ps(s,gn,ao);break;case 4:if(Zo(s,y),(y&4194240)===y)break;for(c=s.eventTimes,C=-1;0<y;){var R=31-Xr(y);_=1<<R,R=c[R],R>C&&(C=R),y&=~_}if(y=C,y=re()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*K5(y/1960))-y,10<y){s.timeoutHandle=gm(Ps.bind(null,s,gn,ao),y);break}Ps(s,gn,ao);break;case 5:Ps(s,gn,ao);break;default:throw Error(r(329))}}}return yn(s,re()),s.callbackNode===p?fw.bind(null,s):null}function ug(s,c){var p=Tc;return s.current.memoizedState.isDehydrated&&(Rs(s,c).flags|=256),s=Hh(s,c),s!==2&&(c=gn,gn=p,c!==null&&hg(c)),s}function hg(s){gn===null?gn=s:gn.push.apply(gn,s)}function Q5(s){for(var c=s;;){if(c.flags&16384){var p=c.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var y=0;y<p.length;y++){var C=p[y],_=C.getSnapshot;C=C.value;try{if(!oi(_(),C))return!1}catch{return!1}}}if(p=c.child,c.subtreeFlags&16384&&p!==null)p.return=c,c=p;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Zo(s,c){for(c&=~sg,c&=~Fh,s.suspendedLanes|=c,s.pingedLanes&=~c,s=s.expirationTimes;0<c;){var p=31-Xr(c),y=1<<p;s[p]=-1,c&=~y}}function pw(s){if((he&6)!==0)throw Error(r(327));qa();var c=Qu(s,0);if((c&1)===0)return yn(s,re()),null;var p=Hh(s,c);if(s.tag!==0&&p===2){var y=Hp(s);y!==0&&(c=y,p=ug(s,y))}if(p===1)throw p=_c,Rs(s,0),Zo(s,c),yn(s,re()),p;if(p===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=c,Ps(s,gn,ao),yn(s,re()),null}function dg(s,c){var p=he;he|=1;try{return s(c)}finally{he=p,he===0&&(Ha=re()+500,gh&&Vo())}}function As(s){Ko!==null&&Ko.tag===0&&(he&6)===0&&qa();var c=he;he|=1;var p=Vn.transition,y=be;try{if(Vn.transition=null,be=1,s)return s()}finally{be=y,Vn.transition=p,he=c,(he&6)===0&&Vo()}}function fg(){An=Wa.current,Pe(Wa)}function Rs(s,c){s.finishedWork=null,s.finishedLanes=0;var p=s.timeoutHandle;if(p!==-1&&(s.timeoutHandle=-1,E5(p)),ir!==null)for(p=ir.return;p!==null;){var y=p;switch(Cm(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&ph();break;case 3:Ia(),Pe(fn),Pe(Pr),Nm();break;case 5:Pm(y);break;case 4:Ia();break;case 13:Pe(qe);break;case 19:Pe(qe);break;case 10:$m(y.type._context);break;case 22:case 23:fg()}p=p.return}if(Cr=s,ir=s=Jo(s.current,null),Er=An=c,dr=0,_c=null,sg=Fh=Ms=0,gn=Tc=null,Es!==null){for(c=0;c<Es.length;c++)if(p=Es[c],y=p.interleaved,y!==null){p.interleaved=null;var C=y.next,_=p.pending;if(_!==null){var R=_.next;_.next=C,y.next=R}p.pending=y}Es=null}return s}function mw(s,c){do{var p=ir;try{if(Em(),Th.current=Mh,Eh){for(var y=Ve.memoizedState;y!==null;){var C=y.queue;C!==null&&(C.pending=null),y=y.next}Eh=!1}if(Ls=0,wr=hr=Ve=null,xc=!1,bc=0,og.current=null,p===null||p.return===null){dr=1,_c=c,ir=null;break}t:{var _=s,R=p.return,j=p,Y=c;if(c=Er,j.flags|=32768,Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var nt=Y,ht=j,ft=ht.tag;if((ht.mode&1)===0&&(ft===0||ft===11||ft===15)){var ut=ht.alternate;ut?(ht.updateQueue=ut.updateQueue,ht.memoizedState=ut.memoizedState,ht.lanes=ut.lanes):(ht.updateQueue=null,ht.memoizedState=null)}var _t=jb(R);if(_t!==null){_t.flags&=-257,zb(_t,R,j,_,c),_t.mode&1&&Ib(_,nt,c),c=_t,Y=nt;var At=c.updateQueue;if(At===null){var Ot=new Set;Ot.add(Y),c.updateQueue=Ot}else At.add(Y);break t}else{if((c&1)===0){Ib(_,nt,c),pg();break t}Y=Error(r(426))}}else if(De&&j.mode&1){var Ze=jb(R);if(Ze!==null){(Ze.flags&65536)===0&&(Ze.flags|=256),zb(Ze,R,j,_,c),_m(ja(Y,j));break t}}_=Y=ja(Y,j),dr!==4&&(dr=2),Tc===null?Tc=[_]:Tc.push(_),_=R;do{switch(_.tag){case 3:_.flags|=65536,c&=-c,_.lanes|=c;var tt=Fb(_,Y,c);ub(_,tt);break t;case 1:j=Y;var Q=_.type,et=_.stateNode;if((_.flags&128)===0&&(typeof Q.getDerivedStateFromError=="function"||et!==null&&typeof et.componentDidCatch=="function"&&(Xo===null||!Xo.has(et)))){_.flags|=65536,c&=-c,_.lanes|=c;var vt=Db(_,j,c);ub(_,vt);break t}}_=_.return}while(_!==null)}vw(p)}catch(It){c=It,ir===p&&p!==null&&(ir=p=p.return);continue}break}while(!0)}function gw(){var s=Oh.current;return Oh.current=Mh,s===null?Mh:s}function pg(){(dr===0||dr===3||dr===2)&&(dr=4),Cr===null||(Ms&268435455)===0&&(Fh&268435455)===0||Zo(Cr,Er)}function Hh(s,c){var p=he;he|=2;var y=gw();(Cr!==s||Er!==c)&&(ao=null,Rs(s,c));do try{Z5();break}catch(C){mw(s,C)}while(!0);if(Em(),he=p,Oh.current=y,ir!==null)throw Error(r(261));return Cr=null,Er=0,dr}function Z5(){for(;ir!==null;)yw(ir)}function J5(){for(;ir!==null&&!Lt();)yw(ir)}function yw(s){var c=ww(s.alternate,s,An);s.memoizedProps=s.pendingProps,c===null?vw(s):ir=c,og.current=null}function vw(s){var c=s;do{var p=c.alternate;if(s=c.return,(c.flags&32768)===0){if(p=V5(p,c,An),p!==null){ir=p;return}}else{if(p=U5(p,c),p!==null){p.flags&=32767,ir=p;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{dr=6,ir=null;return}}if(c=c.sibling,c!==null){ir=c;return}ir=c=s}while(c!==null);dr===0&&(dr=5)}function Ps(s,c,p){var y=be,C=Vn.transition;try{Vn.transition=null,be=1,tR(s,c,p,y)}finally{Vn.transition=C,be=y}return null}function tR(s,c,p,y){do qa();while(Ko!==null);if((he&6)!==0)throw Error(r(327));p=s.finishedWork;var C=s.finishedLanes;if(p===null)return null;if(s.finishedWork=null,s.finishedLanes=0,p===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var _=p.lanes|p.childLanes;if(BA(s,_),s===Cr&&(ir=Cr=null,Er=0),(p.subtreeFlags&2064)===0&&(p.flags&2064)===0||Ih||(Ih=!0,Cw(bt,function(){return qa(),null})),_=(p.flags&15990)!==0,(p.subtreeFlags&15990)!==0||_){_=Vn.transition,Vn.transition=null;var R=be;be=1;var j=he;he|=4,og.current=null,G5(s,p),lw(p,s),b5(pm),th=!!fm,pm=fm=null,s.current=p,X5(p),xe(),he=j,be=R,Vn.transition=_}else s.current=p;if(Ih&&(Ih=!1,Ko=s,jh=C),_=s.pendingLanes,_===0&&(Xo=null),Gr(p.stateNode),yn(s,re()),c!==null)for(y=s.onRecoverableError,p=0;p<c.length;p++)C=c[p],y(C.value,{componentStack:C.stack,digest:C.digest});if(Dh)throw Dh=!1,s=lg,lg=null,s;return(jh&1)!==0&&s.tag!==0&&qa(),_=s.pendingLanes,(_&1)!==0?s===cg?Ec++:(Ec=0,cg=s):Ec=0,Vo(),null}function qa(){if(Ko!==null){var s=s1(jh),c=Vn.transition,p=be;try{if(Vn.transition=null,be=16>s?16:s,Ko===null)var y=!1;else{if(s=Ko,Ko=null,jh=0,(he&6)!==0)throw Error(r(331));var C=he;for(he|=4,Mt=s.current;Mt!==null;){var _=Mt,R=_.child;if((Mt.flags&16)!==0){var j=_.deletions;if(j!==null){for(var Y=0;Y<j.length;Y++){var nt=j[Y];for(Mt=nt;Mt!==null;){var ht=Mt;switch(ht.tag){case 0:case 11:case 15:kc(8,ht,_)}var ft=ht.child;if(ft!==null)ft.return=ht,Mt=ft;else for(;Mt!==null;){ht=Mt;var ut=ht.sibling,_t=ht.return;if(nw(ht),ht===nt){Mt=null;break}if(ut!==null){ut.return=_t,Mt=ut;break}Mt=_t}}}var At=_.alternate;if(At!==null){var Ot=At.child;if(Ot!==null){At.child=null;do{var Ze=Ot.sibling;Ot.sibling=null,Ot=Ze}while(Ot!==null)}}Mt=_}}if((_.subtreeFlags&2064)!==0&&R!==null)R.return=_,Mt=R;else t:for(;Mt!==null;){if(_=Mt,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:kc(9,_,_.return)}var tt=_.sibling;if(tt!==null){tt.return=_.return,Mt=tt;break t}Mt=_.return}}var Q=s.current;for(Mt=Q;Mt!==null;){R=Mt;var et=R.child;if((R.subtreeFlags&2064)!==0&&et!==null)et.return=R,Mt=et;else t:for(R=Q;Mt!==null;){if(j=Mt,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Nh(9,j)}}catch(It){Ge(j,j.return,It)}if(j===R){Mt=null;break t}var vt=j.sibling;if(vt!==null){vt.return=j.return,Mt=vt;break t}Mt=j.return}}if(he=C,Vo(),ae&&typeof ae.onPostCommitFiberRoot=="function")try{ae.onPostCommitFiberRoot(ne,s)}catch{}y=!0}return y}finally{be=p,Vn.transition=c}}return!1}function xw(s,c,p){c=ja(p,c),c=Fb(s,c,1),s=Yo(s,c,1),c=Qr(),s!==null&&(Ql(s,1,c),yn(s,c))}function Ge(s,c,p){if(s.tag===3)xw(s,s,p);else for(;c!==null;){if(c.tag===3){xw(c,s,p);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Xo===null||!Xo.has(y))){s=ja(p,s),s=Db(c,s,1),c=Yo(c,s,1),s=Qr(),c!==null&&(Ql(c,1,s),yn(c,s));break}}c=c.return}}function eR(s,c,p){var y=s.pingCache;y!==null&&y.delete(c),c=Qr(),s.pingedLanes|=s.suspendedLanes&p,Cr===s&&(Er&p)===p&&(dr===4||dr===3&&(Er&130023424)===Er&&500>re()-ag?Rs(s,0):sg|=p),yn(s,c)}function bw(s,c){c===0&&((s.mode&1)===0?c=1:(c=Ku,Ku<<=1,(Ku&130023424)===0&&(Ku=4194304)));var p=Qr();s=io(s,c),s!==null&&(Ql(s,c,p),yn(s,p))}function rR(s){var c=s.memoizedState,p=0;c!==null&&(p=c.retryLane),bw(s,p)}function nR(s,c){var p=0;switch(s.tag){case 13:var y=s.stateNode,C=s.memoizedState;C!==null&&(p=C.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(r(314))}y!==null&&y.delete(c),bw(s,p)}var ww;ww=function(s,c,p){if(s!==null)if(s.memoizedProps!==c.pendingProps||fn.current)mn=!0;else{if((s.lanes&p)===0&&(c.flags&128)===0)return mn=!1,q5(s,c,p);mn=(s.flags&131072)!==0}else mn=!1,De&&(c.flags&1048576)!==0&&tb(c,vh,c.index);switch(c.lanes=0,c.tag){case 2:var y=c.type;Ph(s,c),s=c.pendingProps;var C=Ra(c,Pr.current);Da(c,p),C=Dm(null,c,y,s,C,p);var _=Im();return c.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,pn(y)?(_=!0,mh(c)):_=!1,c.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,Am(c),C.updater=Ah,c.stateNode=C,C._reactInternals=c,Vm(c,y,s,p),c=Xm(null,c,y,!0,_,p)):(c.tag=0,De&&_&&wm(c),Kr(null,c,C,p),c=c.child),c;case 16:y=c.elementType;t:{switch(Ph(s,c),s=c.pendingProps,C=y._init,y=C(y._payload),c.type=y,C=c.tag=oR(y),s=ai(y,s),C){case 0:c=Gm(null,c,y,s,p);break t;case 1:c=Yb(null,c,y,s,p);break t;case 11:c=Wb(null,c,y,s,p);break t;case 14:c=Hb(null,c,y,ai(y.type,s),p);break t}throw Error(r(306,y,""))}return c;case 0:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:ai(y,C),Gm(s,c,y,C,p);case 1:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:ai(y,C),Yb(s,c,y,C,p);case 3:t:{if(Gb(c),s===null)throw Error(r(387));y=c.pendingProps,_=c.memoizedState,C=_.element,cb(s,c),kh(c,y,null,p);var R=c.memoizedState;if(y=R.element,_.isDehydrated)if(_={element:y,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},c.updateQueue.baseState=_,c.memoizedState=_,c.flags&256){C=ja(Error(r(423)),c),c=Xb(s,c,y,p,C);break t}else if(y!==C){C=ja(Error(r(424)),c),c=Xb(s,c,y,p,C);break t}else for(Mn=Wo(c.stateNode.containerInfo.firstChild),Ln=c,De=!0,si=null,p=ab(c,null,y,p),c.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Na(),y===C){c=so(s,c,p);break t}Kr(s,c,y,p)}c=c.child}return c;case 5:return db(c),s===null&&km(c),y=c.type,C=c.pendingProps,_=s!==null?s.memoizedProps:null,R=C.children,mm(y,C)?R=null:_!==null&&mm(y,_)&&(c.flags|=32),Ub(s,c),Kr(s,c,R,p),c.child;case 6:return s===null&&km(c),null;case 13:return Kb(s,c,p);case 4:return Rm(c,c.stateNode.containerInfo),y=c.pendingProps,s===null?c.child=Oa(c,null,y,p):Kr(s,c,y,p),c.child;case 11:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:ai(y,C),Wb(s,c,y,C,p);case 7:return Kr(s,c,c.pendingProps,p),c.child;case 8:return Kr(s,c,c.pendingProps.children,p),c.child;case 12:return Kr(s,c,c.pendingProps.children,p),c.child;case 10:t:{if(y=c.type._context,C=c.pendingProps,_=c.memoizedProps,R=C.value,Le(wh,y._currentValue),y._currentValue=R,_!==null)if(oi(_.value,R)){if(_.children===C.children&&!fn.current){c=so(s,c,p);break t}}else for(_=c.child,_!==null&&(_.return=c);_!==null;){var j=_.dependencies;if(j!==null){R=_.child;for(var Y=j.firstContext;Y!==null;){if(Y.context===y){if(_.tag===1){Y=oo(-1,p&-p),Y.tag=2;var nt=_.updateQueue;if(nt!==null){nt=nt.shared;var ht=nt.pending;ht===null?Y.next=Y:(Y.next=ht.next,ht.next=Y),nt.pending=Y}}_.lanes|=p,Y=_.alternate,Y!==null&&(Y.lanes|=p),Lm(_.return,p,c),j.lanes|=p;break}Y=Y.next}}else if(_.tag===10)R=_.type===c.type?null:_.child;else if(_.tag===18){if(R=_.return,R===null)throw Error(r(341));R.lanes|=p,j=R.alternate,j!==null&&(j.lanes|=p),Lm(R,p,c),R=_.sibling}else R=_.child;if(R!==null)R.return=_;else for(R=_;R!==null;){if(R===c){R=null;break}if(_=R.sibling,_!==null){_.return=R.return,R=_;break}R=R.return}_=R}Kr(s,c,C.children,p),c=c.child}return c;case 9:return C=c.type,y=c.pendingProps.children,Da(c,p),C=Hn(C),y=y(C),c.flags|=1,Kr(s,c,y,p),c.child;case 14:return y=c.type,C=ai(y,c.pendingProps),C=ai(y.type,C),Hb(s,c,y,C,p);case 15:return qb(s,c,c.type,c.pendingProps,p);case 17:return y=c.type,C=c.pendingProps,C=c.elementType===y?C:ai(y,C),Ph(s,c),c.tag=1,pn(y)?(s=!0,mh(c)):s=!1,Da(c,p),Nb(c,y,C),Vm(c,y,C,p),Xm(null,c,y,!0,s,p);case 19:return Zb(s,c,p);case 22:return Vb(s,c,p)}throw Error(r(156,c.tag))};function Cw(s,c){return G(s,c)}function iR(s,c,p,y){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Un(s,c,p,y){return new iR(s,c,p,y)}function mg(s){return s=s.prototype,!(!s||!s.isReactComponent)}function oR(s){if(typeof s=="function")return mg(s)?1:0;if(s!=null){if(s=s.$$typeof,s===K)return 11;if(s===I)return 14}return 2}function Jo(s,c){var p=s.alternate;return p===null?(p=Un(s.tag,c,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=c,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&14680064,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,c=s.dependencies,p.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p}function qh(s,c,p,y,C,_){var R=2;if(y=s,typeof s=="function")mg(s)&&(R=1);else if(typeof s=="string")R=5;else t:switch(s){case B:return Bs(p.children,C,_,c);case D:R=8,C|=8;break;case q:return s=Un(12,p,c,C|2),s.elementType=q,s.lanes=_,s;case V:return s=Un(13,p,c,C),s.elementType=V,s.lanes=_,s;case W:return s=Un(19,p,c,C),s.elementType=W,s.lanes=_,s;case F:return Vh(p,C,_,c);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case U:R=10;break t;case H:R=9;break t;case K:R=11;break t;case I:R=14;break t;case O:R=16,y=null;break t}throw Error(r(130,s==null?s:typeof s,""))}return c=Un(R,p,c,C),c.elementType=s,c.type=y,c.lanes=_,c}function Bs(s,c,p,y){return s=Un(7,s,y,c),s.lanes=p,s}function Vh(s,c,p,y){return s=Un(22,s,y,c),s.elementType=F,s.lanes=p,s.stateNode={isHidden:!1},s}function gg(s,c,p){return s=Un(6,s,null,c),s.lanes=p,s}function yg(s,c,p){return c=Un(4,s.children!==null?s.children:[],s.key,c),c.lanes=p,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}function sR(s,c,p,y,C){this.tag=c,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qp(0),this.expirationTimes=qp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qp(0),this.identifierPrefix=y,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function vg(s,c,p,y,C,_,R,j,Y){return s=new sR(s,c,p,j,Y),c===1?(c=1,_===!0&&(c|=8)):c=0,_=Un(3,null,null,c),s.current=_,_.stateNode=s,_.memoizedState={element:y,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},Am(_),s}function aR(s,c,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:y==null?null:""+y,children:s,containerInfo:c,implementation:p}}function Sw(s){if(!s)return qo;s=s._reactInternals;t:{if(dn(s)!==s||s.tag!==1)throw Error(r(170));var c=s;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(pn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(c!==null);throw Error(r(171))}if(s.tag===1){var p=s.type;if(pn(p))return Q1(s,p,c)}return c}function kw(s,c,p,y,C,_,R,j,Y){return s=vg(p,y,!0,s,C,_,R,j,Y),s.context=Sw(null),p=s.current,y=Qr(),C=Qo(p),_=oo(y,C),_.callback=c??null,Yo(p,_,C),s.current.lanes=C,Ql(s,C,y),yn(s,y),s}function Uh(s,c,p,y){var C=c.current,_=Qr(),R=Qo(C);return p=Sw(p),c.context===null?c.context=p:c.pendingContext=p,c=oo(_,R),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=Yo(C,c,R),s!==null&&(ui(s,C,R,_),Sh(s,C,R)),R}function Yh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function _w(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<c?p:c}}function xg(s,c){_w(s,c),(s=s.alternate)&&_w(s,c)}function lR(){return null}var Tw=typeof reportError=="function"?reportError:function(s){console.error(s)};function bg(s){this._internalRoot=s}Gh.prototype.render=bg.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));Uh(s,c,null,null)},Gh.prototype.unmount=bg.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;As(function(){Uh(null,s,null,null)}),c[to]=null}};function Gh(s){this._internalRoot=s}Gh.prototype.unstable_scheduleHydration=function(s){if(s){var c=c1();s={blockedOn:null,target:s,priority:c};for(var p=0;p<Io.length&&c!==0&&c<Io[p].priority;p++);Io.splice(p,0,s),p===0&&d1(s)}};function wg(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Xh(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Ew(){}function cR(s,c,p,y,C){if(C){if(typeof y=="function"){var _=y;y=function(){var nt=Yh(R);_.call(nt)}}var R=kw(c,y,s,0,null,!1,!1,"",Ew);return s._reactRootContainer=R,s[to]=R.current,hc(s.nodeType===8?s.parentNode:s),As(),R}for(;C=s.lastChild;)s.removeChild(C);if(typeof y=="function"){var j=y;y=function(){var nt=Yh(Y);j.call(nt)}}var Y=vg(s,0,!1,null,null,!1,!1,"",Ew);return s._reactRootContainer=Y,s[to]=Y.current,hc(s.nodeType===8?s.parentNode:s),As(function(){Uh(c,Y,p,y)}),Y}function Kh(s,c,p,y,C){var _=p._reactRootContainer;if(_){var R=_;if(typeof C=="function"){var j=C;C=function(){var Y=Yh(R);j.call(Y)}}Uh(c,R,s,C)}else R=cR(p,c,s,C,y);return Yh(R)}a1=function(s){switch(s.tag){case 3:var c=s.stateNode;if(c.current.memoizedState.isDehydrated){var p=Kl(c.pendingLanes);p!==0&&(Vp(c,p|1),yn(c,re()),(he&6)===0&&(Ha=re()+500,Vo()))}break;case 13:As(function(){var y=io(s,1);if(y!==null){var C=Qr();ui(y,s,1,C)}}),xg(s,1)}},Up=function(s){if(s.tag===13){var c=io(s,134217728);if(c!==null){var p=Qr();ui(c,s,134217728,p)}xg(s,134217728)}},l1=function(s){if(s.tag===13){var c=Qo(s),p=io(s,c);if(p!==null){var y=Qr();ui(p,s,c,y)}xg(s,c)}},c1=function(){return be},u1=function(s,c){var p=be;try{return be=s,c()}finally{be=p}},_r=function(s,c,p){switch(c){case"input":if(sr(s,p),c=p.name,p.type==="radio"&&c!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<p.length;c++){var y=p[c];if(y!==s&&y.form===s.form){var C=fh(y);if(!C)throw Error(r(90));Ee(y),sr(y,C)}}}break;case"textarea":Ke(s,p);break;case"select":c=p.value,c!=null&&we(s,!!p.multiple,c,!1)}},Se=dg,cn=As;var uR={usingClientEntryPoint:!1,Events:[pc,Ma,fh,Ei,xa,dg]},$c={findFiberByHostInstance:Ss,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hR={bundleType:$c.bundleType,version:$c.version,rendererPackageName:$c.rendererPackageName,rendererConfig:$c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Ca(s),s===null?null:s.stateNode},findFiberByHostInstance:$c.findFiberByHostInstance||lR,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 Qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qh.isDisabled&&Qh.supportsFiber)try{ne=Qh.inject(hR),ae=Qh}catch{}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uR,vn.createPortal=function(s,c){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wg(c))throw Error(r(200));return aR(s,c,null,p)},vn.createRoot=function(s,c){if(!wg(s))throw Error(r(299));var p=!1,y="",C=Tw;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(C=c.onRecoverableError)),c=vg(s,1,!1,null,null,p,!1,y,C),s[to]=c.current,hc(s.nodeType===8?s.parentNode:s),new bg(c)},vn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=Ca(c),s=s===null?null:s.stateNode,s},vn.flushSync=function(s){return As(s)},vn.hydrate=function(s,c,p){if(!Xh(c))throw Error(r(200));return Kh(null,s,c,!0,p)},vn.hydrateRoot=function(s,c,p){if(!wg(s))throw Error(r(405));var y=p!=null&&p.hydratedSources||null,C=!1,_="",R=Tw;if(p!=null&&(p.unstable_strictMode===!0&&(C=!0),p.identifierPrefix!==void 0&&(_=p.identifierPrefix),p.onRecoverableError!==void 0&&(R=p.onRecoverableError)),c=kw(c,null,s,1,p??null,C,!1,_,R),s[to]=c.current,hc(s),y)for(s=0;s<y.length;s++)p=y[s],C=p._getVersion,C=C(p._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[p,C]:c.mutableSourceEagerHydrationData.push(p,C);return new Gh(c)},vn.render=function(s,c,p){if(!Xh(c))throw Error(r(200));return Kh(null,s,c,!1,p)},vn.unmountComponentAtNode=function(s){if(!Xh(s))throw Error(r(40));return s._reactRootContainer?(As(function(){Kh(null,null,s,!1,function(){s._reactRootContainer=null,s[to]=null})}),!0):!1},vn.unstable_batchedUpdates=dg,vn.unstable_renderSubtreeIntoContainer=function(s,c,p,y){if(!Xh(p))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return Kh(s,c,p,!1,y)},vn.version="18.3.1-next-f1338f8080-20240426",vn}var Nw;function kS(){if(Nw)return kg.exports;Nw=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),kg.exports=CR(),kg.exports}var Ow;function SR(){if(Ow)return Zh;Ow=1;var t=kS();return Zh.createRoot=t.createRoot,Zh.hydrateRoot=t.hydrateRoot,Zh}var kR=SR();const _R=Ff(kR);var Ii=function(){return Ii=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ii.apply(this,arguments)};function _S(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function TR(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var bd="right-scroll-bar-position",wd="width-before-scroll-bar",ER="with-scroll-bars-hidden",$R="--removed-body-scroll-bar-size";function Eg(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function LR(t,e){var r=$.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=e,r.facade}var MR=typeof window<"u"?$.useLayoutEffect:$.useEffect,Fw=new WeakMap;function AR(t,e){var r=LR(null,function(n){return t.forEach(function(i){return Eg(i,n)})});return MR(function(){var n=Fw.get(r);if(n){var i=new Set(n),o=new Set(t),a=r.current;i.forEach(function(l){o.has(l)||Eg(l,null)}),o.forEach(function(l){i.has(l)||Eg(l,a)})}Fw.set(r,t)},[t]),r}function RR(t){return t}function PR(t,e){e===void 0&&(e=RR);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(o){var a=e(o,n);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(o),a=r}var u=function(){var d=a;a=[],d.forEach(o)},h=function(){return Promise.resolve().then(u)};h(),r={push:function(d){a.push(d),h()},filter:function(d){return a=a.filter(d),r}}}};return i}function BR(t){t===void 0&&(t={});var e=PR(null);return e.options=Ii({async:!0,ssr:!1},t),e}var TS=function(t){var e=t.sideCar,r=_S(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return $.createElement(n,Ii({},r))};TS.isSideCarExport=!0;function NR(t,e){return t.useMedium(e),TS}var ES=BR(),$g=function(){},Df=$.forwardRef(function(t,e){var r=$.useRef(null),n=$.useState({onScrollCapture:$g,onWheelCapture:$g,onTouchMoveCapture:$g}),i=n[0],o=n[1],a=t.forwardProps,l=t.children,u=t.className,h=t.removeScrollBar,d=t.enabled,f=t.shards,m=t.sideCar,g=t.noRelative,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,S=t.as,k=S===void 0?"div":S,E=t.gapMode,L=_S(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=m,M=AR([r,e]),B=Ii(Ii({},L),i);return $.createElement($.Fragment,null,d&&$.createElement(A,{sideCar:ES,removeScrollBar:h,shards:f,noRelative:g,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:r,gapMode:E}),a?$.cloneElement($.Children.only(l),Ii(Ii({},B),{ref:M})):$.createElement(k,Ii({},B,{className:u,ref:M}),l))});Df.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Df.classNames={fullWidth:wd,zeroRight:bd};var OR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FR(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=OR();return e&&t.setAttribute("nonce",e),t}function DR(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function IR(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jR=function(){var t=0,e=null;return{add:function(r){t==0&&(e=FR())&&(DR(e,r),IR(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},zR=function(){var t=jR();return function(e,r){$.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},$S=function(){var t=zR(),e=function(r){var n=r.styles,i=r.dynamic;return t(n,i),null};return e},WR={left:0,top:0,right:0,gap:0},Lg=function(t){return parseInt(t||"",10)||0},HR=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Lg(r),Lg(n),Lg(i)]},qR=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return WR;var e=HR(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},VR=$S(),sl="data-scroll-locked",UR=function(t,e,r,n){var i=t.left,o=t.top,a=t.right,l=t.gap;return r===void 0&&(r="margin"),`
|
|
42
|
+
.`.concat(ER,` {
|
|
43
|
+
overflow: hidden `).concat(n,`;
|
|
44
|
+
padding-right: `).concat(l,"px ").concat(n,`;
|
|
45
|
+
}
|
|
46
|
+
body[`).concat(sl,`] {
|
|
47
|
+
overflow: hidden `).concat(n,`;
|
|
48
|
+
overscroll-behavior: contain;
|
|
49
|
+
`).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
50
|
+
padding-left: `.concat(i,`px;
|
|
51
|
+
padding-top: `).concat(o,`px;
|
|
52
|
+
padding-right: `).concat(a,`px;
|
|
53
|
+
margin-left:0;
|
|
54
|
+
margin-top:0;
|
|
55
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
56
|
+
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.`).concat(bd,` {
|
|
60
|
+
right: `).concat(l,"px ").concat(n,`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.`).concat(wd,` {
|
|
64
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.`).concat(bd," .").concat(bd,` {
|
|
68
|
+
right: 0 `).concat(n,`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.`).concat(wd," .").concat(wd,` {
|
|
72
|
+
margin-right: 0 `).concat(n,`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
body[`).concat(sl,`] {
|
|
76
|
+
`).concat($R,": ").concat(l,`px;
|
|
77
|
+
}
|
|
78
|
+
`)},Dw=function(){var t=parseInt(document.body.getAttribute(sl)||"0",10);return isFinite(t)?t:0},YR=function(){$.useEffect(function(){return document.body.setAttribute(sl,(Dw()+1).toString()),function(){var t=Dw()-1;t<=0?document.body.removeAttribute(sl):document.body.setAttribute(sl,t.toString())}},[])},GR=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n;YR();var o=$.useMemo(function(){return qR(i)},[i]);return $.createElement(VR,{styles:UR(o,!e,i,r?"":"!important")})},vy=!1;if(typeof window<"u")try{var Jh=Object.defineProperty({},"passive",{get:function(){return vy=!0,!0}});window.addEventListener("test",Jh,Jh),window.removeEventListener("test",Jh,Jh)}catch{vy=!1}var Va=vy?{passive:!1}:!1,XR=function(t){return t.tagName==="TEXTAREA"},LS=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!XR(t)&&r[e]==="visible")},KR=function(t){return LS(t,"overflowY")},QR=function(t){return LS(t,"overflowX")},Iw=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=MS(t,n);if(i){var o=AS(t,n),a=o[1],l=o[2];if(a>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ZR=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},JR=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},MS=function(t,e){return t==="v"?KR(e):QR(e)},AS=function(t,e){return t==="v"?ZR(e):JR(e)},tP=function(t,e){return t==="h"&&e==="rtl"?-1:1},eP=function(t,e,r,n,i){var o=tP(t,window.getComputedStyle(e).direction),a=o*n,l=r.target,u=e.contains(l),h=!1,d=a>0,f=0,m=0;do{if(!l)break;var g=AS(t,l),v=g[0],x=g[1],w=g[2],S=x-w-o*v;(v||S)&&MS(t,l)&&(f+=S,m+=v);var k=l.parentNode;l=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!u&&l!==document.body||u&&(e.contains(l)||e===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(h=!0),h},td=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},jw=function(t){return[t.deltaX,t.deltaY]},zw=function(t){return t&&"current"in t?t.current:t},rP=function(t,e){return t[0]===e[0]&&t[1]===e[1]},nP=function(t){return`
|
|
79
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
80
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
81
|
+
`)},iP=0,Ua=[];function oP(t){var e=$.useRef([]),r=$.useRef([0,0]),n=$.useRef(),i=$.useState(iP++)[0],o=$.useState($S)[0],a=$.useRef(t);$.useEffect(function(){a.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var x=TR([t.lockRef.current],(t.shards||[]).map(zw),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=$.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var S=td(x),k=r.current,E="deltaX"in x?x.deltaX:k[0]-S[0],L="deltaY"in x?x.deltaY:k[1]-S[1],A,M=x.target,B=Math.abs(E)>Math.abs(L)?"h":"v";if("touches"in x&&B==="h"&&M.type==="range")return!1;var D=window.getSelection(),q=D&&D.anchorNode,U=q?q===M||q.contains(M):!1;if(U)return!1;var H=Iw(B,M);if(!H)return!0;if(H?A=B:(A=B==="v"?"h":"v",H=Iw(B,M)),!H)return!1;if(!n.current&&"changedTouches"in x&&(E||L)&&(n.current=A),!A)return!0;var K=n.current||A;return eP(K,w,x,K==="h"?E:L)},[]),u=$.useCallback(function(x){var w=x;if(!(!Ua.length||Ua[Ua.length-1]!==o)){var S="deltaY"in w?jw(w):td(w),k=e.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&rP(A.delta,S)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var E=(a.current.shards||[]).map(zw).filter(Boolean).filter(function(A){return A.contains(w.target)}),L=E.length>0?l(w,E[0]):!a.current.noIsolation;L&&w.cancelable&&w.preventDefault()}}},[]),h=$.useCallback(function(x,w,S,k){var E={name:x,delta:w,target:S,should:k,shadowParent:sP(S)};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(L){return L!==E})},1)},[]),d=$.useCallback(function(x){r.current=td(x),n.current=void 0},[]),f=$.useCallback(function(x){h(x.type,jw(x),x.target,l(x,t.lockRef.current))},[]),m=$.useCallback(function(x){h(x.type,td(x),x.target,l(x,t.lockRef.current))},[]);$.useEffect(function(){return Ua.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Va),document.addEventListener("touchmove",u,Va),document.addEventListener("touchstart",d,Va),function(){Ua=Ua.filter(function(x){return x!==o}),document.removeEventListener("wheel",u,Va),document.removeEventListener("touchmove",u,Va),document.removeEventListener("touchstart",d,Va)}},[]);var g=t.removeScrollBar,v=t.inert;return $.createElement($.Fragment,null,v?$.createElement(o,{styles:nP(i)}):null,g?$.createElement(GR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function sP(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const aP=NR(ES,oP);var wl=$.forwardRef(function(t,e){return $.createElement(Df,Ii({},t,{ref:e,sideCar:aP}))});wl.classNames=Df.classNames;function er(t){return Object.keys(t)}function Mg(t){return t&&typeof t=="object"&&!Array.isArray(t)}function I0(t,e){const r={...t},n=e;return Mg(t)&&Mg(e)&&Object.keys(e).forEach(i=>{Mg(n[i])&&i in t?r[i]=I0(r[i],n[i]):r[i]=n[i]}),r}function lP(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function cP(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function uu(t){const e=cP(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function Ag(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function RS(t,{shouldScale:e=!1}={}){function r(n){if(n===0||n==="0")return`0${t}`;if(typeof n=="number"){const i=`${n/16}${t}`;return e?Ag(i):i}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(o=>r(o)).join(",");if(n.includes(" "))return n.split(" ").map(o=>r(o)).join(" ");if(n.includes(t))return e?Ag(n):n;const i=n.replace("px","");if(!Number.isNaN(Number(i))){const o=`${Number(i)/16}${t}`;return e?Ag(o):o}}return n}return r}const it=RS("rem",{shouldScale:!0}),Wd=RS("em");function Eu(t){return Object.keys(t).reduce((e,r)=>(t[r]!==void 0&&(e[r]=t[r]),e),{})}function PS(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(n=>e.test(n))}return!1}function _o(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==$.Fragment:!1}function Ui(t){const e=$.createContext(null);return[({children:i,value:o})=>b.jsx(e.Provider,{value:o,children:i}),()=>{const i=$.useContext(e);if(i===null)throw new Error(t);return i}]}function $u(t=null){const e=$.createContext(t);return[({children:i,value:o})=>b.jsx(e.Provider,{value:o,children:i}),()=>$.useContext(e)]}function Hd(t,e){let r=t;for(;(r=r.parentElement)&&!r.matches(e););return r}function uP(t,e,r){for(let n=t-1;n>=0;n-=1)if(!e[n].disabled)return n;if(r){for(let n=e.length-1;n>-1;n-=1)if(!e[n].disabled)return n}return t}function hP(t,e,r){for(let n=t+1;n<e.length;n+=1)if(!e[n].disabled)return n;if(r){for(let n=0;n<e.length;n+=1)if(!e[n].disabled)return n}return t}function dP(t,e,r){return Hd(t,r)===Hd(e,r)}function fP({parentSelector:t,siblingSelector:e,onKeyDown:r,loop:n=!0,activateOnFocus:i=!1,dir:o="rtl",orientation:a}){return l=>{var m;r==null||r(l);const u=Array.from(((m=Hd(l.currentTarget,t))==null?void 0:m.querySelectorAll(e))||[]).filter(g=>dP(l.currentTarget,g,t)),h=u.findIndex(g=>l.currentTarget===g),d=hP(h,u,n),f=uP(h,u,n);switch(l.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{l.stopPropagation(),l.preventDefault(),u[f].focus(),i&&u[f].click();break}case"ArrowDown":{l.stopPropagation(),l.preventDefault(),u[d].focus(),i&&u[d].click();break}case"Home":{l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break}case"End":{l.stopPropagation(),l.preventDefault();const g=u.length-1;!u[g].disabled&&u[g].focus();break}}}}const pP={app:100,modal:200,popover:300,overlay:400,max:9999};function ki(t){return pP[t]}const BS=()=>{};function mP(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||BS:r=>{var n;r.key==="Escape"&&(t(r),(n=e.onTrigger)==null||n.call(e))}}function te(t,e="size",r=!0){if(t!==void 0)return PS(t)?r?it(t):t:`var(--${e}-${t})`}function zr(t){return te(t,"mantine-spacing")}function rr(t){return t===void 0?"var(--mantine-radius-default)":te(t,"mantine-radius")}function Ar(t){return te(t,"mantine-font-size")}function gP(t){return te(t,"mantine-line-height",!1)}function j0(t){if(t)return te(t,"mantine-shadow",!1)}function Cn(t,e){return r=>{t==null||t(r),e==null||e(r)}}function z0(t,e){return t in e?uu(e[t]):uu(t)}function xy(t,e){const r=t.map(n=>({value:n,px:z0(n,e)}));return r.sort((n,i)=>n.px-i.px),r}function al(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function yP(t,e,r){var n;return r?Array.from(((n=Hd(r,e))==null?void 0:n.querySelectorAll(t))||[]).findIndex(i=>i===r):null}function vP(){const[t,e]=$.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function NS(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function zs(t){const e=$.useRef(t);return $.useEffect(()=>{e.current=t}),$.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function If(t,e){const r=typeof e=="number"?e:e.delay,n=typeof e=="number"?!1:e.flushOnUnmount,i=zs(t),o=$.useRef(0),a=$.useRef(()=>{}),l=Object.assign($.useCallback((...u)=>{window.clearTimeout(o.current);const h=()=>{o.current!==0&&(o.current=0,i(...u))};a.current=h,l.flush=h,o.current=window.setTimeout(h,r)},[i,r]),{flush:a.current});return $.useEffect(()=>()=>{window.clearTimeout(o.current),n&&l.flush()},[l,n]),l}const Ww=["mousedown","touchstart"];function OS(t,e,r){const n=$.useRef(null);return $.useEffect(()=>{const i=o=>{const{target:a}=o??{};if(Array.isArray(r)){const l=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(h=>!!h&&!o.composedPath().includes(h))&&!l&&t()}else n.current&&!n.current.contains(a)&&t()};return(e||Ww).forEach(o=>document.addEventListener(o,i)),()=>{(e||Ww).forEach(o=>document.removeEventListener(o,i))}},[n,t,r]),n}function xP({timeout:t=2e3}={}){const[e,r]=$.useState(null),[n,i]=$.useState(!1),[o,a]=$.useState(null),l=d=>{window.clearTimeout(o),a(window.setTimeout(()=>i(!1),t)),i(d)};return{copy:d=>{"clipboard"in navigator?navigator.clipboard.writeText(d).then(()=>l(!0)).catch(f=>r(f)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),r(null),window.clearTimeout(o)},error:e,copied:n}}function bP(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function wP(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function FS(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,i]=$.useState(r?e:wP(t)),o=$.useRef(null);return $.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),i(o.current.matches),bP(o.current,a=>i(a.matches))},[t]),n}function CP(t,e){return FS("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}const Bl=typeof document<"u"?$.useLayoutEffect:$.useEffect;function Hi(t,e){const r=$.useRef(!1);$.useEffect(()=>()=>{r.current=!1},[]),$.useEffect(()=>{if(r.current)return t();r.current=!0},e)}function DS({opened:t,shouldReturnFocus:e=!0}){const r=$.useRef(null),n=()=>{var i;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((i=r.current)==null||i.focus({preventScroll:!0}))};return Hi(()=>{let i=-1;const o=a=>{a.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",o),t?r.current=document.activeElement:e&&(i=window.setTimeout(n,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",o)}},[t,e]),n}const SP=/input|select|textarea|button|object/,IS="a, input, select, textarea, button, object, [tabindex]";function kP(t){return t.style.display==="none"}function _P(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let r=t;for(;r&&!(r===document.body||r.nodeType===11);){if(kP(r))return!1;r=r.parentNode}return!0}function jS(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function by(t){const e=t.nodeName.toLowerCase(),r=!Number.isNaN(jS(t));return(SP.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||r)&&_P(t)}function zS(t){const e=jS(t);return(Number.isNaN(e)||e>=0)&&by(t)}function TP(t){return Array.from(t.querySelectorAll(IS)).filter(zS)}function EP(t,e){const r=TP(t);if(!r.length){e.preventDefault();return}const n=r[e.shiftKey?0:r.length-1],i=t.getRootNode();let o=n===i.activeElement||t===i.activeElement;const a=i.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(o=r.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===a.getAttribute("name")).includes(n)),!o)return;e.preventDefault();const u=r[e.shiftKey?r.length-1:0];u&&u.focus()}function $P(t=!0){const e=$.useRef(null),r=i=>{let o=i.querySelector("[data-autofocus]");if(!o){const a=Array.from(i.querySelectorAll(IS));o=a.find(zS)||a.find(by)||null,!o&&by(i)&&(o=i)}o&&o.focus({preventScroll:!0})},n=$.useCallback(i=>{t&&i!==null&&e.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&r(i)}),e.current=i):e.current=null)},[t]);return $.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>r(e.current));const i=o=>{o.key==="Tab"&&e.current&&EP(e.current,o)};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t]),n}const LP=t=>(t+1)%1e6;function MP(){const[,t]=$.useReducer(LP,0);return t}const AP=kr.useId||(()=>{});function RP(){const t=AP();return t?`mantine-${t.replace(/:/g,"")}`:""}function Yi(t){const e=RP(),[r,n]=$.useState(e);return Bl(()=>{n(NS())},[]),typeof t=="string"?t:typeof window>"u"?e:r}function qd(t,e,r){$.useEffect(()=>(window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)),[t,e])}function PP(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function BP(t){try{return t&&JSON.parse(t)}catch{return t}}function NP(t){return{getItem:i=>{try{return window[t].getItem(i)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(i,o)=>{try{window[t].setItem(i,o)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:i=>{try{window[t].removeItem(i)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function OP(t,e){const r="mantine-local-storage",{getItem:n,setItem:i,removeItem:o}=NP(t);return function({key:l,defaultValue:u,getInitialValueInEffect:h=!0,sync:d=!0,deserialize:f=BP,serialize:m=g=>PP(g,e)}){const g=$.useCallback(k=>{let E;try{E=typeof window>"u"||!(t in window)||window[t]===null||!!k}catch{E=!0}if(E)return u;const L=n(l);return L!==null?f(L):u},[l,u]),[v,x]=$.useState(g(h)),w=$.useCallback(k=>{k instanceof Function?x(E=>{const L=k(E);return i(l,m(L)),window.dispatchEvent(new CustomEvent(r,{detail:{key:l,value:k(E)}})),L}):(i(l,m(k)),window.dispatchEvent(new CustomEvent(r,{detail:{key:l,value:k}})),x(k))},[l]),S=$.useCallback(()=>{o(l),window.dispatchEvent(new CustomEvent(r,{detail:{key:l,value:u}}))},[]);return qd("storage",k=>{d&&k.storageArea===window[t]&&k.key===l&&x(f(k.newValue??void 0))}),qd(r,k=>{d&&k.detail.key===l&&x(k.detail.value)}),$.useEffect(()=>{u!==void 0&&v===void 0&&w(u)},[u,v,w]),$.useEffect(()=>{const k=g();k!==void 0&&w(k)},[l]),[v===void 0?u:v,w,S]}}function Rg(t){return OP("localStorage","use-local-storage")(t)}function wy(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function WS(...t){const e=new Map;return r=>{if(t.forEach(n=>{const i=wy(n,r);i&&e.set(n,i)}),e.size>0)return()=>{t.forEach(n=>{const i=e.get(n);i?i():wy(n,null)}),e.clear()}}}function Vr(...t){return $.useCallback(WS(...t),t)}function On({value:t,defaultValue:e,finalValue:r,onChange:n=()=>{}}){const[i,o]=$.useState(e!==void 0?e:r),a=(l,...u)=>{o(l),n==null||n(l,...u)};return t!==void 0?[t,n,!0]:[i,a,!1]}function jf(t,e){return FS("(prefers-reduced-motion: reduce)",t,e)}const FP={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function ed(t){const e=t.replace("Key","").toLowerCase();return FP[t]||e}function DP(t){const e=t.toLowerCase().split("+").map(o=>o.trim()),r={alt:e.includes("alt"),ctrl:e.includes("ctrl"),meta:e.includes("meta"),mod:e.includes("mod"),shift:e.includes("shift"),plus:e.includes("[plus]")},n=["alt","ctrl","meta","shift","mod"],i=e.find(o=>!n.includes(o));return{...r,key:i==="[plus]"?"+":i}}function IP(t,e,r){const{alt:n,ctrl:i,meta:o,mod:a,shift:l,key:u}=t,{altKey:h,ctrlKey:d,metaKey:f,shiftKey:m,key:g,code:v}=e;if(n!==h)return!1;if(a){if(!d&&!f)return!1}else if(i!==d||o!==f)return!1;return l!==m?!1:!!(u&&(r?ed(v)===ed(u):ed(g??v)===ed(u)))}function jP(t,e){return r=>IP(DP(t),r,e)}function zP(t,e,r=!1){return t.target instanceof HTMLElement?(r||!t.target.isContentEditable)&&!e.includes(t.target.tagName):!0}function WP(t,e=["INPUT","TEXTAREA","SELECT"],r=!1){$.useEffect(()=>{const n=i=>{t.forEach(([o,a,l={preventDefault:!0,usePhysicalKeys:!1}])=>{jP(o,l.usePhysicalKeys)(i)&&zP(i,e,r)&&(l.preventDefault&&i.preventDefault(),a(i))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[t])}function uo(t=!1,e){const{onOpen:r,onClose:n}=e||{},[i,o]=$.useState(t),a=$.useCallback(()=>{o(h=>h||(r==null||r(),!0))},[r]),l=$.useCallback(()=>{o(h=>h&&(n==null||n(),!1))},[n]),u=$.useCallback(()=>{i?l():a()},[l,a,i]);return[i,{open:a,close:l,toggle:u}]}function HP(t){const e=$.useRef(void 0);return $.useEffect(()=>{e.current=t},[t]),e.current}var qP={};function VP(){return typeof process<"u"&&qP?"production":"development"}function zf(t){var r;const e=kr.version;return typeof kr.version!="string"||e.startsWith("18.")?t==null?void 0:t.ref:(r=t==null?void 0:t.props)==null?void 0:r.ref}function HS(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=HS(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function yr(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=HS(t))&&(n&&(n+=" "),n+=e);return n}const UP={};function YP(t){const e={};return t.forEach(r=>{Object.entries(r).forEach(([n,i])=>{e[n]?e[n]=yr(e[n],i):e[n]=i})}),e}function Wf({theme:t,classNames:e,props:r,stylesCtx:n}){const o=(Array.isArray(e)?e:[e]).map(a=>typeof a=="function"?a(t,r,n):a||UP);return YP(o)}function Vd({theme:t,styles:e,props:r,stylesCtx:n}){return(Array.isArray(e)?e:[e]).reduce((o,a)=>typeof a=="function"?{...o,...a(t,r,n)}:{...o,...a},{})}const W0=$.createContext(null);function To(){const t=$.useContext(W0);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function GP(){return To().cssVariablesResolver}function XP(){return To().classNamesPrefix}function Hf(){return To().getStyleNonce}function KP(){return To().withStaticClasses}function QP(){return To().headless}function ZP(){var t;return(t=To().stylesTransform)==null?void 0:t.sx}function JP(){var t;return(t=To().stylesTransform)==null?void 0:t.styles}function qS(){return To().env||"default"}function tB(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function eB(t){let e=t.replace("#","");if(e.length===3){const a=e.split("");e=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(e.length===8){const a=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a}}const r=parseInt(e,16),n=r>>16&255,i=r>>8&255,o=r&255;return{r:n,g:i,b:o,a:1}}function rB(t){const[e,r,n,i]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:r,b:n,a:i===void 0?1:i}}function nB(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=t.match(e);if(!r)return{r:0,g:0,b:0,a:1};const n=parseInt(r[1],10),i=parseInt(r[2],10)/100,o=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,l=(1-Math.abs(2*o-1))*i,u=n/60,h=l*(1-Math.abs(u%2-1)),d=o-l/2;let f,m,g;return u>=0&&u<1?(f=l,m=h,g=0):u>=1&&u<2?(f=h,m=l,g=0):u>=2&&u<3?(f=0,m=l,g=h):u>=3&&u<4?(f=0,m=h,g=l):u>=4&&u<5?(f=h,m=0,g=l):(f=l,m=0,g=h),{r:Math.round((f+d)*255),g:Math.round((m+d)*255),b:Math.round((g+d)*255),a:a||1}}function H0(t){return tB(t)?eB(t):t.startsWith("rgb")?rB(t):t.startsWith("hsl")?nB(t):{r:0,g:0,b:0,a:1}}function rd(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r,g:n,b:i,a:o}=H0(t),a=1-e,l=u=>Math.round(u*a);return`rgba(${l(r)}, ${l(n)}, ${l(i)}, ${o})`}function hu(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function Pg(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function iB(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function oB(t){if(t.startsWith("oklch("))return(iB(t)||0)/100;const{r:e,g:r,b:n}=H0(t),i=e/255,o=r/255,a=n/255,l=Pg(i),u=Pg(o),h=Pg(a);return .2126*l+.7152*u+.0722*h}function Mc(t,e=.179){return t.startsWith("var(")?!1:oB(t)>e}function ds({color:t,theme:e,colorScheme:r}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:r==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Mc(r==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:r==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Mc(r==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Mc(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[n,i]=t.split("."),o=i?Number(i):void 0,a=n in e.colors;if(a){const l=o!==void 0?e.colors[n][o]:e.colors[n][hu(e,r||"light")];return{color:n,value:l,shade:o,isThemeColor:a,isLight:Mc(l,e.luminanceThreshold),variable:i?`--mantine-color-${n}-${o}`:`--mantine-color-${n}-filled`}}return{color:t,value:t,isThemeColor:a,isLight:Mc(t,e.luminanceThreshold),shade:o,variable:void 0}}function gr(t,e){const r=ds({color:t||e.primaryColor,theme:e});return r.variable?`var(${r.variable})`:t}function Cy(t,e){const r={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)??e.defaultGradient.deg??0},n=gr(r.from,e),i=gr(r.to,e);return`linear-gradient(${r.deg}deg, ${n} 0%, ${i} 100%)`}function Oi(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const o=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${o}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r,g:n,b:i}=H0(t);return`rgba(${r}, ${n}, ${i}, ${e})`}const Ya=Oi,sB=({color:t,theme:e,variant:r,gradient:n,autoContrast:i})=>{const o=ds({color:t,theme:e}),a=typeof i=="boolean"?i:e.autoContrast;if(r==="filled"){const l=a&&o.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return o.isThemeColor?o.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:l,border:`${it(1)} solid transparent`}:{background:`var(--mantine-color-${o.color}-${o.shade})`,hover:`var(--mantine-color-${o.color}-${o.shade===9?8:o.shade+1})`,color:l,border:`${it(1)} solid transparent`}:{background:t,hover:rd(t,.1),color:l,border:`${it(1)} solid transparent`}}if(r==="light"){if(o.isThemeColor){if(o.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${it(1)} solid transparent`};const l=e.colors[o.color][o.shade];return{background:Oi(l,.1),hover:Oi(l,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${it(1)} solid transparent`}}return{background:Oi(t,.1),hover:Oi(t,.12),color:t,border:`${it(1)} solid transparent`}}if(r==="outline")return o.isThemeColor?o.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${it(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:Oi(e.colors[o.color][o.shade],.05),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${it(1)} solid var(--mantine-color-${o.color}-${o.shade})`}:{background:"transparent",hover:Oi(t,.05),color:t,border:`${it(1)} solid ${t}`};if(r==="subtle"){if(o.isThemeColor){if(o.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${it(1)} solid transparent`};const l=e.colors[o.color][o.shade];return{background:"transparent",hover:Oi(l,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${it(1)} solid transparent`}}return{background:"transparent",hover:Oi(t,.12),color:t,border:`${it(1)} solid transparent`}}return r==="transparent"?o.isThemeColor?o.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${it(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${it(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${it(1)} solid transparent`}:r==="white"?o.isThemeColor?o.shade===void 0?{background:"var(--mantine-color-white)",hover:rd(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${it(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:rd(e.white,.01),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${it(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:rd(e.white,.01),color:t,border:`${it(1)} solid transparent`}:r==="gradient"?{background:Cy(n,e),hover:Cy(n,e),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${it(1)} solid var(--mantine-color-default-border)`}:{}},aB={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Hw="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",q0={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:aB,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:sB,autoContrast:!1,luminanceThreshold:.3,fontFamily:Hw,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:Hw,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:it(34),lineHeight:"1.3"},h2:{fontSize:it(26),lineHeight:"1.35"},h3:{fontSize:it(22),lineHeight:"1.4"},h4:{fontSize:it(18),lineHeight:"1.45"},h5:{fontSize:it(16),lineHeight:"1.5"},h6:{fontSize:it(14),lineHeight:"1.5"}}},fontSizes:{xs:it(12),sm:it(14),md:it(16),lg:it(18),xl:it(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:it(2),sm:it(4),md:it(8),lg:it(16),xl:it(32)},spacing:{xs:it(10),sm:it(12),md:it(16),lg:it(20),xl:it(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${it(1)} ${it(3)} rgba(0, 0, 0, 0.05), 0 ${it(1)} ${it(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${it(1)} ${it(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${it(10)} ${it(15)} ${it(-5)}, rgba(0, 0, 0, 0.04) 0 ${it(7)} ${it(7)} ${it(-5)}`,md:`0 ${it(1)} ${it(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${it(20)} ${it(25)} ${it(-5)}, rgba(0, 0, 0, 0.04) 0 ${it(10)} ${it(10)} ${it(-5)}`,lg:`0 ${it(1)} ${it(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${it(28)} ${it(23)} ${it(-7)}, rgba(0, 0, 0, 0.04) 0 ${it(12)} ${it(12)} ${it(-7)}`,xl:`0 ${it(1)} ${it(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${it(36)} ${it(28)} ${it(-7)}, rgba(0, 0, 0, 0.04) 0 ${it(17)} ${it(17)} ${it(-7)}`},other:{},components:{}};function qw(t){return t==="auto"||t==="dark"||t==="light"}function lB({key:t="mantine-color-scheme-value"}={}){let e;return{get:r=>{if(typeof window>"u")return r;try{const n=window.localStorage.getItem(t);return qw(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(t,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{e=n=>{n.storageArea===window.localStorage&&n.key===t&&qw(n.newValue)&&r(n.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const cB="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",Vw="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Bg(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function Uw(t){if(!(t.primaryColor in t.colors))throw new Error(cB);if(typeof t.primaryShade=="object"&&(!Bg(t.primaryShade.dark)||!Bg(t.primaryShade.light)))throw new Error(Vw);if(typeof t.primaryShade=="number"&&!Bg(t.primaryShade))throw new Error(Vw)}function uB(t,e){var n;if(!e)return Uw(t),t;const r=I0(t,e);return e.fontFamily&&!((n=e.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=e.fontFamily),Uw(r),r}const V0=$.createContext(null),hB=()=>$.useContext(V0)||q0;function an(){const t=$.useContext(V0);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function VS({theme:t,children:e,inherit:r=!0}){const n=hB(),i=$.useMemo(()=>uB(r?n:q0,t),[t,n,r]);return b.jsx(V0.Provider,{value:i,children:e})}VS.displayName="@mantine/core/MantineThemeProvider";function dB(){const t=an(),e=Hf(),r=er(t.breakpoints).reduce((n,i)=>{const o=t.breakpoints[i].includes("px"),a=uu(t.breakpoints[i]),l=o?`${a-.1}px`:Wd(a-.1),u=o?`${a}px`:Wd(a);return`${n}@media (max-width: ${l}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${u}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return b.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:r}})}function Ng(t){return Object.entries(t).map(([e,r])=>`${e}: ${r};`).join("")}function Ac(t,e){return(Array.isArray(t)?t:[t]).reduce((n,i)=>`${i}{${n}}`,e)}function fB(t,e){const r=Ng(t.variables),n=r?Ac(e,r):"",i=Ng(t.dark),o=Ng(t.light),a=i?Ac(e===":host"?`${e}([data-mantine-color-scheme="dark"])`:`${e}[data-mantine-color-scheme="dark"]`,i):"",l=o?Ac(e===":host"?`${e}([data-mantine-color-scheme="light"])`:`${e}[data-mantine-color-scheme="light"]`,o):"";return`${n}${a}${l}`}function U0({color:t,theme:e,autoContrast:r}){return(typeof r=="boolean"?r:e.autoContrast)&&ds({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function Yw(t,e){return U0({color:t.colors[t.primaryColor][hu(t,e)],theme:t,autoContrast:null})}function nd({theme:t,color:e,colorScheme:r,name:n=e,withColorValues:i=!0}){if(!t.colors[e])return{};if(r==="light"){const l=hu(t,"light"),u={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-filled)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${l})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${l===9?8:l+1})`,[`--mantine-color-${n}-light`]:Ya(t.colors[e][l],.1),[`--mantine-color-${n}-light-hover`]:Ya(t.colors[e][l],.12),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${l})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${l})`,[`--mantine-color-${n}-outline-hover`]:Ya(t.colors[e][l],.05)};return i?{[`--mantine-color-${n}-0`]:t.colors[e][0],[`--mantine-color-${n}-1`]:t.colors[e][1],[`--mantine-color-${n}-2`]:t.colors[e][2],[`--mantine-color-${n}-3`]:t.colors[e][3],[`--mantine-color-${n}-4`]:t.colors[e][4],[`--mantine-color-${n}-5`]:t.colors[e][5],[`--mantine-color-${n}-6`]:t.colors[e][6],[`--mantine-color-${n}-7`]:t.colors[e][7],[`--mantine-color-${n}-8`]:t.colors[e][8],[`--mantine-color-${n}-9`]:t.colors[e][9],...u}:u}const o=hu(t,"dark"),a={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-4)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${o})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${o===9?8:o+1})`,[`--mantine-color-${n}-light`]:Ya(t.colors[e][Math.max(0,o-2)],.15),[`--mantine-color-${n}-light-hover`]:Ya(t.colors[e][Math.max(0,o-2)],.2),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${Math.max(o-5,0)})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${Math.max(o-4,0)})`,[`--mantine-color-${n}-outline-hover`]:Ya(t.colors[e][Math.max(o-4,0)],.05)};return i?{[`--mantine-color-${n}-0`]:t.colors[e][0],[`--mantine-color-${n}-1`]:t.colors[e][1],[`--mantine-color-${n}-2`]:t.colors[e][2],[`--mantine-color-${n}-3`]:t.colors[e][3],[`--mantine-color-${n}-4`]:t.colors[e][4],[`--mantine-color-${n}-5`]:t.colors[e][5],[`--mantine-color-${n}-6`]:t.colors[e][6],[`--mantine-color-${n}-7`]:t.colors[e][7],[`--mantine-color-${n}-8`]:t.colors[e][8],[`--mantine-color-${n}-9`]:t.colors[e][9],...a}:a}function pB(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Ga(t,e,r){er(e).forEach(n=>Object.assign(t,{[`--mantine-${r}-${n}`]:e[n]}))}const US=t=>{const e=hu(t,"light"),r=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:it(t.defaultRadius),n={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":Yw(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":Yw(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};Ga(n.variables,t.breakpoints,"breakpoint"),Ga(n.variables,t.spacing,"spacing"),Ga(n.variables,t.fontSizes,"font-size"),Ga(n.variables,t.lineHeights,"line-height"),Ga(n.variables,t.shadows,"shadow"),Ga(n.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((o,a)=>{n.variables[`--mantine-primary-color-${a}`]=`var(--mantine-color-${t.primaryColor}-${a})`}),er(t.colors).forEach(o=>{const a=t.colors[o];if(pB(a)){Object.assign(n.light,nd({theme:t,name:a.name,color:a.light,colorScheme:"light",withColorValues:!0})),Object.assign(n.dark,nd({theme:t,name:a.name,color:a.dark,colorScheme:"dark",withColorValues:!0}));return}a.forEach((l,u)=>{n.variables[`--mantine-color-${o}-${u}`]=l}),Object.assign(n.light,nd({theme:t,color:o,colorScheme:"light",withColorValues:!1})),Object.assign(n.dark,nd({theme:t,color:o,colorScheme:"dark",withColorValues:!1}))});const i=t.headings.sizes;return er(i).forEach(o=>{n.variables[`--mantine-${o}-font-size`]=i[o].fontSize,n.variables[`--mantine-${o}-line-height`]=i[o].lineHeight,n.variables[`--mantine-${o}-font-weight`]=i[o].fontWeight||t.headings.fontWeight}),n};function mB({theme:t,generator:e}){const r=US(t),n=e==null?void 0:e(t);return n?I0(r,n):r}const Og=US(q0);function gB(t){const e={variables:{},light:{},dark:{}};return er(t.variables).forEach(r=>{Og.variables[r]!==t.variables[r]&&(e.variables[r]=t.variables[r])}),er(t.light).forEach(r=>{Og.light[r]!==t.light[r]&&(e.light[r]=t.light[r])}),er(t.dark).forEach(r=>{Og.dark[r]!==t.dark[r]&&(e.dark[r]=t.dark[r])}),e}function yB(t){return`
|
|
82
|
+
${t}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
|
|
83
|
+
${t}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
|
|
84
|
+
`}function YS({cssVariablesSelector:t,deduplicateCssVariables:e}){const r=an(),n=Hf(),i=GP(),o=mB({theme:r,generator:i}),a=t===":root"&&e,l=a?gB(o):o,u=fB(l,t);return u?b.jsx("style",{"data-mantine-styles":!0,nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:`${u}${a?"":yB(t)}`}}):null}YS.displayName="@mantine/CssVariables";function vB(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}function Xa(t,e){var i,o;const r=typeof window<"u"&&"matchMedia"in window&&((i=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:i.matches),n=t!=="auto"?t:r?"dark":"light";(o=e())==null||o.setAttribute("data-mantine-color-scheme",n)}function xB({manager:t,defaultColorScheme:e,getRootElement:r,forceColorScheme:n}){const i=$.useRef(null),[o,a]=$.useState(()=>t.get(e)),l=n||o,u=$.useCallback(d=>{n||(Xa(d,r),a(d),t.set(d))},[t.set,l,n]),h=$.useCallback(()=>{a(e),Xa(e,r),t.clear()},[t.clear,e]);return $.useEffect(()=>(t.subscribe(u),t.unsubscribe),[t.subscribe,t.unsubscribe]),Bl(()=>{Xa(t.get(e),r)},[]),$.useEffect(()=>{var f;if(n)return Xa(n,r),()=>{};n===void 0&&Xa(o,r),typeof window<"u"&&"matchMedia"in window&&(i.current=window.matchMedia("(prefers-color-scheme: dark)"));const d=m=>{o==="auto"&&Xa(m.matches?"dark":"light",r)};return(f=i.current)==null||f.addEventListener("change",d),()=>{var m;return(m=i.current)==null?void 0:m.removeEventListener("change",d)}},[o,n]),{colorScheme:l,setColorScheme:u,clearColorScheme:h}}function bB({respectReducedMotion:t,getRootElement:e}){Bl(()=>{var r;t&&((r=e())==null||r.setAttribute("data-respect-reduced-motion","true"))},[t])}vB();function GS({theme:t,children:e,getStyleNonce:r,withStaticClasses:n=!0,withGlobalClasses:i=!0,deduplicateCssVariables:o=!0,withCssVariables:a=!0,cssVariablesSelector:l=":root",classNamesPrefix:u="mantine",colorSchemeManager:h=lB(),defaultColorScheme:d="light",getRootElement:f=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:g,stylesTransform:v,env:x}){const{colorScheme:w,setColorScheme:S,clearColorScheme:k}=xB({defaultColorScheme:d,forceColorScheme:g,manager:h,getRootElement:f});return bB({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:f}),b.jsx(W0.Provider,{value:{colorScheme:w,setColorScheme:S,clearColorScheme:k,getRootElement:f,classNamesPrefix:u,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:l,withStaticClasses:n,stylesTransform:v,env:x},children:b.jsxs(VS,{theme:t,children:[a&&b.jsx(YS,{cssVariablesSelector:l,deduplicateCssVariables:o}),i&&b.jsx(dB,{}),e]})})}GS.displayName="@mantine/core/MantineProvider";function Lu({classNames:t,styles:e,props:r,stylesCtx:n}){const i=an();return{resolvedClassNames:Wf({theme:i,classNames:t,props:r,stylesCtx:n||void 0}),resolvedStyles:Vd({theme:i,styles:e,props:r,stylesCtx:n||void 0})}}const wB={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function CB({theme:t,options:e,unstyled:r}){return yr((e==null?void 0:e.focusable)&&!r&&(t.focusClassName||wB[t.focusRing]),(e==null?void 0:e.active)&&!r&&t.activeClassName)}function SB({selector:t,stylesCtx:e,options:r,props:n,theme:i}){return Wf({theme:i,classNames:r==null?void 0:r.classNames,props:(r==null?void 0:r.props)||n,stylesCtx:e})[t]}function Gw({selector:t,stylesCtx:e,theme:r,classNames:n,props:i}){return Wf({theme:r,classNames:n,props:i,stylesCtx:e})[t]}function kB({rootSelector:t,selector:e,className:r}){return t===e?r:void 0}function _B({selector:t,classes:e,unstyled:r}){return r?void 0:e[t]}function TB({themeName:t,classNamesPrefix:e,selector:r,withStaticClass:n}){return n===!1?[]:t.map(i=>`${e}-${i}-${r}`)}function EB({themeName:t,theme:e,selector:r,props:n,stylesCtx:i}){return t.map(o=>{var a,l;return(l=Wf({theme:e,classNames:(a=e.components[o])==null?void 0:a.classNames,props:n,stylesCtx:i}))==null?void 0:l[r]})}function $B({options:t,classes:e,selector:r,unstyled:n}){return t!=null&&t.variant&&!n?e[`${r}--${t.variant}`]:void 0}function LB({theme:t,options:e,themeName:r,selector:n,classNamesPrefix:i,classNames:o,classes:a,unstyled:l,className:u,rootSelector:h,props:d,stylesCtx:f,withStaticClasses:m,headless:g,transformedStyles:v}){return yr(CB({theme:t,options:e,unstyled:l||g}),EB({theme:t,themeName:r,selector:n,props:d,stylesCtx:f}),$B({options:e,classes:a,selector:n,unstyled:l}),Gw({selector:n,stylesCtx:f,theme:t,classNames:o,props:d}),Gw({selector:n,stylesCtx:f,theme:t,classNames:v,props:d}),SB({selector:n,stylesCtx:f,options:e,props:d,theme:t}),kB({rootSelector:h,selector:n,className:u}),_B({selector:n,classes:a,unstyled:l||g}),m&&!g&&TB({themeName:r,classNamesPrefix:i,selector:n,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function MB({theme:t,themeName:e,props:r,stylesCtx:n,selector:i}){return e.map(o=>{var a;return Vd({theme:t,styles:(a=t.components[o])==null?void 0:a.styles,props:r,stylesCtx:n})[i]}).reduce((o,a)=>({...o,...a}),{})}function Sy({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...Sy({style:n,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function AB(t){return t.reduce((e,r)=>(r&&Object.keys(r).forEach(n=>{e[n]={...e[n],...Eu(r[n])}}),e),{})}function RB({vars:t,varsResolver:e,theme:r,props:n,stylesCtx:i,selector:o,themeName:a,headless:l}){var u;return(u=AB([l?{}:e==null?void 0:e(r,n,i),...a.map(h=>{var d,f,m;return(m=(f=(d=r.components)==null?void 0:d[h])==null?void 0:f.vars)==null?void 0:m.call(f,r,n,i)}),t==null?void 0:t(r,n,i)]))==null?void 0:u[o]}function PB({theme:t,themeName:e,selector:r,options:n,props:i,stylesCtx:o,rootSelector:a,styles:l,style:u,vars:h,varsResolver:d,headless:f,withStylesTransform:m}){return{...!m&&MB({theme:t,themeName:e,props:i,stylesCtx:o,selector:r}),...!m&&Vd({theme:t,styles:l,props:i,stylesCtx:o})[r],...!m&&Vd({theme:t,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||i,stylesCtx:o})[r],...RB({theme:t,props:i,stylesCtx:o,vars:h,varsResolver:d,selector:r,themeName:e,headless:f}),...a===r?Sy({style:u,theme:t}):null,...Sy({style:n==null?void 0:n.style,theme:t})}}function BB({props:t,stylesCtx:e,themeName:r}){var a;const n=an(),i=(a=JP())==null?void 0:a();return{getTransformedStyles:l=>i?[...l.map(h=>i(h,{props:t,theme:n,ctx:e})),...r.map(h=>{var d;return i((d=n.components[h])==null?void 0:d.styles,{props:t,theme:n,ctx:e})})].filter(Boolean):[],withStylesTransform:!!i}}function Yt({name:t,classes:e,props:r,stylesCtx:n,className:i,style:o,rootSelector:a="root",unstyled:l,classNames:u,styles:h,vars:d,varsResolver:f}){const m=an(),g=XP(),v=KP(),x=QP(),w=(Array.isArray(t)?t:[t]).filter(E=>E),{withStylesTransform:S,getTransformedStyles:k}=BB({props:r,stylesCtx:n,themeName:w});return(E,L)=>({className:LB({theme:m,options:L,themeName:w,selector:E,classNamesPrefix:g,classNames:u,classes:e,unstyled:l,className:i,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:v,headless:x,transformedStyles:k([L==null?void 0:L.styles,h])}),style:PB({theme:m,themeName:w,selector:E,options:L,props:r,stylesCtx:n,rootSelector:a,styles:h,style:o,vars:d,varsResolver:f,headless:x,withStylesTransform:S})})}function XS(t,e){return typeof t=="boolean"?t:e.autoContrast}function Xw(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(n=>n.remove())}function NB({keepTransitions:t}={}){const e=$.useRef(BS),r=$.useRef(-1),n=$.useContext(W0),i=Hf(),o=$.useRef(i==null?void 0:i());if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");const a=f=>{n.setColorScheme(f),e.current=t?()=>{}:Xw(o.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var m;(m=e.current)==null||m.call(e)},10)},l=()=>{n.clearColorScheme(),e.current=t?()=>{}:Xw(o.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{var f;(f=e.current)==null||f.call(e)},10)},u=CP("light",{getInitialValueInEffect:!1}),h=n.colorScheme==="auto"?u:n.colorScheme,d=$.useCallback(()=>a(h==="light"?"dark":"light"),[a,h]);return $.useEffect(()=>()=>{var f;(f=e.current)==null||f.call(e),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:a,clearColorScheme:l,toggleColorScheme:d}}function ct(t,e,r){var a;const n=an(),i=(a=n.components[t])==null?void 0:a.defaultProps,o=typeof i=="function"?i(n):i;return{...e,...o,...Eu(r)}}function Fg(t){return er(t).reduce((e,r)=>t[r]!==void 0?`${e}${lP(r)}:${t[r]};`:e,"").trim()}function OB({selector:t,styles:e,media:r,container:n}){const i=e?Fg(e):"",o=Array.isArray(r)?r.map(l=>`@media${l.query}{${t}{${Fg(l.styles)}}}`):[],a=Array.isArray(n)?n.map(l=>`@container ${l.query}{${t}{${Fg(l.styles)}}}`):[];return`${i?`${t}{${i}}`:""}${o.join("")}${a.join("")}`.trim()}function qf(t){const e=Hf();return b.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:OB(t)}})}function ua(t){const{m:e,mx:r,my:n,mt:i,mb:o,ml:a,mr:l,me:u,ms:h,p:d,px:f,py:m,pt:g,pb:v,pl:x,pr:w,pe:S,ps:k,bd:E,bg:L,c:A,opacity:M,ff:B,fz:D,fw:q,lts:U,ta:H,lh:K,fs:V,tt:W,td:I,w:O,miw:F,maw:P,h:z,mih:X,mah:N,bgsz:Z,bgp:ot,bgr:yt,bga:dt,pos:lt,top:mt,left:xt,bottom:St,right:Tt,inset:ee,display:Ee,flex:pe,hiddenFrom:Oe,visibleFrom:Ue,lightHidden:xr,darkHidden:sr,sx:ar,...$e}=t;return{styleProps:Eu({m:e,mx:r,my:n,mt:i,mb:o,ml:a,mr:l,me:u,ms:h,p:d,px:f,py:m,pt:g,pb:v,pl:x,pr:w,pe:S,ps:k,bd:E,bg:L,c:A,opacity:M,ff:B,fz:D,fw:q,lts:U,ta:H,lh:K,fs:V,tt:W,td:I,w:O,miw:F,maw:P,h:z,mih:X,mah:N,bgsz:Z,bgp:ot,bgr:yt,bga:dt,pos:lt,top:mt,left:xt,bottom:St,right:Tt,inset:ee,display:Ee,flex:pe,hiddenFrom:Oe,visibleFrom:Ue,lightHidden:xr,darkHidden:sr,sx:ar}),rest:$e}}const FB={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Y0(t,e){const r=ds({color:t,theme:e});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function DB(t,e){const r=ds({color:t,theme:e});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:Y0(t,e)}function IB(t,e){if(typeof t=="number")return it(t);if(typeof t=="string"){const[r,n,...i]=t.split(" ").filter(a=>a.trim()!=="");let o=`${it(r)}`;return n&&(o+=` ${n}`),i.length>0&&(o+=` ${Y0(i.join(" "),e)}`),o.trim()}return t}const Kw={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function jB(t){return typeof t=="string"&&t in Kw?Kw[t]:t}const zB=["h1","h2","h3","h4","h5","h6"];function WB(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&zB.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?it(t):t}function HB(t){return t}const qB=["h1","h2","h3","h4","h5","h6"];function VB(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&qB.includes(t)?`var(--mantine-${t}-line-height)`:t}function UB(t){return typeof t=="number"?it(t):t}function YB(t,e){if(typeof t=="number")return it(t);if(typeof t=="string"){const r=t.replace("-","");if(!(r in e.spacing))return it(t);const n=`--mantine-spacing-${r}`;return t.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return t}const Dg={color:Y0,textColor:DB,fontSize:WB,spacing:YB,identity:HB,size:UB,lineHeight:VB,fontFamily:jB,border:IB};function Qw(t){return t.replace("(min-width: ","").replace("em)","")}function GB({media:t,...e}){const n=Object.keys(t).sort((i,o)=>Number(Qw(i))-Number(Qw(o))).map(i=>({query:i,styles:t[i]}));return{...e,media:n}}function XB(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function KB(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function QB(t){return typeof t=="object"&&t!==null?er(t).filter(e=>e!=="base"):[]}function ZB(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function JB({styleProps:t,data:e,theme:r}){return GB(er(t).reduce((n,i)=>{if(i==="hiddenFrom"||i==="visibleFrom"||i==="sx")return n;const o=e[i],a=Array.isArray(o.property)?o.property:[o.property],l=KB(t[i]);if(!XB(t[i]))return a.forEach(h=>{n.inlineStyles[h]=Dg[o.type](l,r)}),n;n.hasResponsiveStyles=!0;const u=QB(t[i]);return a.forEach(h=>{l&&(n.styles[h]=Dg[o.type](l,r)),u.forEach(d=>{const f=`(min-width: ${r.breakpoints[d]})`;n.media[f]={...n.media[f],[h]:Dg[o.type](ZB(t[i],d),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function KS(){return`__m__-${$.useId().replace(/:/g,"")}`}function G0(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...G0(n,e)}),{}):typeof t=="function"?t(e):t??{}}function QS(t){return t.startsWith("data-")?t:`data-${t}`}function t4(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return n===void 0||n===""||n===!1||n===null||(e[QS(r)]=t[r]),e},{})}function ZS(t){return t?typeof t=="string"?{[QS(t)]:!0}:Array.isArray(t)?[...t].reduce((e,r)=>({...e,...ZS(r)}),{}):t4(t):null}function ky(t,e){return Array.isArray(t)?[...t].reduce((r,n)=>({...r,...ky(n,e)}),{}):typeof t=="function"?t(e):t??{}}function e4({theme:t,style:e,vars:r,styleProps:n}){const i=ky(e,t),o=ky(r,t);return{...i,...o,...n}}const JS=$.forwardRef(({component:t,style:e,__vars:r,className:n,variant:i,mod:o,size:a,hiddenFrom:l,visibleFrom:u,lightHidden:h,darkHidden:d,renderRoot:f,__size:m,...g},v)=>{var D;const x=an(),w=t||"div",{styleProps:S,rest:k}=ua(g),E=ZP(),L=(D=E==null?void 0:E())==null?void 0:D(S.sx),A=KS(),M=JB({styleProps:S,theme:x,data:FB}),B={ref:v,style:e4({theme:x,style:e,vars:r,styleProps:M.inlineStyles}),className:yr(n,L,{[A]:M.hasResponsiveStyles,"mantine-light-hidden":h,"mantine-dark-hidden":d,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${u}`]:u}),"data-variant":i,"data-size":PS(a)?void 0:a||void 0,size:m,...ZS(o),...k};return b.jsxs(b.Fragment,{children:[M.hasResponsiveStyles&&b.jsx(qf,{selector:`.${A}`,styles:M.styles,media:M.media}),typeof f=="function"?f(B):b.jsx(w,{...B})]})});JS.displayName="@mantine/core/Box";const st=JS;function tk(t){return t}function r4(t){const e=t;return r=>{const n=$.forwardRef((i,o)=>b.jsx(e,{...r,...i,ref:o}));return n.extend=e.extend,n.displayName=`WithProps(${e.displayName})`,n}}function Ct(t){const e=$.forwardRef(t);return e.extend=tk,e.withProps=r=>{const n=$.forwardRef((i,o)=>b.jsx(e,{...r,...i,ref:o}));return n.extend=e.extend,n.displayName=`WithProps(${e.displayName})`,n},e}function ln(t){const e=$.forwardRef(t);return e.withProps=r=>{const n=$.forwardRef((i,o)=>b.jsx(e,{...r,...i,ref:o}));return n.extend=e.extend,n.displayName=`WithProps(${e.displayName})`,n},e.extend=tk,e}const n4=$.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Mu(){return $.useContext(n4)}var Vf=kS();const Uc=Ff(Vf);function i4(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Ig(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const Rc=typeof window<"u"&&window.requestAnimationFrame;function o4({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:r=()=>{},opened:n}){const i=$.useRef(null),o=0,a={height:0,overflow:"hidden"},[l,u]=$.useState(n?{}:a),h=v=>{Vf.flushSync(()=>u(v))},d=v=>{h(x=>({...x,...v}))};function f(v){const x=t||i4(v);return{transition:`height ${x}ms ${e}, opacity ${x}ms ${e}`}}Hi(()=>{typeof Rc=="function"&&Rc(n?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Rc(()=>{const v=Ig(i);d({...f(v),height:v})})}:()=>{const v=Ig(i);d({...f(v),willChange:"height",height:v}),Rc(()=>d({height:o,overflow:"hidden"}))})},[n]);const m=v=>{if(!(v.target!==i.current||v.propertyName!=="height"))if(n){const x=Ig(i);x===l.height?h({}):d({height:x}),r()}else l.height===o&&(h(a),r())};function g({style:v={},refKey:x="ref",...w}={}){const S=w[x],k={"aria-hidden":!n,...w,[x]:WS(i,S),onTransitionEnd:m,style:{boxSizing:"border-box",...v,...l}};return kr.version.startsWith("18")?n||(k.inert=""):k.inert=!n,k}return g}const s4={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},ek=Ct((t,e)=>{const{children:r,in:n,transitionDuration:i,transitionTimingFunction:o,style:a,onTransitionEnd:l,animateOpacity:u,...h}=ct("Collapse",s4,t),d=an(),f=jf(),g=(d.respectReducedMotion?f:!1)?0:i,v=o4({opened:n,transitionDuration:g,transitionTimingFunction:o,onTransitionEnd:l});return g===0?n?b.jsx(st,{...h,children:r}):null:b.jsx(st,{...v({style:{opacity:n||!u?1:0,transition:u?`opacity ${g}ms ${o}`:"none",...G0(a,d)},ref:e,...h}),children:r})});ek.displayName="@mantine/core/Collapse";function Uf(){return typeof window<"u"}function Nl(t){return rk(t)?(t.nodeName||"").toLowerCase():"#document"}function kn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Gi(t){var e;return(e=(rk(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rk(t){return Uf()?t instanceof Node||t instanceof kn(t).Node:!1}function Ne(t){return Uf()?t instanceof Element||t instanceof kn(t).Element:!1}function Fn(t){return Uf()?t instanceof HTMLElement||t instanceof kn(t).HTMLElement:!1}function _y(t){return!Uf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kn(t).ShadowRoot}const a4=new Set(["inline","contents"]);function Au(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Gn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!a4.has(i)}const l4=new Set(["table","td","th"]);function c4(t){return l4.has(Nl(t))}const u4=[":popover-open",":modal"];function Yf(t){return u4.some(e=>{try{return t.matches(e)}catch{return!1}})}const h4=["transform","translate","scale","rotate","perspective"],d4=["transform","translate","scale","rotate","perspective","filter"],f4=["paint","layout","strict","content"];function X0(t){const e=Gf(),r=Ne(t)?Gn(t):t;return h4.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||d4.some(n=>(r.willChange||"").includes(n))||f4.some(n=>(r.contain||"").includes(n))}function p4(t){let e=bo(t);for(;Fn(e)&&!ss(e);){if(X0(e))return e;if(Yf(e))return null;e=bo(e)}return null}function Gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const m4=new Set(["html","body","#document"]);function ss(t){return m4.has(Nl(t))}function Gn(t){return kn(t).getComputedStyle(t)}function Xf(t){return Ne(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bo(t){if(Nl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_y(t)&&t.host||Gi(t);return _y(e)?e.host:e}function nk(t){const e=bo(t);return ss(e)?t.ownerDocument?t.ownerDocument.body:t.body:Fn(e)&&Au(e)?e:nk(e)}function yo(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=nk(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),a=kn(i);if(o){const l=Ty(a);return e.concat(a,a.visualViewport||[],Au(i)?i:[],l&&r?yo(l):[])}return e.concat(i,yo(i,[],r))}function Ty(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zw(t){let e=t.activeElement;for(;((r=e)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;e=e.shadowRoot.activeElement}return e}function du(t,e){if(!t||!e)return!1;const r=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(r&&_y(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ik(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function ok(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:n}=e;return r+"/"+n}).join(" "):navigator.userAgent}function g4(t){return x4()?!1:!Jw()&&t.width===0&&t.height===0||Jw()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function y4(){return/apple/i.test(navigator.vendor)}function Jw(){const t=/android/i;return t.test(ik())||t.test(ok())}function v4(){return ik().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function x4(){return ok().includes("jsdom/")}function Ey(t,e){const r=["mouse","pen"];return r.push("",void 0),r.includes(t)}function b4(t){return"nativeEvent"in t}function w4(t){return t.matches("html,body")}function Ws(t){return(t==null?void 0:t.ownerDocument)||document}function jg(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const r=t;return r.target!=null&&e.contains(r.target)}function Ja(t){return"composedPath"in t?t.composedPath()[0]:t.target}const C4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function S4(t){return Fn(t)&&t.matches(C4)}const wi=Math.min,jr=Math.max,Ud=Math.round,id=Math.floor,ji=t=>({x:t,y:t}),k4={left:"right",right:"left",bottom:"top",top:"bottom"},_4={start:"end",end:"start"};function $y(t,e,r){return jr(t,wi(e,r))}function wo(t,e){return typeof t=="function"?t(e):t}function Ci(t){return t.split("-")[0]}function Ol(t){return t.split("-")[1]}function K0(t){return t==="x"?"y":"x"}function Q0(t){return t==="y"?"height":"width"}const T4=new Set(["top","bottom"]);function gi(t){return T4.has(Ci(t))?"y":"x"}function Z0(t){return K0(gi(t))}function E4(t,e,r){r===void 0&&(r=!1);const n=Ol(t),i=Z0(t),o=Q0(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=Yd(a)),[a,Yd(a)]}function $4(t){const e=Yd(t);return[Ly(t),e,Ly(e)]}function Ly(t){return t.replace(/start|end/g,e=>_4[e])}const t2=["left","right"],e2=["right","left"],L4=["top","bottom"],M4=["bottom","top"];function A4(t,e,r){switch(t){case"top":case"bottom":return r?e?e2:t2:e?t2:e2;case"left":case"right":return e?L4:M4;default:return[]}}function R4(t,e,r,n){const i=Ol(t);let o=A4(Ci(t),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(Ly)))),o}function Yd(t){return t.replace(/left|right|bottom|top/g,e=>k4[e])}function P4(t){return{top:0,right:0,bottom:0,left:0,...t}}function J0(t){return typeof t!="number"?P4(t):{top:t,right:t,bottom:t,left:t}}function Cl(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function r2(t,e,r){let{reference:n,floating:i}=t;const o=gi(e),a=Z0(e),l=Q0(a),u=Ci(e),h=o==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let g;switch(u){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:f};break;case"left":g={x:n.x-i.width,y:f};break;default:g={x:n.x,y:n.y}}switch(Ol(e)){case"start":g[a]-=m*(r&&h?-1:1);break;case"end":g[a]+=m*(r&&h?-1:1);break}return g}const B4=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,l=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:f}=r2(h,n,u),m=n,g={},v=0;for(let x=0;x<l.length;x++){const{name:w,fn:S}=l[x],{x:k,y:E,data:L,reset:A}=await S({x:d,y:f,initialPlacement:n,placement:m,strategy:i,middlewareData:g,rects:h,platform:a,elements:{reference:t,floating:e}});d=k??d,f=E??f,g={...g,[w]:{...g[w],...L}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(h=A.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:f}=r2(h,m,u)),x=-1)}return{x:d,y:f,placement:m,strategy:i,middlewareData:g}};async function tv(t,e){var r;e===void 0&&(e={});const{x:n,y:i,platform:o,rects:a,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=wo(e,t),v=J0(g),w=l[m?f==="floating"?"reference":"floating":f],S=Cl(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:h,rootBoundary:d,strategy:u})),k=f==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),L=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},A=Cl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:E,strategy:u}):k);return{top:(S.top-A.top+v.top)/L.y,bottom:(A.bottom-S.bottom+v.bottom)/L.y,left:(S.left-A.left+v.left)/L.x,right:(A.right-S.right+v.right)/L.x}}const N4=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:o,platform:a,elements:l,middlewareData:u}=e,{element:h,padding:d=0}=wo(t,e)||{};if(h==null)return{};const f=J0(d),m={x:r,y:n},g=Z0(i),v=Q0(g),x=await a.getDimensions(h),w=g==="y",S=w?"top":"left",k=w?"bottom":"right",E=w?"clientHeight":"clientWidth",L=o.reference[v]+o.reference[g]-m[g]-o.floating[v],A=m[g]-o.reference[g],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let B=M?M[E]:0;(!B||!await(a.isElement==null?void 0:a.isElement(M)))&&(B=l.floating[E]||o.floating[v]);const D=L/2-A/2,q=B/2-x[v]/2-1,U=wi(f[S],q),H=wi(f[k],q),K=U,V=B-x[v]-H,W=B/2-x[v]/2+D,I=$y(K,W,V),O=!u.arrow&&Ol(i)!=null&&W!==I&&o.reference[v]/2-(W<K?U:H)-x[v]/2<0,F=O?W<K?W-K:W-V:0;return{[g]:m[g]+F,data:{[g]:I,centerOffset:W-I-F,...O&&{alignmentOffset:F}},reset:O}}}),O4=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:u,elements:h}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...w}=wo(t,e);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const S=Ci(i),k=gi(l),E=Ci(l)===l,L=await(u.isRTL==null?void 0:u.isRTL(h.floating)),A=m||(E||!x?[Yd(l)]:$4(l)),M=v!=="none";!m&&M&&A.push(...R4(l,x,v,L));const B=[l,...A],D=await tv(e,w),q=[];let U=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(D[S]),f){const W=E4(i,a,L);q.push(D[W[0]],D[W[1]])}if(U=[...U,{placement:i,overflows:q}],!q.every(W=>W<=0)){var H,K;const W=(((H=o.flip)==null?void 0:H.index)||0)+1,I=B[W];if(I&&(!(f==="alignment"?k!==gi(I):!1)||U.every(P=>gi(P.placement)===k?P.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:I}};let O=(K=U.filter(F=>F.overflows[0]<=0).sort((F,P)=>F.overflows[1]-P.overflows[1])[0])==null?void 0:K.placement;if(!O)switch(g){case"bestFit":{var V;const F=(V=U.filter(P=>{if(M){const z=gi(P.placement);return z===k||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,X)=>z+X,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:V[0];F&&(O=F);break}case"initialPlacement":O=l;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function sk(t){const e=wi(...t.map(o=>o.left)),r=wi(...t.map(o=>o.top)),n=jr(...t.map(o=>o.right)),i=jr(...t.map(o=>o.bottom));return{x:e,y:r,width:n-e,height:i-r}}function F4(t){const e=t.slice().sort((i,o)=>i.y-o.y),r=[];let n=null;for(let i=0;i<e.length;i++){const o=e[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Cl(sk(i)))}const D4=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:r,elements:n,rects:i,platform:o,strategy:a}=e,{padding:l=2,x:u,y:h}=wo(t,e),d=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),f=F4(d),m=Cl(sk(d)),g=J0(l);function v(){if(f.length===2&&f[0].left>f[1].right&&u!=null&&h!=null)return f.find(w=>u>w.left-g.left&&u<w.right+g.right&&h>w.top-g.top&&h<w.bottom+g.bottom)||m;if(f.length>=2){if(gi(r)==="y"){const U=f[0],H=f[f.length-1],K=Ci(r)==="top",V=U.top,W=H.bottom,I=K?U.left:H.left,O=K?U.right:H.right,F=O-I,P=W-V;return{top:V,bottom:W,left:I,right:O,width:F,height:P,x:I,y:V}}const w=Ci(r)==="left",S=jr(...f.map(U=>U.right)),k=wi(...f.map(U=>U.left)),E=f.filter(U=>w?U.left===k:U.right===S),L=E[0].top,A=E[E.length-1].bottom,M=k,B=S,D=B-M,q=A-L;return{top:L,bottom:A,left:M,right:B,width:D,height:q,x:M,y:L}}return m}const x=await o.getElementRects({reference:{getBoundingClientRect:v},floating:n.floating,strategy:a});return i.reference.x!==x.reference.x||i.reference.y!==x.reference.y||i.reference.width!==x.reference.width||i.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},ak=new Set(["left","top"]);async function I4(t,e){const{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Ci(r),l=Ol(r),u=gi(r)==="y",h=ak.has(a)?-1:1,d=o&&u?-1:1,f=wo(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),u?{x:g*d,y:m*h}:{x:m*h,y:g*d}}const j4=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:o,placement:a,middlewareData:l}=e,u=await I4(e,t);return a===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},z4=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:S,y:k}=w;return{x:S,y:k}}},...u}=wo(t,e),h={x:r,y:n},d=await tv(e,u),f=gi(Ci(i)),m=K0(f);let g=h[m],v=h[f];if(o){const w=m==="y"?"top":"left",S=m==="y"?"bottom":"right",k=g+d[w],E=g-d[S];g=$y(k,g,E)}if(a){const w=f==="y"?"top":"left",S=f==="y"?"bottom":"right",k=v+d[w],E=v-d[S];v=$y(k,v,E)}const x=l.fn({...e,[m]:g,[f]:v});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[m]:o,[f]:a}}}}}},W4=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:h=!0}=wo(t,e),d={x:r,y:n},f=gi(i),m=K0(f);let g=d[m],v=d[f];const x=wo(l,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const E=m==="y"?"height":"width",L=o.reference[m]-o.floating[E]+w.mainAxis,A=o.reference[m]+o.reference[E]-w.mainAxis;g<L?g=L:g>A&&(g=A)}if(h){var S,k;const E=m==="y"?"width":"height",L=ak.has(Ci(i)),A=o.reference[f]-o.floating[E]+(L&&((S=a.offset)==null?void 0:S[f])||0)+(L?0:w.crossAxis),M=o.reference[f]+o.reference[E]+(L?0:((k=a.offset)==null?void 0:k[f])||0)-(L?w.crossAxis:0);v<A?v=A:v>M&&(v=M)}return{[m]:g,[f]:v}}}},H4=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:o,platform:a,elements:l}=e,{apply:u=()=>{},...h}=wo(t,e),d=await tv(e,h),f=Ci(i),m=Ol(i),g=gi(i)==="y",{width:v,height:x}=o.floating;let w,S;f==="top"||f==="bottom"?(w=f,S=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(S=f,w=m==="end"?"top":"bottom");const k=x-d.top-d.bottom,E=v-d.left-d.right,L=wi(x-d[w],k),A=wi(v-d[S],E),M=!e.middlewareData.shift;let B=L,D=A;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(D=E),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(B=k),M&&!m){const U=jr(d.left,0),H=jr(d.right,0),K=jr(d.top,0),V=jr(d.bottom,0);g?D=v-2*(U!==0||H!==0?U+H:jr(d.left,d.right)):B=x-2*(K!==0||V!==0?K+V:jr(d.top,d.bottom))}await u({...e,availableWidth:D,availableHeight:B});const q=await a.getDimensions(l.floating);return v!==q.width||x!==q.height?{reset:{rects:!0}}:{}}}};function lk(t){const e=Gn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Fn(t),o=i?t.offsetWidth:r,a=i?t.offsetHeight:n,l=Ud(r)!==o||Ud(n)!==a;return l&&(r=o,n=a),{width:r,height:n,$:l}}function ev(t){return Ne(t)?t:t.contextElement}function ll(t){const e=ev(t);if(!Fn(e))return ji(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:o}=lk(e);let a=(o?Ud(r.width):r.width)/n,l=(o?Ud(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const q4=ji(0);function ck(t){const e=kn(t);return!Gf()||!e.visualViewport?q4:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function V4(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==kn(t)?!1:e}function ea(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),o=ev(t);let a=ji(1);e&&(n?Ne(n)&&(a=ll(n)):a=ll(t));const l=V4(o,r,n)?ck(o):ji(0);let u=(i.left+l.x)/a.x,h=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const m=kn(o),g=n&&Ne(n)?kn(n):n;let v=m,x=Ty(v);for(;x&&n&&g!==v;){const w=ll(x),S=x.getBoundingClientRect(),k=Gn(x),E=S.left+(x.clientLeft+parseFloat(k.paddingLeft))*w.x,L=S.top+(x.clientTop+parseFloat(k.paddingTop))*w.y;u*=w.x,h*=w.y,d*=w.x,f*=w.y,u+=E,h+=L,v=kn(x),x=Ty(v)}}return Cl({width:d,height:f,x:u,y:h})}function Kf(t,e){const r=Xf(t).scrollLeft;return e?e.left+r:ea(Gi(t)).left+r}function uk(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Kf(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function U4(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const o=i==="fixed",a=Gi(n),l=e?Yf(e.floating):!1;if(n===a||l&&o)return r;let u={scrollLeft:0,scrollTop:0},h=ji(1);const d=ji(0),f=Fn(n);if((f||!f&&!o)&&((Nl(n)!=="body"||Au(a))&&(u=Xf(n)),Fn(n))){const g=ea(n);h=ll(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=a&&!f&&!o?uk(a,u):ji(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-u.scrollLeft*h.x+d.x+m.x,y:r.y*h.y-u.scrollTop*h.y+d.y+m.y}}function Y4(t){return Array.from(t.getClientRects())}function G4(t){const e=Gi(t),r=Xf(t),n=t.ownerDocument.body,i=jr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=jr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Kf(t);const l=-r.scrollTop;return Gn(n).direction==="rtl"&&(a+=jr(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:l}}const n2=25;function X4(t,e){const r=kn(t),n=Gi(t),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,l=0,u=0;if(i){o=i.width,a=i.height;const d=Gf();(!d||d&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const h=Kf(n);if(h<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(n.clientWidth-f.clientWidth-g);v<=n2&&(o-=v)}else h<=n2&&(o+=h);return{width:o,height:a,x:l,y:u}}const K4=new Set(["absolute","fixed"]);function Q4(t,e){const r=ea(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Fn(t)?ll(t):ji(1),a=t.clientWidth*o.x,l=t.clientHeight*o.y,u=i*o.x,h=n*o.y;return{width:a,height:l,x:u,y:h}}function i2(t,e,r){let n;if(e==="viewport")n=X4(t,r);else if(e==="document")n=G4(Gi(t));else if(Ne(e))n=Q4(e,r);else{const i=ck(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Cl(n)}function hk(t,e){const r=bo(t);return r===e||!Ne(r)||ss(r)?!1:Gn(r).position==="fixed"||hk(r,e)}function Z4(t,e){const r=e.get(t);if(r)return r;let n=yo(t,[],!1).filter(l=>Ne(l)&&Nl(l)!=="body"),i=null;const o=Gn(t).position==="fixed";let a=o?bo(t):t;for(;Ne(a)&&!ss(a);){const l=Gn(a),u=X0(a);!u&&l.position==="fixed"&&(i=null),(o?!u&&!i:!u&&l.position==="static"&&!!i&&K4.has(i.position)||Au(a)&&!u&&hk(t,a))?n=n.filter(d=>d!==a):i=l,a=bo(a)}return e.set(t,n),n}function J4(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const a=[...r==="clippingAncestors"?Yf(e)?[]:Z4(e,this._c):[].concat(r),n],l=a[0],u=a.reduce((h,d)=>{const f=i2(e,d,i);return h.top=jr(f.top,h.top),h.right=wi(f.right,h.right),h.bottom=wi(f.bottom,h.bottom),h.left=jr(f.left,h.left),h},i2(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function tN(t){const{width:e,height:r}=lk(t);return{width:e,height:r}}function eN(t,e,r){const n=Fn(e),i=Gi(e),o=r==="fixed",a=ea(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const u=ji(0);function h(){u.x=Kf(i)}if(n||!n&&!o)if((Nl(e)!=="body"||Au(i))&&(l=Xf(e)),n){const g=ea(e,!0,o,e);u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}else i&&h();o&&!n&&i&&h();const d=i&&!n&&!o?uk(i,l):ji(0),f=a.left+l.scrollLeft-u.x-d.x,m=a.top+l.scrollTop-u.y-d.y;return{x:f,y:m,width:a.width,height:a.height}}function zg(t){return Gn(t).position==="static"}function o2(t,e){if(!Fn(t)||Gn(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Gi(t)===r&&(r=r.ownerDocument.body),r}function dk(t,e){const r=kn(t);if(Yf(t))return r;if(!Fn(t)){let i=bo(t);for(;i&&!ss(i);){if(Ne(i)&&!zg(i))return i;i=bo(i)}return r}let n=o2(t,e);for(;n&&c4(n)&&zg(n);)n=o2(n,e);return n&&ss(n)&&zg(n)&&!X0(n)?r:n||p4(t)||r}const rN=async function(t){const e=this.getOffsetParent||dk,r=this.getDimensions,n=await r(t.floating);return{reference:eN(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nN(t){return Gn(t).direction==="rtl"}const iN={convertOffsetParentRelativeRectToViewportRelativeRect:U4,getDocumentElement:Gi,getClippingRect:J4,getOffsetParent:dk,getElementRects:rN,getClientRects:Y4,getDimensions:tN,getScale:ll,isElement:Ne,isRTL:nN};function fk(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function oN(t,e){let r=null,n;const i=Gi(t);function o(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),o();const h=t.getBoundingClientRect(),{left:d,top:f,width:m,height:g}=h;if(l||e(),!m||!g)return;const v=id(f),x=id(i.clientWidth-(d+m)),w=id(i.clientHeight-(f+g)),S=id(d),E={rootMargin:-v+"px "+-x+"px "+-w+"px "+-S+"px",threshold:jr(0,wi(1,u))||1};let L=!0;function A(M){const B=M[0].intersectionRatio;if(B!==u){if(!L)return a();B?a(!1,B):n=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!fk(h,t.getBoundingClientRect())&&a(),L=!1}try{r=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(A,E)}r.observe(t)}return a(!0),o}function sN(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,h=ev(t),d=i||o?[...h?yo(h):[],...yo(e)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),o&&S.addEventListener("resize",r)});const f=h&&l?oN(h,r):null;let m=-1,g=null;a&&(g=new ResizeObserver(S=>{let[k]=S;k&&k.target===h&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(e)})),r()}),h&&!u&&g.observe(h),g.observe(e));let v,x=u?ea(t):null;u&&w();function w(){const S=ea(t);x&&!fk(x,S)&&r(),x=S,v=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(k=>{i&&k.removeEventListener("scroll",r),o&&k.removeEventListener("resize",r)}),f==null||f(),(S=g)==null||S.disconnect(),g=null,u&&cancelAnimationFrame(v)}}const aN=j4,lN=z4,cN=O4,uN=H4,s2=N4,hN=D4,dN=W4,fN=(t,e,r)=>{const n=new Map,i={platform:iN,...r},o={...i.platform,_c:n};return B4(t,e,{...i,platform:o})};var pN=typeof document<"u",mN=function(){},Cd=pN?$.useLayoutEffect:mN;function Gd(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Gd(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&t.$$typeof)&&!Gd(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function pk(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function a2(t,e){const r=pk(t);return Math.round(e*r)/r}function Wg(t){const e=$.useRef(t);return Cd(()=>{e.current=t}),e}function gN(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:u,open:h}=t,[d,f]=$.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[m,g]=$.useState(n);Gd(m,n)||g(n);const[v,x]=$.useState(null),[w,S]=$.useState(null),k=$.useCallback(P=>{P!==M.current&&(M.current=P,x(P))},[]),E=$.useCallback(P=>{P!==B.current&&(B.current=P,S(P))},[]),L=o||v,A=a||w,M=$.useRef(null),B=$.useRef(null),D=$.useRef(d),q=u!=null,U=Wg(u),H=Wg(i),K=Wg(h),V=$.useCallback(()=>{if(!M.current||!B.current)return;const P={placement:e,strategy:r,middleware:m};H.current&&(P.platform=H.current),fN(M.current,B.current,P).then(z=>{const X={...z,isPositioned:K.current!==!1};W.current&&!Gd(D.current,X)&&(D.current=X,Vf.flushSync(()=>{f(X)}))})},[m,e,r,H,K]);Cd(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[h]);const W=$.useRef(!1);Cd(()=>(W.current=!0,()=>{W.current=!1}),[]),Cd(()=>{if(L&&(M.current=L),A&&(B.current=A),L&&A){if(U.current)return U.current(L,A,V);V()}},[L,A,V,U,q]);const I=$.useMemo(()=>({reference:M,floating:B,setReference:k,setFloating:E}),[k,E]),O=$.useMemo(()=>({reference:L,floating:A}),[L,A]),F=$.useMemo(()=>{const P={position:r,left:0,top:0};if(!O.floating)return P;const z=a2(O.floating,d.x),X=a2(O.floating,d.y);return l?{...P,transform:"translate("+z+"px, "+X+"px)",...pk(O.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:X}},[r,l,O.floating,d.x,d.y]);return $.useMemo(()=>({...d,update:V,refs:I,elements:O,floatingStyles:F}),[d,V,I,O,F])}const yN=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?s2({element:n.current,padding:i}).fn(r):{}:n?s2({element:n,padding:i}).fn(r):{}}}},mk=(t,e)=>({...aN(t),options:[t,e]}),rv=(t,e)=>({...lN(t),options:[t,e]}),l2=(t,e)=>({...dN(t),options:[t,e]}),Xd=(t,e)=>({...cN(t),options:[t,e]}),vN=(t,e)=>({...uN(t),options:[t,e]}),nu=(t,e)=>({...hN(t),options:[t,e]}),gk=(t,e)=>({...yN(t),options:[t,e]});function xN(t){return $.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})},t)}const yk={...xR},bN=yk.useInsertionEffect,wN=bN||(t=>t());function po(t){const e=$.useRef(()=>{});return wN(()=>{e.current=t}),$.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.current==null?void 0:e.current(...n)},[])}var zi=typeof document<"u"?$.useLayoutEffect:$.useEffect;let c2=!1,CN=0;const u2=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+CN++;function SN(){const[t,e]=$.useState(()=>c2?u2():void 0);return zi(()=>{t==null&&e(u2())},[]),$.useEffect(()=>{c2=!0},[]),t}const kN=yk.useId,vk=kN||SN;function _N(){const t=new Map;return{emit(e,r){var n;(n=t.get(e))==null||n.forEach(i=>i(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(i=>i!==r))||[])}}}const TN=$.createContext(null),EN=$.createContext(null),nv=()=>{var t;return((t=$.useContext(TN))==null?void 0:t.id)||null},iv=()=>$.useContext(EN);function ov(t){return"data-floating-ui-"+t}function Hg(t){const e=$.useRef(t);return zi(()=>{e.current=t}),e}const h2=ov("safe-polygon");function Sd(t,e,r){return r&&!Ey(r)?0:typeof t=="number"?t:t==null?void 0:t[e]}function $N(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=t,{enabled:l=!0,delay:u=0,handleClose:h=null,mouseOnly:d=!1,restMs:f=0,move:m=!0}=e,g=iv(),v=nv(),x=Hg(h),w=Hg(u),S=Hg(r),k=$.useRef(),E=$.useRef(-1),L=$.useRef(),A=$.useRef(-1),M=$.useRef(!0),B=$.useRef(!1),D=$.useRef(()=>{}),q=$.useRef(!1),U=$.useCallback(()=>{var F;const P=(F=i.current.openEvent)==null?void 0:F.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[i]);$.useEffect(()=>{if(!l)return;function F(P){let{open:z}=P;z||(clearTimeout(E.current),clearTimeout(A.current),M.current=!0,q.current=!1)}return o.on("openchange",F),()=>{o.off("openchange",F)}},[l,o]),$.useEffect(()=>{if(!l||!x.current||!r)return;function F(z){U()&&n(!1,z,"hover")}const P=Ws(a.floating).documentElement;return P.addEventListener("mouseleave",F),()=>{P.removeEventListener("mouseleave",F)}},[a.floating,r,n,l,x,U]);const H=$.useCallback(function(F,P,z){P===void 0&&(P=!0),z===void 0&&(z="hover");const X=Sd(w.current,"close",k.current);X&&!L.current?(clearTimeout(E.current),E.current=window.setTimeout(()=>n(!1,F,z),X)):P&&(clearTimeout(E.current),n(!1,F,z))},[w,n]),K=po(()=>{D.current(),L.current=void 0}),V=po(()=>{if(B.current){const F=Ws(a.floating).body;F.style.pointerEvents="",F.removeAttribute(h2),B.current=!1}}),W=po(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);$.useEffect(()=>{if(!l)return;function F(N){if(clearTimeout(E.current),M.current=!1,d&&!Ey(k.current)||f>0&&!Sd(w.current,"open"))return;const Z=Sd(w.current,"open",k.current);Z?E.current=window.setTimeout(()=>{S.current||n(!0,N,"hover")},Z):r||n(!0,N,"hover")}function P(N){if(W())return;D.current();const Z=Ws(a.floating);if(clearTimeout(A.current),q.current=!1,x.current&&i.current.floatingContext){r||clearTimeout(E.current),L.current=x.current({...i.current.floatingContext,tree:g,x:N.clientX,y:N.clientY,onClose(){V(),K(),W()||H(N,!0,"safe-polygon")}});const yt=L.current;Z.addEventListener("mousemove",yt),D.current=()=>{Z.removeEventListener("mousemove",yt)};return}(k.current==="touch"?!du(a.floating,N.relatedTarget):!0)&&H(N)}function z(N){W()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:g,x:N.clientX,y:N.clientY,onClose(){V(),K(),W()||H(N)}})(N))}if(Ne(a.domReference)){var X;const N=a.domReference;return r&&N.addEventListener("mouseleave",z),(X=a.floating)==null||X.addEventListener("mouseleave",z),m&&N.addEventListener("mousemove",F,{once:!0}),N.addEventListener("mouseenter",F),N.addEventListener("mouseleave",P),()=>{var Z;r&&N.removeEventListener("mouseleave",z),(Z=a.floating)==null||Z.removeEventListener("mouseleave",z),m&&N.removeEventListener("mousemove",F),N.removeEventListener("mouseenter",F),N.removeEventListener("mouseleave",P)}}},[a,l,t,d,f,m,H,K,V,n,r,S,g,w,x,i,W]),zi(()=>{var F;if(l&&r&&(F=x.current)!=null&&F.__options.blockPointerEvents&&U()){B.current=!0;const z=a.floating;if(Ne(a.domReference)&&z){var P;const X=Ws(a.floating).body;X.setAttribute(h2,"");const N=a.domReference,Z=g==null||(P=g.nodesRef.current.find(ot=>ot.id===v))==null||(P=P.context)==null?void 0:P.elements.floating;return Z&&(Z.style.pointerEvents=""),X.style.pointerEvents="none",N.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{X.style.pointerEvents="",N.style.pointerEvents="",z.style.pointerEvents=""}}}},[l,r,v,a,g,x,U]),zi(()=>{r||(k.current=void 0,q.current=!1,K(),V())},[r,K,V]),$.useEffect(()=>()=>{K(),clearTimeout(E.current),clearTimeout(A.current),V()},[l,a.domReference,K,V]);const I=$.useMemo(()=>{function F(P){k.current=P.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(P){const{nativeEvent:z}=P;function X(){!M.current&&!S.current&&n(!0,z,"hover")}d&&!Ey(k.current)||r||f===0||q.current&&P.movementX**2+P.movementY**2<2||(clearTimeout(A.current),k.current==="touch"?X():(q.current=!0,A.current=window.setTimeout(X,f)))}}},[d,n,r,S,f]),O=$.useMemo(()=>({onMouseEnter(){clearTimeout(E.current)},onMouseLeave(F){W()||H(F.nativeEvent,!1)}}),[H,W]);return $.useMemo(()=>l?{reference:I,floating:O}:{},[l,I,O])}const My=()=>{},xk=$.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:My,setState:My,isInstantPhase:!1}),LN=()=>$.useContext(xk);function MN(t){const{children:e,delay:r,timeoutMs:n=0}=t,[i,o]=$.useReducer((u,h)=>({...u,...h}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=$.useRef(null),l=$.useCallback(u=>{o({currentId:u})},[]);return zi(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),$.createElement(xk.Provider,{value:$.useMemo(()=>({...i,setState:o,setCurrentId:l}),[i,l])},e)}function AN(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,floatingId:i}=t,{id:o,enabled:a=!0}=e,l=o??i,u=LN(),{currentId:h,setCurrentId:d,initialDelay:f,setState:m,timeoutMs:g}=u;return zi(()=>{a&&h&&(m({delay:{open:1,close:Sd(f,"close")}}),h!==l&&n(!1))},[a,l,n,m,h,f]),zi(()=>{function v(){n(!1),m({delay:f,currentId:null})}if(a&&h&&!r&&h===l){if(g){const x=window.setTimeout(v,g);return()=>{clearTimeout(x)}}v()}},[a,r,m,h,l,n,f,g]),zi(()=>{a&&(d===My||!r||d(l))},[a,r,d,l]),u}function qg(t,e){let r=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=t.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var l;return i.parentId===a.id&&((l=i.context)==null?void 0:l.open)})}),r=r.concat(n);return r}const RN="data-floating-ui-focusable",PN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},BN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},d2=t=>{var e,r;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(r=t==null?void 0:t.outsidePress)!=null?r:!0}};function NN(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,elements:i,dataRef:o}=t,{enabled:a=!0,escapeKey:l=!0,outsidePress:u=!0,outsidePressEvent:h="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:g,capture:v}=e,x=iv(),w=po(typeof u=="function"?u:()=>!1),S=typeof u=="function"?w:u,k=$.useRef(!1),E=$.useRef(!1),{escapeKey:L,outsidePress:A}=d2(g),{escapeKey:M,outsidePress:B}=d2(v),D=$.useRef(!1),q=po(I=>{var O;if(!r||!a||!l||I.key!=="Escape"||D.current)return;const F=(O=o.current.floatingContext)==null?void 0:O.nodeId,P=x?qg(x.nodesRef.current,F):[];if(!L&&(I.stopPropagation(),P.length>0)){let z=!0;if(P.forEach(X=>{var N;if((N=X.context)!=null&&N.open&&!X.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,b4(I)?I.nativeEvent:I,"escape-key")}),U=po(I=>{var O;const F=()=>{var P;q(I),(P=Ja(I))==null||P.removeEventListener("keydown",F)};(O=Ja(I))==null||O.addEventListener("keydown",F)}),H=po(I=>{var O;const F=k.current;k.current=!1;const P=E.current;if(E.current=!1,h==="click"&&P||F||typeof S=="function"&&!S(I))return;const z=Ja(I),X="["+ov("inert")+"]",N=Ws(i.floating).querySelectorAll(X);let Z=Ne(z)?z:null;for(;Z&&!ss(Z);){const lt=bo(Z);if(ss(lt)||!Ne(lt))break;Z=lt}if(N.length&&Ne(z)&&!w4(z)&&!du(z,i.floating)&&Array.from(N).every(lt=>!du(Z,lt)))return;if(Fn(z)&&W){const lt=z.clientWidth>0&&z.scrollWidth>z.clientWidth,mt=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let xt=mt&&I.offsetX>z.clientWidth;if(mt&&Gn(z).direction==="rtl"&&(xt=I.offsetX<=z.offsetWidth-z.clientWidth),xt||lt&&I.offsetY>z.clientHeight)return}const ot=(O=o.current.floatingContext)==null?void 0:O.nodeId,yt=x&&qg(x.nodesRef.current,ot).some(lt=>{var mt;return jg(I,(mt=lt.context)==null?void 0:mt.elements.floating)});if(jg(I,i.floating)||jg(I,i.domReference)||yt)return;const dt=x?qg(x.nodesRef.current,ot):[];if(dt.length>0){let lt=!0;if(dt.forEach(mt=>{var xt;if((xt=mt.context)!=null&&xt.open&&!mt.context.dataRef.current.__outsidePressBubbles){lt=!1;return}}),!lt)return}n(!1,I,"outside-press")}),K=po(I=>{var O;const F=()=>{var P;H(I),(P=Ja(I))==null||P.removeEventListener(h,F)};(O=Ja(I))==null||O.addEventListener(h,F)});$.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=L,o.current.__outsidePressBubbles=A;let I=-1;function O(N){n(!1,N,"ancestor-scroll")}function F(){window.clearTimeout(I),D.current=!0}function P(){I=window.setTimeout(()=>{D.current=!1},Gf()?5:0)}const z=Ws(i.floating);l&&(z.addEventListener("keydown",M?U:q,M),z.addEventListener("compositionstart",F),z.addEventListener("compositionend",P)),S&&z.addEventListener(h,B?K:H,B);let X=[];return m&&(Ne(i.domReference)&&(X=yo(i.domReference)),Ne(i.floating)&&(X=X.concat(yo(i.floating))),!Ne(i.reference)&&i.reference&&i.reference.contextElement&&(X=X.concat(yo(i.reference.contextElement)))),X=X.filter(N=>{var Z;return N!==((Z=z.defaultView)==null?void 0:Z.visualViewport)}),X.forEach(N=>{N.addEventListener("scroll",O,{passive:!0})}),()=>{l&&(z.removeEventListener("keydown",M?U:q,M),z.removeEventListener("compositionstart",F),z.removeEventListener("compositionend",P)),S&&z.removeEventListener(h,B?K:H,B),X.forEach(N=>{N.removeEventListener("scroll",O)}),window.clearTimeout(I)}},[o,i,l,S,h,r,n,m,a,L,A,q,M,U,H,B,K]),$.useEffect(()=>{k.current=!1},[S,h]);const V=$.useMemo(()=>({onKeyDown:q,[PN[f]]:I=>{d&&n(!1,I.nativeEvent,"reference-press")}}),[q,n,d,f]),W=$.useMemo(()=>({onKeyDown:q,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[BN[h]]:()=>{k.current=!0}}),[q,h]);return $.useMemo(()=>a?{reference:V,floating:W}:{},[a,V,W])}function ON(t){const{open:e=!1,onOpenChange:r,elements:n}=t,i=vk(),o=$.useRef({}),[a]=$.useState(()=>_N()),l=nv()!=null,[u,h]=$.useState(n.reference),d=po((g,v,x)=>{o.current.openEvent=g?v:void 0,a.emit("openchange",{open:g,event:v,reason:x,nested:l}),r==null||r(g,v,x)}),f=$.useMemo(()=>({setPositionReference:h}),[]),m=$.useMemo(()=>({reference:u||n.reference||null,floating:n.floating||null,domReference:n.reference}),[u,n.reference,n.floating]);return $.useMemo(()=>({dataRef:o,open:e,onOpenChange:d,elements:m,events:a,floatingId:i,refs:f}),[e,d,m,a,i,f])}function sv(t){t===void 0&&(t={});const{nodeId:e}=t,r=ON({...t,elements:{reference:null,floating:null,...t.elements}}),n=t.rootContext||r,i=n.elements,[o,a]=$.useState(null),[l,u]=$.useState(null),d=(i==null?void 0:i.domReference)||o,f=$.useRef(null),m=iv();zi(()=>{d&&(f.current=d)},[d]);const g=gN({...t,elements:{...i,...l&&{reference:l}}}),v=$.useCallback(E=>{const L=Ne(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),contextElement:E}:E;u(L),g.refs.setReference(L)},[g.refs]),x=$.useCallback(E=>{(Ne(E)||E===null)&&(f.current=E,a(E)),(Ne(g.refs.reference.current)||g.refs.reference.current===null||E!==null&&!Ne(E))&&g.refs.setReference(E)},[g.refs]),w=$.useMemo(()=>({...g.refs,setReference:x,setPositionReference:v,domReference:f}),[g.refs,x,v]),S=$.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),k=$.useMemo(()=>({...g,...n,refs:w,elements:S,nodeId:e}),[g,w,S,e,n]);return zi(()=>{n.dataRef.current.floatingContext=k;const E=m==null?void 0:m.nodesRef.current.find(L=>L.id===e);E&&(E.context=k)}),$.useMemo(()=>({...g,context:k,refs:w,elements:S}),[g,w,S,k])}function FN(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=t,{enabled:l=!0,visibleOnly:u=!0}=e,h=$.useRef(!1),d=$.useRef(),f=$.useRef(!0);$.useEffect(()=>{if(!l)return;const g=kn(a.domReference);function v(){!r&&Fn(a.domReference)&&a.domReference===Zw(Ws(a.domReference))&&(h.current=!0)}function x(){f.current=!0}return g.addEventListener("blur",v),g.addEventListener("keydown",x,!0),()=>{g.removeEventListener("blur",v),g.removeEventListener("keydown",x,!0)}},[a.domReference,r,l]),$.useEffect(()=>{if(!l)return;function g(v){let{reason:x}=v;(x==="reference-press"||x==="escape-key")&&(h.current=!0)}return i.on("openchange",g),()=>{i.off("openchange",g)}},[i,l]),$.useEffect(()=>()=>{clearTimeout(d.current)},[]);const m=$.useMemo(()=>({onPointerDown(g){g4(g.nativeEvent)||(f.current=!1)},onMouseLeave(){h.current=!1},onFocus(g){if(h.current)return;const v=Ja(g.nativeEvent);if(u&&Ne(v))try{if(y4()&&v4())throw Error();if(!v.matches(":focus-visible"))return}catch{if(!f.current&&!S4(v))return}n(!0,g.nativeEvent,"focus")},onBlur(g){h.current=!1;const v=g.relatedTarget,x=g.nativeEvent,w=Ne(v)&&v.hasAttribute(ov("focus-guard"))&&v.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var S;const k=Zw(a.domReference?a.domReference.ownerDocument:document);!v&&k===a.domReference||du((S=o.current.floatingContext)==null?void 0:S.refs.floating.current,k)||du(a.domReference,k)||w||n(!1,x,"focus")})}}),[o,a.domReference,n,u]);return $.useMemo(()=>l?{reference:m}:{},[l,m])}const f2="active",p2="selected";function Vg(t,e,r){const n=new Map,i=r==="item";let o=t;if(i&&t){const{[f2]:a,[p2]:l,...u}=t;o=u}return{...r==="floating"&&{tabIndex:-1,[RN]:""},...o,...e.map(a=>{const l=a?a[r]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((a,l)=>(l&&Object.entries(l).forEach(u=>{let[h,d]=u;if(!(i&&[f2,p2].includes(h)))if(h.indexOf("on")===0){if(n.has(h)||n.set(h,[]),typeof d=="function"){var f;(f=n.get(h))==null||f.push(d),a[h]=function(){for(var m,g=arguments.length,v=new Array(g),x=0;x<g;x++)v[x]=arguments[x];return(m=n.get(h))==null?void 0:m.map(w=>w(...v)).find(w=>w!==void 0)}}}else a[h]=d}),a),{})}}function DN(t){t===void 0&&(t=[]);const e=t.map(l=>l==null?void 0:l.reference),r=t.map(l=>l==null?void 0:l.floating),n=t.map(l=>l==null?void 0:l.item),i=$.useCallback(l=>Vg(l,t,"reference"),e),o=$.useCallback(l=>Vg(l,t,"floating"),r),a=$.useCallback(l=>Vg(l,t,"item"),n);return $.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}const IN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function jN(t,e){var r;e===void 0&&(e={});const{open:n,floatingId:i}=t,{enabled:o=!0,role:a="dialog"}=e,l=(r=IN.get(a))!=null?r:a,u=vk(),d=nv()!=null,f=$.useMemo(()=>l==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?i:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":n?i:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:u},...l==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[l,i,d,n,u,a]),m=$.useMemo(()=>{const v={id:i,...l&&{role:l}};return l==="tooltip"||a==="label"?v:{...v,...l==="menu"&&{"aria-labelledby":u}}},[l,i,u,a]),g=$.useCallback(v=>{let{active:x,selected:w}=v;const S={role:"option",...x&&{id:i+"-option"}};switch(a){case"select":return{...S,"aria-selected":x&&w};case"combobox":return{...S,...x&&{"aria-selected":!0}}}return{}},[i,a]);return $.useMemo(()=>o?{reference:f,floating:m,item:g}:{},[o,f,m,g])}const[zN,Zn]=Ui("ScrollArea.Root component was not found in tree");function Sl(t,e){const r=zs(e);Bl(()=>{let n=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(t),()=>{window.cancelAnimationFrame(n),i.unobserve(t)}}},[t,r])}const WN=$.forwardRef((t,e)=>{const{style:r,...n}=t,i=Zn(),[o,a]=$.useState(0),[l,u]=$.useState(0),h=!!(o&&l);return Sl(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),u(d)}),Sl(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),h?b.jsx("div",{...n,ref:e,style:{...r,width:o,height:l}}):null}),HN=$.forwardRef((t,e)=>{const r=Zn(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?b.jsx(WN,{...t,ref:e}):null}),qN={scrollHideDelay:1e3,type:"hover"},bk=$.forwardRef((t,e)=>{const r=ct("ScrollAreaRoot",qN,t),{type:n,scrollHideDelay:i,scrollbars:o,...a}=r,[l,u]=$.useState(null),[h,d]=$.useState(null),[f,m]=$.useState(null),[g,v]=$.useState(null),[x,w]=$.useState(null),[S,k]=$.useState(0),[E,L]=$.useState(0),[A,M]=$.useState(!1),[B,D]=$.useState(!1),q=Vr(e,U=>u(U));return b.jsx(zN,{value:{type:n,scrollHideDelay:i,scrollArea:l,viewport:h,onViewportChange:d,content:f,onContentChange:m,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:A,onScrollbarXEnabledChange:M,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:B,onScrollbarYEnabledChange:D,onCornerWidthChange:k,onCornerHeightChange:L},children:b.jsx(st,{...a,ref:q,__vars:{"--sa-corner-width":o!=="xy"?"0px":`${S}px`,"--sa-corner-height":o!=="xy"?"0px":`${E}px`}})})});bk.displayName="@mantine/core/ScrollAreaRoot";function wk(t,e){const r=t/e;return Number.isNaN(r)?0:r}function Qf(t){const e=wk(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=(t.scrollbar.size-r)*e;return Math.max(n,18)}function Ck(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function VN(t,[e,r]){return Math.min(r,Math.max(e,t))}function m2(t,e,r="ltr"){const n=Qf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,a=e.content-e.viewport,l=o-n,u=r==="ltr"?[0,a]:[a*-1,0],h=VN(t,u);return Ck([0,a],[0,l])(h)}function UN(t,e,r,n="ltr"){const i=Qf(r),o=i/2,a=e||o,l=i-a,u=r.scrollbar.paddingStart+a,h=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Ck([u,h],f)(t)}function Sk(t,e){return t>0&&t<e}function Kd(t){return t?parseInt(t,10):0}function Ks(t,e,{checkForDefaultPrevented:r=!0}={}){return n=>{t==null||t(n),(r===!1||!n.defaultPrevented)&&(e==null||e(n))}}const[YN,kk]=Ui("ScrollAreaScrollbar was not found in tree"),_k=$.forwardRef((t,e)=>{const{sizes:r,hasThumb:n,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:h,onResize:d,...f}=t,m=Zn(),[g,v]=$.useState(null),x=Vr(e,D=>v(D)),w=$.useRef(null),S=$.useRef(""),{viewport:k}=m,E=r.content-r.viewport,L=zs(h),A=zs(l),M=If(d,10),B=D=>{if(w.current){const q=D.clientX-w.current.left,U=D.clientY-w.current.top;u({x:q,y:U})}};return $.useEffect(()=>{const D=q=>{const U=q.target;(g==null?void 0:g.contains(U))&&L(q,E)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[k,g,E,L]),$.useEffect(A,[r,A]),Sl(g,M),Sl(m.content,M),b.jsx(YN,{value:{scrollbar:g,hasThumb:n,onThumbChange:zs(i),onThumbPointerUp:zs(o),onThumbPositionChange:A,onThumbPointerDown:zs(a)},children:b.jsx("div",{...f,ref:x,"data-mantine-scrollbar":!0,style:{position:"absolute",...f.style},onPointerDown:Ks(t.onPointerDown,D=>{D.preventDefault(),D.button===0&&(D.target.setPointerCapture(D.pointerId),w.current=g.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",B(D))}),onPointerMove:Ks(t.onPointerMove,B),onPointerUp:Ks(t.onPointerUp,D=>{const q=D.target;q.hasPointerCapture(D.pointerId)&&(D.preventDefault(),q.releasePointerCapture(D.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=S.current,w.current=null}})})}),Tk=$.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,style:i,...o}=t,a=Zn(),[l,u]=$.useState(),h=$.useRef(null),d=Vr(e,h,a.onScrollbarXChange);return $.useEffect(()=>{h.current&&u(getComputedStyle(h.current))},[h]),b.jsx(_k,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{...i,"--sa-thumb-width":`${Qf(r)}px`},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,m)=>{if(a.viewport){const g=a.viewport.scrollLeft+f.deltaX;t.onWheelScroll(g),Sk(g,m)&&f.preventDefault()}},onResize:()=>{h.current&&a.viewport&&l&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Kd(l.paddingLeft),paddingEnd:Kd(l.paddingRight)}})}})});Tk.displayName="@mantine/core/ScrollAreaScrollbarX";const Ek=$.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,style:i,...o}=t,a=Zn(),[l,u]=$.useState(),h=$.useRef(null),d=Vr(e,h,a.onScrollbarYChange);return $.useEffect(()=>{h.current&&u(window.getComputedStyle(h.current))},[]),b.jsx(_k,{...o,"data-orientation":"vertical",ref:d,sizes:r,style:{"--sa-thumb-height":`${Qf(r)}px`,...i},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,m)=>{if(a.viewport){const g=a.viewport.scrollTop+f.deltaY;t.onWheelScroll(g),Sk(g,m)&&f.preventDefault()}},onResize:()=>{h.current&&a.viewport&&l&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Kd(l.paddingTop),paddingEnd:Kd(l.paddingBottom)}})}})});Ek.displayName="@mantine/core/ScrollAreaScrollbarY";const Zf=$.forwardRef((t,e)=>{const{orientation:r="vertical",...n}=t,{dir:i}=Mu(),o=Zn(),a=$.useRef(null),l=$.useRef(0),[u,h]=$.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=wk(u.viewport,u.content),f={...n,sizes:u,onSizesChange:h,hasThumb:d>0&&d<1,onThumbChange:g=>{a.current=g},onThumbPointerUp:()=>{l.current=0},onThumbPointerDown:g=>{l.current=g}},m=(g,v)=>UN(g,l.current,u,v);return r==="horizontal"?b.jsx(Tk,{...f,ref:e,onThumbPositionChange:()=>{if(o.viewport&&a.current){const g=o.viewport.scrollLeft,v=m2(g,u,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=m(g,i))}}):r==="vertical"?b.jsx(Ek,{...f,ref:e,onThumbPositionChange:()=>{if(o.viewport&&a.current){const g=o.viewport.scrollTop,v=m2(g,u);u.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=m(g))}}):null});Zf.displayName="@mantine/core/ScrollAreaScrollbarVisible";const av=$.forwardRef((t,e)=>{const r=Zn(),{forceMount:n,...i}=t,[o,a]=$.useState(!1),l=t.orientation==="horizontal",u=If(()=>{if(r.viewport){const h=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(l?h:d)}},10);return Sl(r.viewport,u),Sl(r.content,u),n||o?b.jsx(Zf,{"data-state":o?"visible":"hidden",...i,ref:e}):null});av.displayName="@mantine/core/ScrollAreaScrollbarAuto";const $k=$.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Zn(),[o,a]=$.useState(!1);return $.useEffect(()=>{const{scrollArea:l}=i;let u=0;if(l){const h=()=>{window.clearTimeout(u),a(!0)},d=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",h),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",h),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),r||o?b.jsx(av,{"data-state":o?"visible":"hidden",...n,ref:e}):null});$k.displayName="@mantine/core/ScrollAreaScrollbarHover";const GN=$.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Zn(),o=t.orientation==="horizontal",[a,l]=$.useState("hidden"),u=If(()=>l("idle"),100);return $.useEffect(()=>{if(a==="idle"){const h=window.setTimeout(()=>l("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(h)}},[a,i.scrollHideDelay]),$.useEffect(()=>{const{viewport:h}=i,d=o?"scrollLeft":"scrollTop";if(h){let f=h[d];const m=()=>{const g=h[d];f!==g&&(l("scrolling"),u()),f=g};return h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[i.viewport,o,u]),r||a!=="hidden"?b.jsx(Zf,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:e,onPointerEnter:Ks(t.onPointerEnter,()=>l("interacting")),onPointerLeave:Ks(t.onPointerLeave,()=>l("idle"))}):null}),Ay=$.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Zn(),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,l=t.orientation==="horizontal";return $.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),i.type==="hover"?b.jsx($k,{...n,ref:e,forceMount:r}):i.type==="scroll"?b.jsx(GN,{...n,ref:e,forceMount:r}):i.type==="auto"?b.jsx(av,{...n,ref:e,forceMount:r}):i.type==="always"?b.jsx(Zf,{...n,ref:e}):null});Ay.displayName="@mantine/core/ScrollAreaScrollbar";function XN(t,e=()=>{}){let r={left:t.scrollLeft,top:t.scrollTop},n=0;return(function i(){const o={left:t.scrollLeft,top:t.scrollTop},a=r.left!==o.left,l=r.top!==o.top;(a||l)&&e(),r=o,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)}const Lk=$.forwardRef((t,e)=>{const{style:r,...n}=t,i=Zn(),o=kk(),{onThumbPositionChange:a}=o,l=Vr(e,d=>o.onThumbChange(d)),u=$.useRef(void 0),h=If(()=>{u.current&&(u.current(),u.current=void 0)},100);return $.useEffect(()=>{const{viewport:d}=i;if(d){const f=()=>{if(h(),!u.current){const m=XN(d,a);u.current=m,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,h,a]),b.jsx("div",{"data-state":o.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Ks(t.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),g=d.clientX-m.left,v=d.clientY-m.top;o.onThumbPointerDown({x:g,y:v})}),onPointerUp:Ks(t.onPointerUp,o.onThumbPointerUp)})});Lk.displayName="@mantine/core/ScrollAreaThumb";const Ry=$.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=kk();return r||i.hasThumb?b.jsx(Lk,{ref:e,...n}):null});Ry.displayName="@mantine/core/ScrollAreaThumb";const Mk=$.forwardRef(({children:t,style:e,...r},n)=>{const i=Zn(),o=Vr(n,i.onViewportChange);return b.jsx(st,{...r,ref:o,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e},children:b.jsx("div",{style:{minWidth:"100%"},ref:i.onContentChange,children:t})})});Mk.displayName="@mantine/core/ScrollAreaViewport";var lv={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const Ak={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},KN=(t,{scrollbarSize:e,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":it(e),"--scrollarea-over-scroll-behavior":r}}),Si=Ct((t,e)=>{const r=ct("ScrollArea",Ak,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,scrollbarSize:u,vars:h,type:d,scrollHideDelay:f,viewportProps:m,viewportRef:g,onScrollPositionChange:v,children:x,offsetScrollbars:w,scrollbars:S,onBottomReached:k,onTopReached:E,overscrollBehavior:L,...A}=r,[M,B]=$.useState(!1),[D,q]=$.useState(!1),[U,H]=$.useState(!1),K=Yt({name:"ScrollArea",props:r,classes:lv,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:h,varsResolver:KN}),V=$.useRef(null),W=xN([g,V]);return $.useEffect(()=>{if(!V.current||w!=="present")return;const I=V.current,O=new ResizeObserver(()=>{const{scrollHeight:F,clientHeight:P,scrollWidth:z,clientWidth:X}=I;q(F>P),H(z>X)});return O.observe(I),()=>O.disconnect()},[V,w]),b.jsxs(bk,{type:d==="never"?"always":d,scrollHideDelay:f,ref:e,scrollbars:S,...K("root"),...A,children:[b.jsx(Mk,{...m,...K("viewport",{style:m==null?void 0:m.style}),ref:W,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":S||void 0,"data-horizontal-hidden":w==="present"&&!U?"true":void 0,"data-vertical-hidden":w==="present"&&!D?"true":void 0,onScroll:I=>{var z;(z=m==null?void 0:m.onScroll)==null||z.call(m,I),v==null||v({x:I.currentTarget.scrollLeft,y:I.currentTarget.scrollTop});const{scrollTop:O,scrollHeight:F,clientHeight:P}=I.currentTarget;O-(F-P)>=-.6&&(k==null||k()),O===0&&(E==null||E())},children:x}),(S==="xy"||S==="x")&&b.jsx(Ay,{...K("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||w==="present"&&!U?!0:void 0,forceMount:!0,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:b.jsx(Ry,{...K("thumb")})}),(S==="xy"||S==="y")&&b.jsx(Ay,{...K("scrollbar"),orientation:"vertical","data-hidden":d==="never"||w==="present"&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:b.jsx(Ry,{...K("thumb")})}),b.jsx(HN,{...K("corner"),"data-hovered":M||void 0,"data-hidden":d==="never"||void 0})]})});Si.displayName="@mantine/core/ScrollArea";const cv=Ct((t,e)=>{const{children:r,classNames:n,styles:i,scrollbarSize:o,scrollHideDelay:a,type:l,dir:u,offsetScrollbars:h,viewportRef:d,onScrollPositionChange:f,unstyled:m,variant:g,viewportProps:v,scrollbars:x,style:w,vars:S,onBottomReached:k,onTopReached:E,...L}=ct("ScrollAreaAutosize",Ak,t);return b.jsx(st,{...L,ref:e,style:[{display:"flex",overflow:"auto"},w],children:b.jsx(st,{style:{display:"flex",flexDirection:"column",flex:1},children:b.jsx(Si,{classNames:n,styles:i,scrollHideDelay:a,scrollbarSize:o,type:l,dir:u,offsetScrollbars:h,viewportRef:d,onScrollPositionChange:f,unstyled:m,variant:g,viewportProps:v,vars:S,scrollbars:x,onBottomReached:k,onTopReached:E,children:r})})})});Si.classes=lv;cv.displayName="@mantine/core/ScrollAreaAutosize";cv.classes=lv;Si.Autosize=cv;var Rk={root:"m_87cf2631"};const QN={__staticSelector:"UnstyledButton"},fs=ln((t,e)=>{const r=ct("UnstyledButton",QN,t),{className:n,component:i="button",__staticSelector:o,unstyled:a,classNames:l,styles:u,style:h,...d}=r,f=Yt({name:o,props:r,classes:Rk,className:n,style:h,classNames:l,styles:u,unstyled:a});return b.jsx(st,{...f("root",{focusable:!0}),component:i,ref:e,type:i==="button"?"button":void 0,...d})});fs.classes=Rk;fs.displayName="@mantine/core/UnstyledButton";var Pk={root:"m_515a97f8"};const ZN={},uv=Ct((t,e)=>{const r=ct("VisuallyHidden",ZN,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,...h}=r,d=Yt({name:"VisuallyHidden",classes:Pk,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l});return b.jsx(st,{component:"span",ref:e,...d("root"),...h})});uv.classes=Pk;uv.displayName="@mantine/core/VisuallyHidden";var Bk={root:"m_1b7284a3"};const JN={},tO=(t,{radius:e,shadow:r})=>({root:{"--paper-radius":e===void 0?void 0:rr(e),"--paper-shadow":j0(r)}}),Ir=ln((t,e)=>{const r=ct("Paper",JN,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,withBorder:u,vars:h,radius:d,shadow:f,variant:m,mod:g,...v}=r,x=Yt({name:"Paper",props:r,classes:Bk,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:h,varsResolver:tO});return b.jsx(st,{ref:e,mod:[{"data-with-border":u},g],...x("root"),variant:m,...v})});Ir.classes=Bk;Ir.displayName="@mantine/core/Paper";function Nk(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[r,n]=e.split("-"),i=r==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return e}function g2(t,e,r,n){return t==="center"||n==="center"?{top:e}:t==="end"?{bottom:r}:t==="start"?{top:r}:{}}function y2(t,e,r,n,i){return t==="center"||n==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:r}:t==="start"?{[i==="ltr"?"left":"right"]:r}:{}}const eO={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function rO({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,arrowX:o,arrowY:a,dir:l}){const[u,h="center"]=t.split("-"),d={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[eO[u]]:n},f=-e/2;return u==="left"?{...d,...g2(h,a,r,i),right:f,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:u==="right"?{...d,...g2(h,a,r,i),left:f,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:u==="top"?{...d,...y2(h,o,r,i,l),bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:u==="bottom"?{...d,...y2(h,o,r,i,l),top:f,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const hv=$.forwardRef(({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,visible:o,arrowX:a,arrowY:l,style:u,...h},d)=>{const{dir:f}=Mu();return o?b.jsx("div",{...h,ref:d,style:{...u,...rO({position:t,arrowSize:e,arrowOffset:r,arrowRadius:n,arrowPosition:i,dir:f,arrowX:a,arrowY:l})}}):null});hv.displayName="@mantine/core/FloatingArrow";var Ok={root:"m_9814e45f"};const nO={zIndex:ki("modal")},iO=(t,{gradient:e,color:r,backgroundOpacity:n,blur:i,radius:o,zIndex:a})=>({root:{"--overlay-bg":e||(r!==void 0||n!==void 0)&&Oi(r||"#000",n??.6)||void 0,"--overlay-filter":i?`blur(${it(i)})`:void 0,"--overlay-radius":o===void 0?void 0:rr(o),"--overlay-z-index":a==null?void 0:a.toString()}}),Jf=ln((t,e)=>{const r=ct("Overlay",nO,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,fixed:h,center:d,children:f,radius:m,zIndex:g,gradient:v,blur:x,color:w,backgroundOpacity:S,mod:k,...E}=r,L=Yt({name:"Overlay",props:r,classes:Ok,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:iO});return b.jsx(st,{ref:e,...L("root"),mod:[{center:d,fixed:h},k],...E,children:f})});Jf.classes=Ok;Jf.displayName="@mantine/core/Overlay";function Ug(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function oO({target:t,reuseTargetNode:e,...r}){if(t)return typeof t=="string"?document.querySelector(t)||Ug(r):t;if(e){const n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;const i=Ug(r);return i.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(i),i}return Ug(r)}const sO={},Fk=Ct((t,e)=>{const{children:r,target:n,reuseTargetNode:i,...o}=ct("Portal",sO,t),[a,l]=$.useState(!1),u=$.useRef(null);return Bl(()=>(l(!0),u.current=oO({target:n,reuseTargetNode:i,...o}),wy(e,u.current),!n&&!i&&u.current&&document.body.appendChild(u.current),()=>{!n&&!i&&u.current&&document.body.removeChild(u.current)}),[n]),!a||!u.current?null:Vf.createPortal(b.jsx(b.Fragment,{children:r}),u.current)});Fk.displayName="@mantine/core/Portal";const ha=Ct(({withinPortal:t=!0,children:e,...r},n)=>qS()==="test"||!t?b.jsx(b.Fragment,{children:e}):b.jsx(Fk,{ref:n,...r,children:e}));ha.displayName="@mantine/core/OptionalPortal";const Pc=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),od={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Pc("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Pc("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Pc("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Pc("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Pc("top"),common:{transformOrigin:"top right"}}},v2={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function aO({transition:t,state:e,duration:r,timingFunction:n}){const i={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof t=="string"?t in od?{transitionProperty:od[t].transitionProperty,...i,...od[t].common,...od[t][v2[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[v2[e]]}}function lO({duration:t,exitDuration:e,timingFunction:r,mounted:n,onEnter:i,onExit:o,onEntered:a,onExited:l,enterDelay:u,exitDelay:h}){const d=an(),f=jf(),m=d.respectReducedMotion?f:!1,[g,v]=$.useState(m?0:t),[x,w]=$.useState(n?"entered":"exited"),S=$.useRef(-1),k=$.useRef(-1),E=$.useRef(-1);function L(){window.clearTimeout(S.current),window.clearTimeout(k.current),cancelAnimationFrame(E.current)}const A=B=>{L();const D=B?i:o,q=B?a:l,U=m?0:B?t:e;v(U),U===0?(typeof D=="function"&&D(),typeof q=="function"&&q(),w(B?"entered":"exited")):E.current=requestAnimationFrame(()=>{Uc.flushSync(()=>{w(B?"pre-entering":"pre-exiting")}),E.current=requestAnimationFrame(()=>{typeof D=="function"&&D(),w(B?"entering":"exiting"),S.current=window.setTimeout(()=>{typeof q=="function"&&q(),w(B?"entered":"exited")},U)})})},M=B=>{if(L(),typeof(B?u:h)!="number"){A(B);return}k.current=window.setTimeout(()=>{A(B)},B?u:h)};return Hi(()=>{M(n)},[n]),$.useEffect(()=>()=>{L()},[]),{transitionDuration:g,transitionStatus:x,transitionTimingFunction:r||"ease"}}function ps({keepMounted:t,transition:e="fade",duration:r=250,exitDuration:n=r,mounted:i,children:o,timingFunction:a="ease",onExit:l,onEntered:u,onEnter:h,onExited:d,enterDelay:f,exitDelay:m}){const g=qS(),{transitionDuration:v,transitionStatus:x,transitionTimingFunction:w}=lO({mounted:i,exitDuration:n,duration:r,timingFunction:a,onExit:l,onEntered:u,onEnter:h,onExited:d,enterDelay:f,exitDelay:m});return v===0||g==="test"?i?b.jsx(b.Fragment,{children:o({})}):t?o({display:"none"}):null:x==="exited"?t?o({display:"none"}):null:b.jsx(b.Fragment,{children:o(aO({transition:e,duration:v,state:x,timingFunction:w}))})}ps.displayName="@mantine/core/Transition";const[cO,Dk]=Ui("Popover component was not found in the tree");function tp({children:t,active:e=!0,refProp:r="ref",innerRef:n}){const i=$P(e),o=Vr(i,n);return _o(t)?$.cloneElement(t,{[r]:o}):t}function Ik(t){return b.jsx(uv,{tabIndex:-1,"data-autofocus":!0,...t})}tp.displayName="@mantine/core/FocusTrap";Ik.displayName="@mantine/core/FocusTrapInitialFocus";tp.InitialFocus=Ik;var jk={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const uO={},dv=Ct((t,e)=>{var w,S,k,E;const r=ct("PopoverDropdown",uO,t),{className:n,style:i,vars:o,children:a,onKeyDownCapture:l,variant:u,classNames:h,styles:d,...f}=r,m=Dk(),g=DS({opened:m.opened,shouldReturnFocus:m.returnFocus}),v=m.withRoles?{"aria-labelledby":m.getTargetId(),id:m.getDropdownId(),role:"dialog",tabIndex:-1}:{},x=Vr(e,m.floating);return m.disabled?null:b.jsx(ha,{...m.portalProps,withinPortal:m.withinPortal,children:b.jsx(ps,{mounted:m.opened,...m.transitionProps,transition:((w=m.transitionProps)==null?void 0:w.transition)||"fade",duration:((S=m.transitionProps)==null?void 0:S.duration)??150,keepMounted:m.keepMounted,exitDuration:typeof((k=m.transitionProps)==null?void 0:k.exitDuration)=="number"?m.transitionProps.exitDuration:(E=m.transitionProps)==null?void 0:E.duration,children:L=>b.jsx(tp,{active:m.trapFocus&&m.opened,innerRef:x,children:b.jsxs(st,{...v,...f,variant:u,onKeyDownCapture:mP(()=>{var A,M;(A=m.onClose)==null||A.call(m),(M=m.onDismiss)==null||M.call(m)},{active:m.closeOnEscape,onTrigger:g,onKeyDown:l}),"data-position":m.placement,"data-fixed":m.floatingStrategy==="fixed"||void 0,...m.getStyles("dropdown",{className:n,props:r,classNames:h,styles:d,style:[{...L,zIndex:m.zIndex,top:m.y??0,left:m.x??0,width:m.width==="target"?void 0:it(m.width)},m.resolvedStyles.dropdown,d==null?void 0:d.dropdown,i]}),children:[a,b.jsx(hv,{ref:m.arrowRef,arrowX:m.arrowX,arrowY:m.arrowY,visible:m.withArrow,position:m.placement,arrowSize:m.arrowSize,arrowRadius:m.arrowRadius,arrowOffset:m.arrowOffset,arrowPosition:m.arrowPosition,...m.getStyles("arrow",{props:r,classNames:h,styles:d})})]})})})})});dv.classes=jk;dv.displayName="@mantine/core/PopoverDropdown";const hO={refProp:"ref",popupType:"dialog"},zk=Ct((t,e)=>{const{children:r,refProp:n,popupType:i,...o}=ct("PopoverTarget",hO,t);if(!_o(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=o,l=Dk(),u=Vr(l.reference,zf(r),e),h=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return $.cloneElement(r,{...a,...h,...l.targetProps,className:yr(l.targetProps.className,a.className,r.props.className),[n]:u,...l.controlled?null:{onClick:l.onToggle}})});zk.displayName="@mantine/core/PopoverTarget";function Wk({opened:t,floating:e,position:r,positionDependencies:n}){const[i,o]=$.useState(0);$.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current&&t)return sN(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,r]),Hi(()=>{e.update()},n),Hi(()=>{o(a=>a+1)},[t])}function dO(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function fO(t,e){const r=dO(t.middlewares),n=[mk(t.offset)];return r.shift&&n.push(rv(typeof r.shift=="boolean"?{limiter:l2(),padding:5}:{limiter:l2(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?Xd():Xd(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?nu():nu(r.inline)),n.push(gk({element:t.arrowRef,padding:t.arrowOffset})),(r.size||t.width==="target")&&n.push(vN({...typeof r.size=="boolean"?{}:r.size,apply({rects:i,availableWidth:o,availableHeight:a,...l}){var d;const h=((d=e().refs.floating.current)==null?void 0:d.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:i,availableWidth:o,availableHeight:a,...l}):Object.assign(h,{maxWidth:`${o}px`,maxHeight:`${a}px`})),t.width==="target"&&Object.assign(h,{width:`${i.reference.width}px`})}})),n}function pO(t){const[e,r]=On({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),n=$.useRef(e),i=()=>{e&&!t.disabled&&r(!1)},o=()=>!t.disabled&&r(!e),a=sv({strategy:t.strategy,placement:t.position,middleware:fO(t,()=>a)});return Wk({opened:e,position:t.position,positionDependencies:t.positionDependencies||[],floating:a}),Hi(()=>{var l;(l=t.onPositionChange)==null||l.call(t,a.placement)},[a.placement]),Hi(()=>{var l,u;e!==n.current&&(e?(u=t.onOpen)==null||u.call(t):(l=t.onClose)==null||l.call(t)),n.current=e},[e,t.onClose,t.onOpen]),{floating:a,controlled:typeof t.opened=="boolean",opened:e,onClose:i,onToggle:o}}const mO={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:ki("popover"),__staticSelector:"Popover",width:"max-content"},gO=(t,{radius:e,shadow:r})=>({dropdown:{"--popover-radius":e===void 0?void 0:rr(e),"--popover-shadow":j0(r)}});function Tn(t){var We,lr,He,Qe,Fe,Ye;const e=ct("Popover",mO,t),{children:r,position:n,offset:i,onPositionChange:o,positionDependencies:a,opened:l,transitionProps:u,onExitTransitionEnd:h,onEnterTransitionEnd:d,width:f,middlewares:m,withArrow:g,arrowSize:v,arrowOffset:x,arrowRadius:w,arrowPosition:S,unstyled:k,classNames:E,styles:L,closeOnClickOutside:A,withinPortal:M,portalProps:B,closeOnEscape:D,clickOutsideEvents:q,trapFocus:U,onClose:H,onDismiss:K,onOpen:V,onChange:W,zIndex:I,radius:O,shadow:F,id:P,defaultOpened:z,__staticSelector:X,withRoles:N,disabled:Z,returnFocus:ot,variant:yt,keepMounted:dt,vars:lt,floatingStrategy:mt,withOverlay:xt,overlayProps:St,...Tt}=e,ee=Yt({name:X,props:e,classes:jk,classNames:E,styles:L,unstyled:k,rootSelector:"dropdown",vars:lt,varsResolver:gO}),{resolvedStyles:Ee}=Lu({classNames:E,styles:L,props:e}),pe=$.useRef(null),[Oe,Ue]=$.useState(null),[xr,sr]=$.useState(null),{dir:ar}=Mu(),$e=Yi(P),le=pO({middlewares:m,width:f,position:Nk(ar,n),offset:typeof i=="number"?i+(g?v/2:0):i,arrowRef:pe,arrowOffset:x,onPositionChange:o,positionDependencies:a,opened:l,defaultOpened:z,onChange:W,onOpen:V,onClose:H,onDismiss:K,strategy:mt,disabled:Z});OS(()=>{A&&(le.onClose(),K==null||K())},q,[Oe,xr]);const we=$.useCallback(Ce=>{Ue(Ce),le.floating.refs.setReference(Ce)},[le.floating.refs.setReference]),ze=$.useCallback(Ce=>{sr(Ce),le.floating.refs.setFloating(Ce)},[le.floating.refs.setFloating]),nr=$.useCallback(()=>{var Ce;(Ce=u==null?void 0:u.onExited)==null||Ce.call(u),h==null||h()},[u==null?void 0:u.onExited,h]),Ke=$.useCallback(()=>{var Ce;(Ce=u==null?void 0:u.onEntered)==null||Ce.call(u),d==null||d()},[u==null?void 0:u.onEntered,d]);return b.jsxs(cO,{value:{returnFocus:ot,disabled:Z,controlled:le.controlled,reference:we,floating:ze,x:le.floating.x,y:le.floating.y,arrowX:(He=(lr=(We=le.floating)==null?void 0:We.middlewareData)==null?void 0:lr.arrow)==null?void 0:He.x,arrowY:(Ye=(Fe=(Qe=le.floating)==null?void 0:Qe.middlewareData)==null?void 0:Fe.arrow)==null?void 0:Ye.y,opened:le.opened,arrowRef:pe,transitionProps:{...u,onExited:nr,onEntered:Ke},width:f,withArrow:g,arrowSize:v,arrowOffset:x,arrowRadius:w,arrowPosition:S,placement:le.floating.placement,trapFocus:U,withinPortal:M,portalProps:B,zIndex:I,radius:O,shadow:F,closeOnEscape:D,onDismiss:K,onClose:le.onClose,onToggle:le.onToggle,getTargetId:()=>`${$e}-target`,getDropdownId:()=>`${$e}-dropdown`,withRoles:N,targetProps:Tt,__staticSelector:X,classNames:E,styles:L,unstyled:k,variant:yt,keepMounted:dt,getStyles:ee,resolvedStyles:Ee,floatingStrategy:mt},children:[r,xt&&b.jsx(ps,{transition:"fade",mounted:le.opened,duration:(u==null?void 0:u.duration)||250,exitDuration:(u==null?void 0:u.exitDuration)||250,children:Ce=>b.jsx(ha,{withinPortal:M,children:b.jsx(Jf,{...St,...ee("overlay",{className:St==null?void 0:St.className,style:[Ce,St==null?void 0:St.style]})})})})]})}Tn.Target=zk;Tn.Dropdown=dv;Tn.displayName="@mantine/core/Popover";Tn.extend=t=>t;var yi={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Hk=$.forwardRef(({className:t,...e},r)=>b.jsxs(st,{component:"span",className:yr(yi.barsLoader,t),...e,ref:r,children:[b.jsx("span",{className:yi.bar}),b.jsx("span",{className:yi.bar}),b.jsx("span",{className:yi.bar})]}));Hk.displayName="@mantine/core/Bars";const qk=$.forwardRef(({className:t,...e},r)=>b.jsxs(st,{component:"span",className:yr(yi.dotsLoader,t),...e,ref:r,children:[b.jsx("span",{className:yi.dot}),b.jsx("span",{className:yi.dot}),b.jsx("span",{className:yi.dot})]}));qk.displayName="@mantine/core/Dots";const Vk=$.forwardRef(({className:t,...e},r)=>b.jsx(st,{component:"span",className:yr(yi.ovalLoader,t),...e,ref:r}));Vk.displayName="@mantine/core/Oval";const Uk={bars:Hk,oval:Vk,dots:qk},yO={loaders:Uk,type:"oval"},vO=(t,{size:e,color:r})=>({root:{"--loader-size":te(e,"loader-size"),"--loader-color":r?gr(r,t):void 0}}),Pn=Ct((t,e)=>{const r=ct("Loader",yO,t),{size:n,color:i,type:o,vars:a,className:l,style:u,classNames:h,styles:d,unstyled:f,loaders:m,variant:g,children:v,...x}=r,w=Yt({name:"Loader",props:r,classes:yi,className:l,style:u,classNames:h,styles:d,unstyled:f,vars:a,varsResolver:vO});return v?b.jsx(st,{...w("root"),ref:e,...x,children:v}):b.jsx(st,{...w("root"),ref:e,component:m[o],variant:g,size:n,...x})});Pn.defaultLoaders=Uk;Pn.classes=yi;Pn.displayName="@mantine/core/Loader";var Fl={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const x2={orientation:"horizontal"},xO=(t,{borderWidth:e})=>({group:{"--ai-border-width":it(e)}}),fv=Ct((t,e)=>{const r=ct("ActionIconGroup",x2,t),{className:n,style:i,classNames:o,styles:a,unstyled:l,orientation:u,vars:h,borderWidth:d,variant:f,mod:m,...g}=ct("ActionIconGroup",x2,t),v=Yt({name:"ActionIconGroup",props:r,classes:Fl,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:h,varsResolver:xO,rootSelector:"group"});return b.jsx(st,{...v("group"),ref:e,variant:f,mod:[{"data-orientation":u},m],role:"group",...g})});fv.classes=Fl;fv.displayName="@mantine/core/ActionIconGroup";const b2={},bO=(t,{radius:e,color:r,gradient:n,variant:i,autoContrast:o,size:a})=>{const l=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled",autoContrast:o});return{groupSection:{"--section-height":te(a,"section-height"),"--section-padding-x":te(a,"section-padding-x"),"--section-fz":Ar(a),"--section-radius":e===void 0?void 0:rr(e),"--section-bg":r||i?l.background:void 0,"--section-color":l.color,"--section-bd":r||i?l.border:void 0}}},pv=Ct((t,e)=>{const r=ct("ActionIconGroupSection",b2,t),{className:n,style:i,classNames:o,styles:a,unstyled:l,vars:u,variant:h,gradient:d,radius:f,autoContrast:m,...g}=ct("ActionIconGroupSection",b2,t),v=Yt({name:"ActionIconGroupSection",props:r,classes:Fl,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:u,varsResolver:bO,rootSelector:"groupSection"});return b.jsx(st,{...v("groupSection"),ref:e,variant:h,...g})});pv.classes=Fl;pv.displayName="@mantine/core/ActionIconGroupSection";const wO={},CO=(t,{size:e,radius:r,variant:n,gradient:i,color:o,autoContrast:a})=>{const l=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:i,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":te(e,"ai-size"),"--ai-radius":r===void 0?void 0:rr(r),"--ai-bg":o||n?l.background:void 0,"--ai-hover":o||n?l.hover:void 0,"--ai-hover-color":o||n?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":o||n?l.border:void 0}}},Dn=ln((t,e)=>{const r=ct("ActionIcon",wO,t),{className:n,unstyled:i,variant:o,classNames:a,styles:l,style:u,loading:h,loaderProps:d,size:f,color:m,radius:g,__staticSelector:v,gradient:x,vars:w,children:S,disabled:k,"data-disabled":E,autoContrast:L,mod:A,...M}=r,B=Yt({name:["ActionIcon",v],props:r,className:n,style:u,classes:Fl,classNames:a,styles:l,unstyled:i,vars:w,varsResolver:CO});return b.jsxs(fs,{...B("root",{active:!k&&!h&&!E}),...M,unstyled:i,variant:o,size:f,disabled:k||h,ref:e,mod:[{loading:h,disabled:k||E},A],children:[b.jsx(ps,{mounted:!!h,transition:"slide-down",duration:150,children:D=>b.jsx(st,{component:"span",...B("loader",{style:D}),"aria-hidden":!0,children:b.jsx(Pn,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),b.jsx(st,{component:"span",mod:{loading:h},...B("icon"),children:S})]})});Dn.classes=Fl;Dn.displayName="@mantine/core/ActionIcon";Dn.Group=fv;Dn.GroupSection=pv;const Yk=$.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...r},n)=>b.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:n,...r,children:b.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));Yk.displayName="@mantine/core/CloseIcon";var Gk={root:"m_86a44da5","root--subtle":"m_220c80f2"};const SO={variant:"subtle"},kO=(t,{size:e,radius:r,iconSize:n})=>({root:{"--cb-size":te(e,"cb-size"),"--cb-radius":r===void 0?void 0:rr(r),"--cb-icon-size":it(n)}}),Ru=ln((t,e)=>{const r=ct("CloseButton",SO,t),{iconSize:n,children:i,vars:o,radius:a,className:l,classNames:u,style:h,styles:d,unstyled:f,"data-disabled":m,disabled:g,variant:v,icon:x,mod:w,__staticSelector:S,...k}=r,E=Yt({name:S||"CloseButton",props:r,className:l,style:h,classes:Gk,classNames:u,styles:d,unstyled:f,vars:o,varsResolver:kO});return b.jsxs(fs,{ref:e,...k,unstyled:f,variant:v,disabled:g,mod:[{disabled:g||m},w],...E("root",{variant:v,active:!g&&!m}),children:[x||b.jsx(Yk,{}),i]})});Ru.classes=Gk;Ru.displayName="@mantine/core/CloseButton";function _O(t){return $.Children.toArray(t).filter(Boolean)}var Xk={root:"m_4081bf90"};const TO={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},EO=(t,{grow:e,preventGrowOverflow:r,gap:n,align:i,justify:o,wrap:a},{childWidth:l})=>({root:{"--group-child-width":e&&r?l:void 0,"--group-gap":zr(n),"--group-align":i,"--group-justify":o,"--group-wrap":a}}),Zt=Ct((t,e)=>{const r=ct("Group",TO,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,children:u,gap:h,align:d,justify:f,wrap:m,grow:g,preventGrowOverflow:v,vars:x,variant:w,__size:S,mod:k,...E}=r,L=_O(u),A=L.length,M=zr(h??"md"),D={childWidth:`calc(${100/A}% - (${M} - ${M} / ${A}))`},q=Yt({name:"Group",props:r,stylesCtx:D,className:i,style:o,classes:Xk,classNames:n,styles:a,unstyled:l,vars:x,varsResolver:EO});return b.jsx(st,{...q("root"),ref:e,variant:w,mod:[{grow:g},k],size:S,...E,children:L})});Zt.classes=Xk;Zt.displayName="@mantine/core/Group";const[$O,Eo]=Ui("ModalBase component was not found in tree");function LO({opened:t,transitionDuration:e}){const[r,n]=$.useState(t),i=$.useRef(-1),a=jf()?0:e;return $.useEffect(()=>(t?(n(!0),window.clearTimeout(i.current)):a===0?n(!1):i.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(i.current)),[t,a]),r}function MO({id:t,transitionProps:e,opened:r,trapFocus:n,closeOnEscape:i,onClose:o,returnFocus:a}){const l=Yi(t),[u,h]=$.useState(!1),[d,f]=$.useState(!1),m=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,g=LO({opened:r,transitionDuration:m});return qd("keydown",v=>{var x;v.key==="Escape"&&i&&!v.isComposing&&r&&((x=v.target)==null?void 0:x.getAttribute("data-mantine-stop-propagation"))!=="true"&&o()},{capture:!0}),DS({opened:r,shouldReturnFocus:n&&a}),{_id:l,titleMounted:u,bodyMounted:d,shouldLockScroll:g,setTitleMounted:h,setBodyMounted:f}}const Kk=$.forwardRef(({keepMounted:t,opened:e,onClose:r,id:n,transitionProps:i,onExitTransitionEnd:o,onEnterTransitionEnd:a,trapFocus:l,closeOnEscape:u,returnFocus:h,closeOnClickOutside:d,withinPortal:f,portalProps:m,lockScroll:g,children:v,zIndex:x,shadow:w,padding:S,__vars:k,unstyled:E,removeScrollProps:L,...A},M)=>{const{_id:B,titleMounted:D,bodyMounted:q,shouldLockScroll:U,setTitleMounted:H,setBodyMounted:K}=MO({id:n,transitionProps:i,opened:e,trapFocus:l,closeOnEscape:u,onClose:r,returnFocus:h}),{key:V,...W}=L||{};return b.jsx(ha,{...m,withinPortal:f,children:b.jsx($O,{value:{opened:e,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:a,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${B}-title`,getBodyId:()=>`${B}-body`,titleMounted:D,bodyMounted:q,setTitleMounted:H,setBodyMounted:K,trapFocus:l,closeOnEscape:u,zIndex:x,unstyled:E},children:b.jsx(wl,{enabled:U&&g,...W,children:b.jsx(st,{ref:M,...A,__vars:{...k,"--mb-z-index":(x||ki("modal")).toString(),"--mb-shadow":j0(w),"--mb-padding":zr(S)},children:v})},V)})})});Kk.displayName="@mantine/core/ModalBase";function AO(){const t=Eo();return $.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var kl={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const Qk=$.forwardRef(({className:t,...e},r)=>{const n=AO(),i=Eo();return b.jsx(st,{ref:r,...e,id:n,className:yr({[kl.body]:!i.unstyled},t)})});Qk.displayName="@mantine/core/ModalBaseBody";const Zk=$.forwardRef(({className:t,onClick:e,...r},n)=>{const i=Eo();return b.jsx(Ru,{ref:n,...r,onClick:o=>{i.onClose(),e==null||e(o)},className:yr({[kl.close]:!i.unstyled},t),unstyled:i.unstyled})});Zk.displayName="@mantine/core/ModalBaseCloseButton";const Jk=$.forwardRef(({transitionProps:t,className:e,innerProps:r,onKeyDown:n,style:i,...o},a)=>{const l=Eo();return b.jsx(ps,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var u,h,d;(u=l.onExitTransitionEnd)==null||u.call(l),(d=(h=l.transitionProps)==null?void 0:h.onExited)==null||d.call(h)},onEntered:()=>{var u,h,d;(u=l.onEnterTransitionEnd)==null||u.call(l),(d=(h=l.transitionProps)==null?void 0:h.onEntered)==null||d.call(h)},...t,children:u=>b.jsx("div",{...r,className:yr({[kl.inner]:!l.unstyled},r.className),children:b.jsx(tp,{active:l.opened&&l.trapFocus,innerRef:a,children:b.jsx(Ir,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[i,u],className:yr({[kl.content]:!l.unstyled},e),unstyled:l.unstyled,children:o.children})})})})});Jk.displayName="@mantine/core/ModalBaseContent";const t_=$.forwardRef(({className:t,...e},r)=>{const n=Eo();return b.jsx(st,{component:"header",ref:r,className:yr({[kl.header]:!n.unstyled},t),...e})});t_.displayName="@mantine/core/ModalBaseHeader";const RO={duration:200,timingFunction:"ease",transition:"fade"};function PO(t){const e=Eo();return{...RO,...e.transitionProps,...t}}const e_=$.forwardRef(({onClick:t,transitionProps:e,style:r,visible:n,...i},o)=>{const a=Eo(),l=PO(e);return b.jsx(ps,{mounted:n!==void 0?n:a.opened,...l,transition:"fade",children:u=>b.jsx(Jf,{ref:o,fixed:!0,style:[r,u],zIndex:a.zIndex,unstyled:a.unstyled,onClick:h=>{t==null||t(h),a.closeOnClickOutside&&a.onClose()},...i})})});e_.displayName="@mantine/core/ModalBaseOverlay";function BO(){const t=Eo();return $.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const r_=$.forwardRef(({className:t,...e},r)=>{const n=BO(),i=Eo();return b.jsx(st,{component:"h2",ref:r,className:yr({[kl.title]:!i.unstyled},t),...e,id:n})});r_.displayName="@mantine/core/ModalBaseTitle";function NO({children:t}){return b.jsx(b.Fragment,{children:t})}const[OO,FO]=$u({size:"sm"}),DO={},n_=Ct((t,e)=>{const r=ct("InputClearButton",DO,t),{size:n,variant:i,vars:o,classNames:a,styles:l,...u}=r,h=FO(),{resolvedClassNames:d,resolvedStyles:f}=Lu({classNames:a,styles:l,props:r});return b.jsx(Ru,{variant:i||"transparent",ref:e,size:n||(h==null?void 0:h.size)||"sm",classNames:d,styles:f,__staticSelector:"InputClearButton",...u})});n_.displayName="@mantine/core/InputClearButton";const[IO,Pu]=$u({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Jn={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const w2={},jO=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${Ar(e)} - ${it(2)})`}}),ep=Ct((t,e)=>{const r=ct("InputDescription",w2,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,size:h,__staticSelector:d,__inheritStyles:f=!0,variant:m,...g}=ct("InputDescription",w2,r),v=Pu(),x=Yt({name:["InputWrapper",d],props:r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,rootSelector:"description",vars:u,varsResolver:jO}),w=f&&(v==null?void 0:v.getStyles)||x;return b.jsx(st,{component:"p",ref:e,variant:m,size:h,...w("description",v!=null&&v.getStyles?{className:i,style:o}:void 0),...g})});ep.classes=Jn;ep.displayName="@mantine/core/InputDescription";const zO={},WO=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${Ar(e)} - ${it(2)})`}}),rp=Ct((t,e)=>{const r=ct("InputError",zO,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,size:h,__staticSelector:d,__inheritStyles:f=!0,variant:m,...g}=r,v=Yt({name:["InputWrapper",d],props:r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,rootSelector:"error",vars:u,varsResolver:WO}),x=Pu(),w=f&&(x==null?void 0:x.getStyles)||v;return b.jsx(st,{component:"p",ref:e,variant:m,size:h,...w("error",x!=null&&x.getStyles?{className:i,style:o}:void 0),...g})});rp.classes=Jn;rp.displayName="@mantine/core/InputError";const C2={labelElement:"label"},HO=(t,{size:e})=>({label:{"--input-label-size":Ar(e),"--input-asterisk-color":void 0}}),np=Ct((t,e)=>{const r=ct("InputLabel",C2,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,labelElement:h,size:d,required:f,htmlFor:m,onMouseDown:g,children:v,__staticSelector:x,variant:w,mod:S,...k}=ct("InputLabel",C2,r),E=Yt({name:["InputWrapper",x],props:r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,rootSelector:"label",vars:u,varsResolver:HO}),L=Pu(),A=(L==null?void 0:L.getStyles)||E;return b.jsxs(st,{...A("label",L!=null&&L.getStyles?{className:i,style:o}:void 0),component:h,variant:w,size:d,ref:e,htmlFor:h==="label"?m:void 0,mod:[{required:f},S],onMouseDown:M=>{g==null||g(M),!M.defaultPrevented&&M.detail>1&&M.preventDefault()},...k,children:[v,f&&b.jsx("span",{...A("required"),"aria-hidden":!0,children:" *"})]})});np.classes=Jn;np.displayName="@mantine/core/InputLabel";const S2={},mv=Ct((t,e)=>{const r=ct("InputPlaceholder",S2,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,__staticSelector:h,variant:d,error:f,mod:m,...g}=ct("InputPlaceholder",S2,r),v=Yt({name:["InputPlaceholder",h],props:r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,rootSelector:"placeholder"});return b.jsx(st,{...v("placeholder"),mod:[{error:!!f},m],component:"span",variant:d,ref:e,...g})});mv.classes=Jn;mv.displayName="@mantine/core/InputPlaceholder";function qO(t,{hasDescription:e,hasError:r}){const n=t.findIndex(u=>u==="input"),i=t.slice(0,n),o=t.slice(n+1),a=e&&i.includes("description")||r&&i.includes("error");return{offsetBottom:e&&o.includes("description")||r&&o.includes("error"),offsetTop:a}}const VO={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},UO=(t,{size:e})=>({label:{"--input-label-size":Ar(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${Ar(e)} - ${it(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${Ar(e)} - ${it(2)})`}}),gv=Ct((t,e)=>{const r=ct("InputWrapper",VO,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,size:h,variant:d,__staticSelector:f,inputContainer:m,inputWrapperOrder:g,label:v,error:x,description:w,labelProps:S,descriptionProps:k,errorProps:E,labelElement:L,children:A,withAsterisk:M,id:B,required:D,__stylesApiProps:q,mod:U,...H}=r,K=Yt({name:["InputWrapper",f],props:q||r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:UO}),V={size:h,variant:d,__staticSelector:f},W=Yi(B),I=typeof M=="boolean"?M:D,O=(E==null?void 0:E.id)||`${W}-error`,F=(k==null?void 0:k.id)||`${W}-description`,P=W,z=!!x&&typeof x!="boolean",X=!!w,N=`${z?O:""} ${X?F:""}`,Z=N.trim().length>0?N.trim():void 0,ot=(S==null?void 0:S.id)||`${W}-label`,yt=v&&b.jsx(np,{labelElement:L,id:ot,htmlFor:P,required:I,...V,...S,children:v},"label"),dt=X&&b.jsx(ep,{...k,...V,size:(k==null?void 0:k.size)||V.size,id:(k==null?void 0:k.id)||F,children:w},"description"),lt=b.jsx($.Fragment,{children:m(A)},"input"),mt=z&&$.createElement(rp,{...E,...V,size:(E==null?void 0:E.size)||V.size,key:"error",id:(E==null?void 0:E.id)||O},x),xt=g.map(St=>{switch(St){case"label":return yt;case"input":return lt;case"description":return dt;case"error":return mt;default:return null}});return b.jsx(IO,{value:{getStyles:K,describedBy:Z,inputId:P,labelId:ot,...qO(g,{hasDescription:X,hasError:z})},children:b.jsx(st,{ref:e,variant:d,size:h,mod:[{error:!!x},U],...K("root"),...H,children:xt})})});gv.classes=Jn;gv.displayName="@mantine/core/InputWrapper";const YO={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},GO=(t,e,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":te(e.size,"input-height"),"--input-fz":Ar(e.size),"--input-radius":e.radius===void 0?void 0:rr(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?it(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?it(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?te(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),Xe=ln((t,e)=>{const r=ct("Input",YO,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,required:u,__staticSelector:h,__stylesApiProps:d,size:f,wrapperProps:m,error:g,disabled:v,leftSection:x,leftSectionProps:w,leftSectionWidth:S,rightSection:k,rightSectionProps:E,rightSectionWidth:L,rightSectionPointerEvents:A,leftSectionPointerEvents:M,variant:B,vars:D,pointer:q,multiline:U,radius:H,id:K,withAria:V,withErrorStyles:W,mod:I,inputSize:O,__clearSection:F,__clearable:P,__defaultRightSection:z,...X}=r,{styleProps:N,rest:Z}=ua(X),ot=Pu(),yt={offsetBottom:ot==null?void 0:ot.offsetBottom,offsetTop:ot==null?void 0:ot.offsetTop},dt=Yt({name:["Input",h],props:d||r,classes:Jn,className:i,style:o,classNames:n,styles:a,unstyled:l,stylesCtx:yt,rootSelector:"wrapper",vars:D,varsResolver:GO}),lt=V?{required:u,disabled:v,"aria-invalid":!!g,"aria-describedby":ot==null?void 0:ot.describedBy,id:(ot==null?void 0:ot.inputId)||K}:{},mt=k||P&&F||z;return b.jsx(OO,{value:{size:f||"sm"},children:b.jsxs(st,{...dt("wrapper"),...N,...m,mod:[{error:!!g&&W,pointer:q,disabled:v,multiline:U,"data-with-right-section":!!mt,"data-with-left-section":!!x},I],variant:B,size:f,children:[x&&b.jsx("div",{...w,"data-position":"left",...dt("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:x}),b.jsx(st,{component:"input",...Z,...lt,ref:e,required:u,mod:{disabled:v,error:!!g&&W},variant:B,__size:O,...dt("input")}),mt&&b.jsx("div",{...E,"data-position":"right",...dt("section",{className:E==null?void 0:E.className,style:E==null?void 0:E.style}),children:mt})]})})});Xe.classes=Jn;Xe.Wrapper=gv;Xe.Label=np;Xe.Error=rp;Xe.Description=ep;Xe.Placeholder=mv;Xe.ClearButton=n_;Xe.displayName="@mantine/core/Input";function XO(t,e,r){const n=ct(t,e,r),{label:i,description:o,error:a,required:l,classNames:u,styles:h,className:d,unstyled:f,__staticSelector:m,__stylesApiProps:g,errorProps:v,labelProps:x,descriptionProps:w,wrapperProps:S,id:k,size:E,style:L,inputContainer:A,inputWrapperOrder:M,withAsterisk:B,variant:D,vars:q,mod:U,...H}=n,{styleProps:K,rest:V}=ua(H),W={label:i,description:o,error:a,required:l,classNames:u,className:d,__staticSelector:m,__stylesApiProps:g||n,errorProps:v,labelProps:x,descriptionProps:w,unstyled:f,styles:h,size:E,style:L,inputContainer:A,inputWrapperOrder:M,withAsterisk:B,variant:D,id:k,mod:U,...S};return{...V,classNames:u,styles:h,unstyled:f,wrapperProps:{...W,...K},inputProps:{required:l,classNames:u,styles:h,unstyled:f,size:E,__staticSelector:m,__stylesApiProps:g||n,error:a,variant:D,id:k}}}const KO={__staticSelector:"InputBase",withAria:!0},$o=ln((t,e)=>{const{inputProps:r,wrapperProps:n,...i}=XO("InputBase",KO,t);return b.jsx(Xe.Wrapper,{...n,children:b.jsx(Xe,{...r,...i,ref:e})})});$o.classes={...Xe.classes,...Xe.Wrapper.classes};$o.displayName="@mantine/core/InputBase";function i_({style:t,size:e=16,...r}){return b.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:it(e),height:it(e),display:"block"},...r,children:b.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}i_.displayName="@mantine/core/AccordionChevron";var o_={root:"m_b6d8b162"};function QO(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const ZO={inherit:!1},JO=(t,{variant:e,lineClamp:r,gradient:n,size:i,color:o})=>({root:{"--text-fz":Ar(i),"--text-lh":gP(i),"--text-gradient":e==="gradient"?Cy(n,t):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":o?gr(o,t):void 0}}),jt=ln((t,e)=>{const r=ct("Text",ZO,t),{lineClamp:n,truncate:i,inline:o,inherit:a,gradient:l,span:u,__staticSelector:h,vars:d,className:f,style:m,classNames:g,styles:v,unstyled:x,variant:w,mod:S,size:k,...E}=r,L=Yt({name:["Text",h],props:r,classes:o_,className:f,style:m,classNames:g,styles:v,unstyled:x,vars:d,varsResolver:JO});return b.jsx(st,{...L("root",{focusable:!0}),ref:e,component:u?"span":"p",variant:w,mod:[{"data-truncate":QO(i),"data-line-clamp":typeof n=="number","data-inline":o,"data-inherit":a},S],size:k,...E})});jt.classes=o_;jt.displayName="@mantine/core/Text";const[t6,Dl]=Ui("AppShell was not found in tree");var ms={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const e6={},yv=Ct((t,e)=>{const r=ct("AppShellAside",e6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,withBorder:h,zIndex:d,mod:f,...m}=r,g=Dl();return g.disabled?null:b.jsx(st,{component:"aside",ref:e,mod:[{"with-border":h??g.withBorder},f],...g.getStyles("aside",{className:i,classNames:n,styles:a,style:o}),...m,__vars:{"--app-shell-aside-z-index":`calc(${d??g.zIndex} + 1)`}})});yv.classes=ms;yv.displayName="@mantine/core/AppShellAside";const r6={},vv=Ct((t,e)=>{var v;const r=ct("AppShellFooter",r6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,withBorder:h,zIndex:d,mod:f,...m}=r,g=Dl();return g.disabled?null:b.jsx(st,{component:"footer",ref:e,mod:[{"with-border":h??g.withBorder},f],...g.getStyles("footer",{className:yr({[wl.classNames.zeroRight]:g.offsetScrollbars},i),classNames:n,styles:a,style:o}),...m,__vars:{"--app-shell-footer-z-index":(v=d??g.zIndex)==null?void 0:v.toString()}})});vv.classes=ms;vv.displayName="@mantine/core/AppShellFooter";const n6={},xv=Ct((t,e)=>{var v;const r=ct("AppShellHeader",n6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,withBorder:h,zIndex:d,mod:f,...m}=r,g=Dl();return g.disabled?null:b.jsx(st,{component:"header",ref:e,mod:[{"with-border":h??g.withBorder},f],...g.getStyles("header",{className:yr({[wl.classNames.zeroRight]:g.offsetScrollbars},i),classNames:n,styles:a,style:o}),...m,__vars:{"--app-shell-header-z-index":(v=d??g.zIndex)==null?void 0:v.toString()}})});xv.classes=ms;xv.displayName="@mantine/core/AppShellHeader";const i6={},bv=Ct((t,e)=>{const r=ct("AppShellMain",i6,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=Dl();return b.jsx(st,{component:"main",ref:e,...h.getStyles("main",{className:i,style:o,classNames:n,styles:a}),...u})});bv.classes=ms;bv.displayName="@mantine/core/AppShellMain";function Bu(t){return typeof t=="object"?t.base:t}function Nu(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function Ou(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function o6({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,aside:n,theme:i}){var u,h,d;const o=n==null?void 0:n.width,a="translateX(var(--app-shell-aside-width))",l="translateX(calc(var(--app-shell-aside-width) * -1))";if(n!=null&&n.breakpoint&&!((u=n==null?void 0:n.collapsed)!=null&&u.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-aside-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-aside-offset"]="0px"),Nu(o)){const f=it(Bu(o));t["--app-shell-aside-width"]=f,t["--app-shell-aside-offset"]=f}if(Ou(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=it(o.base),t["--app-shell-aside-offset"]=it(o.base)),er(o).forEach(f=>{f!=="base"&&(e[f]=e[f]||{},e[f]["--app-shell-aside-width"]=it(o[f]),e[f]["--app-shell-aside-offset"]=it(o[f]))})),(h=n==null?void 0:n.collapsed)!=null&&h.desktop){const f=n.breakpoint;e[f]=e[f]||{},e[f]["--app-shell-aside-transform"]=a,e[f]["--app-shell-aside-transform-rtl"]=l,e[f]["--app-shell-aside-offset"]="0px !important"}if((d=n==null?void 0:n.collapsed)!=null&&d.mobile){const f=z0(n.breakpoint,i.breakpoints)-.1;r[f]=r[f]||{},r[f]["--app-shell-aside-width"]="100%",r[f]["--app-shell-aside-offset"]="0px",r[f]["--app-shell-aside-transform"]=a,r[f]["--app-shell-aside-transform-rtl"]=l}}function s6({baseStyles:t,minMediaStyles:e,footer:r}){const n=r==null?void 0:r.height,i="translateY(var(--app-shell-footer-height))",o=(r==null?void 0:r.offset)??!0;if(Nu(n)){const a=it(Bu(n));t["--app-shell-footer-height"]=a,o&&(t["--app-shell-footer-offset"]=a)}Ou(n)&&(typeof n.base<"u"&&(t["--app-shell-footer-height"]=it(n.base),o&&(t["--app-shell-footer-offset"]=it(n.base))),er(n).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-footer-height"]=it(n[a]),o&&(e[a]["--app-shell-footer-offset"]=it(n[a])))})),r!=null&&r.collapsed&&(t["--app-shell-footer-transform"]=i,t["--app-shell-footer-offset"]="0px !important")}function a6({baseStyles:t,minMediaStyles:e,header:r}){const n=r==null?void 0:r.height,i="translateY(calc(var(--app-shell-header-height) * -1))",o=(r==null?void 0:r.offset)??!0;if(Nu(n)){const a=it(Bu(n));t["--app-shell-header-height"]=a,o&&(t["--app-shell-header-offset"]=a)}Ou(n)&&(typeof n.base<"u"&&(t["--app-shell-header-height"]=it(n.base),o&&(t["--app-shell-header-offset"]=it(n.base))),er(n).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-header-height"]=it(n[a]),o&&(e[a]["--app-shell-header-offset"]=it(n[a])))})),r!=null&&r.collapsed&&(t["--app-shell-header-transform"]=i,t["--app-shell-header-offset"]="0px !important")}function l6({baseStyles:t,minMediaStyles:e,maxMediaStyles:r,navbar:n,theme:i}){var u,h,d;const o=n==null?void 0:n.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",l="translateX(var(--app-shell-navbar-width))";if(n!=null&&n.breakpoint&&!((u=n==null?void 0:n.collapsed)!=null&&u.mobile)&&(r[n==null?void 0:n.breakpoint]=r[n==null?void 0:n.breakpoint]||{},r[n==null?void 0:n.breakpoint]["--app-shell-navbar-width"]="100%",r[n==null?void 0:n.breakpoint]["--app-shell-navbar-offset"]="0px"),Nu(o)){const f=it(Bu(o));t["--app-shell-navbar-width"]=f,t["--app-shell-navbar-offset"]=f}if(Ou(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=it(o.base),t["--app-shell-navbar-offset"]=it(o.base)),er(o).forEach(f=>{f!=="base"&&(e[f]=e[f]||{},e[f]["--app-shell-navbar-width"]=it(o[f]),e[f]["--app-shell-navbar-offset"]=it(o[f]))})),(h=n==null?void 0:n.collapsed)!=null&&h.desktop){const f=n.breakpoint;e[f]=e[f]||{},e[f]["--app-shell-navbar-transform"]=a,e[f]["--app-shell-navbar-transform-rtl"]=l,e[f]["--app-shell-navbar-offset"]="0px !important"}if((d=n==null?void 0:n.collapsed)!=null&&d.mobile){const f=z0(n.breakpoint,i.breakpoints)-.1;r[f]=r[f]||{},r[f]["--app-shell-navbar-width"]="100%",r[f]["--app-shell-navbar-offset"]="0px",r[f]["--app-shell-navbar-transform"]=a,r[f]["--app-shell-navbar-transform-rtl"]=l}}function Yg(t){return Number(t)===0?"0px":zr(t)}function c6({padding:t,baseStyles:e,minMediaStyles:r}){Nu(t)&&(e["--app-shell-padding"]=Yg(Bu(t))),Ou(t)&&(t.base&&(e["--app-shell-padding"]=Yg(t.base)),er(t).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=Yg(t[n]))}))}function u6({navbar:t,header:e,footer:r,aside:n,padding:i,theme:o}){const a={},l={},u={};l6({baseStyles:u,minMediaStyles:a,maxMediaStyles:l,navbar:t,theme:o}),o6({baseStyles:u,minMediaStyles:a,maxMediaStyles:l,aside:n,theme:o}),a6({baseStyles:u,minMediaStyles:a,header:e}),s6({baseStyles:u,minMediaStyles:a,footer:r}),c6({baseStyles:u,minMediaStyles:a,padding:i});const h=xy(er(a),o.breakpoints).map(m=>({query:`(min-width: ${Wd(m.px)})`,styles:a[m.value]})),d=xy(er(l),o.breakpoints).map(m=>({query:`(max-width: ${Wd(m.px)})`,styles:l[m.value]})),f=[...h,...d];return{baseStyles:u,media:f}}function h6({navbar:t,header:e,aside:r,footer:n,padding:i}){const o=an(),a=To(),{media:l,baseStyles:u}=u6({navbar:t,header:e,footer:n,aside:r,padding:i,theme:o});return b.jsx(qf,{media:l,styles:u,selector:a.cssVariablesSelector})}const d6={},wv=Ct((t,e)=>{const r=ct("AppShellNavbar",d6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,withBorder:h,zIndex:d,mod:f,...m}=r,g=Dl();return g.disabled?null:b.jsx(st,{component:"nav",ref:e,mod:[{"with-border":h??g.withBorder},f],...g.getStyles("navbar",{className:i,classNames:n,styles:a,style:o}),...m,__vars:{"--app-shell-navbar-z-index":`calc(${d??g.zIndex} + 1)`}})});wv.classes=ms;wv.displayName="@mantine/core/AppShellNavbar";const f6={},Cv=ln((t,e)=>{const r=ct("AppShellSection",f6,t),{classNames:n,className:i,style:o,styles:a,vars:l,grow:u,mod:h,...d}=r,f=Dl();return b.jsx(st,{ref:e,mod:[{grow:u},h],...f.getStyles("section",{className:i,style:o,classNames:n,styles:a}),...d})});Cv.classes=ms;Cv.displayName="@mantine/core/AppShellSection";function p6({transitionDuration:t,disabled:e}){const[r,n]=$.useState(!0),i=$.useRef(-1),o=$.useRef(-1);return qd("resize",()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>$.startTransition(()=>{n(!1)}),200)}),Bl(()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>$.startTransition(()=>{n(!1)}),t||0)},[e,t]),r}const m6={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ki("app")},g6=(t,{transitionDuration:e,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":r}}),vi=Ct((t,e)=>{const r=ct("AppShell",m6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,navbar:h,withBorder:d,padding:f,transitionDuration:m,transitionTimingFunction:g,header:v,zIndex:x,layout:w,disabled:S,aside:k,footer:E,offsetScrollbars:L=w!=="alt",mod:A,...M}=r,B=Yt({name:"AppShell",classes:ms,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:g6}),D=p6({disabled:S,transitionDuration:m});return b.jsxs(t6,{value:{getStyles:B,withBorder:d,zIndex:x,disabled:S,offsetScrollbars:L},children:[b.jsx(h6,{navbar:h,header:v,aside:k,footer:E,padding:f}),b.jsx(st,{ref:e,...B("root"),mod:[{resizing:D,layout:w,disabled:S},A],...M})]})});vi.classes=ms;vi.displayName="@mantine/core/AppShell";vi.Navbar=wv;vi.Header=xv;vi.Main=bv;vi.Aside=yv;vi.Footer=vv;vi.Section=Cv;function s_(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>s_(e))}:t}function y6(t){return t?t.map(e=>s_(e)):[]}function a_(t){return t.reduce((e,r)=>"group"in r?{...e,...a_(r.items)}:(e[r.value]=r,e),{})}var _n={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const v6={error:null},x6=(t,{size:e,color:r})=>({chevron:{"--combobox-chevron-size":te(e,"combobox-chevron-size"),"--combobox-chevron-color":r?gr(r,t):void 0}}),Sv=Ct((t,e)=>{const r=ct("ComboboxChevron",v6,t),{size:n,error:i,style:o,className:a,classNames:l,styles:u,unstyled:h,vars:d,mod:f,...m}=r,g=Yt({name:"ComboboxChevron",classes:_n,props:r,style:o,className:a,classNames:l,styles:u,unstyled:h,vars:d,varsResolver:x6,rootSelector:"chevron"});return b.jsx(st,{component:"svg",...m,...g("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},f],ref:e,children:b.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});Sv.classes=_n;Sv.displayName="@mantine/core/ComboboxChevron";const[b6,ti]=Ui("Combobox component was not found in tree"),l_=$.forwardRef(({size:t,onMouseDown:e,onClick:r,onClear:n,...i},o)=>b.jsx(Xe.ClearButton,{ref:o,tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:a=>{a.preventDefault(),e==null||e(a)},onClick:a=>{n(),r==null||r(a)}}));l_.displayName="@mantine/core/ComboboxClearButton";const w6={},kv=Ct((t,e)=>{const{classNames:r,styles:n,className:i,style:o,hidden:a,...l}=ct("ComboboxDropdown",w6,t),u=ti();return b.jsx(Tn.Dropdown,{...l,ref:e,role:"presentation","data-hidden":a||void 0,...u.getStyles("dropdown",{className:i,style:o,classNames:r,styles:n})})});kv.classes=_n;kv.displayName="@mantine/core/ComboboxDropdown";const C6={refProp:"ref"},c_=Ct((t,e)=>{const{children:r,refProp:n}=ct("ComboboxDropdownTarget",C6,t);if(ti(),!_o(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return b.jsx(Tn.Target,{ref:e,refProp:n,children:r})});c_.displayName="@mantine/core/ComboboxDropdownTarget";const S6={},_v=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,...l}=ct("ComboboxEmpty",S6,t),u=ti();return b.jsx(st,{ref:e,...u.getStyles("empty",{className:n,classNames:r,styles:o,style:i}),...l})});_v.classes=_n;_v.displayName="@mantine/core/ComboboxEmpty";function Tv({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:r,withExpandedAttribute:n,targetType:i,autoComplete:o}){const a=ti(),[l,u]=$.useState(null),h=f=>{if(t==null||t(f),!a.readOnly&&e){if(f.nativeEvent.isComposing)return;if(f.nativeEvent.code==="ArrowDown"&&(f.preventDefault(),a.store.dropdownOpened?u(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),u(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="ArrowUp"&&(f.preventDefault(),a.store.dropdownOpened?u(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),u(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="Enter"||f.nativeEvent.code==="NumpadEnter"){if(f.nativeEvent.keyCode===229)return;const m=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&m!==-1?(f.preventDefault(),a.store.clickSelectedOption()):i==="button"&&(f.preventDefault(),a.store.openDropdown("keyboard"))}f.key==="Escape"&&a.store.closeDropdown("keyboard"),f.nativeEvent.code==="Space"&&i==="button"&&(f.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&l||void 0,autoComplete:o,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:h}}const k6={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},u_=Ct((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:a,targetType:l,autoComplete:u,...h}=ct("ComboboxEventsTarget",k6,t);if(!_o(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=ti(),f=Tv({targetType:l,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:u});return $.cloneElement(r,{...f,...h,[n]:Vr(e,d.store.targetRef,zf(r))})});u_.displayName="@mantine/core/ComboboxEventsTarget";const _6={},Ev=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,...l}=ct("ComboboxFooter",_6,t),u=ti();return b.jsx(st,{ref:e,...u.getStyles("footer",{className:n,classNames:r,style:i,styles:o}),...l,onMouseDown:h=>{h.preventDefault()}})});Ev.classes=_n;Ev.displayName="@mantine/core/ComboboxFooter";const T6={},$v=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,children:l,label:u,...h}=ct("ComboboxGroup",T6,t),d=ti();return b.jsxs(st,{ref:e,...d.getStyles("group",{className:n,classNames:r,style:i,styles:o}),...h,children:[u&&b.jsx("div",{...d.getStyles("groupLabel",{classNames:r,styles:o}),children:u}),l]})});$v.classes=_n;$v.displayName="@mantine/core/ComboboxGroup";const E6={},Lv=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,...l}=ct("ComboboxHeader",E6,t),u=ti();return b.jsx(st,{ref:e,...u.getStyles("header",{className:n,classNames:r,style:i,styles:o}),...l,onMouseDown:h=>{h.preventDefault()}})});Lv.classes=_n;Lv.displayName="@mantine/core/ComboboxHeader";function h_({value:t,valuesDivider:e=",",...r}){return b.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...r})}h_.displayName="@mantine/core/ComboboxHiddenInput";const $6={},Mv=Ct((t,e)=>{const r=ct("ComboboxOption",$6,t),{classNames:n,className:i,style:o,styles:a,vars:l,onClick:u,id:h,active:d,onMouseDown:f,onMouseOver:m,disabled:g,selected:v,mod:x,...w}=r,S=ti(),k=$.useId(),E=h||k;return b.jsx(st,{...S.getStyles("option",{className:i,classNames:n,styles:a,style:o}),...w,ref:e,id:E,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":g,"combobox-selected":v},x],role:"option",onClick:L=>{var A;g?L.preventDefault():((A=S.onOptionSubmit)==null||A.call(S,r.value,r),u==null||u(L))},onMouseDown:L=>{L.preventDefault(),f==null||f(L)},onMouseOver:L=>{S.resetSelectionOnOptionHover&&S.store.resetSelectedOption(),m==null||m(L)}})});Mv.classes=_n;Mv.displayName="@mantine/core/ComboboxOption";const L6={},Av=Ct((t,e)=>{const r=ct("ComboboxOptions",L6,t),{classNames:n,className:i,style:o,styles:a,id:l,onMouseDown:u,labelledBy:h,...d}=r,f=ti(),m=Yi(l);return $.useEffect(()=>{f.store.setListId(m)},[m]),b.jsx(st,{ref:e,...f.getStyles("options",{className:i,style:o,classNames:n,styles:a}),...d,id:m,role:"listbox","aria-labelledby":h,onMouseDown:g=>{g.preventDefault(),u==null||u(g)}})});Av.classes=_n;Av.displayName="@mantine/core/ComboboxOptions";const M6={withAriaAttributes:!0,withKeyboardNavigation:!0},Rv=Ct((t,e)=>{const r=ct("ComboboxSearch",M6,t),{classNames:n,styles:i,unstyled:o,vars:a,withAriaAttributes:l,onKeyDown:u,withKeyboardNavigation:h,size:d,...f}=r,m=ti(),g=m.getStyles("search"),v=Tv({targetType:"input",withAriaAttributes:l,withKeyboardNavigation:h,withExpandedAttribute:!1,onKeyDown:u,autoComplete:"off"});return b.jsx(Xe,{ref:Vr(e,m.store.searchRef),classNames:[{input:g.className},n],styles:[{input:g.style},i],size:d||m.size,...v,...f,__staticSelector:"Combobox"})});Rv.classes=_n;Rv.displayName="@mantine/core/ComboboxSearch";const A6={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},d_=Ct((t,e)=>{const{children:r,refProp:n,withKeyboardNavigation:i,withAriaAttributes:o,withExpandedAttribute:a,targetType:l,autoComplete:u,...h}=ct("ComboboxTarget",A6,t);if(!_o(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=ti(),f=Tv({targetType:l,withAriaAttributes:o,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:u}),m=$.cloneElement(r,{...f,...h});return b.jsx(Tn.Target,{ref:Vr(e,d.store.targetRef),children:m})});d_.displayName="@mantine/core/ComboboxTarget";function R6(t,e,r){for(let n=t-1;n>=0;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=e.length-1;n>-1;n-=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n}return t}function P6(t,e,r){for(let n=t+1;n<e.length;n+=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<e.length;n+=1)if(!e[n].hasAttribute("data-combobox-disabled"))return n}return t}function B6(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function f_({defaultOpened:t,opened:e,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:i,loop:o=!0,scrollBehavior:a="instant"}={}){const[l,u]=On({value:e,defaultValue:t,finalValue:!1,onChange:r}),h=$.useRef(null),d=$.useRef(-1),f=$.useRef(null),m=$.useRef(null),g=$.useRef(-1),v=$.useRef(-1),x=$.useRef(-1),w=$.useCallback((O="unknown")=>{l||(u(!0),i==null||i(O))},[u,i,l]),S=$.useCallback((O="unknown")=>{l&&(u(!1),n==null||n(O))},[u,n,l]),k=$.useCallback((O="unknown")=>{l?S(O):w(O)},[S,w,l]),E=$.useCallback(()=>{const O=document.querySelector(`#${h.current} [data-combobox-selected]`);O==null||O.removeAttribute("data-combobox-selected"),O==null||O.removeAttribute("aria-selected")},[]),L=$.useCallback(O=>{const F=document.getElementById(h.current),P=F==null?void 0:F.querySelectorAll("[data-combobox-option]");if(!P)return null;const z=O>=P.length?0:O<0?P.length-1:O;return d.current=z,P!=null&&P[z]&&!P[z].hasAttribute("data-combobox-disabled")?(E(),P[z].setAttribute("data-combobox-selected","true"),P[z].setAttribute("aria-selected","true"),P[z].scrollIntoView({block:"nearest",behavior:a}),P[z].id):null},[a,E]),A=$.useCallback(()=>{const O=document.querySelector(`#${h.current} [data-combobox-active]`);if(O){const F=document.querySelectorAll(`#${h.current} [data-combobox-option]`),P=Array.from(F).findIndex(z=>z===O);return L(P)}return L(0)},[L]),M=$.useCallback(()=>L(P6(d.current,document.querySelectorAll(`#${h.current} [data-combobox-option]`),o)),[L,o]),B=$.useCallback(()=>L(R6(d.current,document.querySelectorAll(`#${h.current} [data-combobox-option]`),o)),[L,o]),D=$.useCallback(()=>L(B6(document.querySelectorAll(`#${h.current} [data-combobox-option]`))),[L]),q=$.useCallback((O="selected",F)=>{x.current=window.setTimeout(()=>{var X;const P=document.querySelectorAll(`#${h.current} [data-combobox-option]`),z=Array.from(P).findIndex(N=>N.hasAttribute(`data-combobox-${O}`));d.current=z,F!=null&&F.scrollIntoView&&((X=P[z])==null||X.scrollIntoView({block:"nearest",behavior:a}))},0)},[]),U=$.useCallback(()=>{d.current=-1,E()},[E]),H=$.useCallback(()=>{const O=document.querySelectorAll(`#${h.current} [data-combobox-option]`),F=O==null?void 0:O[d.current];F==null||F.click()},[]),K=$.useCallback(O=>{h.current=O},[]),V=$.useCallback(()=>{g.current=window.setTimeout(()=>f.current.focus(),0)},[]),W=$.useCallback(()=>{v.current=window.setTimeout(()=>m.current.focus(),0)},[]),I=$.useCallback(()=>d.current,[]);return $.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(v.current),window.clearTimeout(x.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:S,toggleDropdown:k,selectedOptionIndex:d.current,getSelectedOptionIndex:I,selectOption:L,selectFirstOption:D,selectActiveOption:A,selectNextOption:M,selectPreviousOption:B,resetSelectedOption:U,updateSelectedOptionIndex:q,listId:h.current,setListId:K,clickSelectedOption:H,searchRef:f,focusSearchInput:V,targetRef:m,focusTarget:W}}const N6={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},O6=(t,{size:e,dropdownPadding:r})=>({options:{"--combobox-option-fz":Ar(e),"--combobox-option-padding":te(e,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:it(r),"--combobox-option-fz":Ar(e),"--combobox-option-padding":te(e,"combobox-option-padding")}});function Te(t){const e=ct("Combobox",N6,t),{classNames:r,styles:n,unstyled:i,children:o,store:a,vars:l,onOptionSubmit:u,onClose:h,size:d,dropdownPadding:f,resetSelectionOnOptionHover:m,__staticSelector:g,readOnly:v,...x}=e,w=f_(),S=a||w,k=Yt({name:g||"Combobox",classes:_n,props:e,classNames:r,styles:n,unstyled:i,vars:l,varsResolver:O6}),E=()=>{h==null||h(),S.closeDropdown()};return b.jsx(b6,{value:{getStyles:k,store:S,onOptionSubmit:u,size:d,resetSelectionOnOptionHover:m,readOnly:v},children:b.jsx(Tn,{opened:S.dropdownOpened,...x,onChange:L=>!L&&E(),withRoles:!1,unstyled:i,children:o})})}const F6=t=>t;Te.extend=F6;Te.classes=_n;Te.displayName="@mantine/core/Combobox";Te.Target=d_;Te.Dropdown=kv;Te.Options=Av;Te.Option=Mv;Te.Search=Rv;Te.Empty=_v;Te.Chevron=Sv;Te.Footer=Ev;Te.Header=Lv;Te.EventsTarget=u_;Te.DropdownTarget=c_;Te.Group=$v;Te.ClearButton=l_;Te.HiddenInput=h_;var p_={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const m_=p_,Pv=$.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:r,classNames:n,styles:i,unstyled:o,children:a,label:l,description:u,id:h,disabled:d,error:f,size:m,labelPosition:g="left",bodyElement:v="div",labelElement:x="label",variant:w,style:S,vars:k,mod:E,...L},A)=>{const M=Yt({name:t,props:e,className:r,style:S,classes:p_,classNames:n,styles:i,unstyled:o});return b.jsx(st,{...M("root"),ref:A,__vars:{"--label-fz":Ar(m),"--label-lh":te(m,"label-lh")},mod:[{"label-position":g},E],variant:w,size:m,...L,children:b.jsxs(st,{component:v,htmlFor:v==="label"?h:void 0,...M("body"),children:[a,b.jsxs("div",{...M("labelWrapper"),"data-disabled":d||void 0,children:[l&&b.jsx(st,{component:x,htmlFor:x==="label"?h:void 0,...M("label"),"data-disabled":d||void 0,children:l}),u&&b.jsx(Xe.Description,{size:m,__inheritStyles:!1,...M("description"),children:u}),f&&typeof f!="boolean"&&b.jsx(Xe.Error,{size:m,__inheritStyles:!1,...M("error"),children:f})]})]})})});Pv.displayName="@mantine/core/InlineInput";const g_=$.createContext(null),D6=g_.Provider,y_=()=>$.useContext(g_),[I6,j6]=$u();var v_={card:"m_26775b0a"};const z6={withBorder:!0},W6=(t,{radius:e})=>({card:{"--card-radius":rr(e)}}),Bv=Ct((t,e)=>{const r=ct("CheckboxCard",z6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,checked:h,mod:d,withBorder:f,value:m,onClick:g,defaultChecked:v,onChange:x,...w}=r,S=Yt({name:"CheckboxCard",classes:v_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:W6,rootSelector:"card"}),k=y_(),E=typeof h=="boolean"?h:k?k.value.includes(m||""):void 0,[L,A]=On({value:E,defaultValue:v,finalValue:!1,onChange:x});return b.jsx(I6,{value:{checked:L},children:b.jsx(fs,{ref:e,mod:[{"with-border":f,checked:L},d],...S("card"),...w,role:"checkbox","aria-checked":L,onClick:M=>{g==null||g(M),k==null||k.onChange(m||""),A(!L)}})})});Bv.displayName="@mantine/core/CheckboxCard";Bv.classes=v_;function x_({children:t,role:e}){const r=Pu();return r?b.jsx("div",{role:e,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:t}):b.jsx(b.Fragment,{children:t})}const H6={},Nv=Ct((t,e)=>{const{value:r,defaultValue:n,onChange:i,size:o,wrapperProps:a,children:l,readOnly:u,...h}=ct("CheckboxGroup",H6,t),[d,f]=On({value:r,defaultValue:n,finalValue:[],onChange:i}),m=g=>{const v=typeof g=="string"?g:g.currentTarget.value;!u&&f(d.includes(v)?d.filter(x=>x!==v):[...d,v])};return b.jsx(D6,{value:{value:d,onChange:m,size:o},children:b.jsx(Xe.Wrapper,{size:o,ref:e,...a,...h,labelElement:"div",__staticSelector:"CheckboxGroup",children:b.jsx(x_,{role:"group",children:l})})})});Nv.classes=Xe.Wrapper.classes;Nv.displayName="@mantine/core/CheckboxGroup";function Ov({size:t,style:e,...r}){const n=t!==void 0?{width:it(t),height:it(t),...e}:e;return b.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:b.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function b_({indeterminate:t,...e}){return t?b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:b.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):b.jsx(Ov,{...e})}var w_={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const q6={icon:b_},V6=(t,{radius:e,color:r,size:n,iconColor:i,variant:o,autoContrast:a})=>{const l=ds({color:r||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":te(n,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:rr(e),"--checkbox-color":o==="outline"?u:gr(r,t),"--checkbox-icon-color":i?gr(i,t):XS(a,t)?U0({color:r,theme:t,autoContrast:a}):void 0}}},Fv=Ct((t,e)=>{const r=ct("CheckboxIndicator",q6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,icon:h,indeterminate:d,radius:f,color:m,iconColor:g,autoContrast:v,checked:x,mod:w,variant:S,disabled:k,...E}=r,L=h,A=Yt({name:"CheckboxIndicator",classes:w_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:V6,rootSelector:"indicator"}),M=j6(),B=typeof x=="boolean"||typeof d=="boolean"?x||d:(M==null?void 0:M.checked)||!1;return b.jsx(st,{ref:e,...A("indicator",{variant:S}),variant:S,mod:[{checked:B,disabled:k},w],...E,children:b.jsx(L,{indeterminate:d,...A("icon")})})});Fv.displayName="@mantine/core/CheckboxIndicator";Fv.classes=w_;var C_={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const U6={labelPosition:"right",icon:b_},Y6=(t,{radius:e,color:r,size:n,iconColor:i,variant:o,autoContrast:a})=>{const l=ds({color:r||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":te(n,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:rr(e),"--checkbox-color":o==="outline"?u:gr(r,t),"--checkbox-icon-color":i?gr(i,t):XS(a,t)?U0({color:r,theme:t,autoContrast:a}):void 0}}},ra=Ct((t,e)=>{const r=ct("Checkbox",U6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,color:h,label:d,id:f,size:m,radius:g,wrapperProps:v,checked:x,labelPosition:w,description:S,error:k,disabled:E,variant:L,indeterminate:A,icon:M,rootRef:B,iconColor:D,onChange:q,autoContrast:U,mod:H,...K}=r,V=y_(),W=m||(V==null?void 0:V.size),I=M,O=Yt({name:"Checkbox",props:r,classes:C_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:Y6}),{styleProps:F,rest:P}=ua(K),z=Yi(f),X=V?{checked:V.value.includes(P.value),onChange:ot=>{V.onChange(ot),q==null||q(ot)}}:{},N=$.useRef(null),Z=e||N;return $.useEffect(()=>{Z&&"current"in Z&&Z.current&&(Z.current.indeterminate=A||!1)},[A,Z]),b.jsx(Pv,{...O("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:z,size:W,labelPosition:w,label:d,description:S,error:k,disabled:E,classNames:n,styles:a,unstyled:l,"data-checked":X.checked||x||void 0,variant:L,ref:B,mod:H,...F,...v,children:b.jsxs(st,{...O("inner"),mod:{"data-label-position":w},children:[b.jsx(st,{component:"input",id:z,ref:Z,checked:x,disabled:E,mod:{error:!!k,indeterminate:A},...O("input",{focusable:!0,variant:L}),onChange:q,...P,...X,type:"checkbox"}),b.jsx(I,{indeterminate:A,...O("icon")})]})})});ra.classes={...C_,...m_};ra.displayName="@mantine/core/Checkbox";ra.Group=Nv;ra.Indicator=Fv;ra.Card=Bv;function fu(t){return"group"in t}function S_({options:t,search:e,limit:r}){const n=e.trim().toLowerCase(),i=[];for(let o=0;o<t.length;o+=1){const a=t[o];if(i.length===r)return i;fu(a)&&i.push({group:a.group,items:S_({options:a.items,search:e,limit:r-i.length})}),fu(a)||a.label.toLowerCase().includes(n)&&i.push(a)}return i}function G6(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function k_(t,e=new Set){if(Array.isArray(t))for(const r of t)if(fu(r))k_(r.items,e);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(e.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);e.add(r.value)}}function X6(t,e){return Array.isArray(t)?t.includes(e):t===e}function __({data:t,withCheckIcon:e,value:r,checkIconPosition:n,unstyled:i,renderOption:o}){if(!fu(t)){const l=X6(r,t.value),u=e&&l&&b.jsx(Ov,{className:_n.optionsDropdownCheckIcon}),h=b.jsxs(b.Fragment,{children:[n==="left"&&u,b.jsx("span",{children:t.label}),n==="right"&&u]});return b.jsx(Te.Option,{value:t.value,disabled:t.disabled,className:yr({[_n.optionsDropdownOption]:!i}),"data-reverse":n==="right"||void 0,"data-checked":l||void 0,"aria-selected":l,active:l,children:typeof o=="function"?o({option:t,checked:l}):h})}const a=t.items.map(l=>b.jsx(__,{data:l,value:r,unstyled:i,withCheckIcon:e,checkIconPosition:n,renderOption:o},l.value));return b.jsx(Te.Group,{label:t.group,children:a})}function K6({data:t,hidden:e,hiddenWhenEmpty:r,filter:n,search:i,limit:o,maxDropdownHeight:a,withScrollArea:l=!0,filterOptions:u=!0,withCheckIcon:h=!1,value:d,checkIconPosition:f,nothingFoundMessage:m,unstyled:g,labelId:v,renderOption:x,scrollAreaProps:w,"aria-label":S}){k_(t);const E=typeof i=="string"?(n||S_)({options:t,search:u?i:"",limit:o??1/0}):t,L=G6(E),A=E.map(M=>b.jsx(__,{data:M,withCheckIcon:h,value:d,checkIconPosition:f,unstyled:g,renderOption:x},fu(M)?M.group:M.value));return b.jsx(Te.Dropdown,{hidden:e||r&&L,"data-composed":!0,children:b.jsxs(Te.Options,{labelledBy:v,"aria-label":S,children:[l?b.jsx(Si.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...w,children:A}):A,L&&m&&b.jsx(Te.Empty,{children:m})]})})}var T_={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const Q6={},Z6=(t,{radius:e,color:r,gradient:n,variant:i,size:o,autoContrast:a})=>{const l=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled",autoContrast:a});return{root:{"--badge-height":te(o,"badge-height"),"--badge-padding-x":te(o,"badge-padding-x"),"--badge-fz":te(o,"badge-fz"),"--badge-radius":e===void 0?void 0:rr(e),"--badge-bg":r||i?l.background:void 0,"--badge-color":r||i?l.color:void 0,"--badge-bd":r||i?l.border:void 0,"--badge-dot-color":i==="dot"?gr(r,t):void 0}}},as=ln((t,e)=>{const r=ct("Badge",Q6,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,radius:h,color:d,gradient:f,leftSection:m,rightSection:g,children:v,variant:x,fullWidth:w,autoContrast:S,circle:k,mod:E,...L}=r,A=Yt({name:"Badge",props:r,classes:T_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:Z6});return b.jsxs(st,{variant:x,mod:[{block:w,circle:k,"with-right-section":!!g,"with-left-section":!!m},E],...A("root",{variant:x}),ref:e,...L,children:[m&&b.jsx("span",{...A("section"),"data-position":"left",children:m}),b.jsx("span",{...A("label"),children:v}),g&&b.jsx("span",{...A("section"),"data-position":"right",children:g})]})});as.classes=T_;as.displayName="@mantine/core/Badge";var Il={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const k2={orientation:"horizontal"},J6=(t,{borderWidth:e})=>({group:{"--button-border-width":it(e)}}),Dv=Ct((t,e)=>{const r=ct("ButtonGroup",k2,t),{className:n,style:i,classNames:o,styles:a,unstyled:l,orientation:u,vars:h,borderWidth:d,variant:f,mod:m,...g}=ct("ButtonGroup",k2,t),v=Yt({name:"ButtonGroup",props:r,classes:Il,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:h,varsResolver:J6,rootSelector:"group"});return b.jsx(st,{...v("group"),ref:e,variant:f,mod:[{"data-orientation":u},m],role:"group",...g})});Dv.classes=Il;Dv.displayName="@mantine/core/ButtonGroup";const _2={},tF=(t,{radius:e,color:r,gradient:n,variant:i,autoContrast:o,size:a})=>{const l=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled",autoContrast:o});return{groupSection:{"--section-height":te(a,"section-height"),"--section-padding-x":te(a,"section-padding-x"),"--section-fz":a!=null&&a.includes("compact")?Ar(a.replace("compact-","")):Ar(a),"--section-radius":e===void 0?void 0:rr(e),"--section-bg":r||i?l.background:void 0,"--section-color":l.color,"--section-bd":r||i?l.border:void 0}}},Iv=Ct((t,e)=>{const r=ct("ButtonGroupSection",_2,t),{className:n,style:i,classNames:o,styles:a,unstyled:l,vars:u,variant:h,gradient:d,radius:f,autoContrast:m,...g}=ct("ButtonGroupSection",_2,t),v=Yt({name:"ButtonGroupSection",props:r,classes:Il,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:u,varsResolver:tF,rootSelector:"groupSection"});return b.jsx(st,{...v("groupSection"),ref:e,variant:h,...g})});Iv.classes=Il;Iv.displayName="@mantine/core/ButtonGroupSection";const eF={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${it(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},rF={},nF=(t,{radius:e,color:r,gradient:n,variant:i,size:o,justify:a,autoContrast:l})=>{const u=t.variantColorResolver({color:r||t.primaryColor,theme:t,gradient:n,variant:i||"filled",autoContrast:l});return{root:{"--button-justify":a,"--button-height":te(o,"button-height"),"--button-padding-x":te(o,"button-padding-x"),"--button-fz":o!=null&&o.includes("compact")?Ar(o.replace("compact-","")):Ar(o),"--button-radius":e===void 0?void 0:rr(e),"--button-bg":r||i?u.background:void 0,"--button-hover":r||i?u.hover:void 0,"--button-color":u.color,"--button-bd":r||i?u.border:void 0,"--button-hover-color":r||i?u.hoverColor:void 0}}},_e=ln((t,e)=>{const r=ct("Button",rF,t),{style:n,vars:i,className:o,color:a,disabled:l,children:u,leftSection:h,rightSection:d,fullWidth:f,variant:m,radius:g,loading:v,loaderProps:x,gradient:w,classNames:S,styles:k,unstyled:E,"data-disabled":L,autoContrast:A,mod:M,...B}=r,D=Yt({name:"Button",props:r,classes:Il,className:o,style:n,classNames:S,styles:k,unstyled:E,vars:i,varsResolver:nF}),q=!!h,U=!!d;return b.jsxs(fs,{ref:e,...D("root",{active:!l&&!v&&!L}),unstyled:E,variant:m,disabled:l||v,mod:[{disabled:l||L,loading:v,block:f,"with-left-section":q,"with-right-section":U},M],...B,children:[b.jsx(ps,{mounted:!!v,transition:eF,duration:150,children:H=>b.jsx(st,{component:"span",...D("loader",{style:H}),"aria-hidden":!0,children:b.jsx(Pn,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...x})})}),b.jsxs("span",{...D("inner"),children:[h&&b.jsx(st,{component:"span",...D("section"),mod:{position:"left"},children:h}),b.jsx(st,{component:"span",mod:{loading:v},...D("label"),children:u}),d&&b.jsx(st,{component:"span",...D("section"),mod:{position:"right"},children:d})]})]})});_e.classes=Il;_e.displayName="@mantine/core/Button";_e.Group=Dv;_e.GroupSection=Iv;var E_={root:"m_4451eb3a"};const iF={},cl=ln((t,e)=>{const r=ct("Center",iF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,inline:h,mod:d,...f}=r,m=Yt({name:"Center",props:r,classes:E_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u});return b.jsx(st,{ref:e,mod:[{inline:h},d],...m("root"),...f})});cl.classes=E_;cl.displayName="@mantine/core/Center";const[oF,sF]=$u(),aF={};function $_(t){const{value:e,defaultValue:r,onChange:n,multiple:i,children:o}=ct("ChipGroup",aF,t),[a,l]=On({value:e,defaultValue:r,finalValue:i?[]:null,onChange:n}),u=d=>Array.isArray(a)?a.includes(d):d===a,h=d=>{const f=d.currentTarget.value;Array.isArray(a)?l(a.includes(f)?a.filter(m=>m!==f):[...a,f]):l(f)};return b.jsx(oF,{value:{isChipSelected:u,onChange:h,multiple:i},children:o})}$_.displayName="@mantine/core/ChipGroup";var L_={root:"m_f59ffda3",label:"m_be049a53","label--outline":"m_3904c1af","label--filled":"m_fa109255","label--light":"m_f7e165c3",iconWrapper:"m_9ac86df9",checkIcon:"m_d6d72580",input:"m_bde07329"};const lF={type:"checkbox"},cF=(t,{size:e,radius:r,variant:n,color:i,autoContrast:o})=>{const a=t.variantColorResolver({color:i||t.primaryColor,theme:t,variant:n||"filled",autoContrast:o});return{root:{"--chip-fz":Ar(e),"--chip-size":te(e,"chip-size"),"--chip-radius":r===void 0?void 0:rr(r),"--chip-checked-padding":te(e,"chip-checked-padding"),"--chip-padding":te(e,"chip-padding"),"--chip-icon-size":te(e,"chip-icon-size"),"--chip-bg":i||n?a.background:void 0,"--chip-hover":i||n?a.hover:void 0,"--chip-color":i||n?a.color:void 0,"--chip-bd":i||n?a.border:void 0,"--chip-spacing":te(e,"chip-spacing")}}},ip=Ct((t,e)=>{const r=ct("Chip",lF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,id:h,checked:d,defaultChecked:f,onChange:m,value:g,wrapperProps:v,type:x,disabled:w,children:S,size:k,variant:E,icon:L,rootRef:A,autoContrast:M,mod:B,...D}=r,q=Yt({name:"Chip",classes:L_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:cF}),U=sF(),H=Yi(h),{styleProps:K,rest:V}=ua(D),[W,I]=On({value:d,defaultValue:f,finalValue:!1,onChange:m}),O=U?{checked:U.isChipSelected(g),onChange:P=>{U.onChange(P),m==null||m(P.currentTarget.checked)},type:U.multiple?"checkbox":"radio"}:{},F=O.checked||W;return b.jsxs(st,{size:k,variant:E,ref:A,mod:B,...q("root"),...K,...v,children:[b.jsx("input",{type:x,...q("input"),checked:F,onChange:P=>I(P.currentTarget.checked),id:H,disabled:w,ref:e,value:g,...O,...V}),b.jsxs("label",{htmlFor:H,"data-checked":F||void 0,"data-disabled":w||void 0,...q("label",{variant:E||"filled"}),children:[F&&b.jsx("span",{...q("iconWrapper"),children:L||b.jsx(Ov,{...q("checkIcon")})}),b.jsx("span",{children:S})]})]})});ip.classes=L_;ip.displayName="@mantine/core/Chip";ip.Group=$_;var M_={root:"m_7485cace"};const uF={},hF=(t,{size:e,fluid:r})=>({root:{"--container-size":r?void 0:te(e,"container-size")}}),op=Ct((t,e)=>{const r=ct("Container",uF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,fluid:h,mod:d,...f}=r,m=Yt({name:"Container",classes:M_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:hF});return b.jsx(st,{ref:e,mod:[{fluid:h},d],...m("root"),...f})});op.classes=M_;op.displayName="@mantine/core/Container";const dF={timeout:1e3};function A_(t){const{children:e,timeout:r,value:n,...i}=ct("CopyButton",dF,t),o=xP({timeout:r}),a=()=>o.copy(n);return b.jsx(b.Fragment,{children:e({copy:a,copied:o.copied,...i})})}A_.displayName="@mantine/core/CopyButton";var R_={root:"m_3eebeb36",label:"m_9e365f20"};const fF={orientation:"horizontal"},pF=(t,{color:e,variant:r,size:n})=>({root:{"--divider-color":e?gr(e,t):void 0,"--divider-border-style":r,"--divider-size":te(n,"divider-size")}}),Hs=Ct((t,e)=>{const r=ct("Divider",fF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,color:h,orientation:d,label:f,labelPosition:m,mod:g,...v}=r,x=Yt({name:"Divider",classes:R_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:pF});return b.jsx(st,{ref:e,mod:[{orientation:d,"with-label":!!f},g],...x("root"),...v,role:"separator",children:f&&b.jsx(st,{component:"span",mod:{position:m},...x("label"),children:f})})});Hs.classes=R_;Hs.displayName="@mantine/core/Divider";function P_({open:t,close:e,openDelay:r,closeDelay:n}){const i=$.useRef(-1),o=$.useRef(-1),a=()=>{window.clearTimeout(i.current),window.clearTimeout(o.current)},l=()=>{a(),r===0||r===void 0?t():i.current=window.setTimeout(t,r)},u=()=>{a(),n===0||n===void 0?e():o.current=window.setTimeout(e,n)};return $.useEffect(()=>a,[]),{openDropdown:l,closeDropdown:u}}const[mF,B_]=Ui("HoverCard component was not found in the tree"),gF={};function N_(t){const{children:e,onMouseEnter:r,onMouseLeave:n,...i}=ct("HoverCardDropdown",gF,t),o=B_(),a=Cn(r,o.openDropdown),l=Cn(n,o.closeDropdown);return b.jsx(Tn.Dropdown,{onMouseEnter:a,onMouseLeave:l,...i,children:e})}N_.displayName="@mantine/core/HoverCardDropdown";const yF={refProp:"ref"},O_=$.forwardRef((t,e)=>{const{children:r,refProp:n,eventPropsWrapperName:i,...o}=ct("HoverCardTarget",yF,t);if(!_o(r))throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=B_(),l=Cn(r.props.onMouseEnter,a.openDropdown),u=Cn(r.props.onMouseLeave,a.closeDropdown),h={onMouseEnter:l,onMouseLeave:u};return b.jsx(Tn.Target,{refProp:n,ref:e,...o,children:$.cloneElement(r,i?{[i]:h}:h)})});O_.displayName="@mantine/core/HoverCardTarget";const vF={openDelay:0,closeDelay:150,initiallyOpened:!1};function Qs(t){const{children:e,onOpen:r,onClose:n,openDelay:i,closeDelay:o,initiallyOpened:a,...l}=ct("HoverCard",vF,t),[u,{open:h,close:d}]=uo(a,{onClose:n,onOpen:r}),{openDropdown:f,closeDropdown:m}=P_({open:h,close:d,openDelay:i,closeDelay:o});return b.jsx(mF,{value:{openDropdown:f,closeDropdown:m},children:b.jsx(Tn,{...l,opened:u,__staticSelector:"HoverCard",children:e})})}Qs.displayName="@mantine/core/HoverCard";Qs.Target=O_;Qs.Dropdown=N_;Qs.extend=t=>t;var F_={root:"m_9e117634"};const xF={},bF=(t,{radius:e,fit:r})=>({root:{"--image-radius":e===void 0?void 0:rr(e),"--image-object-fit":r}}),jv=ln((t,e)=>{const r=ct("Image",xF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,onError:h,src:d,radius:f,fit:m,fallbackSrc:g,mod:v,...x}=r,[w,S]=$.useState(!d);$.useEffect(()=>S(!d),[d]);const k=Yt({name:"Image",classes:F_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:bF});return w&&g?b.jsx(st,{component:"img",ref:e,src:g,...k("root"),onError:h,mod:["fallback",v],...x}):b.jsx(st,{component:"img",ref:e,...k("root"),src:d,onError:E=>{h==null||h(E),S(!0)},mod:v,...x})});jv.classes=F_;jv.displayName="@mantine/core/Image";function Qd(){return Qd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qd.apply(null,arguments)}function zv(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var wF=$.useLayoutEffect,CF=function(e){var r=kr.useRef(e);return wF(function(){r.current=e}),r},T2=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},SF=function(e,r){var n=kr.useRef();return kr.useCallback(function(i){e.current=i,n.current&&T2(n.current,null),n.current=r,r&&T2(r,i)},[r])},E2={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},kF=function(e){Object.keys(E2).forEach(function(r){e.style.setProperty(r,E2[r],"important")})},$2=kF,Zr=null,L2=function(e,r){var n=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function _F(t,e,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Zr||(Zr=document.createElement("textarea"),Zr.setAttribute("tabindex","-1"),Zr.setAttribute("aria-hidden","true"),$2(Zr)),Zr.parentNode===null&&document.body.appendChild(Zr);var i=t.paddingSize,o=t.borderSize,a=t.sizingStyle,l=a.boxSizing;Object.keys(a).forEach(function(m){var g=m;Zr.style[g]=a[g]}),$2(Zr),Zr.value=e;var u=L2(Zr,t);Zr.value=e,u=L2(Zr,t),Zr.value="x";var h=Zr.scrollHeight-i,d=h*r;l==="border-box"&&(d=d+i+o),u=Math.max(d,u);var f=h*n;return l==="border-box"&&(f=f+i+o),u=Math.min(f,u),[u,h]}var M2=function(){},TF=function(e,r){return e.reduce(function(n,i){return n[i]=r[i],n},{})},EF=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],$F=!!document.documentElement.currentStyle,LF=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var n=TF(EF,r),i=n.boxSizing;if(i==="")return null;$F&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var o=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:o,borderSize:a}},MF=LF;function Wv(t,e,r){var n=CF(r);$.useLayoutEffect(function(){var i=function(a){return n.current(a)};if(t)return t.addEventListener(e,i),function(){return t.removeEventListener(e,i)}},[])}var AF=function(e,r){Wv(document.body,"reset",function(n){e.current.form===n.target&&r(n)})},RF=function(e){Wv(window,"resize",e)},PF=function(e){Wv(document.fonts,"loadingdone",e)},BF=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],NF=function(e,r){var n=e.cacheMeasurements,i=e.maxRows,o=e.minRows,a=e.onChange,l=a===void 0?M2:a,u=e.onHeightChange,h=u===void 0?M2:u,d=zv(e,BF),f=d.value!==void 0,m=$.useRef(null),g=SF(m,r),v=$.useRef(0),x=$.useRef(),w=function(){var E=m.current,L=n&&x.current?x.current:MF(E);if(L){x.current=L;var A=_F(L,E.value||E.placeholder||"x",o,i),M=A[0],B=A[1];v.current!==M&&(v.current=M,E.style.setProperty("height",M+"px","important"),h(M,{rowHeight:B}))}},S=function(E){f||w(),l(E)};return $.useLayoutEffect(w),AF(m,function(){if(!f){var k=m.current.value;requestAnimationFrame(function(){var E=m.current;E&&k!==E.value&&w()})}}),RF(w),PF(w),$.createElement("textarea",Qd({},d,{onChange:S,ref:g}))},OF=$.forwardRef(NF);const FF={},Hv=Ct((t,e)=>{const{autosize:r,maxRows:n,minRows:i,__staticSelector:o,resize:a,...l}=ct("Textarea",FF,t),u=r&&VP()!=="test",h=u?{maxRows:n,minRows:i}:{};return b.jsx($o,{component:u?OF:"textarea",ref:e,...l,__staticSelector:o||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...h})});Hv.classes=$o.classes;Hv.displayName="@mantine/core/Textarea";var D_={root:"m_dc6f14e2"};const DF={},IF=(t,{size:e})=>({root:{"--kbd-fz":te(e,"kbd-fz"),"--kbd-padding":te(e,"kbd-padding")}}),nl=Ct((t,e)=>{const r=ct("Kbd",DF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,...h}=r,d=Yt({name:"Kbd",classes:D_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:IF});return b.jsx(st,{component:"kbd",ref:e,...d("root"),...h})});nl.classes=D_;nl.displayName="@mantine/core/Kbd";const[jF,Fu]=Ui("Menu component was not found in the tree");var jl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};const zF={},qv=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,...l}=ct("MenuDivider",zF,t),u=Fu();return b.jsx(st,{ref:e,...u.getStyles("divider",{className:n,style:i,styles:o,classNames:r}),...l})});qv.classes=jl;qv.displayName="@mantine/core/MenuDivider";const WF={},Vv=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,onMouseEnter:l,onMouseLeave:u,onKeyDown:h,children:d,...f}=ct("MenuDropdown",WF,t),m=$.useRef(null),g=Fu(),v=Cn(h,S=>{var k,E;(S.key==="ArrowUp"||S.key==="ArrowDown")&&(S.preventDefault(),(E=(k=m.current)==null?void 0:k.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||E.focus())}),x=Cn(l,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.openDropdown()),w=Cn(u,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.closeDropdown());return b.jsxs(Tn.Dropdown,{...f,onMouseEnter:x,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:Vr(e,m),...g.getStyles("dropdown",{className:n,style:i,styles:o,classNames:r,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:[g.withInitialFocusPlaceholder&&b.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});Vv.classes=jl;Vv.displayName="@mantine/core/MenuDropdown";const HF={},Uv=ln((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,color:l,closeMenuOnClick:u,leftSection:h,rightSection:d,children:f,disabled:m,"data-disabled":g,...v}=ct("MenuItem",HF,t),x=Fu(),w=an(),{dir:S}=Mu(),k=$.useRef(null),E=x.getItemIndex(k.current),L=v,A=Cn(L.onMouseLeave,()=>x.setHovered(-1)),M=Cn(L.onMouseEnter,()=>x.setHovered(x.getItemIndex(k.current))),B=Cn(L.onClick,()=>{g||(typeof u=="boolean"?u&&x.closeDropdownImmediately():x.closeOnItemClick&&x.closeDropdownImmediately())}),D=Cn(L.onFocus,()=>x.setHovered(x.getItemIndex(k.current))),q=l?w.variantColorResolver({color:l,theme:w,variant:"light"}):void 0,U=l?ds({color:l,theme:w}):null;return b.jsxs(fs,{...v,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,onFocus:D,...x.getStyles("item",{className:n,style:i,styles:o,classNames:r}),ref:Vr(k,e),role:"menuitem",disabled:m,"data-menu-item":!0,"data-disabled":m||g||void 0,"data-hovered":x.hovered===E?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:M,onMouseLeave:A,onClick:B,onKeyDown:fP({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:S,orientation:"vertical",onKeyDown:L.onKeyDown}),__vars:{"--menu-item-color":U!=null&&U.isThemeColor&&(U==null?void 0:U.shade)===void 0?`var(--mantine-color-${U.color}-6)`:q==null?void 0:q.color,"--menu-item-hover":q==null?void 0:q.hover},children:[h&&b.jsx("div",{...x.getStyles("itemSection",{styles:o,classNames:r}),"data-position":"left",children:h}),f&&b.jsx("div",{...x.getStyles("itemLabel",{styles:o,classNames:r}),children:f}),d&&b.jsx("div",{...x.getStyles("itemSection",{styles:o,classNames:r}),"data-position":"right",children:d})]})});Uv.classes=jl;Uv.displayName="@mantine/core/MenuItem";const qF={},Yv=Ct((t,e)=>{const{classNames:r,className:n,style:i,styles:o,vars:a,...l}=ct("MenuLabel",qF,t),u=Fu();return b.jsx(st,{ref:e,...u.getStyles("label",{className:n,style:i,styles:o,classNames:r}),...l})});Yv.classes=jl;Yv.displayName="@mantine/core/MenuLabel";const VF={refProp:"ref"},I_=$.forwardRef((t,e)=>{const{children:r,refProp:n,...i}=ct("MenuTarget",VF,t);if(!_o(r))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=Fu(),a=r.props,l=Cn(a.onClick,()=>{o.trigger==="click"?o.toggleDropdown():o.trigger==="click-hover"&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),u=Cn(a.onMouseEnter,()=>(o.trigger==="hover"||o.trigger==="click-hover")&&o.openDropdown()),h=Cn(a.onMouseLeave,()=>{(o.trigger==="hover"||o.trigger==="click-hover"&&!o.openedViaClick)&&o.closeDropdown()});return b.jsx(Tn.Target,{refProp:n,popupType:"menu",ref:e,...i,children:$.cloneElement(r,{onClick:l,onMouseEnter:u,onMouseLeave:h,"data-expanded":o.opened?!0:void 0})})});I_.displayName="@mantine/core/MenuTarget";const UF={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function je(t){const e=ct("Menu",UF,t),{children:r,onOpen:n,onClose:i,opened:o,defaultOpened:a,trapFocus:l,onChange:u,closeOnItemClick:h,loop:d,closeOnEscape:f,trigger:m,openDelay:g,closeDelay:v,classNames:x,styles:w,unstyled:S,variant:k,vars:E,menuItemTabIndex:L,keepMounted:A,withInitialFocusPlaceholder:M,...B}=e,D=Yt({name:"Menu",classes:jl,props:e,classNames:x,styles:w,unstyled:S}),[q,{setHovered:U,resetHovered:H}]=vP(),[K,V]=On({value:o,defaultValue:a,finalValue:!1,onChange:u}),[W,I]=$.useState(!1),O=()=>{V(!1),I(!1),K&&(i==null||i())},F=()=>{V(!0),!K&&(n==null||n())},P=()=>{K?O():F()},{openDropdown:z,closeDropdown:X}=P_({open:F,close:O,closeDelay:v,openDelay:g}),N=yt=>yP("[data-menu-item]","[data-menu-dropdown]",yt),{resolvedClassNames:Z,resolvedStyles:ot}=Lu({classNames:x,styles:w,props:e});return Hi(()=>{H()},[K]),b.jsx(jF,{value:{getStyles:D,opened:K,toggleDropdown:P,getItemIndex:N,hovered:q,setHovered:U,openedViaClick:W,setOpenedViaClick:I,closeOnItemClick:h,closeDropdown:m==="click"?O:X,openDropdown:m==="click"?F:z,closeDropdownImmediately:O,loop:d,trigger:m,unstyled:S,menuItemTabIndex:L,withInitialFocusPlaceholder:M},children:b.jsx(Tn,{...B,opened:K,onChange:P,defaultOpened:a,trapFocus:A?!1:l,closeOnEscape:f,__staticSelector:"Menu",classNames:Z,styles:ot,unstyled:S,variant:k,keepMounted:A,children:r})})}je.extend=t=>t;je.withProps=r4(je);je.classes=jl;je.displayName="@mantine/core/Menu";je.Item=Uv;je.Label=Yv;je.Dropdown=Vv;je.Target=I_;je.Divider=qv;const[YF,zl]=Ui("Modal component was not found in tree");var Lo={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const GF={},sp=Ct((t,e)=>{const r=ct("ModalBody",GF,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=zl();return b.jsx(Qk,{ref:e,...h.getStyles("body",{classNames:n,style:o,styles:a,className:i}),...u})});sp.classes=Lo;sp.displayName="@mantine/core/ModalBody";const XF={},ap=Ct((t,e)=>{const r=ct("ModalCloseButton",XF,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=zl();return b.jsx(Zk,{ref:e,...h.getStyles("close",{classNames:n,style:o,styles:a,className:i}),...u})});ap.classes=Lo;ap.displayName="@mantine/core/ModalCloseButton";const KF={},lp=Ct((t,e)=>{const r=ct("ModalContent",KF,t),{classNames:n,className:i,style:o,styles:a,vars:l,children:u,__hidden:h,...d}=r,f=zl(),m=f.scrollAreaComponent||NO;return b.jsx(Jk,{...f.getStyles("content",{className:i,style:o,styles:a,classNames:n}),innerProps:f.getStyles("inner",{className:i,style:o,styles:a,classNames:n}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":h||void 0,ref:e,...d,children:b.jsx(m,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${it(f.yOffset)} * 2))`},children:u})})});lp.classes=Lo;lp.displayName="@mantine/core/ModalContent";const QF={},cp=Ct((t,e)=>{const r=ct("ModalHeader",QF,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=zl();return b.jsx(t_,{ref:e,...h.getStyles("header",{classNames:n,style:o,styles:a,className:i}),...u})});cp.classes=Lo;cp.displayName="@mantine/core/ModalHeader";const ZF={},up=Ct((t,e)=>{const r=ct("ModalOverlay",ZF,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=zl();return b.jsx(e_,{ref:e,...h.getStyles("overlay",{classNames:n,style:o,styles:a,className:i}),...u})});up.classes=Lo;up.displayName="@mantine/core/ModalOverlay";const JF={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ki("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},tD=(t,{radius:e,size:r,yOffset:n,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:rr(e),"--modal-size":te(r,"modal-size"),"--modal-y-offset":it(n),"--modal-x-offset":it(i)}}),hp=Ct((t,e)=>{const r=ct("ModalRoot",JF,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,yOffset:h,scrollAreaComponent:d,radius:f,fullScreen:m,centered:g,xOffset:v,__staticSelector:x,...w}=r,S=Yt({name:x,classes:Lo,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:tD});return b.jsx(YF,{value:{yOffset:h,scrollAreaComponent:d,getStyles:S,fullScreen:m},children:b.jsx(Kk,{ref:e,...S("root"),"data-full-screen":m||void 0,"data-centered":g||void 0,"data-offset-scrollbars":d===Si.Autosize||void 0,unstyled:l,...w})})});hp.classes=Lo;hp.displayName="@mantine/core/ModalRoot";const[eD,rD]=$u();function j_({children:t}){const[e,r]=$.useState([]),[n,i]=$.useState(ki("modal"));return b.jsx(eD,{value:{stack:e,addModal:(o,a)=>{r(l=>[...new Set([...l,o])]),i(l=>typeof a=="number"&&typeof l=="number"?Math.max(l,a):l)},removeModal:o=>r(a=>a.filter(l=>l!==o)),getZIndex:o=>`calc(${n} + ${e.indexOf(o)} + 1)`,currentId:e[e.length-1],maxZIndex:n},children:t})}j_.displayName="@mantine/core/ModalStack";const nD={},dp=Ct((t,e)=>{const r=ct("ModalTitle",nD,t),{classNames:n,className:i,style:o,styles:a,vars:l,...u}=r,h=zl();return b.jsx(r_,{ref:e,...h.getStyles("title",{classNames:n,style:o,styles:a,className:i}),...u})});dp.classes=Lo;dp.displayName="@mantine/core/ModalTitle";const iD={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ki("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Mr=Ct((t,e)=>{const{title:r,withOverlay:n,overlayProps:i,withCloseButton:o,closeButtonProps:a,children:l,radius:u,opened:h,stackId:d,zIndex:f,...m}=ct("Modal",iD,t),g=rD(),v=!!r||o,x=g&&d?{closeOnEscape:g.currentId===d,trapFocus:g.currentId===d,zIndex:g.getZIndex(d)}:{},w=n===!1?!1:d&&g?g.currentId===d:h;return $.useEffect(()=>{g&&d&&(h?g.addModal(d,f||ki("modal")):g.removeModal(d))},[h,d,f]),b.jsxs(hp,{ref:e,radius:u,opened:h,zIndex:g&&d?g.getZIndex(d):f,...m,...x,children:[n&&b.jsx(up,{visible:w,transitionProps:g&&d?{duration:0}:void 0,...i}),b.jsxs(lp,{radius:u,__hidden:g&&d&&h?d!==g.currentId:!1,children:[v&&b.jsxs(cp,{children:[r&&b.jsx(dp,{children:r}),o&&b.jsx(ap,{...a})]}),b.jsx(sp,{children:l})]})]})});Mr.classes=Lo;Mr.displayName="@mantine/core/Modal";Mr.Root=hp;Mr.Overlay=up;Mr.Content=lp;Mr.Body=sp;Mr.Header=cp;Mr.Title=dp;Mr.CloseButton=ap;Mr.Stack=j_;var z_={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};const oD={},sD=(t,{variant:e,color:r,childrenOffset:n,autoContrast:i})=>{const o=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:e||"light",autoContrast:i});return{root:{"--nl-bg":r||e?o.background:void 0,"--nl-hover":r||e?o.hover:void 0,"--nl-color":r||e?o.color:void 0},children:{"--nl-offset":zr(n)}}},Di=ln((t,e)=>{const r=ct("NavLink",oD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,opened:h,defaultOpened:d,onChange:f,children:m,onClick:g,active:v,disabled:x,leftSection:w,rightSection:S,label:k,description:E,disableRightSectionRotation:L,noWrap:A,childrenOffset:M,onKeyDown:B,autoContrast:D,mod:q,...U}=r,H=Yt({name:"NavLink",props:r,classes:z_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:sD}),[K,V]=On({value:h,defaultValue:d,finalValue:!1,onChange:f}),W=!!m,I=O=>{g==null||g(O),W&&(O.preventDefault(),V(!K))};return b.jsxs(b.Fragment,{children:[b.jsxs(fs,{...H("root"),component:"a",ref:e,onClick:I,onKeyDown:O=>{B==null||B(O),O.nativeEvent.code==="Space"&&W&&(O.preventDefault(),V(!K))},unstyled:l,mod:[{disabled:x,active:v,expanded:K},q],...U,children:[w&&b.jsx(st,{component:"span",...H("section"),mod:{position:"left"},children:w}),b.jsxs(st,{...H("body"),mod:{"no-wrap":A},children:[b.jsx(st,{component:"span",...H("label"),children:k}),b.jsx(st,{component:"span",mod:{active:v},...H("description"),children:E})]}),(W||S!==void 0)&&b.jsx(st,{...H("section"),component:"span",mod:{rotate:K&&!L,position:"right"},children:W?S!==void 0?S:b.jsx(i_,{...H("chevron")}):S})]}),W&&b.jsx(ek,{in:K,...H("collapse"),children:b.jsx("div",{...H("children"),children:m})})]})});Di.classes=z_;Di.displayName="@mantine/core/NavLink";var W_={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const aD={withCloseButton:!0},lD=(t,{radius:e,color:r})=>({root:{"--notification-radius":e===void 0?void 0:rr(e),"--notification-color":r?gr(r,t):void 0}}),Gv=Ct((t,e)=>{const r=ct("Notification",aD,t),{className:n,color:i,radius:o,loading:a,withCloseButton:l,withBorder:u,title:h,icon:d,children:f,onClose:m,closeButtonProps:g,classNames:v,style:x,styles:w,unstyled:S,variant:k,vars:E,mod:L,loaderProps:A,role:M,...B}=r,D=Yt({name:"Notification",classes:W_,props:r,className:n,style:x,classNames:v,styles:w,unstyled:S,vars:E,varsResolver:lD});return b.jsxs(st,{...D("root"),mod:[{"data-with-icon":!!d||a,"data-with-border":u},L],ref:e,variant:k,role:M||"alert",...B,children:[d&&!a&&b.jsx("div",{...D("icon"),children:d}),a&&b.jsx(Pn,{size:28,color:i,...A,...D("loader")}),b.jsxs("div",{...D("body"),children:[h&&b.jsx("div",{...D("title"),children:h}),b.jsx(st,{...D("description"),mod:{"data-with-title":!!h},children:f})]}),l&&b.jsx(Ru,{iconSize:16,color:"gray",...g,unstyled:S,onClick:m,...D("closeButton")})]})});Gv.classes=W_;Gv.displayName="@mantine/core/Notification";const cD=({reveal:t})=>b.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:b.jsx("path",{d:t?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var Py={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const uD={visibilityToggleIcon:cD},hD=(t,{size:e})=>({root:{"--psi-icon-size":te(e,"psi-icon-size"),"--psi-button-size":te(e,"psi-button-size")}}),fp=Ct((t,e)=>{const r=ct("PasswordInput",uD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,required:h,error:d,leftSection:f,disabled:m,id:g,variant:v,inputContainer:x,description:w,label:S,size:k,errorProps:E,descriptionProps:L,labelProps:A,withAsterisk:M,inputWrapperOrder:B,wrapperProps:D,radius:q,rightSection:U,rightSectionWidth:H,rightSectionPointerEvents:K,leftSectionWidth:V,visible:W,defaultVisible:I,onVisibilityChange:O,visibilityToggleIcon:F,visibilityToggleButtonProps:P,rightSectionProps:z,leftSectionProps:X,leftSectionPointerEvents:N,withErrorStyles:Z,mod:ot,...yt}=r,dt=Yi(g),[lt,mt]=On({value:W,defaultValue:I,finalValue:!1,onChange:O}),xt=()=>mt(!lt),St=Yt({name:"PasswordInput",classes:Py,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:hD}),{resolvedClassNames:Tt,resolvedStyles:ee}=Lu({classNames:n,styles:a,props:r}),{styleProps:Ee,rest:pe}=ua(yt),Oe=F,Ue=(E==null?void 0:E.id)||`${dt}-error`,xr=(L==null?void 0:L.id)||`${dt}-description`,$e=`${!!d&&typeof d!="boolean"?Ue:""} ${!!w?xr:""}`,le=$e.trim().length>0?$e.trim():void 0,we=b.jsx(Dn,{...St("visibilityToggle"),disabled:m,radius:q,"aria-hidden":!P,tabIndex:-1,...P,variant:(P==null?void 0:P.variant)??"subtle",color:"gray",unstyled:l,onTouchEnd:ze=>{var nr;ze.preventDefault(),(nr=P==null?void 0:P.onTouchEnd)==null||nr.call(P,ze),xt()},onMouseDown:ze=>{var nr;ze.preventDefault(),(nr=P==null?void 0:P.onMouseDown)==null||nr.call(P,ze),xt()},onKeyDown:ze=>{var nr;(nr=P==null?void 0:P.onKeyDown)==null||nr.call(P,ze),ze.key===" "&&(ze.preventDefault(),xt())},children:b.jsx(Oe,{reveal:lt})});return b.jsx(Xe.Wrapper,{required:h,id:dt,label:S,error:d,description:w,size:k,classNames:Tt,styles:ee,__staticSelector:"PasswordInput",unstyled:l,withAsterisk:M,inputWrapperOrder:B,inputContainer:x,variant:v,labelProps:{...A,htmlFor:dt},descriptionProps:{...L,id:xr},errorProps:{...E,id:Ue},mod:ot,...St("root"),...Ee,...D,children:b.jsx(Xe,{component:"div",error:d,leftSection:f,size:k,classNames:{...Tt,input:yr(Py.input,Tt.input)},styles:ee,radius:q,disabled:m,__staticSelector:"PasswordInput",rightSectionWidth:H,rightSection:U??we,variant:v,unstyled:l,leftSectionWidth:V,rightSectionPointerEvents:K||"all",rightSectionProps:z,leftSectionProps:X,leftSectionPointerEvents:N,withAria:!1,withErrorStyles:Z,children:b.jsx("input",{required:h,"data-invalid":!!d||void 0,"data-with-left-section":!!f||void 0,...St("innerInput"),disabled:m,id:dt,ref:e,...pe,"aria-describedby":le,autoComplete:pe.autoComplete||"off",type:lt?"text":"password"})})})});fp.classes={...$o.classes,...Py};fp.displayName="@mantine/core/PasswordInput";const dD={duration:100,transition:"fade"};function fD(t,e){return{...dD,...e,...t}}function pD({offset:t,position:e,defaultOpened:r}){const[n,i]=$.useState(r),o=$.useRef(null),{x:a,y:l,elements:u,refs:h,update:d,placement:f}=sv({placement:e,middleware:[rv({crossAxis:!0,padding:5,rootBoundary:"document"})]}),m=f.includes("right")?t:e.includes("left")?t*-1:0,g=f.includes("bottom")?t:e.includes("top")?t*-1:0,v=$.useCallback(({clientX:x,clientY:w})=>{h.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x,y:w,left:x+m,top:w+g,right:x,bottom:w}}})},[u.reference]);return $.useEffect(()=>{if(h.floating.current){const x=o.current;x.addEventListener("mousemove",v);const w=yo(h.floating.current);return w.forEach(S=>{S.addEventListener("scroll",d)}),()=>{x.removeEventListener("mousemove",v),w.forEach(S=>{S.removeEventListener("scroll",d)})}}},[u.reference,h.floating.current,d,v,n]),{handleMouseMove:v,x:a,y:l,opened:n,setOpened:i,boundaryRef:o,floating:h.setFloating}}var pp={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const mD={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:ki("popover")},gD=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:rr(e),"--tooltip-bg":r?gr(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),Xv=Ct((t,e)=>{const r=ct("TooltipFloating",mD,t),{children:n,refProp:i,withinPortal:o,style:a,className:l,classNames:u,styles:h,unstyled:d,radius:f,color:m,label:g,offset:v,position:x,multiline:w,zIndex:S,disabled:k,defaultOpened:E,variant:L,vars:A,portalProps:M,...B}=r,D=an(),q=Yt({name:"TooltipFloating",props:r,classes:pp,className:l,style:a,classNames:u,styles:h,unstyled:d,rootSelector:"tooltip",vars:A,varsResolver:gD}),{handleMouseMove:U,x:H,y:K,opened:V,boundaryRef:W,floating:I,setOpened:O}=pD({offset:v,position:x,defaultOpened:E});if(!_o(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const F=Vr(W,zf(n),e),P=n.props,z=N=>{var Z;(Z=P.onMouseEnter)==null||Z.call(P,N),U(N),O(!0)},X=N=>{var Z;(Z=P.onMouseLeave)==null||Z.call(P,N),O(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(ha,{...M,withinPortal:o,children:b.jsx(st,{...B,...q("tooltip",{style:{...G0(a,D),zIndex:S,display:!k&&V?"block":"none",top:(K&&Math.round(K))??"",left:(H&&Math.round(H))??""}}),variant:L,ref:I,mod:{multiline:w},children:g})}),$.cloneElement(n,{...P,[i]:F,onMouseEnter:z,onMouseLeave:X})]})});Xv.classes=pp;Xv.displayName="@mantine/core/TooltipFloating";const H_=$.createContext(!1),yD=H_.Provider,vD=()=>$.useContext(H_),xD={openDelay:0,closeDelay:0};function Kv(t){const{openDelay:e,closeDelay:r,children:n}=ct("TooltipGroup",xD,t);return b.jsx(yD,{value:!0,children:b.jsx(MN,{delay:{open:e,close:r},children:n})})}Kv.displayName="@mantine/core/TooltipGroup";Kv.extend=t=>t;function bD(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function wD(t){const e=bD(t.middlewares),r=[mk(t.offset)];return e.shift&&r.push(rv(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&r.push(typeof e.flip=="boolean"?Xd():Xd(e.flip)),r.push(gk({element:t.arrowRef,padding:t.arrowOffset})),e.inline?r.push(typeof e.inline=="boolean"?nu():nu(e.inline)):t.inline&&r.push(nu()),r}function CD(t){var M,B,D;const[e,r]=$.useState(t.defaultOpened),i=typeof t.opened=="boolean"?t.opened:e,o=vD(),a=Yi(),l=$.useCallback(q=>{r(q),q&&k(a)},[a]),{x:u,y:h,context:d,refs:f,update:m,placement:g,middlewareData:{arrow:{x:v,y:x}={}}}=sv({strategy:t.strategy,placement:t.position,open:i,onOpenChange:l,middleware:wD(t)}),{delay:w,currentId:S,setCurrentId:k}=AN(d,{id:a}),{getReferenceProps:E,getFloatingProps:L}=DN([$N(d,{enabled:(M=t.events)==null?void 0:M.hover,delay:o?w:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((B=t.events)!=null&&B.touch)}),FN(d,{enabled:(D=t.events)==null?void 0:D.focus,visibleOnly:!0}),jN(d,{role:"tooltip"}),NN(d,{enabled:typeof t.opened>"u"})]);Wk({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:f,update:m}}),Hi(()=>{var q;(q=t.onPositionChange)==null||q.call(t,g)},[g]);const A=i&&S&&S!==a;return{x:u,y:h,arrowX:v,arrowY:x,reference:f.setReference,floating:f.setFloating,getFloatingProps:L,getReferenceProps:E,isGroupPhase:A,opened:i,placement:g}}const A2={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:ki("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},SD=(t,{radius:e,color:r})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:rr(e),"--tooltip-bg":r?gr(r,t):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),Co=Ct((t,e)=>{const r=ct("Tooltip",A2,t),{children:n,position:i,refProp:o,label:a,openDelay:l,closeDelay:u,onPositionChange:h,opened:d,defaultOpened:f,withinPortal:m,radius:g,color:v,classNames:x,styles:w,unstyled:S,style:k,className:E,withArrow:L,arrowSize:A,arrowOffset:M,arrowRadius:B,arrowPosition:D,offset:q,transitionProps:U,multiline:H,events:K,zIndex:V,disabled:W,positionDependencies:I,onClick:O,onMouseEnter:F,onMouseLeave:P,inline:z,variant:X,keepMounted:N,vars:Z,portalProps:ot,mod:yt,floatingStrategy:dt,middlewares:lt,...mt}=ct("Tooltip",A2,r),{dir:xt}=Mu(),St=$.useRef(null),Tt=CD({position:Nk(xt,i),closeDelay:u,openDelay:l,onPositionChange:h,opened:d,defaultOpened:f,events:K,arrowRef:St,arrowOffset:M,offset:typeof q=="number"?q+(L?A/2:0):q,positionDependencies:[...I,n],inline:z,strategy:dt,middlewares:lt}),ee=Yt({name:"Tooltip",props:r,classes:pp,className:E,style:k,classNames:x,styles:w,unstyled:S,rootSelector:"tooltip",vars:Z,varsResolver:SD});if(!_o(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ee=Vr(Tt.reference,zf(n),e),pe=fD(U,{duration:100,transition:"fade"}),Oe=n.props;return b.jsxs(b.Fragment,{children:[b.jsx(ha,{...ot,withinPortal:m,children:b.jsx(ps,{...pe,keepMounted:N,mounted:!W&&!!Tt.opened,duration:Tt.isGroupPhase?10:pe.duration,children:Ue=>b.jsxs(st,{...mt,"data-fixed":dt==="fixed"||void 0,variant:X,mod:[{multiline:H},yt],...Tt.getFloatingProps({ref:Tt.floating,className:ee("tooltip").className,style:{...ee("tooltip").style,...Ue,zIndex:V,top:Tt.y??0,left:Tt.x??0}}),children:[a,b.jsx(hv,{ref:St,arrowX:Tt.arrowX,arrowY:Tt.arrowY,visible:L,position:Tt.placement,arrowSize:A,arrowOffset:M,arrowRadius:B,arrowPosition:D,...ee("arrow")})]})})}),$.cloneElement(n,Tt.getReferenceProps({onClick:O,onMouseEnter:F,onMouseLeave:P,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,className:yr(E,Oe.className),...Oe,[o]:Ee}))]})});Co.classes=pp;Co.displayName="@mantine/core/Tooltip";Co.Floating=Xv;Co.Group=Kv;function kD({size:t,thickness:e,sum:r,value:n,root:i,offset:o}){const a=(t*.9-e*2)/2,l=Math.PI*a*2/100,u=i||n===void 0?`${(100-r)*l}, ${r*l}`:`${n*l}, ${(100-n)*l}`;return{strokeWidth:Number.isNaN(e)?12:e,cx:t/2||0,cy:t/2||0,r:a||0,transform:i?`scale(1, -1) translate(0, -${t})`:void 0,strokeDasharray:u,strokeDashoffset:i?0:o||0}}function q_({size:t,value:e,offset:r,sum:n,thickness:i,root:o,color:a,lineRoundCaps:l,tooltip:u,getStyles:h,display:d,...f}){const m=an();return b.jsx(Co.Floating,{disabled:!u,label:u,children:b.jsx(st,{component:"circle",...f,...h("curve"),__vars:{"--curve-color":a?gr(a,m):void 0},fill:"none",strokeLinecap:l?"round":"butt",...kD({sum:n,size:t,thickness:i,value:e,offset:r,root:o})})})}q_.displayName="@mantine/core/Curve";function _D({size:t,thickness:e,sections:r,renderRoundedLineCaps:n,rootColor:i}){const o=r.reduce((d,f)=>d+f.value,0),a=Math.PI*((t*.9-e*2)/2)*2;let l=a;const u=[],h=[];for(let d=0;d<r.length;d+=1)u.push({sum:o,offset:l,data:r[d],root:!1}),l-=r[d].value/100*a;if(u.push({sum:o,offset:l,data:{color:i},root:!0}),h.push({...u[u.length-1],lineRoundCaps:!1}),u.length>2){h.push({...u[0],lineRoundCaps:n}),h.push({...u[u.length-2],lineRoundCaps:n});for(let d=1;d<=u.length-3;d+=1)h.push({...u[d],lineRoundCaps:!1})}else h.push({...u[0],lineRoundCaps:n});return h}var V_={root:"m_b32e4812",svg:"m_d43b5134",curve:"m_b1ca1fbf",label:"m_b23f9dc4"};function TD(t,e){return Math.min(t||12,(e||120)/4)}const ED={size:120,thickness:12},$D=(t,{size:e,thickness:r,transitionDuration:n})=>({root:{"--rp-size":it(e),"--rp-label-offset":it(r*2),"--rp-transition-duration":n?`${n}ms`:void 0}}),Qv=Ct((t,e)=>{const r=ct("RingProgress",ED,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,label:h,sections:d,size:f,thickness:m,roundCaps:g,rootColor:v,transitionDuration:x,...w}=r,S=Yt({name:"RingProgress",classes:V_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:$D}),k=TD(m,f),E=_D({size:f,thickness:k,sections:d,renderRoundedLineCaps:g,rootColor:v}).map(({data:L,sum:A,root:M,lineRoundCaps:B,offset:D},q)=>$.createElement(q_,{...L,key:q,size:f,thickness:k,sum:A,offset:D,color:L==null?void 0:L.color,root:M,lineRoundCaps:B,getStyles:S}));return b.jsxs(st,{...S("root"),size:f,ref:e,...w,children:[b.jsx("svg",{...S("svg"),children:E}),h&&b.jsx("div",{...S("label"),children:h})]})});Qv.classes=V_;Qv.displayName="@mantine/core/RingProgress";const LD={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Zs=Ct((t,e)=>{const r=ct("Select",LD,t),{classNames:n,styles:i,unstyled:o,vars:a,dropdownOpened:l,defaultDropdownOpened:u,onDropdownClose:h,onDropdownOpen:d,onFocus:f,onBlur:m,onClick:g,onChange:v,data:x,value:w,defaultValue:S,selectFirstOptionOnChange:k,onOptionSubmit:E,comboboxProps:L,readOnly:A,disabled:M,filter:B,limit:D,withScrollArea:q,maxDropdownHeight:U,size:H,searchable:K,rightSection:V,checkIconPosition:W,withCheckIcon:I,nothingFoundMessage:O,name:F,form:P,searchValue:z,defaultSearchValue:X,onSearchChange:N,allowDeselect:Z,error:ot,rightSectionPointerEvents:yt,id:dt,clearable:lt,clearButtonProps:mt,hiddenInputProps:xt,renderOption:St,onClear:Tt,autoComplete:ee,scrollAreaProps:Ee,__defaultRightSection:pe,__clearSection:Oe,__clearable:Ue,chevronColor:xr,...sr}=r,ar=$.useMemo(()=>y6(x),[x]),$e=$.useMemo(()=>a_(ar),[ar]),le=Yi(dt),[we,ze,nr]=On({value:w,defaultValue:S,finalValue:null,onChange:v}),Ke=typeof we=="string"?$e[we]:void 0,We=HP(Ke),[lr,He,Qe]=On({value:z,defaultValue:X,finalValue:Ke?Ke.label:"",onChange:N}),Fe=f_({opened:l,defaultOpened:u,onDropdownOpen:()=>{d==null||d(),Fe.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{h==null||h(),Fe.resetSelectedOption()}}),Ye=me=>{He(me),Fe.resetSelectedOption()},{resolvedClassNames:Ce,resolvedStyles:Qi}=Lu({props:r,styles:i,classNames:n});$.useEffect(()=>{k&&Fe.selectFirstOption()},[k,lr]),$.useEffect(()=>{w===null&&Ye(""),typeof w=="string"&&Ke&&((We==null?void 0:We.value)!==Ke.value||(We==null?void 0:We.label)!==Ke.label)&&Ye(Ke.label)},[w,Ke]),$.useEffect(()=>{var me;!nr&&!Qe&&Ye(typeof we=="string"&&((me=$e[we])==null?void 0:me.label)||"")},[x,we]);const ei=b.jsx(Te.ClearButton,{...mt,onClear:()=>{ze(null,null),Ye(""),Tt==null||Tt()}}),jn=lt&&!!we&&!M&&!A;return b.jsxs(b.Fragment,{children:[b.jsxs(Te,{store:Fe,__staticSelector:"Select",classNames:Ce,styles:Qi,unstyled:o,readOnly:A,onOptionSubmit:me=>{E==null||E(me);const Me=Z&&$e[me].value===we?null:$e[me],br=Me?Me.value:null;br!==we&&ze(br,Me),!nr&&Ye(typeof br=="string"&&(Me==null?void 0:Me.label)||""),Fe.closeDropdown()},size:H,...L,children:[b.jsx(Te.Target,{targetType:K?"input":"button",autoComplete:ee,children:b.jsx($o,{id:le,ref:e,__defaultRightSection:b.jsx(Te.Chevron,{size:H,error:ot,unstyled:o,color:xr}),__clearSection:ei,__clearable:jn,rightSection:V,rightSectionPointerEvents:yt||(jn?"all":"none"),...sr,size:H,__staticSelector:"Select",disabled:M,readOnly:A||!K,value:lr,onChange:me=>{Ye(me.currentTarget.value),Fe.openDropdown(),k&&Fe.selectFirstOption()},onFocus:me=>{K&&Fe.openDropdown(),f==null||f(me)},onBlur:me=>{var Me;K&&Fe.closeDropdown(),Ye(we!=null&&((Me=$e[we])==null?void 0:Me.label)||""),m==null||m(me)},onClick:me=>{K?Fe.openDropdown():Fe.toggleDropdown(),g==null||g(me)},classNames:Ce,styles:Qi,unstyled:o,pointer:!K,error:ot})}),b.jsx(K6,{data:ar,hidden:A||M,filter:B,search:lr,limit:D,hiddenWhenEmpty:!O,withScrollArea:q,maxDropdownHeight:U,filterOptions:K&&(Ke==null?void 0:Ke.label)!==lr,value:we,checkIconPosition:W,withCheckIcon:I,nothingFoundMessage:O,unstyled:o,labelId:sr.label?`${le}-label`:void 0,"aria-label":sr.label?void 0:sr["aria-label"],renderOption:St,scrollAreaProps:Ee})]}),b.jsx(Te.HiddenInput,{value:we,name:F,form:P,disabled:M,...xt})]})});Zs.classes={...$o.classes,...Te.classes};Zs.displayName="@mantine/core/Select";function MD({spacing:t,verticalSpacing:e,cols:r,selector:n}){var d;const i=an(),o=e===void 0?t:e,a=Eu({"--sg-spacing-x":zr(al(t)),"--sg-spacing-y":zr(al(o)),"--sg-cols":(d=al(r))==null?void 0:d.toString()}),l=er(i.breakpoints).reduce((f,m)=>(f[m]||(f[m]={}),typeof t=="object"&&t[m]!==void 0&&(f[m]["--sg-spacing-x"]=zr(t[m])),typeof o=="object"&&o[m]!==void 0&&(f[m]["--sg-spacing-y"]=zr(o[m])),typeof r=="object"&&r[m]!==void 0&&(f[m]["--sg-cols"]=r[m]),f),{}),h=xy(er(l),i.breakpoints).filter(f=>er(l[f.value]).length>0).map(f=>({query:`(min-width: ${i.breakpoints[f.value]})`,styles:l[f.value]}));return b.jsx(qf,{styles:a,media:h,selector:n})}function Gg(t){return typeof t=="object"&&t!==null?er(t):[]}function AD(t){return t.sort((e,r)=>uu(e)-uu(r))}function RD({spacing:t,verticalSpacing:e,cols:r}){const n=Array.from(new Set([...Gg(t),...Gg(e),...Gg(r)]));return AD(n)}function PD({spacing:t,verticalSpacing:e,cols:r,selector:n}){var h;const i=e===void 0?t:e,o=Eu({"--sg-spacing-x":zr(al(t)),"--sg-spacing-y":zr(al(i)),"--sg-cols":(h=al(r))==null?void 0:h.toString()}),a=RD({spacing:t,verticalSpacing:e,cols:r}),l=a.reduce((d,f)=>(d[f]||(d[f]={}),typeof t=="object"&&t[f]!==void 0&&(d[f]["--sg-spacing-x"]=zr(t[f])),typeof i=="object"&&i[f]!==void 0&&(d[f]["--sg-spacing-y"]=zr(i[f])),typeof r=="object"&&r[f]!==void 0&&(d[f]["--sg-cols"]=r[f]),d),{}),u=a.map(d=>({query:`simple-grid (min-width: ${d})`,styles:l[d]}));return b.jsx(qf,{styles:o,container:u,selector:n})}var U_={container:"m_925c2d2c",root:"m_2415a157"};const BD={cols:1,spacing:"md",type:"media"},Zv=Ct((t,e)=>{const r=ct("SimpleGrid",BD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,cols:h,verticalSpacing:d,spacing:f,type:m,...g}=r,v=Yt({name:"SimpleGrid",classes:U_,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u}),x=KS();return m==="container"?b.jsxs(b.Fragment,{children:[b.jsx(PD,{...r,selector:`.${x}`}),b.jsx("div",{...v("container"),children:b.jsx(st,{ref:e,...v("root",{className:x}),...g})})]}):b.jsxs(b.Fragment,{children:[b.jsx(MD,{...r,selector:`.${x}`}),b.jsx(st,{ref:e,...v("root",{className:x}),...g})]})});Zv.classes=U_;Zv.displayName="@mantine/core/SimpleGrid";var Y_={root:"m_6d731127"};const ND={gap:"md",align:"stretch",justify:"flex-start"},OD=(t,{gap:e,align:r,justify:n})=>({root:{"--stack-gap":zr(e),"--stack-align":r,"--stack-justify":n}}),Je=Ct((t,e)=>{const r=ct("Stack",ND,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,align:h,justify:d,gap:f,variant:m,...g}=r,v=Yt({name:"Stack",props:r,classes:Y_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:OD});return b.jsx(st,{ref:e,...v("root"),variant:m,...g})});Je.classes=Y_;Je.displayName="@mantine/core/Stack";const G_=$.createContext(null),FD=G_.Provider,DD=()=>$.useContext(G_),ID={},Jv=Ct((t,e)=>{const{value:r,defaultValue:n,onChange:i,size:o,wrapperProps:a,children:l,readOnly:u,...h}=ct("SwitchGroup",ID,t),[d,f]=On({value:r,defaultValue:n,finalValue:[],onChange:i}),m=g=>{const v=g.currentTarget.value;!u&&f(d.includes(v)?d.filter(x=>x!==v):[...d,v])};return b.jsx(FD,{value:{value:d,onChange:m,size:o},children:b.jsx(Xe.Wrapper,{size:o,ref:e,...a,...h,labelElement:"div",__staticSelector:"SwitchGroup",children:b.jsx(x_,{role:"group",children:l})})})});Jv.classes=Xe.Wrapper.classes;Jv.displayName="@mantine/core/SwitchGroup";var X_={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const jD={labelPosition:"right"},zD=(t,{radius:e,color:r,size:n})=>({root:{"--switch-radius":e===void 0?void 0:rr(e),"--switch-height":te(n,"switch-height"),"--switch-width":te(n,"switch-width"),"--switch-thumb-size":te(n,"switch-thumb-size"),"--switch-label-font-size":te(n,"switch-label-font-size"),"--switch-track-label-padding":te(n,"switch-track-label-padding"),"--switch-color":r?gr(r,t):void 0}}),mp=Ct((t,e)=>{const r=ct("Switch",jD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,color:h,label:d,offLabel:f,onLabel:m,id:g,size:v,radius:x,wrapperProps:w,thumbIcon:S,checked:k,defaultChecked:E,onChange:L,labelPosition:A,description:M,error:B,disabled:D,variant:q,rootRef:U,mod:H,...K}=r,V=DD(),W=v||(V==null?void 0:V.size),I=Yt({name:"Switch",props:r,classes:X_,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:zD}),{styleProps:O,rest:F}=ua(K),P=Yi(g),z=V?{checked:V.value.includes(F.value),onChange:V.onChange}:{},[X,N]=On({value:z.checked??k,defaultValue:E,finalValue:!1});return b.jsxs(Pv,{...I("root"),__staticSelector:"Switch",__stylesApiProps:r,id:P,size:W,labelPosition:A,label:d,description:M,error:B,disabled:D,bodyElement:"label",labelElement:"span",classNames:n,styles:a,unstyled:l,"data-checked":z.checked||k||void 0,variant:q,ref:U,mod:H,...O,...w,children:[b.jsx("input",{...F,disabled:D,checked:X,"data-checked":z.checked||k||void 0,onChange:Z=>{var ot;V?(ot=z.onChange)==null||ot.call(z,Z):L==null||L(Z),N(Z.currentTarget.checked)},id:P,ref:e,type:"checkbox",role:"switch",...I("input")}),b.jsxs(st,{"aria-hidden":"true",component:"span",mod:{error:B,"label-position":A,"without-labels":!m&&!f},...I("track"),children:[b.jsx(st,{component:"span",mod:"reduce-motion",...I("thumb"),children:S}),b.jsx("span",{...I("trackLabel"),children:X?m:f})]})]})});mp.classes={...X_,...m_};mp.displayName="@mantine/core/Switch";mp.Group=Jv;const[WD,HD]=Ui("Table component was not found in the tree");var Du={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function qD(t,e){if(!e)return;const r={};return e.columnBorder&&t.withColumnBorders&&(r["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(r["data-with-row-border"]=!0),e.striped&&t.striped&&(r["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(r["data-hover"]=!0),e.captionSide&&t.captionSide&&(r["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(r["data-sticky"]=!0),r}function da(t,e){const r=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,n=Ct((i,o)=>{const a=ct(r,{},i),{classNames:l,className:u,style:h,styles:d,...f}=a,m=HD();return b.jsx(st,{component:t,ref:o,...qD(m,e),...m.getStyles(t,{className:u,classNames:l,style:h,styles:d,props:a}),...f})});return n.displayName=`@mantine/core/${r}`,n.classes=Du,n}const By=da("th",{columnBorder:!0}),K_=da("td",{columnBorder:!0}),kd=da("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),Q_=da("thead",{stickyHeader:!0}),Z_=da("tbody"),J_=da("tfoot"),tT=da("caption",{captionSide:!0});function tx({data:t}){return b.jsxs(b.Fragment,{children:[t.caption&&b.jsx(tT,{children:t.caption}),t.head&&b.jsx(Q_,{children:b.jsx(kd,{children:t.head.map((e,r)=>b.jsx(By,{children:e},r))})}),t.body&&b.jsx(Z_,{children:t.body.map((e,r)=>b.jsx(kd,{children:e.map((n,i)=>b.jsx(K_,{children:n},i))},r))}),t.foot&&b.jsx(J_,{children:b.jsx(kd,{children:t.foot.map((e,r)=>b.jsx(By,{children:e},r))})})]})}tx.displayName="@mantine/core/TableDataRenderer";const VD={type:"scrollarea"},UD=(t,{minWidth:e,maxHeight:r,type:n})=>({scrollContainer:{"--table-min-width":it(e),"--table-max-height":it(r),"--table-overflow":n==="native"?"auto":void 0}}),ex=Ct((t,e)=>{const r=ct("TableScrollContainer",VD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,children:h,minWidth:d,maxHeight:f,type:m,scrollAreaProps:g,...v}=r,x=Yt({name:"TableScrollContainer",classes:Du,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:UD,rootSelector:"scrollContainer"});return b.jsx(st,{component:m==="scrollarea"?Si:"div",...m==="scrollarea"?f?{offsetScrollbars:"xy",...g}:{offsetScrollbars:"x",...g}:{},ref:e,...x("scrollContainer"),...v,children:b.jsx("div",{...x("scrollContainerInner"),children:h})})});ex.classes=Du;ex.displayName="@mantine/core/TableScrollContainer";const YD={withRowBorders:!0,verticalSpacing:7},GD=(t,{layout:e,captionSide:r,horizontalSpacing:n,verticalSpacing:i,borderColor:o,stripedColor:a,highlightOnHoverColor:l,striped:u,highlightOnHover:h,stickyHeaderOffset:d,stickyHeader:f})=>({table:{"--table-layout":e,"--table-caption-side":r,"--table-horizontal-spacing":zr(n),"--table-vertical-spacing":zr(i),"--table-border-color":o?gr(o,t):void 0,"--table-striped-color":u&&a?gr(a,t):void 0,"--table-highlight-on-hover-color":h&&l?gr(l,t):void 0,"--table-sticky-header-offset":f?it(d):void 0}}),zt=Ct((t,e)=>{const r=ct("Table",YD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,horizontalSpacing:h,verticalSpacing:d,captionSide:f,stripedColor:m,highlightOnHoverColor:g,striped:v,highlightOnHover:x,withColumnBorders:w,withRowBorders:S,withTableBorder:k,borderColor:E,layout:L,variant:A,data:M,children:B,stickyHeader:D,stickyHeaderOffset:q,mod:U,tabularNums:H,...K}=r,V=Yt({name:"Table",props:r,className:i,style:o,classes:Du,classNames:n,styles:a,unstyled:l,rootSelector:"table",vars:u,varsResolver:GD});return b.jsx(WD,{value:{getStyles:V,stickyHeader:D,striped:v===!0?"odd":v||void 0,highlightOnHover:x,withColumnBorders:w,withRowBorders:S,captionSide:f||"bottom"},children:b.jsx(st,{component:"table",variant:A,ref:e,mod:[{"data-with-table-border":k,"data-tabular-nums":H},U],...V("table"),...K,children:B||!!M&&b.jsx(tx,{data:M})})})});zt.classes=Du;zt.displayName="@mantine/core/Table";zt.Td=K_;zt.Th=By;zt.Tr=kd;zt.Thead=Q_;zt.Tbody=Z_;zt.Tfoot=J_;zt.Caption=tT;zt.ScrollContainer=ex;zt.DataRenderer=tx;const XD={},Bn=Ct((t,e)=>{const r=ct("TextInput",XD,t);return b.jsx($o,{component:"input",ref:e,...r,__staticSelector:"TextInput"})});Bn.classes=$o.classes;Bn.displayName="@mantine/core/TextInput";var eT={root:"m_7341320d"};const KD={},QD=(t,{size:e,radius:r,variant:n,gradient:i,color:o,autoContrast:a})=>{const l=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:i,variant:n||"filled",autoContrast:a});return{root:{"--ti-size":te(e,"ti-size"),"--ti-radius":r===void 0?void 0:rr(r),"--ti-bg":o||n?l.background:void 0,"--ti-color":o||n?l.color:void 0,"--ti-bd":o||n?l.border:void 0}}},go=Ct((t,e)=>{const r=ct("ThemeIcon",KD,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,autoContrast:h,...d}=r,f=Yt({name:"ThemeIcon",classes:eT,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:QD});return b.jsx(st,{ref:e,...f("root"),...d})});go.classes=eT;go.displayName="@mantine/core/ThemeIcon";const ZD=["h1","h2","h3","h4","h5","h6"],JD=["xs","sm","md","lg","xl"];function tI(t,e){const r=e!==void 0?e:`h${t}`;return ZD.includes(r)?{fontSize:`var(--mantine-${r}-font-size)`,fontWeight:`var(--mantine-${r}-font-weight)`,lineHeight:`var(--mantine-${r}-line-height)`}:JD.includes(r)?{fontSize:`var(--mantine-font-size-${r})`,fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}:{fontSize:it(r),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var rT={root:"m_8a5d1357"};const eI={order:1},rI=(t,{order:e,size:r,lineClamp:n,textWrap:i})=>{const o=tI(e,r);return{root:{"--title-fw":o.fontWeight,"--title-lh":o.lineHeight,"--title-fz":o.fontSize,"--title-line-clamp":typeof n=="number"?n.toString():void 0,"--title-text-wrap":i}}},mo=Ct((t,e)=>{const r=ct("Title",eI,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,order:u,vars:h,size:d,variant:f,lineClamp:m,textWrap:g,mod:v,...x}=r,w=Yt({name:"Title",props:r,classes:rT,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:h,varsResolver:rI});return[1,2,3,4,5,6].includes(u)?b.jsx(st,{...w("root"),component:`h${u}`,variant:f,ref:e,mod:[{order:u,"data-line-clamp":typeof m=="number"},v],size:d,...x}):null});mo.classes=rT;mo.displayName="@mantine/core/Title";function nI(t){let e=t,r=!1;const n=new Set;return{getState(){return e},updateState(i){e=typeof i=="function"?i(e):i},setState(i){this.updateState(i),n.forEach(o=>o(e))},initialize(i){r||(e=i,r=!0)},subscribe(i){return n.add(i),()=>n.delete(i)}}}function iI(t){return $.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function oI(t,e,r){const n=[],i=[],o={};for(const a of t){const l=a.position||e;o[l]=o[l]||0,o[l]+=1,o[l]<=r?i.push(a):n.push(a)}return{notifications:i,queue:n}}const sI=()=>nI({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),fa=sI(),aI=(t=fa)=>iI(t);function Wl(t,e){const r=t.getState(),n=e([...r.notifications,...r.queue]),i=oI(n,r.defaultPosition,r.limit);t.setState({notifications:i.notifications,queue:i.queue,limit:r.limit,defaultPosition:r.defaultPosition})}function lI(t,e=fa){const r=t.id||NS();return Wl(e,n=>t.id&&n.some(i=>i.id===t.id)?n:[...n,{...t,id:r}]),r}function nT(t,e=fa){return Wl(e,r=>r.filter(n=>{var i;return n.id===t?((i=n.onClose)==null||i.call(n,n),!1):!0})),t}function cI(t,e=fa){return Wl(e,r=>r.map(n=>n.id===t.id?{...n,...t}:n)),t.id}function uI(t=fa){Wl(t,()=>[])}function hI(t=fa){Wl(t,e=>e.slice(0,t.getState().limit))}const Jt={show:lI,hide:nT,update:cI,clean:uI,cleanQueue:hI,updateState:Wl};function Ny(t,e){return Ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ny(t,e)}function iT(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ny(t,e)}const R2={disabled:!1},Zd=kr.createContext(null);var dI=function(e){return e.scrollTop},Yc="unmounted",Os="exited",Fs="entering",tl="entered",Oy="exiting",Mo=(function(t){iT(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=i,l=a&&!a.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?l?(u=Os,o.appearStatus=Fs):u=tl:n.unmountOnExit||n.mountOnEnter?u=Yc:u=Os,o.state={status:u},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Yc?{status:Os}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Fs&&a!==tl&&(o=Fs):(a===Fs||a===tl)&&(o=Oy)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,o,a,l;return o=a=l=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,l=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:l}},r.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Fs){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Uc.findDOMNode(this);a&&dI(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Os&&this.setState({status:Yc})},r.performEnter=function(i){var o=this,a=this.props.enter,l=this.context?this.context.isMounting:i,u=this.props.nodeRef?[l]:[Uc.findDOMNode(this),l],h=u[0],d=u[1],f=this.getTimeouts(),m=l?f.appear:f.enter;if(!i&&!a||R2.disabled){this.safeSetState({status:tl},function(){o.props.onEntered(h)});return}this.props.onEnter(h,d),this.safeSetState({status:Fs},function(){o.props.onEntering(h,d),o.onTransitionEnd(m,function(){o.safeSetState({status:tl},function(){o.props.onEntered(h,d)})})})},r.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:Uc.findDOMNode(this);if(!o||R2.disabled){this.safeSetState({status:Os},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Oy},function(){i.props.onExiting(l),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Os},function(){i.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},r.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Uc.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],h=u[0],d=u[1];this.props.addEndListener(h,d)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===Yc)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=zv(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return kr.createElement(Zd.Provider,{value:null},typeof a=="function"?a(i,l):kr.cloneElement(kr.Children.only(a),l))},e})(kr.Component);Mo.contextType=Zd;Mo.propTypes={};function Ka(){}Mo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ka,onEntering:Ka,onEntered:Ka,onExit:Ka,onExiting:Ka,onExited:Ka};Mo.UNMOUNTED=Yc;Mo.EXITED=Os;Mo.ENTERING=Fs;Mo.ENTERED=tl;Mo.EXITING=Oy;function fI(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rx(t,e){var r=function(o){return e&&$.isValidElement(o)?e(o):o},n=Object.create(null);return t&&$.Children.map(t,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function pI(t,e){t=t||{},e=e||{};function r(d){return d in e?e[d]:t[d]}var n=Object.create(null),i=[];for(var o in t)o in e?i.length&&(n[o]=i,i=[]):i.push(o);var a,l={};for(var u in e){if(n[u])for(a=0;a<n[u].length;a++){var h=n[u][a];l[n[u][a]]=r(h)}l[u]=r(u)}for(a=0;a<i.length;a++)l[i[a]]=r(i[a]);return l}function qs(t,e,r){return r[e]!=null?r[e]:t.props[e]}function mI(t,e){return rx(t.children,function(r){return $.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:qs(r,"appear",t),enter:qs(r,"enter",t),exit:qs(r,"exit",t)})})}function gI(t,e,r){var n=rx(t.children),i=pI(e,n);return Object.keys(i).forEach(function(o){var a=i[o];if($.isValidElement(a)){var l=o in e,u=o in n,h=e[o],d=$.isValidElement(h)&&!h.props.in;u&&(!l||d)?i[o]=$.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:qs(a,"exit",t),enter:qs(a,"enter",t)}):!u&&l&&!d?i[o]=$.cloneElement(a,{in:!1}):u&&l&&$.isValidElement(h)&&(i[o]=$.cloneElement(a,{onExited:r.bind(null,a),in:h.props.in,exit:qs(a,"exit",t),enter:qs(a,"enter",t)}))}}),i}var yI=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},vI={component:"div",childFactory:function(e){return e}},rs=(function(t){iT(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=o.handleExited.bind(fI(o));return o.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},o}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,o){var a=o.children,l=o.handleExited,u=o.firstRender;return{children:u?mI(i,l):gI(i,a,l),firstRender:!1}},r.handleExited=function(i,o){var a=rx(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(l){var u=Qd({},l.children);return delete u[i.key],{children:u}}))},r.render=function(){var i=this.props,o=i.component,a=i.childFactory,l=zv(i,["component","childFactory"]),u=this.state.contextValue,h=yI(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,o===null?kr.createElement(Zd.Provider,{value:u},h):kr.createElement(Zd.Provider,{value:u},kr.createElement(o,l,h))},e})(kr.Component);rs.propTypes={};rs.defaultProps=vI;const oT=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function xI(t,e){return t.reduce((r,n)=>(r[n.position||e].push(n),r),oT.reduce((r,n)=>(r[n]=[],r),{}))}const P2={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},bI={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function wI({state:t,maxHeight:e,position:r,transitionDuration:n}){const[i,o]=r.split("-"),a=o==="center"?`${i}-center`:o,l={opacity:0,maxHeight:e,transform:P2[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},u={opacity:1,transform:bI[a]},h={opacity:0,maxHeight:0,transform:P2[a]};return{...l,...{entering:u,entered:u,exiting:h,exited:h}[t]}}function CI(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const sT=$.forwardRef(({data:t,onHide:e,autoClose:r,...n},i)=>{const{autoClose:o,message:a,...l}=t,u=CI(r,t.autoClose),h=$.useRef(-1),d=()=>window.clearTimeout(h.current),f=()=>{e(t.id),d()},m=()=>{typeof u=="number"&&(h.current=window.setTimeout(f,u))};return $.useEffect(()=>{var g;(g=t.onOpen)==null||g.call(t,t)},[]),$.useEffect(()=>(m(),d),[u]),b.jsx(Gv,{...n,...l,onClose:f,ref:i,onMouseEnter:d,onMouseLeave:m,children:a})});sT.displayName="@mantine/notifications/NotificationContainer";var aT={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const SI=Mo,kI={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:ki("overlay"),store:fa,withinPortal:!0},_I=(t,{zIndex:e,containerWidth:r})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":it(r)}}),Ao=Ct((t,e)=>{const r=ct("Notifications",kI,t),{classNames:n,className:i,style:o,styles:a,unstyled:l,vars:u,position:h,autoClose:d,transitionDuration:f,containerWidth:m,notificationMaxHeight:g,limit:v,zIndex:x,store:w,portalProps:S,withinPortal:k,...E}=r,L=an(),A=aI(w),M=MP(),B=jf(),D=$.useRef({}),q=$.useRef(0),H=(L.respectReducedMotion?B:!1)?1:f,K=Yt({name:"Notifications",classes:aT,props:r,className:i,style:o,classNames:n,styles:a,unstyled:l,vars:u,varsResolver:_I});$.useEffect(()=>{w==null||w.updateState(I=>({...I,limit:v||5,defaultPosition:h}))},[v,h]),Hi(()=>{A.notifications.length>q.current&&setTimeout(()=>M(),0),q.current=A.notifications.length},[A.notifications]);const V=xI(A.notifications,h),W=oT.reduce((I,O)=>(I[O]=V[O].map(({style:F,...P})=>b.jsx(SI,{timeout:H,onEnter:()=>D.current[P.id].offsetHeight,nodeRef:{current:D.current[P.id]},children:z=>b.jsx(sT,{ref:X=>{D.current[P.id]=X},data:P,onHide:X=>nT(X,w),autoClose:d,...K("notification",{style:{...wI({state:z,position:O,transitionDuration:H,maxHeight:g}),...F}})})},P.id)),I),{});return b.jsxs(ha,{withinPortal:k,...S,children:[b.jsx(st,{...K("root"),"data-position":"top-center",ref:e,...E,children:b.jsx(rs,{children:W["top-center"]})}),b.jsx(st,{...K("root"),"data-position":"top-left",...E,children:b.jsx(rs,{children:W["top-left"]})}),b.jsx(st,{...K("root",{className:wl.classNames.fullWidth}),"data-position":"top-right",...E,children:b.jsx(rs,{children:W["top-right"]})}),b.jsx(st,{...K("root",{className:wl.classNames.fullWidth}),"data-position":"bottom-right",...E,children:b.jsx(rs,{children:W["bottom-right"]})}),b.jsx(st,{...K("root"),"data-position":"bottom-left",...E,children:b.jsx(rs,{children:W["bottom-left"]})}),b.jsx(st,{...K("root"),"data-position":"bottom-center",...E,children:b.jsx(rs,{children:W["bottom-center"]})})]})});Ao.classes=aT;Ao.displayName="@mantine/notifications/Notifications";Ao.show=Jt.show;Ao.hide=Jt.hide;Ao.update=Jt.update;Ao.clean=Jt.clean;Ao.cleanQueue=Jt.cleanQueue;Ao.updateState=Jt.updateState;const TI="modulepreload",EI=function(t,e){return new URL(t,e).href},B2={},ve=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){let a=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const l=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),h=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=a(r.map(d=>{if(d=EI(d,n),d in B2)return;B2[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!n)for(let x=l.length-1;x>=0;x--){const w=l[x];if(w.href===d&&(!f||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${m}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":TI,f||(v.as="script"),v.crossOrigin="",v.href=d,h&&v.setAttribute("nonce",h),document.head.appendChild(v),f)return new Promise((x,w)=>{v.addEventListener("load",x),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return i.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return e().catch(o)})};var N2={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},_d={exports:{}},$I=_d.exports,O2;function LI(){return O2||(O2=1,(function(t,e){(function(r,n){t.exports=n()})($I,(function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",l="minute",u="hour",h="day",d="week",f="month",m="quarter",g="year",v="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,k={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(W){var I=["th","st","nd","rd"],O=W%100;return"["+W+(I[(O-20)%10]||I[O]||I[0])+"]"}},E=function(W,I,O){var F=String(W);return!F||F.length>=I?W:""+Array(I+1-F.length).join(O)+W},L={s:E,z:function(W){var I=-W.utcOffset(),O=Math.abs(I),F=Math.floor(O/60),P=O%60;return(I<=0?"+":"-")+E(F,2,"0")+":"+E(P,2,"0")},m:function W(I,O){if(I.date()<O.date())return-W(O,I);var F=12*(O.year()-I.year())+(O.month()-I.month()),P=I.clone().add(F,f),z=O-P<0,X=I.clone().add(F+(z?-1:1),f);return+(-(F+(O-P)/(z?P-X:X-P))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:f,y:g,w:d,d:h,D:v,h:u,m:l,s:a,ms:o,Q:m}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},A="en",M={};M[A]=k;var B="$isDayjsObject",D=function(W){return W instanceof K||!(!W||!W[B])},q=function W(I,O,F){var P;if(!I)return A;if(typeof I=="string"){var z=I.toLowerCase();M[z]&&(P=z),O&&(M[z]=O,P=z);var X=I.split("-");if(!P&&X.length>1)return W(X[0])}else{var N=I.name;M[N]=I,P=N}return!F&&P&&(A=P),P||!F&&A},U=function(W,I){if(D(W))return W.clone();var O=typeof I=="object"?I:{};return O.date=W,O.args=arguments,new K(O)},H=L;H.l=q,H.i=D,H.w=function(W,I){return U(W,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var K=(function(){function W(O){this.$L=q(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[B]=!0}var I=W.prototype;return I.parse=function(O){this.$d=(function(F){var P=F.date,z=F.utc;if(P===null)return new Date(NaN);if(H.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var X=P.match(w);if(X){var N=X[2]-1||0,Z=(X[7]||"0").substring(0,3);return z?new Date(Date.UTC(X[1],N,X[3]||1,X[4]||0,X[5]||0,X[6]||0,Z)):new Date(X[1],N,X[3]||1,X[4]||0,X[5]||0,X[6]||0,Z)}}return new Date(P)})(O),this.init()},I.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},I.$utils=function(){return H},I.isValid=function(){return this.$d.toString()!==x},I.isSame=function(O,F){var P=U(O);return this.startOf(F)<=P&&P<=this.endOf(F)},I.isAfter=function(O,F){return U(O)<this.startOf(F)},I.isBefore=function(O,F){return this.endOf(F)<U(O)},I.$g=function(O,F,P){return H.u(O)?this[F]:this.set(P,O)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(O,F){var P=this,z=!!H.u(F)||F,X=H.p(O),N=function(St,Tt){var ee=H.w(P.$u?Date.UTC(P.$y,Tt,St):new Date(P.$y,Tt,St),P);return z?ee:ee.endOf(h)},Z=function(St,Tt){return H.w(P.toDate()[St].apply(P.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(Tt)),P)},ot=this.$W,yt=this.$M,dt=this.$D,lt="set"+(this.$u?"UTC":"");switch(X){case g:return z?N(1,0):N(31,11);case f:return z?N(1,yt):N(0,yt+1);case d:var mt=this.$locale().weekStart||0,xt=(ot<mt?ot+7:ot)-mt;return N(z?dt-xt:dt+(6-xt),yt);case h:case v:return Z(lt+"Hours",0);case u:return Z(lt+"Minutes",1);case l:return Z(lt+"Seconds",2);case a:return Z(lt+"Milliseconds",3);default:return this.clone()}},I.endOf=function(O){return this.startOf(O,!1)},I.$set=function(O,F){var P,z=H.p(O),X="set"+(this.$u?"UTC":""),N=(P={},P[h]=X+"Date",P[v]=X+"Date",P[f]=X+"Month",P[g]=X+"FullYear",P[u]=X+"Hours",P[l]=X+"Minutes",P[a]=X+"Seconds",P[o]=X+"Milliseconds",P)[z],Z=z===h?this.$D+(F-this.$W):F;if(z===f||z===g){var ot=this.clone().set(v,1);ot.$d[N](Z),ot.init(),this.$d=ot.set(v,Math.min(this.$D,ot.daysInMonth())).$d}else N&&this.$d[N](Z);return this.init(),this},I.set=function(O,F){return this.clone().$set(O,F)},I.get=function(O){return this[H.p(O)]()},I.add=function(O,F){var P,z=this;O=Number(O);var X=H.p(F),N=function(yt){var dt=U(z);return H.w(dt.date(dt.date()+Math.round(yt*O)),z)};if(X===f)return this.set(f,this.$M+O);if(X===g)return this.set(g,this.$y+O);if(X===h)return N(1);if(X===d)return N(7);var Z=(P={},P[l]=n,P[u]=i,P[a]=r,P)[X]||1,ot=this.$d.getTime()+O*Z;return H.w(ot,this)},I.subtract=function(O,F){return this.add(-1*O,F)},I.format=function(O){var F=this,P=this.$locale();if(!this.isValid())return P.invalidDate||x;var z=O||"YYYY-MM-DDTHH:mm:ssZ",X=H.z(this),N=this.$H,Z=this.$m,ot=this.$M,yt=P.weekdays,dt=P.months,lt=P.meridiem,mt=function(Tt,ee,Ee,pe){return Tt&&(Tt[ee]||Tt(F,z))||Ee[ee].slice(0,pe)},xt=function(Tt){return H.s(N%12||12,Tt,"0")},St=lt||function(Tt,ee,Ee){var pe=Tt<12?"AM":"PM";return Ee?pe.toLowerCase():pe};return z.replace(S,(function(Tt,ee){return ee||(function(Ee){switch(Ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return H.s(F.$y,4,"0");case"M":return ot+1;case"MM":return H.s(ot+1,2,"0");case"MMM":return mt(P.monthsShort,ot,dt,3);case"MMMM":return mt(dt,ot);case"D":return F.$D;case"DD":return H.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return mt(P.weekdaysMin,F.$W,yt,2);case"ddd":return mt(P.weekdaysShort,F.$W,yt,3);case"dddd":return yt[F.$W];case"H":return String(N);case"HH":return H.s(N,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return St(N,Z,!0);case"A":return St(N,Z,!1);case"m":return String(Z);case"mm":return H.s(Z,2,"0");case"s":return String(F.$s);case"ss":return H.s(F.$s,2,"0");case"SSS":return H.s(F.$ms,3,"0");case"Z":return X}return null})(Tt)||X.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(O,F,P){var z,X=this,N=H.p(F),Z=U(O),ot=(Z.utcOffset()-this.utcOffset())*n,yt=this-Z,dt=function(){return H.m(X,Z)};switch(N){case g:z=dt()/12;break;case f:z=dt();break;case m:z=dt()/3;break;case d:z=(yt-ot)/6048e5;break;case h:z=(yt-ot)/864e5;break;case u:z=yt/i;break;case l:z=yt/n;break;case a:z=yt/r;break;default:z=yt}return P?z:H.a(z)},I.daysInMonth=function(){return this.endOf(f).$D},I.$locale=function(){return M[this.$L]},I.locale=function(O,F){if(!O)return this.$L;var P=this.clone(),z=q(O,F,!0);return z&&(P.$L=z),P},I.clone=function(){return H.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},W})(),V=K.prototype;return U.prototype=V,[["$ms",o],["$s",a],["$m",l],["$H",u],["$W",h],["$M",f],["$y",g],["$D",v]].forEach((function(W){V[W[1]]=function(I){return this.$g(I,W[0],W[1])}})),U.extend=function(W,I){return W.$i||(W(I,K,U),W.$i=!0),U},U.locale=q,U.isDayjs=D,U.unix=function(W){return U(1e3*W)},U.en=M[A],U.Ls=M,U.p={},U}))})(_d)),_d.exports}var MI=LI();const AI=Ff(MI);var lT=Object.defineProperty,T=(t,e)=>lT(t,"name",{value:e,configurable:!0}),RI=(t,e)=>{for(var r in e)lT(t,r,{get:e[r],enumerable:!0})},lo={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},at={trace:T((...t)=>{},"trace"),debug:T((...t)=>{},"debug"),info:T((...t)=>{},"info"),warn:T((...t)=>{},"warn"),error:T((...t)=>{},"error"),fatal:T((...t)=>{},"fatal")},nx=T(function(t="fatal"){let e=lo.fatal;typeof t=="string"?t.toLowerCase()in lo&&(e=lo[t]):typeof t=="number"&&(e=t),at.trace=()=>{},at.debug=()=>{},at.info=()=>{},at.warn=()=>{},at.error=()=>{},at.fatal=()=>{},e<=lo.fatal&&(at.fatal=console.error?console.error.bind(console,Yn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yn("FATAL"))),e<=lo.error&&(at.error=console.error?console.error.bind(console,Yn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yn("ERROR"))),e<=lo.warn&&(at.warn=console.warn?console.warn.bind(console,Yn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yn("WARN"))),e<=lo.info&&(at.info=console.info?console.info.bind(console,Yn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yn("INFO"))),e<=lo.debug&&(at.debug=console.debug?console.debug.bind(console,Yn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yn("DEBUG"))),e<=lo.trace&&(at.trace=console.debug?console.debug.bind(console,Yn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yn("TRACE")))},"setLogLevel"),Yn=T(t=>`%c${AI().format("ss.SSS")} : ${t} : `,"format");const Td={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,o=2*r-i;switch(n){case"r":return Td.hue2rgb(o,i,t+1/3)*255;case"g":return Td.hue2rgb(o,i,t)*255;case"b":return Td.hue2rgb(o,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),o=Math.min(t,e,r),a=(i+o)/2;if(n==="l")return a*100;if(i===o)return 0;const l=i-o,u=a>.5?l/(2-i-o):l/(i+o);if(n==="s")return u*100;switch(i){case t:return((e-r)/l+(e<r?6:0))*60;case e:return((r-t)/l+2)*60;case r:return((t-e)/l+4)*60;default:return-1}}},PI={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},BI={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Qt={channel:Td,lang:PI,unit:BI},es={};for(let t=0;t<=255;t++)es[t]=Qt.unit.dec2hex(t);const Fr={ALL:0,RGB:1,HSL:2};class NI{constructor(){this.type=Fr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Fr.ALL}is(e){return this.type===e}}class OI{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new NI}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Fr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Qt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Qt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Qt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Qt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Qt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Qt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Fr.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Fr.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Fr.HSL)&&r!==void 0?r:(this._ensureHSL(),Qt.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Fr.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Fr.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Fr.RGB)&&r!==void 0?r:(this._ensureRGB(),Qt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Fr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Fr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Fr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Fr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Fr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Fr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const gp=new OI({r:0,g:0,b:0,a:0},"transparent"),ul={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(ul.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,o=i%4===0,a=i>4,l=a?1:17,u=a?8:4,h=o?0:-1,d=a?255:15;return gp.set({r:(n>>u*(h+3)&d)*l,g:(n>>u*(h+2)&d)*l,b:(n>>u*(h+1)&d)*l,a:o?(n&d)*l/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${es[Math.round(e)]}${es[Math.round(r)]}${es[Math.round(n)]}${es[Math.round(i*255)]}`:`#${es[Math.round(e)]}${es[Math.round(r)]}${es[Math.round(n)]}`}},Vs={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:t=>{const e=t.match(Vs.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return Qt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Qt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Qt.channel.clamp.h(parseFloat(r)*360)}}return Qt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Vs.re);if(!r)return;const[,n,i,o,a,l]=r;return gp.set({h:Vs._hue2deg(n),s:Qt.channel.clamp.s(parseFloat(i)),l:Qt.channel.clamp.l(parseFloat(o)),a:a?Qt.channel.clamp.a(l?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Qt.lang.round(e)}, ${Qt.lang.round(r)}%, ${Qt.lang.round(n)}%, ${i})`:`hsl(${Qt.lang.round(e)}, ${Qt.lang.round(r)}%, ${Qt.lang.round(n)}%)`}},iu={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=iu.colors[t];if(e)return ul.parse(e)},stringify:t=>{const e=ul.stringify(t);for(const r in iu.colors)if(iu.colors[r]===e)return r}},Gc={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:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Gc.re);if(!r)return;const[,n,i,o,a,l,u,h,d]=r;return gp.set({r:Qt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Qt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:Qt.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?Qt.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Qt.lang.round(e)}, ${Qt.lang.round(r)}, ${Qt.lang.round(n)}, ${Qt.lang.round(i)})`:`rgb(${Qt.lang.round(e)}, ${Qt.lang.round(r)}, ${Qt.lang.round(n)})`}},qi={format:{keyword:iu,hex:ul,rgb:Gc,rgba:Gc,hsl:Vs,hsla:Vs},parse:t=>{if(typeof t!="string")return t;const e=ul.parse(t)||Gc.parse(t)||Vs.parse(t)||iu.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Fr.HSL)||t.data.r===void 0?Vs.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Gc.stringify(t):ul.stringify(t)},cT=(t,e)=>{const r=qi.parse(t);for(const n in e)r[n]=Qt.channel.clamp[n](e[n]);return qi.stringify(r)},ou=(t,e,r=0,n=1)=>{if(typeof t!="number")return cT(t,{a:e});const i=gp.set({r:Qt.channel.clamp.r(t),g:Qt.channel.clamp.g(e),b:Qt.channel.clamp.b(r),a:Qt.channel.clamp.a(n)});return qi.stringify(i)},FI=t=>{const{r:e,g:r,b:n}=qi.parse(t),i=.2126*Qt.channel.toLinear(e)+.7152*Qt.channel.toLinear(r)+.0722*Qt.channel.toLinear(n);return Qt.lang.round(i)},DI=t=>FI(t)>=.5,Iu=t=>!DI(t),uT=(t,e,r)=>{const n=qi.parse(t),i=n[e],o=Qt.channel.clamp[e](i+r);return i!==o&&(n[e]=o),qi.stringify(n)},Rt=(t,e)=>uT(t,"l",e),Ht=(t,e)=>uT(t,"l",-e),J=(t,e)=>{const r=qi.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return cT(t,n)},II=(t,e,r=50)=>{const{r:n,g:i,b:o,a}=qi.parse(t),{r:l,g:u,b:h,a:d}=qi.parse(e),f=r/100,m=f*2-1,g=a-d,x=((m*g===-1?m:(m+g)/(1+m*g))+1)/2,w=1-x,S=n*x+l*w,k=i*x+u*w,E=o*x+h*w,L=a*f+d*(1-f);return ou(S,k,E,L)},wt=(t,e=100)=>{const r=qi.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,II(r,t,e)};/*! @license DOMPurify 3.3.1 | (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.1/LICENSE */const{entries:hT,setPrototypeOf:F2,isFrozen:jI,getPrototypeOf:zI,getOwnPropertyDescriptor:WI}=Object;let{freeze:on,seal:Xn,create:Fy}=Object,{apply:Dy,construct:Iy}=typeof Reflect<"u"&&Reflect;on||(on=function(e){return e});Xn||(Xn=function(e){return e});Dy||(Dy=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return e.apply(r,i)});Iy||(Iy=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new e(...n)});const sd=sn(Array.prototype.forEach),HI=sn(Array.prototype.lastIndexOf),D2=sn(Array.prototype.pop),Bc=sn(Array.prototype.push),qI=sn(Array.prototype.splice),Ed=sn(String.prototype.toLowerCase),Xg=sn(String.prototype.toString),Kg=sn(String.prototype.match),Nc=sn(String.prototype.replace),VI=sn(String.prototype.indexOf),UI=sn(String.prototype.trim),hi=sn(Object.prototype.hasOwnProperty),Jr=sn(RegExp.prototype.test),Oc=YI(TypeError);function sn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Dy(t,e,n)}}function YI(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Iy(t,r)}}function oe(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ed;F2&&F2(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const o=r(i);o!==i&&(jI(e)||(e[n]=o),i=o)}t[i]=!0}return t}function GI(t){for(let e=0;e<t.length;e++)hi(t,e)||(t[e]=null);return t}function Pi(t){const e=Fy(null);for(const[r,n]of hT(t))hi(t,r)&&(Array.isArray(n)?e[r]=GI(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=Pi(n):e[r]=n);return e}function Fc(t,e){for(;t!==null;){const n=WI(t,e);if(n){if(n.get)return sn(n.get);if(typeof n.value=="function")return sn(n.value)}t=zI(t)}function r(){return null}return r}const I2=on(["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"]),Qg=on(["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"]),Zg=on(["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"]),XI=on(["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"]),Jg=on(["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"]),KI=on(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j2=on(["#text"]),z2=on(["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"]),ty=on(["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"]),W2=on(["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"]),ad=on(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QI=Xn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ZI=Xn(/<%[\w\W]*|[\w\W]*%>/gm),JI=Xn(/\$\{[\w\W]*/gm),tj=Xn(/^data-[\-\w.\u00B7-\uFFFF]+$/),ej=Xn(/^aria-[\-\w]+$/),dT=Xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rj=Xn(/^(?:\w+script|data):/i),nj=Xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fT=Xn(/^html$/i),ij=Xn(/^[a-z][.\w]*(-[.\w]+)+$/i);var H2=Object.freeze({__proto__:null,ARIA_ATTR:ej,ATTR_WHITESPACE:nj,CUSTOM_ELEMENT:ij,DATA_ATTR:tj,DOCTYPE_NAME:fT,ERB_EXPR:ZI,IS_ALLOWED_URI:dT,IS_SCRIPT_OR_DATA:rj,MUSTACHE_EXPR:QI,TMPLIT_EXPR:JI});const Dc={element:1,text:3,progressingInstruction:7,comment:8,document:9},oj=function(){return typeof window>"u"?null:window},sj=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},q2=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pT(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oj();const e=Dt=>pT(Dt);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Dc.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:l,Element:u,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:m,trustedTypes:g}=t,v=u.prototype,x=Fc(v,"cloneNode"),w=Fc(v,"remove"),S=Fc(v,"nextSibling"),k=Fc(v,"childNodes"),E=Fc(v,"parentNode");if(typeof a=="function"){const Dt=r.createElement("template");Dt.content&&Dt.content.ownerDocument&&(r=Dt.content.ownerDocument)}let L,A="";const{implementation:M,createNodeIterator:B,createDocumentFragment:D,getElementsByTagName:q}=r,{importNode:U}=n;let H=q2();e.isSupported=typeof hT=="function"&&typeof E=="function"&&M&&M.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:V,TMPLIT_EXPR:W,DATA_ATTR:I,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:z}=H2;let{IS_ALLOWED_URI:X}=H2,N=null;const Z=oe({},[...I2,...Qg,...Zg,...Jg,...j2]);let ot=null;const yt=oe({},[...z2,...ty,...W2,...ad]);let dt=Object.seal(Fy(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}})),lt=null,mt=null;const xt=Object.seal(Fy(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let St=!0,Tt=!0,ee=!1,Ee=!0,pe=!1,Oe=!0,Ue=!1,xr=!1,sr=!1,ar=!1,$e=!1,le=!1,we=!0,ze=!1;const nr="user-content-";let Ke=!0,We=!1,lr={},He=null;const Qe=oe({},["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 Fe=null;const Ye=oe({},["audio","video","img","source","image","track"]);let Ce=null;const Qi=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ei="http://www.w3.org/1998/Math/MathML",jn="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let Me=me,br=!1,ri=null;const Rr=oe({},[ei,jn,me],Xg);let _r=oe({},["mi","mo","mn","ms","mtext"]),cr=oe({},["annotation-xml"]);const ni=oe({},["title","style","font","a","script"]);let Ti=null;const Ei=["application/xhtml+xml","text/html"],xa="text/html";let Se=null,cn=null;const Zi=r.createElement("form"),bs=function(G){return G instanceof RegExp||G instanceof Function},Yr=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(cn&&cn===G)){if((!G||typeof G!="object")&&(G={}),G=Pi(G),Ti=Ei.indexOf(G.PARSER_MEDIA_TYPE)===-1?xa:G.PARSER_MEDIA_TYPE,Se=Ti==="application/xhtml+xml"?Xg:Ed,N=hi(G,"ALLOWED_TAGS")?oe({},G.ALLOWED_TAGS,Se):Z,ot=hi(G,"ALLOWED_ATTR")?oe({},G.ALLOWED_ATTR,Se):yt,ri=hi(G,"ALLOWED_NAMESPACES")?oe({},G.ALLOWED_NAMESPACES,Xg):Rr,Ce=hi(G,"ADD_URI_SAFE_ATTR")?oe(Pi(Qi),G.ADD_URI_SAFE_ATTR,Se):Qi,Fe=hi(G,"ADD_DATA_URI_TAGS")?oe(Pi(Ye),G.ADD_DATA_URI_TAGS,Se):Ye,He=hi(G,"FORBID_CONTENTS")?oe({},G.FORBID_CONTENTS,Se):Qe,lt=hi(G,"FORBID_TAGS")?oe({},G.FORBID_TAGS,Se):Pi({}),mt=hi(G,"FORBID_ATTR")?oe({},G.FORBID_ATTR,Se):Pi({}),lr=hi(G,"USE_PROFILES")?G.USE_PROFILES:!1,St=G.ALLOW_ARIA_ATTR!==!1,Tt=G.ALLOW_DATA_ATTR!==!1,ee=G.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=G.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pe=G.SAFE_FOR_TEMPLATES||!1,Oe=G.SAFE_FOR_XML!==!1,Ue=G.WHOLE_DOCUMENT||!1,ar=G.RETURN_DOM||!1,$e=G.RETURN_DOM_FRAGMENT||!1,le=G.RETURN_TRUSTED_TYPE||!1,sr=G.FORCE_BODY||!1,we=G.SANITIZE_DOM!==!1,ze=G.SANITIZE_NAMED_PROPS||!1,Ke=G.KEEP_CONTENT!==!1,We=G.IN_PLACE||!1,X=G.ALLOWED_URI_REGEXP||dT,Me=G.NAMESPACE||me,_r=G.MATHML_TEXT_INTEGRATION_POINTS||_r,cr=G.HTML_INTEGRATION_POINTS||cr,dt=G.CUSTOM_ELEMENT_HANDLING||{},G.CUSTOM_ELEMENT_HANDLING&&bs(G.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(dt.tagNameCheck=G.CUSTOM_ELEMENT_HANDLING.tagNameCheck),G.CUSTOM_ELEMENT_HANDLING&&bs(G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(dt.attributeNameCheck=G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),G.CUSTOM_ELEMENT_HANDLING&&typeof G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pe&&(Tt=!1),$e&&(ar=!0),lr&&(N=oe({},j2),ot=[],lr.html===!0&&(oe(N,I2),oe(ot,z2)),lr.svg===!0&&(oe(N,Qg),oe(ot,ty),oe(ot,ad)),lr.svgFilters===!0&&(oe(N,Zg),oe(ot,ty),oe(ot,ad)),lr.mathMl===!0&&(oe(N,Jg),oe(ot,W2),oe(ot,ad))),G.ADD_TAGS&&(typeof G.ADD_TAGS=="function"?xt.tagCheck=G.ADD_TAGS:(N===Z&&(N=Pi(N)),oe(N,G.ADD_TAGS,Se))),G.ADD_ATTR&&(typeof G.ADD_ATTR=="function"?xt.attributeCheck=G.ADD_ATTR:(ot===yt&&(ot=Pi(ot)),oe(ot,G.ADD_ATTR,Se))),G.ADD_URI_SAFE_ATTR&&oe(Ce,G.ADD_URI_SAFE_ATTR,Se),G.FORBID_CONTENTS&&(He===Qe&&(He=Pi(He)),oe(He,G.FORBID_CONTENTS,Se)),G.ADD_FORBID_CONTENTS&&(He===Qe&&(He=Pi(He)),oe(He,G.ADD_FORBID_CONTENTS,Se)),Ke&&(N["#text"]=!0),Ue&&oe(N,["html","head","body"]),N.table&&(oe(N,["tbody"]),delete lt.tbody),G.TRUSTED_TYPES_POLICY){if(typeof G.TRUSTED_TYPES_POLICY.createHTML!="function")throw Oc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof G.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Oc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=G.TRUSTED_TYPES_POLICY,A=L.createHTML("")}else L===void 0&&(L=sj(g,i)),L!==null&&typeof A=="string"&&(A=L.createHTML(""));on&&on(G),cn=G}},ii=oe({},[...Qg,...Zg,...XI]),un=oe({},[...Jg,...KI]),Xl=function(G){let pt=E(G);(!pt||!pt.tagName)&&(pt={namespaceURI:Me,tagName:"template"});const Lt=Ed(G.tagName),xe=Ed(pt.tagName);return ri[G.namespaceURI]?G.namespaceURI===jn?pt.namespaceURI===me?Lt==="svg":pt.namespaceURI===ei?Lt==="svg"&&(xe==="annotation-xml"||_r[xe]):!!ii[Lt]:G.namespaceURI===ei?pt.namespaceURI===me?Lt==="math":pt.namespaceURI===jn?Lt==="math"&&cr[xe]:!!un[Lt]:G.namespaceURI===me?pt.namespaceURI===jn&&!cr[xe]||pt.namespaceURI===ei&&!_r[xe]?!1:!un[Lt]&&(ni[Lt]||!ii[Lt]):!!(Ti==="application/xhtml+xml"&&ri[G.namespaceURI]):!1},ur=function(G){Bc(e.removed,{element:G});try{E(G).removeChild(G)}catch{w(G)}},hn=function(G,pt){try{Bc(e.removed,{attribute:pt.getAttributeNode(G),from:pt})}catch{Bc(e.removed,{attribute:null,from:pt})}if(pt.removeAttribute(G),G==="is")if(ar||$e)try{ur(pt)}catch{}else try{pt.setAttribute(G,"")}catch{}},Ji=function(G){let pt=null,Lt=null;if(sr)G="<remove></remove>"+G;else{const Ae=Kg(G,/^[\r\n\t ]+/);Lt=Ae&&Ae[0]}Ti==="application/xhtml+xml"&&Me===me&&(G='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+G+"</body></html>");const xe=L?L.createHTML(G):G;if(Me===me)try{pt=new m().parseFromString(xe,Ti)}catch{}if(!pt||!pt.documentElement){pt=M.createDocument(Me,"template",null);try{pt.documentElement.innerHTML=br?A:xe}catch{}}const re=pt.body||pt.documentElement;return G&&Lt&&re.insertBefore(r.createTextNode(Lt),re.childNodes[0]||null),Me===me?q.call(pt,Ue?"html":"body")[0]:Ue?pt.documentElement:re},Po=function(G){return B.call(G.ownerDocument||G,G,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Bo=function(G){return G instanceof f&&(typeof G.nodeName!="string"||typeof G.textContent!="string"||typeof G.removeChild!="function"||!(G.attributes instanceof d)||typeof G.removeAttribute!="function"||typeof G.setAttribute!="function"||typeof G.namespaceURI!="string"||typeof G.insertBefore!="function"||typeof G.hasChildNodes!="function")},ba=function(G){return typeof l=="function"&&G instanceof l};function En(Dt,G,pt){sd(Dt,Lt=>{Lt.call(e,G,pt,cn)})}const dn=function(G){let pt=null;if(En(H.beforeSanitizeElements,G,null),Bo(G))return ur(G),!0;const Lt=Se(G.nodeName);if(En(H.uponSanitizeElement,G,{tagName:Lt,allowedTags:N}),Oe&&G.hasChildNodes()&&!ba(G.firstElementChild)&&Jr(/<[/\w!]/g,G.innerHTML)&&Jr(/<[/\w!]/g,G.textContent)||G.nodeType===Dc.progressingInstruction||Oe&&G.nodeType===Dc.comment&&Jr(/<[/\w]/g,G.data))return ur(G),!0;if(!(xt.tagCheck instanceof Function&&xt.tagCheck(Lt))&&(!N[Lt]||lt[Lt])){if(!lt[Lt]&&ws(Lt)&&(dt.tagNameCheck instanceof RegExp&&Jr(dt.tagNameCheck,Lt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Lt)))return!1;if(Ke&&!He[Lt]){const xe=E(G)||G.parentNode,re=k(G)||G.childNodes;if(re&&xe){const Ae=re.length;for(let rt=Ae-1;rt>=0;--rt){const gt=x(re[rt],!0);gt.__removalCount=(G.__removalCount||0)+1,xe.insertBefore(gt,S(G))}}}return ur(G),!0}return G instanceof u&&!Xl(G)||(Lt==="noscript"||Lt==="noembed"||Lt==="noframes")&&Jr(/<\/no(script|embed|frames)/i,G.innerHTML)?(ur(G),!0):(pe&&G.nodeType===Dc.text&&(pt=G.textContent,sd([K,V,W],xe=>{pt=Nc(pt,xe," ")}),G.textContent!==pt&&(Bc(e.removed,{element:G.cloneNode()}),G.textContent=pt)),En(H.afterSanitizeElements,G,null),!1)},No=function(G,pt,Lt){if(we&&(pt==="id"||pt==="name")&&(Lt in r||Lt in Zi))return!1;if(!(Tt&&!mt[pt]&&Jr(I,pt))){if(!(St&&Jr(O,pt))){if(!(xt.attributeCheck instanceof Function&&xt.attributeCheck(pt,G))){if(!ot[pt]||mt[pt]){if(!(ws(G)&&(dt.tagNameCheck instanceof RegExp&&Jr(dt.tagNameCheck,G)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(G))&&(dt.attributeNameCheck instanceof RegExp&&Jr(dt.attributeNameCheck,pt)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(pt,G))||pt==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&Jr(dt.tagNameCheck,Lt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Lt))))return!1}else if(!Ce[pt]){if(!Jr(X,Nc(Lt,P,""))){if(!((pt==="src"||pt==="xlink:href"||pt==="href")&&G!=="script"&&VI(Lt,"data:")===0&&Fe[G])){if(!(ee&&!Jr(F,Nc(Lt,P,"")))){if(Lt)return!1}}}}}}}return!0},ws=function(G){return G!=="annotation-xml"&&Kg(G,z)},wa=function(G){En(H.beforeSanitizeAttributes,G,null);const{attributes:pt}=G;if(!pt||Bo(G))return;const Lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot,forceKeepAttr:void 0};let xe=pt.length;for(;xe--;){const re=pt[xe],{name:Ae,namespaceURI:rt,value:gt}=re,bt=Se(Ae),Et=gt;let $t=Ae==="value"?Et:UI(Et);if(Lt.attrName=bt,Lt.attrValue=$t,Lt.keepAttr=!0,Lt.forceKeepAttr=void 0,En(H.uponSanitizeAttribute,G,Lt),$t=Lt.attrValue,ze&&(bt==="id"||bt==="name")&&(hn(Ae,G),$t=nr+$t),Oe&&Jr(/((--!?|])>)|<\/(style|title|textarea)/i,$t)){hn(Ae,G);continue}if(bt==="attributename"&&Kg($t,"href")){hn(Ae,G);continue}if(Lt.forceKeepAttr)continue;if(!Lt.keepAttr){hn(Ae,G);continue}if(!Ee&&Jr(/\/>/i,$t)){hn(Ae,G);continue}pe&&sd([K,V,W],ae=>{$t=Nc($t,ae," ")});const ne=Se(G.nodeName);if(!No(ne,bt,$t)){hn(Ae,G);continue}if(L&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!rt)switch(g.getAttributeType(ne,bt)){case"TrustedHTML":{$t=L.createHTML($t);break}case"TrustedScriptURL":{$t=L.createScriptURL($t);break}}if($t!==Et)try{rt?G.setAttributeNS(rt,Ae,$t):G.setAttribute(Ae,$t),Bo(G)?ur(G):D2(e.removed)}catch{hn(Ae,G)}}En(H.afterSanitizeAttributes,G,null)},Ca=function Dt(G){let pt=null;const Lt=Po(G);for(En(H.beforeSanitizeShadowDOM,G,null);pt=Lt.nextNode();)En(H.uponSanitizeShadowNode,pt,null),dn(pt),wa(pt),pt.content instanceof o&&Dt(pt.content);En(H.afterSanitizeShadowDOM,G,null)};return e.sanitize=function(Dt){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pt=null,Lt=null,xe=null,re=null;if(br=!Dt,br&&(Dt="<!-->"),typeof Dt!="string"&&!ba(Dt))if(typeof Dt.toString=="function"){if(Dt=Dt.toString(),typeof Dt!="string")throw Oc("dirty is not a string, aborting")}else throw Oc("toString is not a function");if(!e.isSupported)return Dt;if(xr||Yr(G),e.removed=[],typeof Dt=="string"&&(We=!1),We){if(Dt.nodeName){const gt=Se(Dt.nodeName);if(!N[gt]||lt[gt])throw Oc("root node is forbidden and cannot be sanitized in-place")}}else if(Dt instanceof l)pt=Ji("<!---->"),Lt=pt.ownerDocument.importNode(Dt,!0),Lt.nodeType===Dc.element&&Lt.nodeName==="BODY"||Lt.nodeName==="HTML"?pt=Lt:pt.appendChild(Lt);else{if(!ar&&!pe&&!Ue&&Dt.indexOf("<")===-1)return L&&le?L.createHTML(Dt):Dt;if(pt=Ji(Dt),!pt)return ar?null:le?A:""}pt&&sr&&ur(pt.firstChild);const Ae=Po(We?Dt:pt);for(;xe=Ae.nextNode();)dn(xe),wa(xe),xe.content instanceof o&&Ca(xe.content);if(We)return Dt;if(ar){if($e)for(re=D.call(pt.ownerDocument);pt.firstChild;)re.appendChild(pt.firstChild);else re=pt;return(ot.shadowroot||ot.shadowrootmode)&&(re=U.call(n,re,!0)),re}let rt=Ue?pt.outerHTML:pt.innerHTML;return Ue&&N["!doctype"]&&pt.ownerDocument&&pt.ownerDocument.doctype&&pt.ownerDocument.doctype.name&&Jr(fT,pt.ownerDocument.doctype.name)&&(rt="<!DOCTYPE "+pt.ownerDocument.doctype.name+`>
|
|
85
|
+
`+rt),pe&&sd([K,V,W],gt=>{rt=Nc(rt,gt," ")}),L&&le?L.createHTML(rt):rt},e.setConfig=function(){let Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yr(Dt),xr=!0},e.clearConfig=function(){cn=null,xr=!1},e.isValidAttribute=function(Dt,G,pt){cn||Yr({});const Lt=Se(Dt),xe=Se(G);return No(Lt,xe,pt)},e.addHook=function(Dt,G){typeof G=="function"&&Bc(H[Dt],G)},e.removeHook=function(Dt,G){if(G!==void 0){const pt=HI(H[Dt],G);return pt===-1?void 0:qI(H[Dt],pt,1)[0]}return D2(H[Dt])},e.removeHooks=function(Dt){H[Dt]=[]},e.removeAllHooks=function(){H=q2()},e}var _l=pT(),mT=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,su=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,aj=/\s*%%.*\n/gm,fl,gT=(fl=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},T(fl,"UnknownDiagramError"),fl),na={},ix=T(function(t,e){t=t.replace(mT,"").replace(su,"").replace(aj,`
|
|
86
|
+
`);for(const[r,{detector:n}]of Object.entries(na))if(n(t,e))return r;throw new gT(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),jy=T((...t)=>{for(const{id:e,detector:r,loader:n}of t)yT(e,r,n)},"registerLazyLoadedDiagrams"),yT=T((t,e,r)=>{na[t]&&at.warn(`Detector with key ${t} already exists. Overwriting.`),na[t]={detector:e,loader:r},at.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),lj=T(t=>na[t].loader,"getDiagramLoader"),zy=T((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(o=>zy(t,o,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(o=>{t.includes(o)||t.push(o)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&(t[o]===void 0||typeof t[o]=="object")?(t[o]===void 0&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=zy(t[o],e[o],{depth:r-1,clobber:n})):(n||typeof t[o]!="object"&&typeof e[o]!="object")&&(t[o]=e[o])}),t)},"assignWithDepth"),pr=zy,yp="#ffffff",vp="#f2f2f2",en=T((t,e)=>e?J(t,{s:-40,l:10}):J(t,{s:-40,l:-10}),"mkBorder"),pl,cj=(pl=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,n,i,o,a,l,u,h,d,f,m,g,v,x,w,S,k,E,L,A,M;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||J(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||J(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||en(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||en(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||en(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||en(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||wt(this.tertiaryColor),this.lineColor=this.lineColor||wt(this.background),this.arrowheadColor=this.arrowheadColor||wt(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?Ht(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||Ht(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||wt(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||Rt(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||Ht(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ht(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Rt(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.darkMode)for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=Ht(this["cScale"+B],75);else for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=Ht(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||wt(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this.darkMode?this["cScalePeer"+B]=this["cScalePeer"+B]||Rt(this["cScale"+B],10):this["cScalePeer"+B]=this["cScalePeer"+B]||Ht(this["cScale"+B],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||J(this.mainBkg,{h:180,s:-15,l:e*(5+B*3)}),this["surfacePeer"+B]=this["surfacePeer"+B]||J(this.mainBkg,{h:180,s:-15,l:e*(8+B*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||J(this.primaryColor,{h:64}),this.fillType3=this.fillType3||J(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||J(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||J(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||J(this.primaryColor,{h:128}),this.fillType7=this.fillType7||J(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||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-10}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||J(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:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((l=this.radar)==null?void 0:l.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.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.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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Iu(this.quadrant1Fill)?Rt(this.quadrant1Fill):Ht(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:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((x=this.xyChart)==null?void 0:x.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((w=this.xyChart)==null?void 0:w.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((S=this.xyChart)==null?void 0:S.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((k=this.xyChart)==null?void 0:k.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.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?Ht(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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(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.git0=Ht(this.git0,25),this.git1=Ht(this.git1,25),this.git2=Ht(this.git2,25),this.git3=Ht(this.git3,25),this.git4=Ht(this.git4,25),this.git5=Ht(this.git5,25),this.git6=Ht(this.git6,25),this.git7=Ht(this.git7,25)),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(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||yp,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vp}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},T(pl,"Theme"),pl),uj=T(t=>{const e=new cj;return e.calculate(t),e},"getThemeVariables"),ml,hj=(ml=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Rt(this.primaryColor,16),this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=wt(this.background),this.secondaryBorderColor=en(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=en(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Rt(wt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ou(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=Ht("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ht(this.sectionBkgColor,10),this.taskBorderColor=ou(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ou(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||Rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ht(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,r,n,i,o,a,l,u,h,d,f,m,g,v,x,w,S,k,E,L,A;this.secondBkg=Rt(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=Rt(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=Rt(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||wt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||Rt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||J(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Iu(this.quadrant1Fill)?Rt(this.quadrant1Fill):Ht(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((x=this.radar)==null?void 0:x.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.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?Ht(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Rt(this.secondaryColor,20),this.git1=Rt(this.pie2||this.secondaryColor,20),this.git2=Rt(this.pie3||this.tertiaryColor,20),this.git3=Rt(this.pie4||J(this.primaryColor,{h:-30}),20),this.git4=Rt(this.pie5||J(this.primaryColor,{h:-60}),20),this.git5=Rt(this.pie6||J(this.primaryColor,{h:-90}),10),this.git6=Rt(this.pie7||J(this.primaryColor,{h:60}),10),this.git7=Rt(this.pie8||J(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(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||Rt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},T(ml,"Theme"),ml),dj=T(t=>{const e=new hj;return e.calculate(t),e},"getThemeVariables"),gl,fj=(gl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=J(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=en(this.primaryColor,this.darkMode),this.secondaryBorderColor=en(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=en(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(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=ou(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 e,r,n,i,o,a,l,u,h,d,f,m,g,v,x,w,S,k,E,L,A;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ht(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ht(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=Ht(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||Ht(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||J(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||J(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||J(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||wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||wt(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=Rt(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||Rt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Rt(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||J(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||J(this.primaryColor,{l:-10}),this.pie5=this.pie5||J(this.secondaryColor,{l:-30}),this.pie6=this.pie6||J(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||J(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Iu(this.quadrant1Fill)?Rt(this.quadrant1Fill):Ht(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((i=this.radar)==null?void 0:i.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((S=this.xyChart)==null?void 0:S.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(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.git0=Ht(this.git0,25),this.git1=Ht(this.git1,25),this.git2=Ht(this.git2,25),this.git3=Ht(this.git3,25),this.git4=Ht(this.git4,25),this.git5=Ht(this.git5,25),this.git6=Ht(this.git6,25),this.git7=Ht(this.git7,25)),this.gitInv0=this.gitInv0||Ht(wt(this.git0),25),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(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||yp,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vp}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},T(gl,"Theme"),gl),pj=T(t=>{const e=new fj;return e.calculate(t),e},"getThemeVariables"),yl,mj=(yl=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=Rt("#cde498",10),this.primaryBorderColor=en(this.primaryColor,this.darkMode),this.secondaryBorderColor=en(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=en(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.primaryColor),this.lineColor=wt(this.background),this.textColor=wt(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 e,r,n,i,o,a,l,u,h,d,f,m,g,v,x,w,S,k,E,L,A;this.actorBorder=Ht(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||J(this.primaryColor,{h:30}),this.cScale4=this.cScale4||J(this.primaryColor,{h:60}),this.cScale5=this.cScale5||J(this.primaryColor,{h:90}),this.cScale6=this.cScale6||J(this.primaryColor,{h:120}),this.cScale7=this.cScale7||J(this.primaryColor,{h:150}),this.cScale8=this.cScale8||J(this.primaryColor,{h:210}),this.cScale9=this.cScale9||J(this.primaryColor,{h:270}),this.cScale10=this.cScale10||J(this.primaryColor,{h:300}),this.cScale11=this.cScale11||J(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ht(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ht(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=Ht(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||Ht(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||J(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]||J(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||J(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||Rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Rt(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(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||J(this.primaryColor,{l:-30}),this.pie5=this.pie5||J(this.secondaryColor,{l:-30}),this.pie6=this.pie6||J(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||J(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||J(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||J(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||J(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||J(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Iu(this.quadrant1Fill)?Rt(this.quadrant1Fill):Ht(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((i=this.radar)==null?void 0:i.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((S=this.xyChart)==null?void 0:S.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.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||J(this.primaryColor,{h:-30}),this.git4=this.git4||J(this.primaryColor,{h:-60}),this.git5=this.git5||J(this.primaryColor,{h:-90}),this.git6=this.git6||J(this.primaryColor,{h:60}),this.git7=this.git7||J(this.primaryColor,{h:120}),this.darkMode?(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.git0=Ht(this.git0,25),this.git1=Ht(this.git1,25),this.git2=Ht(this.git2,25),this.git3=Ht(this.git3,25),this.git4=Ht(this.git4,25),this.git5=Ht(this.git5,25),this.git6=Ht(this.git6,25),this.git7=Ht(this.git7,25)),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(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||yp,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vp}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},T(yl,"Theme"),yl),gj=T(t=>{const e=new mj;return e.calculate(t),e},"getThemeVariables"),vl,yj=(vl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Rt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=J(this.primaryColor,{h:-160}),this.primaryBorderColor=en(this.primaryColor,this.darkMode),this.secondaryBorderColor=en(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=en(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(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||Rt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,n,i,o,a,l,u,h,d,f,m,g,v,x,w,S,k,E,L,A;this.secondBkg=Rt(this.contrast,55),this.border2=this.contrast,this.actorBorder=Rt(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]||wt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||Rt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||Ht(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]||J(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||J(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=Rt(this.contrast,30),this.sectionBkgColor2=Rt(this.contrast,30),this.taskBorderColor=Ht(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=Rt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ht(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=J(this.primaryColor,{h:64}),this.fillType3=J(this.secondaryColor,{h:64}),this.fillType4=J(this.primaryColor,{h:-64}),this.fillType5=J(this.secondaryColor,{h:-64}),this.fillType6=J(this.primaryColor,{h:128}),this.fillType7=J(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||J(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||J(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||J(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||J(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||J(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||J(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Iu(this.quadrant1Fill)?Rt(this.quadrant1Fill):Ht(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((v=this.radar)==null?void 0:v.axisLabelFontSize)||12,curveOpacity:((x=this.radar)==null?void 0:x.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.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=Ht(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||J(this.primaryColor,{h:-30}),this.git4=this.pie5||J(this.primaryColor,{h:-60}),this.git5=this.pie6||J(this.primaryColor,{h:-90}),this.git6=this.pie7||J(this.primaryColor,{h:60}),this.git7=this.pie8||J(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(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||yp,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vp}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},T(vl,"Theme"),vl),vj=T(t=>{const e=new yj;return e.calculate(t),e},"getThemeVariables"),vo={base:{getThemeVariables:uj},dark:{getThemeVariables:dj},default:{getThemeVariables:pj},forest:{getThemeVariables:gj},neutral:{getThemeVariables:vj}},Ri={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},vT={...Ri,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:vo.default.getThemeVariables(),sequence:{...Ri.sequence,messageFont:T(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:T(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:T(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Ri.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ri.c4,useWidth:void 0,personFont:T(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ri.flowchart,inheritDir:!1},external_personFont:T(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:T(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:T(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:T(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:T(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:T(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:T(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:T(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:T(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:T(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:T(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:T(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:T(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:T(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:T(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:T(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:T(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:T(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:T(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:T(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:T(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ri.pie,useWidth:984},xyChart:{...Ri.xyChart,useWidth:void 0},requirement:{...Ri.requirement,useWidth:void 0},packet:{...Ri.packet},radar:{...Ri.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},xT=T((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...xT(t[n],"")]:[...r,e+n],[]),"keyify"),xj=new Set(xT(vT,"")),bT=vT,Jd=T(t=>{if(at.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Jd(e));return}for(const e of Object.keys(t)){if(at.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xj.has(e)||t[e]==null){at.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){at.debug("sanitizing object",e),Jd(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(at.debug("sanitizing css option",e),t[e]=bj(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}at.debug("After sanitization",t)}},"sanitizeDirective"),bj=T(t=>{let e=0,r=0;for(const n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Tl=Object.freeze(bT),bn=pr({},Tl),tf,ia=[],au=pr({},Tl),xp=T((t,e)=>{let r=pr({},t),n={};for(const i of e)ST(i),n=pr(n,i);if(r=pr(r,n),n.theme&&n.theme in vo){const i=pr({},tf),o=pr(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in vo&&(r.themeVariables=vo[r.theme].getThemeVariables(o))}return au=r,kT(au),au},"updateCurrentConfig"),wj=T(t=>(bn=pr({},Tl),bn=pr(bn,t),t.theme&&vo[t.theme]&&(bn.themeVariables=vo[t.theme].getThemeVariables(t.themeVariables)),xp(bn,ia),bn),"setSiteConfig"),Cj=T(t=>{tf=pr({},t)},"saveConfigFromInitialize"),Sj=T(t=>(bn=pr(bn,t),xp(bn,ia),bn),"updateSiteConfig"),wT=T(()=>pr({},bn),"getSiteConfig"),CT=T(t=>(kT(t),pr(au,t),Wr()),"setConfig"),Wr=T(()=>pr({},au),"getConfig"),ST=T(t=>{t&&(["secure",...bn.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(at.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&ST(t[e])}))},"sanitize"),kj=T(t=>{var e;Jd(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ia.push(t),xp(bn,ia)},"addDirective"),ef=T((t=bn)=>{ia=[],xp(t,ia)},"reset"),_j={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},V2={},Tj=T(t=>{V2[t]||(at.warn(_j[t]),V2[t]=!0)},"issueWarning"),kT=T(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Tj("LAZY_LOAD_DEPRECATED")},"checkConfig"),DZ=T(()=>{let t={};tf&&(t=pr(t,tf));for(const e of ia)t=pr(t,e);return t},"getUserDefinedConfig"),ju=/<br\s*\/?>/gi,Ej=T(t=>t?ET(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),$j=(()=>{let t=!1;return()=>{t||(_T(),t=!0)}})();function _T(){const t="data-temp-href-target";_l.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),_l.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}T(_T,"setupDompurifyHooks");var TT=T(t=>($j(),_l.sanitize(t)),"removeScript"),U2=T((t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=TT(t):n!=="loose"&&(t=ET(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=Rj(t))}return t},"sanitizeMore"),Kn=T((t,e)=>t&&(e.dompurifyConfig?t=_l.sanitize(U2(t,e),e.dompurifyConfig).toString():t=_l.sanitize(U2(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Lj=T((t,e)=>typeof t=="string"?Kn(t,e):t.flat().map(r=>Kn(r,e)),"sanitizeTextOrArray"),Mj=T(t=>ju.test(t),"hasBreaks"),Aj=T(t=>t.split(ju),"splitBreaks"),Rj=T(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ET=T(t=>t.replace(ju,"#br#"),"breakToPlaceholder"),Pj=T(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),vr=T(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Bj=T(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Nj=T(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),Y2=T(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){const o=e[n-1],a=e[n+1];Oj(o,a)&&(i=o+","+a,n++,r.pop())}r.push(Fj(i))}return r.join("")},"parseGenericTypes"),Wy=T((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Oj=T((t,e)=>{const r=Wy(t,"~"),n=Wy(e,"~");return r===1&&n===1},"shouldCombineSets"),Fj=T(t=>{const e=Wy(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),o=n.lastIndexOf("~");for(;i!==-1&&o!==-1&&i!==o;)n[i]="<",n[o]=">",i=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),G2=T(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Hy=/\$\$(.*)\$\$/g,El=T(t=>{var e;return(((e=t.match(Hy))==null?void 0:e.length)??0)>0},"hasKatex"),IZ=T(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await ox(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),Dj=T(async(t,e)=>{if(!El(t))return t;if(!(G2()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Hy,"MathML is unsupported in this environment.");{const{default:r}=await ve(async()=>{const{default:i}=await import("./katex-Cu_Erd72.js");return{default:i}},[],import.meta.url),n=e.forceLegacyMathML||!G2()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ju).map(i=>El(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(Hy,(i,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),ox=T(async(t,e)=>Kn(await Dj(t,e),e),"renderKatexSanitized"),Hl={getRows:Ej,sanitizeText:Kn,sanitizeTextOrArray:Lj,hasBreaks:Mj,splitBreaks:Aj,lineBreakRegex:ju,removeScript:TT,getUrl:Pj,evaluate:vr,getMax:Bj,getMin:Nj},Ij=T(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),jj=T(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),$T=T(function(t,e,r,n){const i=jj(e,r,n);Ij(t,i)},"configureSvgSize"),zj=T(function(t,e,r,n){const i=e.node().getBBox(),o=i.width,a=i.height;at.info(`SVG bounds: ${o}x${a}`,i);let l=0,u=0;at.info(`Graph bounds: ${l}x${u}`,t),l=o+r*2,u=a+r*2,at.info(`Calculated bounds: ${l}x${u}`),$T(e,u,l,n);const h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),$d={},Wj=T((t,e,r)=>{let n="";return t in $d&&$d[t]?n=$d[t](r):at.warn(`No theme found for ${t}`),` & {
|
|
87
|
+
font-family: ${r.fontFamily};
|
|
88
|
+
font-size: ${r.fontSize};
|
|
89
|
+
fill: ${r.textColor}
|
|
90
|
+
}
|
|
91
|
+
@keyframes edge-animation-frame {
|
|
92
|
+
from {
|
|
93
|
+
stroke-dashoffset: 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@keyframes dash {
|
|
97
|
+
to {
|
|
98
|
+
stroke-dashoffset: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
& .edge-animation-slow {
|
|
102
|
+
stroke-dasharray: 9,5 !important;
|
|
103
|
+
stroke-dashoffset: 900;
|
|
104
|
+
animation: dash 50s linear infinite;
|
|
105
|
+
stroke-linecap: round;
|
|
106
|
+
}
|
|
107
|
+
& .edge-animation-fast {
|
|
108
|
+
stroke-dasharray: 9,5 !important;
|
|
109
|
+
stroke-dashoffset: 900;
|
|
110
|
+
animation: dash 20s linear infinite;
|
|
111
|
+
stroke-linecap: round;
|
|
112
|
+
}
|
|
113
|
+
/* Classes common for multiple diagrams */
|
|
114
|
+
|
|
115
|
+
& .error-icon {
|
|
116
|
+
fill: ${r.errorBkgColor};
|
|
117
|
+
}
|
|
118
|
+
& .error-text {
|
|
119
|
+
fill: ${r.errorTextColor};
|
|
120
|
+
stroke: ${r.errorTextColor};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& .edge-thickness-normal {
|
|
124
|
+
stroke-width: 1px;
|
|
125
|
+
}
|
|
126
|
+
& .edge-thickness-thick {
|
|
127
|
+
stroke-width: 3.5px
|
|
128
|
+
}
|
|
129
|
+
& .edge-pattern-solid {
|
|
130
|
+
stroke-dasharray: 0;
|
|
131
|
+
}
|
|
132
|
+
& .edge-thickness-invisible {
|
|
133
|
+
stroke-width: 0;
|
|
134
|
+
fill: none;
|
|
135
|
+
}
|
|
136
|
+
& .edge-pattern-dashed{
|
|
137
|
+
stroke-dasharray: 3;
|
|
138
|
+
}
|
|
139
|
+
.edge-pattern-dotted {
|
|
140
|
+
stroke-dasharray: 2;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& .marker {
|
|
144
|
+
fill: ${r.lineColor};
|
|
145
|
+
stroke: ${r.lineColor};
|
|
146
|
+
}
|
|
147
|
+
& .marker.cross {
|
|
148
|
+
stroke: ${r.lineColor};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
& svg {
|
|
152
|
+
font-family: ${r.fontFamily};
|
|
153
|
+
font-size: ${r.fontSize};
|
|
154
|
+
}
|
|
155
|
+
& p {
|
|
156
|
+
margin: 0
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
${n}
|
|
160
|
+
|
|
161
|
+
${e}
|
|
162
|
+
`},"getStyles"),Hj=T((t,e)=>{e!==void 0&&($d[t]=e)},"addStylesForDiagram"),qj=Wj,LT={};RI(LT,{clear:()=>Vj,getAccDescription:()=>Xj,getAccTitle:()=>Yj,getDiagramTitle:()=>Qj,setAccDescription:()=>Gj,setAccTitle:()=>Uj,setDiagramTitle:()=>Kj});var sx="",ax="",lx="",cx=T(t=>Kn(t,Wr()),"sanitizeText"),Vj=T(()=>{sx="",lx="",ax=""},"clear"),Uj=T(t=>{sx=cx(t).replace(/^\s+/g,"")},"setAccTitle"),Yj=T(()=>sx,"getAccTitle"),Gj=T(t=>{lx=cx(t).replace(/\n\s+/g,`
|
|
163
|
+
`)},"setAccDescription"),Xj=T(()=>lx,"getAccDescription"),Kj=T(t=>{ax=cx(t)},"setDiagramTitle"),Qj=T(()=>ax,"getDiagramTitle"),X2=at,Zj=nx,ge=Wr,jZ=CT,zZ=Tl,ux=T(t=>Kn(t,ge()),"sanitizeText"),Jj=zj,t8=T(()=>LT,"getCommonDb"),rf={},nf=T((t,e,r)=>{var n;rf[t]&&X2.warn(`Diagram with id ${t} already registered. Overwriting.`),rf[t]=e,r&&yT(t,r),Hj(t,e.styles),(n=e.injectUtils)==null||n.call(e,X2,Zj,ge,ux,Jj,t8(),()=>{})},"registerDiagram"),qy=T(t=>{if(t in rf)return rf[t];throw new e8(t)},"getDiagram"),xl,e8=(xl=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},T(xl,"DiagramNotFoundError"),xl),r8={value:()=>{}};function MT(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Ld(r)}function Ld(t){this._=t}function n8(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Ld.prototype=MT.prototype={constructor:Ld,on:function(t,e){var r=this._,n=n8(t+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(t=n[o]).type)&&(i=i8(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=n[o]).type)r[i]=K2(r[i],t.name,e);else if(e==null)for(i in r)r[i]=K2(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Ld(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],n=0,i=o.length;n<i;++n)o[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,o=n.length;i<o;++i)n[i].value.apply(e,r)}};function i8(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function K2(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=r8,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var Vy="http://www.w3.org/1999/xhtml";const Q2={svg:"http://www.w3.org/2000/svg",xhtml:Vy,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bp(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Q2.hasOwnProperty(e)?{space:Q2[e],local:t}:t}function o8(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Vy&&e.documentElement.namespaceURI===Vy?e.createElement(t):e.createElementNS(r,t)}}function s8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function AT(t){var e=bp(t);return(e.local?s8:o8)(e)}function a8(){}function hx(t){return t==null?a8:function(){return this.querySelector(t)}}function l8(t){typeof t!="function"&&(t=hx(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,l=n[i]=new Array(a),u,h,d=0;d<a;++d)(u=o[d])&&(h=t.call(u,u.__data__,d,o))&&("__data__"in u&&(h.__data__=u.__data__),l[d]=h);return new In(n,this._parents)}function c8(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function u8(){return[]}function RT(t){return t==null?u8:function(){return this.querySelectorAll(t)}}function h8(t){return function(){return c8(t.apply(this,arguments))}}function d8(t){typeof t=="function"?t=h8(t):t=RT(t);for(var e=this._groups,r=e.length,n=[],i=[],o=0;o<r;++o)for(var a=e[o],l=a.length,u,h=0;h<l;++h)(u=a[h])&&(n.push(t.call(u,u.__data__,h,a)),i.push(u));return new In(n,i)}function PT(t){return function(){return this.matches(t)}}function BT(t){return function(e){return e.matches(t)}}var f8=Array.prototype.find;function p8(t){return function(){return f8.call(this.children,t)}}function m8(){return this.firstElementChild}function g8(t){return this.select(t==null?m8:p8(typeof t=="function"?t:BT(t)))}var y8=Array.prototype.filter;function v8(){return Array.from(this.children)}function x8(t){return function(){return y8.call(this.children,t)}}function b8(t){return this.selectAll(t==null?v8:x8(typeof t=="function"?t:BT(t)))}function w8(t){typeof t!="function"&&(t=PT(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,l=n[i]=[],u,h=0;h<a;++h)(u=o[h])&&t.call(u,u.__data__,h,o)&&l.push(u);return new In(n,this._parents)}function NT(t){return new Array(t.length)}function C8(){return new In(this._enter||this._groups.map(NT),this._parents)}function of(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}of.prototype={constructor:of,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function S8(t){return function(){return t}}function k8(t,e,r,n,i,o){for(var a=0,l,u=e.length,h=o.length;a<h;++a)(l=e[a])?(l.__data__=o[a],n[a]=l):r[a]=new of(t,o[a]);for(;a<u;++a)(l=e[a])&&(i[a]=l)}function _8(t,e,r,n,i,o,a){var l,u,h=new Map,d=e.length,f=o.length,m=new Array(d),g;for(l=0;l<d;++l)(u=e[l])&&(m[l]=g=a.call(u,u.__data__,l,e)+"",h.has(g)?i[l]=u:h.set(g,u));for(l=0;l<f;++l)g=a.call(t,o[l],l,o)+"",(u=h.get(g))?(n[l]=u,u.__data__=o[l],h.delete(g)):r[l]=new of(t,o[l]);for(l=0;l<d;++l)(u=e[l])&&h.get(m[l])===u&&(i[l]=u)}function T8(t){return t.__data__}function E8(t,e){if(!arguments.length)return Array.from(this,T8);var r=e?_8:k8,n=this._parents,i=this._groups;typeof t!="function"&&(t=S8(t));for(var o=i.length,a=new Array(o),l=new Array(o),u=new Array(o),h=0;h<o;++h){var d=n[h],f=i[h],m=f.length,g=$8(t.call(d,d&&d.__data__,h,n)),v=g.length,x=l[h]=new Array(v),w=a[h]=new Array(v),S=u[h]=new Array(m);r(d,f,x,w,S,g,e);for(var k=0,E=0,L,A;k<v;++k)if(L=x[k]){for(k>=E&&(E=k+1);!(A=w[E])&&++E<v;);L._next=A||null}}return a=new In(a,n),a._enter=l,a._exit=u,a}function $8(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function L8(){return new In(this._exit||this._groups.map(NT),this._parents)}function M8(t,e,r){var n=this.enter(),i=this,o=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function A8(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,o=n.length,a=Math.min(i,o),l=new Array(i),u=0;u<a;++u)for(var h=r[u],d=n[u],f=h.length,m=l[u]=new Array(f),g,v=0;v<f;++v)(g=h[v]||d[v])&&(m[v]=g);for(;u<i;++u)l[u]=r[u];return new In(l,this._parents)}function R8(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function P8(t){t||(t=B8);function e(f,m){return f&&m?t(f.__data__,m.__data__):!f-!m}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],l=a.length,u=i[o]=new Array(l),h,d=0;d<l;++d)(h=a[d])&&(u[d]=h);u.sort(e)}return new In(i,this._parents).order()}function B8(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function N8(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function O8(){return Array.from(this)}function F8(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function D8(){let t=0;for(const e of this)++t;return t}function I8(){return!this.node()}function j8(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,a=i.length,l;o<a;++o)(l=i[o])&&t.call(l,l.__data__,o,i);return this}function z8(t){return function(){this.removeAttribute(t)}}function W8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H8(t,e){return function(){this.setAttribute(t,e)}}function q8(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function V8(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function U8(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Y8(t,e){var r=bp(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?W8:z8:typeof e=="function"?r.local?U8:V8:r.local?q8:H8)(r,e))}function OT(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G8(t){return function(){this.style.removeProperty(t)}}function X8(t,e,r){return function(){this.style.setProperty(t,e,r)}}function K8(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Q8(t,e,r){return arguments.length>1?this.each((e==null?G8:typeof e=="function"?K8:X8)(t,e,r??"")):$l(this.node(),t)}function $l(t,e){return t.style.getPropertyValue(e)||OT(t).getComputedStyle(t,null).getPropertyValue(e)}function Z8(t){return function(){delete this[t]}}function J8(t,e){return function(){this[t]=e}}function tz(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function ez(t,e){return arguments.length>1?this.each((e==null?Z8:typeof e=="function"?tz:J8)(t,e)):this.node()[t]}function FT(t){return t.trim().split(/^|\s+/)}function dx(t){return t.classList||new DT(t)}function DT(t){this._node=t,this._names=FT(t.getAttribute("class")||"")}DT.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function IT(t,e){for(var r=dx(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function jT(t,e){for(var r=dx(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function rz(t){return function(){IT(this,t)}}function nz(t){return function(){jT(this,t)}}function iz(t,e){return function(){(e.apply(this,arguments)?IT:jT)(this,t)}}function oz(t,e){var r=FT(t+"");if(arguments.length<2){for(var n=dx(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?iz:e?rz:nz)(r,e))}function sz(){this.textContent=""}function az(t){return function(){this.textContent=t}}function lz(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function cz(t){return arguments.length?this.each(t==null?sz:(typeof t=="function"?lz:az)(t)):this.node().textContent}function uz(){this.innerHTML=""}function hz(t){return function(){this.innerHTML=t}}function dz(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function fz(t){return arguments.length?this.each(t==null?uz:(typeof t=="function"?dz:hz)(t)):this.node().innerHTML}function pz(){this.nextSibling&&this.parentNode.appendChild(this)}function mz(){return this.each(pz)}function gz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yz(){return this.each(gz)}function vz(t){var e=typeof t=="function"?t:AT(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function xz(){return null}function bz(t,e){var r=typeof t=="function"?t:AT(t),n=e==null?xz:typeof e=="function"?e:hx(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function wz(){var t=this.parentNode;t&&t.removeChild(this)}function Cz(){return this.each(wz)}function Sz(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kz(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _z(t){return this.select(t?kz:Sz)}function Tz(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ez(t){return function(e){t.call(this,e,this.__data__)}}function $z(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function Lz(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,o;r<i;++r)o=e[r],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function Mz(t,e,r){return function(){var n=this.__on,i,o=Ez(e);if(n){for(var a=0,l=n.length;a<l;++a)if((i=n[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=e;return}}this.addEventListener(t.type,o,r),i={type:t.type,name:t.name,value:e,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Az(t,e,r){var n=$z(t+""),i,o=n.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,h=l.length,d;u<h;++u)for(i=0,d=l[u];i<o;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(l=e?Mz:Lz,i=0;i<o;++i)this.each(l(n[i],e,r));return this}function zT(t,e,r){var n=OT(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Rz(t,e){return function(){return zT(this,t,e)}}function Pz(t,e){return function(){return zT(this,t,e.apply(this,arguments))}}function Bz(t,e){return this.each((typeof e=="function"?Pz:Rz)(t,e))}function*Nz(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var WT=[null];function In(t,e){this._groups=t,this._parents=e}function zu(){return new In([[document.documentElement]],WT)}function Oz(){return this}In.prototype=zu.prototype={constructor:In,select:l8,selectAll:d8,selectChild:g8,selectChildren:b8,filter:w8,data:E8,enter:C8,exit:L8,join:M8,merge:A8,selection:Oz,order:R8,sort:P8,call:N8,nodes:O8,node:F8,size:D8,empty:I8,each:j8,attr:Y8,style:Q8,property:ez,classed:oz,text:cz,html:fz,raise:mz,lower:yz,append:vz,insert:bz,remove:Cz,clone:_z,datum:Tz,on:Az,dispatch:Bz,[Symbol.iterator]:Nz};function ce(t){return typeof t=="string"?new In([[document.querySelector(t)]],[document.documentElement]):new In([[t]],WT)}function fx(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function HT(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Wu(){}var pu=.7,sf=1/pu,hl="\\s*([+-]?\\d+)\\s*",mu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fz=/^#([0-9a-f]{3,8})$/,Dz=new RegExp(`^rgb\\(${hl},${hl},${hl}\\)$`),Iz=new RegExp(`^rgb\\(${Wi},${Wi},${Wi}\\)$`),jz=new RegExp(`^rgba\\(${hl},${hl},${hl},${mu}\\)$`),zz=new RegExp(`^rgba\\(${Wi},${Wi},${Wi},${mu}\\)$`),Wz=new RegExp(`^hsl\\(${mu},${Wi},${Wi}\\)$`),Hz=new RegExp(`^hsla\\(${mu},${Wi},${Wi},${mu}\\)$`),Z2={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};fx(Wu,gu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:J2,formatHex:J2,formatHex8:qz,formatHsl:Vz,formatRgb:tC,toString:tC});function J2(){return this.rgb().formatHex()}function qz(){return this.rgb().formatHex8()}function Vz(){return qT(this).formatHsl()}function tC(){return this.rgb().formatRgb()}function gu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Fz.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?eC(e):r===3?new Sn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ld(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ld(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Dz.exec(t))?new Sn(e[1],e[2],e[3],1):(e=Iz.exec(t))?new Sn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=jz.exec(t))?ld(e[1],e[2],e[3],e[4]):(e=zz.exec(t))?ld(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Wz.exec(t))?iC(e[1],e[2]/100,e[3]/100,1):(e=Hz.exec(t))?iC(e[1],e[2]/100,e[3]/100,e[4]):Z2.hasOwnProperty(t)?eC(Z2[t]):t==="transparent"?new Sn(NaN,NaN,NaN,0):null}function eC(t){return new Sn(t>>16&255,t>>8&255,t&255,1)}function ld(t,e,r,n){return n<=0&&(t=e=r=NaN),new Sn(t,e,r,n)}function Uz(t){return t instanceof Wu||(t=gu(t)),t?(t=t.rgb(),new Sn(t.r,t.g,t.b,t.opacity)):new Sn}function Uy(t,e,r,n){return arguments.length===1?Uz(t):new Sn(t,e,r,n??1)}function Sn(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}fx(Sn,Uy,HT(Wu,{brighter(t){return t=t==null?sf:Math.pow(sf,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?pu:Math.pow(pu,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sn(Js(this.r),Js(this.g),Js(this.b),af(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:rC,formatHex:rC,formatHex8:Yz,formatRgb:nC,toString:nC}));function rC(){return`#${Us(this.r)}${Us(this.g)}${Us(this.b)}`}function Yz(){return`#${Us(this.r)}${Us(this.g)}${Us(this.b)}${Us((isNaN(this.opacity)?1:this.opacity)*255)}`}function nC(){const t=af(this.opacity);return`${t===1?"rgb(":"rgba("}${Js(this.r)}, ${Js(this.g)}, ${Js(this.b)}${t===1?")":`, ${t})`}`}function af(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Js(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Us(t){return t=Js(t),(t<16?"0":"")+t.toString(16)}function iC(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new pi(t,e,r,n)}function qT(t){if(t instanceof pi)return new pi(t.h,t.s,t.l,t.opacity);if(t instanceof Wu||(t=gu(t)),!t)return new pi;if(t instanceof pi)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),a=NaN,l=o-i,u=(o+i)/2;return l?(e===o?a=(r-n)/l+(r<n)*6:r===o?a=(n-e)/l+2:a=(e-r)/l+4,l/=u<.5?o+i:2-o-i,a*=60):l=u>0&&u<1?0:a,new pi(a,l,u,t.opacity)}function Gz(t,e,r,n){return arguments.length===1?qT(t):new pi(t,e,r,n??1)}function pi(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}fx(pi,Gz,HT(Wu,{brighter(t){return t=t==null?sf:Math.pow(sf,t),new pi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?pu:Math.pow(pu,t),new pi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Sn(ey(t>=240?t-240:t+120,i,n),ey(t,i,n),ey(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new pi(oC(this.h),cd(this.s),cd(this.l),af(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 t=af(this.opacity);return`${t===1?"hsl(":"hsla("}${oC(this.h)}, ${cd(this.s)*100}%, ${cd(this.l)*100}%${t===1?")":`, ${t})`}`}}));function oC(t){return t=(t||0)%360,t<0?t+360:t}function cd(t){return Math.max(0,Math.min(1,t||0))}function ey(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const px=t=>()=>t;function VT(t,e){return function(r){return t+r*e}}function Xz(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function WZ(t,e){var r=e-t;return r?VT(t,r>180||r<-180?r-360*Math.round(r/360):r):px(isNaN(t)?e:t)}function Kz(t){return(t=+t)==1?UT:function(e,r){return r-e?Xz(e,r,t):px(isNaN(e)?r:e)}}function UT(t,e){var r=e-t;return r?VT(t,r):px(isNaN(t)?e:t)}const sC=(function t(e){var r=Kz(e);function n(i,o){var a=r((i=Uy(i)).r,(o=Uy(o)).r),l=r(i.g,o.g),u=r(i.b,o.b),h=UT(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=l(d),i.b=u(d),i.opacity=h(d),i+""}}return n.gamma=t,n})(1);function ns(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Yy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ry=new RegExp(Yy.source,"g");function Qz(t){return function(){return t}}function Zz(t){return function(e){return t(e)+""}}function Jz(t,e){var r=Yy.lastIndex=ry.lastIndex=0,n,i,o,a=-1,l=[],u=[];for(t=t+"",e=e+"";(n=Yy.exec(t))&&(i=ry.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,u.push({i:a,x:ns(n,i)})),r=ry.lastIndex;return r<e.length&&(o=e.slice(r),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?Zz(u[0].x):Qz(e):(e=u.length,function(h){for(var d=0,f;d<e;++d)l[(f=u[d]).i]=f.x(h);return l.join("")})}var aC=180/Math.PI,Gy={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function YT(t,e,r,n,i,o){var a,l,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),t*n<e*r&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*aC,skewX:Math.atan(u)*aC,scaleX:a,scaleY:l}}var ud;function t9(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Gy:YT(e.a,e.b,e.c,e.d,e.e,e.f)}function e9(t){return t==null||(ud||(ud=document.createElementNS("http://www.w3.org/2000/svg","g")),ud.setAttribute("transform",t),!(t=ud.transform.baseVal.consolidate()))?Gy:(t=t.matrix,YT(t.a,t.b,t.c,t.d,t.e,t.f))}function GT(t,e,r,n){function i(h){return h.length?h.pop()+" ":""}function o(h,d,f,m,g,v){if(h!==f||d!==m){var x=g.push("translate(",null,e,null,r);v.push({i:x-4,x:ns(h,f)},{i:x-2,x:ns(d,m)})}else(f||m)&&g.push("translate("+f+e+m+r)}function a(h,d,f,m){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),m.push({i:f.push(i(f)+"rotate(",null,n)-2,x:ns(h,d)})):d&&f.push(i(f)+"rotate("+d+n)}function l(h,d,f,m){h!==d?m.push({i:f.push(i(f)+"skewX(",null,n)-2,x:ns(h,d)}):d&&f.push(i(f)+"skewX("+d+n)}function u(h,d,f,m,g,v){if(h!==f||d!==m){var x=g.push(i(g)+"scale(",null,",",null,")");v.push({i:x-4,x:ns(h,f)},{i:x-2,x:ns(d,m)})}else(f!==1||m!==1)&&g.push(i(g)+"scale("+f+","+m+")")}return function(h,d){var f=[],m=[];return h=t(h),d=t(d),o(h.translateX,h.translateY,d.translateX,d.translateY,f,m),a(h.rotate,d.rotate,f,m),l(h.skewX,d.skewX,f,m),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,m),h=d=null,function(g){for(var v=-1,x=m.length,w;++v<x;)f[(w=m[v]).i]=w.x(g);return f.join("")}}}var r9=GT(t9,"px, ","px)","deg)"),n9=GT(e9,", ",")",")"),Ll=0,Xc=0,Ic=0,XT=1e3,lf,Kc,cf=0,oa=0,wp=0,yu=typeof performance=="object"&&performance.now?performance:Date,KT=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function mx(){return oa||(KT(i9),oa=yu.now()+wp)}function i9(){oa=0}function uf(){this._call=this._time=this._next=null}uf.prototype=QT.prototype={constructor:uf,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?mx():+r)+(e==null?0:+e),!this._next&&Kc!==this&&(Kc?Kc._next=this:lf=this,Kc=this),this._call=t,this._time=r,Xy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xy())}};function QT(t,e,r){var n=new uf;return n.restart(t,e,r),n}function o9(){mx(),++Ll;for(var t=lf,e;t;)(e=oa-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ll}function lC(){oa=(cf=yu.now())+wp,Ll=Xc=0;try{o9()}finally{Ll=0,a9(),oa=0}}function s9(){var t=yu.now(),e=t-cf;e>XT&&(wp-=e,cf=t)}function a9(){for(var t,e=lf,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:lf=r);Kc=t,Xy(n)}function Xy(t){if(!Ll){Xc&&(Xc=clearTimeout(Xc));var e=t-oa;e>24?(t<1/0&&(Xc=setTimeout(lC,t-yu.now()-wp)),Ic&&(Ic=clearInterval(Ic))):(Ic||(cf=yu.now(),Ic=setInterval(s9,XT)),Ll=1,KT(lC))}}function cC(t,e,r){var n=new uf;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var l9=MT("start","end","cancel","interrupt"),c9=[],ZT=0,uC=1,Ky=2,Md=3,hC=4,Qy=5,Ad=6;function Cp(t,e,r,n,i,o){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;u9(t,r,{name:e,index:n,group:i,on:l9,tween:c9,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ZT})}function gx(t,e){var r=_i(t,e);if(r.state>ZT)throw new Error("too late; already scheduled");return r}function Xi(t,e){var r=_i(t,e);if(r.state>Md)throw new Error("too late; already running");return r}function _i(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function u9(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=QT(o,0,r.time);function o(h){r.state=uC,r.timer.restart(a,r.delay,r.time),r.delay<=h&&a(h-r.delay)}function a(h){var d,f,m,g;if(r.state!==uC)return u();for(d in n)if(g=n[d],g.name===r.name){if(g.state===Md)return cC(a);g.state===hC?(g.state=Ad,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete n[d]):+d<e&&(g.state=Ad,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete n[d])}if(cC(function(){r.state===Md&&(r.state=hC,r.timer.restart(l,r.delay,r.time),l(h))}),r.state=Ky,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Ky){for(r.state=Md,i=new Array(m=r.tween.length),d=0,f=-1;d<m;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(i[++f]=g);i.length=f+1}}function l(h){for(var d=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=Qy,1),f=-1,m=i.length;++f<m;)i[f].call(t,d);r.state===Qy&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}function u(){r.state=Ad,r.timer.stop(),delete n[e];for(var h in n)return;delete t.__transition}}function h9(t,e){var r=t.__transition,n,i,o=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((n=r[a]).name!==e){o=!1;continue}i=n.state>Ky&&n.state<Qy,n.state=Ad,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[a]}o&&delete t.__transition}}function d9(t){return this.each(function(){h9(this,t)})}function f9(t,e){var r,n;return function(){var i=Xi(this,t),o=i.tween;if(o!==r){n=r=o;for(var a=0,l=n.length;a<l;++a)if(n[a].name===e){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function p9(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Xi(this,t),a=o.tween;if(a!==n){i=(n=a).slice();for(var l={name:e,value:r},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=l;break}u===h&&i.push(l)}o.tween=i}}function m9(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=_i(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===t)return a.value;return null}return this.each((e==null?f9:p9)(r,t,e))}function yx(t,e,r){var n=t._id;return t.each(function(){var i=Xi(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return _i(i,n).value[e]}}function JT(t,e){var r;return(typeof e=="number"?ns:e instanceof gu?sC:(r=gu(e))?(e=r,sC):Jz)(t,e)}function g9(t){return function(){this.removeAttribute(t)}}function y9(t){return function(){this.removeAttributeNS(t.space,t.local)}}function v9(t,e,r){var n,i=r+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===n?o:o=e(n=a,r)}}function x9(t,e,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===n?o:o=e(n=a,r)}}function b9(t,e,r){var n,i,o;return function(){var a,l=r(this),u;return l==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=l+"",a===u?null:a===n&&u===i?o:(i=u,o=e(n=a,l)))}}function w9(t,e,r){var n,i,o;return function(){var a,l=r(this),u;return l==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=l+"",a===u?null:a===n&&u===i?o:(i=u,o=e(n=a,l)))}}function C9(t,e){var r=bp(t),n=r==="transform"?n9:JT;return this.attrTween(t,typeof e=="function"?(r.local?w9:b9)(r,n,yx(this,"attr."+t,e)):e==null?(r.local?y9:g9)(r):(r.local?x9:v9)(r,n,e))}function S9(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function k9(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function _9(t,e){var r,n;function i(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&k9(t,o)),r}return i._value=e,i}function T9(t,e){var r,n;function i(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&S9(t,o)),r}return i._value=e,i}function E9(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=bp(t);return this.tween(r,(n.local?_9:T9)(n,e))}function $9(t,e){return function(){gx(this,t).delay=+e.apply(this,arguments)}}function L9(t,e){return e=+e,function(){gx(this,t).delay=e}}function M9(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$9:L9)(e,t)):_i(this.node(),e).delay}function A9(t,e){return function(){Xi(this,t).duration=+e.apply(this,arguments)}}function R9(t,e){return e=+e,function(){Xi(this,t).duration=e}}function P9(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?A9:R9)(e,t)):_i(this.node(),e).duration}function B9(t,e){if(typeof e!="function")throw new Error;return function(){Xi(this,t).ease=e}}function N9(t){var e=this._id;return arguments.length?this.each(B9(e,t)):_i(this.node(),e).ease}function O9(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Xi(this,t).ease=r}}function F9(t){if(typeof t!="function")throw new Error;return this.each(O9(this._id,t))}function D9(t){typeof t!="function"&&(t=PT(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,l=n[i]=[],u,h=0;h<a;++h)(u=o[h])&&t.call(u,u.__data__,h,o)&&l.push(u);return new So(n,this._parents,this._name,this._id)}function I9(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,o=Math.min(n,i),a=new Array(n),l=0;l<o;++l)for(var u=e[l],h=r[l],d=u.length,f=a[l]=new Array(d),m,g=0;g<d;++g)(m=u[g]||h[g])&&(f[g]=m);for(;l<n;++l)a[l]=e[l];return new So(a,this._parents,this._name,this._id)}function j9(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function z9(t,e,r){var n,i,o=j9(e)?gx:Xi;return function(){var a=o(this,t),l=a.on;l!==n&&(i=(n=l).copy()).on(e,r),a.on=i}}function W9(t,e){var r=this._id;return arguments.length<2?_i(this.node(),r).on.on(t):this.each(z9(r,t,e))}function H9(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function q9(){return this.on("end.remove",H9(this._id))}function V9(t){var e=this._name,r=this._id;typeof t!="function"&&(t=hx(t));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var l=n[a],u=l.length,h=o[a]=new Array(u),d,f,m=0;m<u;++m)(d=l[m])&&(f=t.call(d,d.__data__,m,l))&&("__data__"in d&&(f.__data__=d.__data__),h[m]=f,Cp(h[m],e,r,m,h,_i(d,r)));return new So(o,this._parents,e,r)}function U9(t){var e=this._name,r=this._id;typeof t!="function"&&(t=RT(t));for(var n=this._groups,i=n.length,o=[],a=[],l=0;l<i;++l)for(var u=n[l],h=u.length,d,f=0;f<h;++f)if(d=u[f]){for(var m=t.call(d,d.__data__,f,u),g,v=_i(d,r),x=0,w=m.length;x<w;++x)(g=m[x])&&Cp(g,e,r,x,m,v);o.push(m),a.push(d)}return new So(o,a,e,r)}var Y9=zu.prototype.constructor;function G9(){return new Y9(this._groups,this._parents)}function X9(t,e){var r,n,i;return function(){var o=$l(this,t),a=(this.style.removeProperty(t),$l(this,t));return o===a?null:o===r&&a===n?i:i=e(r=o,n=a)}}function tE(t){return function(){this.style.removeProperty(t)}}function K9(t,e,r){var n,i=r+"",o;return function(){var a=$l(this,t);return a===i?null:a===n?o:o=e(n=a,r)}}function Q9(t,e,r){var n,i,o;return function(){var a=$l(this,t),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(t),$l(this,t))),a===u?null:a===n&&u===i?o:(i=u,o=e(n=a,l))}}function Z9(t,e){var r,n,i,o="style."+e,a="end."+o,l;return function(){var u=Xi(this,t),h=u.on,d=u.value[o]==null?l||(l=tE(e)):void 0;(h!==r||i!==d)&&(n=(r=h).copy()).on(a,i=d),u.on=n}}function J9(t,e,r){var n=(t+="")=="transform"?r9:JT;return e==null?this.styleTween(t,X9(t,n)).on("end.style."+t,tE(t)):typeof e=="function"?this.styleTween(t,Q9(t,n,yx(this,"style."+t,e))).each(Z9(this._id,t)):this.styleTween(t,K9(t,n,e),r).on("end.style."+t,null)}function t7(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function e7(t,e,r){var n,i;function o(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&t7(t,a,r)),n}return o._value=e,o}function r7(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,e7(t,e,r??""))}function n7(t){return function(){this.textContent=t}}function i7(t){return function(){var e=t(this);this.textContent=e??""}}function o7(t){return this.tween("text",typeof t=="function"?i7(yx(this,"text",t)):n7(t==null?"":t+""))}function s7(t){return function(e){this.textContent=t.call(this,e)}}function a7(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&s7(i)),e}return n._value=t,n}function l7(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,a7(t))}function c7(){for(var t=this._name,e=this._id,r=eE(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],l=a.length,u,h=0;h<l;++h)if(u=a[h]){var d=_i(u,e);Cp(u,t,r,h,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new So(n,this._parents,t,r)}function u7(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var l={value:a},u={value:function(){--i===0&&o()}};r.each(function(){var h=Xi(this,n),d=h.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),h.on=e}),i===0&&o()})}var h7=0;function So(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function eE(){return++h7}var co=zu.prototype;So.prototype={constructor:So,select:V9,selectAll:U9,selectChild:co.selectChild,selectChildren:co.selectChildren,filter:D9,merge:I9,selection:G9,transition:c7,call:co.call,nodes:co.nodes,node:co.node,size:co.size,empty:co.empty,each:co.each,on:W9,attr:C9,attrTween:E9,style:J9,styleTween:r7,text:o7,textTween:l7,remove:q9,tween:m9,delay:M9,duration:P9,ease:N9,easeVarying:F9,end:u7,[Symbol.iterator]:co[Symbol.iterator]};function d7(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var f7={time:null,delay:0,duration:250,ease:d7};function p7(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function m7(t){var e,r;t instanceof So?(e=t._id,t=t._name):(e=eE(),(r=f7).time=mx(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],l=a.length,u,h=0;h<l;++h)(u=a[h])&&Cp(u,t,e,h,a,r||p7(u,e));return new So(n,this._parents,t,e)}zu.prototype.interrupt=d9;zu.prototype.transition=m7;const Zy=Math.PI,Jy=2*Zy,Ds=1e-6,g7=Jy-Ds;function rE(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function y7(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return rE;const r=10**e;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class v7{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?rE:y7(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,o,a){this._append`C${+e},${+r},${+n},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,r,n,i,o){if(e=+e,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,l=this._y1,u=n-e,h=i-r,d=a-e,f=l-r,m=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(m>Ds)if(!(Math.abs(f*u-h*d)>Ds)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let g=n-a,v=i-l,x=u*u+h*h,w=g*g+v*v,S=Math.sqrt(x),k=Math.sqrt(m),E=o*Math.tan((Zy-Math.acos((x+m-w)/(2*S*k)))/2),L=E/k,A=E/S;Math.abs(L-1)>Ds&&this._append`L${e+L*d},${r+L*f}`,this._append`A${o},${o},0,0,${+(f*g>d*v)},${this._x1=e+A*u},${this._y1=r+A*h}`}}arc(e,r,n,i,o,a){if(e=+e,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=e+l,d=r+u,f=1^a,m=a?i-o:o-i;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>Ds||Math.abs(this._y1-d)>Ds)&&this._append`L${h},${d}`,n&&(m<0&&(m=m%Jy+Jy),m>g7?this._append`A${n},${n},0,1,${f},${e-l},${r-u}A${n},${n},0,1,${f},${this._x1=h},${this._y1=d}`:m>Ds&&this._append`A${n},${n},0,${+(m>=Zy)},${f},${this._x1=e+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Qa(t){return function(){return t}}const HZ=Math.abs,qZ=Math.atan2,VZ=Math.cos,UZ=Math.max,YZ=Math.min,GZ=Math.sin,XZ=Math.sqrt,dC=1e-12,vx=Math.PI,fC=vx/2,KZ=2*vx;function QZ(t){return t>1?0:t<-1?vx:Math.acos(t)}function ZZ(t){return t>=1?fC:t<=-1?-fC:Math.asin(t)}function x7(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new v7(e)}function b7(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nE(t){this._context=t}nE.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function hf(t){return new nE(t)}function w7(t){return t[0]}function C7(t){return t[1]}function S7(t,e){var r=Qa(!0),n=null,i=hf,o=null,a=x7(l);t=typeof t=="function"?t:t===void 0?w7:Qa(t),e=typeof e=="function"?e:e===void 0?C7:Qa(e);function l(u){var h,d=(u=b7(u)).length,f,m=!1,g;for(n==null&&(o=i(g=a())),h=0;h<=d;++h)!(h<d&&r(f=u[h],h,u))===m&&((m=!m)?o.lineStart():o.lineEnd()),m&&o.point(+t(f,h,u),+e(f,h,u));if(g)return o=null,g+""||null}return l.x=function(u){return arguments.length?(t=typeof u=="function"?u:Qa(+u),l):t},l.y=function(u){return arguments.length?(e=typeof u=="function"?u:Qa(+u),l):e},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Qa(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),l):n},l}class iE{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function oE(t){return new iE(t,!0)}function sE(t){return new iE(t,!1)}function ls(){}function df(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Sp(t){this._context=t}Sp.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:df(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:df(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Rd(t){return new Sp(t)}function aE(t){this._context=t}aE.prototype={areaStart:ls,areaEnd:ls,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:df(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function k7(t){return new aE(t)}function lE(t){this._context=t}lE.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(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:df(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function _7(t){return new lE(t)}function cE(t,e){this._basis=new Sp(t),this._beta=e}cE.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],o=t[r]-n,a=e[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+u*o),this._beta*e[l]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const T7=(function t(e){function r(n){return e===1?new Sp(n):new cE(n,e)}return r.beta=function(n){return t(+n)},r})(.85);function ff(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function xx(t,e){this._context=t,this._k=(1-e)/6}xx.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:ff(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ff(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uE=(function t(e){function r(n){return new xx(n,e)}return r.tension=function(n){return t(+n)},r})(0);function bx(t,e){this._context=t,this._k=(1-e)/6}bx.prototype={areaStart:ls,areaEnd:ls,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ff(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const E7=(function t(e){function r(n){return new bx(n,e)}return r.tension=function(n){return t(+n)},r})(0);function wx(t,e){this._context=t,this._k=(1-e)/6}wx.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ff(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $7=(function t(e){function r(n){return new wx(n,e)}return r.tension=function(n){return t(+n)},r})(0);function Cx(t,e,r){var n=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>dC){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>dC){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-e*t._l12_2a)/d,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(n,i,o,a,t._x2,t._y2)}function hE(t,e){this._context=t,this._alpha=e}hE.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Cx(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dE=(function t(e){function r(n){return e?new hE(n,e):new xx(n,0)}return r.alpha=function(n){return t(+n)},r})(.5);function fE(t,e){this._context=t,this._alpha=e}fE.prototype={areaStart:ls,areaEnd:ls,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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Cx(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const L7=(function t(e){function r(n){return e?new fE(n,e):new bx(n,0)}return r.alpha=function(n){return t(+n)},r})(.5);function pE(t,e){this._context=t,this._alpha=e}pE.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Cx(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const M7=(function t(e){function r(n){return e?new pE(n,e):new wx(n,0)}return r.alpha=function(n){return t(+n)},r})(.5);function mE(t){this._context=t}mE.prototype={areaStart:ls,areaEnd:ls,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function A7(t){return new mE(t)}function pC(t){return t<0?-1:1}function mC(t,e,r){var n=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(n||i<0&&-0),a=(r-t._y1)/(i||n<0&&-0),l=(o*i+a*n)/(n+i);return(pC(o)+pC(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function gC(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ny(t,e,r){var n=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-n)/3;t._context.bezierCurveTo(n+l,i+l*e,o-l,a-l*r,o,a)}function pf(t){this._context=t}pf.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:ny(this,this._t0,gC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ny(this,gC(this,r=mC(this,t,e)),r);break;default:ny(this,this._t0,r=mC(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function gE(t){this._context=new yE(t)}(gE.prototype=Object.create(pf.prototype)).point=function(t,e){pf.prototype.point.call(this,e,t)};function yE(t){this._context=t}yE.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,o){this._context.bezierCurveTo(e,t,n,r,o,i)}};function vE(t){return new pf(t)}function xE(t){return new gE(t)}function bE(t){this._context=t}bE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=yC(t),i=yC(e),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function yC(t){var e,r=t.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function wE(t){return new bE(t)}function kp(t,e){this._context=t,this._t=e}kp.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function CE(t){return new kp(t,.5)}function SE(t){return new kp(t,0)}function kE(t){return new kp(t,1)}function Qc(t,e,r){this.k=t,this.x=e,this.y=r}Qc.prototype={constructor:Qc,scale:function(t){return t===1?this:new Qc(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Qc(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Qc.prototype;var R7=T(t=>{var i;const{securityLevel:e}=ge();let r=ce("body");if(e==="sandbox"){const a=((i=ce(`#i${t}`).node())==null?void 0:i.contentDocument)??document;r=ce(a.body)}return r.select(`#${t}`)},"selectSvgElement");function Sx(t){return typeof t>"u"||t===null}T(Sx,"isNothing");function _E(t){return typeof t=="object"&&t!==null}T(_E,"isObject");function TE(t){return Array.isArray(t)?t:Sx(t)?[]:[t]}T(TE,"toArray");function EE(t,e){var r,n,i,o;if(e)for(o=Object.keys(e),r=0,n=o.length;r<n;r+=1)i=o[r],t[i]=e[i];return t}T(EE,"extend");function $E(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}T($E,"repeat");function LE(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}T(LE,"isNegativeZero");var P7=Sx,B7=_E,N7=TE,O7=$E,F7=LE,D7=EE,mr={isNothing:P7,isObject:B7,toArray:N7,repeat:O7,isNegativeZero:F7,extend:D7};function kx(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
164
|
+
|
|
165
|
+
`+t.mark.snippet),n+" "+r):n}T(kx,"formatError");function Ml(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=kx(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}T(Ml,"YAMLException$1");Ml.prototype=Object.create(Error.prototype);Ml.prototype.constructor=Ml;Ml.prototype.toString=T(function(e){return this.name+": "+kx(this,e)},"toString");var wn=Ml;function Pd(t,e,r,n,i){var o="",a="",l=Math.floor(i/2)-1;return n-e>l&&(o=" ... ",e=n-l+o.length),r-n>l&&(a=" ...",r=n+l-a.length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:n-e+o.length}}T(Pd,"getLine");function Bd(t,e){return mr.repeat(" ",e-t.length)+t}T(Bd,"padStart");function ME(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],o,a=-1;o=r.exec(t.buffer);)i.push(o.index),n.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var l="",u,h,d=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+d+3);for(u=1;u<=e.linesBefore&&!(a-u<0);u++)h=Pd(t.buffer,n[a-u],i[a-u],t.position-(n[a]-n[a-u]),f),l=mr.repeat(" ",e.indent)+Bd((t.line-u+1).toString(),d)+" | "+h.str+`
|
|
166
|
+
`+l;for(h=Pd(t.buffer,n[a],i[a],t.position,f),l+=mr.repeat(" ",e.indent)+Bd((t.line+1).toString(),d)+" | "+h.str+`
|
|
167
|
+
`,l+=mr.repeat("-",e.indent+d+3+h.pos)+`^
|
|
168
|
+
`,u=1;u<=e.linesAfter&&!(a+u>=i.length);u++)h=Pd(t.buffer,n[a+u],i[a+u],t.position-(n[a]-n[a+u]),f),l+=mr.repeat(" ",e.indent)+Bd((t.line+u+1).toString(),d)+" | "+h.str+`
|
|
169
|
+
`;return l.replace(/\n$/,"")}T(ME,"makeSnippet");var I7=ME,j7=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],z7=["scalar","sequence","mapping"];function AE(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}T(AE,"compileStyleAliases");function RE(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(j7.indexOf(r)===-1)throw new wn('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=AE(e.styleAliases||null),z7.indexOf(this.kind)===-1)throw new wn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}T(RE,"Type$1");var Hr=RE;function t0(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(o,a){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(i=a)}),r[i]=n}),r}T(t0,"compileList");function PE(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(T(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}T(PE,"compileMap");function mf(t){return this.extend(t)}T(mf,"Schema$1");mf.prototype.extend=T(function(e){var r=[],n=[];if(e instanceof Hr)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new wn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Hr))throw new wn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new wn("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 wn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Hr))throw new wn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(mf.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=t0(i,"implicit"),i.compiledExplicit=t0(i,"explicit"),i.compiledTypeMap=PE(i.compiledImplicit,i.compiledExplicit),i},"extend");var W7=mf,H7=new Hr("tag:yaml.org,2002:str",{kind:"scalar",construct:T(function(t){return t!==null?t:""},"construct")}),q7=new Hr("tag:yaml.org,2002:seq",{kind:"sequence",construct:T(function(t){return t!==null?t:[]},"construct")}),V7=new Hr("tag:yaml.org,2002:map",{kind:"mapping",construct:T(function(t){return t!==null?t:{}},"construct")}),U7=new W7({explicit:[H7,q7,V7]});function BE(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}T(BE,"resolveYamlNull");function NE(){return null}T(NE,"constructYamlNull");function OE(t){return t===null}T(OE,"isNull");var Y7=new Hr("tag:yaml.org,2002:null",{kind:"scalar",resolve:BE,construct:NE,predicate:OE,represent:{canonical:T(function(){return"~"},"canonical"),lowercase:T(function(){return"null"},"lowercase"),uppercase:T(function(){return"NULL"},"uppercase"),camelcase:T(function(){return"Null"},"camelcase"),empty:T(function(){return""},"empty")},defaultStyle:"lowercase"});function FE(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}T(FE,"resolveYamlBoolean");function DE(t){return t==="true"||t==="True"||t==="TRUE"}T(DE,"constructYamlBoolean");function IE(t){return Object.prototype.toString.call(t)==="[object Boolean]"}T(IE,"isBoolean");var G7=new Hr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:FE,construct:DE,predicate:IE,represent:{lowercase:T(function(t){return t?"true":"false"},"lowercase"),uppercase:T(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:T(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function jE(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}T(jE,"isHexCode");function zE(t){return 48<=t&&t<=55}T(zE,"isOctCode");function WE(t){return 48<=t&&t<=57}T(WE,"isDecCode");function HE(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!jE(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!zE(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!WE(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}T(HE,"resolveYamlInteger");function qE(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}T(qE,"constructYamlInteger");function VE(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!mr.isNegativeZero(t)}T(VE,"isInteger");var X7=new Hr("tag:yaml.org,2002:int",{kind:"scalar",resolve:HE,construct:qE,predicate:VE,represent:{binary:T(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:T(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:T(function(t){return t.toString(10)},"decimal"),hexadecimal:T(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),K7=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function UE(t){return!(t===null||!K7.test(t)||t[t.length-1]==="_")}T(UE,"resolveYamlFloat");function YE(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}T(YE,"constructYamlFloat");var Q7=/^[-+]?[0-9]+e/;function GE(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(mr.isNegativeZero(t))return"-0.0";return r=t.toString(10),Q7.test(r)?r.replace("e",".e"):r}T(GE,"representYamlFloat");function XE(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||mr.isNegativeZero(t))}T(XE,"isFloat");var Z7=new Hr("tag:yaml.org,2002:float",{kind:"scalar",resolve:UE,construct:YE,predicate:XE,represent:GE,defaultStyle:"lowercase"}),KE=U7.extend({implicit:[Y7,G7,X7,Z7]}),J7=KE,QE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ZE=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 JE(t){return t===null?!1:QE.exec(t)!==null||ZE.exec(t)!==null}T(JE,"resolveYamlTimestamp");function t3(t){var e,r,n,i,o,a,l,u=0,h=null,d,f,m;if(e=QE.exec(t),e===null&&(e=ZE.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(o=+e[4],a=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(d=+e[10],f=+(e[11]||0),h=(d*60+f)*6e4,e[9]==="-"&&(h=-h)),m=new Date(Date.UTC(r,n,i,o,a,l,u)),h&&m.setTime(m.getTime()-h),m}T(t3,"constructYamlTimestamp");function e3(t){return t.toISOString()}T(e3,"representYamlTimestamp");var tW=new Hr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:JE,construct:t3,instanceOf:Date,represent:e3});function r3(t){return t==="<<"||t===null}T(r3,"resolveYamlMerge");var eW=new Hr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r3}),_x=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
170
|
+
\r`;function n3(t){if(t===null)return!1;var e,r,n=0,i=t.length,o=_x;for(r=0;r<i;r++)if(e=o.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}T(n3,"resolveYamlBinary");function i3(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,o=_x,a=0,l=[];for(e=0;e<i;e++)e%4===0&&e&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|o.indexOf(n.charAt(e));return r=i%4*6,r===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):r===18?(l.push(a>>10&255),l.push(a>>2&255)):r===12&&l.push(a>>4&255),new Uint8Array(l)}T(i3,"constructYamlBinary");function o3(t){var e="",r=0,n,i,o=t.length,a=_x;for(n=0;n<o;n++)n%3===0&&n&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[n];return i=o%3,i===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):i===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):i===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}T(o3,"representYamlBinary");function s3(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}T(s3,"isBinary");var rW=new Hr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n3,construct:i3,predicate:s3,represent:o3}),nW=Object.prototype.hasOwnProperty,iW=Object.prototype.toString;function a3(t){if(t===null)return!0;var e=[],r,n,i,o,a,l=t;for(r=0,n=l.length;r<n;r+=1){if(i=l[r],a=!1,iW.call(i)!=="[object Object]")return!1;for(o in i)if(nW.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}T(a3,"resolveYamlOmap");function l3(t){return t!==null?t:[]}T(l3,"constructYamlOmap");var oW=new Hr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a3,construct:l3}),sW=Object.prototype.toString;function c3(t){if(t===null)return!0;var e,r,n,i,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(n=a[e],sW.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;o[e]=[i[0],n[i[0]]]}return!0}T(c3,"resolveYamlPairs");function u3(t){if(t===null)return[];var e,r,n,i,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1)n=a[e],i=Object.keys(n),o[e]=[i[0],n[i[0]]];return o}T(u3,"constructYamlPairs");var aW=new Hr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:c3,construct:u3}),lW=Object.prototype.hasOwnProperty;function h3(t){if(t===null)return!0;var e,r=t;for(e in r)if(lW.call(r,e)&&r[e]!==null)return!1;return!0}T(h3,"resolveYamlSet");function d3(t){return t!==null?t:{}}T(d3,"constructYamlSet");var cW=new Hr("tag:yaml.org,2002:set",{kind:"mapping",resolve:h3,construct:d3}),f3=J7.extend({implicit:[tW,eW],explicit:[rW,oW,aW,cW]}),cs=Object.prototype.hasOwnProperty,gf=1,p3=2,m3=3,yf=4,iy=1,uW=2,vC=3,hW=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,dW=/[\x85\u2028\u2029]/,fW=/[,\[\]\{\}]/,g3=/^(?:!|!!|![a-z\-]+!)$/i,y3=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function e0(t){return Object.prototype.toString.call(t)}T(e0,"_class");function xi(t){return t===10||t===13}T(xi,"is_EOL");function os(t){return t===9||t===32}T(os,"is_WHITE_SPACE");function rn(t){return t===9||t===32||t===10||t===13}T(rn,"is_WS_OR_EOL");function Ys(t){return t===44||t===91||t===93||t===123||t===125}T(Ys,"is_FLOW_INDICATOR");function v3(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}T(v3,"fromHexCode");function x3(t){return t===120?2:t===117?4:t===85?8:0}T(x3,"escapedHexLen");function b3(t){return 48<=t&&t<=57?t-48:-1}T(b3,"fromDecimalCode");function r0(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
171
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}T(r0,"simpleEscapeSequence");function w3(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}T(w3,"charFromCodepoint");var C3=new Array(256),S3=new Array(256);for(Ns=0;Ns<256;Ns++)C3[Ns]=r0(Ns)?1:0,S3[Ns]=r0(Ns);var Ns;function k3(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||f3,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}T(k3,"State$1");function Tx(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=I7(r),new wn(e,r)}T(Tx,"generateError");function Wt(t,e){throw Tx(t,e)}T(Wt,"throwError");function vu(t,e){t.onWarning&&t.onWarning.call(null,Tx(t,e))}T(vu,"throwWarning");var xC={YAML:T(function(e,r,n){var i,o,a;e.version!==null&&Wt(e,"duplication of %YAML directive"),n.length!==1&&Wt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Wt(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&Wt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&vu(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:T(function(e,r,n){var i,o;n.length!==2&&Wt(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],g3.test(i)||Wt(e,"ill-formed tag handle (first argument) of the TAG directive"),cs.call(e.tagMap,i)&&Wt(e,'there is a previously declared suffix for "'+i+'" tag handle'),y3.test(o)||Wt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Wt(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o},"handleTagDirective")};function xo(t,e,r,n){var i,o,a,l;if(e<r){if(l=t.input.slice(e,r),n)for(i=0,o=l.length;i<o;i+=1)a=l.charCodeAt(i),a===9||32<=a&&a<=1114111||Wt(t,"expected valid JSON character");else hW.test(l)&&Wt(t,"the stream contains non-printable characters");t.result+=l}}T(xo,"captureSegment");function n0(t,e,r,n){var i,o,a,l;for(mr.isObject(r)||Wt(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,l=i.length;a<l;a+=1)o=i[a],cs.call(e,o)||(e[o]=r[o],n[o]=!0)}T(n0,"mergeMappings");function Gs(t,e,r,n,i,o,a,l,u){var h,d;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,d=i.length;h<d;h+=1)Array.isArray(i[h])&&Wt(t,"nested arrays are not supported inside keys"),typeof i=="object"&&e0(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&e0(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(h=0,d=o.length;h<d;h+=1)n0(t,e,o[h],r);else n0(t,e,o,r);else!t.json&&!cs.call(r,i)&&cs.call(e,i)&&(t.line=a||t.line,t.lineStart=l||t.lineStart,t.position=u||t.position,Wt(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[i]=o,delete r[i];return e}T(Gs,"storeMappingPair");function _p(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Wt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}T(_p,"readLineBreak");function tr(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;os(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(xi(i))for(_p(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&vu(t,"deficient indentation"),n}T(tr,"skipSeparationSpace");function Hu(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||rn(r)))}T(Hu,"testDocumentSeparator");function Tp(t,e){e===1?t.result+=" ":e>1&&(t.result+=mr.repeat(`
|
|
172
|
+
`,e-1))}T(Tp,"writeFoldedLines");function _3(t,e,r){var n,i,o,a,l,u,h,d,f=t.kind,m=t.result,g;if(g=t.input.charCodeAt(t.position),rn(g)||Ys(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(i=t.input.charCodeAt(t.position+1),rn(i)||r&&Ys(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,l=!1;g!==0;){if(g===58){if(i=t.input.charCodeAt(t.position+1),rn(i)||r&&Ys(i))break}else if(g===35){if(n=t.input.charCodeAt(t.position-1),rn(n))break}else{if(t.position===t.lineStart&&Hu(t)||r&&Ys(g))break;if(xi(g))if(u=t.line,h=t.lineStart,d=t.lineIndent,tr(t,!1,-1),t.lineIndent>=e){l=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=u,t.lineStart=h,t.lineIndent=d;break}}l&&(xo(t,o,a,!1),Tp(t,t.line-u),o=a=t.position,l=!1),os(g)||(a=t.position+1),g=t.input.charCodeAt(++t.position)}return xo(t,o,a,!1),t.result?!0:(t.kind=f,t.result=m,!1)}T(_3,"readPlainScalar");function T3(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(xo(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else xi(r)?(xo(t,n,i,!0),Tp(t,tr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Hu(t)?Wt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Wt(t,"unexpected end of the stream within a single quoted scalar")}T(T3,"readSingleQuotedScalar");function E3(t,e){var r,n,i,o,a,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return xo(t,r,t.position,!0),t.position++,!0;if(l===92){if(xo(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),xi(l))tr(t,!1,e);else if(l<256&&C3[l])t.result+=S3[l],t.position++;else if((a=x3(l))>0){for(i=a,o=0;i>0;i--)l=t.input.charCodeAt(++t.position),(a=v3(l))>=0?o=(o<<4)+a:Wt(t,"expected hexadecimal character");t.result+=w3(o),t.position++}else Wt(t,"unknown escape sequence");r=n=t.position}else xi(l)?(xo(t,r,n,!0),Tp(t,tr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Hu(t)?Wt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Wt(t,"unexpected end of the stream within a double quoted scalar")}T(E3,"readDoubleQuotedScalar");function $3(t,e){var r=!0,n,i,o,a=t.tag,l,u=t.anchor,h,d,f,m,g,v=Object.create(null),x,w,S,k;if(k=t.input.charCodeAt(t.position),k===91)d=93,g=!1,l=[];else if(k===123)d=125,g=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),k=t.input.charCodeAt(++t.position);k!==0;){if(tr(t,!0,e),k=t.input.charCodeAt(t.position),k===d)return t.position++,t.tag=a,t.anchor=u,t.kind=g?"mapping":"sequence",t.result=l,!0;r?k===44&&Wt(t,"expected the node content, but found ','"):Wt(t,"missed comma between flow collection entries"),w=x=S=null,f=m=!1,k===63&&(h=t.input.charCodeAt(t.position+1),rn(h)&&(f=m=!0,t.position++,tr(t,!0,e))),n=t.line,i=t.lineStart,o=t.position,sa(t,e,gf,!1,!0),w=t.tag,x=t.result,tr(t,!0,e),k=t.input.charCodeAt(t.position),(m||t.line===n)&&k===58&&(f=!0,k=t.input.charCodeAt(++t.position),tr(t,!0,e),sa(t,e,gf,!1,!0),S=t.result),g?Gs(t,l,v,w,x,S,n,i,o):f?l.push(Gs(t,null,v,w,x,S,n,i,o)):l.push(x),tr(t,!0,e),k=t.input.charCodeAt(t.position),k===44?(r=!0,k=t.input.charCodeAt(++t.position)):r=!1}Wt(t,"unexpected end of the stream within a flow collection")}T($3,"readFlowCollection");function L3(t,e){var r,n,i=iy,o=!1,a=!1,l=e,u=0,h=!1,d,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)iy===i?i=f===43?vC:uW:Wt(t,"repeat of a chomping mode identifier");else if((d=b3(f))>=0)d===0?Wt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Wt(t,"repeat of an indentation width identifier"):(l=e+d-1,a=!0);else break;if(os(f)){do f=t.input.charCodeAt(++t.position);while(os(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!xi(f)&&f!==0)}for(;f!==0;){for(_p(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<l)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>l&&(l=t.lineIndent),xi(f)){u++;continue}if(t.lineIndent<l){i===vC?t.result+=mr.repeat(`
|
|
173
|
+
`,o?1+u:u):i===iy&&o&&(t.result+=`
|
|
174
|
+
`);break}for(n?os(f)?(h=!0,t.result+=mr.repeat(`
|
|
175
|
+
`,o?1+u:u)):h?(h=!1,t.result+=mr.repeat(`
|
|
176
|
+
`,u+1)):u===0?o&&(t.result+=" "):t.result+=mr.repeat(`
|
|
177
|
+
`,u):t.result+=mr.repeat(`
|
|
178
|
+
`,o?1+u:u),o=!0,a=!0,u=0,r=t.position;!xi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);xo(t,r,t.position,!1)}return!0}T(L3,"readBlockScalar");function i0(t,e){var r,n=t.tag,i=t.anchor,o=[],a,l=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Wt(t,"tab characters must not be used in indentation")),!(u!==45||(a=t.input.charCodeAt(t.position+1),!rn(a))));){if(l=!0,t.position++,tr(t,!0,-1)&&t.lineIndent<=e){o.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,sa(t,e,m3,!1,!0),o.push(t.result),tr(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Wt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return l?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=o,!0):!1}T(i0,"readBlockSequence");function M3(t,e,r){var n,i,o,a,l,u,h=t.tag,d=t.anchor,f={},m=Object.create(null),g=null,v=null,x=null,w=!1,S=!1,k;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),k=t.input.charCodeAt(t.position);k!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Wt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),o=t.line,(k===63||k===58)&&rn(n))k===63?(w&&(Gs(t,f,m,g,v,null,a,l,u),g=v=x=null),S=!0,w=!0,i=!0):w?(w=!1,i=!0):Wt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,k=n;else{if(a=t.line,l=t.lineStart,u=t.position,!sa(t,r,p3,!1,!0))break;if(t.line===o){for(k=t.input.charCodeAt(t.position);os(k);)k=t.input.charCodeAt(++t.position);if(k===58)k=t.input.charCodeAt(++t.position),rn(k)||Wt(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(Gs(t,f,m,g,v,null,a,l,u),g=v=x=null),S=!0,w=!1,i=!1,g=t.tag,v=t.result;else if(S)Wt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=d,!0}else if(S)Wt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=d,!0}if((t.line===o||t.lineIndent>e)&&(w&&(a=t.line,l=t.lineStart,u=t.position),sa(t,e,yf,!0,i)&&(w?v=t.result:x=t.result),w||(Gs(t,f,m,g,v,x,a,l,u),g=v=x=null),tr(t,!0,-1),k=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&k!==0)Wt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&Gs(t,f,m,g,v,null,a,l,u),S&&(t.tag=h,t.anchor=d,t.kind="mapping",t.result=f),S}T(M3,"readBlockMapping");function A3(t){var e,r=!1,n=!1,i,o,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Wt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(n=!0,i="!!",a=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(o=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Wt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!rn(a);)a===33&&(n?Wt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),g3.test(i)||Wt(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),fW.test(o)&&Wt(t,"tag suffix cannot contain flow indicator characters")}o&&!y3.test(o)&&Wt(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Wt(t,"tag name is malformed: "+o)}return r?t.tag=o:cs.call(t.tagMap,i)?t.tag=t.tagMap[i]+o:i==="!"?t.tag="!"+o:i==="!!"?t.tag="tag:yaml.org,2002:"+o:Wt(t,'undeclared tag handle "'+i+'"'),!0}T(A3,"readTagProperty");function R3(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Wt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!rn(r)&&!Ys(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Wt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}T(R3,"readAnchorProperty");function P3(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!rn(n)&&!Ys(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Wt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),cs.call(t.anchorMap,r)||Wt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],tr(t,!0,-1),!0}T(P3,"readAlias");function sa(t,e,r,n,i){var o,a,l,u=1,h=!1,d=!1,f,m,g,v,x,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=l=yf===r||m3===r,n&&tr(t,!0,-1)&&(h=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;A3(t)||R3(t);)tr(t,!0,-1)?(h=!0,l=o,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):l=!1;if(l&&(l=h||i),(u===1||yf===r)&&(gf===r||p3===r?x=e:x=e+1,w=t.position-t.lineStart,u===1?l&&(i0(t,w)||M3(t,w,x))||$3(t,x)?d=!0:(a&&L3(t,x)||T3(t,x)||E3(t,x)?d=!0:P3(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Wt(t,"alias node should not have any properties")):_3(t,x,gf===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(d=l&&i0(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Wt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,m=t.implicitTypes.length;f<m;f+=1)if(v=t.implicitTypes[f],v.resolve(t.result)){t.result=v.construct(t.result),t.tag=v.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(cs.call(t.typeMap[t.kind||"fallback"],t.tag))v=t.typeMap[t.kind||"fallback"][t.tag];else for(v=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,m=g.length;f<m;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){v=g[f];break}v||Wt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&v.kind!==t.kind&&Wt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+v.kind+'", not "'+t.kind+'"'),v.resolve(t.result,t.tag)?(t.result=v.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Wt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}T(sa,"composeNode");function B3(t){var e=t.position,r,n,i,o=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(tr(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(o=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!rn(a);)a=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Wt(t,"directive name must not be less than one character in length");a!==0;){for(;os(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!xi(a));break}if(xi(a))break;for(r=t.position;a!==0&&!rn(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}a!==0&&_p(t),cs.call(xC,n)?xC[n](t,n,i):vu(t,'unknown document directive "'+n+'"')}if(tr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,tr(t,!0,-1)):o&&Wt(t,"directives end mark is expected"),sa(t,t.lineIndent-1,yf,!1,!0),tr(t,!0,-1),t.checkLineBreaks&&dW.test(t.input.slice(e,t.position))&&vu(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Hu(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,tr(t,!0,-1));return}if(t.position<t.length-1)Wt(t,"end of the stream or a document separator is expected");else return}T(B3,"readDocument");function Ex(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
179
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new k3(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Wt(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;)B3(r);return r.documents}T(Ex,"loadDocuments");function pW(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Ex(t,r);if(typeof e!="function")return n;for(var i=0,o=n.length;i<o;i+=1)e(n[i])}T(pW,"loadAll$1");function N3(t,e){var r=Ex(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new wn("expected a single document in the stream, but found more")}}T(N3,"load$1");var mW=N3,gW={load:mW},O3=Object.prototype.toString,F3=Object.prototype.hasOwnProperty,$x=65279,yW=9,xu=10,vW=13,xW=32,bW=33,wW=34,o0=35,CW=37,SW=38,kW=39,_W=42,D3=44,TW=45,vf=58,EW=61,$W=62,LW=63,MW=64,I3=91,j3=93,AW=96,z3=123,RW=124,W3=125,Ur={};Ur[0]="\\0";Ur[7]="\\a";Ur[8]="\\b";Ur[9]="\\t";Ur[10]="\\n";Ur[11]="\\v";Ur[12]="\\f";Ur[13]="\\r";Ur[27]="\\e";Ur[34]='\\"';Ur[92]="\\\\";Ur[133]="\\N";Ur[160]="\\_";Ur[8232]="\\L";Ur[8233]="\\P";var PW=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],BW=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function H3(t,e){var r,n,i,o,a,l,u;if(e===null)return{};for(r={},n=Object.keys(e),i=0,o=n.length;i<o;i+=1)a=n[i],l=String(e[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),u=t.compiledTypeMap.fallback[a],u&&F3.call(u.styleAliases,l)&&(l=u.styleAliases[l]),r[a]=l;return r}T(H3,"compileStyleMap");function q3(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new wn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+mr.repeat("0",n-e.length)+e}T(q3,"encodeHex");var NW=1,bu=2;function V3(t){this.schema=t.schema||f3,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=mr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=H3(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?bu:NW,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}T(V3,"State");function s0(t,e){for(var r=mr.repeat(" ",e),n=0,i=-1,o="",a,l=t.length;n<l;)i=t.indexOf(`
|
|
180
|
+
`,n),i===-1?(a=t.slice(n),n=l):(a=t.slice(n,i+1),n=i+1),a.length&&a!==`
|
|
181
|
+
`&&(o+=r),o+=a;return o}T(s0,"indentString");function xf(t,e){return`
|
|
182
|
+
`+mr.repeat(" ",t.indent*e)}T(xf,"generateNextLine");function U3(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}T(U3,"testImplicitResolving");function wu(t){return t===xW||t===yW}T(wu,"isWhitespace");function Al(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==$x||65536<=t&&t<=1114111}T(Al,"isPrintable");function a0(t){return Al(t)&&t!==$x&&t!==vW&&t!==xu}T(a0,"isNsCharOrWhitespace");function l0(t,e,r){var n=a0(t),i=n&&!wu(t);return(r?n:n&&t!==D3&&t!==I3&&t!==j3&&t!==z3&&t!==W3)&&t!==o0&&!(e===vf&&!i)||a0(e)&&!wu(e)&&t===o0||e===vf&&i}T(l0,"isPlainSafe");function Y3(t){return Al(t)&&t!==$x&&!wu(t)&&t!==TW&&t!==LW&&t!==vf&&t!==D3&&t!==I3&&t!==j3&&t!==z3&&t!==W3&&t!==o0&&t!==SW&&t!==_W&&t!==bW&&t!==RW&&t!==EW&&t!==$W&&t!==kW&&t!==wW&&t!==CW&&t!==MW&&t!==AW}T(Y3,"isPlainSafeFirst");function G3(t){return!wu(t)&&t!==vf}T(G3,"isPlainSafeLast");function il(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}T(il,"codePointAt");function Lx(t){var e=/^\n* /;return e.test(t)}T(Lx,"needIndentIndicator");var X3=1,c0=2,K3=3,Q3=4,el=5;function Z3(t,e,r,n,i,o,a,l){var u,h=0,d=null,f=!1,m=!1,g=n!==-1,v=-1,x=Y3(il(t,0))&&G3(il(t,t.length-1));if(e||a)for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=il(t,u),!Al(h))return el;x=x&&l0(h,d,l),d=h}else{for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=il(t,u),h===xu)f=!0,g&&(m=m||u-v-1>n&&t[v+1]!==" ",v=u);else if(!Al(h))return el;x=x&&l0(h,d,l),d=h}m=m||g&&u-v-1>n&&t[v+1]!==" "}return!f&&!m?x&&!a&&!i(t)?X3:o===bu?el:c0:r>9&&Lx(t)?el:a?o===bu?el:c0:m?Q3:K3}T(Z3,"chooseScalarStyle");function J3(t,e,r,n,i){t.dump=(function(){if(e.length===0)return t.quotingType===bu?'""':"''";if(!t.noCompatMode&&(PW.indexOf(e)!==-1||BW.test(e)))return t.quotingType===bu?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),a=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return U3(t,h)}switch(T(u,"testAmbiguity"),Z3(e,l,t.indent,a,u,t.quotingType,t.forceQuotes&&!n,i)){case X3:return e;case c0:return"'"+e.replace(/'/g,"''")+"'";case K3:return"|"+u0(e,t.indent)+h0(s0(e,o));case Q3:return">"+u0(e,t.indent)+h0(s0(t$(e,a),o));case el:return'"'+e$(e)+'"';default:throw new wn("impossible error: invalid scalar style")}})()}T(J3,"writeScalar");function u0(t,e){var r=Lx(t)?String(e):"",n=t[t.length-1]===`
|
|
183
|
+
`,i=n&&(t[t.length-2]===`
|
|
184
|
+
`||t===`
|
|
185
|
+
`),o=i?"+":n?"":"-";return r+o+`
|
|
186
|
+
`}T(u0,"blockHeader");function h0(t){return t[t.length-1]===`
|
|
187
|
+
`?t.slice(0,-1):t}T(h0,"dropEndingNewline");function t$(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var h=t.indexOf(`
|
|
188
|
+
`);return h=h!==-1?h:t.length,r.lastIndex=h,d0(t.slice(0,h),e)})(),i=t[0]===`
|
|
189
|
+
`||t[0]===" ",o,a;a=r.exec(t);){var l=a[1],u=a[2];o=u[0]===" ",n+=l+(!i&&!o&&u!==""?`
|
|
190
|
+
`:"")+d0(u,e),i=o}return n}T(t$,"foldString");function d0(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,o,a=0,l=0,u="";n=r.exec(t);)l=n.index,l-i>e&&(o=a>i?a:l,u+=`
|
|
191
|
+
`+t.slice(i,o),i=o+1),a=l;return u+=`
|
|
192
|
+
`,t.length-i>e&&a>i?u+=t.slice(i,a)+`
|
|
193
|
+
`+t.slice(a+1):u+=t.slice(i),u.slice(1)}T(d0,"foldLine");function e$(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=il(t,i),n=Ur[r],!n&&Al(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||q3(r);return e}T(e$,"escapeString");function r$(t,e,r){var n="",i=t.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],t.replacer&&(l=t.replacer.call(r,String(o),l)),(Vi(t,e,l,!1,!1)||typeof l>"u"&&Vi(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}T(r$,"writeFlowSequence");function f0(t,e,r,n){var i="",o=t.tag,a,l,u;for(a=0,l=r.length;a<l;a+=1)u=r[a],t.replacer&&(u=t.replacer.call(r,String(a),u)),(Vi(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Vi(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=xf(t,e)),t.dump&&xu===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=o,t.dump=i||"[]"}T(f0,"writeBlockSequence");function n$(t,e,r){var n="",i=t.tag,o=Object.keys(r),a,l,u,h,d;for(a=0,l=o.length;a<l;a+=1)d="",n!==""&&(d+=", "),t.condenseFlow&&(d+='"'),u=o[a],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Vi(t,e,u,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Vi(t,e,h,!1,!1)&&(d+=t.dump,n+=d));t.tag=i,t.dump="{"+n+"}"}T(n$,"writeFlowMapping");function i$(t,e,r,n){var i="",o=t.tag,a=Object.keys(r),l,u,h,d,f,m;if(t.sortKeys===!0)a.sort();else if(typeof t.sortKeys=="function")a.sort(t.sortKeys);else if(t.sortKeys)throw new wn("sortKeys must be a boolean or a function");for(l=0,u=a.length;l<u;l+=1)m="",(!n||i!=="")&&(m+=xf(t,e)),h=a[l],d=r[h],t.replacer&&(d=t.replacer.call(r,h,d)),Vi(t,e+1,h,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&xu===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,f&&(m+=xf(t,e)),Vi(t,e+1,d,!0,f)&&(t.dump&&xu===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,i+=m));t.tag=o,t.dump=i||"{}"}T(i$,"writeBlockMapping");function p0(t,e,r){var n,i,o,a,l,u;for(i=r?t.explicitTypes:t.implicitTypes,o=0,a=i.length;o<a;o+=1)if(l=i[o],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof e=="object"&&e instanceof l.instanceOf)&&(!l.predicate||l.predicate(e))){if(r?l.multi&&l.representName?t.tag=l.representName(e):t.tag=l.tag:t.tag="?",l.represent){if(u=t.styleMap[l.tag]||l.defaultStyle,O3.call(l.represent)==="[object Function]")n=l.represent(e,u);else if(F3.call(l.represent,u))n=l.represent[u](e,u);else throw new wn("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}T(p0,"detectType");function Vi(t,e,r,n,i,o,a){t.tag=null,t.dump=r,p0(t,r,!1)||p0(t,r,!0);var l=O3.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var d=l==="[object Object]"||l==="[object Array]",f,m;if(d&&(f=t.duplicates.indexOf(r),m=f!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&e>0)&&(i=!1),m&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(d&&m&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(i$(t,e,t.dump,i),m&&(t.dump="&ref_"+f+t.dump)):(n$(t,e,t.dump),m&&(t.dump="&ref_"+f+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!a&&e>0?f0(t,e-1,t.dump,i):f0(t,e,t.dump,i),m&&(t.dump="&ref_"+f+t.dump)):(r$(t,e,t.dump),m&&(t.dump="&ref_"+f+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&J3(t,t.dump,e,o,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new wn("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}T(Vi,"writeNode");function o$(t,e){var r=[],n=[],i,o;for(bf(t,r,n),i=0,o=n.length;i<o;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(o)}T(o$,"getDuplicateReferences");function bf(t,e,r){var n,i,o;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)bf(t[i],e,r);else for(n=Object.keys(t),i=0,o=n.length;i<o;i+=1)bf(t[n[i]],e,r)}T(bf,"inspectNode");function OW(t,e){e=e||{};var r=new V3(e);r.noRefs||o$(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Vi(r,0,n,!0,!0)?r.dump+`
|
|
194
|
+
`:""}T(OW,"dump$1");function FW(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}T(FW,"renamed");var DW=KE,IW=gW.load;/*! Bundled license information:
|
|
195
|
+
|
|
196
|
+
js-yaml/dist/js-yaml.mjs:
|
|
197
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
198
|
+
*/var Dr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},bC={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Zc(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Ie(t),e=Ie(e);const[r,n]=[t.x,t.y],[i,o]=[e.x,e.y],a=i-r,l=o-n;return{angle:Math.atan(l/a),deltaX:a,deltaY:l}}T(Zc,"calculateDeltaAndAngle");var Ie=T(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),jW=T(t=>({x:T(function(e,r,n){let i=0;const o=Ie(n[0]).x<Ie(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Dr,t.arrowTypeStart)){const{angle:g,deltaX:v}=Zc(n[0],n[1]);i=Dr[t.arrowTypeStart]*Math.cos(g)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Dr,t.arrowTypeEnd)){const{angle:g,deltaX:v}=Zc(n[n.length-1],n[n.length-2]);i=Dr[t.arrowTypeEnd]*Math.cos(g)*(v>=0?1:-1)}const a=Math.abs(Ie(e).x-Ie(n[n.length-1]).x),l=Math.abs(Ie(e).y-Ie(n[n.length-1]).y),u=Math.abs(Ie(e).x-Ie(n[0]).x),h=Math.abs(Ie(e).y-Ie(n[0]).y),d=Dr[t.arrowTypeStart],f=Dr[t.arrowTypeEnd],m=1;if(a<f&&a>0&&l<f){let g=f+m-a;g*=o==="right"?-1:1,i-=g}if(u<d&&u>0&&h<d){let g=d+m-u;g*=o==="right"?-1:1,i+=g}return Ie(e).x+i},"x"),y:T(function(e,r,n){let i=0;const o=Ie(n[0]).y<Ie(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Dr,t.arrowTypeStart)){const{angle:g,deltaY:v}=Zc(n[0],n[1]);i=Dr[t.arrowTypeStart]*Math.abs(Math.sin(g))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Dr,t.arrowTypeEnd)){const{angle:g,deltaY:v}=Zc(n[n.length-1],n[n.length-2]);i=Dr[t.arrowTypeEnd]*Math.abs(Math.sin(g))*(v>=0?1:-1)}const a=Math.abs(Ie(e).y-Ie(n[n.length-1]).y),l=Math.abs(Ie(e).x-Ie(n[n.length-1]).x),u=Math.abs(Ie(e).y-Ie(n[0]).y),h=Math.abs(Ie(e).x-Ie(n[0]).x),d=Dr[t.arrowTypeStart],f=Dr[t.arrowTypeEnd],m=1;if(a<f&&a>0&&l<f){let g=f+m-a;g*=o==="up"?-1:1,i-=g}if(u<d&&u>0&&h<d){let g=d+m-u;g*=o==="up"?-1:1,i+=g}return Ie(e).y+i},"y")}),"getLineFunctionsWithOffset"),Mx=T(({flowchart:t})=>{var i,o;const e=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,r=((o=t==null?void 0:t.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins"),zW=T(t=>{const{handDrawnSeed:e}=ge();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),ql=T(t=>{const e=WW([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),WW=T(t=>{const e=new Map;return t.forEach(r=>{const[n,i]=r.split(":");e.set(n.trim(),i==null?void 0:i.trim())}),e},"styles2Map"),s$=T(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),Nt=T(t=>{const{stylesArray:e}=ql(t),r=[],n=[],i=[],o=[];return e.forEach(a=>{const l=a[0];s$(l)?r.push(a.join(":")+" !important"):(n.push(a.join(":")+" !important"),l.includes("stroke")&&i.push(a.join(":")+" !important"),l==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:o}},"styles2String"),Bt=T((t,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=ge(),{nodeBorder:i,mainBkg:o}=r,{stylesMap:a}=ql(t);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||i,seed:n,strokeWidth:((u=a.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:HW(a.get("stroke-dasharray"))},e)},"userNodeOverrides"),HW=T(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(e.length===1){const i=isNaN(e[0])?0:e[0];return[i,i]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray"),jc={},fr={},wC;function qW(){return wC||(wC=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.BLANK_URL=fr.relativeFirstCharacters=fr.whitespaceEscapeCharsRegex=fr.urlSchemeRegex=fr.ctrlCharactersRegex=fr.htmlCtrlEntityRegex=fr.htmlEntitiesRegex=fr.invalidProtocolRegex=void 0,fr.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,fr.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,fr.htmlCtrlEntityRegex=/&(newline|tab);/gi,fr.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,fr.urlSchemeRegex=/^.+(:|:)/gim,fr.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,fr.relativeFirstCharacters=[".","/"],fr.BLANK_URL="about:blank"),fr}var CC;function VW(){if(CC)return jc;CC=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.sanitizeUrl=void 0;var t=qW();function e(a){return t.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var l=a.replace(t.ctrlCharactersRegex,"");return l.replace(t.htmlEntitiesRegex,function(u,h){return String.fromCharCode(h)})}function n(a){return URL.canParse(a)}function i(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return t.BLANK_URL;var l,u=i(a.trim());do u=r(u).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),u=i(u),l=u.match(t.ctrlCharactersRegex)||u.match(t.htmlEntitiesRegex)||u.match(t.htmlCtrlEntityRegex)||u.match(t.whitespaceEscapeCharsRegex);while(l&&l.length>0);var h=u;if(!h)return t.BLANK_URL;if(e(h))return h;var d=h.trimStart(),f=d.match(t.urlSchemeRegex);if(!f)return h;var m=f[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(m))return t.BLANK_URL;var g=d.replace(/\\/g,"/");if(m==="mailto:"||m.includes("://"))return g;if(m==="http:"||m==="https:"){if(!n(g))return t.BLANK_URL;var v=new URL(g);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return g}return jc.sanitizeUrl=o,jc}var UW=VW(),a$=typeof global=="object"&&global&&global.Object===Object&&global,YW=typeof self=="object"&&self&&self.Object===Object&&self,Ki=a$||YW||Function("return this")(),wf=Ki.Symbol,l$=Object.prototype,GW=l$.hasOwnProperty,XW=l$.toString,zc=wf?wf.toStringTag:void 0;function KW(t){var e=GW.call(t,zc),r=t[zc];try{t[zc]=void 0;var n=!0}catch{}var i=XW.call(t);return n&&(e?t[zc]=r:delete t[zc]),i}var QW=Object.prototype,ZW=QW.toString;function JW(t){return ZW.call(t)}var tH="[object Null]",eH="[object Undefined]",SC=wf?wf.toStringTag:void 0;function Vl(t){return t==null?t===void 0?eH:tH:SC&&SC in Object(t)?KW(t):JW(t)}function pa(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var rH="[object AsyncFunction]",nH="[object Function]",iH="[object GeneratorFunction]",oH="[object Proxy]";function Ax(t){if(!pa(t))return!1;var e=Vl(t);return e==nH||e==iH||e==rH||e==oH}var oy=Ki["__core-js_shared__"],kC=(function(){var t=/[^.]+$/.exec(oy&&oy.keys&&oy.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function sH(t){return!!kC&&kC in t}var aH=Function.prototype,lH=aH.toString;function ma(t){if(t!=null){try{return lH.call(t)}catch{}try{return t+""}catch{}}return""}var cH=/[\\^$.*+?()[\]{}|]/g,uH=/^\[object .+?Constructor\]$/,hH=Function.prototype,dH=Object.prototype,fH=hH.toString,pH=dH.hasOwnProperty,mH=RegExp("^"+fH.call(pH).replace(cH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gH(t){if(!pa(t)||sH(t))return!1;var e=Ax(t)?mH:uH;return e.test(ma(t))}function yH(t,e){return t==null?void 0:t[e]}function ga(t,e){var r=yH(t,e);return gH(r)?r:void 0}var Cu=ga(Object,"create");function vH(){this.__data__=Cu?Cu(null):{},this.size=0}function xH(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bH="__lodash_hash_undefined__",wH=Object.prototype,CH=wH.hasOwnProperty;function SH(t){var e=this.__data__;if(Cu){var r=e[t];return r===bH?void 0:r}return CH.call(e,t)?e[t]:void 0}var kH=Object.prototype,_H=kH.hasOwnProperty;function TH(t){var e=this.__data__;return Cu?e[t]!==void 0:_H.call(e,t)}var EH="__lodash_hash_undefined__";function $H(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Cu&&e===void 0?EH:e,this}function aa(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}aa.prototype.clear=vH;aa.prototype.delete=xH;aa.prototype.get=SH;aa.prototype.has=TH;aa.prototype.set=$H;function LH(){this.__data__=[],this.size=0}function Ep(t,e){return t===e||t!==t&&e!==e}function $p(t,e){for(var r=t.length;r--;)if(Ep(t[r][0],e))return r;return-1}var MH=Array.prototype,AH=MH.splice;function RH(t){var e=this.__data__,r=$p(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():AH.call(e,r,1),--this.size,!0}function PH(t){var e=this.__data__,r=$p(e,t);return r<0?void 0:e[r][1]}function BH(t){return $p(this.__data__,t)>-1}function NH(t,e){var r=this.__data__,n=$p(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Ro(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ro.prototype.clear=LH;Ro.prototype.delete=RH;Ro.prototype.get=PH;Ro.prototype.has=BH;Ro.prototype.set=NH;var Su=ga(Ki,"Map");function OH(){this.size=0,this.__data__={hash:new aa,map:new(Su||Ro),string:new aa}}function FH(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Lp(t,e){var r=t.__data__;return FH(e)?r[typeof e=="string"?"string":"hash"]:r.map}function DH(t){var e=Lp(this,t).delete(t);return this.size-=e?1:0,e}function IH(t){return Lp(this,t).get(t)}function jH(t){return Lp(this,t).has(t)}function zH(t,e){var r=Lp(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function gs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gs.prototype.clear=OH;gs.prototype.delete=DH;gs.prototype.get=IH;gs.prototype.has=jH;gs.prototype.set=zH;var WH="Expected a function";function qu(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(WH);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||gs),r}qu.Cache=gs;function HH(){this.__data__=new Ro,this.size=0}function qH(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function VH(t){return this.__data__.get(t)}function UH(t){return this.__data__.has(t)}var YH=200;function GH(t,e){var r=this.__data__;if(r instanceof Ro){var n=r.__data__;if(!Su||n.length<YH-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new gs(n)}return r.set(t,e),this.size=r.size,this}function Ul(t){var e=this.__data__=new Ro(t);this.size=e.size}Ul.prototype.clear=HH;Ul.prototype.delete=qH;Ul.prototype.get=VH;Ul.prototype.has=UH;Ul.prototype.set=GH;var Cf=(function(){try{var t=ga(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Rx(t,e,r){e=="__proto__"&&Cf?Cf(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function m0(t,e,r){(r!==void 0&&!Ep(t[e],r)||r===void 0&&!(e in t))&&Rx(t,e,r)}function XH(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),l=a.length;l--;){var u=a[++i];if(r(o[u],u,o)===!1)break}return e}}var KH=XH(),c$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_C=c$&&typeof module=="object"&&module&&!module.nodeType&&module,QH=_C&&_C.exports===c$,TC=QH?Ki.Buffer:void 0,EC=TC?TC.allocUnsafe:void 0;function ZH(t,e){if(e)return t.slice();var r=t.length,n=EC?EC(r):new t.constructor(r);return t.copy(n),n}var $C=Ki.Uint8Array;function JH(t){var e=new t.constructor(t.byteLength);return new $C(e).set(new $C(t)),e}function tq(t,e){var r=e?JH(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function eq(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var LC=Object.create,rq=(function(){function t(){}return function(e){if(!pa(e))return{};if(LC)return LC(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function u$(t,e){return function(r){return t(e(r))}}var h$=u$(Object.getPrototypeOf,Object),nq=Object.prototype;function Mp(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||nq;return t===r}function iq(t){return typeof t.constructor=="function"&&!Mp(t)?rq(h$(t)):{}}function Vu(t){return t!=null&&typeof t=="object"}var oq="[object Arguments]";function MC(t){return Vu(t)&&Vl(t)==oq}var d$=Object.prototype,sq=d$.hasOwnProperty,aq=d$.propertyIsEnumerable,Sf=MC((function(){return arguments})())?MC:function(t){return Vu(t)&&sq.call(t,"callee")&&!aq.call(t,"callee")},kf=Array.isArray,lq=9007199254740991;function f$(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=lq}function Ap(t){return t!=null&&f$(t.length)&&!Ax(t)}function cq(t){return Vu(t)&&Ap(t)}function uq(){return!1}var p$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,AC=p$&&typeof module=="object"&&module&&!module.nodeType&&module,hq=AC&&AC.exports===p$,RC=hq?Ki.Buffer:void 0,dq=RC?RC.isBuffer:void 0,Px=dq||uq,fq="[object Object]",pq=Function.prototype,mq=Object.prototype,m$=pq.toString,gq=mq.hasOwnProperty,yq=m$.call(Object);function vq(t){if(!Vu(t)||Vl(t)!=fq)return!1;var e=h$(t);if(e===null)return!0;var r=gq.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&m$.call(r)==yq}var xq="[object Arguments]",bq="[object Array]",wq="[object Boolean]",Cq="[object Date]",Sq="[object Error]",kq="[object Function]",_q="[object Map]",Tq="[object Number]",Eq="[object Object]",$q="[object RegExp]",Lq="[object Set]",Mq="[object String]",Aq="[object WeakMap]",Rq="[object ArrayBuffer]",Pq="[object DataView]",Bq="[object Float32Array]",Nq="[object Float64Array]",Oq="[object Int8Array]",Fq="[object Int16Array]",Dq="[object Int32Array]",Iq="[object Uint8Array]",jq="[object Uint8ClampedArray]",zq="[object Uint16Array]",Wq="[object Uint32Array]",Be={};Be[Bq]=Be[Nq]=Be[Oq]=Be[Fq]=Be[Dq]=Be[Iq]=Be[jq]=Be[zq]=Be[Wq]=!0;Be[xq]=Be[bq]=Be[Rq]=Be[wq]=Be[Pq]=Be[Cq]=Be[Sq]=Be[kq]=Be[_q]=Be[Tq]=Be[Eq]=Be[$q]=Be[Lq]=Be[Mq]=Be[Aq]=!1;function Hq(t){return Vu(t)&&f$(t.length)&&!!Be[Vl(t)]}function qq(t){return function(e){return t(e)}}var g$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lu=g$&&typeof module=="object"&&module&&!module.nodeType&&module,Vq=lu&&lu.exports===g$,sy=Vq&&a$.process,PC=(function(){try{var t=lu&&lu.require&&lu.require("util").types;return t||sy&&sy.binding&&sy.binding("util")}catch{}})(),BC=PC&&PC.isTypedArray,Bx=BC?qq(BC):Hq;function g0(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Uq=Object.prototype,Yq=Uq.hasOwnProperty;function Gq(t,e,r){var n=t[e];(!(Yq.call(t,e)&&Ep(n,r))||r===void 0&&!(e in t))&&Rx(t,e,r)}function Xq(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var l=e[o],u=void 0;u===void 0&&(u=t[l]),i?Rx(r,l,u):Gq(r,l,u)}return r}function Kq(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Qq=9007199254740991,Zq=/^(?:0|[1-9]\d*)$/;function y$(t,e){var r=typeof t;return e=e??Qq,!!e&&(r=="number"||r!="symbol"&&Zq.test(t))&&t>-1&&t%1==0&&t<e}var Jq=Object.prototype,tV=Jq.hasOwnProperty;function eV(t,e){var r=kf(t),n=!r&&Sf(t),i=!r&&!n&&Px(t),o=!r&&!n&&!i&&Bx(t),a=r||n||i||o,l=a?Kq(t.length,String):[],u=l.length;for(var h in t)(e||tV.call(t,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||y$(h,u)))&&l.push(h);return l}function rV(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var nV=Object.prototype,iV=nV.hasOwnProperty;function oV(t){if(!pa(t))return rV(t);var e=Mp(t),r=[];for(var n in t)n=="constructor"&&(e||!iV.call(t,n))||r.push(n);return r}function v$(t){return Ap(t)?eV(t,!0):oV(t)}function sV(t){return Xq(t,v$(t))}function aV(t,e,r,n,i,o,a){var l=g0(t,r),u=g0(e,r),h=a.get(u);if(h){m0(t,r,h);return}var d=o?o(l,u,r+"",t,e,a):void 0,f=d===void 0;if(f){var m=kf(u),g=!m&&Px(u),v=!m&&!g&&Bx(u);d=u,m||g||v?kf(l)?d=l:cq(l)?d=eq(l):g?(f=!1,d=ZH(u,!0)):v?(f=!1,d=tq(u,!0)):d=[]:vq(u)||Sf(u)?(d=l,Sf(l)?d=sV(l):(!pa(l)||Ax(l))&&(d=iq(u))):f=!1}f&&(a.set(u,d),i(d,u,n,o,a),a.delete(u)),m0(t,r,d)}function x$(t,e,r,n,i){t!==e&&KH(e,function(o,a){if(i||(i=new Ul),pa(o))aV(t,e,a,r,x$,n,i);else{var l=n?n(g0(t,a),o,a+"",t,e,i):void 0;l===void 0&&(l=o),m0(t,a,l)}},v$)}function b$(t){return t}function lV(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var NC=Math.max;function cV(t,e,r){return e=NC(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=NC(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=r(a),lV(t,this,l)}}function uV(t){return function(){return t}}var hV=Cf?function(t,e){return Cf(t,"toString",{configurable:!0,enumerable:!1,value:uV(e),writable:!0})}:b$,dV=800,fV=16,pV=Date.now;function mV(t){var e=0,r=0;return function(){var n=pV(),i=fV-(n-r);if(r=n,i>0){if(++e>=dV)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gV=mV(hV);function yV(t,e){return gV(cV(t,e,b$),t+"")}function vV(t,e,r){if(!pa(r))return!1;var n=typeof e;return(n=="number"?Ap(r)&&y$(e,r.length):n=="string"&&e in r)?Ep(r[e],t):!1}function xV(t){return yV(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&vV(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var l=r[n];l&&t(e,l,n,o)}return e})}var bV=xV(function(t,e,r){x$(t,e,r)}),wV="",CV={curveBasis:Rd,curveBasisClosed:k7,curveBasisOpen:_7,curveBumpX:oE,curveBumpY:sE,curveBundle:T7,curveCardinalClosed:E7,curveCardinalOpen:$7,curveCardinal:uE,curveCatmullRomClosed:L7,curveCatmullRomOpen:M7,curveCatmullRom:dE,curveLinear:hf,curveLinearClosed:A7,curveMonotoneX:vE,curveMonotoneY:xE,curveNatural:wE,curveStep:CE,curveStepAfter:kE,curveStepBefore:SE},SV=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kV=T(function(t,e){const r=w$(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const a=r.map(l=>l.args);Jd(a),n=pr(n,[...a])}else n=r.args;if(!n)return;let i=ix(t,e);const o="config";return n[o]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[o],delete n[o]),n},"detectInit"),w$=T(function(t,e=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${SV.source})(?=[}][%]{2}).*
|
|
199
|
+
`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),at.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let o;const a=[];for(;(o=su.exec(t))!==null;)if(o.index===su.lastIndex&&su.lastIndex++,o&&!e||e&&((r=o[1])!=null&&r.match(e))||e&&((n=o[2])!=null&&n.match(e))){const l=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:l,args:u})}return a.length===0?{type:t,args:null}:a.length===1?a[0]:a}catch(i){return at.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),_V=T(function(t){return t.replace(su,"")},"removeDirectives"),TV=T(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function Nx(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return CV[r]??e}T(Nx,"interpolateToCurve");function C$(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?UW.sanitizeUrl(r):r}T(C$,"formatUrl");var EV=T((t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let o=window;for(let a=0;a<n;a++)if(o=o[r[a]],!o){at.error(`Function name: ${t} not found in window`);return}o[i](...e)},"runFunc");function Ox(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}T(Ox,"distance");function S$(t){let e,r=0;t.forEach(i=>{r+=Ox(i,e),e=i});const n=r/2;return Fx(t,n)}T(S$,"traverseEdge");function k$(t){return t.length===1?t[0]:S$(t)}T(k$,"calcLabelPosition");var OC=T((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Fx=T((t,e)=>{let r,n=e;for(const i of t){if(r){const o=Ox(i,r);if(o===0)return r;if(o<n)n-=o;else{const a=n/o;if(a<=0)return r;if(a>=1)return{x:i.x,y:i.y};if(a>0&&a<1)return{x:OC((1-a)*r.x+a*i.x,5),y:OC((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),$V=T((t,e,r)=>{at.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Fx(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(a)*o+(e[0].x+i.x)/2,l.y=-Math.cos(a)*o+(e[0].y+i.y)/2,l},"calcCardinalityPosition");function _$(t,e,r){const n=structuredClone(r);at.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const i=25+t,o=Fx(n,i),a=10+t*.5,l=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(l+Math.PI)*a+(n[0].x+o.x)/2,u.y=-Math.cos(l+Math.PI)*a+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(l-Math.PI)*a+(n[0].x+o.x)/2-5,u.y=-Math.cos(l-Math.PI)*a+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(l)*a+(n[0].x+o.x)/2-5,u.y=-Math.cos(l)*a+(n[0].y+o.y)/2-5):(u.x=Math.sin(l)*a+(n[0].x+o.x)/2,u.y=-Math.cos(l)*a+(n[0].y+o.y)/2),u}T(_$,"calcTerminalLabelPosition");function T$(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}T(T$,"getStylesFromArray");var FC=0,LV=T(()=>(FC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+FC),"generateId");function E$(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}T(E$,"makeRandomHex");var MV=T(t=>E$(t.length),"random"),AV=T(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),RV=T(function(t,e){const r=e.text.replace(Hl.lineBreakRegex," "),[,n]=Rp(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const o=i.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),i},"drawSimpleText"),PV=qu((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Hl.lineBreakRegex.test(t)))return t;const n=t.split(" ").filter(Boolean),i=[];let o="";return n.forEach((a,l)=>{const u=ko(`${a} `,r),h=ko(o,r);if(u>e){const{hyphenatedStrings:m,remainingWord:g}=BV(a,e,"-",r);i.push(o,...m),o=g}else h+u>=e?(i.push(o),o=a):o=[o,a].filter(Boolean).join(" ");l+1===n.length&&i.push(o)}),i.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),BV=qu((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],o=[];let a="";return i.forEach((l,u)=>{const h=`${a}${l}`;if(ko(h,n)>=e){const f=u+1,m=i.length===f,g=`${h}${r}`;o.push(m?h:g),a=""}else a=h}),{hyphenatedStrings:o,remainingWord:a}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function $$(t,e){return Dx(t,e).height}T($$,"calculateTextHeight");function ko(t,e){return Dx(t,e).width}T(ko,"calculateTextWidth");var Dx=qu((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,o]=Rp(r),a=["sans-serif",n],l=t.split(Hl.lineBreakRegex),u=[],h=ce("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const m of a){let g=0;const v={width:0,height:0,lineHeight:0};for(const x of l){const w=AV();w.text=x||wV;const S=RV(d,w).style("font-size",o).style("font-weight",i).style("font-family",m),k=(S._groups||S)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,k.width)),g=Math.round(k.height),v.height+=g,v.lineHeight=Math.round(Math.max(v.lineHeight,g))}u.push(v)}d.remove();const f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),bl,NV=(bl=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},T(bl,"InitIDGenerator"),bl),hd,OV=T(function(t){return hd=hd||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),hd.innerHTML=t,unescape(hd.textContent)},"entityDecode");function Ix(t){return"str"in t}T(Ix,"isDetailedError");var FV=T((t,e,r,n)=>{var o;if(!n)return;const i=(o=t.node())==null?void 0:o.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Rp=T(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function jx(t,e){return bV({},t,e)}T(jx,"cleanAndMerge");var mi={assignWithDepth:pr,wrapLabel:PV,calculateTextHeight:$$,calculateTextWidth:ko,calculateTextDimensions:Dx,cleanAndMerge:jx,detectInit:kV,detectDirective:w$,isSubstringInArray:TV,interpolateToCurve:Nx,calcLabelPosition:k$,calcCardinalityPosition:$V,calcTerminalLabelPosition:_$,formatUrl:C$,getStylesFromArray:T$,generateId:LV,random:MV,runFunc:EV,entityDecode:OV,insertTitle:FV,isLabelCoordinateInPath:L$,parseFontSize:Rp,InitIDGenerator:NV},DV=T(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),ya=T(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),JZ=T((t,e,{counter:r=0,prefix:n,suffix:i},o)=>o||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function qr(t){return t??null}T(qr,"handleUndefinedAttr");function L$(t,e){const r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return i.includes(r.toString())||i.includes(n.toString())}T(L$,"isLabelCoordinateInPath");const IV=Object.freeze({left:0,top:0,width:16,height:16}),_f=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),M$=Object.freeze({...IV,..._f}),jV=Object.freeze({...M$,body:"",hidden:!1}),zV=Object.freeze({width:null,height:null}),WV=Object.freeze({...zV,..._f}),HV=(t,e,r,n="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return ay(h)?h:null}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:n,prefix:a.shift(),name:a.join("-")};return ay(l)?l:null}if(r&&n===""){const l={provider:n,prefix:"",name:o};return ay(l,r)?l:null}return null},ay=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function qV(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function DC(t,e){const r=qV(t,e);for(const n in jV)n in _f?n in t&&!(n in r)&&(r[n]=_f[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function VV(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function o(a){if(r[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=n[a]&&n[a].parent,u=l&&o(l);u&&(i[a]=[l].concat(u))}return i[a]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(o),i}function IC(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let o={};function a(l){o=DC(n[l]||i[l],o)}return a(e),r.forEach(a),DC(t,o)}function UV(t,e){if(t.icons[e])return IC(t,e,[]);const r=VV(t,[e])[e];return r?IC(t,e,r):null}const YV=/(-?[0-9.]*[0-9]+[0-9.]*)/g,GV=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jC(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(YV);if(n===null||!n.length)return t;const i=[];let o=n.shift(),a=GV.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*e*r)/r)}else i.push(o);if(o=n.shift(),o===void 0)return i.join("");a=!a}}function XV(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),o=t.indexOf("</"+e);if(i===-1||o===-1)break;const a=t.indexOf(">",o);if(a===-1)break;r+=t.slice(i+1,o).trim(),t=t.slice(0,n).trim()+t.slice(a+1)}return{defs:r,content:t}}function KV(t,e){return t?"<defs>"+t+"</defs>"+e:e}function QV(t,e,r){const n=XV(t);return KV(n.defs,e+n.content+r)}const ZV=t=>t==="unset"||t==="undefined"||t==="none";function JV(t,e){const r={...M$,...t},n={...WV,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(x=>{const w=[],S=x.hFlip,k=x.vFlip;let E=x.rotate;S?k?E+=2:(w.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),w.push("scale(-1 1)"),i.top=i.left=0):k&&(w.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),w.push("scale(1 -1)"),i.top=i.left=0);let L;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:L=i.height/2+i.top,w.unshift("rotate(90 "+L.toString()+" "+L.toString()+")");break;case 2:w.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:L=i.width/2+i.left,w.unshift("rotate(-90 "+L.toString()+" "+L.toString()+")");break}E%2===1&&(i.left!==i.top&&(L=i.left,i.left=i.top,i.top=L),i.width!==i.height&&(L=i.width,i.width=i.height,i.height=L)),w.length&&(o=QV(o,'<g transform="'+w.join(" ")+'">',"</g>"))});const a=n.width,l=n.height,u=i.width,h=i.height;let d,f;a===null?(f=l===null?"1em":l==="auto"?h:l,d=jC(f,u/h)):(d=a==="auto"?u:a,f=l===null?jC(d,h/u):l==="auto"?h:l);const m={},g=(x,w)=>{ZV(w)||(m[x]=w.toString())};g("width",d),g("height",f);const v=[i.left,i.top,u,h];return m.viewBox=v.join(" "),{attributes:m,viewBox:v,body:o}}const tU=/\sid="(\S+)"/g,zC=new Map;function eU(t){t=t.replace(/[0-9]+$/,"")||"a";const e=zC.get(t)||0;return zC.set(t,e+1),e?`${t}${e}`:t}function rU(t){const e=[];let r;for(;r=tU.exec(t);)e.push(r[1]);if(!e.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(i=>{const o=eU(i),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}function nU(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function zx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var va=zx();function A$(t){va=t}var cu={exec:()=>null};function fe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(nn.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,e)};return n}var iU=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),nn={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},oU=/^(?:[ \t]*(?:\n|$))+/,sU=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,aU=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Uu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lU=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wx=/(?:[*+-]|\d{1,9}[.)])/,R$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,P$=fe(R$).replace(/bull/g,Wx).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(),cU=fe(R$).replace(/bull/g,Wx).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(),Hx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uU=/^[^\n]+/,qx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hU=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dU=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wx).getRegex(),Pp="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",Vx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fU=fe("^ {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",Vx).replace("tag",Pp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B$=fe(Hx).replace("hr",Uu).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",Pp).getRegex(),pU=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",B$).getRegex(),Ux={blockquote:pU,code:sU,def:hU,fences:aU,heading:lU,hr:Uu,html:fU,lheading:P$,list:dU,newline:oU,paragraph:B$,table:cu,text:uU},WC=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Uu).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",Pp).getRegex(),mU={...Ux,lheading:cU,table:WC,paragraph:fe(Hx).replace("hr",Uu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",WC).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",Pp).getRegex()},gU={...Ux,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vx).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:cu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(Hx).replace("hr",Uu).replace("heading",` *#{1,6} *[^
|
|
200
|
+
]`).replace("lheading",P$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vU=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,N$=/^( {2,}|\\)\n(?!\s*$)/,xU=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bp=/[\p{P}\p{S}]/u,Yx=/[\s\p{P}\p{S}]/u,O$=/[^\s\p{P}\p{S}]/u,bU=fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Yx).getRegex(),F$=/(?!~)[\p{P}\p{S}]/u,wU=/(?!~)[\s\p{P}\p{S}]/u,CU=/(?:[^\s\p{P}\p{S}]|~)/u,SU=fe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iU?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),D$=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kU=fe(D$,"u").replace(/punct/g,Bp).getRegex(),_U=fe(D$,"u").replace(/punct/g,F$).getRegex(),I$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",TU=fe(I$,"gu").replace(/notPunctSpace/g,O$).replace(/punctSpace/g,Yx).replace(/punct/g,Bp).getRegex(),EU=fe(I$,"gu").replace(/notPunctSpace/g,CU).replace(/punctSpace/g,wU).replace(/punct/g,F$).getRegex(),$U=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,O$).replace(/punctSpace/g,Yx).replace(/punct/g,Bp).getRegex(),LU=fe(/\\(punct)/,"gu").replace(/punct/g,Bp).getRegex(),MU=fe(/^<(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(),AU=fe(Vx).replace("(?:-->|$)","-->").getRegex(),RU=fe("^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",AU).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Tf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,PU=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Tf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),j$=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",Tf).replace("ref",qx).getRegex(),z$=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",qx).getRegex(),BU=fe("reflink|nolink(?!\\()","g").replace("reflink",j$).replace("nolink",z$).getRegex(),HC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gx={_backpedal:cu,anyPunctuation:LU,autolink:MU,blockSkip:SU,br:N$,code:vU,del:cu,emStrongLDelim:kU,emStrongRDelimAst:TU,emStrongRDelimUnd:$U,escape:yU,link:PU,nolink:z$,punctuation:bU,reflink:j$,reflinkSearch:BU,tag:RU,text:xU,url:cu},NU={...Gx,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",Tf).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Tf).getRegex()},y0={...Gx,emStrongRDelimAst:EU,emStrongLDelim:_U,url:fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",HC).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:fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",HC).getRegex()},OU={...y0,br:fe(N$).replace("{2,}","*").getRegex(),text:fe(y0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},dd={normal:Ux,gfm:mU,pedantic:gU},Wc={normal:Gx,gfm:y0,breaks:OU,pedantic:NU},FU={"&":"&","<":"<",">":">",'"':""","'":"'"},qC=t=>FU[t];function Bi(t,e){if(e){if(nn.escapeTest.test(t))return t.replace(nn.escapeReplace,qC)}else if(nn.escapeTestNoEncode.test(t))return t.replace(nn.escapeReplaceNoEncode,qC);return t}function VC(t){try{t=encodeURI(t).replace(nn.percentDecode,"%")}catch{return null}return t}function UC(t,e){var o;let r=t.replace(nn.findPipe,(a,l,u)=>{let h=!1,d=l;for(;--d>=0&&u[d]==="\\";)h=!h;return h?"|":" |"}),n=r.split(nn.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(nn.slashPipe,"|");return n}function Hc(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function DU(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function YC(t,e,r,n,i){let o=e.href,a=e.title||null,l=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function IU(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
|
|
201
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[l]=a;return l.length>=i.length?o.slice(i.length):o}).join(`
|
|
202
|
+
`)}var Ef=class{constructor(e){ke(this,"options");ke(this,"rules");ke(this,"lexer");this.options=e||va}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Hc(n,`
|
|
203
|
+
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=IU(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=Hc(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Hc(r[0],`
|
|
204
|
+
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Hc(r[0],`
|
|
205
|
+
`).split(`
|
|
206
|
+
`),i="",o="",a=[];for(;n.length>0;){let l=!1,u=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))u.push(n[h]),l=!0;else if(!l)u.push(n[h]);else break;n=n.slice(h);let d=u.join(`
|
|
207
|
+
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
208
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
209
|
+
${d}`:d,o=o?`${o}
|
|
210
|
+
${f}`:f;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=m,n.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,x=v.raw+`
|
|
211
|
+
`+n.join(`
|
|
212
|
+
`),w=this.blockquote(x);a[a.length-1]=w,i=i.substring(0,i.length-v.raw.length)+w.raw,o=o.substring(0,o.length-v.text.length)+w.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,x=v.raw+`
|
|
213
|
+
`+n.join(`
|
|
214
|
+
`),w=this.list(x);a[a.length-1]=w,i=i.substring(0,i.length-g.raw.length)+w.raw,o=o.substring(0,o.length-v.raw.length)+w.raw,n=x.substring(a.at(-1).raw.length).split(`
|
|
215
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:o}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),l=!1;for(;e;){let h=!1,d="",f="";if(!(r=a.exec(e))||this.rules.block.hr.test(e))break;d=r[0],e=e.substring(d.length);let m=r[2].split(`
|
|
216
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),g=e.split(`
|
|
217
|
+
`,1)[0],v=!m.trim(),x=0;if(this.options.pedantic?(x=2,f=m.trimStart()):v?x=r[1].length+1:(x=r[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,f=m.slice(x),x+=r[1].length),v&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
218
|
+
`,e=e.substring(g.length+1),h=!0),!h){let k=this.rules.other.nextBulletRegex(x),E=this.rules.other.hrRegex(x),L=this.rules.other.fencesBeginRegex(x),A=this.rules.other.headingBeginRegex(x),M=this.rules.other.htmlBeginRegex(x);for(;e;){let B=e.split(`
|
|
219
|
+
`,1)[0],D;if(g=B,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),D=g):D=g.replace(this.rules.other.tabCharGlobal," "),L.test(g)||A.test(g)||M.test(g)||k.test(g)||E.test(g))break;if(D.search(this.rules.other.nonSpaceChar)>=x||!g.trim())f+=`
|
|
220
|
+
`+D.slice(x);else{if(v||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(m)||A.test(m)||E.test(m))break;f+=`
|
|
221
|
+
`+g}!v&&!g.trim()&&(v=!0),d+=B+`
|
|
222
|
+
`,e=e.substring(B.length+1),m=D.slice(x)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0));let w=null,S;this.options.gfm&&(w=this.rules.other.listIsTask.exec(f),w&&(S=w[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!w,checked:S,loose:!1,text:f,tokens:[]}),o.raw+=d}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h=0;h<o.items.length;h++)if(this.lexer.state.top=!1,o.items[h].tokens=this.lexer.blockTokens(o.items[h].text,[]),!o.loose){let d=o.items[h].tokens.filter(m=>m.type==="space"),f=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));o.loose=f}if(o.loose)for(let h=0;h<o.items.length;h++)o.items[h].loose=!0;return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=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:n,raw:r[0],href:i,title:o}}}table(e){var l;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=UC(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=r[3])!=null&&l.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
223
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let u of i)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<n.length;u++)a.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:a.align[u]});for(let u of o)a.rows.push(UC(u,a.header.length).map((h,d)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:a.align[d]})));return a}}lheading(e){let r=this.rules.block.lheading.exec(e);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(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
224
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);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(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Hc(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=DU(r[2],"()");if(a===-2)return;if(a>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let i=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),YC(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[i.toLowerCase()];if(!o){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return YC(n,o,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...i[0]].length-1,a,l,u=o,h=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+o);(i=d.exec(r))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=[...a].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){h+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+h);let f=[...i[0]][0].length,m=e.slice(0,o+i.index+f+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 g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let a;do a=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(a!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},di=class v0{constructor(e){ke(this,"tokens");ke(this,"options");ke(this,"state");ke(this,"tokenizer");ke(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||va,this.options.tokenizer=this.options.tokenizer||new Ef,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:nn,block:dd.normal,inline:Wc.normal};this.options.pedantic?(r.block=dd.pedantic,r.inline=Wc.pedantic):this.options.gfm&&(r.block=dd.gfm,this.options.breaks?r.inline=Wc.breaks:r.inline=Wc.gfm),this.tokenizer.rules=r}static get rules(){return{block:dd,inline:Wc}}static lex(e,r){return new v0(r).lex(e)}static lexInline(e,r){return new v0(r).inlineTokens(e)}lex(e){e=e.replace(nn.carriageReturn,`
|
|
225
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var i,o,a;for(this.options.pedantic&&(e=e.replace(nn.tabCharGlobal," ").replace(nn.spaceLine,""));e;){let l;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(h=>(l=h.call({lexer:this},e,r))?(e=e.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let h=r.at(-1);l.raw.length===1&&h!==void 0?h.raw+=`
|
|
226
|
+
`:r.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
227
|
+
`)?"":`
|
|
228
|
+
`)+l.raw,h.text+=`
|
|
229
|
+
`+l.text,this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
230
|
+
`)?"":`
|
|
231
|
+
`)+l.raw,h.text+=`
|
|
232
|
+
`+l.raw,this.inlineQueue.at(-1).src=h.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(e)){e=e.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),r.push(l);continue}let u=e;if((a=this.options.extensions)!=null&&a.startBlock){let h=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(m=>{f=m.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=e.substring(0,h+1))}if(this.state.top&&(l=this.tokenizer.paragraph(u))){let h=r.at(-1);n&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
233
|
+
`)?"":`
|
|
234
|
+
`)+l.raw,h.text+=`
|
|
235
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l),n=u.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
236
|
+
`)?"":`
|
|
237
|
+
`)+l.raw,h.text+=`
|
|
238
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(l);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,h,d,f,m;let n=e,i=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)g.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=i[2]?i[2].length:0,n=n.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((h=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:h.call({lexer:this},n))??n;let a=!1,l="";for(;e;){a||(l=""),a=!1;let g;if((f=(d=this.options.extensions)==null?void 0:d.inline)!=null&&f.some(x=>(g=x.call({lexer:this},e,r))?(e=e.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let x=r.at(-1);g.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=g.raw,x.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(e,n,l)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),r.push(g);continue}let v=e;if((m=this.options.extensions)!=null&&m.startInline){let x=1/0,w=e.slice(1),S;this.options.extensions.startInline.forEach(k=>{S=k.call({lexer:this},w),typeof S=="number"&&S>=0&&(x=Math.min(x,S))}),x<1/0&&x>=0&&(v=e.substring(0,x+1))}if(g=this.tokenizer.inlineText(v)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(l=g.raw.slice(-1)),a=!0;let x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=g.raw,x.text+=g.text):r.push(g);continue}if(e){let x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},$f=class{constructor(e){ke(this,"options");ke(this,"parser");this.options=e||va}space(e){return""}code({text:e,lang:r,escaped:n}){var a;let i=(a=(r||"").match(nn.notSpaceStart))==null?void 0:a[0],o=e.replace(nn.endingNewline,"")+`
|
|
239
|
+
`;return i?'<pre><code class="language-'+Bi(i)+'">'+(n?o:Bi(o,!0))+`</code></pre>
|
|
240
|
+
`:"<pre><code>"+(n?o:Bi(o,!0))+`</code></pre>
|
|
241
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
242
|
+
${this.parser.parse(e)}</blockquote>
|
|
243
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
244
|
+
`}hr(e){return`<hr>
|
|
245
|
+
`}list(e){let r=e.ordered,n=e.start,i="";for(let l=0;l<e.items.length;l++){let u=e.items[l];i+=this.listitem(u)}let o=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+o+a+`>
|
|
246
|
+
`+i+"</"+o+`>
|
|
247
|
+
`}listitem(e){var n;let r="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+Bi(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
|
|
248
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
249
|
+
`}table(e){let r="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);r+=this.tablerow({text:n});let i="";for(let o=0;o<e.rows.length;o++){let a=e.rows[o];n="";for(let l=0;l<a.length;l++)n+=this.tablecell(a[l]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
250
|
+
<thead>
|
|
251
|
+
`+r+`</thead>
|
|
252
|
+
`+i+`</table>
|
|
253
|
+
`}tablerow({text:e}){return`<tr>
|
|
254
|
+
${e}</tr>
|
|
255
|
+
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
256
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Bi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),o=VC(e);if(o===null)return i;e=o;let a='<a href="'+e+'"';return r&&(a+=' title="'+Bi(r)+'"'),a+=">"+i+"</a>",a}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let o=VC(e);if(o===null)return Bi(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Bi(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Bi(e.text)}},Xx=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},fi=class x0{constructor(e){ke(this,"options");ke(this,"renderer");ke(this,"textRenderer");this.options=e||va,this.options.renderer=this.options.renderer||new $f,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xx}static parse(e,r){return new x0(r).parse(e)}static parseInline(e,r){return new x0(r).parseInline(e)}parse(e,r=!0){var i,o;let n="";for(let a=0;a<e.length;a++){let l=e[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[l.type]){let h=l,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){n+=d||"";continue}}let u=l;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let h=u,d=this.renderer.text(h);for(;a+1<e.length&&e[a+1].type==="text";)h=e[++a],d+=`
|
|
257
|
+
`+this.renderer.text(h);r?n+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):n+=d;continue}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}parseInline(e,r=this.renderer){var i,o;let n="";for(let a=0;a<e.length;a++){let l=e[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[l.type]){let h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=h||"";continue}}let u=l;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}},xd,Jc=(xd=class{constructor(e){ke(this,"options");ke(this,"block");this.options=e||va}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?di.lex:di.lexInline}provideParser(){return this.block?fi.parse:fi.parseInline}},ke(xd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ke(xd,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),xd),jU=class{constructor(...e){ke(this,"defaults",zx());ke(this,"options",this.setOptions);ke(this,"parse",this.parseMarkdown(!0));ke(this,"parseInline",this.parseMarkdown(!1));ke(this,"Parser",fi);ke(this,"Renderer",$f);ke(this,"TextRenderer",Xx);ke(this,"Lexer",di);ke(this,"Tokenizer",Ef);ke(this,"Hooks",Jc);this.use(...e)}walkTokens(e,r){var i,o;let n=[];for(let a of e)switch(n=n.concat(r.call(this,a)),a.type){case"table":{let l=a;for(let u of l.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of l.rows)for(let h of u)n=n.concat(this.walkTokens(h.tokens,r));break}case"list":{let l=a;n=n.concat(this.walkTokens(l.items,r));break}default:{let l=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(u=>{let h=l[u].flat(1/0);n=n.concat(this.walkTokens(h,r))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...l){let u=o.renderer.apply(this,l);return u===!1&&(u=a.apply(this,l)),u}: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 a=r[o.level];a?a.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)}),i.extensions=r),n.renderer){let o=this.defaults.renderer||new $f(this.defaults);for(let a in n.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let l=a,u=n.renderer[l],h=o[l];o[l]=(...d)=>{let f=u.apply(o,d);return f===!1&&(f=h.apply(o,d)),f||""}}i.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Ef(this.defaults);for(let a in n.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let l=a,u=n.tokenizer[l],h=o[l];o[l]=(...d)=>{let f=u.apply(o,d);return f===!1&&(f=h.apply(o,d)),f}}i.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Jc;for(let a in n.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let l=a,u=n.hooks[l],h=o[l];Jc.passThroughHooks.has(a)?o[l]=d=>{if(this.defaults.async&&Jc.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await u.call(o,d);return h.call(o,m)})();let f=u.call(o,d);return h.call(o,f)}:o[l]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await u.apply(o,d);return m===!1&&(m=await h.apply(o,d)),m})();let f=u.apply(o,d);return f===!1&&(f=h.apply(o,d)),f}}i.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,a=n.walkTokens;i.walkTokens=function(l){let u=[];return u.push(a.call(this,l)),o&&(u=u.concat(o.call(this,l))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return di.lex(e,r??this.defaults)}parser(e,r){return fi.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let i={...n},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(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=e),o.async)return(async()=>{let l=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():e?di.lex:di.lexInline)(l,o),h=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser():e?fi.parse:fi.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let l=(o.hooks?o.hooks.provideLexer():e?di.lex:di.lexInline)(r,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?fi.parse:fi.parseInline)(l,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(l){return a(l)}}}onError(e,r){return n=>{if(n.message+=`
|
|
258
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Bi(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},la=new jU;function ye(t,e){return la.parse(t,e)}ye.options=ye.setOptions=function(t){return la.setOptions(t),ye.defaults=la.defaults,A$(ye.defaults),ye};ye.getDefaults=zx;ye.defaults=va;ye.use=function(...t){return la.use(...t),ye.defaults=la.defaults,A$(ye.defaults),ye};ye.walkTokens=function(t,e){return la.walkTokens(t,e)};ye.parseInline=la.parseInline;ye.Parser=fi;ye.parser=fi.parse;ye.Renderer=$f;ye.TextRenderer=Xx;ye.Lexer=di;ye.lexer=di.lex;ye.Tokenizer=Ef;ye.Hooks=Jc;ye.parse=ye;ye.options;ye.setOptions;ye.use;ye.walkTokens;ye.parseInline;fi.parse;di.lex;function W$(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(l,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?l.concat(h.map(function(d){var f,m;return(m=(f=d.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&m!==void 0?m:0})):l},[]);if(i.length){var o=new RegExp(`
|
|
259
|
+
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(l){return l.replace(o,`
|
|
260
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,"");var a=n[0];return e.forEach(function(l,u){var h=a.match(/(?:^|\n)( *)$/),d=h?h[1]:"",f=l;typeof l=="string"&&l.includes(`
|
|
261
|
+
`)&&(f=String(l).split(`
|
|
262
|
+
`).map(function(m,g){return g===0?m:""+d+m}).join(`
|
|
263
|
+
`)),a+=f+n[u+1]}),a}var zU={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},b0=new Map,H$=new Map,WU=T(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(at.debug("Registering icon pack:",e.name),"loader"in e)H$.set(e.name,e.loader);else if("icons"in e)b0.set(e.name,e.icons);else throw at.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),q$=T(async(t,e)=>{const r=HV(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=b0.get(n);if(!i){const a=H$.get(n);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await a(),prefix:n},b0.set(n,i)}catch(l){throw at.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=UV(i,r.name);if(!o)throw new Error(`Icon not found: ${t}`);return o},"getRegisteredIconData"),HU=T(async t=>{try{return await q$(t),!0}catch{return!1}},"isIconAvailable"),Yu=T(async(t,e,r)=>{let n;try{n=await q$(t,e==null?void 0:e.fallbackPrefix)}catch(a){at.error(a),n=zU}const i=JV(n,e),o=nU(rU(i.body),{...i.attributes,...r});return Kn(o,Wr())},"getIconSVG");function V$(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,`
|
|
264
|
+
`).replace(/\n{2,}/g,`
|
|
265
|
+
`),i=W$(n);return e===!1?i.replace(/ /g," "):i}T(V$,"preprocessMarkdown");function U$(t,e={}){const r=V$(t,e),n=ye.lexer(r),i=[[]];let o=0;function a(l,u="normal"){l.type==="text"?l.text.split(`
|
|
266
|
+
`).forEach((d,f)=>{f!==0&&(o++,i.push([])),d.split(" ").forEach(m=>{m=m.replace(/'/g,"'"),m&&i[o].push({content:m,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{a(h,l.type)}):l.type==="html"&&i[o].push({content:l.text,type:"normal"})}return T(a,"processNode"),n.forEach(l=>{var u;l.type==="paragraph"?(u=l.tokens)==null||u.forEach(h=>{a(h)}):l.type==="html"?i[o].push({content:l.text,type:"normal"}):i[o].push({content:l.raw,type:"normal"})}),i}T(U$,"markdownToLines");function Y$(t,{markdownAutoWrap:e}={}){const r=ye.lexer(t);function n(i){var o,a,l;return i.type==="text"?e===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g," "):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${(o=i.tokens)==null?void 0:o.map(n).join("")}</strong>`:i.type==="em"?`<em>${(a=i.tokens)==null?void 0:a.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${(l=i.tokens)==null?void 0:l.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(at.warn(`Unsupported markdown: ${i.type}`),i.raw)}return T(n,"output"),r.map(n).join("")}T(Y$,"markdownToHTML");function G$(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}T(G$,"splitTextToChars");function X$(t,e){const r=G$(e.content);return Kx(t,[],r,e.type)}T(X$,"splitWordToFitWidth");function Kx(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...o]=r,a=[...e,i];return t([{content:a.join(""),type:n}])?Kx(t,a,o,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}T(Kx,"splitWordToFitWidthRecursion");function K$(t,e){if(t.some(({content:r})=>r.includes(`
|
|
267
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Lf(t,e)}T(K$,"splitLineToFitWidth");function Lf(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());const o=t.shift()??{content:" ",type:"normal"},a=[...n];if(i!==""&&a.push({content:i,type:"normal"}),a.push(o),e(a))return Lf(t,e,r,a);if(n.length>0)r.push(n),t.unshift(o);else if(o.content){const[l,u]=X$(e,o);r.push([l]),u.content&&t.unshift(u)}return Lf(t,e,r)}T(Lf,"splitLineToFitWidthRecursion");function w0(t,e){e&&t.attr("style",e)}T(w0,"applyStyle");async function Q$(t,e,r,n,i=!1,o=Wr()){const a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const l=a.append("xhtml:div"),u=El(e.label)?await ox(e.label.replace(Hl.lineBreakRegex,`
|
|
268
|
+
`),o):Kn(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(u),w0(d,e.labelStyle),d.attr("class",`${h} ${n}`),w0(l,e.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"),i&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),f=l.node().getBoundingClientRect()),a.node()}T(Q$,"addHtmlSpan");function Np(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}T(Np,"createTspan");function Z$(t,e,r){const n=t.append("text"),i=Np(n,1,e);Op(i,r);const o=i.node().getComputedTextLength();return n.remove(),o}T(Z$,"computeWidthOfText");function qU(t,e,r){var a;const n=t.append("text"),i=Np(n,1,e);Op(i,[{content:r,type:"normal"}]);const o=(a=i.node())==null?void 0:a.getBoundingClientRect();return o&&n.remove(),o}T(qU,"computeDimensionOfText");function J$(t,e,r,n=!1){const o=e.append("g"),a=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");let u=0;for(const h of r){const d=T(m=>Z$(o,1.1,m)<=t,"checkWidth"),f=d(h)?[h]:K$(h,d);for(const m of f){const g=Np(l,u,1.1);Op(g,m),u++}}if(n){const h=l.node().getBBox(),d=2;return a.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),o.node()}else return l.node()}T(J$,"createFormattedText");function Op(t,e){t.text(""),e.forEach((r,n)=>{const i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}T(Op,"updateTextContentAndStyles");async function tL(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,o,a)=>(r.push((async()=>{const l=`${o}:${a}`;return await HU(l)?await Yu(l,void 0,{class:"label-icon"}):`<i class='${Kn(i,e).replace(":"," ")}'></i>`})()),i));const n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}T(tL,"replaceIconSubstring");var ys=T(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:o=!0,isNode:a=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(at.debug("XYZ createText",e,r,n,i,o,a,"addSvgBackground: ",u),o){const d=Y$(e,h),f=await tL(ya(d),h),m=e.replace(/\\\\/g,"\\"),g={isNode:a,label:El(e)?m:f,labelStyle:r.replace("fill:","color:")};return await Q$(t,g,l,i,u,h)}else{const d=e.replace(/<br\s*\/?>/g,"<br/>"),f=U$(d.replace("<br>","<br/>"),h),m=J$(l,t,f,e?u:!1);if(a){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ce(m).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ce(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ce(m).select("text").attr("style",v)}return m}},"createText");function ly(t,e,r){if(t&&t.length){const[n,i]=e,o=Math.PI/180*r,a=Math.cos(o),l=Math.sin(o);for(const u of t){const[h,d]=u;u[0]=(h-n)*a-(d-i)*l+n,u[1]=(h-n)*l+(d-i)*a+i}}}function VU(t,e){return t[0]===e[0]&&t[1]===e[1]}function UU(t,e,r,n=1){const i=r,o=Math.max(e,.1),a=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(const h of a)ly(h,l,i);const u=(function(h,d,f){const m=[];for(const k of h){const E=[...k];VU(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&m.push(E)}const g=[];d=Math.max(d,.1);const v=[];for(const k of m)for(let E=0;E<k.length-1;E++){const L=k[E],A=k[E+1];if(L[1]!==A[1]){const M=Math.min(L[1],A[1]);v.push({ymin:M,ymax:Math.max(L[1],A[1]),x:M===L[1]?L[0]:A[0],islope:(A[0]-L[0])/(A[1]-L[1])})}}if(v.sort(((k,E)=>k.ymin<E.ymin?-1:k.ymin>E.ymin?1:k.x<E.x?-1:k.x>E.x?1:k.ymax===E.ymax?0:(k.ymax-E.ymax)/Math.abs(k.ymax-E.ymax))),!v.length)return g;let x=[],w=v[0].ymin,S=0;for(;x.length||v.length;){if(v.length){let k=-1;for(let E=0;E<v.length&&!(v[E].ymin>w);E++)k=E;v.splice(0,k+1).forEach((E=>{x.push({s:w,edge:E})}))}if(x=x.filter((k=>!(k.edge.ymax<=w))),x.sort(((k,E)=>k.edge.x===E.edge.x?0:(k.edge.x-E.edge.x)/Math.abs(k.edge.x-E.edge.x))),(f!==1||S%d==0)&&x.length>1)for(let k=0;k<x.length;k+=2){const E=k+1;if(E>=x.length)break;const L=x[k].edge,A=x[E].edge;g.push([[Math.round(L.x),w],[Math.round(A.x),w]])}w+=f,x.forEach((k=>{k.edge.x=k.edge.x+f*k.edge.islope})),S++}return g})(a,o,n);if(i){for(const h of a)ly(h,l,-i);(function(h,d,f){const m=[];h.forEach((g=>m.push(...g))),ly(m,d,f)})(u,l,-i)}return u}function Gu(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=i),UU(t,i,n,o||1)}class Qx{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Gu(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}}function Fp(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class YU extends Qx{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const i=Gu(e,Object.assign({},r,{hachureGap:n})),o=Math.PI/180*r.hachureAngle,a=[],l=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[h,d]of i)Fp([h,d])&&a.push([[h[0]-l,h[1]+u],[...d]],[[h[0]+l,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class GU extends Qx{fillPolygons(e,r){const n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(e,i);return n.ops=n.ops.concat(o.ops),n}}class XU{constructor(e){this.helper=e}fillPolygons(e,r){const n=Gu(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=i/4;for(const l of e){const u=Fp(l),h=u/i,d=Math.ceil(h)-1,f=u-d*i,m=(l[0][0]+l[1][0])/2-i/4,g=Math.min(l[0][1],l[1][1]);for(let v=0;v<d;v++){const x=g+f+v*i,w=m-a+2*Math.random()*a,S=x-a+2*Math.random()*a,k=this.helper.ellipse(w,S,o,o,r);n.push(...k.ops)}}return{type:"fillSketch",ops:n}}}class KU{constructor(e){this.helper=e}fillPolygons(e,r){const n=Gu(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return e.forEach((a=>{const l=Fp(a),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2;let d=a[0],f=a[1];d[0]>f[0]&&(d=a[1],f=a[0]);const m=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<u;g++){const v=g*(n+i),x=v+n,w=[d[0]+v*Math.cos(m)+h*Math.cos(m),d[1]+v*Math.sin(m)+h*Math.sin(m)],S=[d[0]+x*Math.cos(m)+h*Math.cos(m),d[1]+x*Math.sin(m)+h*Math.sin(m)];o.push(...this.helper.doubleLineOps(w[0],w[1],S[0],S[1],r))}})),o}}class QU{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,o=Gu(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,r)}}zigzagLines(e,r,n){const i=[];return e.forEach((o=>{const a=Fp(o),l=Math.round(a/(2*r));let u=o[0],h=o[1];u[0]>h[0]&&(u=o[1],h=o[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f<l;f++){const m=2*f*r,g=2*(f+1)*r,v=Math.sqrt(2*Math.pow(r,2)),x=[u[0]+m*Math.cos(d),u[1]+m*Math.sin(d)],w=[u[0]+g*Math.cos(d),u[1]+g*Math.sin(d)],S=[x[0]+v*Math.cos(d+Math.PI/4),x[1]+v*Math.sin(d+Math.PI/4)];i.push(...this.helper.doubleLineOps(x[0],x[1],S[0],S[1],n),...this.helper.doubleLineOps(S[0],S[1],w[0],w[1],n))}})),i}}const xn={};class ZU{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const JU=0,cy=1,GC=2,fd={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 uy(t,e){return t.type===e}function Zx(t){const e=[],r=(function(a){const l=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:JU,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:cy,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return l[l.length]={type:GC,text:""},l})(t);let n="BOD",i=0,o=r[i];for(;!uy(o,GC);){let a=0;const l=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return Zx("M0,0"+t);i++,a=fd[o.text],n=o.text}else uy(o,cy)?a=fd[n]:(i++,a=fd[o.text],n=o.text);if(!(i+a<r.length))throw new Error("Path data ended short");for(let u=i;u<i+a;u++){const h=r[u];if(!uy(h,cy))throw new Error("Param not a number: "+n+","+h.text);l[l.length]=+h.text}if(typeof fd[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:l};e.push(u),i+=a,o=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function eL(t){let e=0,r=0,n=0,i=0;const o=[];for(const{key:a,data:l}of t)switch(a){case"M":o.push({key:"M",data:[...l]}),[e,r]=l,[n,i]=l;break;case"m":e+=l[0],r+=l[1],o.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":o.push({key:"L",data:[...l]}),[e,r]=l;break;case"l":e+=l[0],r+=l[1],o.push({key:"L",data:[e,r]});break;case"C":o.push({key:"C",data:[...l]}),e=l[4],r=l[5];break;case"c":{const u=l.map(((h,d)=>d%2?h+r:h+e));o.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":o.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{const u=l.map(((h,d)=>d%2?h+r:h+e));o.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":o.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],o.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":o.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],o.push({key:"H",data:[e]});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]}),e=l[2],r=l[3];break;case"s":{const u=l.map(((h,d)=>d%2?h+r:h+e));o.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":o.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,r=i}return o}function rL(t){const e=[];let r="",n=0,i=0,o=0,a=0,l=0,u=0;for(const{key:h,data:d}of t){switch(h){case"M":e.push({key:"M",data:[...d]}),[n,i]=d,[o,a]=d;break;case"C":e.push({key:"C",data:[...d]}),n=d[4],i=d[5],l=d[2],u=d[3];break;case"L":e.push({key:"L",data:[...d]}),[n,i]=d;break;case"H":n=d[0],e.push({key:"L",data:[n,i]});break;case"V":i=d[0],e.push({key:"L",data:[n,i]});break;case"S":{let f=0,m=0;r==="C"||r==="S"?(f=n+(n-l),m=i+(i-u)):(f=n,m=i),e.push({key:"C",data:[f,m,...d]}),l=d[0],u=d[1],n=d[2],i=d[3];break}case"T":{const[f,m]=d;let g=0,v=0;r==="Q"||r==="T"?(g=n+(n-l),v=i+(i-u)):(g=n,v=i);const x=n+2*(g-n)/3,w=i+2*(v-i)/3,S=f+2*(g-f)/3,k=m+2*(v-m)/3;e.push({key:"C",data:[x,w,S,k,f,m]}),l=g,u=v,n=f,i=m;break}case"Q":{const[f,m,g,v]=d,x=n+2*(f-n)/3,w=i+2*(m-i)/3,S=g+2*(f-g)/3,k=v+2*(m-v)/3;e.push({key:"C",data:[x,w,S,k,g,v]}),l=f,u=m,n=g,i=v;break}case"A":{const f=Math.abs(d[0]),m=Math.abs(d[1]),g=d[2],v=d[3],x=d[4],w=d[5],S=d[6];f===0||m===0?(e.push({key:"C",data:[n,i,w,S,w,S]}),n=w,i=S):(n!==w||i!==S)&&(nL(n,i,w,S,f,m,g,v,x).forEach((function(k){e.push({key:"C",data:k})})),n=w,i=S);break}case"Z":e.push({key:"Z",data:[]}),n=o,i=a}r=h}return e}function qc(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function nL(t,e,r,n,i,o,a,l,u,h){const d=(f=a,Math.PI*f/180);var f;let m=[],g=0,v=0,x=0,w=0;if(h)[g,v,x,w]=h;else{[t,e]=qc(t,e,-d),[r,n]=qc(r,n,-d);const V=(t-r)/2,W=(e-n)/2;let I=V*V/(i*i)+W*W/(o*o);I>1&&(I=Math.sqrt(I),i*=I,o*=I);const O=i*i,F=o*o,P=O*F-O*W*W-F*V*V,z=O*W*W+F*V*V,X=(l===u?-1:1)*Math.sqrt(Math.abs(P/z));x=X*i*W/o+(t+r)/2,w=X*-o*V/i+(e+n)/2,g=Math.asin(parseFloat(((e-w)/o).toFixed(9))),v=Math.asin(parseFloat(((n-w)/o).toFixed(9))),t<x&&(g=Math.PI-g),r<x&&(v=Math.PI-v),g<0&&(g=2*Math.PI+g),v<0&&(v=2*Math.PI+v),u&&g>v&&(g-=2*Math.PI),!u&&v>g&&(v-=2*Math.PI)}let S=v-g;if(Math.abs(S)>120*Math.PI/180){const V=v,W=r,I=n;v=u&&v>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,m=nL(r=x+i*Math.cos(v),n=w+o*Math.sin(v),W,I,i,o,a,0,u,[v,V,x,w])}S=v-g;const k=Math.cos(g),E=Math.sin(g),L=Math.cos(v),A=Math.sin(v),M=Math.tan(S/4),B=4/3*i*M,D=4/3*o*M,q=[t,e],U=[t+B*E,e-D*k],H=[r+B*A,n-D*L],K=[r,n];if(U[0]=2*q[0]-U[0],U[1]=2*q[1]-U[1],h)return[U,H,K].concat(m);{m=[U,H,K].concat(m);const V=[];for(let W=0;W<m.length;W+=3){const I=qc(m[W][0],m[W][1],d),O=qc(m[W+1][0],m[W+1][1],d),F=qc(m[W+2][0],m[W+2][1],d);V.push([I[0],I[1],O[0],O[1],F[0],F[1]])}return V}}const tY={randOffset:function(t,e){return Xt(t,e)},randOffsetWithRange:function(t,e,r){return Mf(t,e,r)},ellipse:function(t,e,r,n,i){const o=oL(r,n,i);return C0(t,e,i,o).opset},doubleLineOps:function(t,e,r,n,i){return us(t,e,r,n,i,!0)}};function iL(t,e,r,n,i){return{type:"path",ops:us(t,e,r,n,i)}}function Nd(t,e,r){const n=(t||[]).length;if(n>2){const i=[];for(let o=0;o<n-1;o++)i.push(...us(t[o][0],t[o][1],t[o+1][0],t[o+1][1],r));return e&&i.push(...us(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return n===2?iL(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function eY(t,e,r,n,i){return(function(o,a){return Nd(o,!0,a)})([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}function XC(t,e){if(t.length){const r=typeof t[0][0]=="number"?[t]:t,n=pd(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:pd(r[0],1.5*(1+.22*e.roughness),ZC(e));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const l=pd(a,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:pd(a,1.5*(1+.22*e.roughness),ZC(e));for(const h of l)h.op!=="move"&&n.push(h);for(const h of u)h.op!=="move"&&i.push(h)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function oL(t,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/i;let a=Math.abs(t/2),l=Math.abs(e/2);const u=1-r.curveFitting;return a+=Xt(a*u,r),l+=Xt(l*u,r),{increment:o,rx:a,ry:l}}function C0(t,e,r,n){const[i,o]=JC(n.increment,t,e,n.rx,n.ry,1,n.increment*Mf(.1,Mf(.4,1,r),r),r);let a=Af(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[l]=JC(n.increment,t,e,n.rx,n.ry,1.5,0,r),u=Af(l,null,r);a=a.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function KC(t,e,r,n,i,o,a,l,u){const h=t,d=e;let f=Math.abs(r/2),m=Math.abs(n/2);f+=Xt(.01*f,u),m+=Xt(.01*m,u);let g=i,v=o;for(;g<0;)g+=2*Math.PI,v+=2*Math.PI;v-g>2*Math.PI&&(g=0,v=2*Math.PI);const x=2*Math.PI/u.curveStepCount,w=Math.min(x/2,(v-g)/2),S=tS(w,h,d,f,m,g,v,1,u);if(!u.disableMultiStroke){const k=tS(w,h,d,f,m,g,v,1.5,u);S.push(...k)}return a&&(l?S.push(...us(h,d,h+f*Math.cos(g),d+m*Math.sin(g),u),...us(h,d,h+f*Math.cos(v),d+m*Math.sin(v),u)):S.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(g),d+m*Math.sin(g)]})),{type:"path",ops:S}}function QC(t,e){const r=rL(eL(Zx(t))),n=[];let i=[0,0],o=[0,0];for(const{key:a,data:l}of r)switch(a){case"M":o=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...us(o[0],o[1],l[0],l[1],e)),o=[l[0],l[1]];break;case"C":{const[u,h,d,f,m,g]=l;n.push(...rY(u,h,d,f,m,g,o,e)),o=[m,g];break}case"Z":n.push(...us(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:n}}function hy(t,e){const r=[];for(const n of t)if(n.length){const i=e.maxRandomnessOffset||0,o=n.length;if(o>2){r.push({op:"move",data:[n[0][0]+Xt(i,e),n[0][1]+Xt(i,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[n[a][0]+Xt(i,e),n[a][1]+Xt(i,e)]})}}return{type:"fillPath",ops:r}}function Za(t,e){return(function(r,n){let i=r.fillStyle||"hachure";if(!xn[i])switch(i){case"zigzag":xn[i]||(xn[i]=new YU(n));break;case"cross-hatch":xn[i]||(xn[i]=new GU(n));break;case"dots":xn[i]||(xn[i]=new XU(n));break;case"dashed":xn[i]||(xn[i]=new KU(n));break;case"zigzag-line":xn[i]||(xn[i]=new QU(n));break;default:i="hachure",xn[i]||(xn[i]=new Qx(n))}return xn[i]})(e,tY).fillPolygons(t,e)}function ZC(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function sL(t){return t.randomizer||(t.randomizer=new ZU(t.seed||0)),t.randomizer.next()}function Mf(t,e,r,n=1){return r.roughness*n*(sL(r)*(e-t)+t)}function Xt(t,e,r=1){return Mf(-t,t,e,r)}function us(t,e,r,n,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,l=S0(t,e,r,n,i,!0,!1);if(a)return l;const u=S0(t,e,r,n,i,!0,!0);return l.concat(u)}function S0(t,e,r,n,i,o,a){const l=Math.pow(t-r,2)+Math.pow(e-n,2),u=Math.sqrt(l);let h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>l&&(d=u/10);const f=d/2,m=.2+.2*sL(i);let g=i.bowing*i.maxRandomnessOffset*(n-e)/200,v=i.bowing*i.maxRandomnessOffset*(t-r)/200;g=Xt(g,i,h),v=Xt(v,i,h);const x=[],w=()=>Xt(f,i,h),S=()=>Xt(d,i,h),k=i.preserveVertices;return a?x.push({op:"move",data:[t+(k?0:w()),e+(k?0:w())]}):x.push({op:"move",data:[t+(k?0:Xt(d,i,h)),e+(k?0:Xt(d,i,h))]}),a?x.push({op:"bcurveTo",data:[g+t+(r-t)*m+w(),v+e+(n-e)*m+w(),g+t+2*(r-t)*m+w(),v+e+2*(n-e)*m+w(),r+(k?0:w()),n+(k?0:w())]}):x.push({op:"bcurveTo",data:[g+t+(r-t)*m+S(),v+e+(n-e)*m+S(),g+t+2*(r-t)*m+S(),v+e+2*(n-e)*m+S(),r+(k?0:S()),n+(k?0:S())]}),x}function pd(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+Xt(e,r),t[0][1]+Xt(e,r)]),n.push([t[0][0]+Xt(e,r),t[0][1]+Xt(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+Xt(e,r),t[i][1]+Xt(e,r)]),i===t.length-1&&n.push([t[i][0]+Xt(e,r),t[i][1]+Xt(e,r)]);return Af(n,null,r)}function Af(t,e,r){const n=t.length,i=[];if(n>3){const o=[],a=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+2<n;l++){const u=t[l];o[0]=[u[0],u[1]],o[1]=[u[0]+(a*t[l+1][0]-a*t[l-1][0])/6,u[1]+(a*t[l+1][1]-a*t[l-1][1])/6],o[2]=[t[l+1][0]+(a*t[l][0]-a*t[l+2][0])/6,t[l+1][1]+(a*t[l][1]-a*t[l+2][1])/6],o[3]=[t[l+1][0],t[l+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...S0(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function JC(t,e,r,n,i,o,a,l){const u=[],h=[];if(l.roughness===0){t/=4,h.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let d=0;d<=2*Math.PI;d+=t){const f=[e+n*Math.cos(d),r+i*Math.sin(d)];u.push(f),h.push(f)}h.push([e+n*Math.cos(0),r+i*Math.sin(0)]),h.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{const d=Xt(.5,l)-Math.PI/2;h.push([Xt(o,l)+e+.9*n*Math.cos(d-t),Xt(o,l)+r+.9*i*Math.sin(d-t)]);const f=2*Math.PI+d-.01;for(let m=d;m<f;m+=t){const g=[Xt(o,l)+e+n*Math.cos(m),Xt(o,l)+r+i*Math.sin(m)];u.push(g),h.push(g)}h.push([Xt(o,l)+e+n*Math.cos(d+2*Math.PI+.5*a),Xt(o,l)+r+i*Math.sin(d+2*Math.PI+.5*a)]),h.push([Xt(o,l)+e+.98*n*Math.cos(d+a),Xt(o,l)+r+.98*i*Math.sin(d+a)]),h.push([Xt(o,l)+e+.9*n*Math.cos(d+.5*a),Xt(o,l)+r+.9*i*Math.sin(d+.5*a)])}return[h,u]}function tS(t,e,r,n,i,o,a,l,u){const h=o+Xt(.1,u),d=[];d.push([Xt(l,u)+e+.9*n*Math.cos(h-t),Xt(l,u)+r+.9*i*Math.sin(h-t)]);for(let f=h;f<=a;f+=t)d.push([Xt(l,u)+e+n*Math.cos(f),Xt(l,u)+r+i*Math.sin(f)]);return d.push([e+n*Math.cos(a),r+i*Math.sin(a)]),d.push([e+n*Math.cos(a),r+i*Math.sin(a)]),Af(d,null,u)}function rY(t,e,r,n,i,o,a,l){const u=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let d=[0,0];const f=l.disableMultiStroke?1:2,m=l.preserveVertices;for(let g=0;g<f;g++)g===0?u.push({op:"move",data:[a[0],a[1]]}):u.push({op:"move",data:[a[0]+(m?0:Xt(h[0],l)),a[1]+(m?0:Xt(h[0],l))]}),d=m?[i,o]:[i+Xt(h[g],l),o+Xt(h[g],l)],u.push({op:"bcurveTo",data:[t+Xt(h[g],l),e+Xt(h[g],l),r+Xt(h[g],l),n+Xt(h[g],l),d[0],d[1]]});return u}function Vc(t){return[...t]}function eS(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(Vc(t[0]),Vc(t[1]),Vc(t[2]),Vc(t[2]));else{const i=[];i.push(t[0],t[0]);for(let l=1;l<t.length;l++)i.push(t[l]),l===t.length-1&&i.push(t[l]);const o=[],a=1-e;n.push(Vc(i[0]));for(let l=1;l+2<i.length;l++){const u=i[l];o[0]=[u[0],u[1]],o[1]=[u[0]+(a*i[l+1][0]-a*i[l-1][0])/6,u[1]+(a*i[l+1][1]-a*i[l-1][1])/6],o[2]=[i[l+1][0]+(a*i[l][0]-a*i[l+2][0])/6,i[l+1][1]+(a*i[l][1]-a*i[l+2][1])/6],o[3]=[i[l+1][0],i[l+1][1]],n.push(o[1],o[2],o[3])}}return n}function Od(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function nY(t,e,r){const n=Od(e,r);if(n===0)return Od(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),Od(t,Is(e,r,i))}function Is(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function k0(t,e,r,n){const i=n||[];if((function(l,u){const h=l[u+0],d=l[u+1],f=l[u+2],m=l[u+3];let g=3*d[0]-2*h[0]-m[0];g*=g;let v=3*d[1]-2*h[1]-m[1];v*=v;let x=3*f[0]-2*m[0]-h[0];x*=x;let w=3*f[1]-2*m[1]-h[1];return w*=w,g<x&&(g=x),v<w&&(v=w),g+v})(t,e)<r){const l=t[e+0];i.length?(o=i[i.length-1],a=l,Math.sqrt(Od(o,a))>1&&i.push(l)):i.push(l),i.push(t[e+3])}else{const u=t[e+0],h=t[e+1],d=t[e+2],f=t[e+3],m=Is(u,h,.5),g=Is(h,d,.5),v=Is(d,f,.5),x=Is(m,g,.5),w=Is(g,v,.5),S=Is(x,w,.5);k0([u,m,x,S],0,r,i),k0([S,w,v,f],0,r,i)}var o,a;return i}function iY(t,e){return Rf(t,0,t.length,e)}function Rf(t,e,r,n,i){const o=i||[],a=t[e],l=t[r-1];let u=0,h=1;for(let d=e+1;d<r-1;++d){const f=nY(t[d],a,l);f>u&&(u=f,h=d)}return Math.sqrt(u)>n?(Rf(t,e,h+1,n,o),Rf(t,h,r,n,o)):(o.length||o.push(a),o.push(l)),o}function dy(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let o=0;o<i;o++)k0(t,3*o,e,n);return r&&r>0?Rf(n,0,n.length,r):n}const Rn="none";class Pf{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,o){const a=this._o(o);return this._d("line",[iL(e,r,n,i,a)],a)}rectangle(e,r,n,i,o){const a=this._o(o),l=[],u=eY(e,r,n,i,a);if(a.fill){const h=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];a.fillStyle==="solid"?l.push(hy([h],a)):l.push(Za([h],a))}return a.stroke!==Rn&&l.push(u),this._d("rectangle",l,a)}ellipse(e,r,n,i,o){const a=this._o(o),l=[],u=oL(n,i,a),h=C0(e,r,a,u);if(a.fill)if(a.fillStyle==="solid"){const d=C0(e,r,a,u).opset;d.type="fillPath",l.push(d)}else l.push(Za([h.estimatedPoints],a));return a.stroke!==Rn&&l.push(h.opset),this._d("ellipse",l,a)}circle(e,r,n,i){const o=this.ellipse(e,r,n,n,i);return o.shape="circle",o}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[Nd(e,!1,n)],n)}arc(e,r,n,i,o,a,l=!1,u){const h=this._o(u),d=[],f=KC(e,r,n,i,o,a,l,!0,h);if(l&&h.fill)if(h.fillStyle==="solid"){const m=Object.assign({},h);m.disableMultiStroke=!0;const g=KC(e,r,n,i,o,a,!0,!1,m);g.type="fillPath",d.push(g)}else d.push((function(m,g,v,x,w,S,k){const E=m,L=g;let A=Math.abs(v/2),M=Math.abs(x/2);A+=Xt(.01*A,k),M+=Xt(.01*M,k);let B=w,D=S;for(;B<0;)B+=2*Math.PI,D+=2*Math.PI;D-B>2*Math.PI&&(B=0,D=2*Math.PI);const q=(D-B)/k.curveStepCount,U=[];for(let H=B;H<=D;H+=q)U.push([E+A*Math.cos(H),L+M*Math.sin(H)]);return U.push([E+A*Math.cos(D),L+M*Math.sin(D)]),U.push([E,L]),Za([U],k)})(e,r,n,i,o,a,h));return h.stroke!==Rn&&d.push(f),this._d("arc",d,h)}curve(e,r){const n=this._o(r),i=[],o=XC(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const a=XC(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],l=e;if(l.length){const u=typeof l[0][0]=="number"?[l]:l;for(const h of u)h.length<3?a.push(...h):h.length===3?a.push(...dy(eS([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):a.push(...dy(eS(h),10,(1+n.roughness)/2))}a.length&&i.push(Za([a],n))}return n.stroke!==Rn&&i.push(o),this._d("curve",i,n)}polygon(e,r){const n=this._o(r),i=[],o=Nd(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(hy([e],n)):i.push(Za([e],n))),n.stroke!==Rn&&i.push(o),this._d("polygon",i,n)}path(e,r){const n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==Rn,a=n.stroke!==Rn,l=!!(n.simplification&&n.simplification<1),u=(function(d,f,m){const g=rL(eL(Zx(d))),v=[];let x=[],w=[0,0],S=[];const k=()=>{S.length>=4&&x.push(...dy(S,f)),S=[]},E=()=>{k(),x.length&&(v.push(x),x=[])};for(const{key:A,data:M}of g)switch(A){case"M":E(),w=[M[0],M[1]],x.push(w);break;case"L":k(),x.push([M[0],M[1]]);break;case"C":if(!S.length){const B=x.length?x[x.length-1]:w;S.push([B[0],B[1]])}S.push([M[0],M[1]]),S.push([M[2],M[3]]),S.push([M[4],M[5]]);break;case"Z":k(),x.push([w[0],w[1]])}if(E(),!m)return v;const L=[];for(const A of v){const M=iY(A,m);M.length&&L.push(M)}return L})(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=QC(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const d=QC(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else i.push(hy(u,n));else i.push(Za(u,n));return a&&(l?u.forEach((d=>{i.push(Nd(d,!1,n))})):i.push(h)),this._d("path",i,n)}opsToPath(e,r){let n="";for(const i of e.ops){const o=typeof r=="number"&&r>=0?i.data.map((a=>+a.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Rn};break;case"fillPath":a={d:this.opsToPath(o),stroke:Rn,strokeWidth:0,fill:n.fill||Rn};break;case"fillSketch":a=this.fillSketch(o,n)}a&&i.push(a)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Rn,strokeWidth:n,fill:Rn}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}}class oY{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Pf(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";const l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,a,o,l),i.restore();break}case"fillSketch":this.fillSketch(i,a,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(const o of r.ops){const a=typeof n=="number"&&n>=0?o.data.map((l=>+l.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,o){const a=this.gen.line(e,r,n,i,o);return this.draw(a),a}rectangle(e,r,n,i,o){const a=this.gen.rectangle(e,r,n,i,o);return this.draw(a),a}ellipse(e,r,n,i,o){const a=this.gen.ellipse(e,r,n,i,o);return this.draw(a),a}circle(e,r,n,i){const o=this.gen.circle(e,r,n,i);return this.draw(o),o}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,o,a,l=!1,u){const h=this.gen.arc(e,r,n,i,o,a,l,u);return this.draw(h),h}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const md="http://www.w3.org/2000/svg";class sY{constructor(e,r){this.svg=e,this.gen=new Pf(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(md,"g"),a=e.options.fixedDecimalPlaceDigits;for(const l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(md,"path"),u.setAttribute("d",this.opsToPath(l,a)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(md,"path"),u.setAttribute("d",this.opsToPath(l,a)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&o.appendChild(u)}return o}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const o=e.createElementNS(md,"path");return o.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,o){const a=this.gen.line(e,r,n,i,o);return this.draw(a)}rectangle(e,r,n,i,o){const a=this.gen.rectangle(e,r,n,i,o);return this.draw(a)}ellipse(e,r,n,i,o){const a=this.gen.ellipse(e,r,n,i,o);return this.draw(a)}circle(e,r,n,i){const o=this.gen.circle(e,r,n,i);return this.draw(o)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,o,a,l=!1,u){const h=this.gen.arc(e,r,n,i,o,a,l,u);return this.draw(h)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var Pt={canvas:(t,e)=>new oY(t,e),svg:(t,e)=>new sY(t,e),generator:t=>new Pf(t),newSeed:()=>Pf.newSeed()},Gt=T(async(t,e,r)=>{var f,m;let n;const i=e.useHtmlLabels||vr((f=ge())==null?void 0:f.htmlLabels);r?n=r:n="node default";const o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",qr(e.labelStyle));let l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];const u=await ys(a,Kn(ya(l),ge()),{useHtmlLabels:i,width:e.width||((m=ge().flowchart)==null?void 0:m.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=u.getBBox();const d=((e==null?void 0:e.padding)??0)/2;if(i){const g=u.children[0],v=ce(u),x=g.getElementsByTagName("img");if(x){const w=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...x].map(S=>new Promise(k=>{function E(){if(S.style.display="flex",S.style.flexDirection="column",w){const L=ge().fontSize?ge().fontSize:window.getComputedStyle(document.body).fontSize,A=5,[M=bT.fontSize]=Rp(L),B=M*A+"px";S.style.minWidth=B,S.style.maxWidth=B}else S.style.width="100%";k(S)}T(E,"setupImage"),setTimeout(()=>{S.complete&&E()}),S.addEventListener("error",E),S.addEventListener("load",E)})))}h=g.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}return i?a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):a.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:h,halfPadding:d,label:a}},"labelHelper"),fy=T(async(t,e,r)=>{var u,h,d,f,m,g;const n=r.useHtmlLabels||vr((h=(u=ge())==null?void 0:u.flowchart)==null?void 0:h.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ys(i,Kn(ya(e),ge()),{useHtmlLabels:n,width:r.width||((f=(d=ge())==null?void 0:d.flowchart)==null?void 0:f.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const l=r.padding/2;if(vr((g=(m=ge())==null?void 0:m.flowchart)==null?void 0:g.htmlLabels)){const v=o.children[0],x=ce(o);a=v.getBoundingClientRect(),x.attr("width",a.width),x.attr("height",a.height)}return n?i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):i.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:a,halfPadding:l,label:i}},"insertLabel"),Ft=T((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),qt=T((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function se(t){const e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}T(se,"createPathFromPoints");function hs(t,e,r,n,i,o){const a=[],u=r-t,h=n-e,d=u/o,f=2*Math.PI/d,m=e+h/2;for(let g=0;g<=50;g++){const v=g/50,x=t+v*u,w=m+i*Math.sin(f*(x-t));a.push({x,y:w})}return a}T(hs,"generateFullSineWavePoints");function ku(t,e,r,n,i,o){const a=[],l=i*Math.PI/180,d=(o*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){const m=l+f*d,g=t+r*Math.cos(m),v=e+r*Math.sin(m);a.push({x:-g,y:-v})}return a}T(ku,"generateCirclePoints");var aY=T((t,e)=>{var r=t.x,n=t.y,i=e.x-r,o=e.y-n,a=t.width/2,l=t.height/2,u,h;return Math.abs(o)*a>Math.abs(i)*l?(o<0&&(l=-l),u=o===0?0:l*i/o,h=l):(i<0&&(a=-a),u=a,h=i===0?0:a*o/i),{x:r+u,y:n+h}},"intersectRect"),Yl=aY;function aL(t,e){e&&t.attr("style",e)}T(aL,"applyStyle");async function lL(t){const e=ce(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=ge();let i=t.label;t.label&&El(t.label)&&(i=await ox(t.label.replace(Hl.lineBreakRegex,`
|
|
269
|
+
`),n));const a='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return r.html(Kn(a,n)),aL(r,t.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"),e.node()}T(lL,"addHtmlLabel");var lY=T(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),vr(ge().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),at.info("vertexText"+i);const o={isNode:n,label:ya(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>`<i class='${l.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await lL(o)}else{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?a=i:a=[];for(const l of a){const u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),o.appendChild(u)}return o}},"createLabel"),Xs=lY,vs=T((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),cL=T(async(t,e)=>{at.info("Creating subgraph rect for ",e.id,e);const r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Nt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),m=vr(r.flowchart.htmlLabels),g=f.insert("g").attr("class","cluster-label "),v=await ys(g,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0});let x=v.getBBox();if(vr(r.flowchart.htmlLabels)){const B=v.children[0],D=ce(v);x=B.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height)}const w=e.width<=x.width+e.padding?x.width+e.padding:e.width;e.width<=x.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height,k=e.x-w/2,E=e.y-S/2;at.trace("Data ",e,JSON.stringify(e));let L;if(e.look==="handDrawn"){const B=Pt.svg(f),D=Bt(e,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:i}),q=B.path(vs(k,E,w,S,0),D);L=f.insert(()=>(at.debug("Rough node insert CXC",q),q),":first-child"),L.select("path:nth-child(2)").attr("style",h.join(";")),L.select("path").attr("style",d.join(";").replace("fill","stroke"))}else L=f.insert("rect",":first-child"),L.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",k).attr("y",E).attr("width",w).attr("height",S);const{subGraphTitleTopMargin:A}=Mx(r);if(g.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+A})`),l){const B=g.select("span");B&&B.attr("style",l)}const M=L.node().getBBox();return e.offsetX=0,e.width=M.width,e.height=M.height,e.offsetY=x.height-e.padding/2,e.intersect=function(B){return Yl(e,B)},{cluster:f,labelBBox:x}},"rect"),cY=T((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,o=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const a=n.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(l){return Yl(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),uY=T(async(t,e)=>{const r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=h.insert("g",":first-child"),f=h.insert("g").attr("class","cluster-label");let m=h.append("rect");const g=f.node().appendChild(await Xs(e.label,e.labelStyle,void 0,!0));let v=g.getBBox();if(vr(r.flowchart.htmlLabels)){const q=g.children[0],U=ce(g);v=q.getBoundingClientRect(),U.attr("width",v.width),U.attr("height",v.height)}const x=0*e.padding,w=x/2,S=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+x;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height+x,E=e.height+x-v.height-6,L=e.x-S/2,A=e.y-k/2;e.width=S;const M=e.y-e.height/2-w+v.height+2;let B;if(e.look==="handDrawn"){const q=e.cssClasses.includes("statediagram-cluster-alt"),U=Pt.svg(h),H=e.rx||e.ry?U.path(vs(L,A,S,k,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):U.rectangle(L,A,S,k,{seed:i});B=h.insert(()=>H,":first-child");const K=U.rectangle(L,M,S,E,{fill:q?o:a,fillStyle:q?"hachure":"solid",stroke:u,seed:i});B=h.insert(()=>H,":first-child"),m=h.insert(()=>K)}else B=d.insert("rect",":first-child"),B.attr("class","outer").attr("x",L).attr("y",A).attr("width",S).attr("height",k).attr("data-look",e.look),m.attr("class","inner").attr("x",L).attr("y",M).attr("width",S).attr("height",E);f.attr("transform",`translate(${e.x-v.width/2}, ${A+1-(vr(r.flowchart.htmlLabels)?0:3)})`);const D=B.node().getBBox();return e.height=D.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(q){return Yl(e,q)},{cluster:h,labelBBox:v}},"roundedWithTitle"),hY=T(async(t,e)=>{at.info("Creating subgraph rect for ",e.id,e);const r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Nt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),m=vr(r.flowchart.htmlLabels),g=f.insert("g").attr("class","cluster-label "),v=await ys(g,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});let x=v.getBBox();if(vr(r.flowchart.htmlLabels)){const B=v.children[0],D=ce(v);x=B.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height)}const w=e.width<=x.width+e.padding?x.width+e.padding:e.width;e.width<=x.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height,k=e.x-w/2,E=e.y-S/2;at.trace("Data ",e,JSON.stringify(e));let L;if(e.look==="handDrawn"){const B=Pt.svg(f),D=Bt(e,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:i}),q=B.path(vs(k,E,w,S,e.rx),D);L=f.insert(()=>(at.debug("Rough node insert CXC",q),q),":first-child"),L.select("path:nth-child(2)").attr("style",h.join(";")),L.select("path").attr("style",d.join(";").replace("fill","stroke"))}else L=f.insert("rect",":first-child"),L.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",k).attr("y",E).attr("width",w).attr("height",S);const{subGraphTitleTopMargin:A}=Mx(r);if(g.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+A})`),l){const B=g.select("span");B&&B.attr("style",l)}const M=L.node().getBBox();return e.offsetX=0,e.width=M.width,e.height=M.height,e.offsetY=x.height-e.padding/2,e.intersect=function(B){return Yl(e,B)},{cluster:f,labelBBox:x}},"kanbanSection"),dY=T((t,e)=>{const r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:o}=n,a=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=a.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;const d=e.height+u,f=e.x-h/2,m=e.y-d/2;e.width=h;let g;if(e.look==="handDrawn"){const w=Pt.svg(a).rectangle(f,m,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:i});g=a.insert(()=>w,":first-child")}else g=l.insert("rect",":first-child"),g.attr("class","divider").attr("x",f).attr("y",m).attr("width",h).attr("height",d).attr("data-look",e.look);const v=g.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(x){return Yl(e,x)},{cluster:a,labelBBox:{}}},"divider"),fY=cL,pY={rect:cL,squareRect:fY,roundedWithTitle:uY,noteGroup:cY,divider:dY,kanbanSection:hY},uL=new Map,mY=T(async(t,e)=>{const r=e.shape||"rect",n=await pY[r](t,e);return uL.set(e.id,n),n},"insertCluster"),oJ=T(()=>{uL=new Map},"clear");function hL(t,e){return t.intersect(e)}T(hL,"intersectNode");var gY=hL;function dL(t,e,r,n){var i=t.x,o=t.y,a=i-n.x,l=o-n.y,u=Math.sqrt(e*e*l*l+r*r*a*a),h=Math.abs(e*r*a/u);n.x<i&&(h=-h);var d=Math.abs(e*r*l/u);return n.y<o&&(d=-d),{x:i+h,y:o+d}}T(dL,"intersectEllipse");var fL=dL;function pL(t,e,r){return fL(t,e,e,r)}T(pL,"intersectCircle");var yY=pL;function mL(t,e,r,n){{const i=e.y-t.y,o=t.x-e.x,a=e.x*t.y-t.x*e.y,l=i*r.x+o*r.y+a,u=i*n.x+o*n.y+a,h=1e-6;if(l!==0&&u!==0&&_0(l,u))return;const d=n.y-r.y,f=r.x-n.x,m=n.x*r.y-r.x*n.y,g=d*t.x+f*t.y+m,v=d*e.x+f*e.y+m;if(Math.abs(g)<h&&Math.abs(v)<h&&_0(g,v))return;const x=i*f-d*o;if(x===0)return;const w=Math.abs(x/2);let S=o*m-f*a;const k=S<0?(S-w)/x:(S+w)/x;S=d*a-i*m;const E=S<0?(S-w)/x:(S+w)/x;return{x:k,y:E}}}T(mL,"intersectLine");function _0(t,e){return t*e>0}T(_0,"sameSign");var vY=mL;function gL(t,e,r){let n=t.x,i=t.y,o=[],a=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(d){a=Math.min(a,d.x),l=Math.min(l,d.y)}):(a=Math.min(a,e.x),l=Math.min(l,e.y));let u=n-t.width/2-a,h=i-t.height/2-l;for(let d=0;d<e.length;d++){let f=e[d],m=e[d<e.length-1?d+1:0],g=vY(t,r,{x:u+f.x,y:h+f.y},{x:u+m.x,y:h+m.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(d,f){let m=d.x-r.x,g=d.y-r.y,v=Math.sqrt(m*m+g*g),x=f.x-r.x,w=f.y-r.y,S=Math.sqrt(x*x+w*w);return v<S?-1:v===S?0:1}),o[0]):t}T(gL,"intersectPolygon");var xY=gL,kt={node:gY,circle:yY,ellipse:fL,polygon:xY,rect:Yl};function yL(t,e){const{labelStyles:r}=Nt(e);e.labelStyle=r;const n=qt(e);let i=n;n||(i="anchor");const o=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=1,{cssStyles:l}=e,u=Pt.svg(o),h=Bt(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const d=u.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",qr(l)),Ft(e,f),e.intersect=function(m){return at.info("Circle intersect",e,a,m),kt.circle(e,a,m)},o}T(yL,"anchor");function T0(t,e,r,n,i,o,a){const u=(t+r)/2,h=(e+n)/2,d=Math.atan2(n-e,r-t),f=(r-t)/2,m=(n-e)/2,g=f/i,v=m/o,x=Math.sqrt(g**2+v**2);if(x>1)throw new Error("The given radii are too small to create an arc between the points.");const w=Math.sqrt(1-x**2),S=u+w*o*Math.sin(d)*(a?-1:1),k=h-w*i*Math.cos(d)*(a?-1:1),E=Math.atan2((e-k)/o,(t-S)/i);let A=Math.atan2((n-k)/o,(r-S)/i)-E;a&&A<0&&(A+=2*Math.PI),!a&&A>0&&(A-=2*Math.PI);const M=[];for(let B=0;B<20;B++){const D=B/19,q=E+D*A,U=S+i*Math.cos(q),H=k+o*Math.sin(q);M.push({x:U,y:H})}return M}T(T0,"generateArcPoints");async function vL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.width+e.padding+20,l=o.height+e.padding,u=l/2,h=u/(2.5+l/50),{cssStyles:d}=e,f=[{x:a/2,y:-l/2},{x:-a/2,y:-l/2},...T0(-a/2,-l/2,-a/2,l/2,h,u,!1),{x:a/2,y:l/2},...T0(a/2,l/2,a/2,-l/2,h,u,!0)],m=Pt.svg(i),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=se(f),x=m.path(v,g),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(${h/2}, 0)`),Ft(e,w),e.intersect=function(S){return kt.polygon(e,f,S)},i}T(vL,"bowTieRect");function xs(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}T(xs,"insertPolygonShape");async function xL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.height+e.padding,l=12,u=o.width+e.padding+l,h=0,d=u,f=-a,m=0,g=[{x:h+l,y:f},{x:d,y:f},{x:d,y:m},{x:h,y:m},{x:h,y:f+l},{x:h+l,y:f}];let v;const{cssStyles:x}=e;if(e.look==="handDrawn"){const w=Pt.svg(i),S=Bt(e,{}),k=se(g),E=w.path(k,S);v=i.insert(()=>E,":first-child").attr("transform",`translate(${-u/2}, ${a/2})`),x&&v.attr("style",x)}else v=xs(i,u,a,g);return n&&v.attr("style",n),Ft(e,v),e.intersect=function(w){return kt.polygon(e,g,w)},i}T(xL,"card");function bL(t,e){const{nodeStyles:r}=Nt(e);e.label="";const n=t.insert("g").attr("class",qt(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,o=Math.max(28,e.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=Pt.svg(n),u=Bt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=se(a),d=l.path(h,u),f=n.insert(()=>d,":first-child");return i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(m){return kt.polygon(e,a,m)},n}T(bL,"choice");async function Jx(t,e,r){const{labelStyles:n,nodeStyles:i}=Nt(e);e.labelStyle=n;const{shapeSvg:o,bbox:a,halfPadding:l}=await Gt(t,e,qt(e)),u=(r==null?void 0:r.padding)??l,h=a.width/2+u;let d;const{cssStyles:f}=e;if(e.look==="handDrawn"){const m=Pt.svg(o),g=Bt(e,{}),v=m.circle(0,0,h*2,g);d=o.insert(()=>v,":first-child"),d.attr("class","basic label-container").attr("style",qr(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0);return Ft(e,d),e.calcIntersect=function(m,g){const v=m.width/2;return kt.circle(m,v,g)},e.intersect=function(m){return at.info("Circle intersect",e,h,m),kt.circle(e,h,m)},o}T(Jx,"circle");function wL(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},o={x:-(n/2)*e,y:n/2*r},a={x:-(n/2)*e,y:-(n/2)*r},l={x:n/2*e,y:-(n/2)*r};return`M ${o.x},${o.y} L ${l.x},${l.y}
|
|
270
|
+
M ${i.x},${i.y} L ${a.x},${a.y}`}T(wL,"createLine");function CL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",qt(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:a}=e,l=Pt.svg(i),u=Bt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=l.circle(0,0,o*2,u),d=wL(o),f=l.path(d,u),m=i.insert(()=>h,":first-child");return m.insert(()=>f),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Ft(e,m),e.intersect=function(g){return at.info("crossedCircle intersect",e,{radius:o,point:g}),kt.circle(e,o,g)},i}T(CL,"crossedCircle");function ho(t,e,r,n=100,i=0,o=180){const a=[],l=i*Math.PI/180,d=(o*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){const m=l+f*d,g=t+r*Math.cos(m),v=e+r*Math.sin(m);a.push({x:-g,y:-v})}return a}T(ho,"generateCirclePoints");async function SL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=o.width+(e.padding??0),u=o.height+(e.padding??0),h=Math.max(5,u*.1),{cssStyles:d}=e,f=[...ho(l/2,-u/2,h,30,-90,0),{x:-l/2-h,y:h},...ho(l/2+h*2,-h,h,20,-180,-270),...ho(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:-u/2},...ho(l/2,u/2,h,20,0,90)],m=[{x:l/2,y:-u/2-h},{x:-l/2,y:-u/2-h},...ho(l/2,-u/2,h,20,-90,0),{x:-l/2-h,y:-h},...ho(l/2+l*.1,-h,h,20,-180,-270),...ho(l/2+l*.1,h,h,20,-90,-180),{x:-l/2-h,y:u/2},...ho(l/2,u/2,h,20,0,90),{x:-l/2,y:u/2+h},{x:l/2,y:u/2+h}],g=Pt.svg(i),v=Bt(e,{fill:"none"});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=se(f).replace("Z",""),S=g.path(w,v),k=se(m),E=g.path(k,{...v}),L=i.insert("g",":first-child");return L.insert(()=>E,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),d&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${h}, 0)`),a.attr("transform",`translate(${-l/2+h-(o.x-(o.left??0))},${-u/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Ft(e,L),e.intersect=function(A){return kt.polygon(e,m,A)},i}T(SL,"curlyBraceLeft");function fo(t,e,r,n=100,i=0,o=180){const a=[],l=i*Math.PI/180,d=(o*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){const m=l+f*d,g=t+r*Math.cos(m),v=e+r*Math.sin(m);a.push({x:g,y:v})}return a}T(fo,"generateCirclePoints");async function kL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=o.width+(e.padding??0),u=o.height+(e.padding??0),h=Math.max(5,u*.1),{cssStyles:d}=e,f=[...fo(l/2,-u/2,h,20,-90,0),{x:l/2+h,y:-h},...fo(l/2+h*2,-h,h,20,-180,-270),...fo(l/2+h*2,h,h,20,-90,-180),{x:l/2+h,y:u/2},...fo(l/2,u/2,h,20,0,90)],m=[{x:-l/2,y:-u/2-h},{x:l/2,y:-u/2-h},...fo(l/2,-u/2,h,20,-90,0),{x:l/2+h,y:-h},...fo(l/2+h*2,-h,h,20,-180,-270),...fo(l/2+h*2,h,h,20,-90,-180),{x:l/2+h,y:u/2},...fo(l/2,u/2,h,20,0,90),{x:l/2,y:u/2+h},{x:-l/2,y:u/2+h}],g=Pt.svg(i),v=Bt(e,{fill:"none"});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=se(f).replace("Z",""),S=g.path(w,v),k=se(m),E=g.path(k,{...v}),L=i.insert("g",":first-child");return L.insert(()=>E,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),d&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${-h}, 0)`),a.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-u/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Ft(e,L),e.intersect=function(A){return kt.polygon(e,m,A)},i}T(kL,"curlyBraceRight");function $r(t,e,r,n=100,i=0,o=180){const a=[],l=i*Math.PI/180,d=(o*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){const m=l+f*d,g=t+r*Math.cos(m),v=e+r*Math.sin(m);a.push({x:-g,y:-v})}return a}T($r,"generateCirclePoints");async function _L(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=o.width+(e.padding??0),u=o.height+(e.padding??0),h=Math.max(5,u*.1),{cssStyles:d}=e,f=[...$r(l/2,-u/2,h,30,-90,0),{x:-l/2-h,y:h},...$r(l/2+h*2,-h,h,20,-180,-270),...$r(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:-u/2},...$r(l/2,u/2,h,20,0,90)],m=[...$r(-l/2+h+h/2,-u/2,h,20,-90,-180),{x:l/2-h/2,y:h},...$r(-l/2-h/2,-h,h,20,0,90),...$r(-l/2-h/2,h,h,20,-90,0),{x:l/2-h/2,y:-h},...$r(-l/2+h+h/2,u/2,h,30,-180,-270)],g=[{x:l/2,y:-u/2-h},{x:-l/2,y:-u/2-h},...$r(l/2,-u/2,h,20,-90,0),{x:-l/2-h,y:-h},...$r(l/2+h*2,-h,h,20,-180,-270),...$r(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:u/2},...$r(l/2,u/2,h,20,0,90),{x:-l/2,y:u/2+h},{x:l/2-h-h/2,y:u/2+h},...$r(-l/2+h+h/2,-u/2,h,20,-90,-180),{x:l/2-h/2,y:h},...$r(-l/2-h/2,-h,h,20,0,90),...$r(-l/2-h/2,h,h,20,-90,0),{x:l/2-h/2,y:-h},...$r(-l/2+h+h/2,u/2,h,30,-180,-270)],v=Pt.svg(i),x=Bt(e,{fill:"none"});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=se(f).replace("Z",""),k=v.path(S,x),L=se(m).replace("Z",""),A=v.path(L,x),M=se(g),B=v.path(M,{...x}),D=i.insert("g",":first-child");return D.insert(()=>B,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.insert(()=>A,":first-child"),D.attr("class","text"),d&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${h-h/4}, 0)`),a.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-u/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Ft(e,D),e.intersect=function(q){return kt.polygon(e,g,q)},i}T(_L,"curlyBraces");async function TL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=80,l=20,u=Math.max(a,(o.width+(e.padding??0)*2)*1.25,(e==null?void 0:e.width)??0),h=Math.max(l,o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=h/2,{cssStyles:f}=e,m=Pt.svg(i),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=u,x=h,w=v-d,S=x/4,k=[{x:w,y:0},{x:S,y:0},{x:0,y:x/2},{x:S,y:x},{x:w,y:x},...ku(-w,-x/2,d,50,270,90)],E=se(k),L=m.path(E,g),A=i.insert(()=>L,":first-child");return A.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",n),A.attr("transform",`translate(${-u/2}, ${-h/2})`),Ft(e,A),e.intersect=function(M){return kt.polygon(e,k,M)},i}T(TL,"curvedTrapezoid");var bY=T((t,e,r,n,i,o)=>[`M${t},${e+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),wY=T((t,e,r,n,i,o)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),CY=T((t,e,r,n,i,o)=>[`M${t-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function EL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+e.padding,e.width??0),u=l/2,h=u/(2.5+l/50),d=Math.max(o.height+h+e.padding,e.height??0);let f;const{cssStyles:m}=e;if(e.look==="handDrawn"){const g=Pt.svg(i),v=wY(0,0,l,d,u,h),x=CY(0,h,l,d,u,h),w=g.path(v,Bt(e,{})),S=g.path(x,Bt(e,{fill:"none"}));f=i.insert(()=>S,":first-child"),f=i.insert(()=>w,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const g=bY(0,0,l,d,u,h);f=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qr(m)).attr("style",n)}return f.attr("label-offset-y",h),f.attr("transform",`translate(${-l/2}, ${-(d/2+h)})`),Ft(e,f),a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+(e.padding??0)/1.5-(o.y-(o.top??0))})`),e.intersect=function(g){const v=kt.rect(e,g),x=v.x-(e.x??0);if(u!=0&&(Math.abs(x)<(e.width??0)/2||Math.abs(x)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-h)){let w=h*h*(1-x*x/(u*u));w>0&&(w=Math.sqrt(w)),w=h-w,g.y-(e.y??0)>0&&(w=-w),v.y+=w}return v},i}T(EL,"cylinder");async function $L(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=o.width+e.padding,u=o.height+e.padding,h=u*.2,d=-l/2,f=-u/2-h/2,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const x=[{x:d,y:f+h},{x:-d,y:f+h},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+h}],w=g.polygon(x.map(k=>[k.x,k.y]),v),S=i.insert(()=>w,":first-child");return S.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),a.attr("transform",`translate(${d+(e.padding??0)/2-(o.x-(o.left??0))}, ${f+h+(e.padding??0)/2-(o.y-(o.top??0))})`),Ft(e,S),e.intersect=function(k){return kt.rect(e,k)},i}T($L,"dividedRectangle");async function LL(t,e){var m,g;const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a}=await Gt(t,e,qt(e)),u=o.width/2+a+5,h=o.width/2+a;let d;const{cssStyles:f}=e;if(e.look==="handDrawn"){const v=Pt.svg(i),x=Bt(e,{roughness:.2,strokeWidth:2.5}),w=Bt(e,{roughness:.2,strokeWidth:1.5}),S=v.circle(0,0,u*2,x),k=v.circle(0,0,h*2,w);d=i.insert("g",":first-child"),d.attr("class",qr(e.cssClasses)).attr("style",qr(f)),(m=d.node())==null||m.appendChild(S),(g=d.node())==null||g.appendChild(k)}else{d=i.insert("g",":first-child");const v=d.insert("circle",":first-child"),x=d.insert("circle");d.attr("class","basic label-container").attr("style",n),v.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Ft(e,d),e.intersect=function(v){return at.info("DoubleCircle intersect",e,u,v),kt.circle(e,u,v)},i}T(LL,"doublecircle");function ML(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Nt(e);e.label="",e.labelStyle=n;const o=t.insert("g").attr("class",qt(e)).attr("id",e.domId??e.id),a=7,{cssStyles:l}=e,u=Pt.svg(o),{nodeBorder:h}=r,d=Bt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const f=u.circle(0,0,a*2,d),m=o.insert(()=>f,":first-child");return m.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",l),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),Ft(e,m),e.intersect=function(g){return at.info("filledCircle intersect",e,{radius:a,point:g}),kt.circle(e,a,g)},o}T(ML,"filledCircle");async function AL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=o.width+(e.padding??0),u=l+o.height,h=l+o.height,d=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:f}=e,m=Pt.svg(i),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=se(d),x=m.path(v,g),w=i.insert(()=>x,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return f&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),e.width=l,e.height=u,Ft(e,w),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-u/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(S){return at.info("Triangle intersect",e,d,S),kt.polygon(e,d,S)},i}T(AL,"flippedTriangle");function RL(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:o}=Nt(e);e.label="";const a=t.insert("g").attr("class",qt(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),h=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),h=Math.max(70,(e==null?void 0:e.height)??0));const d=-1*u/2,f=-1*h/2,m=Pt.svg(a),g=Bt(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=m.rectangle(d,f,u,h,g),x=a.insert(()=>v,":first-child");l&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",l),o&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",o),Ft(e,x);const w=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=w/2||0,e.height+=w/2||0),e.intersect=function(S){return kt.rect(e,S)},a}T(RL,"forkJoin");async function PL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const i=80,o=50,{shapeSvg:a,bbox:l}=await Gt(t,e,qt(e)),u=Math.max(i,l.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),h=Math.max(o,l.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=h/2,{cssStyles:f}=e,m=Pt.svg(a),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=[{x:-u/2,y:-h/2},{x:u/2-d,y:-h/2},...ku(-u/2+d,0,d,50,90,270),{x:u/2-d,y:h/2},{x:-u/2,y:h/2}],x=se(v),w=m.path(x,g),S=a.insert(()=>w,":first-child");return S.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),Ft(e,S),e.intersect=function(k){return at.info("Pill intersect",e,{radius:d,point:k}),kt.polygon(e,v,k)},a}T(PL,"halfRoundedRectangle");async function BL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.height+(e.padding??0),l=o.width+(e.padding??0)*2.5,{cssStyles:u}=e,h=Pt.svg(i),d=Bt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let f=l/2;const m=f/6;f=f+m;const g=a/2,v=g/2,x=f-v,w=[{x:-x,y:-g},{x:0,y:-g},{x,y:-g},{x:f,y:0},{x,y:g},{x:0,y:g},{x:-x,y:g},{x:-f,y:0}],S=se(w),k=h.path(S,d),E=i.insert(()=>k,":first-child");return E.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),e.width=l,e.height=a,Ft(e,E),e.intersect=function(L){return kt.polygon(e,w,L)},i}T(BL,"hexagon");async function NL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await Gt(t,e,qt(e)),o=Math.max(30,(e==null?void 0:e.width)??0),a=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:l}=e,u=Pt.svg(i),h=Bt(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],f=se(d),m=u.path(f,h),g=i.insert(()=>m,":first-child");return g.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),g.attr("transform",`translate(${-o/2}, ${-a/2})`),Ft(e,g),e.intersect=function(v){return at.info("Pill intersect",e,{points:d}),kt.polygon(e,d,v)},i}T(NL,"hourglass");async function OL(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Nt(e);e.labelStyle=i;const o=e.assetHeight??48,a=e.assetWidth??48,l=Math.max(o,a),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(l,u??0);const{shapeSvg:h,bbox:d,label:f}=await Gt(t,e,"icon-shape default"),m=e.pos==="t",g=l,v=l,{nodeBorder:x}=r,{stylesMap:w}=ql(e),S=-v/2,k=-g/2,E=e.label?8:0,L=Pt.svg(h),A=Bt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=L.rectangle(S,k,v,g,A),B=Math.max(v,d.width),D=g+d.height+E,q=L.rectangle(-B/2,-D/2,B,D,{...A,fill:"transparent",stroke:"none"}),U=h.insert(()=>M,":first-child"),H=h.insert(()=>q);if(e.icon){const K=h.append("g");K.html(`<g>${await Yu(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const V=K.node().getBBox(),W=V.width,I=V.height,O=V.x,F=V.y;K.attr("transform",`translate(${-W/2-O},${m?d.height/2+E/2-I/2-F:-d.height/2-E/2-I/2-F})`),K.attr("style",`color: ${w.get("stroke")??x};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),U.attr("transform",`translate(0,${m?d.height/2+E/2:-d.height/2-E/2})`),Ft(e,H),e.intersect=function(K){if(at.info("iconSquare intersect",e,K),!e.label)return kt.rect(e,K);const V=e.x??0,W=e.y??0,I=e.height??0;let O=[];return m?O=[{x:V-d.width/2,y:W-I/2},{x:V+d.width/2,y:W-I/2},{x:V+d.width/2,y:W-I/2+d.height+E},{x:V+v/2,y:W-I/2+d.height+E},{x:V+v/2,y:W+I/2},{x:V-v/2,y:W+I/2},{x:V-v/2,y:W-I/2+d.height+E},{x:V-d.width/2,y:W-I/2+d.height+E}]:O=[{x:V-v/2,y:W-I/2},{x:V+v/2,y:W-I/2},{x:V+v/2,y:W-I/2+g},{x:V+d.width/2,y:W-I/2+g},{x:V+d.width/2/2,y:W+I/2},{x:V-d.width/2,y:W+I/2},{x:V-d.width/2,y:W-I/2+g},{x:V-v/2,y:W-I/2+g}],kt.polygon(e,O,K)},h}T(OL,"icon");async function FL(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Nt(e);e.labelStyle=i;const o=e.assetHeight??48,a=e.assetWidth??48,l=Math.max(o,a),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(l,u??0);const{shapeSvg:h,bbox:d,label:f}=await Gt(t,e,"icon-shape default"),m=20,g=e.label?8:0,v=e.pos==="t",{nodeBorder:x,mainBkg:w}=r,{stylesMap:S}=ql(e),k=Pt.svg(h),E=Bt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=S.get("fill");E.stroke=L??w;const A=h.append("g");e.icon&&A.html(`<g>${await Yu(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const M=A.node().getBBox(),B=M.width,D=M.height,q=M.x,U=M.y,H=Math.max(B,D)*Math.SQRT2+m*2,K=k.circle(0,0,H,E),V=Math.max(H,d.width),W=H+d.height+g,I=k.rectangle(-V/2,-W/2,V,W,{...E,fill:"transparent",stroke:"none"}),O=h.insert(()=>K,":first-child"),F=h.insert(()=>I);return A.attr("transform",`translate(${-B/2-q},${v?d.height/2+g/2-D/2-U:-d.height/2-g/2-D/2-U})`),A.attr("style",`color: ${S.get("stroke")??x};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${v?-W/2:W/2-d.height})`),O.attr("transform",`translate(0,${v?d.height/2+g/2:-d.height/2-g/2})`),Ft(e,F),e.intersect=function(P){return at.info("iconSquare intersect",e,P),kt.rect(e,P)},h}T(FL,"iconCircle");async function DL(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Nt(e);e.labelStyle=i;const o=e.assetHeight??48,a=e.assetWidth??48,l=Math.max(o,a),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(l,u??0);const{shapeSvg:h,bbox:d,halfPadding:f,label:m}=await Gt(t,e,"icon-shape default"),g=e.pos==="t",v=l+f*2,x=l+f*2,{nodeBorder:w,mainBkg:S}=r,{stylesMap:k}=ql(e),E=-x/2,L=-v/2,A=e.label?8:0,M=Pt.svg(h),B=Bt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const D=k.get("fill");B.stroke=D??S;const q=M.path(vs(E,L,x,v,5),B),U=Math.max(x,d.width),H=v+d.height+A,K=M.rectangle(-U/2,-H/2,U,H,{...B,fill:"transparent",stroke:"none"}),V=h.insert(()=>q,":first-child").attr("class","icon-shape2"),W=h.insert(()=>K);if(e.icon){const I=h.append("g");I.html(`<g>${await Yu(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const O=I.node().getBBox(),F=O.width,P=O.height,z=O.x,X=O.y;I.attr("transform",`translate(${-F/2-z},${g?d.height/2+A/2-P/2-X:-d.height/2-A/2-P/2-X})`),I.attr("style",`color: ${k.get("stroke")??w};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-H/2:H/2-d.height})`),V.attr("transform",`translate(0,${g?d.height/2+A/2:-d.height/2-A/2})`),Ft(e,W),e.intersect=function(I){if(at.info("iconSquare intersect",e,I),!e.label)return kt.rect(e,I);const O=e.x??0,F=e.y??0,P=e.height??0;let z=[];return g?z=[{x:O-d.width/2,y:F-P/2},{x:O+d.width/2,y:F-P/2},{x:O+d.width/2,y:F-P/2+d.height+A},{x:O+x/2,y:F-P/2+d.height+A},{x:O+x/2,y:F+P/2},{x:O-x/2,y:F+P/2},{x:O-x/2,y:F-P/2+d.height+A},{x:O-d.width/2,y:F-P/2+d.height+A}]:z=[{x:O-x/2,y:F-P/2},{x:O+x/2,y:F-P/2},{x:O+x/2,y:F-P/2+v},{x:O+d.width/2,y:F-P/2+v},{x:O+d.width/2/2,y:F+P/2},{x:O-d.width/2,y:F+P/2},{x:O-d.width/2,y:F-P/2+v},{x:O-x/2,y:F-P/2+v}],kt.polygon(e,z,I)},h}T(DL,"iconRounded");async function IL(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=Nt(e);e.labelStyle=i;const o=e.assetHeight??48,a=e.assetWidth??48,l=Math.max(o,a),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(l,u??0);const{shapeSvg:h,bbox:d,halfPadding:f,label:m}=await Gt(t,e,"icon-shape default"),g=e.pos==="t",v=l+f*2,x=l+f*2,{nodeBorder:w,mainBkg:S}=r,{stylesMap:k}=ql(e),E=-x/2,L=-v/2,A=e.label?8:0,M=Pt.svg(h),B=Bt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const D=k.get("fill");B.stroke=D??S;const q=M.path(vs(E,L,x,v,.1),B),U=Math.max(x,d.width),H=v+d.height+A,K=M.rectangle(-U/2,-H/2,U,H,{...B,fill:"transparent",stroke:"none"}),V=h.insert(()=>q,":first-child"),W=h.insert(()=>K);if(e.icon){const I=h.append("g");I.html(`<g>${await Yu(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);const O=I.node().getBBox(),F=O.width,P=O.height,z=O.x,X=O.y;I.attr("transform",`translate(${-F/2-z},${g?d.height/2+A/2-P/2-X:-d.height/2-A/2-P/2-X})`),I.attr("style",`color: ${k.get("stroke")??w};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-H/2:H/2-d.height})`),V.attr("transform",`translate(0,${g?d.height/2+A/2:-d.height/2-A/2})`),Ft(e,W),e.intersect=function(I){if(at.info("iconSquare intersect",e,I),!e.label)return kt.rect(e,I);const O=e.x??0,F=e.y??0,P=e.height??0;let z=[];return g?z=[{x:O-d.width/2,y:F-P/2},{x:O+d.width/2,y:F-P/2},{x:O+d.width/2,y:F-P/2+d.height+A},{x:O+x/2,y:F-P/2+d.height+A},{x:O+x/2,y:F+P/2},{x:O-x/2,y:F+P/2},{x:O-x/2,y:F-P/2+d.height+A},{x:O-d.width/2,y:F-P/2+d.height+A}]:z=[{x:O-x/2,y:F-P/2},{x:O+x/2,y:F-P/2},{x:O+x/2,y:F-P/2+v},{x:O+d.width/2,y:F-P/2+v},{x:O+d.width/2/2,y:F+P/2},{x:O-d.width/2,y:F+P/2},{x:O-d.width/2,y:F-P/2+v},{x:O-x/2,y:F-P/2+v}],kt.polygon(e,z,I)},h}T(IL,"iconSquare");async function jL(t,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/o;const{labelStyles:a}=Nt(e);e.labelStyle=a;const l=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const u=Math.max(e.label?l??0:0,(e==null?void 0:e.assetWidth)??i),h=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,d=e.constraint==="on"?h/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(h,l??0);const{shapeSvg:f,bbox:m,label:g}=await Gt(t,e,"image-shape default"),v=e.pos==="t",x=-h/2,w=-d/2,S=e.label?8:0,k=Pt.svg(f),E=Bt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=k.rectangle(x,w,h,d,E),A=Math.max(h,m.width),M=d+m.height+S,B=k.rectangle(-A/2,-M/2,A,M,{...E,fill:"none",stroke:"none"}),D=f.insert(()=>L,":first-child"),q=f.insert(()=>B);if(e.img){const U=f.append("image");U.attr("href",e.img),U.attr("width",h),U.attr("height",d),U.attr("preserveAspectRatio","none"),U.attr("transform",`translate(${-h/2},${v?M/2-d:-M/2})`)}return g.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${v?-d/2-m.height/2-S/2:d/2-m.height/2+S/2})`),D.attr("transform",`translate(0,${v?m.height/2+S/2:-m.height/2-S/2})`),Ft(e,q),e.intersect=function(U){if(at.info("iconSquare intersect",e,U),!e.label)return kt.rect(e,U);const H=e.x??0,K=e.y??0,V=e.height??0;let W=[];return v?W=[{x:H-m.width/2,y:K-V/2},{x:H+m.width/2,y:K-V/2},{x:H+m.width/2,y:K-V/2+m.height+S},{x:H+h/2,y:K-V/2+m.height+S},{x:H+h/2,y:K+V/2},{x:H-h/2,y:K+V/2},{x:H-h/2,y:K-V/2+m.height+S},{x:H-m.width/2,y:K-V/2+m.height+S}]:W=[{x:H-h/2,y:K-V/2},{x:H+h/2,y:K-V/2},{x:H+h/2,y:K-V/2+d},{x:H+m.width/2,y:K-V/2+d},{x:H+m.width/2/2,y:K+V/2},{x:H-m.width/2,y:K+V/2},{x:H-m.width/2,y:K-V/2+d},{x:H-h/2,y:K-V/2+d}],kt.polygon(e,W,U)},f}T(jL,"imageSquare");async function zL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=[{x:0,y:0},{x:a,y:0},{x:a+3*l/6,y:-l},{x:-3*l/6,y:-l}];let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=Pt.svg(i),m=Bt(e,{}),g=se(u),v=f.path(g,m);h=i.insert(()=>v,":first-child").attr("transform",`translate(${-a/2}, ${l/2})`),d&&h.attr("style",d)}else h=xs(i,a,l,u);return n&&h.attr("style",n),e.width=a,e.height=l,Ft(e,h),e.intersect=function(f){return kt.polygon(e,u,f)},i}T(zL,"inv_trapezoid");async function Dp(t,e,r){const{labelStyles:n,nodeStyles:i}=Nt(e);e.labelStyle=n;const{shapeSvg:o,bbox:a}=await Gt(t,e,qt(e)),l=Math.max(a.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(a.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),h=-l/2,d=-u/2;let f,{rx:m,ry:g}=e;const{cssStyles:v}=e;if(r!=null&&r.rx&&r.ry&&(m=r.rx,g=r.ry),e.look==="handDrawn"){const x=Pt.svg(o),w=Bt(e,{}),S=m||g?x.path(vs(h,d,l,u,m||0),w):x.rectangle(h,d,l,u,w);f=o.insert(()=>S,":first-child"),f.attr("class","basic label-container").attr("style",qr(v))}else f=o.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",qr(m)).attr("ry",qr(g)).attr("x",h).attr("y",d).attr("width",l).attr("height",u);return Ft(e,f),e.calcIntersect=function(x,w){return kt.rect(x,w)},e.intersect=function(x){return kt.rect(e,x)},o}T(Dp,"drawRect");async function WL(t,e){const{shapeSvg:r,bbox:n,label:i}=await Gt(t,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ft(e,o),e.intersect=function(u){return kt.rect(e,u)},r}T(WL,"labelRect");async function HL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)??0),l=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)??0),u=[{x:0,y:0},{x:a+3*l/6,y:0},{x:a,y:-l},{x:-(3*l)/6,y:-l}];let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=Pt.svg(i),m=Bt(e,{}),g=se(u),v=f.path(g,m);h=i.insert(()=>v,":first-child").attr("transform",`translate(${-a/2}, ${l/2})`),d&&h.attr("style",d)}else h=xs(i,a,l,u);return n&&h.attr("style",n),e.width=a,e.height=l,Ft(e,h),e.intersect=function(f){return kt.polygon(e,u,f)},i}T(HL,"lean_left");async function qL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)??0),l=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)??0),u=[{x:-3*l/6,y:0},{x:a,y:0},{x:a+3*l/6,y:-l},{x:0,y:-l}];let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=Pt.svg(i),m=Bt(e,{}),g=se(u),v=f.path(g,m);h=i.insert(()=>v,":first-child").attr("transform",`translate(${-a/2}, ${l/2})`),d&&h.attr("style",d)}else h=xs(i,a,l,u);return n&&h.attr("style",n),e.width=a,e.height=l,Ft(e,h),e.intersect=function(f){return kt.polygon(e,u,f)},i}T(qL,"lean_right");function VL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",qt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(35,(e==null?void 0:e.width)??0),l=Math.max(35,(e==null?void 0:e.height)??0),u=7,h=[{x:a,y:0},{x:0,y:l+u/2},{x:a-2*u,y:l+u/2},{x:0,y:2*l},{x:a,y:l-u/2},{x:2*u,y:l-u/2}],d=Pt.svg(i),f=Bt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=se(h),g=d.path(m,f),v=i.insert(()=>g,":first-child");return o&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(-${a/2},${-l})`),Ft(e,v),e.intersect=function(x){return at.info("lightningBolt intersect",e,x),kt.polygon(e,h,x)},i}T(VL,"lightningBolt");var SY=T((t,e,r,n,i,o,a)=>[`M${t},${e+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),kY=T((t,e,r,n,i,o,a)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_Y=T((t,e,r,n,i,o)=>[`M${t-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function UL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0),e.width??0),u=l/2,h=u/(2.5+l/50),d=Math.max(o.height+h+(e.padding??0),e.height??0),f=d*.1;let m;const{cssStyles:g}=e;if(e.look==="handDrawn"){const v=Pt.svg(i),x=kY(0,0,l,d,u,h,f),w=_Y(0,h,l,d,u,h),S=Bt(e,{}),k=v.path(x,S),E=v.path(w,S);i.insert(()=>E,":first-child").attr("class","line"),m=i.insert(()=>k,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const v=SY(0,0,l,d,u,h,f);m=i.insert("path",":first-child").attr("d",v).attr("class","basic label-container").attr("style",qr(g)).attr("style",n)}return m.attr("label-offset-y",h),m.attr("transform",`translate(${-l/2}, ${-(d/2+h)})`),Ft(e,m),a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+h-(o.y-(o.top??0))})`),e.intersect=function(v){const x=kt.rect(e,v),w=x.x-(e.x??0);if(u!=0&&(Math.abs(w)<(e.width??0)/2||Math.abs(w)==(e.width??0)/2&&Math.abs(x.y-(e.y??0))>(e.height??0)/2-h)){let S=h*h*(1-w*w/(u*u));S>0&&(S=Math.sqrt(S)),S=h-S,v.y-(e.y??0)>0&&(S=-S),x.y+=S}return x},i}T(UL,"linedCylinder");async function YL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=u/4,d=u+h,{cssStyles:f}=e,m=Pt.svg(i),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=[{x:-l/2-l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:d/2},...hs(-l/2-l/2*.1,d/2,l/2+l/2*.1,d/2,h,.8),{x:l/2+l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:-d/2},{x:-l/2,y:-d/2},{x:-l/2,y:d/2*1.1},{x:-l/2,y:-d/2}],x=m.polygon(v.map(S=>[S.x,S.y]),g),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-u/2+(e.padding??0)-h/2-(o.y-(o.top??0))})`),Ft(e,w),e.intersect=function(S){return kt.polygon(e,v,S)},i}T(YL,"linedWaveEdgedRect");async function GL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=5,d=-l/2,f=-u/2,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{}),x=[{x:d-h,y:f+h},{x:d-h,y:f+u+h},{x:d+l-h,y:f+u+h},{x:d+l-h,y:f+u},{x:d+l,y:f+u},{x:d+l,y:f+u-h},{x:d+l+h,y:f+u-h},{x:d+l+h,y:f-h},{x:d+h,y:f-h},{x:d+h,y:f},{x:d,y:f},{x:d,y:f+h}],w=[{x:d,y:f+h},{x:d+l-h,y:f+h},{x:d+l-h,y:f+u},{x:d+l,y:f+u},{x:d+l,y:f},{x:d,y:f}];e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=se(x),k=g.path(S,v),E=se(w),L=g.path(E,{...v,fill:"none"}),A=i.insert(()=>L,":first-child");return A.insert(()=>k,":first-child"),A.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),a.attr("transform",`translate(${-(o.width/2)-h-(o.x-(o.left??0))}, ${-(o.height/2)+h-(o.y-(o.top??0))})`),Ft(e,A),e.intersect=function(M){return kt.polygon(e,x,M)},i}T(GL,"multiRect");async function XL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=u/4,d=u+h,f=-l/2,m=-d/2,g=5,{cssStyles:v}=e,x=hs(f-g,m+d+g,f+l-g,m+d+g,h,.8),w=x==null?void 0:x[x.length-1],S=[{x:f-g,y:m+g},{x:f-g,y:m+d+g},...x,{x:f+l-g,y:w.y-g},{x:f+l,y:w.y-g},{x:f+l,y:w.y-2*g},{x:f+l+g,y:w.y-2*g},{x:f+l+g,y:m-g},{x:f+g,y:m-g},{x:f+g,y:m},{x:f,y:m},{x:f,y:m+g}],k=[{x:f,y:m+g},{x:f+l-g,y:m+g},{x:f+l-g,y:w.y-g},{x:f+l,y:w.y-g},{x:f+l,y:m},{x:f,y:m}],E=Pt.svg(i),L=Bt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=se(S),M=E.path(A,L),B=se(k),D=E.path(B,L),q=i.insert(()=>M,":first-child");return q.insert(()=>D),q.attr("class","basic label-container"),v&&e.look!=="handDrawn"&&q.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&q.selectAll("path").attr("style",n),q.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-(o.width/2)-g-(o.x-(o.left??0))}, ${-(o.height/2)+g-h/2-(o.y-(o.top??0))})`),Ft(e,q),e.intersect=function(U){return kt.polygon(e,S,U)},i}T(XL,"multiWaveEdgedRectangle");async function KL(t,e,{config:{themeVariables:r}}){var k;const{labelStyles:n,nodeStyles:i}=Nt(e);e.labelStyle=n,e.useHtmlLabels||((k=Wr().flowchart)==null?void 0:k.htmlLabels)!==!1||(e.centerLabel=!0);const{shapeSvg:a,bbox:l,label:u}=await Gt(t,e,qt(e)),h=Math.max(l.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),d=Math.max(l.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),f=-h/2,m=-d/2,{cssStyles:g}=e,v=Pt.svg(a),x=Bt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=v.rectangle(f,m,h,d,x),S=a.insert(()=>w,":first-child");return S.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ft(e,S),e.intersect=function(E){return kt.rect(e,E)},a}T(KL,"note");var TY=T((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function QL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.width+e.padding,l=o.height+e.padding,u=a+l,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let f;const{cssStyles:m}=e;if(e.look==="handDrawn"){const g=Pt.svg(i),v=Bt(e,{}),x=TY(0,0,u),w=g.path(x,v);f=i.insert(()=>w,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),m&&f.attr("style",m)}else f=xs(i,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&f.attr("style",n),Ft(e,f),e.calcIntersect=function(g,v){const x=g.width,w=[{x:x/2,y:0},{x,y:-x/2},{x:x/2,y:-x},{x:0,y:-x/2}],S=kt.polygon(g,w,v);return{x:S.x-.5,y:S.y-.5}},e.intersect=function(g){return this.calcIntersect(e,g)},i}T(QL,"question");async function ZL(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)??0),h=-l/2,d=-u/2,f=d/2,m=[{x:h+f,y:d},{x:h,y:0},{x:h+f,y:-d},{x:-h,y:-d},{x:-h,y:d}],{cssStyles:g}=e,v=Pt.svg(i),x=Bt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=se(m),S=v.path(w,x),k=i.insert(()=>S,":first-child");return k.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${-f/2},0)`),a.attr("transform",`translate(${-f/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ft(e,k),e.intersect=function(E){return kt.polygon(e,m,E)},i}T(ZL,"rect_left_inv_arrow");async function JL(t,e){var D,q;const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";const o=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=o.insert("g"),l=o.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,d=l.node().appendChild(await Xs(h,e.labelStyle,!0,!0));let f={width:0,height:0};if(vr((q=(D=ge())==null?void 0:D.flowchart)==null?void 0:q.htmlLabels)){const U=d.children[0],H=ce(d);f=U.getBoundingClientRect(),H.attr("width",f.width),H.attr("height",f.height)}at.info("Text 2",u);const m=u||[],g=d.getBBox(),v=l.node().appendChild(await Xs(m.join?m.join("<br/>"):m,e.labelStyle,!0,!0)),x=v.children[0],w=ce(v);f=x.getBoundingClientRect(),w.attr("width",f.width),w.attr("height",f.height);const S=(e.padding||0)/2;ce(v).attr("transform","translate( "+(f.width>g.width?0:(g.width-f.width)/2)+", "+(g.height+S+5)+")"),ce(d).attr("transform","translate( "+(f.width<g.width?0:-(g.width-f.width)/2)+", 0)"),f=l.node().getBBox(),l.attr("transform","translate("+-f.width/2+", "+(-f.height/2-S+3)+")");const k=f.width+(e.padding||0),E=f.height+(e.padding||0),L=-f.width/2-S,A=-f.height/2-S;let M,B;if(e.look==="handDrawn"){const U=Pt.svg(o),H=Bt(e,{}),K=U.path(vs(L,A,k,E,e.rx||0),H),V=U.line(-f.width/2-S,-f.height/2-S+g.height+S,f.width/2+S,-f.height/2-S+g.height+S,H);B=o.insert(()=>(at.debug("Rough node insert CXC",K),V),":first-child"),M=o.insert(()=>(at.debug("Rough node insert CXC",K),K),":first-child")}else M=a.insert("rect",":first-child"),B=a.insert("line"),M.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-S).attr("y",-f.height/2-S).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),B.attr("class","divider").attr("x1",-f.width/2-S).attr("x2",f.width/2+S).attr("y1",-f.height/2-S+g.height+S).attr("y2",-f.height/2-S+g.height+S);return Ft(e,M),e.intersect=function(U){return kt.rect(e,U)},o}T(JL,"rectWithTitle");function tu(t,e,r,n,i,o,a){const u=(t+r)/2,h=(e+n)/2,d=Math.atan2(n-e,r-t),f=(r-t)/2,m=(n-e)/2,g=f/i,v=m/o,x=Math.sqrt(g**2+v**2);if(x>1)throw new Error("The given radii are too small to create an arc between the points.");const w=Math.sqrt(1-x**2),S=u+w*o*Math.sin(d)*(a?-1:1),k=h-w*i*Math.cos(d)*(a?-1:1),E=Math.atan2((e-k)/o,(t-S)/i);let A=Math.atan2((n-k)/o,(r-S)/i)-E;a&&A<0&&(A+=2*Math.PI),!a&&A>0&&(A-=2*Math.PI);const M=[];for(let B=0;B<20;B++){const D=B/19,q=E+D*A,U=S+i*Math.cos(q),H=k+o*Math.sin(q);M.push({x:U,y:H})}return M}T(tu,"generateArcPoints");async function tM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=(e==null?void 0:e.padding)??0,l=(e==null?void 0:e.padding)??0,u=(e!=null&&e.width?e==null?void 0:e.width:o.width)+a*2,h=(e!=null&&e.height?e==null?void 0:e.height:o.height)+l*2,d=e.radius||5,f=e.taper||5,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{});e.stroke&&(v.stroke=e.stroke),e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const x=[{x:-u/2+f,y:-h/2},{x:u/2-f,y:-h/2},...tu(u/2-f,-h/2,u/2,-h/2+f,d,d,!0),{x:u/2,y:-h/2+f},{x:u/2,y:h/2-f},...tu(u/2,h/2-f,u/2-f,h/2,d,d,!0),{x:u/2-f,y:h/2},{x:-u/2+f,y:h/2},...tu(-u/2+f,h/2,-u/2,h/2-f,d,d,!0),{x:-u/2,y:h/2-f},{x:-u/2,y:-h/2+f},...tu(-u/2,-h/2+f,-u/2+f,-h/2,d,d,!0)],w=se(x),S=g.path(w,v),k=i.insert(()=>S,":first-child");return k.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),Ft(e,k),e.intersect=function(E){return kt.polygon(e,x,E)},i}T(tM,"roundedRect");async function eM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=(e==null?void 0:e.padding)??0,u=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),h=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=-o.width/2-l,f=-o.height/2-l,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const x=[{x:d,y:f},{x:d+u+8,y:f},{x:d+u+8,y:f+h},{x:d-8,y:f+h},{x:d-8,y:f},{x:d,y:f},{x:d,y:f+h}],w=g.polygon(x.map(k=>[k.x,k.y]),v),S=i.insert(()=>w,":first-child");return S.attr("class","basic label-container").attr("style",qr(m)),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),m&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),a.attr("transform",`translate(${-u/2+4+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-(o.y-(o.top??0))})`),Ft(e,S),e.intersect=function(k){return kt.rect(e,k)},i}T(eM,"shadedProcess");async function rM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-l/2,d=-u/2,{cssStyles:f}=e,m=Pt.svg(i),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const v=[{x:h,y:d},{x:h,y:d+u},{x:h+l,y:d+u},{x:h+l,y:d-u/2}],x=se(v),w=m.path(x,g),S=i.insert(()=>w,":first-child");return S.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),S.attr("transform",`translate(0, ${u/4})`),a.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-u/4+(e.padding??0)-(o.y-(o.top??0))})`),Ft(e,S),e.intersect=function(k){return kt.polygon(e,v,k)},i}T(rM,"slopedRect");async function nM(t,e){const r={rx:0,ry:0,labelPaddingX:e.labelPaddingX??((e==null?void 0:e.padding)||0)*2,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return Dp(t,e,r)}T(nM,"squareRect");async function iM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.height+e.padding,l=o.width+a/4+e.padding,u=a/2,{cssStyles:h}=e,d=Pt.svg(i),f=Bt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-l/2+u,y:-a/2},{x:l/2-u,y:-a/2},...ku(-l/2+u,0,u,50,90,270),{x:l/2-u,y:a/2},...ku(l/2-u,0,u,50,270,450)],g=se(m),v=d.path(g,f),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Ft(e,x),e.intersect=function(w){return kt.polygon(e,m,w)},i}T(iM,"stadium");async function oM(t,e){return Dp(t,e,{rx:5,ry:5})}T(oM,"state");function sM(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=Nt(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:a,stateBorder:l,nodeBorder:u}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=Pt.svg(h),f=Bt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.circle(0,0,14,{...f,stroke:a,strokeWidth:2}),g=l??u,v=d.circle(0,0,5,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>m,":first-child");return x.insert(()=>v),o&&x.selectAll("path").attr("style",o),i&&x.selectAll("path").attr("style",i),Ft(e,x),e.intersect=function(w){return kt.circle(e,7,w)},h}T(sM,"stateEnd");function aM(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if(e.look==="handDrawn"){const l=Pt.svg(i).circle(0,0,14,zW(n));o=i.insert(()=>l),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=i.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ft(e,o),e.intersect=function(a){return kt.circle(e,7,a)},i}T(aM,"stateStart");async function lM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=((e==null?void 0:e.padding)||0)/2,l=o.width+e.padding,u=o.height+e.padding,h=-o.width/2-a,d=-o.height/2-a,f=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){const m=Pt.svg(i),g=Bt(e,{}),v=m.rectangle(h-8,d,l+16,u,g),x=m.line(h,d,h,d+u,g),w=m.line(h+l,d,h+l,d+u,g);i.insert(()=>x,":first-child"),i.insert(()=>w,":first-child");const S=i.insert(()=>v,":first-child"),{cssStyles:k}=e;S.attr("class","basic label-container").attr("style",qr(k)),Ft(e,S)}else{const m=xs(i,l,u,f);n&&m.attr("style",n),Ft(e,m)}return e.intersect=function(m){return kt.polygon(e,f,m)},i}T(lM,"subroutine");async function cM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=-a/2,h=-l/2,d=.2*l,f=.2*l,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{}),x=[{x:u-d/2,y:h},{x:u+a+d/2,y:h},{x:u+a+d/2,y:h+l},{x:u-d/2,y:h+l}],w=[{x:u+a-d/2,y:h+l},{x:u+a+d/2,y:h+l},{x:u+a+d/2,y:h+l-f}];e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=se(x),k=g.path(S,v),E=se(w),L=g.path(E,{...v,fillStyle:"solid"}),A=i.insert(()=>L,":first-child");return A.insert(()=>k,":first-child"),A.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),Ft(e,A),e.intersect=function(M){return kt.polygon(e,x,M)},i}T(cM,"taggedRect");async function uM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=u/4,d=.2*l,f=.2*u,m=u+h,{cssStyles:g}=e,v=Pt.svg(i),x=Bt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=[{x:-l/2-l/2*.1,y:m/2},...hs(-l/2-l/2*.1,m/2,l/2+l/2*.1,m/2,h,.8),{x:l/2+l/2*.1,y:-m/2},{x:-l/2-l/2*.1,y:-m/2}],S=-l/2+l/2*.1,k=-m/2-f*.4,E=[{x:S+l-d,y:(k+u)*1.4},{x:S+l,y:k+u-f},{x:S+l,y:(k+u)*.9},...hs(S+l,(k+u)*1.3,S+l-d,(k+u)*1.5,-u*.03,.5)],L=se(w),A=v.path(L,x),M=se(E),B=v.path(M,{...x,fillStyle:"solid"}),D=i.insert(()=>B,":first-child");return D.insert(()=>A,":first-child"),D.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-h/2-(o.y-(o.top??0))})`),Ft(e,D),e.intersect=function(q){return kt.polygon(e,w,q)},i}T(uM,"taggedWaveEdgedRectangle");async function hM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=Math.max(o.width+e.padding,(e==null?void 0:e.width)||0),l=Math.max(o.height+e.padding,(e==null?void 0:e.height)||0),u=-a/2,h=-l/2,d=i.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",a).attr("height",l),Ft(e,d),e.intersect=function(f){return kt.rect(e,f)},i}T(hM,"text");var EY=T((t,e,r,n,i,o)=>`M${t},${e}
|
|
271
|
+
a${i},${o} 0,0,1 0,${-n}
|
|
272
|
+
l${r},0
|
|
273
|
+
a${i},${o} 0,0,1 0,${n}
|
|
274
|
+
M${r},${-n}
|
|
275
|
+
a${i},${o} 0,0,0 0,${n}
|
|
276
|
+
l${-r},0`,"createCylinderPathD"),$Y=T((t,e,r,n,i,o)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),LY=T((t,e,r,n,i,o)=>[`M${t+r/2},${-n/2}`,`a${i},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function dM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a,halfPadding:l}=await Gt(t,e,qt(e)),u=e.look==="neo"?l*2:l,h=o.height+u,d=h/2,f=d/(2.5+h/50),m=o.width+f+u,{cssStyles:g}=e;let v;if(e.look==="handDrawn"){const x=Pt.svg(i),w=$Y(0,0,m,h,f,d),S=LY(0,0,m,h,f,d),k=x.path(w,Bt(e,{})),E=x.path(S,Bt(e,{fill:"none"}));v=i.insert(()=>E,":first-child"),v=i.insert(()=>k,":first-child"),v.attr("class","basic label-container"),g&&v.attr("style",g)}else{const x=EY(0,0,m,h,f,d);v=i.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",qr(g)).attr("style",n),v.attr("class","basic label-container"),g&&v.selectAll("path").attr("style",g),n&&v.selectAll("path").attr("style",n)}return v.attr("label-offset-x",f),v.attr("transform",`translate(${-m/2}, ${h/2} )`),a.attr("transform",`translate(${-(o.width/2)-f-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ft(e,v),e.intersect=function(x){const w=kt.rect(e,x),S=w.y-(e.y??0);if(d!=0&&(Math.abs(S)<(e.height??0)/2||Math.abs(S)==(e.height??0)/2&&Math.abs(w.x-(e.x??0))>(e.width??0)/2-f)){let k=f*f*(1-S*S/(d*d));k!=0&&(k=Math.sqrt(Math.abs(k))),k=f-k,x.x-(e.x??0)>0&&(k=-k),w.x+=k}return w},i}T(dM,"tiltedCylinder");async function fM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=o.width+e.padding,l=o.height+e.padding,u=[{x:-3*l/6,y:0},{x:a+3*l/6,y:0},{x:a,y:-l},{x:0,y:-l}];let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=Pt.svg(i),m=Bt(e,{}),g=se(u),v=f.path(g,m);h=i.insert(()=>v,":first-child").attr("transform",`translate(${-a/2}, ${l/2})`),d&&h.attr("style",d)}else h=xs(i,a,l,u);return n&&h.attr("style",n),e.width=a,e.height=l,Ft(e,h),e.intersect=function(f){return kt.polygon(e,u,f)},i}T(fM,"trapezoid");async function pM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=60,l=20,u=Math.max(a,o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),h=Math.max(l,o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),{cssStyles:d}=e,f=Pt.svg(i),m=Bt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-u/2*.8,y:-h/2},{x:u/2*.8,y:-h/2},{x:u/2,y:-h/2*.6},{x:u/2,y:h/2},{x:-u/2,y:h/2},{x:-u/2,y:-h/2*.6}],v=se(g),x=f.path(v,m),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),Ft(e,w),e.intersect=function(S){return kt.polygon(e,g,S)},i}T(pM,"trapezoidalPentagon");async function mM(t,e){var k;const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=vr((k=ge().flowchart)==null?void 0:k.htmlLabels),u=o.width+(e.padding??0),h=u+o.height,d=u+o.height,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-h}],{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const x=se(f),w=g.path(x,v),S=i.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return m&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),e.width=u,e.height=h,Ft(e,S),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${h/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(E){return at.info("Triangle intersect",e,f,E),kt.polygon(e,f,E)},i}T(mM,"triangle");async function gM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=u/8,d=u+h,{cssStyles:f}=e,g=70-l,v=g>0?g/2:0,x=Pt.svg(i),w=Bt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-l/2-v,y:d/2},...hs(-l/2-v,d/2,l/2+v,d/2,h,.8),{x:l/2+v,y:-d/2},{x:-l/2-v,y:-d/2}],k=se(S),E=x.path(k,w),L=i.insert(()=>E,":first-child");return L.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-h-(o.y-(o.top??0))})`),Ft(e,L),e.intersect=function(A){return kt.polygon(e,S,A)},i}T(gM,"waveEdgedRectangle");async function yM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o}=await Gt(t,e,qt(e)),a=100,l=50,u=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),h=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=u/h;let f=u,m=h;f>m*d?m=f/d:f=m*d,f=Math.max(f,a),m=Math.max(m,l);const g=Math.min(m*.2,m/4),v=m+g*2,{cssStyles:x}=e,w=Pt.svg(i),S=Bt(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const k=[{x:-f/2,y:v/2},...hs(-f/2,v/2,f/2,v/2,g,1),{x:f/2,y:-v/2},...hs(f/2,-v/2,-f/2,-v/2,g,-1)],E=se(k),L=w.path(E,S),A=i.insert(()=>L,":first-child");return A.attr("class","basic label-container"),x&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),Ft(e,A),e.intersect=function(M){return kt.polygon(e,k,M)},i}T(yM,"waveRectangle");async function vM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await Gt(t,e,qt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=5,d=-l/2,f=-u/2,{cssStyles:m}=e,g=Pt.svg(i),v=Bt(e,{}),x=[{x:d-h,y:f-h},{x:d-h,y:f+u},{x:d+l,y:f+u},{x:d+l,y:f-h}],w=`M${d-h},${f-h} L${d+l},${f-h} L${d+l},${f+u} L${d-h},${f+u} L${d-h},${f-h}
|
|
277
|
+
M${d-h},${f} L${d+l},${f}
|
|
278
|
+
M${d},${f-h} L${d},${f+u}`;e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=g.path(w,v),k=i.insert(()=>S,":first-child");return k.attr("transform",`translate(${h/2}, ${h/2})`),k.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),a.attr("transform",`translate(${-(o.width/2)+h/2-(o.x-(o.left??0))}, ${-(o.height/2)+h/2-(o.y-(o.top??0))})`),Ft(e,k),e.intersect=function(E){return kt.polygon(e,x,E)},i}T(vM,"windowPane");async function t1(t,e){var Z,ot,yt,dt;const r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){const{themeVariables:lt}=Wr(),{background:mt}=lt,xt={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${mt}`]};await t1(t,xt)}const n=Wr();e.useHtmlLabels=n.htmlLabels;let i=((Z=n.er)==null?void 0:Z.diagramPadding)??10,o=((ot=n.er)==null?void 0:ot.entityPadding)??6;const{cssStyles:a}=e,{labelStyles:l,nodeStyles:u}=Nt(e);if(r.attributes.length===0&&e.label){const lt={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5};ko(e.label,n)+lt.labelPaddingX*2<n.er.minEntityWidth&&(e.width=n.er.minEntityWidth);const mt=await Dp(t,e,lt);if(!vr(n.htmlLabels)){const xt=mt.select("text"),St=(yt=xt.node())==null?void 0:yt.getBBox();xt.attr("transform",`translate(${-St.width/2}, 0)`)}return mt}n.htmlLabels||(i*=1.25,o*=1.25);let h=qt(e);h||(h="node default");const d=t.insert("g").attr("class",h).attr("id",e.domId||e.id),f=await rl(d,e.label??"",n,0,0,["name"],l);f.height+=o;let m=0;const g=[],v=[];let x=0,w=0,S=0,k=0,E=!0,L=!0;for(const lt of r.attributes){const mt=await rl(d,lt.type,n,0,m,["attribute-type"],l);x=Math.max(x,mt.width+i);const xt=await rl(d,lt.name,n,0,m,["attribute-name"],l);w=Math.max(w,xt.width+i);const St=await rl(d,lt.keys.join(),n,0,m,["attribute-keys"],l);S=Math.max(S,St.width+i);const Tt=await rl(d,lt.comment,n,0,m,["attribute-comment"],l);k=Math.max(k,Tt.width+i);const ee=Math.max(mt.height,xt.height,St.height,Tt.height)+o;v.push({yOffset:m,rowHeight:ee}),m+=ee}let A=4;S<=i&&(E=!1,S=0,A--),k<=i&&(L=!1,k=0,A--);const M=d.node().getBBox();if(f.width+i*2-(x+w+S+k)>0){const lt=f.width+i*2-(x+w+S+k);x+=lt/A,w+=lt/A,S>0&&(S+=lt/A),k>0&&(k+=lt/A)}const B=x+w+S+k,D=Pt.svg(d),q=Bt(e,{});e.look!=="handDrawn"&&(q.roughness=0,q.fillStyle="solid");let U=0;v.length>0&&(U=v.reduce((lt,mt)=>lt+((mt==null?void 0:mt.rowHeight)??0),0));const H=Math.max(M.width+i*2,(e==null?void 0:e.width)||0,B),K=Math.max((U??0)+f.height,(e==null?void 0:e.height)||0),V=-H/2,W=-K/2;d.selectAll("g:not(:first-child)").each((lt,mt,xt)=>{const St=ce(xt[mt]),Tt=St.attr("transform");let ee=0,Ee=0;if(Tt){const Oe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Tt);Oe&&(ee=parseFloat(Oe[1]),Ee=parseFloat(Oe[2]),St.attr("class").includes("attribute-name")?ee+=x:St.attr("class").includes("attribute-keys")?ee+=x+w:St.attr("class").includes("attribute-comment")&&(ee+=x+w+S))}St.attr("transform",`translate(${V+i/2+ee}, ${Ee+W+f.height+o/2})`)}),d.select(".name").attr("transform","translate("+-f.width/2+", "+(W+o/2)+")");const I=D.rectangle(V,W,H,K,q),O=d.insert(()=>I,":first-child").attr("style",a.join("")),{themeVariables:F}=Wr(),{rowEven:P,rowOdd:z,nodeBorder:X}=F;g.push(0);for(const[lt,mt]of v.entries()){const St=(lt+1)%2===0&&mt.yOffset!==0,Tt=D.rectangle(V,f.height+W+(mt==null?void 0:mt.yOffset),H,mt==null?void 0:mt.rowHeight,{...q,fill:St?P:z,stroke:X});d.insert(()=>Tt,"g.label").attr("style",a.join("")).attr("class",`row-rect-${St?"even":"odd"}`)}let N=D.line(V,f.height+W,H+V,f.height+W,q);d.insert(()=>N).attr("class","divider"),N=D.line(x+V,f.height+W,x+V,K+W,q),d.insert(()=>N).attr("class","divider"),E&&(N=D.line(x+w+V,f.height+W,x+w+V,K+W,q),d.insert(()=>N).attr("class","divider")),L&&(N=D.line(x+w+S+V,f.height+W,x+w+S+V,K+W,q),d.insert(()=>N).attr("class","divider"));for(const lt of g)N=D.line(V,f.height+W+lt,H+V,f.height+W+lt,q),d.insert(()=>N).attr("class","divider");if(Ft(e,O),u&&e.look!=="handDrawn"){const lt=u.split(";"),mt=(dt=lt==null?void 0:lt.filter(xt=>xt.includes("stroke")))==null?void 0:dt.map(xt=>`${xt}`).join("; ");d.selectAll("path").attr("style",mt??""),d.selectAll(".row-rect-even path").attr("style",u)}return e.intersect=function(lt){return kt.rect(e,lt)},d}T(t1,"erBox");async function rl(t,e,r,n=0,i=0,o=[],a=""){const l=t.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",a);e!==Y2(e)&&(e=Y2(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=l.node().appendChild(await ys(l,e,{width:ko(e,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(vr(r.htmlLabels)){const d=u.children[0];d.style.textAlign="start";const f=ce(u);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}return h}T(rl,"addText");async function xM(t,e,r,n,i=r.class.padding??12){const o=n?0:3,a=t.insert("g").attr("class",qt(e)).attr("id",e.domId||e.id);let l=null,u=null,h=null,d=null,f=0,m=0,g=0;if(l=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const k=e.annotations[0];await eu(l,{text:`«${k}»`},0),f=l.node().getBBox().height}u=a.insert("g").attr("class","label-group text"),await eu(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();m=v.height,h=a.insert("g").attr("class","members-group text");let x=0;for(const k of e.members){const E=await eu(h,k,x,[k.parseClassifier()]);x+=E+o}g=h.node().getBBox().height,g<=0&&(g=i/2),d=a.insert("g").attr("class","methods-group text");let w=0;for(const k of e.methods){const E=await eu(d,k,w,[k.parseClassifier()]);w+=E+o}let S=a.node().getBBox();if(l!==null){const k=l.node().getBBox();l.attr("transform",`translate(${-k.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${f})`),S=a.node().getBBox(),h.attr("transform",`translate(0, ${f+m+i*2})`),S=a.node().getBBox(),d.attr("transform",`translate(0, ${f+m+(g?g+i*4:i*2)})`),S=a.node().getBBox(),{shapeSvg:a,bbox:S}}T(xM,"textHelper");async function eu(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),o=Wr();let a="useHtmlLabels"in e?e.useHtmlLabels:vr(o.htmlLabels)??!0,l="";"text"in e?l=e.text:l=e.label,!a&&l.startsWith("\\")&&(l=l.substring(1)),El(l)&&(a=!0);const u=await ys(i,ux(ya(l)),{width:ko(l,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let h,d=1;if(a){const f=u.children[0],m=ce(u);d=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>")&&(d+=f.innerHTML.split("<mrow>").length-1);const g=f.getElementsByTagName("img");if(g){const v=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(x=>new Promise(w=>{function S(){var k;if(x.style.display="flex",x.style.flexDirection="column",v){const E=((k=o.fontSize)==null?void 0:k.toString())??window.getComputedStyle(document.body).fontSize,A=parseInt(E,10)*5+"px";x.style.minWidth=A,x.style.maxWidth=A}else x.style.width="100%";w(x)}T(S,"setupImage"),setTimeout(()=>{x.complete&&S()}),x.addEventListener("error",S),x.addEventListener("load",S)})))}h=f.getBoundingClientRect(),m.attr("width",h.width),m.attr("height",h.height)}else{n.includes("font-weight: bolder")&&ce(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;const f=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(f.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}T(eu,"addText");async function bM(t,e){var q,U;const r=ge(),n=r.class.padding??12,i=n,o=e.useHtmlLabels??vr(r.htmlLabels)??!0,a=e;a.annotations=a.annotations??[],a.members=a.members??[],a.methods=a.methods??[];const{shapeSvg:l,bbox:u}=await xM(t,e,r,o,i),{labelStyles:h,nodeStyles:d}=Nt(e);e.labelStyle=h,e.cssStyles=a.styles||"";const f=((q=a.styles)==null?void 0:q.join(";"))||d||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));const m=a.members.length===0&&a.methods.length===0&&!((U=r.class)!=null&&U.hideEmptyMembersBox),g=Pt.svg(l),v=Bt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const x=u.width;let w=u.height;a.members.length===0&&a.methods.length===0?w+=i:a.members.length>0&&a.methods.length===0&&(w+=i*2);const S=-x/2,k=-w/2,E=g.rectangle(S-n,k-n-(m?n:a.members.length===0&&a.methods.length===0?-n/2:0),x+2*n,w+2*n+(m?n*2:a.members.length===0&&a.methods.length===0?-n:0),v),L=l.insert(()=>E,":first-child");L.attr("class","basic label-container");const A=L.node().getBBox();l.selectAll(".text").each((H,K,V)=>{var z;const W=ce(V[K]),I=W.attr("transform");let O=0;if(I){const N=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);N&&(O=parseFloat(N[2]))}let F=O+k+n-(m?n:a.members.length===0&&a.methods.length===0?-n/2:0);o||(F-=4);let P=S;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(P=-((z=W.node())==null?void 0:z.getBBox().width)/2||0,l.selectAll("text").each(function(X,N,Z){window.getComputedStyle(Z[N]).textAnchor==="middle"&&(P=0)})),W.attr("transform",`translate(${P}, ${F})`)});const M=l.select(".annotation-group").node().getBBox().height-(m?n/2:0)||0,B=l.select(".label-group").node().getBBox().height-(m?n/2:0)||0,D=l.select(".members-group").node().getBBox().height-(m?n/2:0)||0;if(a.members.length>0||a.methods.length>0||m){const H=g.line(A.x,M+B+k+n,A.x+A.width,M+B+k+n,v);l.insert(()=>H).attr("class","divider").attr("style",f)}if(m||a.members.length>0||a.methods.length>0){const H=g.line(A.x,M+B+D+k+i*2+n,A.x+A.width,M+B+D+k+n+i*2,v);l.insert(()=>H).attr("class","divider").attr("style",f)}if(a.look!=="handDrawn"&&l.selectAll("path").attr("style",f),L.select(":nth-child(2)").attr("style",f),l.selectAll(".divider").select("path").attr("style",f),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",f),!o){const H=RegExp(/color\s*:\s*([^;]*)/),K=H.exec(f);if(K){const V=K[0].replace("color","fill");l.selectAll("tspan").attr("style",V)}else if(h){const V=H.exec(h);if(V){const W=V[0].replace("color","fill");l.selectAll("tspan").attr("style",W)}}}return Ft(e,L),e.intersect=function(H){return kt.rect(e,H)},l}T(bM,"classBox");async function wM(t,e){var M,B;const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const i=e,o=e,a=20,l=20,u="verifyMethod"in e,h=qt(e),d=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let f;u?f=await Ni(d,`<<${i.type}>>`,0,e.labelStyle):f=await Ni(d,"<<Element>>",0,e.labelStyle);let m=f;const g=await Ni(d,i.name,m,e.labelStyle+"; font-weight: bold;");if(m+=g+l,u){const D=await Ni(d,`${i.requirementId?`ID: ${i.requirementId}`:""}`,m,e.labelStyle);m+=D;const q=await Ni(d,`${i.text?`Text: ${i.text}`:""}`,m,e.labelStyle);m+=q;const U=await Ni(d,`${i.risk?`Risk: ${i.risk}`:""}`,m,e.labelStyle);m+=U,await Ni(d,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,m,e.labelStyle)}else{const D=await Ni(d,`${o.type?`Type: ${o.type}`:""}`,m,e.labelStyle);m+=D,await Ni(d,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,e.labelStyle)}const v=(((M=d.node())==null?void 0:M.getBBox().width)??200)+a,x=(((B=d.node())==null?void 0:B.getBBox().height)??200)+a,w=-v/2,S=-x/2,k=Pt.svg(d),E=Bt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=k.rectangle(w,S,v,x,E),A=d.insert(()=>L,":first-child");if(A.attr("class","basic label-container").attr("style",n),d.selectAll(".label").each((D,q,U)=>{const H=ce(U[q]),K=H.attr("transform");let V=0,W=0;if(K){const P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(K);P&&(V=parseFloat(P[1]),W=parseFloat(P[2]))}const I=W-x/2;let O=w+a/2;(q===0||q===1)&&(O=V),H.attr("transform",`translate(${O}, ${I+a})`)}),m>f+g+l){const D=k.line(w,S+f+g+l,w+v,S+f+g+l,E);d.insert(()=>D).attr("style",n)}return Ft(e,A),e.intersect=function(D){return kt.rect(e,D)},d}T(wM,"requirementBox");async function Ni(t,e,r,n=""){if(e==="")return 0;const i=t.insert("g").attr("class","label").attr("style",n),o=ge(),a=o.htmlLabels??!0,l=await ys(i,ux(ya(e)),{width:ko(e,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:n},o);let u;if(a){const h=l.children[0],d=ce(l);u=h.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{const h=l.children[0];for(const d of h.children)d.textContent=d.textContent.replaceAll(">",">").replaceAll("<","<"),n&&d.setAttribute("style",n);u=l.getBBox(),u.height+=6}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}T(Ni,"addText");var MY=T(t=>{switch(t){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 CM(t,e,{config:r}){var K,V;const{labelStyles:n,nodeStyles:i}=Nt(e);e.labelStyle=n||"";const o=10,a=e.width;e.width=(e.width??200)-10;const{shapeSvg:l,bbox:u,label:h}=await Gt(t,e,qt(e)),d=e.padding||10;let f="",m;"ticket"in e&&e.ticket&&((K=r==null?void 0:r.kanban)!=null&&K.ticketBaseUrl)&&(f=(V=r==null?void 0:r.kanban)==null?void 0:V.ticketBaseUrl.replace("#TICKET#",e.ticket),m=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));const g={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,x;m?{label:v,bbox:x}=await fy(m,"ticket"in e&&e.ticket||"",g):{label:v,bbox:x}=await fy(l,"ticket"in e&&e.ticket||"",g);const{label:w,bbox:S}=await fy(l,"assigned"in e&&e.assigned||"",g);e.width=a;const k=10,E=(e==null?void 0:e.width)||0,L=Math.max(x.height,S.height)/2,A=Math.max(u.height+k*2,(e==null?void 0:e.height)||0)+L,M=-E/2,B=-A/2;h.attr("transform","translate("+(d-E/2)+", "+(-L-u.height/2)+")"),v.attr("transform","translate("+(d-E/2)+", "+(-L+u.height/2)+")"),w.attr("transform","translate("+(d+E/2-S.width-2*o)+", "+(-L+u.height/2)+")");let D;const{rx:q,ry:U}=e,{cssStyles:H}=e;if(e.look==="handDrawn"){const W=Pt.svg(l),I=Bt(e,{}),O=q||U?W.path(vs(M,B,E,A,q||0),I):W.rectangle(M,B,E,A,I);D=l.insert(()=>O,":first-child"),D.attr("class","basic label-container").attr("style",H||null)}else{D=l.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",i).attr("rx",q??5).attr("ry",U??5).attr("x",M).attr("y",B).attr("width",E).attr("height",A);const W="priority"in e&&e.priority;if(W){const I=l.append("line"),O=M+2,F=B+Math.floor((q??0)/2),P=B+A-Math.floor((q??0)/2);I.attr("x1",O).attr("y1",F).attr("x2",O).attr("y2",P).attr("stroke-width","4").attr("stroke",MY(W))}}return Ft(e,D),e.height=A,e.intersect=function(W){return kt.rect(e,W)},l}T(CM,"kanbanItem");async function SM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:l}=await Gt(t,e,qt(e)),u=o.width+10*a,h=o.height+8*a,d=.15*u,{cssStyles:f}=e,m=o.width+20,g=o.height+20,v=Math.max(u,m),x=Math.max(h,g);l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let w;const S=`M0 0
|
|
279
|
+
a${d},${d} 1 0,0 ${v*.25},${-1*x*.1}
|
|
280
|
+
a${d},${d} 1 0,0 ${v*.25},0
|
|
281
|
+
a${d},${d} 1 0,0 ${v*.25},0
|
|
282
|
+
a${d},${d} 1 0,0 ${v*.25},${x*.1}
|
|
283
|
+
|
|
284
|
+
a${d},${d} 1 0,0 ${v*.15},${x*.33}
|
|
285
|
+
a${d*.8},${d*.8} 1 0,0 0,${x*.34}
|
|
286
|
+
a${d},${d} 1 0,0 ${-1*v*.15},${x*.33}
|
|
287
|
+
|
|
288
|
+
a${d},${d} 1 0,0 ${-1*v*.25},${x*.15}
|
|
289
|
+
a${d},${d} 1 0,0 ${-1*v*.25},0
|
|
290
|
+
a${d},${d} 1 0,0 ${-1*v*.25},0
|
|
291
|
+
a${d},${d} 1 0,0 ${-1*v*.25},${-1*x*.15}
|
|
292
|
+
|
|
293
|
+
a${d},${d} 1 0,0 ${-1*v*.1},${-1*x*.33}
|
|
294
|
+
a${d*.8},${d*.8} 1 0,0 0,${-1*x*.34}
|
|
295
|
+
a${d},${d} 1 0,0 ${v*.1},${-1*x*.33}
|
|
296
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const k=Pt.svg(i),E=Bt(e,{}),L=k.path(S,E);w=i.insert(()=>L,":first-child"),w.attr("class","basic label-container").attr("style",qr(f))}else w=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",S);return w.attr("transform",`translate(${-v/2}, ${-x/2})`),Ft(e,w),e.calcIntersect=function(k,E){return kt.rect(k,E)},e.intersect=function(k){return at.info("Bang intersect",e,k),kt.rect(e,k)},i}T(SM,"bang");async function kM(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:l}=await Gt(t,e,qt(e)),u=o.width+2*a,h=o.height+2*a,d=.15*u,f=.25*u,m=.35*u,g=.2*u,{cssStyles:v}=e;let x;const w=`M0 0
|
|
297
|
+
a${d},${d} 0 0,1 ${u*.25},${-1*u*.1}
|
|
298
|
+
a${m},${m} 1 0,1 ${u*.4},${-1*u*.1}
|
|
299
|
+
a${f},${f} 1 0,1 ${u*.35},${u*.2}
|
|
300
|
+
|
|
301
|
+
a${d},${d} 1 0,1 ${u*.15},${h*.35}
|
|
302
|
+
a${g},${g} 1 0,1 ${-1*u*.15},${h*.65}
|
|
303
|
+
|
|
304
|
+
a${f},${d} 1 0,1 ${-1*u*.25},${u*.15}
|
|
305
|
+
a${m},${m} 1 0,1 ${-1*u*.5},0
|
|
306
|
+
a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
307
|
+
|
|
308
|
+
a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35}
|
|
309
|
+
a${g},${g} 1 0,1 ${u*.1},${-1*h*.65}
|
|
310
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const S=Pt.svg(i),k=Bt(e,{}),E=S.path(w,k);x=i.insert(()=>E,":first-child"),x.attr("class","basic label-container").attr("style",qr(v))}else x=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),x.attr("transform",`translate(${-u/2}, ${-h/2})`),Ft(e,x),e.calcIntersect=function(S,k){return kt.rect(S,k)},e.intersect=function(S){return at.info("Cloud intersect",e,S),kt.rect(e,S)},i}T(kM,"cloud");async function _M(t,e){const{labelStyles:r,nodeStyles:n}=Nt(e);e.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:l}=await Gt(t,e,qt(e)),u=o.width+8*a,h=o.height+2*a,d=5,f=`
|
|
311
|
+
M${-u/2} ${h/2-d}
|
|
312
|
+
v${-h+2*d}
|
|
313
|
+
q0,-${d} ${d},-${d}
|
|
314
|
+
h${u-2*d}
|
|
315
|
+
q${d},0 ${d},${d}
|
|
316
|
+
v${h-2*d}
|
|
317
|
+
q0,${d} -${d},${d}
|
|
318
|
+
h${-u+2*d}
|
|
319
|
+
q-${d},0 -${d},-${d}
|
|
320
|
+
Z
|
|
321
|
+
`,m=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",f);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),i.append(()=>l.node()),Ft(e,m),e.calcIntersect=function(g,v){return kt.rect(g,v)},e.intersect=function(g){return kt.rect(e,g)},i}T(_M,"defaultMindmapNode");async function TM(t,e){const r={padding:e.padding??0};return Jx(t,e,r)}T(TM,"mindmapCircle");var AY=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:nM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:iM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:lM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:EL},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Jx},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:SM},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:kM},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:QL},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:BL},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qL},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:HL},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:fM},{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:zL},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:LL},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:hM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:xL},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:eM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:aM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:sM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:RL},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:NL},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:SL},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:kL},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:_L},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:VL},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:gM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:PL},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:dM},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:UL},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:TL},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:$L},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:mM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:vM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ML},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:pM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:AL},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rM},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:XL},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:GL},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:vL},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:CL},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:uM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:yM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ZL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:YL}],RY=T(()=>{const e=[...Object.entries({state:oM,choice:bL,note:KL,rectWithTitle:JL,labelRect:WL,iconSquare:IL,iconCircle:FL,icon:OL,iconRounded:DL,imageSquare:jL,anchor:yL,kanbanItem:CM,mindmapCircle:TM,defaultMindmapNode:_M,classBox:bM,erBox:t1,requirementBox:wM}),...AY.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),EM=RY();function PY(t){return t in EM}T(PY,"isValidShape");var Ip=new Map;async function $M(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?EM[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let a;r.config.securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a??null),i=await o(n,e,r)}else i=await o(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),Ip.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}T($M,"insertNode");var sJ=T((t,e)=>{Ip.set(e.id,t)},"setNodeElem"),aJ=T(()=>{Ip.clear()},"clear"),lJ=T(t=>{const e=Ip.get(t.id);at.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode"),BY=T((t,e,r,n,i,o)=>{e.arrowTypeStart&&rS(t,"start",e.arrowTypeStart,r,n,i,o),e.arrowTypeEnd&&rS(t,"end",e.arrowTypeEnd,r,n,i,o)},"addEdgeMarkers"),NY={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}},rS=T((t,e,r,n,i,o,a)=>{var f;const l=NY[r];if(!l){at.warn(`Unknown arrow type: ${r}`);return}const u=l.type,d=`${i}_${o}-${u}${e==="start"?"Start":"End"}`;if(a&&a.trim()!==""){const m=a.replace(/[^\dA-Za-z]/g,"_"),g=`${d}_${m}`;if(!document.getElementById(g)){const v=document.getElementById(d);if(v){const x=v.cloneNode(!0);x.id=g,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",a),l.fill&&S.setAttribute("fill",a)}),(f=v.parentNode)==null||f.appendChild(x)}}t.attr(`marker-${e}`,`url(${n}#${g})`)}else t.attr(`marker-${e}`,`url(${n}#${d})`)},"addEdgeMarker"),Bf=new Map,Lr=new Map,cJ=T(()=>{Bf.clear(),Lr.clear()},"clear"),gd=T(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),OY=T(async(t,e)=>{let r=vr(ge().flowchart.htmlLabels);const{labelStyles:n}=Nt(e);e.labelStyle=n;const i=await ys(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});at.info("abc82",e,e.labelType);const o=t.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",e.id);a.node().appendChild(i);let l=i.getBBox();if(r){const h=i.children[0],d=ce(i);l=h.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}a.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),Bf.set(e.id,o),e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){const h=await Xs(e.startLabelLeft,gd(e.labelStyle)),d=t.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner");u=f.node().appendChild(h);const m=h.getBBox();f.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Lr.get(e.id)||Lr.set(e.id,{}),Lr.get(e.id).startLeft=d,ru(u,e.startLabelLeft)}if(e.startLabelRight){const h=await Xs(e.startLabelRight,gd(e.labelStyle)),d=t.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner");u=d.node().appendChild(h),f.node().appendChild(h);const m=h.getBBox();f.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),Lr.get(e.id)||Lr.set(e.id,{}),Lr.get(e.id).startRight=d,ru(u,e.startLabelRight)}if(e.endLabelLeft){const h=await Xs(e.endLabelLeft,gd(e.labelStyle)),d=t.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner");u=f.node().appendChild(h);const m=h.getBBox();f.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),d.node().appendChild(h),Lr.get(e.id)||Lr.set(e.id,{}),Lr.get(e.id).endLeft=d,ru(u,e.endLabelLeft)}if(e.endLabelRight){const h=await Xs(e.endLabelRight,gd(e.labelStyle)),d=t.insert("g").attr("class","edgeTerminals"),f=d.insert("g").attr("class","inner");u=f.node().appendChild(h);const m=h.getBBox();f.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),d.node().appendChild(h),Lr.get(e.id)||Lr.set(e.id,{}),Lr.get(e.id).endRight=d,ru(u,e.endLabelRight)}return i},"insertEdgeLabel");function ru(t,e){ge().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}T(ru,"setTerminalWidth");var FY=T((t,e)=>{at.debug("Moving label abc88 ",t.id,t.label,Bf.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=ge(),{subGraphTitleTotalMargin:i}=Mx(n);if(t.label){const o=Bf.get(t.id);let a=t.x,l=t.y;if(r){const u=mi.calcLabelPosition(r);at.debug("Moving label "+t.label+" from (",a,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(a=u.x,l=u.y)}o.attr("transform",`translate(${a}, ${l+i/2})`)}if(t.startLabelLeft){const o=Lr.get(t.id).startLeft;let a=t.x,l=t.y;if(r){const u=mi.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=u.x,l=u.y}o.attr("transform",`translate(${a}, ${l})`)}if(t.startLabelRight){const o=Lr.get(t.id).startRight;let a=t.x,l=t.y;if(r){const u=mi.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=u.x,l=u.y}o.attr("transform",`translate(${a}, ${l})`)}if(t.endLabelLeft){const o=Lr.get(t.id).endLeft;let a=t.x,l=t.y;if(r){const u=mi.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=u.x,l=u.y}o.attr("transform",`translate(${a}, ${l})`)}if(t.endLabelRight){const o=Lr.get(t.id).endRight;let a=t.x,l=t.y;if(r){const u=mi.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=u.x,l=u.y}o.attr("transform",`translate(${a}, ${l})`)}},"positionEdgeLabel"),DY=T((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),o=Math.abs(e.y-n),a=t.width/2,l=t.height/2;return i>=a||o>=l},"outsideNode"),IY=T((t,e,r)=>{at.debug(`intersection calc abc89:
|
|
322
|
+
outsidePoint: ${JSON.stringify(e)}
|
|
323
|
+
insidePoint : ${JSON.stringify(r)}
|
|
324
|
+
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,o=Math.abs(n-r.x),a=t.width/2;let l=r.x<e.x?a-o:a+o;const u=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*a>Math.abs(n-e.x)*u){let f=r.y<e.y?e.y-u-i:i-u-e.y;l=d*f/h;const m={x:r.x<e.x?r.x+l:r.x-d+l,y:r.y<e.y?r.y+h-f:r.y-h+f};return l===0&&(m.x=e.x,m.y=e.y),d===0&&(m.x=e.x),h===0&&(m.y=e.y),at.debug(`abc89 top/bottom calc, Q ${h}, q ${f}, R ${d}, r ${l}`,m),m}else{r.x<e.x?l=e.x-a-n:l=n-a-e.x;let f=h*l/d,m=r.x<e.x?r.x+d-l:r.x-d+l,g=r.y<e.y?r.y+f:r.y-f;return at.debug(`sides calc abc89, Q ${h}, q ${f}, R ${d}, r ${l}`,{_x:m,_y:g}),l===0&&(m=e.x,g=e.y),d===0&&(m=e.x),h===0&&(g=e.y),{x:m,y:g}}},"intersection"),nS=T((t,e)=>{at.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(o=>{if(at.info("abc88 checking point",o,e),!DY(e,o)&&!i){const a=IY(e,n,o);at.debug("abc88 inside",o,n,a),at.debug("abc88 intersection",a,e);let l=!1;r.forEach(u=>{l=l||u.x===a.x&&u.y===a.y}),r.some(u=>u.x===a.x&&u.y===a.y)?at.warn("abc88 no intersect",a,r):r.push(a),i=!0}else at.warn("abc88 outside",o,n),n=o,i||r.push(o)}),at.debug("returning points",r),r},"cutPathAtIntersect");function LM(t){const e=[],r=[];for(let n=1;n<t.length-1;n++){const i=t[n-1],o=t[n],a=t[n+1];(i.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-i.y)>5||i.y===o.y&&o.x===a.x&&Math.abs(o.x-i.x)>5&&Math.abs(o.y-a.y)>5)&&(e.push(o),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}T(LM,"extractCornerPoints");var iS=T(function(t,e,r){const n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i),a=r/o;return{x:e.x-a*n,y:e.y-a*i}},"findAdjacentPoint"),jY=T(function(t){const{cornerPointPositions:e}=LM(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){const i=t[n-1],o=t[n+1],a=t[n],l=iS(i,a,5),u=iS(o,a,5),h=u.x-l.x,d=u.y-l.y;r.push(l);const f=Math.sqrt(2)*2;let m={x:a.x,y:a.y};if(Math.abs(o.x-i.x)>10&&Math.abs(o.y-i.y)>=10){at.debug("Corner point fixing",Math.abs(o.x-i.x),Math.abs(o.y-i.y));const g=5;a.x===l.x?m={x:h<0?l.x-g+f:l.x+g-f,y:d<0?l.y-f:l.y+f}:m={x:h<0?l.x-f:l.x+f,y:d<0?l.y-g+f:l.y+g-f}}else at.debug("Corner point skipping fixing",Math.abs(o.x-i.x),Math.abs(o.y-i.y));r.push(m,u)}else r.push(t[n]);return r},"fixCorners"),zY=T((t,e,r)=>{const n=t-e-r,i=2,o=2,a=i+o,l=Math.floor(n/a),u=Array(l).fill(`${i} ${o}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),WY=T(function(t,e,r,n,i,o,a,l=!1){var W;const{handDrawnSeed:u}=ge();let h=e.points,d=!1;const f=i;var m=o;const g=[];for(const I in e.cssCompiledStyles)s$(I)||g.push(e.cssCompiledStyles[I]);at.debug("UIO intersect check",e.points,m.x,f.x),m.intersect&&f.intersect&&!l&&(h=h.slice(1,e.points.length-1),h.unshift(f.intersect(h[0])),at.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],m,m.intersect(h[h.length-1])),h.push(m.intersect(h[h.length-1])));const v=btoa(JSON.stringify(h));e.toCluster&&(at.info("to cluster abc88",r.get(e.toCluster)),h=nS(e.points,r.get(e.toCluster).node),d=!0),e.fromCluster&&(at.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=nS(h.reverse(),r.get(e.fromCluster).node).reverse(),d=!0);let x=h.filter(I=>!Number.isNaN(I.y));x=jY(x);let w=Rd;switch(w=hf,e.curve){case"linear":w=hf;break;case"basis":w=Rd;break;case"cardinal":w=uE;break;case"bumpX":w=oE;break;case"bumpY":w=sE;break;case"catmullRom":w=dE;break;case"monotoneX":w=vE;break;case"monotoneY":w=xE;break;case"natural":w=wE;break;case"step":w=CE;break;case"stepAfter":w=kE;break;case"stepBefore":w=SE;break;default:w=Rd}const{x:S,y:k}=jW(e),E=S7().x(S).y(k).curve(w);let L;switch(e.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(e.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let A,M=e.curve==="rounded"?MM(AM(x,e),5):E(x);const B=Array.isArray(e.style)?e.style:[e.style];let D=B.find(I=>I==null?void 0:I.startsWith("stroke:")),q=!1;if(e.look==="handDrawn"){const I=Pt.svg(t);Object.assign([],x);const O=I.path(M,{roughness:.3,seed:u});L+=" transition",A=ce(O).select("path").attr("id",e.id).attr("class"," "+L+(e.classes?" "+e.classes:"")).attr("style",B?B.reduce((P,z)=>P+";"+z,""):"");let F=A.attr("d");A.attr("d",F),t.node().appendChild(A.node())}else{const I=g.join(";"),O=B?B.reduce((ot,yt)=>ot+yt+";",""):"";let F="";e.animate&&(F=" edge-animation-fast"),e.animation&&(F=" edge-animation-"+e.animation);const P=(I?I+";"+O+";":O)+";"+(B?B.reduce((ot,yt)=>ot+";"+yt,""):"");A=t.append("path").attr("d",M).attr("id",e.id).attr("class"," "+L+(e.classes?" "+e.classes:"")+(F??"")).attr("style",P),D=(W=P.match(/stroke:([^;]+)/))==null?void 0:W[1],q=e.animate===!0||!!e.animation||I.includes("animation");const z=A.node(),X=typeof z.getTotalLength=="function"?z.getTotalLength():0,N=bC[e.arrowTypeStart]||0,Z=bC[e.arrowTypeEnd]||0;if(e.look==="neo"&&!q){const yt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?zY(X,N,Z):`0 ${N} ${X-N-Z} ${Z}`}; stroke-dashoffset: 0;`;A.attr("style",yt+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",e.id),A.attr("data-points",v),e.showPoints&&x.forEach(I=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",I.x).attr("cy",I.y)});let U="";(ge().flowchart.arrowMarkerAbsolute||ge().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),at.info("arrowTypeStart",e.arrowTypeStart),at.info("arrowTypeEnd",e.arrowTypeEnd),BY(A,e,U,a,n,D);const H=Math.floor(h.length/2),K=h[H];mi.isLabelCoordinateInPath(K,A.attr("d"))||(d=!0);let V={};return d&&(V.updatedPath=h),V.originalPath=e.points,V},"insertEdge");function MM(t,e){if(t.length<2)return"";let r="";const n=t.length,i=1e-5;for(let o=0;o<n;o++){const a=t[o],l=t[o-1],u=t[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===n-1)r+=`L${a.x},${a.y}`;else{const h=a.x-l.x,d=a.y-l.y,f=u.x-a.x,m=u.y-a.y,g=Math.hypot(h,d),v=Math.hypot(f,m);if(g<i||v<i){r+=`L${a.x},${a.y}`;continue}const x=h/g,w=d/g,S=f/v,k=m/v,E=x*S+w*k,L=Math.max(-1,Math.min(1,E)),A=Math.acos(L);if(A<i||Math.abs(Math.PI-A)<i){r+=`L${a.x},${a.y}`;continue}const M=Math.min(e/Math.sin(A/2),g/2,v/2),B=a.x-x*M,D=a.y-w*M,q=a.x+S*M,U=a.y+k*M;r+=`L${B},${D}`,r+=`Q${a.x},${a.y} ${q},${U}`}}return r}T(MM,"generateRoundedPath");function E0(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,n=e.y-t.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}T(E0,"calculateDeltaAndAngle");function AM(t,e){const r=t.map(i=>({...i}));if(t.length>=2&&Dr[e.arrowTypeStart]){const i=Dr[e.arrowTypeStart],o=t[0],a=t[1],{angle:l}=E0(o,a),u=i*Math.cos(l),h=i*Math.sin(l);r[0].x=o.x+u,r[0].y=o.y+h}const n=t.length;if(n>=2&&Dr[e.arrowTypeEnd]){const i=Dr[e.arrowTypeEnd],o=t[n-1],a=t[n-2],{angle:l}=E0(a,o),u=i*Math.cos(l),h=i*Math.sin(l);r[n-1].x=o.x-u,r[n-1].y=o.y-h}return r}T(AM,"applyMarkerOffsetsToPoints");var HY=T((t,e,r,n)=>{e.forEach(i=>{oG[i](t,r,n)})},"insertMarkers"),qY=T((t,e,r)=>{at.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),VY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),UY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),YY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),GY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),XY=T((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),KY=T((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),QY=T((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),ZY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),JY=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),tG=T((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),eG=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),rG=T((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),nG=T((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
325
|
+
L20,10
|
|
326
|
+
M20,10
|
|
327
|
+
L0,20`)},"requirement_arrow"),iG=T((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oG={extension:qY,composition:VY,aggregation:UY,dependency:YY,lollipop:GY,point:XY,circle:KY,cross:QY,barb:ZY,only_one:JY,zero_or_one:tG,one_or_more:eG,zero_or_more:rG,requirement_arrow:nG,requirement_contains:iG},sG=HY,aG={common:Hl,getConfig:Wr,insertCluster:mY,insertEdge:WY,insertEdgeLabel:OY,insertMarkers:sG,insertNode:$M,interpolateToCurve:Nx,labelHelper:Gt,log:at,positionEdgeLabel:FY},_u={},RM=T(t=>{for(const e of t)_u[e.name]=e},"registerLayoutLoaders"),lG=T(()=>{RM([{name:"dagre",loader:T(async()=>await ve(()=>import("./dagre-6UL2VRFP-DZSkvetS.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:T(async()=>await ve(()=>import("./cose-bilkent-S5V4N54A-BxFitB5E.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");lG();var uJ=T(async(t,e)=>{if(!(t.layoutAlgorithm in _u))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=_u[t.layoutAlgorithm];return(await r.loader()).render(t,e,aG,{algorithm:r.algorithm})},"render"),hJ=T((t="",{fallback:e="dagre"}={})=>{if(t in _u)return t;if(e in _u)return at.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),PM="comm",BM="rule",NM="decl",cG="@import",uG="@namespace",hG="@keyframes",dG="@layer",OM=Math.abs,e1=String.fromCharCode;function FM(t){return t.trim()}function Fd(t,e,r){return t.replace(e,r)}function fG(t,e,r){return t.indexOf(e,r)}function dl(t,e){return t.charCodeAt(e)|0}function Rl(t,e,r){return t.slice(e,r)}function Fi(t){return t.length}function pG(t){return t.length}function yd(t,e){return e.push(t),t}var jp=1,Pl=1,DM=0,Qn=0,or=0,Gl="";function r1(t,e,r,n,i,o,a,l){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:jp,column:Pl,length:a,return:"",siblings:l}}function mG(){return or}function gG(){return or=Qn>0?dl(Gl,--Qn):0,Pl--,or===10&&(Pl=1,jp--),or}function bi(){return or=Qn<DM?dl(Gl,Qn++):0,Pl++,or===10&&(Pl=1,jp++),or}function is(){return dl(Gl,Qn)}function Dd(){return Qn}function zp(t,e){return Rl(Gl,t,e)}function Tu(t){switch(t){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 yG(t){return jp=Pl=1,DM=Fi(Gl=t),Qn=0,[]}function vG(t){return Gl="",t}function py(t){return FM(zp(Qn-1,$0(t===91?t+2:t===40?t+1:t)))}function xG(t){for(;(or=is())&&or<33;)bi();return Tu(t)>2||Tu(or)>3?"":" "}function bG(t,e){for(;--e&&bi()&&!(or<48||or>102||or>57&&or<65||or>70&&or<97););return zp(t,Dd()+(e<6&&is()==32&&bi()==32))}function $0(t){for(;bi();)switch(or){case t:return Qn;case 34:case 39:t!==34&&t!==39&&$0(or);break;case 40:t===41&&$0(t);break;case 92:bi();break}return Qn}function wG(t,e){for(;bi()&&t+or!==57;)if(t+or===84&&is()===47)break;return"/*"+zp(e,Qn-1)+"*"+e1(t===47?t:bi())}function CG(t){for(;!Tu(is());)bi();return zp(t,Qn)}function SG(t){return vG(Id("",null,null,null,[""],t=yG(t),0,[0],t))}function Id(t,e,r,n,i,o,a,l,u){for(var h=0,d=0,f=a,m=0,g=0,v=0,x=1,w=1,S=1,k=0,E="",L=i,A=o,M=n,B=E;w;)switch(v=k,k=bi()){case 40:if(v!=108&&dl(B,f-1)==58){fG(B+=Fd(py(k),"&","&\f"),"&\f",OM(h?l[h-1]:0))!=-1&&(S=-1);break}case 34:case 39:case 91:B+=py(k);break;case 9:case 10:case 13:case 32:B+=xG(v);break;case 92:B+=bG(Dd()-1,7);continue;case 47:switch(is()){case 42:case 47:yd(kG(wG(bi(),Dd()),e,r,u),u),(Tu(v||1)==5||Tu(is()||1)==5)&&Fi(B)&&Rl(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*x:l[h++]=Fi(B)*S;case 125*x:case 59:case 0:switch(k){case 0:case 125:w=0;case 59+d:S==-1&&(B=Fd(B,/\f/g,"")),g>0&&(Fi(B)-f||x===0&&v===47)&&yd(g>32?sS(B+";",n,r,f-1,u):sS(Fd(B," ","")+";",n,r,f-2,u),u);break;case 59:B+=";";default:if(yd(M=oS(B,e,r,h,d,i,l,E,L=[],A=[],f,o),o),k===123)if(d===0)Id(B,e,M,M,L,o,f,l,A);else{switch(m){case 99:if(dl(B,3)===110)break;case 108:if(dl(B,2)===97)break;default:d=0;case 100:case 109:case 115:}d?Id(t,M,M,n&&yd(oS(t,M,M,0,0,i,l,E,i,L=[],f,A),A),i,A,f,l,n?L:A):Id(B,M,M,M,[""],A,0,l,A)}}h=d=g=0,x=S=1,E=B="",f=a;break;case 58:f=1+Fi(B),g=v;default:if(x<1){if(k==123)--x;else if(k==125&&x++==0&&gG()==125)continue}switch(B+=e1(k),k*x){case 38:S=d>0?1:(B+="\f",-1);break;case 44:l[h++]=(Fi(B)-1)*S,S=1;break;case 64:is()===45&&(B+=py(bi())),m=is(),d=f=Fi(E=B+=CG(Dd())),k++;break;case 45:v===45&&Fi(B)==2&&(x=0)}}return o}function oS(t,e,r,n,i,o,a,l,u,h,d,f){for(var m=i-1,g=i===0?o:[""],v=pG(g),x=0,w=0,S=0;x<n;++x)for(var k=0,E=Rl(t,m+1,m=OM(w=a[x])),L=t;k<v;++k)(L=FM(w>0?g[k]+" "+E:Fd(E,/&\f/g,g[k])))&&(u[S++]=L);return r1(t,e,r,i===0?BM:l,u,h,d,f)}function kG(t,e,r,n){return r1(t,e,r,PM,e1(mG()),Rl(t,2,-2),0,n)}function sS(t,e,r,n,i){return r1(t,e,r,NM,Rl(t,0,n),Rl(t,n+1,-1),n,i)}function L0(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function _G(t,e,r,n){switch(t.type){case dG:if(t.children.length)break;case cG:case uG:case NM:return t.return=t.return||t.value;case PM:return"";case hG:return t.return=t.value+"{"+L0(t.children,n)+"}";case BM:if(!Fi(t.value=t.props.join(",")))return""}return Fi(r=L0(t.children,n))?t.return=t.value+"{"+r+"}":""}var TG=u$(Object.keys,Object),EG=Object.prototype,$G=EG.hasOwnProperty;function LG(t){if(!Mp(t))return TG(t);var e=[];for(var r in Object(t))$G.call(t,r)&&r!="constructor"&&e.push(r);return e}var M0=ga(Ki,"DataView"),A0=ga(Ki,"Promise"),R0=ga(Ki,"Set"),P0=ga(Ki,"WeakMap"),aS="[object Map]",MG="[object Object]",lS="[object Promise]",cS="[object Set]",uS="[object WeakMap]",hS="[object DataView]",AG=ma(M0),RG=ma(Su),PG=ma(A0),BG=ma(R0),NG=ma(P0),js=Vl;(M0&&js(new M0(new ArrayBuffer(1)))!=hS||Su&&js(new Su)!=aS||A0&&js(A0.resolve())!=lS||R0&&js(new R0)!=cS||P0&&js(new P0)!=uS)&&(js=function(t){var e=Vl(t),r=e==MG?t.constructor:void 0,n=r?ma(r):"";if(n)switch(n){case AG:return hS;case RG:return aS;case PG:return lS;case BG:return cS;case NG:return uS}return e});var OG="[object Map]",FG="[object Set]",DG=Object.prototype,IG=DG.hasOwnProperty;function dS(t){if(t==null)return!0;if(Ap(t)&&(kf(t)||typeof t=="string"||typeof t.splice=="function"||Px(t)||Bx(t)||Sf(t)))return!t.length;var e=js(t);if(e==OG||e==FG)return!t.size;if(Mp(t))return!LG(t).length;for(var r in t)if(IG.call(t,r))return!1;return!0}var IM="c4",jG=T(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),zG=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./c4Diagram-YG6GDRKO-CMTMP654.js");return{diagram:e}},__vite__mapDeps([8,9]),import.meta.url);return{id:IM,diagram:t}},"loader"),WG={id:IM,detector:jG,loader:zG},HG=WG,jM="flowchart",qG=T((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),VG=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./flowDiagram-NV44I4VS-cRvIpj4q.js");return{diagram:e}},__vite__mapDeps([10,11,12,13,14]),import.meta.url);return{id:jM,diagram:t}},"loader"),UG={id:jM,detector:qG,loader:VG},YG=UG,zM="flowchart-v2",GG=T((t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),XG=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./flowDiagram-NV44I4VS-cRvIpj4q.js");return{diagram:e}},__vite__mapDeps([10,11,12,13,14]),import.meta.url);return{id:zM,diagram:t}},"loader"),KG={id:zM,detector:GG,loader:XG},QG=KG,WM="er",ZG=T(t=>/^\s*erDiagram/.test(t),"detector"),JG=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./erDiagram-Q2GNP2WA-B9nG6AIS.js");return{diagram:e}},__vite__mapDeps([15,12,13,14]),import.meta.url);return{id:WM,diagram:t}},"loader"),tX={id:WM,detector:ZG,loader:JG},eX=tX,HM="gitGraph",rX=T(t=>/^\s*gitGraph/.test(t),"detector"),nX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./gitGraphDiagram-NY62KEGX-BPtCepD0.js");return{diagram:e}},__vite__mapDeps([16,17,18,19,4,2]),import.meta.url);return{id:HM,diagram:t}},"loader"),iX={id:HM,detector:rX,loader:nX},oX=iX,qM="gantt",sX=T(t=>/^\s*gantt/.test(t),"detector"),aX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./ganttDiagram-JELNMOA3-D5PauD1v.js");return{diagram:e}},__vite__mapDeps([20,21,22,23]),import.meta.url);return{id:qM,diagram:t}},"loader"),lX={id:qM,detector:sX,loader:aX},cX=lX,VM="info",uX=T(t=>/^\s*info/.test(t),"detector"),hX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./infoDiagram-WHAUD3N6-0hbOLvdM.js");return{diagram:e}},__vite__mapDeps([24,19,4,2]),import.meta.url);return{id:VM,diagram:t}},"loader"),dX={id:VM,detector:uX,loader:hX},UM="pie",fX=T(t=>/^\s*pie/.test(t),"detector"),pX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./pieDiagram-ADFJNKIX-DMIZSQUQ.js");return{diagram:e}},__vite__mapDeps([25,17,19,4,2,26,27,22]),import.meta.url);return{id:UM,diagram:t}},"loader"),mX={id:UM,detector:fX,loader:pX},YM="quadrantChart",gX=T(t=>/^\s*quadrantChart/.test(t),"detector"),yX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./quadrantDiagram-AYHSOK5B-DBCuVneU.js");return{diagram:e}},__vite__mapDeps([28,21,22,23]),import.meta.url);return{id:YM,diagram:t}},"loader"),vX={id:YM,detector:gX,loader:yX},xX=vX,GM="xychart",bX=T(t=>/^\s*xychart(-beta)?/.test(t),"detector"),wX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./xychartDiagram-PRI3JC2R-C86J7PBK.js");return{diagram:e}},__vite__mapDeps([29,22,27,21,23]),import.meta.url);return{id:GM,diagram:t}},"loader"),CX={id:GM,detector:bX,loader:wX},SX=CX,XM="requirement",kX=T(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),_X=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./requirementDiagram-UZGBJVZJ-Dc87Li5r.js");return{diagram:e}},__vite__mapDeps([30,12,13]),import.meta.url);return{id:XM,diagram:t}},"loader"),TX={id:XM,detector:kX,loader:_X},EX=TX,KM="sequence",$X=T(t=>/^\s*sequenceDiagram/.test(t),"detector"),LX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./sequenceDiagram-WL72ISMW-CegtRWdp.js");return{diagram:e}},__vite__mapDeps([31,9,18]),import.meta.url);return{id:KM,diagram:t}},"loader"),MX={id:KM,detector:$X,loader:LX},AX=MX,QM="class",RX=T((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),PX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./classDiagram-2ON5EDUG-DQalC8tR.js");return{diagram:e}},__vite__mapDeps([32,33,11,12,13]),import.meta.url);return{id:QM,diagram:t}},"loader"),BX={id:QM,detector:RX,loader:PX},NX=BX,ZM="classDiagram",OX=T((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),FX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./classDiagram-v2-WZHVMYZB-DQalC8tR.js");return{diagram:e}},__vite__mapDeps([34,33,11,12,13]),import.meta.url);return{id:ZM,diagram:t}},"loader"),DX={id:ZM,detector:OX,loader:FX},IX=DX,JM="state",jX=T((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),zX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./stateDiagram-FKZM4ZOC-DRXLGy91.js");return{diagram:e}},__vite__mapDeps([35,36,12,13,1,2,3,4]),import.meta.url);return{id:JM,diagram:t}},"loader"),WX={id:JM,detector:jX,loader:zX},HX=WX,tA="stateDiagram",qX=T((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),VX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./stateDiagram-v2-4FDKWEC3-DfAIcXf2.js");return{diagram:e}},__vite__mapDeps([37,36,12,13]),import.meta.url);return{id:tA,diagram:t}},"loader"),UX={id:tA,detector:qX,loader:VX},YX=UX,eA="journey",GX=T(t=>/^\s*journey/.test(t),"detector"),XX=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./journeyDiagram-XKPGCS4Q-CBy5upkf.js");return{diagram:e}},__vite__mapDeps([38,9,11,26]),import.meta.url);return{id:eA,diagram:t}},"loader"),KX={id:eA,detector:GX,loader:XX},QX=KX,ZX=T((t,e,r)=>{at.debug(`rendering svg for syntax error
|
|
328
|
+
`);const n=R7(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),$T(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),rA={draw:ZX},JX=rA,tK={db:{},renderer:rA,parser:{parse:T(()=>{},"parse")}},eK=tK,nA="flowchart-elk",rK=T((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),nK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./flowDiagram-NV44I4VS-cRvIpj4q.js");return{diagram:e}},__vite__mapDeps([10,11,12,13,14]),import.meta.url);return{id:nA,diagram:t}},"loader"),iK={id:nA,detector:rK,loader:nK},oK=iK,iA="timeline",sK=T(t=>/^\s*timeline/.test(t),"detector"),aK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./timeline-definition-IT6M3QCI-Dfw0Almx.js");return{diagram:e}},__vite__mapDeps([39,26]),import.meta.url);return{id:iA,diagram:t}},"loader"),lK={id:iA,detector:sK,loader:aK},cK=lK,oA="mindmap",uK=T(t=>/^\s*mindmap/.test(t),"detector"),hK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./mindmap-definition-VGOIOE7T-CIlFmeVI.js");return{diagram:e}},__vite__mapDeps([40,12,13]),import.meta.url);return{id:oA,diagram:t}},"loader"),dK={id:oA,detector:uK,loader:hK},fK=dK,sA="kanban",pK=T(t=>/^\s*kanban/.test(t),"detector"),mK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./kanban-definition-3W4ZIXB7-DrobDgMJ.js");return{diagram:e}},__vite__mapDeps([41,11]),import.meta.url);return{id:sA,diagram:t}},"loader"),gK={id:sA,detector:pK,loader:mK},yK=gK,aA="sankey",vK=T(t=>/^\s*sankey(-beta)?/.test(t),"detector"),xK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./sankeyDiagram-TZEHDZUN-SnjPjzIj.js");return{diagram:e}},__vite__mapDeps([42,27,22]),import.meta.url);return{id:aA,diagram:t}},"loader"),bK={id:aA,detector:vK,loader:xK},wK=bK,lA="packet",CK=T(t=>/^\s*packet(-beta)?/.test(t),"detector"),SK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./diagram-S2PKOQOG-BMf9iQYN.js");return{diagram:e}},__vite__mapDeps([43,17,19,4,2]),import.meta.url);return{id:lA,diagram:t}},"loader"),kK={id:lA,detector:CK,loader:SK},cA="radar",_K=T(t=>/^\s*radar-beta/.test(t),"detector"),TK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./diagram-QEK2KX5R-BlF0GwV_.js");return{diagram:e}},__vite__mapDeps([44,17,19,4,2]),import.meta.url);return{id:cA,diagram:t}},"loader"),EK={id:cA,detector:_K,loader:TK},uA="block",$K=T(t=>/^\s*block(-beta)?/.test(t),"detector"),LK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./blockDiagram-VD42YOAC-BhDUcRai.js");return{diagram:e}},__vite__mapDeps([45,11,5,1,2,14]),import.meta.url);return{id:uA,diagram:t}},"loader"),MK={id:uA,detector:$K,loader:LK},AK=MK,hA="architecture",RK=T(t=>/^\s*architecture/.test(t),"detector"),PK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./architectureDiagram-VXUJARFQ-cJh390m5.js");return{diagram:e}},__vite__mapDeps([46,17,19,4,2,7]),import.meta.url);return{id:hA,diagram:t}},"loader"),BK={id:hA,detector:RK,loader:PK},NK=BK,dA="treemap",OK=T(t=>/^\s*treemap/.test(t),"detector"),FK=T(async()=>{const{diagram:t}=await ve(async()=>{const{diagram:e}=await import("./diagram-PSM6KHXK-CYnji4ok.js");return{diagram:e}},__vite__mapDeps([47,13,17,19,4,2,23,27,22]),import.meta.url);return{id:dA,diagram:t}},"loader"),DK={id:dA,detector:OK,loader:FK},fS=!1,Wp=T(()=>{fS||(fS=!0,nf("error",eK,t=>t.toLowerCase().trim()==="error"),nf("---",{db:{clear:T(()=>{},"clear")},styles:{},renderer:{draw:T(()=>{},"draw")},parser:{parse:T(()=>{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:T(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),jy(oK,fK,NK),jy(HG,yK,IX,NX,eX,cX,dX,mX,EX,AX,QG,YG,cK,oX,YX,HX,QX,xX,wK,kK,SX,AK,EK,DK))},"addDiagrams"),IK=T(async()=>{at.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(na).map(async([r,{detector:n,loader:i}])=>{if(i)try{qy(r)}catch{try{const{diagram:o,id:a}=await i();nf(a,o,n)}catch(o){throw at.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete na[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){at.error(`Failed to load ${e.length} external diagrams`);for(const r of e)at.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),jK="graphics-document document";function fA(t,e){t.attr("role",jK),e!==""&&t.attr("aria-roledescription",e)}T(fA,"setA11yDiagramInfo");function pA(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}T(pA,"addSVGa11yTitleDescription");var ta,B0=(ta=class{constructor(e,r,n,i,o){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=o}static async fromText(e,r={}){var h,d;const n=Wr(),i=ix(e,n);e=DV(e)+`
|
|
329
|
+
`;try{qy(i)}catch{const f=lj(i);if(!f)throw new gT(`Diagram ${i} not found.`);const{id:m,diagram:g}=await f();nf(m,g)}const{db:o,parser:a,renderer:l,init:u}=qy(i);return a.parser&&(a.parser.yy=o),(h=o.clear)==null||h.call(o),u==null||u(n),r.title&&((d=o.setDiagramTitle)==null||d.call(o,r.title)),await a.parse(e),new ta(i,e,o,a,l)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},T(ta,"Diagram"),ta),pS=[],zK=T(()=>{pS.forEach(t=>{t()}),pS=[]},"attachFunctions"),WK=T(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function mA(t){const e=t.match(mT);if(!e)return{text:t,metadata:{}};let r=IW(e[1],{schema:DW})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}T(mA,"extractFrontMatter");var HK=T(t=>t.replace(/\r\n?/g,`
|
|
330
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),qK=T(t=>{const{text:e,metadata:r}=mA(t),{displayMode:n,title:i,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:i,config:o,text:e}},"processFrontmatter"),VK=T(t=>{const e=mi.detectInit(t)??{},r=mi.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:_V(t),directive:e}},"processDirectives");function n1(t){const e=HK(t),r=qK(e),n=VK(r.text),i=jx(r.config,n.directive);return t=WK(n.text),{code:t,title:r.title,config:i}}T(n1,"preprocessDiagram");function gA(t){const e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}T(gA,"toBase64");var UK=5e4,YK="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",GK="sandbox",XK="loose",KK="http://www.w3.org/2000/svg",QK="http://www.w3.org/1999/xlink",ZK="http://www.w3.org/1999/xhtml",JK="100%",tQ="100%",eQ="border:0;margin:0;",rQ="margin:0",nQ="allow-top-navigation-by-user-activation allow-popups",iQ='The "iframe" tag is not supported by your browser.',oQ=["foreignobject"],sQ=["dominant-baseline"];function i1(t){const e=n1(t);return ef(),kj(e.config??{}),e}T(i1,"processAndSetConfigs");async function yA(t,e){Wp();try{const{code:r,config:n}=i1(t);return{diagramType:(await xA(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}T(yA,"parse");var mS=T((t,e,r=[])=>`
|
|
331
|
+
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),aQ=T((t,e=new Map)=>{var n;let r="";if(t.themeCSS!==void 0&&(r+=`
|
|
332
|
+
${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`
|
|
333
|
+
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`
|
|
334
|
+
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const l=t.htmlLabels??((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(u=>{dS(u.styles)||l.forEach(h=>{r+=mS(u.id,h,u.styles)}),dS(u.textStyles)||(r+=mS(u.id,"tspan",((u==null?void 0:u.textStyles)||[]).map(h=>h.replace("color","fill"))))})}return r},"createCssStyles"),lQ=T((t,e,r,n)=>{const i=aQ(t,r),o=qj(e,i,t.themeVariables);return L0(SG(`${n}{${o}}`),_G)},"createUserStyles"),cQ=T((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=ya(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),uQ=T((t="",e)=>{var i,o;const r=(o=(i=e==null?void 0:e.viewBox)==null?void 0:i.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":tQ,n=gA(`<body style="${rQ}">${t}</body>`);return`<iframe style="width:${JK};height:${r};${eQ}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${nQ}">
|
|
335
|
+
${iQ}
|
|
336
|
+
</iframe>`},"putIntoIFrame"),gS=T((t,e,r,n,i)=>{const o=t.append("div");o.attr("id",r),n&&o.attr("style",n);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",KK);return i&&a.attr("xmlns:xlink",i),a.append("g"),t},"appendDivSvgG");function N0(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}T(N0,"sandboxedIframe");var hQ=T((t,e,r,n)=>{var i,o,a;(i=t.getElementById(e))==null||i.remove(),(o=t.getElementById(r))==null||o.remove(),(a=t.getElementById(n))==null||a.remove()},"removeExistingElements"),dQ=T(async function(t,e,r){var K,V,W,I,O,F;Wp();const n=i1(e);e=n.code;const i=Wr();at.debug(i),e.length>((i==null?void 0:i.maxTextSize)??UK)&&(e=YK);const o="#"+t,a="i"+t,l="#"+a,u="d"+t,h="#"+u,d=T(()=>{const z=ce(m?l:h).node();z&&"remove"in z&&z.remove()},"removeTempElements");let f=ce("body");const m=i.securityLevel===GK,g=i.securityLevel===XK,v=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const P=N0(ce(r),a);f=ce(P.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=ce(r);gS(f,t,u,`font-family: ${v}`,QK)}else{if(hQ(document,t,u,a),m){const P=N0(ce("body"),a);f=ce(P.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=ce("body");gS(f,t,u)}let x,w;try{x=await B0.fromText(e,{title:n.title})}catch(P){if(i.suppressErrorRendering)throw d(),P;x=await B0.fromText("error"),w=P}const S=f.select(h).node(),k=x.type,E=S.firstChild,L=E.firstChild,A=(V=(K=x.renderer).getClasses)==null?void 0:V.call(K,e,x),M=lQ(i,k,A,o),B=document.createElement("style");B.innerHTML=M,E.insertBefore(B,L);try{await x.renderer.draw(e,t,N2.version,x)}catch(P){throw i.suppressErrorRendering?d():JX.draw(e,t,N2.version),P}const D=f.select(`${h} svg`),q=(I=(W=x.db).getAccTitle)==null?void 0:I.call(W),U=(F=(O=x.db).getAccDescription)==null?void 0:F.call(O);bA(k,D,q,U),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",ZK);let H=f.select(h).node().innerHTML;if(at.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),H=cQ(H,m,vr(i.arrowMarkerAbsolute)),m){const P=f.select(h+" svg").node();H=uQ(H,P)}else g||(H=_l.sanitize(H,{ADD_TAGS:oQ,ADD_ATTR:sQ,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(zK(),w)throw w;return d(),{diagramType:k,svg:H,bindFunctions:x.db.bindFunctions}},"render");function vA(t={}){var n;const e=pr({},t);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Cj(e),e!=null&&e.theme&&e.theme in vo?e.themeVariables=vo[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=vo.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?wj(e):wT();nx(r.logLevel),Wp()}T(vA,"initialize");var xA=T((t,e={})=>{const{code:r}=n1(t);return B0.fromText(r,e)},"getDiagramFromText");function bA(t,e,r,n){fA(e,t),pA(e,r,n,e.attr("id"))}T(bA,"addA11yInfo");var ca=Object.freeze({render:dQ,parse:yA,getDiagramFromText:xA,initialize:vA,getConfig:Wr,setConfig:CT,getSiteConfig:wT,updateSiteConfig:Sj,reset:T(()=>{ef()},"reset"),globalReset:T(()=>{ef(Tl)},"globalReset"),defaultConfig:Tl});nx(Wr().logLevel);ef(Wr());var fQ=T((t,e,r)=>{at.warn(t),Ix(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),wA=T(async function(t={querySelector:".mermaid"}){try{await pQ(t)}catch(e){if(Ix(e)&&at.error(e.str),Nn.parseError&&Nn.parseError(e),!t.suppressErrors)throw at.error("Use the suppressErrors option to suppress these errors"),e}},"run"),pQ=T(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=ca.getConfig();at.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");at.debug(`Found ${i.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(at.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),ca.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new mi.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const l=[];for(const u of Array.from(i)){if(at.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const h=`mermaid-${o.next()}`;a=u.innerHTML,a=W$(mi.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=mi.detectInit(a);d&&at.debug("Detected early reinit: ",d);try{const{svg:f,bindFunctions:m}=await _A(h,a,u);u.innerHTML=f,t&&await t(h),m&&m(u)}catch(f){fQ(f,l,Nn.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),CA=T(function(t){ca.initialize(t)},"initialize"),mQ=T(async function(t,e,r){at.warn("mermaid.init is deprecated. Please use run instead."),t&&CA(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await wA(n)},"init"),gQ=T(async(t,{lazyLoad:e=!0}={})=>{Wp(),jy(...t),e===!1&&await IK()},"registerExternalDiagrams"),SA=T(function(){if(Nn.startOnLoad){const{startOnLoad:t}=ca.getConfig();t&&Nn.run().catch(e=>at.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",SA,!1);var yQ=T(function(t){Nn.parseError=t},"setParseErrorHandler"),Nf=[],my=!1,kA=T(async()=>{if(!my){for(my=!0;Nf.length>0;){const t=Nf.shift();if(t)try{await t()}catch(e){at.error("Error executing queue",e)}}my=!1}},"executeQueue"),vQ=T(async(t,e)=>new Promise((r,n)=>{const i=T(()=>new Promise((o,a)=>{ca.parse(t,e).then(l=>{o(l),r(l)},l=>{var u;at.error("Error parsing",l),(u=Nn.parseError)==null||u.call(Nn,l),a(l),n(l)})}),"performCall");Nf.push(i),kA().catch(n)}),"parse"),_A=T((t,e,r)=>new Promise((n,i)=>{const o=T(()=>new Promise((a,l)=>{ca.render(t,e,r).then(u=>{a(u),n(u)},u=>{var h;at.error("Error parsing",u),(h=Nn.parseError)==null||h.call(Nn,u),l(u),i(u)})}),"performCall");Nf.push(o),kA().catch(i)}),"render"),xQ=T(()=>Object.keys(na).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Nn={startOnLoad:!0,mermaidAPI:ca,parse:vQ,render:_A,init:mQ,run:wA,registerExternalDiagrams:gQ,registerLayoutLoaders:RM,initialize:CA,parseError:void 0,contentLoaded:SA,setParseErrorHandler:yQ,detectType:ix,registerIconPacks:WU,getRegisteredDiagramsMetadata:xQ},yS=Nn;/*! Check if previously processed *//*!
|
|
337
|
+
* Wait for document loaded before starting the execution
|
|
338
|
+
*//**
|
|
339
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the MIT license.
|
|
342
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/var bQ={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
344
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
345
|
+
*
|
|
346
|
+
* This source code is licensed under the MIT license.
|
|
347
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
+
*/const ue=(t,e,r,n)=>{const i=$.forwardRef(({color:o="currentColor",size:a=24,stroke:l=2,title:u,className:h,children:d,...f},m)=>$.createElement("svg",{ref:m,...bQ[t],width:a,height:a,className:["tabler-icon",`tabler-icon-${e}`,h].join(" "),...t==="filled"?{fill:o}:{strokeWidth:l,stroke:o},...f},[u&&$.createElement("title",{key:"svg-title"},u),...n.map(([g,v])=>$.createElement(g,v)),...Array.isArray(d)?d:[d]]));return i.displayName=`${r}`,i};/**
|
|
349
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
350
|
+
*
|
|
351
|
+
* This source code is licensed under the MIT license.
|
|
352
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
+
*/const wQ=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],CQ=ue("outline","calendar","Calendar",wQ);/**
|
|
354
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the MIT license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/const SQ=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],TA=ue("outline","check","Check",SQ);/**
|
|
359
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
360
|
+
*
|
|
361
|
+
* This source code is licensed under the MIT license.
|
|
362
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
+
*/const kQ=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],_Q=ue("outline","chevron-left","ChevronLeft",kQ);/**
|
|
364
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the MIT license.
|
|
367
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const TQ=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],EQ=ue("outline","chevron-right","ChevronRight",TQ);/**
|
|
369
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the MIT license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/const $Q=[["path",{d:"M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10",key:"svg-0"}]],LQ=ue("outline","command","Command",$Q);/**
|
|
374
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
375
|
+
*
|
|
376
|
+
* This source code is licensed under the MIT license.
|
|
377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
+
*/const MQ=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],AQ=ue("outline","copy","Copy",MQ);/**
|
|
379
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the MIT license.
|
|
382
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/const RQ=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Of=ue("outline","database","Database",RQ);/**
|
|
384
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the MIT license.
|
|
387
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/const PQ=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],O0=ue("outline","device-mobile","DeviceMobile",PQ);/**
|
|
389
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
390
|
+
*
|
|
391
|
+
* This source code is licensed under the MIT license.
|
|
392
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
393
|
+
*/const BQ=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],NQ=ue("outline","download","Download",BQ);/**
|
|
394
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
395
|
+
*
|
|
396
|
+
* This source code is licensed under the MIT license.
|
|
397
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
+
*/const OQ=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0",key:"svg-2"}],["path",{d:"M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-3"}],["path",{d:"M16 15l2 6l2 -6",key:"svg-4"}]],FQ=ue("outline","file-type-csv","FileTypeCsv",OQ);/**
|
|
399
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
400
|
+
*
|
|
401
|
+
* This source code is licensed under the MIT license.
|
|
402
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
403
|
+
*/const DQ=[["path",{d:"M5 9l14 0",key:"svg-0"}],["path",{d:"M5 15l14 0",key:"svg-1"}],["path",{d:"M11 4l-4 16",key:"svg-2"}],["path",{d:"M17 4l-4 16",key:"svg-3"}]],IQ=ue("outline","hash","Hash",DQ);/**
|
|
404
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
405
|
+
*
|
|
406
|
+
* This source code is licensed under the MIT license.
|
|
407
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
408
|
+
*/const jQ=[["path",{d:"M20 16v-8l3 8v-8",key:"svg-0"}],["path",{d:"M15 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2",key:"svg-1"}],["path",{d:"M1 8h3v6.5a1.5 1.5 0 0 1 -3 0v-.5",key:"svg-2"}],["path",{d:"M7 15a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h1a1 1 0 0 1 1 1",key:"svg-3"}]],zQ=ue("outline","json","Json",jQ);/**
|
|
409
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
410
|
+
*
|
|
411
|
+
* This source code is licensed under the MIT license.
|
|
412
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
+
*/const WQ=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],EA=ue("outline","key","Key",WQ);/**
|
|
414
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
415
|
+
*
|
|
416
|
+
* This source code is licensed under the MIT license.
|
|
417
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
418
|
+
*/const HQ=[["path",{d:"M7 20v-12a4 4 0 0 1 4 -4h2a4 4 0 0 1 4 4v12",key:"svg-0"}],["path",{d:"M7 13l10 0",key:"svg-1"}]],vS=ue("outline","letter-a","LetterA",HQ);/**
|
|
419
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
420
|
+
*
|
|
421
|
+
* This source code is licensed under the MIT license.
|
|
422
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
423
|
+
*/const qQ=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],F0=ue("outline","link","Link",qQ);/**
|
|
424
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
425
|
+
*
|
|
426
|
+
* This source code is licensed under the MIT license.
|
|
427
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
428
|
+
*/const VQ=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],UQ=ue("outline","lock","Lock",VQ);/**
|
|
429
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
430
|
+
*
|
|
431
|
+
* This source code is licensed under the MIT license.
|
|
432
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
433
|
+
*/const YQ=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],GQ=ue("outline","logout","Logout",YQ);/**
|
|
434
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
435
|
+
*
|
|
436
|
+
* This source code is licensed under the MIT license.
|
|
437
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
438
|
+
*/const XQ=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],xS=ue("outline","moon","Moon",XQ);/**
|
|
439
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
440
|
+
*
|
|
441
|
+
* This source code is licensed under the MIT license.
|
|
442
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
443
|
+
*/const KQ=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],QQ=ue("outline","player-play","PlayerPlay",KQ);/**
|
|
444
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
445
|
+
*
|
|
446
|
+
* This source code is licensed under the MIT license.
|
|
447
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
448
|
+
*/const ZQ=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],bS=ue("outline","plus","Plus",ZQ);/**
|
|
449
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
450
|
+
*
|
|
451
|
+
* This source code is licensed under the MIT license.
|
|
452
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
+
*/const JQ=[["path",{d:"M5 2h5v4h-5l0 -4",key:"svg-0"}],["path",{d:"M15 10h5v4h-5l0 -4",key:"svg-1"}],["path",{d:"M5 18h5v4h-5l0 -4",key:"svg-2"}],["path",{d:"M5 10h5v4h-5l0 -4",key:"svg-3"}],["path",{d:"M10 12h5",key:"svg-4"}],["path",{d:"M7.5 6v4",key:"svg-5"}],["path",{d:"M7.5 14v4",key:"svg-6"}]],tZ=ue("outline","schema","Schema",JQ);/**
|
|
454
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
455
|
+
*
|
|
456
|
+
* This source code is licensed under the MIT license.
|
|
457
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
+
*/const eZ=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],jd=ue("outline","search","Search",eZ);/**
|
|
459
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
460
|
+
*
|
|
461
|
+
* This source code is licensed under the MIT license.
|
|
462
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
463
|
+
*/const rZ=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],nZ=ue("outline","selector","Selector",rZ);/**
|
|
464
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
465
|
+
*
|
|
466
|
+
* This source code is licensed under the MIT license.
|
|
467
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
468
|
+
*/const iZ=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],oZ=ue("outline","settings","Settings",iZ);/**
|
|
469
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
470
|
+
*
|
|
471
|
+
* This source code is licensed under the MIT license.
|
|
472
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
473
|
+
*/const sZ=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}],["path",{d:"M11 11a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 12l0 2.5",key:"svg-2"}]],aZ=ue("outline","shield-lock","ShieldLock",sZ);/**
|
|
474
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
475
|
+
*
|
|
476
|
+
* This source code is licensed under the MIT license.
|
|
477
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
478
|
+
*/const lZ=[["path",{d:"M3 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-0"}],["path",{d:"M15 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-1"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-2"}],["path",{d:"M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M12 9l0 3",key:"svg-4"}]],gy=ue("outline","sitemap","Sitemap",lZ);/**
|
|
479
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
480
|
+
*
|
|
481
|
+
* This source code is licensed under the MIT license.
|
|
482
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
483
|
+
*/const cZ=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],wS=ue("outline","sparkles","Sparkles",cZ);/**
|
|
484
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
485
|
+
*
|
|
486
|
+
* This source code is licensed under the MIT license.
|
|
487
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
488
|
+
*/const uZ=[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245",key:"svg-0"}]],hZ=ue("outline","star","Star",uZ);/**
|
|
489
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the MIT license.
|
|
492
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
493
|
+
*/const dZ=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],CS=ue("outline","sun","Sun",dZ);/**
|
|
494
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
495
|
+
*
|
|
496
|
+
* This source code is licensed under the MIT license.
|
|
497
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
498
|
+
*/const fZ=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]],ol=ue("outline","table","Table",fZ);/**
|
|
499
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
500
|
+
*
|
|
501
|
+
* This source code is licensed under the MIT license.
|
|
502
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
503
|
+
*/const pZ=[["path",{d:"M8 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M13 15l3 0",key:"svg-1"}],["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],vd=ue("outline","terminal-2","Terminal2",pZ);/**
|
|
504
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
505
|
+
*
|
|
506
|
+
* This source code is licensed under the MIT license.
|
|
507
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
508
|
+
*/const mZ=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],$A=ue("outline","trash","Trash",mZ);/**
|
|
509
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
510
|
+
*
|
|
511
|
+
* This source code is licensed under the MIT license.
|
|
512
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
513
|
+
*/const gZ=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],zd=ue("outline","x","X",gZ);/**
|
|
514
|
+
* @license @tabler/icons-react v3.36.1 - MIT
|
|
515
|
+
*
|
|
516
|
+
* This source code is licensed under the MIT license.
|
|
517
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
518
|
+
*/const yZ=[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]],vZ=ue("filled","star-filled","StarFilled",yZ);function xZ(t,e=[]){const[r,n]=$.useState(""),[i,o]=$.useState({}),[a,l]=$.useState({}),u=(d,f,m)=>{const g=String(d).toLowerCase(),v=String(m).toLowerCase(),x=Number(d),w=Number(m);switch(f){case"=":return g===v;case"!=":return g!==v;case"contains":return g.includes(v);case"not_contains":return!g.includes(v);case">":return!isNaN(x)&&!isNaN(w)&&x>w;case"<":return!isNaN(x)&&!isNaN(w)&&x<w;case">=":return!isNaN(x)&&!isNaN(w)&&x>=w;case"<=":return!isNaN(x)&&!isNaN(w)&&x<=w;default:return g.includes(v)}};return{filteredItems:$.useMemo(()=>t?t.filter(d=>{if(r.trim()){const v=r.toLowerCase();if(!(e.length>0?e:Object.keys(d)).some(S=>{const k=d[S];return k&&String(k).toLowerCase().includes(v)}))return!1}const f=Object.keys(i);if(f.length===0)return!0;const m={};for(const v of f){const w=i[v].split(",").map(k=>k.trim());let S=!1;for(const k of w){let E="=",L=k;const A=k.match(/^([=!><]+|contains|not_contains)\s*(.*)$/);A&&(E=A[1],L=A[2]);const M=d[v];if(M!==void 0&&u(M,E,L)){S=!0;break}}m[v]=S}let g=m[f[0]];for(let v=1;v<f.length;v++)(a[f[v-1]]||"AND")==="OR"?g=g||m[f[v]]:g=g&&m[f[v]];return g}):[],[t,r,i,a,e]),data:{query:r,activeFilters:i,logicalOperators:a},setData:{setQuery:n,setActiveFilters:o,setLogicalOperators:l}}}function bZ({data:{query:t,activeFilters:e,logicalOperators:r},setData:{setQuery:n,setActiveFilters:i,setLogicalOperators:o},filterOptions:a={}}){const[l,u]=$.useState(!1),[h,d]=$.useState(null),[f,m]=$.useState(null),[g,v]=$.useState(null),x=OS(()=>{u(!1),d(null),m(null),v(null)}),w=["=","!=",">","<",">=","<=","contains","not_contains"],S=()=>h==="key"?Object.keys(a):h==="operator"?w:h==="value"&&f?Array.isArray(a[f])&&a[f].length>0?a[f]:[]:[],k=B=>{if(h==="key")m(B),d("operator");else if(h==="operator")v(B),d("value");else if(h==="value"&&f&&g){const D=`${g} ${B}`;i(q=>{const U=q[f],H=U?`${U},${D}`:D;return{...q,[f]:H}}),E()}},E=()=>{u(!1),d(null),m(null),v(null)},L=B=>{i(D=>{const q={...D};return delete q[B],q})},A=()=>{i({}),n("")},M=Object.keys(e).length>0;return b.jsxs(Je,{gap:"xs",children:[b.jsxs("div",{style:{position:"relative"},ref:x,children:[b.jsx(Bn,{placeholder:"Search or filter...",leftSection:b.jsx(jd,{size:14}),rightSection:t.trim()||M?b.jsx(Dn,{size:"xs",color:"gray",radius:"sm",variant:"subtle",onClick:A,children:b.jsx(zd,{size:12})}):null,size:"sm",radius:"md",value:t,onChange:B=>n(B.currentTarget.value),onFocus:()=>{l||(d("key"),u(!0))},styles:{input:{border:"1px solid #E5E5E5","&:focus":{borderColor:"#9CA3AF"}}}}),l&&h&&b.jsx(Ir,{shadow:"sm",p:"sm",radius:"md",withBorder:!0,style:{position:"absolute",top:"100%",left:0,right:0,zIndex:1e3,marginTop:4},children:b.jsxs(Je,{gap:8,children:[b.jsxs(jt,{size:"xs",fw:600,c:"dimmed",tt:"uppercase",children:[h==="key"&&"Filter by column",h==="operator"&&`Operator for ${f}`,h==="value"&&`Value for ${f} ${g}`]}),b.jsxs(Zt,{gap:6,wrap:"wrap",children:[S().map((B,D)=>b.jsx(ip,{onClick:()=>k(B),variant:"light",checked:!1,size:"xs",radius:"md",styles:{label:{cursor:"pointer"}},children:B},D)),h==="value"&&b.jsx(Bn,{placeholder:"Type value...",size:"xs",radius:"md",autoFocus:!0,style:{flex:1,minWidth:120},onKeyDown:B=>{B.key==="Enter"&&(B.preventDefault(),B.stopPropagation(),k(B.currentTarget.value))}})]})]})})]}),M&&b.jsxs(Zt,{gap:6,wrap:"wrap",align:"center",children:[Object.entries(e).map(([B,D],q,U)=>{const H=D.split(",").map(V=>V.trim()),K=q===U.length-1;return b.jsxs(Zt,{gap:4,align:"center",children:[b.jsx(Zt,{gap:2,children:H.map((V,W)=>b.jsxs(as,{size:"md",radius:"md",variant:"outline",color:"gray",pr:4,rightSection:b.jsx(zd,{size:12,style:{cursor:"pointer"},onClick:()=>{const I=H.filter((O,F)=>F!==W);I.length===0?L(B):i(O=>({...O,[B]:I.join(",")}))}}),styles:{root:{textTransform:"none",fontWeight:500}},children:[b.jsx(jt,{span:!0,c:"dimmed",size:"xs",children:B})," ",V]},`${B}-${W}`))}),!K&&b.jsx(_e,{size:"xs",variant:"subtle",color:"gray",onClick:()=>{o(V=>({...V,[B]:V[B]==="OR"?"AND":"OR"}))},title:"Toggle AND/OR",fw:700,px:4,h:"auto",py:2,c:"dimmed",styles:{label:{fontSize:"10px"}},children:r[B]||"AND"})]},B)}),b.jsx(Dn,{size:"sm",variant:"subtle",color:"red",onClick:A,title:"Clear all",children:b.jsx(zd,{size:14})})]})]})}function yy({data:t=[],columns:e,filename:r="export",size:n="xs",variant:i="default",compact:o=!1}){const a=()=>e!=null&&e.length?e.map(f=>typeof f=="string"?f:f.name):t.length>0?Object.keys(t[0]):[],l=()=>{if(t.length===0)return;const f=a(),m=[f.join(","),...t.map(g=>f.map(v=>`"${String(g[v]??"").replace(/"/g,'""')}"`).join(","))].join(`
|
|
519
|
+
`);h(`${r}.csv`,m,"text/csv")},u=()=>{if(t.length===0)return;const f=JSON.stringify(t,null,2);h(`${r}.json`,f,"application/json")},h=(f,m,g)=>{const v=new Blob([m],{type:g}),x=URL.createObjectURL(v),w=document.createElement("a");w.href=x,w.download=f,w.click(),URL.revokeObjectURL(x)},d=o?"compact-xs":n;return b.jsxs(je,{shadow:"md",width:160,children:[b.jsx(je.Target,{children:b.jsx(_e,{size:d,variant:i,color:"dark",leftSection:b.jsx(NQ,{size:14}),disabled:t.length===0,children:"Export"})}),b.jsxs(je.Dropdown,{children:[b.jsx(je.Label,{children:"Export as"}),b.jsx(je.Item,{leftSection:b.jsx(FQ,{size:16}),onClick:l,children:"CSV"}),b.jsx(je.Item,{leftSection:b.jsx(zQ,{size:16}),onClick:u,children:"JSON"})]})]})}function wZ({onConfirm:t,holdDuration:e=3e3,icon:r=$A,color:n="red",size:i="md",tooltip:o="Segure para confirmar",confirmingTooltip:a="Segurando...",...l}){const[u,h]=$.useState(0),[d,f]=$.useState(!1),m=$.useRef(null),g=$.useRef(null),v=$.useCallback(()=>{l.disabled||l.loading||(f(!0),g.current=Date.now(),m.current=setInterval(()=>{const w=Date.now()-g.current,S=Math.min(w/e*100,100);h(S),S>=100&&(clearInterval(m.current),f(!1),h(0),t==null||t())},50))},[e,t,l.disabled,l.loading]),x=$.useCallback(()=>{m.current&&(clearInterval(m.current),m.current=null),f(!1),h(0)},[]);return $.useEffect(()=>()=>{m.current&&clearInterval(m.current)},[]),b.jsx(Co,{label:d?a:o,withArrow:!0,children:b.jsxs(st,{style:{position:"relative",display:"inline-flex",verticalAlign:"middle"},children:[d&&b.jsx(Qv,{size:i==="sm"?28:i==="md"?34:42,thickness:2,sections:[{value:u,color:n}],style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}}),b.jsx(Dn,{variant:"subtle",color:n,size:i,onMouseDown:v,onMouseUp:x,onMouseLeave:x,onTouchStart:v,onTouchEnd:x,style:{opacity:d?.7:1,transition:"opacity 0.2s",...l.style},...l,children:l.loading?b.jsx(Pn,{size:12,color:n}):b.jsx(r,{size:i==="sm"?14:i==="md"?18:22})})]})})}function CZ({onDelete:t,timerSeconds:e=3,children:r,loading:n,disabled:i,variant:o="light",color:a="red",leftSection:l=b.jsx($A,{size:14}),...u}){const[h,d]=$.useState(!1),[f,m]=$.useState(e),g=$.useRef(null),v=$.useRef(null),x=()=>{n||i||(d(!0),m(e),g.current=setTimeout(()=>{S()},e*1e3),v.current=setInterval(()=>{m(k=>{const E=k-1;return E<=0?(clearInterval(v.current),0):E})},1e3))},w=()=>{d(!1),m(e),g.current&&clearTimeout(g.current),v.current&&clearInterval(v.current)},S=async()=>{w(),t&&await t()};return $.useEffect(()=>()=>w(),[]),b.jsx(Co,{label:"Mantenha pressionado até a contagem terminar para confirmar a exclusão",withArrow:!0,multiline:!0,w:220,children:b.jsx(_e,{variant:o,color:h?"orange":a,leftSection:l,onMouseDown:x,onMouseUp:w,onMouseLeave:w,onTouchStart:x,onTouchEnd:w,disabled:n||i,style:{transition:"all 0.2s ease",transform:h?"scale(0.98)":"scale(1)",...u.style},...u,children:h?`Excluindo em ${f}s...`:r||"Segure para Excluir"})})}function LA({onDelete:t,timerSeconds:e=3,type:r="button",...n}){return r==="icon"?b.jsx(wZ,{onConfirm:t,holdDuration:e*1e3,...n}):b.jsx(CZ,{onDelete:t,timerSeconds:e,...n})}function SZ({onConfigured:t}){const[e,r]=$.useState("admin"),[n,i]=$.useState(""),[o,a]=$.useState(!1),l=async u=>{if(u.preventDefault(),!n){Jt.show({title:"Error",message:"Password is required",color:"red"});return}a(!0);try{const d=await(await fetch("/admin/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n})})).json();d.success?(Jt.show({title:"Welcome!",message:"System configured successfully",color:"green"}),t()):Jt.show({title:"Error",message:d.error,color:"red"})}catch{Jt.show({title:"Error",message:"Failed to connect to server",color:"red"})}a(!1)};return b.jsx(st,{style:{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FBFAF8"},children:b.jsxs(op,{size:420,children:[b.jsxs(Je,{align:"center",mb:"xl",children:[b.jsx(go,{size:60,radius:"md",color:"dark",children:b.jsx(Of,{size:34})}),b.jsx(mo,{order:1,fw:700,children:"Welcome to SQLite Admin"}),b.jsx(jt,{c:"dimmed",size:"sm",ta:"center",children:"Set up your administrator credentials to start managing your database."})]}),b.jsx(Ir,{withBorder:!0,shadow:"md",p:30,radius:"md",children:b.jsx("form",{onSubmit:l,children:b.jsxs(Je,{children:[b.jsx(Bn,{label:"Administrator Username",placeholder:"admin",required:!0,value:e,onChange:u=>r(u.target.value)}),b.jsx(fp,{label:"Password",placeholder:"Choose a strong password",required:!0,value:n,onChange:u=>i(u.target.value)}),b.jsx(Zt,{mt:"lg",justify:"flex-end",children:b.jsx(_e,{type:"submit",color:"dark",fullWidth:!0,loading:o,leftSection:b.jsx(aZ,{size:18}),children:"Save and Start"})})]})})}),b.jsx(jt,{c:"dimmed",size:"xs",ta:"center",mt:"xl",children:"This configuration will be saved in sqlite-admin-config.json"})]})})}function kZ({onLogin:t}){const[e,r]=$.useState(""),[n,i]=$.useState(""),[o,a]=$.useState(""),[l,u]=$.useState(!1),[h,d]=$.useState(!1),f=async m=>{m.preventDefault(),d(!0);try{const v=await(await fetch("/admin/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n,totpCode:o})})).json();v.success?t():v.code==="2FA_REQUIRED"?(u(!0),Jt.show({title:"Authentication Required",message:"Please enter your 2FA code",color:"blue",icon:b.jsx(O0,{size:16})})):Jt.show({title:"Login Failed",message:v.error||"Invalid credentials",color:"red"})}catch{Jt.show({title:"Error",message:"Failed to connect to server",color:"red"})}d(!1)};return b.jsx(st,{style:{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FBFAF8"},children:b.jsxs(op,{size:420,children:[b.jsxs(Je,{align:"center",mb:"xl",children:[b.jsx(go,{size:60,radius:"md",color:"dark",children:b.jsx(Of,{size:34})}),b.jsx(mo,{order:1,fw:700,children:"SQLite Admin Login"})]}),b.jsx(Ir,{withBorder:!0,shadow:"md",p:30,radius:"md",children:b.jsx("form",{onSubmit:f,children:b.jsxs(Je,{children:[b.jsx(Bn,{label:"Username",placeholder:"Your username",required:!0,value:e,onChange:m=>r(m.target.value),disabled:l}),b.jsx(fp,{label:"Password",placeholder:"Your password",required:!0,value:n,onChange:m=>i(m.target.value),disabled:l}),l&&b.jsx(Bn,{label:"Authenticator Code (2FA)",placeholder:"000 000",required:!0,autoFocus:!0,value:o,onChange:m=>a(m.target.value),leftSection:b.jsx(O0,{size:16}),maxLength:6}),b.jsx(Zt,{mt:"lg",children:b.jsx(_e,{type:"submit",color:"dark",fullWidth:!0,loading:h,leftSection:b.jsx(UQ,{size:18}),children:l?"Verify & Login":"Login"})}),l&&b.jsx(jt,{size:"xs",c:"dimmed",ta:"center",style:{cursor:"pointer"},onClick:()=>{u(!1),a("")},children:"Cancel"})]})})})]})})}function _Z({opened:t,onClose:e}){const[r,n]=$.useState(null),[i,o]=$.useState(!0),[a,l]=$.useState(0),[u,h]=$.useState(null),[d,f]=$.useState(""),[m,g]=$.useState(!1);$.useEffect(()=>{t&&v()},[t]);const v=async()=>{o(!0);try{const E=await(await fetch("/admin/auth/status")).json();n(E)}catch{Jt.show({title:"Error",message:"Failed to load status",color:"red"})}o(!1)},x=async()=>{l(1);try{const E=await(await fetch("/admin/api/totp/generate",{method:"POST"})).json();E.success?(h(E),l(2)):(Jt.show({title:"Error",message:"Failed to generate QR",color:"red"}),l(0))}catch{l(0)}},w=async()=>{if(d){g(!0);try{(await(await fetch("/admin/api/totp/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:u.secret,code:d})})).json()).success?(Jt.show({title:"Success",message:"2FA Enabled!",color:"green"}),l(0),v()):Jt.show({title:"Error",message:"Invalid code",color:"red"})}catch{Jt.show({title:"Error",message:"Request failed",color:"red"})}g(!1)}},S=async()=>{const k=prompt("Enter your 2FA code to confirm disabling:");if(k)try{const L=await(await fetch("/admin/api/totp/disable",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:k})})).json();L.success?(Jt.show({title:"Success",message:"2FA Disabled",color:"gray"}),v()):Jt.show({title:"Error",message:L.error||"Failed to disable",color:"red"})}catch{Jt.show({title:"Error",message:"Request failed",color:"red"})}};return b.jsx(Mr,{opened:t,onClose:e,title:"Security Settings",size:"lg",children:i?b.jsx(Je,{align:"center",py:"xl",children:b.jsx(Pn,{})}):b.jsxs(Je,{children:[b.jsxs(Zt,{justify:"space-between",align:"flex-start",children:[b.jsxs(Zt,{children:[b.jsx(go,{size:"xl",radius:"md",color:r!=null&&r.totpEnabled?"green":"gray",variant:"light",children:b.jsx(O0,{size:28})}),b.jsxs("div",{children:[b.jsx(jt,{fw:600,children:"Two-Factor Authentication (2FA)"}),b.jsx(jt,{size:"sm",c:"dimmed",children:r!=null&&r.totpEnabled?"Your account is secured with 2FA.":"Add an extra layer of security to your account."})]})]}),r!=null&&r.totpEnabled?b.jsx(_e,{color:"red",variant:"subtle",onClick:S,children:"Disable"}):a===0&&b.jsx(_e,{color:"dark",onClick:x,children:"Enable 2FA"})]}),a===2&&u&&b.jsx(Ir,{withBorder:!0,p:"md",radius:"md",bg:"gray.0",children:b.jsxs(Je,{align:"center",children:[b.jsx(jt,{fw:600,children:"1. Scan QR Code"}),b.jsx(jt,{size:"sm",c:"dimmed",ta:"center",children:"Use your authenticator app (Google Authenticator, Authy, etc.) to scan this code."}),b.jsx("div",{style:{background:"white",padding:"10px",borderRadius:"8px"},children:b.jsx(jv,{src:u.qrCode,w:180,h:180})}),b.jsxs(Zt,{gap:"xs",children:[b.jsxs(jt,{size:"xs",c:"dimmed",children:["Secret: ",u.secret]}),b.jsx(A_,{value:u.secret,children:({copied:k,copy:E})=>b.jsx(Dn,{variant:"subtle",color:k?"green":"gray",onClick:E,size:"xs",children:k?b.jsx(TA,{size:12}):b.jsx(AQ,{size:12})})})]}),b.jsx(jt,{fw:600,mt:"md",children:"2. Verify Code"}),b.jsxs(Zt,{align:"flex-start",children:[b.jsx(Bn,{placeholder:"000 000",value:d,onChange:k=>f(k.target.value),maxLength:6,w:140}),b.jsx(_e,{onClick:w,loading:m,color:"dark",children:"Verify"})]}),b.jsx(_e,{variant:"subtle",size:"xs",color:"gray",onClick:()=>l(0),children:"Cancel"})]})})]})})}const TZ=({tables:t,favorites:e,currentTable:r,onSelectTable:n})=>b.jsx(Si,{style:{flex:1},children:b.jsxs(Je,{gap:0,children:[b.jsx(jt,{size:"xs",fw:500,c:"#91918E",px:"xs",mb:4,mt:"xs",style:{textTransform:"uppercase",fontSize:"11px",letterSpacing:"0.03em"},children:"Favorites"}),e.map(i=>b.jsx(Di,{label:i,leftSection:b.jsx(ol,{size:16}),active:r===i,onClick:()=>n(i),style:{borderRadius:6}},i)),e.length===0&&b.jsx(jt,{size:"xs",c:"dimmed",px:"sm",py:2,fs:"italic",children:"No favorites"}),b.jsx(jt,{size:"xs",fw:500,c:"#91918E",px:"xs",mb:4,mt:"lg",style:{textTransform:"uppercase",fontSize:"11px",letterSpacing:"0.03em"},children:"Tables"}),t.filter(i=>!e.includes(i.name)).map(i=>b.jsx(Di,{label:i.name,leftSection:b.jsx(ol,{size:16}),active:r===i.name,onClick:()=>n(i.name),style:{borderRadius:6}},i.name))]})}),EZ=({table:t,id:e,label:r,API:n})=>{const[i,o]=$.useState(null),[a,l]=$.useState(!1),[u,h]=$.useState(!1),d=async()=>{if(!u){l(!0);try{const m=await(await fetch(`${n}/query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:`SELECT * FROM ${t} WHERE rowid = ${e} LIMIT 1`})})).json();m.success&&m.rows&&m.rows.length>0&&o(m.rows[0])}catch(f){console.error(f)}l(!1),h(!0)}};return b.jsxs(Qs,{width:280,shadow:"md",openDelay:300,onOpen:d,children:[b.jsx(Qs.Target,{children:b.jsxs(Zt,{gap:6,wrap:"nowrap",style:{cursor:"pointer"},children:[b.jsx(as,{variant:"outline",color:"gray",size:"sm",leftSection:b.jsx(F0,{size:10}),styles:{label:{fontWeight:500}},children:e}),r&&b.jsx(jt,{size:"xs",c:"dimmed",lineClamp:1,children:r})]})}),b.jsx(Qs.Dropdown,{children:a?b.jsx(cl,{p:"sm",children:b.jsx(Pn,{size:"xs",type:"dots"})}):i?b.jsxs(Je,{gap:"xs",children:[b.jsxs(Zt,{justify:"space-between",children:[b.jsx(jt,{size:"xs",fw:700,c:"dimmed",tt:"uppercase",children:t}),b.jsxs(as,{size:"xs",variant:"light",children:["ID: ",e]})]}),b.jsx(jt,{size:"sm",fw:600,lineClamp:2,children:r||"Record"}),b.jsx(Hs,{}),b.jsx(Je,{gap:4,children:Object.entries(i).filter(([f])=>f!=="id"&&!f.toLowerCase().includes("id")).slice(0,3).map(([f,m])=>b.jsxs(Zt,{justify:"space-between",align:"flex-start",wrap:"nowrap",children:[b.jsxs(jt,{size:"xs",c:"dimmed",style:{minWidth:60},children:[f,":"]}),b.jsx(jt,{size:"xs",lineClamp:1,style:{textAlign:"right"},children:String(m)})]},f))})]}):b.jsx(jt,{size:"xs",c:"dimmed",children:"No preview available"})})]})},$Z=({row:t,col:e,pk:r,isEditing:n,onStartEdit:i,onUpdate:o,onCancelEdit:a,fkMap:l,API:u,currentTable:h,getTagColor:d,isTagColumn:f})=>{const m=t[e.name],g=t[r],v=e.pk===1,x=!!e.fk,[w,S]=$.useState([]),[k,E]=$.useState(!1);return $.useEffect(()=>{n&&x&&(E(!0),fetch(`${u}/table/${h}/fk-options?refTable=${e.fk.table}&refColumn=${e.fk.column}`).then(L=>L.json()).then(L=>{L.success&&S(L.options.map(A=>({value:String(A.value),label:`${A.label} (ID: ${A.value})`}))),E(!1)}).catch(()=>E(!1)))},[n,x,u,h,e.fk]),n?x?b.jsx(Zs,{size:"xs",autoFocus:!0,searchable:!0,data:w,defaultValue:m===null?null:String(m),placeholder:k?"Loading...":`Select ${e.fk.table}`,onChange:L=>{o(g,e.name,L)},onBlur:a,styles:{input:{minHeight:"28px",height:"28px"}},onKeyDownCapture:L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),a())}}):b.jsx(Bn,{size:"xs",autoFocus:!0,defaultValue:m===null?"":String(m),onBlur:L=>o(g,e.name,L.target.value),onKeyDown:L=>{L.key==="Enter"?o(g,e.name,L.target.value):L.key==="Escape"&&a()},styles:{input:{minHeight:"28px",height:"28px",padding:"0 8px"}}}):m===null?b.jsx(jt,{c:"dimmed",fs:"italic",size:"sm",onClick:()=>!v&&i(g,e.name),style:{cursor:v?"default":"text"},children:"null"}):x?b.jsx("div",{onClick:L=>{L.stopPropagation(),i(g,e.name)},children:b.jsx(EZ,{table:e.fk.table,id:m,label:l[`${e.fk.table}:${m}`],API:u})}):f(e.name)?b.jsx(as,{color:d(m),variant:"light",onClick:()=>i(g,e.name),style:{cursor:"pointer"},children:m}):b.jsx(jt,{size:"sm",onClick:()=>!v&&i(g,e.name),style:{cursor:v?"default":"text",padding:"4px 0",borderRadius:"4px"},className:v?"":"editable-cell",children:String(m)})},LZ=({columns:t,rows:e,pk:r,selectedRows:n,onSelectRow:i,onSelectAll:o,onSort:a,sort:l,sortDir:u,getColumnIcon:h,onDeleteRecord:d,editingCell:f,onStartEdit:m,onUpdateCell:g,onCancelEdit:v,fkMap:x,API:w,currentTable:S,getTagColor:k,isTagColumn:E})=>b.jsx(Si,{children:b.jsxs(zt,{striped:!1,highlightOnHover:!0,withTableBorder:!1,verticalSpacing:"xs",children:[b.jsx(zt.Thead,{children:b.jsxs(zt.Tr,{children:[b.jsx(zt.Th,{w:40,style:{borderBottom:"1px solid #eee"},children:b.jsx(ra,{checked:n.size===e.length&&e.length>0,indeterminate:n.size>0&&n.size<e.length,onChange:L=>o(L.target.checked)})}),t.map(L=>b.jsx(zt.Th,{onClick:()=>a(L.name),style:{cursor:"pointer",borderBottom:"1px solid #eee"},children:b.jsxs(Zt,{gap:4,wrap:"nowrap",children:[h(L.type,L.name),b.jsx(jt,{size:"xs",fw:500,c:"dimmed",children:L.name}),l===L.name&&b.jsx(jt,{size:"xs",c:"dimmed",children:u==="ASC"?"↑":"↓"})]})},L.name)),b.jsx(zt.Th,{w:50,style:{borderBottom:"1px solid #eee"}})]})}),b.jsx(zt.Tbody,{children:e.map(L=>b.jsxs(zt.Tr,{bg:n.has(String(L[r]))?"gray.0":void 0,children:[b.jsx(zt.Td,{children:b.jsx(ra,{checked:n.has(String(L[r])),onChange:A=>i(String(L[r]),A.target.checked)})}),t.map(A=>b.jsx(zt.Td,{children:b.jsx($Z,{row:L,col:A,pk:r,isEditing:(f==null?void 0:f.rowPk)===L[r]&&(f==null?void 0:f.column)===A.name,onStartEdit:m,onUpdate:g,onCancelEdit:v,fkMap:x,API:w,currentTable:S,getTagColor:k,isTagColumn:E})},A.name)),b.jsx(zt.Td,{children:b.jsx(LA,{type:"icon",onDelete:()=>d(L[r]),size:"sm",variant:"subtle",color:"red"})})]},L[r]))})]})}),MZ=({page:t,total:e,limit:r=50,onPageChange:n})=>{const i=Math.ceil(e/r);return b.jsxs(Zt,{justify:"flex-end",gap:"xs",mt:"xs",children:[b.jsxs(jt,{size:"xs",c:"dimmed",children:["Page ",t," of ",i," (",e," records)"]}),b.jsx(Dn,{variant:"default",size:"sm",disabled:t<=1,onClick:()=>n(t-1),children:b.jsx(_Q,{size:14})}),b.jsx(Dn,{variant:"default",size:"sm",disabled:t>=i,onClick:()=>n(t+1),children:b.jsx(EQ,{size:14})})]})},tn="/admin/api",AZ=(t,e)=>{const r=(t||"").toUpperCase(),n=(e||"").toLowerCase();return n.includes("email")?b.jsx(vS,{size:14}):n.includes("date")||n.includes("time")?b.jsx(CQ,{size:14}):r.includes("INT")||r.includes("REAL")||r.includes("FLOAT")?b.jsx(IQ,{size:14}):r.includes("BOOL")?b.jsx(TA,{size:14}):b.jsx(vS,{size:14})},SS=["gray"],RZ=t=>{if(!t)return"gray";const e=String(t).split("").reduce((r,n)=>r+n.charCodeAt(0),0);return SS[e%SS.length]},PZ=t=>{const e=(t||"").toLowerCase();return e.includes("status")||e.includes("categoria")||e.includes("category")||e==="cor"},BZ=({opened:t,onClose:e,columns:r,currentTable:n,onSuccess:i})=>{const[o,a]=$.useState({}),[l,u]=$.useState({}),[h,d]=$.useState({}),[f,m]=$.useState(!1);$.useEffect(()=>{t&&(a({}),r.filter(k=>k.pk!==1&&k.fk).forEach(k=>{g(k)}))},[t,r]);const g=async S=>{if(S.fk){d(k=>({...k,[S.name]:!0}));try{const E=await(await fetch(`${tn}/table/${n}/fk-options?refTable=${S.fk.table}&refColumn=${S.fk.column}`)).json();E.success&&u(L=>({...L,[S.name]:E.options.map(A=>({value:String(A.value),label:`${A.label} (ID: ${A.value})`}))}))}catch(k){console.error("Error loading FK options:",k)}d(k=>({...k,[S.name]:!1}))}},v=(S,k)=>{a(E=>({...E,[S]:k}))},x=async()=>{m(!0);try{const k=await(await fetch(`${tn}/table/${n}/insert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})).json();k.success?(Jt.show({title:"Success",message:"Record created!",color:"green"}),i()):Jt.show({title:"Error",message:k.error,color:"red"})}catch{Jt.show({title:"Error",message:"Failed to save",color:"red"})}m(!1)},w=S=>{const k=!!S.fk,E=S.notnull===1,L=`${S.name}${E?" *":""}`;if(k){const A=l[S.name]||[],M=h[S.name];return b.jsx(Zs,{label:L,placeholder:M?"Loading...":`Select ${S.fk.table}`,data:A,value:o[S.name]||null,onChange:B=>v(S.name,B),searchable:!0,clearable:!0,disabled:M,leftSection:b.jsx(EA,{size:14})},S.name)}return b.jsx(Bn,{label:L,placeholder:S.type||"TEXT",value:o[S.name]||"",onChange:A=>v(S.name,A.target.value)},S.name)};return b.jsx(Mr,{opened:t,onClose:e,title:"New Record",children:b.jsxs(Je,{children:[r.filter(S=>S.pk!==1).map(S=>w(S)),b.jsxs(Zt,{justify:"flex-end",children:[b.jsx(_e,{variant:"subtle",onClick:e,color:"gray",children:"Cancel"}),b.jsx(_e,{color:"dark",onClick:x,loading:f,children:"Save"})]})]})})};function NZ(){var Lt,xe,re,Ae;const{colorScheme:t,toggleColorScheme:e}=NB(),r=t==="dark",[n,i]=$.useState(null),[o,{open:a,close:l}]=uo(!1),u=async()=>{try{const gt=await(await fetch("/admin/auth/status")).json();i(gt)}catch(rt){console.error("Failed to check auth status",rt)}};$.useEffect(()=>{u()},[]);const h=async()=>{try{await fetch("/admin/auth/logout",{method:"POST"}),i({...n,authenticated:!1,user:null}),Jt.show({title:"Logged out",message:"You have been successfully logged out",color:"gray"})}catch{Jt.show({title:"Error",message:"Failed to logout",color:"red"})}},[d,f]=$.useState([]),[m,g]=$.useState(null),[v,x]=$.useState([]),[w,S]=$.useState([]),[k,E]=$.useState(!1),[L,A]=$.useState(1),[M,B]=$.useState(0),[D,q]=$.useState(null),[U,H]=$.useState("ASC"),[K,V]=$.useState(new Set),[W,I]=$.useState(""),[O,F]=$.useState(!1),[P,z]=$.useState(""),[X,N]=$.useState(""),[Z,ot]=$.useState(!1),[yt,dt]=$.useState(null),[lt,mt]=$.useState({});$.useEffect(()=>{(async()=>{if(!w.length||!v.length)return;const gt=v.filter($t=>$t.fk);if(gt.length===0)return;const bt={...lt};let Et=!1;for(const $t of gt){const ne=new Set;if(w.forEach(ae=>{const Gr=ae[$t.name];Gr!=null&&!bt[`${$t.fk.table}:${Gr}`]&&ne.add(Gr)}),ne.size>0)try{const Gr=await(await fetch(`${tn}/resolve-fk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:$t.fk.table,idColumn:$t.fk.column,ids:Array.from(ne)})})).json();Gr.success&&(Object.entries(Gr.values).forEach(([Xr,Cs])=>{bt[`${$t.fk.table}:${Xr}`]=Cs}),Et=!0)}catch(ae){console.error("Failed to resolve FKs",ae)}}Et&&mt(bt)})()},[w,v]);const[xt,St]=Rg({key:"sqlite-favorites",defaultValue:[]}),[Tt,ee]=Rg({key:"sqlite-history",defaultValue:[]}),[Ee,pe]=Rg({key:"sqlite-recents",defaultValue:[]}),[Oe,{open:Ue,close:xr}]=uo(!1),[sr,{open:ar,close:$e}]=uo(!1),[le,{open:we,close:ze}]=uo(!1),[nr,{open:Ke,close:We}]=uo(!1),[lr,{open:He,close:Qe}]=uo(!1),[Fe,{toggle:Ye}]=uo(!1),[Ce,{open:Qi,close:ei}]=uo(!1),[jn,me]=$.useState(""),[Me,br]=$.useState(""),[ri,Rr]=$.useState(0),[_r,cr]=$.useState([]),[ni,Ti]=$.useState("csv"),Ei=()=>{z(""),N(""),S([]),x([]),Fe&&Ye()},xa=[{label:"Run SQL",icon:vd,action:()=>{Ei(),F(!0),Qe()}},{label:"View ER Diagram",icon:gy,action:()=>{dn(),Qe()}},{label:"Toggle Theme",icon:r?CS:xS,action:()=>{e(),Qe()}}],Se=d.filter(rt=>rt.name.toLowerCase().includes(Me.toLowerCase())),cn=xa.filter(rt=>rt.label.toLowerCase().includes(Me.toLowerCase())),Zi=[...Se.slice(0,8).map(rt=>({type:"table",name:rt.name})),...cn.map(rt=>({type:"action",label:rt.label,action:rt.action}))],bs=rt=>{if(rt.key==="ArrowDown")rt.preventDefault(),Rr(gt=>Math.min(gt+1,Zi.length-1));else if(rt.key==="ArrowUp")rt.preventDefault(),Rr(gt=>Math.max(gt-1,0));else if(rt.key==="Enter"&&Zi.length>0){rt.preventDefault();const gt=Zi[ri];gt.type==="table"?(ii(gt.name),br(""),Rr(0),Qe()):(gt.action(),Rr(0))}};WP([["mod+k",()=>{br(""),Rr(0),He()}],["escape",()=>{Qe(),br(""),Rr(0)}]]),$.useEffect(()=>{n!=null&&n.authenticated&&Yr()},[n==null?void 0:n.authenticated]);const Yr=async()=>{try{const gt=await(await fetch(`${tn}/tables`)).json();if(gt.tables){const bt=await Promise.all(gt.tables.map(async Et=>{try{const ne=await(await fetch(`${tn}/table/${Et}/count`)).json();return{name:Et,count:ne.count||0}}catch{return{name:Et,count:"?"}}}));f(bt)}}catch{Jt.show({title:"Erro",message:"Erro ao carregar tabelas",color:"red"})}},ii=async rt=>{g(rt),A(1),q(null),V(new Set),I(""),I(""),F(!1),cr([]),Ei(),pe(gt=>{const bt=gt.filter(Et=>Et!==rt);return[rt,...bt].slice(0,5)});try{const bt=await(await fetch(`${tn}/table/${rt}`)).json();x(bt.columns||[])}catch{x([])}un(rt),mt({})},un=async(rt=m)=>{if(!rt)return;E(!0);const gt=(L-1)*50;let bt=`SELECT * FROM ${rt}`;const Et=[];if(_r.forEach($t=>{$t.column&&$t.value&&($t.operator==="LIKE"?Et.push(`${$t.column} LIKE '%${$t.value}%'`):Et.push(`${$t.column} ${$t.operator} '${$t.value}'`))}),W){const $t=v.filter(ne=>{var ae;return(ae=ne.type)==null?void 0:ae.toUpperCase().includes("TEXT")});if($t.length>0){const ne=$t.map(ae=>`${ae.name} LIKE '%${W}%'`).join(" OR ");Et.push(`(${ne})`)}}Et.length>0&&(bt+=` WHERE ${Et.join(" AND ")}`),D&&(bt+=` ORDER BY ${D} ${U}`),bt+=` LIMIT 50 OFFSET ${gt}`;try{const[$t,ne]=await Promise.all([fetch(`${tn}/query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:bt})}),fetch(`${tn}/table/${rt}/count`)]),ae=await $t.json(),Gr=await ne.json();ae.success?(S(ae.rows||[]),B(Gr.count||0)):Jt.show({title:"Erro",message:ae.error,color:"red"})}catch{Jt.show({title:"Erro",message:"Erro ao carregar dados",color:"red"})}E(!1)};$.useEffect(()=>{m&&!O&&un()},[L,D,U,_r,W]);const Xl=rt=>{xt.includes(rt)?St(xt.filter(gt=>gt!==rt)):St([...xt,rt])},ur=async()=>{var gt;if(!P.trim())return;E(!0);const rt=[{sql:P,timestamp:Date.now()},...Tt.filter(bt=>bt.sql!==P)].slice(0,20);ee(rt);try{const Et=await(await fetch(`${tn}/query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:P})})).json();Et.success?Et.rows?(S(Et.rows),x(((gt=Et.columns)==null?void 0:gt.map($t=>({name:$t,type:"TEXT"})))||[]),B(Et.rows.length)):(Jt.show({title:"Sucesso",message:Et.message,color:"green"}),Yr()):Jt.show({title:"Erro",message:Et.error,color:"red"})}catch{Jt.show({title:"Erro",message:"Erro ao executar query",color:"red"})}E(!1)},hn=async rt=>{var bt,Et;const gt=((bt=v.find($t=>$t.pk===1))==null?void 0:bt.name)||((Et=v[0])==null?void 0:Et.name);try{const ne=await(await fetch(`${tn}/table/${m}/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:gt,value:rt})})).json();ne.success?(Jt.show({title:"Sucesso",message:"Excluído!",color:"green"}),un(),Yr()):Jt.show({title:"Erro",message:ne.error,color:"red"})}catch{Jt.show({title:"Erro",message:"Erro ao excluir",color:"red"})}},Ji=async()=>{var gt,bt;const rt=((gt=v.find(Et=>Et.pk===1))==null?void 0:gt.name)||((bt=v[0])==null?void 0:bt.name);for(const Et of K)await fetch(`${tn}/table/${m}/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:rt,value:Et})});V(new Set),Jt.show({title:"Sucesso",message:"Excluídos!",color:"green"}),un(),Yr()},Po=async()=>{var gt,bt;let rt=w;if(K.size>0){const Et=((gt=v.find($t=>$t.pk===1))==null?void 0:gt.name)||((bt=v[0])==null?void 0:bt.name);rt=w.filter($t=>K.has(String($t[Et])))}if(ni==="csv"){const Et=Object.keys(rt[0]||{}),$t=[Et.join(","),...rt.map(ne=>Et.map(ae=>`"${String(ne[ae]||"").replace(/"/g,'""')}"`).join(","))].join(`
|
|
520
|
+
`);Bo(`${m}.csv`,$t,"text/csv")}else Bo(`${m}.json`,JSON.stringify(rt,null,2),"application/json");We()},Bo=(rt,gt,bt)=>{const Et=new Blob([gt],{type:bt}),$t=URL.createObjectURL(Et),ne=document.createElement("a");ne.href=$t,ne.download=rt,ne.click(),URL.revokeObjectURL($t),We()},ba=async()=>{if(X.trim()){ot(!0);try{const gt=await(await fetch(`${tn}/ai/sql`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:X})})).json();gt.success?(z(gt.sql),Jt.show({title:"AI",message:"SQL Gerado!",color:"blue",icon:b.jsx(wS,{size:16})})):Jt.show({title:"Erro AI",message:gt.error,color:"red"})}catch{Jt.show({title:"Erro",message:"Erro ao consultar AI",color:"red"})}ot(!1)}},En=async(rt,gt,bt)=>{var $t,ne;const Et=(($t=v.find(ae=>ae.pk===1))==null?void 0:$t.name)||((ne=v[0])==null?void 0:ne.name);try{const Gr=await(await fetch(`${tn}/table/${m}/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:gt,value:bt,pkColumn:Et,pkValue:rt})})).json();Gr.success?(S(Xr=>Xr.map(Cs=>String(Cs[Et])===String(rt)?{...Cs,[gt]:bt}:Cs)),Jt.show({title:"Salvo",message:`${gt} atualizado`,color:"green"})):Jt.show({title:"Erro",message:Gr.error,color:"red"})}catch{Jt.show({title:"Erro",message:"Erro ao atualizar",color:"red"})}dt(null)},dn=async()=>{try{const gt=await(await fetch(`${tn}/meta/schema`)).json();if(gt.success){let bt=`erDiagram
|
|
521
|
+
`;gt.schema.forEach($t=>{bt+=` ${$t.name} {
|
|
522
|
+
`,$t.columns.forEach(ne=>{const ae=ne.type||"TEXT",Gr=ne.pk?"PK":ne.fk?"FK":"";bt+=` ${ae} ${ne.name} ${Gr}
|
|
523
|
+
`}),bt+=` }
|
|
524
|
+
`,$t.fks.forEach(ne=>{bt+=` ${$t.name} }o--|| ${ne.table} : "${ne.from}"
|
|
525
|
+
`})}),yS.initialize({startOnLoad:!1,theme:r?"dark":"neutral",securityLevel:"loose"});const{svg:Et}=await yS.render("erd-graph",bt);me(Et),Qi()}}catch{Jt.show({title:"Erro",message:"Erro ao gerar ERD",color:"red"})}},No=((Lt=v.find(rt=>rt.pk===1))==null?void 0:Lt.name)||((xe=v[0])==null?void 0:xe.name),ws=$.useMemo(()=>v.map(rt=>rt.name),[v]),wa=$.useMemo(()=>{const rt={};return v.forEach(gt=>{const bt=new Set(w.map(Et=>Et[gt.name]).filter(Et=>Et!=null));rt[gt.name]=Array.from(bt).map(String).slice(0,20)}),rt},[v,w]),{filteredItems:Ca,data:Dt,setData:G}=xZ(w,ws),pt=b.jsxs(vi,{navbar:{width:260,breakpoint:"sm"},padding:"md",children:[b.jsxs(vi.Navbar,{p:"xs",style:{backgroundColor:"#FBFAF8",borderRight:"1px solid #E8E5E0"},children:[b.jsx(Zt,{justify:"space-between",mb:"lg",px:"xs",mt:"xs",children:b.jsxs(Zt,{gap:4,children:[b.jsx(Of,{stroke:2.5,size:24,color:"#37352F"}),b.jsx(jt,{fw:700,size:"md",c:"#37352F",children:"SQLite Admin"})]})}),b.jsxs(Je,{gap:4,children:[b.jsx(jt,{size:"xs",fw:500,c:"#91918E",px:"xs",mb:4,style:{textTransform:"uppercase",fontSize:"11px",letterSpacing:"0.03em"},children:"Platform"}),b.jsx(Di,{label:"Home",leftSection:b.jsx(LQ,{size:16}),onClick:()=>{g(null),F(!1),Ei()},style:{borderRadius:6},active:!m&&!O}),b.jsx(Di,{label:"Search",leftSection:b.jsx(jd,{size:16}),onClick:()=>He(),style:{borderRadius:6}}),b.jsx(Di,{label:"SQL Runner",leftSection:b.jsx(vd,{size:16}),active:O,onClick:()=>{O?(F(!1),Ei()):(Ei(),F(!0),g(null))},style:{borderRadius:6}}),b.jsx(Di,{label:"ER Diagram",leftSection:b.jsx(gy,{size:16}),onClick:()=>dn(),style:{borderRadius:6}})]}),b.jsx(Hs,{my:"sm",color:"#E8E5E0"}),b.jsx(TZ,{tables:d,favorites:xt,currentTable:m,onSelectTable:ii}),b.jsx(Hs,{my:"sm",color:"#E8E5E0"}),b.jsxs(je,{shadow:"md",width:200,position:"right-end",children:[b.jsx(je.Target,{children:b.jsxs(_e,{variant:"subtle",color:"gray",fullWidth:!0,justify:"space-between",size:"md",px:8,py:4,style:{height:"auto",borderRadius:6,color:"var(--mantine-color-text)"},children:[b.jsxs(Zt,{gap:"xs",children:[b.jsx(st,{style:{width:28,height:28,borderRadius:"50%",backgroundColor:"#E5E7EB",display:"flex",alignItems:"center",justifyContent:"center",color:"#374151",fontSize:12,fontWeight:600},children:((Ae=(re=n==null?void 0:n.user)==null?void 0:re[0])==null?void 0:Ae.toUpperCase())||"U"}),b.jsxs(st,{style:{textAlign:"left"},children:[b.jsx(jt,{size:"sm",fw:500,lh:1.2,children:(n==null?void 0:n.user)||"User"}),b.jsx(jt,{size:"xs",c:"dimmed",lh:1.2,children:"sqlite@local"})]})]}),b.jsx(nZ,{size:14,color:"gray"})]})}),b.jsxs(je.Dropdown,{children:[b.jsx(je.Label,{children:"Application"}),b.jsx(je.Item,{closeMenuOnClick:!1,onClick:()=>e(),rightSection:b.jsx(mp,{checked:r,size:"sm",onLabel:b.jsx(xS,{size:12,stroke:2.5,color:"var(--mantine-color-yellow-4)"}),offLabel:b.jsx(CS,{size:12,stroke:2.5,color:"var(--mantine-color-gray-6)"}),readOnly:!0,style:{pointerEvents:"none"}}),children:"Dark Mode"}),b.jsx(je.Item,{leftSection:b.jsx(oZ,{size:14}),onClick:a,children:"Settings"}),b.jsx(je.Divider,{}),b.jsx(je.Item,{color:"red",leftSection:b.jsx(GQ,{size:14}),onClick:h,children:"Logout"})]})]})]}),b.jsxs(vi.Main,{children:[b.jsx(_Z,{opened:o,onClose:l}),O?b.jsxs(st,{p:"xl",style:{maxWidth:900,margin:"0 auto"},children:[b.jsxs(Zt,{mb:"xl",gap:"sm",children:[b.jsx(vd,{size:42}),b.jsx(mo,{order:1,children:"SQL Runner"})]}),b.jsxs(Ir,{p:"md",withBorder:!0,radius:"md",mb:"lg",bg:r?"dark.6":"gray.0",style:{borderColor:r?"var(--mantine-color-dark-4)":"var(--mantine-color-gray-3)"},children:[b.jsxs(Zt,{gap:"sm",children:[b.jsx(wS,{size:20,style:{opacity:.6}}),b.jsx(Bn,{placeholder:"Ask AI to write SQL...",style:{flex:1},value:X,onChange:rt=>N(rt.target.value),onKeyDown:rt=>rt.key==="Enter"&&ba()}),Z&&b.jsx(Pn,{size:"xs",color:"gray"})]}),b.jsx(jt,{size:"xs",c:"dimmed",align:"right",mt:"xs",children:"Press ENTER to generate your query"})]}),b.jsx(Hv,{label:"Query",placeholder:"SELECT * FROM ...",minRows:5,value:P,onChange:rt=>z(rt.target.value),styles:{input:{fontFamily:"monospace"}},mb:"md"}),b.jsxs(Zt,{justify:"flex-end",children:[b.jsx(_e,{variant:"subtle",onClick:Ye,color:"gray",children:"History"}),b.jsx(_e,{color:"dark",onClick:ur,children:"Run Query"})]}),Fe&&b.jsxs(Ir,{withBorder:!0,p:"md",radius:"md",mt:"xl",children:[b.jsx(jt,{fw:600,mb:"sm",children:"Query History"}),b.jsx(Je,{gap:"xs",children:Tt.length===0?b.jsx(jt,{size:"sm",c:"dimmed",fs:"italic",children:"No history yet."}):Tt.slice(0,10).map((rt,gt)=>b.jsxs(Zt,{justify:"space-between",wrap:"nowrap",children:[b.jsx(jt,{size:"sm",style:{fontFamily:"monospace",cursor:"pointer",flex:1},onClick:()=>z(rt.sql),lineClamp:1,children:rt.sql}),b.jsxs(Zt,{gap:"xs",wrap:"nowrap",children:[b.jsx(jt,{size:"xs",c:"dimmed",children:new Date(rt.timestamp).toLocaleTimeString()}),b.jsx(Dn,{variant:"subtle",color:"dark",size:"sm",onClick:()=>{z(rt.sql),setTimeout(()=>ur(),100)},children:b.jsx(QQ,{size:14})})]})]},gt))})]}),k?b.jsx(cl,{py:"xl",children:b.jsx(Pn,{color:"gray",type:"dots"})}):w.length>0&&O&&b.jsxs(Ir,{withBorder:!0,radius:"md",mt:"xl",children:[b.jsxs(Zt,{p:"sm",justify:"space-between",style:{borderBottom:"1px solid var(--mantine-color-gray-3)"},children:[b.jsxs(jt,{size:"sm",c:"dimmed",children:[w.length," result(s)"]}),b.jsx(yy,{data:w,columns:v,filename:"query_results",variant:"subtle",compact:!0})]}),b.jsx(Si,{children:b.jsxs(zt,{striped:!1,highlightOnHover:!0,verticalSpacing:"xs",children:[b.jsx(zt.Thead,{children:b.jsx(zt.Tr,{children:v.map(rt=>b.jsx(zt.Th,{style:{borderBottom:"1px solid #eee"},children:b.jsx(jt,{size:"xs",fw:500,c:"dimmed",children:rt.name})},rt.name))})}),b.jsx(zt.Tbody,{children:w.map((rt,gt)=>b.jsx(zt.Tr,{children:v.map(bt=>b.jsx(zt.Td,{style:{borderBottom:"1px solid #f5f5f5"},children:b.jsx(jt,{size:"sm",lineClamp:2,title:String(rt[bt.name]),children:bt.fk?b.jsxs(Zt,{gap:6,wrap:"nowrap",children:[b.jsx(as,{variant:"outline",color:"gray",size:"sm",leftSection:b.jsx(F0,{size:10}),styles:{label:{fontWeight:500}},children:String(rt[bt.name])}),lt[`${bt.fk.table}:${rt[bt.name]}`]&&b.jsx(jt,{size:"xs",c:"dimmed",lineClamp:1,children:lt[`${bt.fk.table}:${rt[bt.name]}`]})]}):rt[bt.name]!=null?String(rt[bt.name]):b.jsx(jt,{span:!0,c:"dimmed",fs:"italic",children:"NULL"})})},bt.name))},gt))})]})})]})]}):m?b.jsxs(st,{pt:"md",children:[b.jsx(st,{px:"xl",pb:"md",style:{borderBottom:"1px solid var(--mantine-color-gray-2)"},children:b.jsxs(Zt,{align:"center",gap:"md",mb:"xs",children:[b.jsx(ol,{size:32,stroke:1.5}),b.jsx(mo,{order:1,style:{fontSize:32,fontWeight:700},children:m})]})}),b.jsxs(Zt,{justify:"space-between",px:"xl",py:"sm",style:{borderBottom:"1px solid #E5E7EB",backgroundColor:"#FAFAFA"},children:[b.jsxs(Zt,{gap:"xs",children:[b.jsx(_e,{size:"xs",color:"dark",radius:"md",leftSection:b.jsx(bS,{size:14}),onClick:Ue,styles:{root:{fontWeight:500,letterSpacing:"-0.01em"}},children:"New"}),b.jsx(_e,{size:"xs",variant:"default",radius:"md",leftSection:b.jsx(tZ,{size:14}),onClick:we,styles:{root:{fontWeight:500,letterSpacing:"-0.01em"}},children:"Structure"}),b.jsx(yy,{data:K.size>0?w.filter(rt=>{var gt,bt;return K.has(String(rt[((gt=v.find(Et=>Et.pk===1))==null?void 0:gt.name)||((bt=v[0])==null?void 0:bt.name)]))}):w,columns:v,filename:m,variant:"default"})]}),b.jsx(_e,{size:"xs",variant:xt.includes(m)?"filled":"default",color:xt.includes(m)?"dark":"gray",radius:"md",leftSection:xt.includes(m)?b.jsx(vZ,{size:14}):b.jsx(hZ,{size:14}),onClick:()=>Xl(m),styles:{root:{fontWeight:500,letterSpacing:"-0.01em"}},children:xt.includes(m)?"Favorited":"Favorite"})]}),b.jsxs(st,{px:"xl",py:"lg",children:[b.jsx(st,{mb:"md",children:b.jsx(bZ,{data:Dt,setData:G,filterOptions:wa})}),K.size>0&&b.jsx(Ir,{p:"xs",bg:"dark",radius:"sm",mb:"md",children:b.jsxs(Zt,{justify:"space-between",children:[b.jsxs(jt,{c:"white",size:"sm",children:[K.size," selected"]}),b.jsxs(Zt,{children:[b.jsx(LA,{size:"xs",color:"red",variant:"white",onDelete:Ji,children:"Delete"}),b.jsx(yy,{data:w.filter(rt=>{var gt,bt;return K.has(String(rt[((gt=v.find(Et=>Et.pk===1))==null?void 0:gt.name)||((bt=v[0])==null?void 0:bt.name)]))}),columns:v,filename:`${m}_selected`,variant:"default"}),b.jsx(_e,{size:"xs",variant:"subtle",c:"white",onClick:()=>V(new Set),children:"Clear"})]})]})}),k?b.jsx(cl,{py:"xl",children:b.jsx(Pn,{color:"gray",type:"dots"})}):b.jsxs(b.Fragment,{children:[b.jsx(LZ,{columns:v,rows:Ca,pk:No,selectedRows:K,onSelectRow:(rt,gt)=>{const bt=new Set(K);gt?bt.add(rt):bt.delete(rt),V(bt)},onSelectAll:rt=>{V(rt?new Set(w.map(gt=>String(gt[No]))):new Set)},onSort:rt=>{D===rt?H(gt=>gt==="ASC"?"DESC":"ASC"):(q(rt),H("ASC"))},sort:D,sortDir:U,getColumnIcon:AZ,onDeleteRecord:hn,editingCell:yt,onStartEdit:(rt,gt)=>dt({rowPk:rt,column:gt}),onUpdateCell:En,onCancelEdit:()=>dt(null),fkMap:lt,API:tn,currentTable:m,getTagColor:RZ,isTagColumn:PZ}),b.jsx(MZ,{page:L,total:M,onPageChange:A})]})]})]}):b.jsxs(st,{p:"xl",style:{maxWidth:960,margin:"0 auto"},children:[b.jsxs(Zt,{align:"flex-start",gap:"md",mb:48,mt:"xl",children:[b.jsx(go,{size:72,variant:"transparent",c:"dark",children:b.jsx(Of,{size:72,stroke:1.3})}),b.jsxs(Je,{gap:0,mt:4,children:[b.jsx(mo,{order:1,fw:700,fz:40,children:"SQLite Admin"}),b.jsx(jt,{c:"dimmed",size:"lg",children:"Manage your local database schema and data."})]})]}),b.jsxs(st,{mb:48,children:[b.jsx(mo,{order:3,fw:600,mb:"xl",fz:18,children:"Quick Access"}),b.jsxs(Zv,{cols:{base:1,sm:3},spacing:"xl",children:[b.jsxs(Ir,{withBorder:!0,p:"lg",radius:"md",onClick:()=>F(!0),style:{cursor:"pointer",transition:"box-shadow 0.2s",flexDirection:"column",justifyContent:"space-between"},className:"editable-cell",h:140,display:"flex",children:[b.jsx(Zt,{justify:"space-between",align:"flex-start",children:b.jsx(go,{variant:"light",color:"gray",size:"lg",children:b.jsx(vd,{size:20})})}),b.jsxs(st,{children:[b.jsx(jt,{fw:600,size:"md",children:"SQL Runner"}),b.jsx(jt,{size:"xs",c:"dimmed",children:"Run queries & AI"})]})]}),b.jsxs(Ir,{withBorder:!0,p:"lg",radius:"md",style:{cursor:"pointer",flexDirection:"column",justifyContent:"space-between"},className:"editable-cell",h:140,display:"flex",onClick:()=>He(),children:[b.jsx(Zt,{justify:"space-between",align:"flex-start",children:b.jsx(go,{variant:"light",color:"gray",size:"lg",children:b.jsx(jd,{size:20})})}),b.jsxs(st,{children:[b.jsx(jt,{fw:600,size:"md",children:"Global Search"}),b.jsx(jt,{size:"xs",c:"dimmed",children:"Find anything"})]})]}),b.jsxs(Ir,{withBorder:!0,p:"lg",radius:"md",style:{cursor:"pointer",flexDirection:"column",justifyContent:"space-between"},className:"editable-cell",h:140,display:"flex",onClick:()=>dn(),children:[b.jsx(Zt,{justify:"space-between",align:"flex-start",children:b.jsx(go,{variant:"light",color:"gray",size:"lg",children:b.jsx(gy,{size:20})})}),b.jsxs(st,{children:[b.jsx(jt,{fw:600,size:"md",children:"ER Diagram"}),b.jsx(jt,{size:"xs",c:"dimmed",children:"Visual Schema"})]})]})]})]}),b.jsxs(st,{children:[b.jsxs(Zt,{mb:"md",gap:"xs",children:[b.jsx(ol,{size:18}),b.jsx(mo,{order:3,fw:600,fz:18,children:"Recent Activity"}),b.jsx(Hs,{orientation:"vertical"}),b.jsx(jt,{size:"sm",c:"dimmed",style:{cursor:"pointer"},children:"Board"})]}),b.jsx(Ir,{withBorder:!0,radius:"sm",overflow:"hidden",children:b.jsxs(zt,{verticalSpacing:"xs",striped:!1,highlightOnHover:!0,children:[b.jsx(zt.Thead,{bg:"gray.0",children:b.jsxs(zt.Tr,{children:[b.jsx(zt.Th,{style:{width:"40%"},children:b.jsxs(Zt,{gap:4,children:[b.jsx(jt,{size:"xs",c:"dimmed",children:"Aa"}),"Table Name"]})}),b.jsx(zt.Th,{children:"Type"}),b.jsx(zt.Th,{children:"Action"})]})}),b.jsx(zt.Tbody,{children:Ee.length===0?b.jsx(zt.Tr,{children:b.jsx(zt.Td,{colSpan:3,children:b.jsx(jt,{size:"sm",c:"dimmed",fs:"italic",py:"xs",children:"No recent pages visited."})})}):Ee.map(rt=>b.jsxs(zt.Tr,{onClick:()=>ii(rt),style:{cursor:"pointer"},children:[b.jsx(zt.Td,{children:b.jsxs(Zt,{gap:"sm",children:[b.jsx(ol,{size:16}),b.jsx(jt,{size:"sm",fw:500,style:{borderBottom:"1px solid #e5e7eb"},children:rt})]})}),b.jsx(zt.Td,{children:b.jsx(as,{size:"xs",color:"gray",variant:"light",children:"Table"})}),b.jsx(zt.Td,{children:b.jsx(_e,{size:"compact-xs",variant:"subtle",color:"gray",children:"Open"})})]},rt))})]})})]})]})]}),b.jsx(BZ,{opened:Oe,onClose:xr,columns:v,currentTable:m,onSuccess:()=>{xr(),un(),Yr()}}),b.jsx(Mr,{opened:sr,onClose:$e,title:"Filter",children:b.jsxs(Je,{children:[_r.map((rt,gt)=>b.jsxs(Zt,{children:[b.jsx(Zs,{data:v.map(bt=>bt.name),value:rt.column,onChange:bt=>{const Et=[..._r];Et[gt].column=bt,cr(Et)},placeholder:"Column",style:{flex:1}}),b.jsx(Zs,{data:[{value:"=",label:"="},{value:"!=",label:"≠"},{value:">",label:">"},{value:"<",label:"<"},{value:"LIKE",label:"contains"}],value:rt.operator,onChange:bt=>{const Et=[..._r];Et[gt].operator=bt,cr(Et)},w:100}),b.jsx(Bn,{placeholder:"Value",value:rt.value,onChange:bt=>{const Et=[..._r];Et[gt].value=bt.target.value,cr(Et)},style:{flex:1}}),b.jsx(Dn,{color:"red",variant:"subtle",onClick:()=>cr(_r.filter((bt,Et)=>Et!==gt)),children:b.jsx(zd,{size:16})})]},gt)),b.jsx(_e,{variant:"subtle",leftSection:b.jsx(bS,{size:16}),onClick:()=>cr([..._r,{column:"",operator:"=",value:""}]),children:"Add Filter"}),b.jsxs(Zt,{justify:"flex-end",children:[b.jsx(_e,{variant:"subtle",color:"gray",onClick:()=>{cr([]),$e()},children:"Clear"}),b.jsx(_e,{onClick:$e,color:"dark",children:"Apply"})]})]})}),b.jsx(Mr,{opened:le,onClose:ze,title:`Schema: ${m}`,size:"lg",children:b.jsxs(zt,{children:[b.jsx(zt.Thead,{children:b.jsxs(zt.Tr,{children:[b.jsx(zt.Th,{children:"Column"}),b.jsx(zt.Th,{children:"Type"}),b.jsx(zt.Th,{children:"Nullable"}),b.jsx(zt.Th,{children:"Default"}),b.jsx(zt.Th,{children:"Key"})]})}),b.jsx(zt.Tbody,{children:v.map(rt=>b.jsxs(zt.Tr,{children:[b.jsx(zt.Td,{children:rt.name}),b.jsx(zt.Td,{children:rt.type||"TEXT"}),b.jsx(zt.Td,{children:rt.notnull?"NOT NULL":"NULL"}),b.jsx(zt.Td,{children:rt.dflt_value||"-"}),b.jsx(zt.Td,{children:b.jsxs(Zt,{gap:4,children:[rt.pk?b.jsx(Co,{label:"Primary Key",children:b.jsx(EA,{size:16})}):null,rt.fk?b.jsx(Co,{label:`Foreign Key to ${rt.fk.table}.${rt.fk.column}`,children:b.jsx(F0,{size:16,color:"var(--mantine-color-indigo-4)"})}):null,!rt.pk&&!rt.fk?"-":null]})})]},rt.name))})]})}),b.jsx(Mr,{opened:nr,onClose:We,title:"Export",children:b.jsxs(Je,{children:[b.jsx(Zs,{label:"Format",data:[{value:"csv",label:"CSV"},{value:"json",label:"JSON"}],value:ni,onChange:Ti}),b.jsx(jt,{size:"sm",c:"dimmed",children:K.size>0?`${K.size} selected`:`${w.length} records on current page`}),b.jsxs(Zt,{justify:"flex-end",children:[b.jsx(_e,{variant:"subtle",onClick:We,color:"gray",children:"Cancel"}),b.jsx(_e,{onClick:Po,color:"dark",children:"Export"})]})]})}),b.jsxs(Mr,{opened:lr,onClose:()=>{Qe(),br(""),Rr(0)},withCloseButton:!1,size:"lg",padding:0,radius:"md",yOffset:"10vh",children:[b.jsx(Bn,{placeholder:"Search tables, commands...",variant:"unstyled",p:"xs",value:Me,onChange:rt=>{br(rt.target.value),Rr(0)},onKeyDown:bs,leftSection:b.jsx(jd,{size:22}),styles:{input:{border:"none"}},autoFocus:!0}),b.jsx(Hs,{}),b.jsxs(Je,{gap:0,p:"xs",mah:400,style:{overflow:"auto"},children:[Se.length>0&&b.jsxs(b.Fragment,{children:[b.jsx(jt,{size:"xs",c:"dimmed",px:"sm",py:4,fw:600,children:"TABLES"}),Se.slice(0,8).map((rt,gt)=>b.jsx(Di,{label:rt.name,leftSection:b.jsx(ol,{size:16}),active:ri===gt,onClick:()=>{ii(rt.name),br(""),Rr(0),Qe()},style:{borderRadius:4}},rt.name))]}),cn.length>0&&b.jsxs(b.Fragment,{children:[b.jsx(jt,{size:"xs",c:"dimmed",px:"sm",py:4,fw:600,mt:"xs",children:"ACTIONS"}),cn.map((rt,gt)=>b.jsx(Di,{label:rt.label,leftSection:b.jsx(rt.icon,{size:16}),active:ri===Se.slice(0,8).length+gt,style:{borderRadius:4},onClick:()=>{rt.action(),Rr(0)}},rt.label))]}),Se.length===0&&cn.length===0&&b.jsxs(jt,{size:"sm",c:"dimmed",ta:"center",py:"md",children:['No results found for "',Me,'"']})]}),b.jsx(Ir,{bg:"gray.0",p:"xs",px:"md",children:b.jsxs(Zt,{justify:"space-between",children:[b.jsxs(jt,{size:"xs",c:"dimmed",children:[b.jsx(nl,{size:"xs",children:"↑"})," ",b.jsx(nl,{size:"xs",children:"↓"})," to navigate"]}),b.jsxs(Zt,{gap:4,children:[b.jsx(nl,{size:"xs",children:"enter"}),b.jsx(jt,{size:"xs",c:"dimmed",children:"to select"}),b.jsx(nl,{size:"xs",children:"esc"}),b.jsx(jt,{size:"xs",c:"dimmed",children:"to close"})]})]})})]}),b.jsx(Mr,{opened:Ce,onClose:ei,title:"Entity Relationship Diagram",size:"100%",styles:{body:{height:"calc(100vh - 100px)",overflow:"hidden"}},children:b.jsx(Si,{h:"100%",children:b.jsx("div",{dangerouslySetInnerHTML:{__html:jn},style:{textAlign:"center",minWidth:"1000px"}})})})]});return n?n.configured?n.authenticated?pt:b.jsx(kZ,{onLogin:u}):b.jsx(SZ,{onConfigured:u}):b.jsx(cl,{h:"100vh",children:b.jsx(Pn,{color:"dark",type:"dots",size:"xl"})})}const OZ={fontFamily:"Montserrat, -apple-system, BlinkMacSystemFont, sans-serif",primaryColor:"dark",defaultRadius:6,colors:{gray:["#F9FAFB","#F3F4F6","#E5E7EB","#D1D5DB","#9CA3AF","#6B7280","#4B5563","#374151","#1F2937","#11181C"],dark:["#C1C2C5","#A6A7AB","#909296","#5C5F66","#373A40","#2C2E33","#25262B","#1A1B1E","#141517","#101113"]},components:{Button:{defaultProps:{size:"sm"},styles:(t,e)=>({root:{height:"32px",fontWeight:500,border:e.variant==="default"?"1px solid #E5E7EB":void 0,backgroundColor:e.variant==="filled"?"#000000":void 0,color:e.variant==="filled"?"#FFFFFF":void 0,"&:hover":{backgroundColor:e.variant==="filled"?"#2f2f2f":void 0}}})},Table:{defaultProps:{withColumnBorders:!1,verticalSpacing:"sm"}},TextInput:{styles:{input:{border:"1px solid #E5E5E5","&:focus":{borderColor:"#000000"}}}},Modal:{styles:{header:{backgroundColor:"transparent"},content:{boxShadow:"0 4px 20px rgba(0,0,0,0.05)"},overlay:{backdropFilter:"blur(4px)"}}},Badge:{defaultProps:{variant:"light",radius:"sm"}},NavLink:{styles:{root:{borderRadius:6,fontWeight:500}}}}};_R.createRoot(document.getElementById("root")).render(b.jsx(kr.StrictMode,{children:b.jsxs(GS,{theme:OZ,defaultColorScheme:"light",children:[b.jsx(Ao,{position:"bottom-right"}),b.jsx(NZ,{})]})}));export{LT as $,ou as A,RI as B,Jj as C,jx as D,Wr as E,bT as F,MV as G,R7 as H,N2 as I,DW as J,pj as K,El as L,IZ as M,Rp as N,Pj as O,ox as P,Y2 as Q,S7 as R,Rd as S,LV as T,ju as U,zj as V,Iu as W,Rt as X,Ht as Y,wV as Z,T as _,Yj as a,Px as a$,x7 as a0,fC as a1,dC as a2,KZ as a3,VZ as a4,GZ as a5,YZ as a6,HZ as a7,Qa as a8,vx as a9,qU as aA,b7 as aB,DZ as aC,Ap as aD,kf as aE,b$ as aF,Ff as aG,Yu as aH,WU as aI,zU as aJ,px as aK,ns as aL,sC as aM,Jz as aN,gu as aO,Xq as aP,v$ as aQ,h$ as aR,JH as aS,wf as aT,tq as aU,Vu as aV,js as aW,qq as aX,PC as aY,pa as aZ,eq as a_,XZ as aa,qZ as ab,ZZ as ac,QZ as ad,UZ as ae,mY as af,$M as ag,lJ as ah,jW as ai,vr as aj,ys as ak,Mx as al,tL as am,ya as an,T$ as ao,Qt as ap,qi as aq,sG as ar,aJ as as,cJ as at,oJ as au,Ft as av,sJ as aw,WY as ax,FY as ay,OY as az,Uj as b,ZH as b0,iq as b1,Ul as b2,Gq as b3,yV as b4,cq as b5,uV as b6,Ax as b7,dS as b8,Nt as b9,R0 as bA,ve as bB,s$ as ba,Sn as bb,Uz as bc,fx as bd,HT as be,Wu as bf,UT as bg,WZ as bh,AI as bi,gV as bj,cV as bk,vV as bl,Ep as bm,KH as bn,Rx as bo,y$ as bp,bV as bq,Vl as br,eV as bs,LG as bt,qu as bu,Sf as bv,gs as bw,$C as bx,Bx as by,f$ as bz,ge as c,ce as d,$T as e,pr as f,Xj as g,ko as h,Kn as i,UW as j,Hl as k,at as l,$$ as m,jZ as n,hJ as o,Kj as p,Qj as q,uJ as r,Gj as s,IW as t,mi as u,PY as v,PV as w,JZ as x,Vj as y,zZ as z};
|