const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-VKFMJZFB-q3IRkwCw.js","./chunk-RYQCIY6F-BPTZ0cyP.js","./graph-C9eacEi8.js","./map-Czzmt4hB.js","./layout-DEXfKzaS.js","./swimlanes-5IMT3BWC-CmQ2pFlk.js","./cose-bilkent-JH36ORCC-BEJOTnY0.js","./cytoscape.esm-DTSO7Bv0.js","./c4Diagram-LMCZKHZV-CbmDPYiP.js","./chunk-32BRIVSS-BMUhBUka.js","./flowDiagram-23GEKE2U-IGRag_A_.js","./chunk-5VM5RSS4-CHF85UNI.js","./chunk-XXDRQBXY-maw5_-k7.js","./chunk-VR4S4FIN-CWzhwKPo.js","./channel-D4PNn9D-.js","./swimlanesDiagram-G3AALYLV-CbrvpYke.js","./erDiagram-Q63AITRT-BbNOYVdM.js","./gitGraphDiagram-IHSO6WYX-puiitGV_.js","./chunk-2Q5K7J3B-lL5W_nHx.js","./chunk-JWPE2WC7-DW3VgnYx.js","./cynefin-VYW2F7L2-Cw69JJKT.js","./ganttDiagram-NO4QXBWP-BCXu_P4y.js","./linear-D3TuSGq5.js","./init-Gi6I4Gst.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-FWYZ7A6U-BJB74rqC.js","./pieDiagram-ENE6RG2P-BGSUOVcV.js","./arc-DUiNypLZ.js","./ordinal-Cboi1Yqb.js","./quadrantDiagram-ABIIQ3AL-BOdUL_Jk.js","./xychartDiagram-FW5EYKEG-C3vpOpc1.js","./requirementDiagram-TGXJPOKE-DNjLgaYM.js","./sequenceDiagram-DBY2YBRQ-DLiwRf0d.js","./classDiagram-OUVF2IWQ-CnCUM-rR.js","./chunk-V7JOEXUC-BIaITZSD.js","./classDiagram-v2-EOCWNBFH-CnCUM-rR.js","./stateDiagram-2N3HPSRC-3IUQ_XIK.js","./chunk-EX3LRPZG-ARZW-If9.js","./stateDiagram-v2-6OUMAXLB-C2uxuORm.js","./journeyDiagram-5HDEW3XC-B2f7fVeM.js","./timeline-definition-FHXFAJF6-C6C6ql9w.js","./mindmap-definition-LN4V7U3C-5ZYuq6qc.js","./kanban-definition-HUTT4EX6-B7dEEvyY.js","./sankeyDiagram-HTMAVEWB-Tm0gMmkV.js","./diagram-NH7WQ7WH-2sh_00eB.js","./diagram-WEI45ONY-DGPwfgXz.js","./blockDiagram-677ZJIJ3-DTgzXk7o.js","./diagram-OA4YK3LP-Dh8FUcnH.js","./architectureDiagram-ZJ3FMSHR-Cdb82cy6.js","./diagram-FQU43EPY-CMkEJD4N.js","./diagram-G47NLZAW-DOo0tBMj.js","./wardleyDiagram-EHGQE667-D0gkRwGW.js","./cynefinDiagram-TSTJHNR4-DqL03VTd.js","./railroadDiagram-RFXS5EU6-Dkutg8u8.js","./chunk-MOJQB5TN-7zoVPKGL.js","./ebnfDiagram-CCIWWBDH-DdFflhdL.js","./abnfDiagram-VRR7QNED-DvtgGPw6.js","./pegDiagram-2B236MQR-BqvlrE_x.js"])))=>i.map(i=>d[i]);
var _L=Object.defineProperty;var BL=(e,t,i)=>t in e?_L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var $t=(e,t,i)=>BL(e,typeof t!="symbol"?t+"":t,i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=i(o);fetch(o.href,l)}})();function EL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},Kl={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vC;function LL(){if(vC)return Kl;vC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,l){var c=null;if(l!==void 0&&(c=""+l),o.key!==void 0&&(c=""+o.key),"key"in o){l={};for(var h in o)h!=="key"&&(l[h]=o[h])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:l}}return Kl.Fragment=t,Kl.jsx=i,Kl.jsxs=i,Kl}var kC;function AL(){return kC||(kC=1,Xp.exports=LL()),Xp.exports}var _=AL(),Qp={exports:{}},Yt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var SC;function ML(){if(SC)return Yt;SC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function w(R,G,ct){this.props=R,this.context=G,this.refs=v,this.updater=ct||C}w.prototype.isReactComponent={},w.prototype.setState=function(R,G){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,G,"setState")},w.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function B(){}B.prototype=w.prototype;function L(R,G,ct){this.props=R,this.context=G,this.refs=v,this.updater=ct||C}var F=L.prototype=new B;F.constructor=L,k(F,w.prototype),F.isPureReactComponent=!0;var D=Array.isArray;function z(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function at(R,G,ct){var ut=ct.ref;return{$$typeof:e,type:R,key:G,ref:ut!==void 0?ut:null,props:ct}}function K(R,G){return at(R.type,G,R.props)}function Y(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function W(R){var G={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(ct){return G[ct]})}var X=/\/+/g;function q(R,G){return typeof R=="object"&&R!==null&&R.key!=null?W(""+R.key):G.toString(36)}function H(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(z,z):(R.status="pending",R.then(function(G){R.status==="pending"&&(R.status="fulfilled",R.value=G)},function(G){R.status==="pending"&&(R.status="rejected",R.reason=G)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function A(R,G,ct,ut,mt){var vt=typeof R;(vt==="undefined"||vt==="boolean")&&(R=null);var _t=!1;if(R===null)_t=!0;else switch(vt){case"bigint":case"string":case"number":_t=!0;break;case"object":switch(R.$$typeof){case e:case t:_t=!0;break;case p:return _t=R._init,A(_t(R._payload),G,ct,ut,mt)}}if(_t)return mt=mt(R),_t=ut===""?"."+q(R,0):ut,D(mt)?(ct="",_t!=null&&(ct=_t.replace(X,"$&/")+"/"),A(mt,G,ct,"",function(Ct){return Ct})):mt!=null&&(Y(mt)&&(mt=K(mt,ct+(mt.key==null||R&&R.key===mt.key?"":(""+mt.key).replace(X,"$&/")+"/")+_t)),G.push(mt)),1;_t=0;var jt=ut===""?".":ut+":";if(D(R))for(var Nt=0;Nt<R.length;Nt++)ut=R[Nt],vt=jt+q(ut,Nt),_t+=A(ut,G,ct,vt,mt);else if(Nt=y(R),typeof Nt=="function")for(R=Nt.call(R),Nt=0;!(ut=R.next()).done;)ut=ut.value,vt=jt+q(ut,Nt++),_t+=A(ut,G,ct,vt,mt);else if(vt==="object"){if(typeof R.then=="function")return A(H(R),G,ct,ut,mt);throw G=String(R),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return _t}function $(R,G,ct){if(R==null)return R;var ut=[],mt=0;return A(R,ut,"","",function(vt){return G.call(ct,vt,mt++)}),ut}function I(R){if(R._status===-1){var G=R._result;G=G(),G.then(function(ct){(R._status===0||R._status===-1)&&(R._status=1,R._result=ct)},function(ct){(R._status===0||R._status===-1)&&(R._status=2,R._result=ct)}),R._status===-1&&(R._status=0,R._result=G)}if(R._status===1)return R._result.default;throw R._result}var Q=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},lt={map:$,forEach:function(R,G,ct){$(R,function(){G.apply(this,arguments)},ct)},count:function(R){var G=0;return $(R,function(){G++}),G},toArray:function(R){return $(R,function(G){return G})||[]},only:function(R){if(!Y(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Yt.Activity=g,Yt.Children=lt,Yt.Component=w,Yt.Fragment=i,Yt.Profiler=o,Yt.PureComponent=L,Yt.StrictMode=a,Yt.Suspense=d,Yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Yt.__COMPILER_RUNTIME={__proto__:null,c:function(R){return N.H.useMemoCache(R)}},Yt.cache=function(R){return function(){return R.apply(null,arguments)}},Yt.cacheSignal=function(){return null},Yt.cloneElement=function(R,G,ct){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ut=k({},R.props),mt=R.key;if(G!=null)for(vt in G.key!==void 0&&(mt=""+G.key),G)!P.call(G,vt)||vt==="key"||vt==="__self"||vt==="__source"||vt==="ref"&&G.ref===void 0||(ut[vt]=G[vt]);var vt=arguments.length-2;if(vt===1)ut.children=ct;else if(1<vt){for(var _t=Array(vt),jt=0;jt<vt;jt++)_t[jt]=arguments[jt+2];ut.children=_t}return at(R.type,mt,ut)},Yt.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:l,_context:R},R},Yt.createElement=function(R,G,ct){var ut,mt={},vt=null;if(G!=null)for(ut in G.key!==void 0&&(vt=""+G.key),G)P.call(G,ut)&&ut!=="key"&&ut!=="__self"&&ut!=="__source"&&(mt[ut]=G[ut]);var _t=arguments.length-2;if(_t===1)mt.children=ct;else if(1<_t){for(var jt=Array(_t),Nt=0;Nt<_t;Nt++)jt[Nt]=arguments[Nt+2];mt.children=jt}if(R&&R.defaultProps)for(ut in _t=R.defaultProps,_t)mt[ut]===void 0&&(mt[ut]=_t[ut]);return at(R,vt,mt)},Yt.createRef=function(){return{current:null}},Yt.forwardRef=function(R){return{$$typeof:h,render:R}},Yt.isValidElement=Y,Yt.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:I}},Yt.memo=function(R,G){return{$$typeof:f,type:R,compare:G===void 0?null:G}},Yt.startTransition=function(R){var G=N.T,ct={};N.T=ct;try{var ut=R(),mt=N.S;mt!==null&&mt(ct,ut),typeof ut=="object"&&ut!==null&&typeof ut.then=="function"&&ut.then(z,Q)}catch(vt){Q(vt)}finally{G!==null&&ct.types!==null&&(G.types=ct.types),N.T=G}},Yt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Yt.use=function(R){return N.H.use(R)},Yt.useActionState=function(R,G,ct){return N.H.useActionState(R,G,ct)},Yt.useCallback=function(R,G){return N.H.useCallback(R,G)},Yt.useContext=function(R){return N.H.useContext(R)},Yt.useDebugValue=function(){},Yt.useDeferredValue=function(R,G){return N.H.useDeferredValue(R,G)},Yt.useEffect=function(R,G){return N.H.useEffect(R,G)},Yt.useEffectEvent=function(R){return N.H.useEffectEvent(R)},Yt.useId=function(){return N.H.useId()},Yt.useImperativeHandle=function(R,G,ct){return N.H.useImperativeHandle(R,G,ct)},Yt.useInsertionEffect=function(R,G){return N.H.useInsertionEffect(R,G)},Yt.useLayoutEffect=function(R,G){return N.H.useLayoutEffect(R,G)},Yt.useMemo=function(R,G){return N.H.useMemo(R,G)},Yt.useOptimistic=function(R,G){return N.H.useOptimistic(R,G)},Yt.useReducer=function(R,G,ct){return N.H.useReducer(R,G,ct)},Yt.useRef=function(R){return N.H.useRef(R)},Yt.useState=function(R){return N.H.useState(R)},Yt.useSyncExternalStore=function(R,G,ct){return N.H.useSyncExternalStore(R,G,ct)},Yt.useTransition=function(){return N.H.useTransition()},Yt.version="19.2.7",Yt}var wC;function Lm(){return wC||(wC=1,Qp.exports=ML()),Qp.exports}var yt=Lm(),Zp={exports:{}},Jl={},Kp={exports:{}},Jp={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var TC;function FL(){return TC||(TC=1,(function(e){function t(A,$){var I=A.length;A.push($);t:for(;0<I;){var Q=I-1>>>1,lt=A[Q];if(0<o(lt,$))A[Q]=$,A[I]=lt,I=Q;else break t}}function i(A){return A.length===0?null:A[0]}function a(A){if(A.length===0)return null;var $=A[0],I=A.pop();if(I!==$){A[0]=I;t:for(var Q=0,lt=A.length,R=lt>>>1;Q<R;){var G=2*(Q+1)-1,ct=A[G],ut=G+1,mt=A[ut];if(0>o(ct,I))ut<lt&&0>o(mt,ct)?(A[Q]=mt,A[ut]=I,Q=ut):(A[Q]=ct,A[G]=I,Q=G);else if(ut<lt&&0>o(mt,I))A[Q]=mt,A[ut]=I,Q=ut;else break t}}return $}function o(A,$){var I=A.sortIndex-$.sortIndex;return I!==0?I:A.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var d=[],f=[],p=1,g=null,x=3,y=!1,C=!1,k=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function F(A){for(var $=i(f);$!==null;){if($.callback===null)a(f);else if($.startTime<=A)a(f),$.sortIndex=$.expirationTime,t(d,$);else break;$=i(f)}}function D(A){if(k=!1,F(A),!C)if(i(d)!==null)C=!0,z||(z=!0,W());else{var $=i(f);$!==null&&H(D,$.startTime-A)}}var z=!1,N=-1,P=5,at=-1;function K(){return v?!0:!(e.unstable_now()-at<P)}function Y(){if(v=!1,z){var A=e.unstable_now();at=A;var $=!0;try{t:{C=!1,k&&(k=!1,B(N),N=-1),y=!0;var I=x;try{e:{for(F(A),g=i(d);g!==null&&!(g.expirationTime>A&&K());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,x=g.priorityLevel;var lt=Q(g.expirationTime<=A);if(A=e.unstable_now(),typeof lt=="function"){g.callback=lt,F(A),$=!0;break e}g===i(d)&&a(d),F(A)}else a(d);g=i(d)}if(g!==null)$=!0;else{var R=i(f);R!==null&&H(D,R.startTime-A),$=!1}}break t}finally{g=null,x=I,y=!1}$=void 0}}finally{$?W():z=!1}}}var W;if(typeof L=="function")W=function(){L(Y)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,q=X.port2;X.port1.onmessage=Y,W=function(){q.postMessage(null)}}else W=function(){w(Y,0)};function H(A,$){N=w(function(){A(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(A){switch(x){case 1:case 2:case 3:var $=3;break;default:$=x}var I=x;x=$;try{return A()}finally{x=I}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(A,$){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var I=x;x=A;try{return $()}finally{x=I}},e.unstable_scheduleCallback=function(A,$,I){var Q=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?Q+I:Q):I=Q,A){case 1:var lt=-1;break;case 2:lt=250;break;case 5:lt=1073741823;break;case 4:lt=1e4;break;default:lt=5e3}return lt=I+lt,A={id:p++,callback:$,priorityLevel:A,startTime:I,expirationTime:lt,sortIndex:-1},I>Q?(A.sortIndex=I,t(f,A),i(d)===null&&A===i(f)&&(k?(B(N),N=-1):k=!0,H(D,I-Q))):(A.sortIndex=lt,t(d,A),C||y||(C=!0,z||(z=!0,W()))),A},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(A){var $=x;return function(){var I=x;x=$;try{return A.apply(this,arguments)}finally{x=I}}}})(Jp)),Jp}var _C;function DL(){return _C||(_C=1,Kp.exports=FL()),Kp.exports}var tg={exports:{}},yr={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var BC;function RL(){if(BC)return yr;BC=1;var e=Lm();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(d,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:f,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,yr.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return l(d,f,null,p)},yr.flushSync=function(d){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=f,a.p=p,a.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):p==="script"&&a.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);a.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);a.d.L(d,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=h(f.as,f.crossOrigin);a.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(d)},yr.requestFormReset=function(d){a.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,p){return c.H.useFormState(d,f,p)},yr.useFormStatus=function(){return c.H.useHostTransitionStatus()},yr.version="19.2.7",yr}var EC;function OL(){if(EC)return tg.exports;EC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),tg.exports=RL(),tg.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var LC;function zL(){if(LC)return Jl;LC=1;var e=DL(),t=Lm(),i=OL();function a(r){var n="https://react.dev/errors/"+r;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var n=r,s=r;if(r.alternate)for(;n.return;)n=n.return;else{r=n;do n=r,(n.flags&4098)!==0&&(s=n.return),r=n.return;while(r)}return n.tag===3?s:null}function c(r){if(r.tag===13){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function h(r){if(r.tag===31){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function d(r){if(l(r)!==r)throw Error(a(188))}function f(r){var n=r.alternate;if(!n){if(n=l(r),n===null)throw Error(a(188));return n!==r?null:r}for(var s=r,u=n;;){var m=s.return;if(m===null)break;var b=m.alternate;if(b===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===s)return d(m),r;if(b===u)return d(m),n;b=b.sibling}throw Error(a(188))}if(s.return!==u.return)s=m,u=b;else{for(var T=!1,M=m.child;M;){if(M===s){T=!0,s=m,u=b;break}if(M===u){T=!0,u=m,s=b;break}M=M.sibling}if(!T){for(M=b.child;M;){if(M===s){T=!0,s=b,u=m;break}if(M===u){T=!0,u=b,s=m;break}M=M.sibling}if(!T)throw Error(a(189))}}if(s.alternate!==u)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:n}function p(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r;for(r=r.child;r!==null;){if(n=p(r),n!==null)return n;r=r.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),L=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),at=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function W(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var X=Symbol.for("react.client.reference");function q(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===X?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case k:return"Fragment";case w:return"Profiler";case v:return"StrictMode";case D:return"Suspense";case z:return"SuspenseList";case at:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case L:return r.displayName||"Context";case B:return(r._context.displayName||"Context")+".Consumer";case F:var n=r.render;return r=r.displayName,r||(r=n.displayName||n.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return n=r.displayName||null,n!==null?n:q(r.type)||"Memo";case P:n=r._payload,r=r._init;try{return q(r(n))}catch{}}return null}var H=Array.isArray,A=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},Q=[],lt=-1;function R(r){return{current:r}}function G(r){0>lt||(r.current=Q[lt],Q[lt]=null,lt--)}function ct(r,n){lt++,Q[lt]=r.current,r.current=n}var ut=R(null),mt=R(null),vt=R(null),_t=R(null);function jt(r,n){switch(ct(vt,n),ct(mt,r),ct(ut,null),n.nodeType){case 9:case 11:r=(r=n.documentElement)&&(r=r.namespaceURI)?Wb(r):0;break;default:if(r=n.tagName,n=n.namespaceURI)n=Wb(n),r=Ub(n,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(ut),ct(ut,r)}function Nt(){G(ut),G(mt),G(vt)}function Ct(r){r.memoizedState!==null&&ct(_t,r);var n=ut.current,s=Ub(n,r.type);n!==s&&(ct(mt,r),ct(ut,s))}function dt(r){mt.current===r&&(G(ut),G(mt)),_t.current===r&&(G(_t),Vl._currentValue=I)}var St,Tt;function J(r){if(St===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);St=n&&n[1]||"",Tt=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+St+r+Tt}var kt=!1;function Ar(r,n){if(!r||kt)return"";kt=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var pt=function(){throw Error()};if(Object.defineProperty(pt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pt,[])}catch(st){var it=st}Reflect.construct(r,[],pt)}else{try{pt.call()}catch(st){it=st}r.call(pt.prototype)}}else{try{throw Error()}catch(st){it=st}(pt=r())&&typeof pt.catch=="function"&&pt.catch(function(){})}}catch(st){if(st&&it&&typeof st.stack=="string")return[st.stack,it.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),T=b[0],M=b[1];if(T&&M){var j=T.split(`
`),et=M.split(`
`);for(m=u=0;u<j.length&&!j[u].includes("DetermineComponentFrameRoot");)u++;for(;m<et.length&&!et[m].includes("DetermineComponentFrameRoot");)m++;if(u===j.length||m===et.length)for(u=j.length-1,m=et.length-1;1<=u&&0<=m&&j[u]!==et[m];)m--;for(;1<=u&&0<=m;u--,m--)if(j[u]!==et[m]){if(u!==1||m!==1)do if(u--,m--,0>m||j[u]!==et[m]){var ht=`
`+j[u].replace(" at new "," at ");return r.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",r.displayName)),ht}while(1<=u&&0<=m);break}}}finally{kt=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?J(s):""}function rl(r,n){switch(r.tag){case 26:case 27:case 5:return J(r.type);case 16:return J("Lazy");case 13:return r.child!==n&&n!==null?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return Ar(r.type,!1);case 11:return Ar(r.type.render,!1);case 1:return Ar(r.type,!0);case 31:return J("Activity");default:return""}}function Sr(r){try{var n="",s=null;do n+=rl(r,s),s=r,r=r.return;while(r);return n}catch(u){return`
Error generating stack: `+u.message+`
`+u.stack}}var So=Object.prototype.hasOwnProperty,Bn=e.unstable_scheduleCallback,wo=e.unstable_cancelCallback,Qc=e.unstable_shouldYield,Ri=e.unstable_requestPaint,We=e.unstable_now,aa=e.unstable_getCurrentPriorityLevel,To=e.unstable_ImmediatePriority,_o=e.unstable_UserBlockingPriority,Ra=e.unstable_NormalPriority,il=e.unstable_LowPriority,na=e.unstable_IdlePriority,Bo=e.log,Eo=e.unstable_setDisableYieldValue,Oa=null,gr=null;function mi(r){if(typeof Bo=="function"&&Eo(r),gr&&typeof gr.setStrictMode=="function")try{gr.setStrictMode(Oa,r)}catch{}}var ir=Math.clz32?Math.clz32:ni,al=Math.log,za=Math.LN2;function ni(r){return r>>>=0,r===0?32:31-(al(r)/za|0)|0}var $a=256,En=262144,Ln=4194304;function yi(r){var n=r&42;if(n!==0)return n;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function An(r,n,s){var u=r.pendingLanes;if(u===0)return 0;var m=0,b=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var M=u&134217727;return M!==0?(u=M&~b,u!==0?m=yi(u):(T&=M,T!==0?m=yi(T):s||(s=M&~r,s!==0&&(m=yi(s))))):(M=u&~b,M!==0?m=yi(M):T!==0?m=yi(T):s||(s=u&~r,s!==0&&(m=yi(s)))),m===0?0:n!==0&&n!==m&&(n&b)===0&&(b=m&-m,s=n&-n,b>=s||b===32&&(s&4194048)!==0)?n:m}function Oi(r,n){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&n)===0}function Lo(r,n){switch(r){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yr(){var r=Ln;return Ln<<=1,(Ln&62914560)===0&&(Ln=4194304),r}function zi(r){for(var n=[],s=0;31>s;s++)n.push(r);return n}function oa(r,n){r.pendingLanes|=n,n!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function nl(r,n,s,u,m,b){var T=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var M=r.entanglements,j=r.expirationTimes,et=r.hiddenUpdates;for(s=T&~s;0<s;){var ht=31-ir(s),pt=1<<ht;M[ht]=0,j[ht]=-1;var it=et[ht];if(it!==null)for(et[ht]=null,ht=0;ht<it.length;ht++){var st=it[ht];st!==null&&(st.lane&=-536870913)}s&=~pt}u!==0&&Zc(r,u,0),b!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=b&~(T&~n))}function Zc(r,n,s){r.pendingLanes|=n,r.suspendedLanes&=~n;var u=31-ir(n);r.entangledLanes|=n,r.entanglements[u]=r.entanglements[u]|1073741824|s&261930}function ol(r,n){var s=r.entangledLanes|=n;for(r=r.entanglements;s;){var u=31-ir(s),m=1<<u;m&n|r[u]&n&&(r[u]|=n),s&=~m}}function Ao(r,n){var s=n&-n;return s=(s&42)!==0?1:Mo(s),(s&(r.suspendedLanes|n))!==0?0:s}function Mo(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Mn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Kc(){var r=$.p;return r!==0?r:(r=window.event,r===void 0?32:pC(r.type))}function Na(r,n){var s=$.p;try{return $.p=r,n()}finally{$.p=s}}var $i=Math.random().toString(36).slice(2),Ue="__reactFiber$"+$i,Kt="__reactProps$"+$i,Gr="__reactContainer$"+$i,sl="__reactEvents$"+$i,Jc="__reactListeners$"+$i,ll="__reactHandles$"+$i,cl="__reactResources$"+$i,qa="__reactMarker$"+$i;function hl(r){delete r[Ue],delete r[Kt],delete r[sl],delete r[Jc],delete r[ll]}function Ia(r){var n=r[Ue];if(n)return n;for(var s=r.parentNode;s;){if(n=s[Gr]||s[Ue]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(r=Kb(r);r!==null;){if(s=r[Ue])return s;r=Kb(r)}return n}r=s,s=r.parentNode}return null}function ja(r){if(r=r[Ue]||r[Gr]){var n=r.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return r}return null}function Fn(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r.stateNode;throw Error(a(33))}function wr(r){var n=r[cl];return n||(n=r[cl]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function De(r){r[qa]=!0}var Ni=new Set,th={};function sa(r,n){la(r,n),la(r+"Capture",n)}function la(r,n){for(th[r]=n,r=0;r<n.length;r++)Ni.add(n[r])}var eh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Dn={},Fo={};function Do(r){return So.call(Fo,r)?!0:So.call(Dn,r)?!1:eh.test(r)?Fo[r]=!0:(Dn[r]=!0,!1)}function xi(r,n,s){if(Do(n))if(s===null)r.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(n);return}}r.setAttribute(n,""+s)}}function qi(r,n,s){if(s===null)r.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(n);return}r.setAttribute(n,""+s)}}function Ye(r,n,s,u){if(u===null)r.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(n,s,""+u)}}function Mr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function rh(r){var n=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ih(r,n,s){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,n);if(!r.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,b=u.set;return Object.defineProperty(r,n,{configurable:!0,get:function(){return m.call(this)},set:function(T){s=""+T,b.call(this,T)}}),Object.defineProperty(r,n,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(T){s=""+T},stopTracking:function(){r._valueTracker=null,delete r[n]}}}}function Ro(r){if(!r._valueTracker){var n=rh(r)?"checked":"value";r._valueTracker=ih(r,n,""+r[n])}}function ah(r){if(!r)return!1;var n=r._valueTracker;if(!n)return!0;var s=n.getValue(),u="";return r&&(u=rh(r)?r.checked?"true":"false":r.value),r=u,r!==s?(n.setValue(r),!0):!1}function Rn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Ud=/[\n"\\]/g;function Fr(r){return r.replace(Ud,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Oo(r,n,s,u,m,b,T,M){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),n!=null?T==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=""+Mr(n)):r.value!==""+Mr(n)&&(r.value=""+Mr(n)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),n!=null?zn(r,T,Mr(n)):s!=null?zn(r,T,Mr(s)):u!=null&&r.removeAttribute("value"),m==null&&b!=null&&(r.defaultChecked=!!b),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+Mr(M):r.removeAttribute("name")}function On(r,n,s,u,m,b,T,M){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),n!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){Ro(r);return}s=s!=null?""+Mr(s):"",n=n!=null?""+Mr(n):s,M||n===r.value||(r.value=n),r.defaultValue=n}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=M?r.checked:!!u,r.defaultChecked=!!u,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),Ro(r)}function zn(r,n,s){n==="number"&&Rn(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function bt(r,n,s,u){if(r=r.options,n){n={};for(var m=0;m<s.length;m++)n["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=n.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&u&&(r[s].defaultSelected=!0)}else{for(s=""+Mr(s),n=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}n!==null||r[m].disabled||(n=r[m])}n!==null&&(n.selected=!0)}}function O(r,n,s){if(n!=null&&(n=""+Mr(n),n!==r.value&&(r.value=n),s==null)){r.defaultValue!==n&&(r.defaultValue=n);return}r.defaultValue=s!=null?""+Mr(s):""}function rt(r,n,s,u){if(n==null){if(u!=null){if(s!=null)throw Error(a(92));if(H(u)){if(1<u.length)throw Error(a(93));u=u[0]}s=u}s==null&&(s=""),n=s}s=Mr(n),r.defaultValue=s,u=r.textContent,u===s&&u!==""&&u!==null&&(r.value=u),Ro(r)}function xt(r,n){if(n){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=n;return}}r.textContent=n}var Ft=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Gt(r,n,s){var u=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?r.setProperty(n,""):n==="float"?r.cssFloat="":r[n]="":u?r.setProperty(n,s):typeof s!="number"||s===0||Ft.has(n)?n==="float"?r.cssFloat=s:r[n]=(""+s).trim():r[n]=s+"px"}function ee(r,n,s){if(n!=null&&typeof n!="object")throw Error(a(62));if(r=r.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in n)u=n[m],n.hasOwnProperty(m)&&s[m]!==u&&Gt(r,m,u)}else for(var b in n)n.hasOwnProperty(b)&&Gt(r,b,n[b])}function Ee(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Le=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Dr=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mr(r){return Dr.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Vr(){}var Ge=null;function Yd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var zo=null,$o=null;function Py(r){var n=ja(r);if(n&&(r=n.stateNode)){var s=r[Kt]||null;t:switch(r=n.stateNode,n.type){case"input":if(Oo(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Fr(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var u=s[n];if(u!==r&&u.form===r.form){var m=u[Kt]||null;if(!m)throw Error(a(90));Oo(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(n=0;n<s.length;n++)u=s[n],u.form===r.form&&ah(u)}break t;case"textarea":O(r,s.value,s.defaultValue);break t;case"select":n=s.value,n!=null&&bt(r,!!s.multiple,n,!1)}}}var Gd=!1;function Wy(r,n,s){if(Gd)return r(n,s);Gd=!0;try{var u=r(n);return u}finally{if(Gd=!1,(zo!==null||$o!==null)&&(Uh(),zo&&(n=zo,r=$o,$o=zo=null,Py(n),r)))for(n=0;n<r.length;n++)Py(r[n])}}function ul(r,n){var s=r.stateNode;if(s===null)return null;var u=s[Kt]||null;if(u===null)return null;s=u[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break t;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,n,typeof s));return s}var ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vd=!1;if(ca)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){Vd=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{Vd=!1}var Ha=null,Xd=null,nh=null;function Uy(){if(nh)return nh;var r,n=Xd,s=n.length,u,m="value"in Ha?Ha.value:Ha.textContent,b=m.length;for(r=0;r<s&&n[r]===m[r];r++);var T=s-r;for(u=1;u<=T&&n[s-u]===m[b-u];u++);return nh=m.slice(r,1<u?1-u:void 0)}function oh(r){var n=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&n===13&&(r=13)):r=n,r===10&&(r=13),32<=r||r===13?r:0}function sh(){return!0}function Yy(){return!1}function Rr(r){function n(s,u,m,b,T){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=b,this.target=T,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?sh:Yy,this.isPropagationStopped=Yy,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=sh)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=sh)},persist:function(){},isPersistent:sh}),n}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lh=Rr($n),fl=g({},$n,{view:0,detail:0}),wB=Rr(fl),Qd,Zd,pl,ch=g({},fl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==pl&&(pl&&r.type==="mousemove"?(Qd=r.screenX-pl.screenX,Zd=r.screenY-pl.screenY):Zd=Qd=0,pl=r),Qd)},movementY:function(r){return"movementY"in r?r.movementY:Zd}}),Gy=Rr(ch),TB=g({},ch,{dataTransfer:0}),_B=Rr(TB),BB=g({},fl,{relatedTarget:0}),Kd=Rr(BB),EB=g({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),LB=Rr(EB),AB=g({},$n,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),MB=Rr(AB),FB=g({},$n,{data:0}),Vy=Rr(FB),DB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RB={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"},OB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zB(r){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(r):(r=OB[r])?!!n[r]:!1}function Jd(){return zB}var $B=g({},fl,{key:function(r){if(r.key){var n=DB[r.key]||r.key;if(n!=="Unidentified")return n}return r.type==="keypress"?(r=oh(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?RB[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jd,charCode:function(r){return r.type==="keypress"?oh(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?oh(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),NB=Rr($B),qB=g({},ch,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xy=Rr(qB),IB=g({},fl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jd}),jB=Rr(IB),HB=g({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Rr(HB),WB=g({},ch,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),UB=Rr(WB),YB=g({},$n,{newState:0,oldState:0}),GB=Rr(YB),VB=[9,13,27,32],tf=ca&&"CompositionEvent"in window,gl=null;ca&&"documentMode"in document&&(gl=document.documentMode);var XB=ca&&"TextEvent"in window&&!gl,Qy=ca&&(!tf||gl&&8<gl&&11>=gl),Zy=" ",Ky=!1;function Jy(r,n){switch(r){case"keyup":return VB.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var No=!1;function QB(r,n){switch(r){case"compositionend":return t0(n);case"keypress":return n.which!==32?null:(Ky=!0,Zy);case"textInput":return r=n.data,r===Zy&&Ky?null:r;default:return null}}function ZB(r,n){if(No)return r==="compositionend"||!tf&&Jy(r,n)?(r=Uy(),nh=Xd=Ha=null,No=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Qy&&n.locale!=="ko"?null:n.data;default:return null}}var KB={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 e0(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n==="input"?!!KB[r.type]:n==="textarea"}function r0(r,n,s,u){zo?$o?$o.push(u):$o=[u]:zo=u,n=Kh(n,"onChange"),0<n.length&&(s=new lh("onChange","change",null,s,u),r.push({event:s,listeners:n}))}var ml=null,yl=null;function JB(r){Nb(r,0)}function hh(r){var n=Fn(r);if(ah(n))return r}function i0(r,n){if(r==="change")return n}var a0=!1;if(ca){var ef;if(ca){var rf="oninput"in document;if(!rf){var n0=document.createElement("div");n0.setAttribute("oninput","return;"),rf=typeof n0.oninput=="function"}ef=rf}else ef=!1;a0=ef&&(!document.documentMode||9<document.documentMode)}function o0(){ml&&(ml.detachEvent("onpropertychange",s0),yl=ml=null)}function s0(r){if(r.propertyName==="value"&&hh(yl)){var n=[];r0(n,yl,r,Yd(r)),Wy(JB,n)}}function tE(r,n,s){r==="focusin"?(o0(),ml=n,yl=s,ml.attachEvent("onpropertychange",s0)):r==="focusout"&&o0()}function eE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return hh(yl)}function rE(r,n){if(r==="click")return hh(n)}function iE(r,n){if(r==="input"||r==="change")return hh(n)}function aE(r,n){return r===n&&(r!==0||1/r===1/n)||r!==r&&n!==n}var Xr=typeof Object.is=="function"?Object.is:aE;function xl(r,n){if(Xr(r,n))return!0;if(typeof r!="object"||r===null||typeof n!="object"||n===null)return!1;var s=Object.keys(r),u=Object.keys(n);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!So.call(n,m)||!Xr(r[m],n[m]))return!1}return!0}function l0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function c0(r,n){var s=l0(r);r=0;for(var u;s;){if(s.nodeType===3){if(u=r+s.textContent.length,r<=n&&u>=n)return{node:s,offset:n-r};r=u}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=l0(s)}}function h0(r,n){return r&&n?r===n?!0:r&&r.nodeType===3?!1:n&&n.nodeType===3?h0(r,n.parentNode):"contains"in r?r.contains(n):r.compareDocumentPosition?!!(r.compareDocumentPosition(n)&16):!1:!1}function u0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var n=Rn(r.document);n instanceof r.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)r=n.contentWindow;else break;n=Rn(r.document)}return n}function af(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n&&(n==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||n==="textarea"||r.contentEditable==="true")}var nE=ca&&"documentMode"in document&&11>=document.documentMode,qo=null,nf=null,bl=null,of=!1;function d0(r,n,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;of||qo==null||qo!==Rn(u)||(u=qo,"selectionStart"in u&&af(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),bl&&xl(bl,u)||(bl=u,u=Kh(nf,"onSelect"),0<u.length&&(n=new lh("onSelect","select",null,n,s),r.push({event:n,listeners:u}),n.target=qo)))}function Nn(r,n){var s={};return s[r.toLowerCase()]=n.toLowerCase(),s["Webkit"+r]="webkit"+n,s["Moz"+r]="moz"+n,s}var Io={animationend:Nn("Animation","AnimationEnd"),animationiteration:Nn("Animation","AnimationIteration"),animationstart:Nn("Animation","AnimationStart"),transitionrun:Nn("Transition","TransitionRun"),transitionstart:Nn("Transition","TransitionStart"),transitioncancel:Nn("Transition","TransitionCancel"),transitionend:Nn("Transition","TransitionEnd")},sf={},f0={};ca&&(f0=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function qn(r){if(sf[r])return sf[r];if(!Io[r])return r;var n=Io[r],s;for(s in n)if(n.hasOwnProperty(s)&&s in f0)return sf[r]=n[s];return r}var p0=qn("animationend"),g0=qn("animationiteration"),m0=qn("animationstart"),oE=qn("transitionrun"),sE=qn("transitionstart"),lE=qn("transitioncancel"),y0=qn("transitionend"),x0=new Map,lf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lf.push("scrollEnd");function bi(r,n){x0.set(r,n),sa(n,[r])}var uh=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},oi=[],jo=0,cf=0;function dh(){for(var r=jo,n=cf=jo=0;n<r;){var s=oi[n];oi[n++]=null;var u=oi[n];oi[n++]=null;var m=oi[n];oi[n++]=null;var b=oi[n];if(oi[n++]=null,u!==null&&m!==null){var T=u.pending;T===null?m.next=m:(m.next=T.next,T.next=m),u.pending=m}b!==0&&b0(s,m,b)}}function fh(r,n,s,u){oi[jo++]=r,oi[jo++]=n,oi[jo++]=s,oi[jo++]=u,cf|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function hf(r,n,s,u){return fh(r,n,s,u),ph(r)}function In(r,n){return fh(r,null,null,n),ph(r)}function b0(r,n,s){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s);for(var m=!1,b=r.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(m=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,m&&n!==null&&(m=31-ir(s),r=b.hiddenUpdates,u=r[m],u===null?r[m]=[n]:u.push(n),n.lane=s|536870912),b):null}function ph(r){if(50<jl)throw jl=0,bp=null,Error(a(185));for(var n=r.return;n!==null;)r=n,n=r.return;return r.tag===3?r.stateNode:null}var Ho={};function cE(r,n,s,u){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(r,n,s,u){return new cE(r,n,s,u)}function uf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ha(r,n){var s=r.alternate;return s===null?(s=Qr(r.tag,n,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=n,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,n=r.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function C0(r,n){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=n,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,n=s.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),r}function gh(r,n,s,u,m,b){var T=0;if(u=r,typeof r=="function")uf(r)&&(T=1);else if(typeof r=="string")T=pL(r,s,ut.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case at:return r=Qr(31,s,n,m),r.elementType=at,r.lanes=b,r;case k:return jn(s.children,m,b,n);case v:T=8,m|=24;break;case w:return r=Qr(12,s,n,m|2),r.elementType=w,r.lanes=b,r;case D:return r=Qr(13,s,n,m),r.elementType=D,r.lanes=b,r;case z:return r=Qr(19,s,n,m),r.elementType=z,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case L:T=10;break t;case B:T=9;break t;case F:T=11;break t;case N:T=14;break t;case P:T=16,u=null;break t}T=29,s=Error(a(130,r===null?"null":typeof r,"")),u=null}return n=Qr(T,s,n,m),n.elementType=r,n.type=u,n.lanes=b,n}function jn(r,n,s,u){return r=Qr(7,r,u,n),r.lanes=s,r}function df(r,n,s){return r=Qr(6,r,null,n),r.lanes=s,r}function v0(r){var n=Qr(18,null,null,0);return n.stateNode=r,n}function ff(r,n,s){return n=Qr(4,r.children!==null?r.children:[],r.key,n),n.lanes=s,n.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},n}var k0=new WeakMap;function si(r,n){if(typeof r=="object"&&r!==null){var s=k0.get(r);return s!==void 0?s:(n={value:r,source:n,stack:Sr(n)},k0.set(r,n),n)}return{value:r,source:n,stack:Sr(n)}}var Po=[],Wo=0,mh=null,Cl=0,li=[],ci=0,Pa=null,Ii=1,ji="";function ua(r,n){Po[Wo++]=Cl,Po[Wo++]=mh,mh=r,Cl=n}function S0(r,n,s){li[ci++]=Ii,li[ci++]=ji,li[ci++]=Pa,Pa=r;var u=Ii;r=ji;var m=32-ir(u)-1;u&=~(1<<m),s+=1;var b=32-ir(n)+m;if(30<b){var T=m-m%5;b=(u&(1<<T)-1).toString(32),u>>=T,m-=T,Ii=1<<32-ir(n)+m|s<<m|u,ji=b+r}else Ii=1<<b|s<<m|u,ji=r}function pf(r){r.return!==null&&(ua(r,1),S0(r,1,0))}function gf(r){for(;r===mh;)mh=Po[--Wo],Po[Wo]=null,Cl=Po[--Wo],Po[Wo]=null;for(;r===Pa;)Pa=li[--ci],li[ci]=null,ji=li[--ci],li[ci]=null,Ii=li[--ci],li[ci]=null}function w0(r,n){li[ci++]=Ii,li[ci++]=ji,li[ci++]=Pa,Ii=n.id,ji=n.overflow,Pa=r}var ar=null,ke=null,ae=!1,Wa=null,hi=!1,mf=Error(a(519));function Ua(r){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vl(si(n,r)),mf}function T0(r){var n=r.stateNode,s=r.type,u=r.memoizedProps;switch(n[Ue]=r,n[Kt]=u,s){case"dialog":te("cancel",n),te("close",n);break;case"iframe":case"object":case"embed":te("load",n);break;case"video":case"audio":for(s=0;s<Pl.length;s++)te(Pl[s],n);break;case"source":te("error",n);break;case"img":case"image":case"link":te("error",n),te("load",n);break;case"details":te("toggle",n);break;case"input":te("invalid",n),On(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":te("invalid",n);break;case"textarea":te("invalid",n),rt(n,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||u.suppressHydrationWarning===!0||Hb(n.textContent,s)?(u.popover!=null&&(te("beforetoggle",n),te("toggle",n)),u.onScroll!=null&&te("scroll",n),u.onScrollEnd!=null&&te("scrollend",n),u.onClick!=null&&(n.onclick=Vr),n=!0):n=!1,n||Ua(r,!0)}function _0(r){for(ar=r.return;ar;)switch(ar.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:ar=ar.return}}function Uo(r){if(r!==ar)return!1;if(!ae)return _0(r),ae=!0,!1;var n=r.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Rp(r.type,r.memoizedProps)),s=!s),s&&ke&&Ua(r),_0(r),n===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ke=Zb(r)}else if(n===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ke=Zb(r)}else n===27?(n=ke,on(r.type)?(r=qp,qp=null,ke=r):ke=n):ke=ar?di(r.stateNode.nextSibling):null;return!0}function Hn(){ke=ar=null,ae=!1}function yf(){var r=Wa;return r!==null&&(Nr===null?Nr=r:Nr.push.apply(Nr,r),Wa=null),r}function vl(r){Wa===null?Wa=[r]:Wa.push(r)}var xf=R(null),Pn=null,da=null;function Ya(r,n,s){ct(xf,n._currentValue),n._currentValue=s}function fa(r){r._currentValue=xf.current,G(xf)}function bf(r,n,s){for(;r!==null;){var u=r.alternate;if((r.childLanes&n)!==n?(r.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),r===s)break;r=r.return}}function Cf(r,n,s,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var b=m.dependencies;if(b!==null){var T=m.child;b=b.firstContext;t:for(;b!==null;){var M=b;b=m;for(var j=0;j<n.length;j++)if(M.context===n[j]){b.lanes|=s,M=b.alternate,M!==null&&(M.lanes|=s),bf(b.return,s,r),u||(T=null);break t}b=M.next}}else if(m.tag===18){if(T=m.return,T===null)throw Error(a(341));T.lanes|=s,b=T.alternate,b!==null&&(b.lanes|=s),bf(T,s,r),T=null}else T=m.child;if(T!==null)T.return=m;else for(T=m;T!==null;){if(T===r){T=null;break}if(m=T.sibling,m!==null){m.return=T.return,T=m;break}T=T.return}m=T}}function Yo(r,n,s,u){r=null;for(var m=n,b=!1;m!==null;){if(!b){if((m.flags&524288)!==0)b=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var T=m.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var M=m.type;Xr(m.pendingProps.value,T.value)||(r!==null?r.push(M):r=[M])}}else if(m===_t.current){if(T=m.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Vl):r=[Vl])}m=m.return}r!==null&&Cf(n,r,s,u),n.flags|=262144}function yh(r){for(r=r.firstContext;r!==null;){if(!Xr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Wn(r){Pn=r,da=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function nr(r){return B0(Pn,r)}function xh(r,n){return Pn===null&&Wn(r),B0(r,n)}function B0(r,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},da===null){if(r===null)throw Error(a(308));da=n,r.dependencies={lanes:0,firstContext:n},r.flags|=524288}else da=da.next=n;return s}var hE=typeof AbortController<"u"?AbortController:function(){var r=[],n=this.signal={aborted:!1,addEventListener:function(s,u){r.push(u)}};this.abort=function(){n.aborted=!0,r.forEach(function(s){return s()})}},uE=e.unstable_scheduleCallback,dE=e.unstable_NormalPriority,$e={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new hE,data:new Map,refCount:0}}function kl(r){r.refCount--,r.refCount===0&&uE(dE,function(){r.controller.abort()})}var Sl=null,kf=0,Go=0,Vo=null;function fE(r,n){if(Sl===null){var s=Sl=[];kf=0,Go=Tp(),Vo={status:"pending",value:void 0,then:function(u){s.push(u)}}}return kf++,n.then(E0,E0),n}function E0(){if(--kf===0&&Sl!==null){Vo!==null&&(Vo.status="fulfilled");var r=Sl;Sl=null,Go=0,Vo=null;for(var n=0;n<r.length;n++)(0,r[n])()}}function pE(r,n){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){u.status="fulfilled",u.value=n;for(var m=0;m<s.length;m++)(0,s[m])(n)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var L0=A.S;A.S=function(r,n){db=We(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&fE(r,n),L0!==null&&L0(r,n)};var Un=R(null);function Sf(){var r=Un.current;return r!==null?r:ve.pooledCache}function bh(r,n){n===null?ct(Un,Un.current):ct(Un,n.pool)}function A0(){var r=Sf();return r===null?null:{parent:$e._currentValue,pool:r}}var Xo=Error(a(460)),wf=Error(a(474)),Ch=Error(a(542)),vh={then:function(){}};function M0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function F0(r,n,s){switch(s=r[s],s===void 0?r.push(n):s!==n&&(n.then(Vr,Vr),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,R0(r),r;default:if(typeof n.status=="string")n.then(Vr,Vr);else{if(r=ve,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=n,r.status="pending",r.then(function(u){if(n.status==="pending"){var m=n;m.status="fulfilled",m.value=u}},function(u){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,R0(r),r}throw Gn=n,Xo}}function Yn(r){try{var n=r._init;return n(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Gn=s,Xo):s}}var Gn=null;function D0(){if(Gn===null)throw Error(a(459));var r=Gn;return Gn=null,r}function R0(r){if(r===Xo||r===Ch)throw Error(a(483))}var Qo=null,wl=0;function kh(r){var n=wl;return wl+=1,Qo===null&&(Qo=[]),F0(Qo,r,n)}function Tl(r,n){n=n.props.ref,r.ref=n!==void 0?n:null}function Sh(r,n){throw n.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(n),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":r)))}function O0(r){function n(Z,U){if(r){var tt=Z.deletions;tt===null?(Z.deletions=[U],Z.flags|=16):tt.push(U)}}function s(Z,U){if(!r)return null;for(;U!==null;)n(Z,U),U=U.sibling;return null}function u(Z){for(var U=new Map;Z!==null;)Z.key!==null?U.set(Z.key,Z):U.set(Z.index,Z),Z=Z.sibling;return U}function m(Z,U){return Z=ha(Z,U),Z.index=0,Z.sibling=null,Z}function b(Z,U,tt){return Z.index=tt,r?(tt=Z.alternate,tt!==null?(tt=tt.index,tt<U?(Z.flags|=67108866,U):tt):(Z.flags|=67108866,U)):(Z.flags|=1048576,U)}function T(Z){return r&&Z.alternate===null&&(Z.flags|=67108866),Z}function M(Z,U,tt,ft){return U===null||U.tag!==6?(U=df(tt,Z.mode,ft),U.return=Z,U):(U=m(U,tt),U.return=Z,U)}function j(Z,U,tt,ft){var zt=tt.type;return zt===k?ht(Z,U,tt.props.children,ft,tt.key):U!==null&&(U.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===P&&Yn(zt)===U.type)?(U=m(U,tt.props),Tl(U,tt),U.return=Z,U):(U=gh(tt.type,tt.key,tt.props,null,Z.mode,ft),Tl(U,tt),U.return=Z,U)}function et(Z,U,tt,ft){return U===null||U.tag!==4||U.stateNode.containerInfo!==tt.containerInfo||U.stateNode.implementation!==tt.implementation?(U=ff(tt,Z.mode,ft),U.return=Z,U):(U=m(U,tt.children||[]),U.return=Z,U)}function ht(Z,U,tt,ft,zt){return U===null||U.tag!==7?(U=jn(tt,Z.mode,ft,zt),U.return=Z,U):(U=m(U,tt),U.return=Z,U)}function pt(Z,U,tt){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=df(""+U,Z.mode,tt),U.return=Z,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case y:return tt=gh(U.type,U.key,U.props,null,Z.mode,tt),Tl(tt,U),tt.return=Z,tt;case C:return U=ff(U,Z.mode,tt),U.return=Z,U;case P:return U=Yn(U),pt(Z,U,tt)}if(H(U)||W(U))return U=jn(U,Z.mode,tt,null),U.return=Z,U;if(typeof U.then=="function")return pt(Z,kh(U),tt);if(U.$$typeof===L)return pt(Z,xh(Z,U),tt);Sh(Z,U)}return null}function it(Z,U,tt,ft){var zt=U!==null?U.key:null;if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return zt!==null?null:M(Z,U,""+tt,ft);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case y:return tt.key===zt?j(Z,U,tt,ft):null;case C:return tt.key===zt?et(Z,U,tt,ft):null;case P:return tt=Yn(tt),it(Z,U,tt,ft)}if(H(tt)||W(tt))return zt!==null?null:ht(Z,U,tt,ft,null);if(typeof tt.then=="function")return it(Z,U,kh(tt),ft);if(tt.$$typeof===L)return it(Z,U,xh(Z,tt),ft);Sh(Z,tt)}return null}function st(Z,U,tt,ft,zt){if(typeof ft=="string"&&ft!==""||typeof ft=="number"||typeof ft=="bigint")return Z=Z.get(tt)||null,M(U,Z,""+ft,zt);if(typeof ft=="object"&&ft!==null){switch(ft.$$typeof){case y:return Z=Z.get(ft.key===null?tt:ft.key)||null,j(U,Z,ft,zt);case C:return Z=Z.get(ft.key===null?tt:ft.key)||null,et(U,Z,ft,zt);case P:return ft=Yn(ft),st(Z,U,tt,ft,zt)}if(H(ft)||W(ft))return Z=Z.get(tt)||null,ht(U,Z,ft,zt,null);if(typeof ft.then=="function")return st(Z,U,tt,kh(ft),zt);if(ft.$$typeof===L)return st(Z,U,tt,xh(U,ft),zt);Sh(U,ft)}return null}function At(Z,U,tt,ft){for(var zt=null,he=null,Dt=U,Qt=U=0,ie=null;Dt!==null&&Qt<tt.length;Qt++){Dt.index>Qt?(ie=Dt,Dt=null):ie=Dt.sibling;var ue=it(Z,Dt,tt[Qt],ft);if(ue===null){Dt===null&&(Dt=ie);break}r&&Dt&&ue.alternate===null&&n(Z,Dt),U=b(ue,U,Qt),he===null?zt=ue:he.sibling=ue,he=ue,Dt=ie}if(Qt===tt.length)return s(Z,Dt),ae&&ua(Z,Qt),zt;if(Dt===null){for(;Qt<tt.length;Qt++)Dt=pt(Z,tt[Qt],ft),Dt!==null&&(U=b(Dt,U,Qt),he===null?zt=Dt:he.sibling=Dt,he=Dt);return ae&&ua(Z,Qt),zt}for(Dt=u(Dt);Qt<tt.length;Qt++)ie=st(Dt,Z,Qt,tt[Qt],ft),ie!==null&&(r&&ie.alternate!==null&&Dt.delete(ie.key===null?Qt:ie.key),U=b(ie,U,Qt),he===null?zt=ie:he.sibling=ie,he=ie);return r&&Dt.forEach(function(un){return n(Z,un)}),ae&&ua(Z,Qt),zt}function It(Z,U,tt,ft){if(tt==null)throw Error(a(151));for(var zt=null,he=null,Dt=U,Qt=U=0,ie=null,ue=tt.next();Dt!==null&&!ue.done;Qt++,ue=tt.next()){Dt.index>Qt?(ie=Dt,Dt=null):ie=Dt.sibling;var un=it(Z,Dt,ue.value,ft);if(un===null){Dt===null&&(Dt=ie);break}r&&Dt&&un.alternate===null&&n(Z,Dt),U=b(un,U,Qt),he===null?zt=un:he.sibling=un,he=un,Dt=ie}if(ue.done)return s(Z,Dt),ae&&ua(Z,Qt),zt;if(Dt===null){for(;!ue.done;Qt++,ue=tt.next())ue=pt(Z,ue.value,ft),ue!==null&&(U=b(ue,U,Qt),he===null?zt=ue:he.sibling=ue,he=ue);return ae&&ua(Z,Qt),zt}for(Dt=u(Dt);!ue.done;Qt++,ue=tt.next())ue=st(Dt,Z,Qt,ue.value,ft),ue!==null&&(r&&ue.alternate!==null&&Dt.delete(ue.key===null?Qt:ue.key),U=b(ue,U,Qt),he===null?zt=ue:he.sibling=ue,he=ue);return r&&Dt.forEach(function(TL){return n(Z,TL)}),ae&&ua(Z,Qt),zt}function be(Z,U,tt,ft){if(typeof tt=="object"&&tt!==null&&tt.type===k&&tt.key===null&&(tt=tt.props.children),typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case y:t:{for(var zt=tt.key;U!==null;){if(U.key===zt){if(zt=tt.type,zt===k){if(U.tag===7){s(Z,U.sibling),ft=m(U,tt.props.children),ft.return=Z,Z=ft;break t}}else if(U.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===P&&Yn(zt)===U.type){s(Z,U.sibling),ft=m(U,tt.props),Tl(ft,tt),ft.return=Z,Z=ft;break t}s(Z,U);break}else n(Z,U);U=U.sibling}tt.type===k?(ft=jn(tt.props.children,Z.mode,ft,tt.key),ft.return=Z,Z=ft):(ft=gh(tt.type,tt.key,tt.props,null,Z.mode,ft),Tl(ft,tt),ft.return=Z,Z=ft)}return T(Z);case C:t:{for(zt=tt.key;U!==null;){if(U.key===zt)if(U.tag===4&&U.stateNode.containerInfo===tt.containerInfo&&U.stateNode.implementation===tt.implementation){s(Z,U.sibling),ft=m(U,tt.children||[]),ft.return=Z,Z=ft;break t}else{s(Z,U);break}else n(Z,U);U=U.sibling}ft=ff(tt,Z.mode,ft),ft.return=Z,Z=ft}return T(Z);case P:return tt=Yn(tt),be(Z,U,tt,ft)}if(H(tt))return At(Z,U,tt,ft);if(W(tt)){if(zt=W(tt),typeof zt!="function")throw Error(a(150));return tt=zt.call(tt),It(Z,U,tt,ft)}if(typeof tt.then=="function")return be(Z,U,kh(tt),ft);if(tt.$$typeof===L)return be(Z,U,xh(Z,tt),ft);Sh(Z,tt)}return typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint"?(tt=""+tt,U!==null&&U.tag===6?(s(Z,U.sibling),ft=m(U,tt),ft.return=Z,Z=ft):(s(Z,U),ft=df(tt,Z.mode,ft),ft.return=Z,Z=ft),T(Z)):s(Z,U)}return function(Z,U,tt,ft){try{wl=0;var zt=be(Z,U,tt,ft);return Qo=null,zt}catch(Dt){if(Dt===Xo||Dt===Ch)throw Dt;var he=Qr(29,Dt,null,Z.mode);return he.lanes=ft,he.return=Z,he}finally{}}}var Vn=O0(!0),z0=O0(!1),Ga=!1;function Tf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _f(r,n){r=r.updateQueue,n.updateQueue===r&&(n.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Va(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Xa(r,n,s){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(fe&2)!==0){var m=u.pending;return m===null?n.next=n:(n.next=m.next,m.next=n),u.pending=n,n=ph(r),b0(r,null,s),n}return fh(r,u,n,s),ph(r)}function _l(r,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var u=n.lanes;u&=r.pendingLanes,s|=u,n.lanes=s,ol(r,s)}}function Bf(r,n){var s=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var T={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?m=b=T:b=b.next=T,s=s.next}while(s!==null);b===null?m=b=n:b=b.next=n}else m=b=n;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=n:r.next=n,s.lastBaseUpdate=n}var Ef=!1;function Bl(){if(Ef){var r=Vo;if(r!==null)throw r}}function El(r,n,s,u){Ef=!1;var m=r.updateQueue;Ga=!1;var b=m.firstBaseUpdate,T=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var j=M,et=j.next;j.next=null,T===null?b=et:T.next=et,T=j;var ht=r.alternate;ht!==null&&(ht=ht.updateQueue,M=ht.lastBaseUpdate,M!==T&&(M===null?ht.firstBaseUpdate=et:M.next=et,ht.lastBaseUpdate=j))}if(b!==null){var pt=m.baseState;T=0,ht=et=j=null,M=b;do{var it=M.lane&-536870913,st=it!==M.lane;if(st?(re&it)===it:(u&it)===it){it!==0&&it===Go&&(Ef=!0),ht!==null&&(ht=ht.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});t:{var At=r,It=M;it=n;var be=s;switch(It.tag){case 1:if(At=It.payload,typeof At=="function"){pt=At.call(be,pt,it);break t}pt=At;break t;case 3:At.flags=At.flags&-65537|128;case 0:if(At=It.payload,it=typeof At=="function"?At.call(be,pt,it):At,it==null)break t;pt=g({},pt,it);break t;case 2:Ga=!0}}it=M.callback,it!==null&&(r.flags|=64,st&&(r.flags|=8192),st=m.callbacks,st===null?m.callbacks=[it]:st.push(it))}else st={lane:it,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ht===null?(et=ht=st,j=pt):ht=ht.next=st,T|=it;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;st=M,M=st.next,st.next=null,m.lastBaseUpdate=st,m.shared.pending=null}}while(!0);ht===null&&(j=pt),m.baseState=j,m.firstBaseUpdate=et,m.lastBaseUpdate=ht,b===null&&(m.shared.lanes=0),tn|=T,r.lanes=T,r.memoizedState=pt}}function $0(r,n){if(typeof r!="function")throw Error(a(191,r));r.call(n)}function N0(r,n){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)$0(s[r],n)}var Zo=R(null),wh=R(0);function q0(r,n){r=ka,ct(wh,r),ct(Zo,n),ka=r|n.baseLanes}function Lf(){ct(wh,ka),ct(Zo,Zo.current)}function Af(){ka=wh.current,G(Zo),G(wh)}var Zr=R(null),ui=null;function Qa(r){var n=r.alternate;ct(Re,Re.current&1),ct(Zr,r),ui===null&&(n===null||Zo.current!==null||n.memoizedState!==null)&&(ui=r)}function Mf(r){ct(Re,Re.current),ct(Zr,r),ui===null&&(ui=r)}function I0(r){r.tag===22?(ct(Re,Re.current),ct(Zr,r),ui===null&&(ui=r)):Za()}function Za(){ct(Re,Re.current),ct(Zr,Zr.current)}function Kr(r){G(Zr),ui===r&&(ui=null),G(Re)}var Re=R(0);function Th(r){for(var n=r;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||$p(s)||Np(s)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var pa=0,Vt=null,ye=null,Ne=null,_h=!1,Ko=!1,Xn=!1,Bh=0,Ll=0,Jo=null,gE=0;function Ae(){throw Error(a(321))}function Ff(r,n){if(n===null)return!1;for(var s=0;s<n.length&&s<r.length;s++)if(!Xr(r[s],n[s]))return!1;return!0}function Df(r,n,s,u,m,b){return pa=b,Vt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=r===null||r.memoizedState===null?Sx:Vf,Xn=!1,b=s(u,m),Xn=!1,Ko&&(b=H0(n,s,u,m)),j0(r),b}function j0(r){A.H=Fl;var n=ye!==null&&ye.next!==null;if(pa=0,Ne=ye=Vt=null,_h=!1,Ll=0,Jo=null,n)throw Error(a(300));r===null||qe||(r=r.dependencies,r!==null&&yh(r)&&(qe=!0))}function H0(r,n,s,u){Vt=r;var m=0;do{if(Ko&&(Jo=null),Ll=0,Ko=!1,25<=m)throw Error(a(301));if(m+=1,Ne=ye=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}A.H=wx,b=n(s,u)}while(Ko);return b}function mE(){var r=A.H,n=r.useState()[0];return n=typeof n.then=="function"?Al(n):n,r=r.useState()[0],(ye!==null?ye.memoizedState:null)!==r&&(Vt.flags|=1024),n}function Rf(){var r=Bh!==0;return Bh=0,r}function Of(r,n,s){n.updateQueue=r.updateQueue,n.flags&=-2053,r.lanes&=~s}function zf(r){if(_h){for(r=r.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}_h=!1}pa=0,Ne=ye=Vt=null,Ko=!1,Ll=Bh=0,Jo=null}function Tr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ne===null?Vt.memoizedState=Ne=r:Ne=Ne.next=r,Ne}function Oe(){if(ye===null){var r=Vt.alternate;r=r!==null?r.memoizedState:null}else r=ye.next;var n=Ne===null?Vt.memoizedState:Ne.next;if(n!==null)Ne=n,ye=r;else{if(r===null)throw Vt.alternate===null?Error(a(467)):Error(a(310));ye=r,r={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},Ne===null?Vt.memoizedState=Ne=r:Ne=Ne.next=r}return Ne}function Eh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Al(r){var n=Ll;return Ll+=1,Jo===null&&(Jo=[]),r=F0(Jo,r,n),n=Vt,(Ne===null?n.memoizedState:Ne.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?Sx:Vf),r}function Lh(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Al(r);if(r.$$typeof===L)return nr(r)}throw Error(a(438,String(r)))}function $f(r){var n=null,s=Vt.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var u=Vt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(m){return m.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=Eh(),Vt.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(r),u=0;u<r;u++)s[u]=K;return n.index++,s}function ga(r,n){return typeof n=="function"?n(r):n}function Ah(r){var n=Oe();return Nf(n,ye,r)}function Nf(r,n,s){var u=r.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=s;var m=r.baseQueue,b=u.pending;if(b!==null){if(m!==null){var T=m.next;m.next=b.next,b.next=T}n.baseQueue=m=b,u.pending=null}if(b=r.baseState,m===null)r.memoizedState=b;else{n=m.next;var M=T=null,j=null,et=n,ht=!1;do{var pt=et.lane&-536870913;if(pt!==et.lane?(re&pt)===pt:(pa&pt)===pt){var it=et.revertLane;if(it===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null}),pt===Go&&(ht=!0);else if((pa&it)===it){et=et.next,it===Go&&(ht=!0);continue}else pt={lane:0,revertLane:et.revertLane,gesture:null,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null},j===null?(M=j=pt,T=b):j=j.next=pt,Vt.lanes|=it,tn|=it;pt=et.action,Xn&&s(b,pt),b=et.hasEagerState?et.eagerState:s(b,pt)}else it={lane:pt,revertLane:et.revertLane,gesture:et.gesture,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null},j===null?(M=j=it,T=b):j=j.next=it,Vt.lanes|=pt,tn|=pt;et=et.next}while(et!==null&&et!==n);if(j===null?T=b:j.next=M,!Xr(b,r.memoizedState)&&(qe=!0,ht&&(s=Vo,s!==null)))throw s;r.memoizedState=b,r.baseState=T,r.baseQueue=j,u.lastRenderedState=b}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function qf(r){var n=Oe(),s=n.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var u=s.dispatch,m=s.pending,b=n.memoizedState;if(m!==null){s.pending=null;var T=m=m.next;do b=r(b,T.action),T=T.next;while(T!==m);Xr(b,n.memoizedState)||(qe=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),s.lastRenderedState=b}return[b,u]}function P0(r,n,s){var u=Vt,m=Oe(),b=ae;if(b){if(s===void 0)throw Error(a(407));s=s()}else s=n();var T=!Xr((ye||m).memoizedState,s);if(T&&(m.memoizedState=s,qe=!0),m=m.queue,Hf(Y0.bind(null,u,m,r),[r]),m.getSnapshot!==n||T||Ne!==null&&Ne.memoizedState.tag&1){if(u.flags|=2048,ts(9,{destroy:void 0},U0.bind(null,u,m,s,n),null),ve===null)throw Error(a(349));b||(pa&127)!==0||W0(u,n,s)}return s}function W0(r,n,s){r.flags|=16384,r={getSnapshot:n,value:s},n=Vt.updateQueue,n===null?(n=Eh(),Vt.updateQueue=n,n.stores=[r]):(s=n.stores,s===null?n.stores=[r]:s.push(r))}function U0(r,n,s,u){n.value=s,n.getSnapshot=u,G0(n)&&V0(r)}function Y0(r,n,s){return s(function(){G0(n)&&V0(r)})}function G0(r){var n=r.getSnapshot;r=r.value;try{var s=n();return!Xr(r,s)}catch{return!0}}function V0(r){var n=In(r,2);n!==null&&qr(n,r,2)}function If(r){var n=Tr();if(typeof r=="function"){var s=r;if(r=s(),Xn){mi(!0);try{s()}finally{mi(!1)}}}return n.memoizedState=n.baseState=r,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:r},n}function X0(r,n,s,u){return r.baseState=s,Nf(r,ye,typeof u=="function"?u:ga)}function yE(r,n,s,u,m){if(Dh(r))throw Error(a(485));if(r=n.action,r!==null){var b={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){b.listeners.push(T)}};A.T!==null?s(!0):b.isTransition=!1,u(b),s=n.pending,s===null?(b.next=n.pending=b,Q0(n,b)):(b.next=s.next,n.pending=s.next=b)}}function Q0(r,n){var s=n.action,u=n.payload,m=r.state;if(n.isTransition){var b=A.T,T={};A.T=T;try{var M=s(m,u),j=A.S;j!==null&&j(T,M),Z0(r,n,M)}catch(et){jf(r,n,et)}finally{b!==null&&T.types!==null&&(b.types=T.types),A.T=b}}else try{b=s(m,u),Z0(r,n,b)}catch(et){jf(r,n,et)}}function Z0(r,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){K0(r,n,u)},function(u){return jf(r,n,u)}):K0(r,n,s)}function K0(r,n,s){n.status="fulfilled",n.value=s,J0(n),r.state=s,n=r.pending,n!==null&&(s=n.next,s===n?r.pending=null:(s=s.next,n.next=s,Q0(r,s)))}function jf(r,n,s){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=s,J0(n),n=n.next;while(n!==u)}r.action=null}function J0(r){r=r.listeners;for(var n=0;n<r.length;n++)(0,r[n])()}function tx(r,n){return n}function ex(r,n){if(ae){var s=ve.formState;if(s!==null){t:{var u=Vt;if(ae){if(ke){e:{for(var m=ke,b=hi;m.nodeType!==8;){if(!b){m=null;break e}if(m=di(m.nextSibling),m===null){m=null;break e}}b=m.data,m=b==="F!"||b==="F"?m:null}if(m){ke=di(m.nextSibling),u=m.data==="F!";break t}}Ua(u)}u=!1}u&&(n=s[0])}}return s=Tr(),s.memoizedState=s.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tx,lastRenderedState:n},s.queue=u,s=Cx.bind(null,Vt,u),u.dispatch=s,u=If(!1),b=Gf.bind(null,Vt,!1,u.queue),u=Tr(),m={state:n,dispatch:null,action:r,pending:null},u.queue=m,s=yE.bind(null,Vt,m,b,s),m.dispatch=s,u.memoizedState=r,[n,s,!1]}function rx(r){var n=Oe();return ix(n,ye,r)}function ix(r,n,s){if(n=Nf(r,n,tx)[0],r=Ah(ga)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Al(n)}catch(T){throw T===Xo?Ch:T}else u=n;n=Oe();var m=n.queue,b=m.dispatch;return s!==n.memoizedState&&(Vt.flags|=2048,ts(9,{destroy:void 0},xE.bind(null,m,s),null)),[u,b,r]}function xE(r,n){r.action=n}function ax(r){var n=Oe(),s=ye;if(s!==null)return ix(n,s,r);Oe(),n=n.memoizedState,s=Oe();var u=s.queue.dispatch;return s.memoizedState=r,[n,u,!1]}function ts(r,n,s,u){return r={tag:r,create:s,deps:u,inst:n,next:null},n=Vt.updateQueue,n===null&&(n=Eh(),Vt.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=r.next=r:(u=s.next,s.next=r,r.next=u,n.lastEffect=r),r}function nx(){return Oe().memoizedState}function Mh(r,n,s,u){var m=Tr();Vt.flags|=r,m.memoizedState=ts(1|n,{destroy:void 0},s,u===void 0?null:u)}function Fh(r,n,s,u){var m=Oe();u=u===void 0?null:u;var b=m.memoizedState.inst;ye!==null&&u!==null&&Ff(u,ye.memoizedState.deps)?m.memoizedState=ts(n,b,s,u):(Vt.flags|=r,m.memoizedState=ts(1|n,b,s,u))}function ox(r,n){Mh(8390656,8,r,n)}function Hf(r,n){Fh(2048,8,r,n)}function bE(r){Vt.flags|=4;var n=Vt.updateQueue;if(n===null)n=Eh(),Vt.updateQueue=n,n.events=[r];else{var s=n.events;s===null?n.events=[r]:s.push(r)}}function sx(r){var n=Oe().memoizedState;return bE({ref:n,nextImpl:r}),function(){if((fe&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function lx(r,n){return Fh(4,2,r,n)}function cx(r,n){return Fh(4,4,r,n)}function hx(r,n){if(typeof n=="function"){r=r();var s=n(r);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return r=r(),n.current=r,function(){n.current=null}}function ux(r,n,s){s=s!=null?s.concat([r]):null,Fh(4,4,hx.bind(null,n,r),s)}function Pf(){}function dx(r,n){var s=Oe();n=n===void 0?null:n;var u=s.memoizedState;return n!==null&&Ff(n,u[1])?u[0]:(s.memoizedState=[r,n],r)}function fx(r,n){var s=Oe();n=n===void 0?null:n;var u=s.memoizedState;if(n!==null&&Ff(n,u[1]))return u[0];if(u=r(),Xn){mi(!0);try{r()}finally{mi(!1)}}return s.memoizedState=[u,n],u}function Wf(r,n,s){return s===void 0||(pa&1073741824)!==0&&(re&261930)===0?r.memoizedState=n:(r.memoizedState=s,r=pb(),Vt.lanes|=r,tn|=r,s)}function px(r,n,s,u){return Xr(s,n)?s:Zo.current!==null?(r=Wf(r,s,u),Xr(r,n)||(qe=!0),r):(pa&42)===0||(pa&1073741824)!==0&&(re&261930)===0?(qe=!0,r.memoizedState=s):(r=pb(),Vt.lanes|=r,tn|=r,n)}function gx(r,n,s,u,m){var b=$.p;$.p=b!==0&&8>b?b:8;var T=A.T,M={};A.T=M,Gf(r,!1,n,s);try{var j=m(),et=A.S;if(et!==null&&et(M,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ht=pE(j,u);Ml(r,n,ht,ei(r))}else Ml(r,n,u,ei(r))}catch(pt){Ml(r,n,{then:function(){},status:"rejected",reason:pt},ei())}finally{$.p=b,T!==null&&M.types!==null&&(T.types=M.types),A.T=T}}function CE(){}function Uf(r,n,s,u){if(r.tag!==5)throw Error(a(476));var m=mx(r).queue;gx(r,m,n,I,s===null?CE:function(){return yx(r),s(u)})}function mx(r){var n=r.memoizedState;if(n!==null)return n;n={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:I},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:s},next:null},r.memoizedState=n,r=r.alternate,r!==null&&(r.memoizedState=n),n}function yx(r){var n=mx(r);n.next===null&&(n=r.alternate.memoizedState),Ml(r,n.next.queue,{},ei())}function Yf(){return nr(Vl)}function xx(){return Oe().memoizedState}function bx(){return Oe().memoizedState}function vE(r){for(var n=r.return;n!==null;){switch(n.tag){case 24:case 3:var s=ei();r=Va(s);var u=Xa(n,r,s);u!==null&&(qr(u,n,s),_l(u,n,s)),n={cache:vf()},r.payload=n;return}n=n.return}}function kE(r,n,s){var u=ei();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Dh(r)?vx(n,s):(s=hf(r,n,s,u),s!==null&&(qr(s,r,u),kx(s,n,u)))}function Cx(r,n,s){var u=ei();Ml(r,n,s,u)}function Ml(r,n,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Dh(r))vx(n,m);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var T=n.lastRenderedState,M=b(T,s);if(m.hasEagerState=!0,m.eagerState=M,Xr(M,T))return fh(r,n,m,0),ve===null&&dh(),!1}catch{}finally{}if(s=hf(r,n,m,u),s!==null)return qr(s,r,u),kx(s,n,u),!0}return!1}function Gf(r,n,s,u){if(u={lane:2,revertLane:Tp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Dh(r)){if(n)throw Error(a(479))}else n=hf(r,s,u,2),n!==null&&qr(n,r,2)}function Dh(r){var n=r.alternate;return r===Vt||n!==null&&n===Vt}function vx(r,n){Ko=_h=!0;var s=r.pending;s===null?n.next=n:(n.next=s.next,s.next=n),r.pending=n}function kx(r,n,s){if((s&4194048)!==0){var u=n.lanes;u&=r.pendingLanes,s|=u,n.lanes=s,ol(r,s)}}var Fl={readContext:nr,use:Lh,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useLayoutEffect:Ae,useInsertionEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useSyncExternalStore:Ae,useId:Ae,useHostTransitionStatus:Ae,useFormState:Ae,useActionState:Ae,useOptimistic:Ae,useMemoCache:Ae,useCacheRefresh:Ae};Fl.useEffectEvent=Ae;var Sx={readContext:nr,use:Lh,useCallback:function(r,n){return Tr().memoizedState=[r,n===void 0?null:n],r},useContext:nr,useEffect:ox,useImperativeHandle:function(r,n,s){s=s!=null?s.concat([r]):null,Mh(4194308,4,hx.bind(null,n,r),s)},useLayoutEffect:function(r,n){return Mh(4194308,4,r,n)},useInsertionEffect:function(r,n){Mh(4,2,r,n)},useMemo:function(r,n){var s=Tr();n=n===void 0?null:n;var u=r();if(Xn){mi(!0);try{r()}finally{mi(!1)}}return s.memoizedState=[u,n],u},useReducer:function(r,n,s){var u=Tr();if(s!==void 0){var m=s(n);if(Xn){mi(!0);try{s(n)}finally{mi(!1)}}}else m=n;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=kE.bind(null,Vt,r),[u.memoizedState,r]},useRef:function(r){var n=Tr();return r={current:r},n.memoizedState=r},useState:function(r){r=If(r);var n=r.queue,s=Cx.bind(null,Vt,n);return n.dispatch=s,[r.memoizedState,s]},useDebugValue:Pf,useDeferredValue:function(r,n){var s=Tr();return Wf(s,r,n)},useTransition:function(){var r=If(!1);return r=gx.bind(null,Vt,r.queue,!0,!1),Tr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,n,s){var u=Vt,m=Tr();if(ae){if(s===void 0)throw Error(a(407));s=s()}else{if(s=n(),ve===null)throw Error(a(349));(re&127)!==0||W0(u,n,s)}m.memoizedState=s;var b={value:s,getSnapshot:n};return m.queue=b,ox(Y0.bind(null,u,b,r),[r]),u.flags|=2048,ts(9,{destroy:void 0},U0.bind(null,u,b,s,n),null),s},useId:function(){var r=Tr(),n=ve.identifierPrefix;if(ae){var s=ji,u=Ii;s=(u&~(1<<32-ir(u)-1)).toString(32)+s,n="_"+n+"R_"+s,s=Bh++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=gE++,n="_"+n+"r_"+s.toString(32)+"_";return r.memoizedState=n},useHostTransitionStatus:Yf,useFormState:ex,useActionState:ex,useOptimistic:function(r){var n=Tr();n.memoizedState=n.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=Gf.bind(null,Vt,!0,s),s.dispatch=n,[r,n]},useMemoCache:$f,useCacheRefresh:function(){return Tr().memoizedState=vE.bind(null,Vt)},useEffectEvent:function(r){var n=Tr(),s={impl:r};return n.memoizedState=s,function(){if((fe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},Vf={readContext:nr,use:Lh,useCallback:dx,useContext:nr,useEffect:Hf,useImperativeHandle:ux,useInsertionEffect:lx,useLayoutEffect:cx,useMemo:fx,useReducer:Ah,useRef:nx,useState:function(){return Ah(ga)},useDebugValue:Pf,useDeferredValue:function(r,n){var s=Oe();return px(s,ye.memoizedState,r,n)},useTransition:function(){var r=Ah(ga)[0],n=Oe().memoizedState;return[typeof r=="boolean"?r:Al(r),n]},useSyncExternalStore:P0,useId:xx,useHostTransitionStatus:Yf,useFormState:rx,useActionState:rx,useOptimistic:function(r,n){var s=Oe();return X0(s,ye,r,n)},useMemoCache:$f,useCacheRefresh:bx};Vf.useEffectEvent=sx;var wx={readContext:nr,use:Lh,useCallback:dx,useContext:nr,useEffect:Hf,useImperativeHandle:ux,useInsertionEffect:lx,useLayoutEffect:cx,useMemo:fx,useReducer:qf,useRef:nx,useState:function(){return qf(ga)},useDebugValue:Pf,useDeferredValue:function(r,n){var s=Oe();return ye===null?Wf(s,r,n):px(s,ye.memoizedState,r,n)},useTransition:function(){var r=qf(ga)[0],n=Oe().memoizedState;return[typeof r=="boolean"?r:Al(r),n]},useSyncExternalStore:P0,useId:xx,useHostTransitionStatus:Yf,useFormState:ax,useActionState:ax,useOptimistic:function(r,n){var s=Oe();return ye!==null?X0(s,ye,r,n):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:$f,useCacheRefresh:bx};wx.useEffectEvent=sx;function Xf(r,n,s,u){n=r.memoizedState,s=s(u,n),s=s==null?n:g({},n,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Qf={enqueueSetState:function(r,n,s){r=r._reactInternals;var u=ei(),m=Va(u);m.payload=n,s!=null&&(m.callback=s),n=Xa(r,m,u),n!==null&&(qr(n,r,u),_l(n,r,u))},enqueueReplaceState:function(r,n,s){r=r._reactInternals;var u=ei(),m=Va(u);m.tag=1,m.payload=n,s!=null&&(m.callback=s),n=Xa(r,m,u),n!==null&&(qr(n,r,u),_l(n,r,u))},enqueueForceUpdate:function(r,n){r=r._reactInternals;var s=ei(),u=Va(s);u.tag=2,n!=null&&(u.callback=n),n=Xa(r,u,s),n!==null&&(qr(n,r,s),_l(n,r,s))}};function Tx(r,n,s,u,m,b,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,b,T):n.prototype&&n.prototype.isPureReactComponent?!xl(s,u)||!xl(m,b):!0}function _x(r,n,s,u){r=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,u),n.state!==r&&Qf.enqueueReplaceState(n,n.state,null)}function Qn(r,n){var s=n;if("ref"in n){s={};for(var u in n)u!=="ref"&&(s[u]=n[u])}if(r=r.defaultProps){s===n&&(s=g({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function Bx(r){uh(r)}function Ex(r){console.error(r)}function Lx(r){uh(r)}function Rh(r,n){try{var s=r.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Ax(r,n,s){try{var u=r.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Zf(r,n,s){return s=Va(s),s.tag=3,s.payload={element:null},s.callback=function(){Rh(r,n)},s}function Mx(r){return r=Va(r),r.tag=3,r}function Fx(r,n,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var b=u.value;r.payload=function(){return m(b)},r.callback=function(){Ax(n,s,u)}}var T=s.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){Ax(n,s,u),typeof m!="function"&&(en===null?en=new Set([this]):en.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})})}function SE(r,n,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=s.alternate,n!==null&&Yo(n,s,m,!0),s=Zr.current,s!==null){switch(s.tag){case 31:case 13:return ui===null?Yh():s.alternate===null&&Me===0&&(Me=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===vh?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([u]):n.add(u),kp(r,u,m)),!1;case 22:return s.flags|=65536,u===vh?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([u]):s.add(u)),kp(r,u,m)),!1}throw Error(a(435,s.tag))}return kp(r,u,m),Yh(),!1}if(ae)return n=Zr.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=m,u!==mf&&(r=Error(a(422),{cause:u}),vl(si(r,s)))):(u!==mf&&(n=Error(a(423),{cause:u}),vl(si(n,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=si(u,s),m=Zf(r.stateNode,u,m),Bf(r,m),Me!==4&&(Me=2)),!1;var b=Error(a(520),{cause:u});if(b=si(b,s),Il===null?Il=[b]:Il.push(b),Me!==4&&(Me=2),n===null)return!0;u=si(u,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Zf(s.stateNode,u,r),Bf(s,r),!1;case 1:if(n=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(en===null||!en.has(b))))return s.flags|=65536,m&=-m,s.lanes|=m,m=Mx(m),Fx(m,r,s,u),Bf(s,m),!1}s=s.return}while(s!==null);return!1}var Kf=Error(a(461)),qe=!1;function or(r,n,s,u){n.child=r===null?z0(n,null,s,u):Vn(n,r.child,s,u)}function Dx(r,n,s,u,m){s=s.render;var b=n.ref;if("ref"in u){var T={};for(var M in u)M!=="ref"&&(T[M]=u[M])}else T=u;return Wn(n),u=Df(r,n,s,T,b,m),M=Rf(),r!==null&&!qe?(Of(r,n,m),ma(r,n,m)):(ae&&M&&pf(n),n.flags|=1,or(r,n,u,m),n.child)}function Rx(r,n,s,u,m){if(r===null){var b=s.type;return typeof b=="function"&&!uf(b)&&b.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=b,Ox(r,n,b,u,m)):(r=gh(s.type,null,u,n,n.mode,m),r.ref=n.ref,r.return=n,n.child=r)}if(b=r.child,!op(r,m)){var T=b.memoizedProps;if(s=s.compare,s=s!==null?s:xl,s(T,u)&&r.ref===n.ref)return ma(r,n,m)}return n.flags|=1,r=ha(b,u),r.ref=n.ref,r.return=n,n.child=r}function Ox(r,n,s,u,m){if(r!==null){var b=r.memoizedProps;if(xl(b,u)&&r.ref===n.ref)if(qe=!1,n.pendingProps=u=b,op(r,m))(r.flags&131072)!==0&&(qe=!0);else return n.lanes=r.lanes,ma(r,n,m)}return Jf(r,n,s,u,m)}function zx(r,n,s,u){var m=u.children,b=r!==null?r.memoizedState:null;if(r===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,r!==null){for(u=n.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~b}else u=0,n.child=null;return $x(r,n,b,s,u)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},r!==null&&bh(n,b!==null?b.cachePool:null),b!==null?q0(n,b):Lf(),I0(n);else return u=n.lanes=536870912,$x(r,n,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(bh(n,b.cachePool),q0(n,b),Za(),n.memoizedState=null):(r!==null&&bh(n,null),Lf(),Za());return or(r,n,m,s),n.child}function Dl(r,n){return r!==null&&r.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function $x(r,n,s,u,m){var b=Sf();return b=b===null?null:{parent:$e._currentValue,pool:b},n.memoizedState={baseLanes:s,cachePool:b},r!==null&&bh(n,null),Lf(),I0(n),r!==null&&Yo(r,n,u,!0),n.childLanes=m,null}function Oh(r,n){return n=$h({mode:n.mode,children:n.children},r.mode),n.ref=r.ref,r.child=n,n.return=r,n}function Nx(r,n,s){return Vn(n,r.child,null,s),r=Oh(n,n.pendingProps),r.flags|=2,Kr(n),n.memoizedState=null,r}function wE(r,n,s){var u=n.pendingProps,m=(n.flags&128)!==0;if(n.flags&=-129,r===null){if(ae){if(u.mode==="hidden")return r=Oh(n,u),n.lanes=536870912,Dl(null,r);if(Mf(n),(r=ke)?(r=Qb(r,hi),r=r!==null&&r.data==="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Pa!==null?{id:Ii,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},s=v0(r),s.return=n,n.child=s,ar=n,ke=null)):r=null,r===null)throw Ua(n);return n.lanes=536870912,null}return Oh(n,u)}var b=r.memoizedState;if(b!==null){var T=b.dehydrated;if(Mf(n),m)if(n.flags&256)n.flags&=-257,n=Nx(r,n,s);else if(n.memoizedState!==null)n.child=r.child,n.flags|=128,n=null;else throw Error(a(558));else if(qe||Yo(r,n,s,!1),m=(s&r.childLanes)!==0,qe||m){if(u=ve,u!==null&&(T=Ao(u,s),T!==0&&T!==b.retryLane))throw b.retryLane=T,In(r,T),qr(u,r,T),Kf;Yh(),n=Nx(r,n,s)}else r=b.treeContext,ke=di(T.nextSibling),ar=n,ae=!0,Wa=null,hi=!1,r!==null&&w0(n,r),n=Oh(n,u),n.flags|=4096;return n}return r=ha(r.child,{mode:u.mode,children:u.children}),r.ref=n.ref,n.child=r,r.return=n,r}function zh(r,n){var s=n.ref;if(s===null)r!==null&&r.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(n.flags|=4194816)}}function Jf(r,n,s,u,m){return Wn(n),s=Df(r,n,s,u,void 0,m),u=Rf(),r!==null&&!qe?(Of(r,n,m),ma(r,n,m)):(ae&&u&&pf(n),n.flags|=1,or(r,n,s,m),n.child)}function qx(r,n,s,u,m,b){return Wn(n),n.updateQueue=null,s=H0(n,u,s,m),j0(r),u=Rf(),r!==null&&!qe?(Of(r,n,b),ma(r,n,b)):(ae&&u&&pf(n),n.flags|=1,or(r,n,s,b),n.child)}function Ix(r,n,s,u,m){if(Wn(n),n.stateNode===null){var b=Ho,T=s.contextType;typeof T=="object"&&T!==null&&(b=nr(T)),b=new s(u,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Qf,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=u,b.state=n.memoizedState,b.refs={},Tf(n),T=s.contextType,b.context=typeof T=="object"&&T!==null?nr(T):Ho,b.state=n.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(Xf(n,s,T,u),b.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(T=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),T!==b.state&&Qf.enqueueReplaceState(b,b.state,null),El(n,u,b,m),Bl(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(r===null){b=n.stateNode;var M=n.memoizedProps,j=Qn(s,M);b.props=j;var et=b.context,ht=s.contextType;T=Ho,typeof ht=="object"&&ht!==null&&(T=nr(ht));var pt=s.getDerivedStateFromProps;ht=typeof pt=="function"||typeof b.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,ht||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(M||et!==T)&&_x(n,b,u,T),Ga=!1;var it=n.memoizedState;b.state=it,El(n,u,b,m),Bl(),et=n.memoizedState,M||it!==et||Ga?(typeof pt=="function"&&(Xf(n,s,pt,u),et=n.memoizedState),(j=Ga||Tx(n,s,j,u,it,et,T))?(ht||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(n.flags|=4194308)):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=et),b.props=u,b.state=et,b.context=T,u=j):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{b=n.stateNode,_f(r,n),T=n.memoizedProps,ht=Qn(s,T),b.props=ht,pt=n.pendingProps,it=b.context,et=s.contextType,j=Ho,typeof et=="object"&&et!==null&&(j=nr(et)),M=s.getDerivedStateFromProps,(et=typeof M=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T!==pt||it!==j)&&_x(n,b,u,j),Ga=!1,it=n.memoizedState,b.state=it,El(n,u,b,m),Bl();var st=n.memoizedState;T!==pt||it!==st||Ga||r!==null&&r.dependencies!==null&&yh(r.dependencies)?(typeof M=="function"&&(Xf(n,s,M,u),st=n.memoizedState),(ht=Ga||Tx(n,s,ht,u,it,st,j)||r!==null&&r.dependencies!==null&&yh(r.dependencies))?(et||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,st,j),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,st,j)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||T===r.memoizedProps&&it===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&it===r.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=st),b.props=u,b.state=st,b.context=j,u=ht):(typeof b.componentDidUpdate!="function"||T===r.memoizedProps&&it===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&it===r.memoizedState||(n.flags|=1024),u=!1)}return b=u,zh(r,n),u=(n.flags&128)!==0,b||u?(b=n.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,r!==null&&u?(n.child=Vn(n,r.child,null,m),n.child=Vn(n,null,s,m)):or(r,n,s,m),n.memoizedState=b.state,r=n.child):r=ma(r,n,m),r}function jx(r,n,s,u){return Hn(),n.flags|=256,or(r,n,s,u),n.child}var tp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ep(r){return{baseLanes:r,cachePool:A0()}}function rp(r,n,s){return r=r!==null?r.childLanes&~s:0,n&&(r|=ti),r}function Hx(r,n,s){var u=n.pendingProps,m=!1,b=(n.flags&128)!==0,T;if((T=b)||(T=r!==null&&r.memoizedState===null?!1:(Re.current&2)!==0),T&&(m=!0,n.flags&=-129),T=(n.flags&32)!==0,n.flags&=-33,r===null){if(ae){if(m?Qa(n):Za(),(r=ke)?(r=Qb(r,hi),r=r!==null&&r.data!=="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Pa!==null?{id:Ii,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},s=v0(r),s.return=n,n.child=s,ar=n,ke=null)):r=null,r===null)throw Ua(n);return Np(r)?n.lanes=32:n.lanes=536870912,null}var M=u.children;return u=u.fallback,m?(Za(),m=n.mode,M=$h({mode:"hidden",children:M},m),u=jn(u,m,s,null),M.return=n,u.return=n,M.sibling=u,n.child=M,u=n.child,u.memoizedState=ep(s),u.childLanes=rp(r,T,s),n.memoizedState=tp,Dl(null,u)):(Qa(n),ip(n,M))}var j=r.memoizedState;if(j!==null&&(M=j.dehydrated,M!==null)){if(b)n.flags&256?(Qa(n),n.flags&=-257,n=ap(r,n,s)):n.memoizedState!==null?(Za(),n.child=r.child,n.flags|=128,n=null):(Za(),M=u.fallback,m=n.mode,u=$h({mode:"visible",children:u.children},m),M=jn(M,m,s,null),M.flags|=2,u.return=n,M.return=n,u.sibling=M,n.child=u,Vn(n,r.child,null,s),u=n.child,u.memoizedState=ep(s),u.childLanes=rp(r,T,s),n.memoizedState=tp,n=Dl(null,u));else if(Qa(n),Np(M)){if(T=M.nextSibling&&M.nextSibling.dataset,T)var et=T.dgst;T=et,u=Error(a(419)),u.stack="",u.digest=T,vl({value:u,source:null,stack:null}),n=ap(r,n,s)}else if(qe||Yo(r,n,s,!1),T=(s&r.childLanes)!==0,qe||T){if(T=ve,T!==null&&(u=Ao(T,s),u!==0&&u!==j.retryLane))throw j.retryLane=u,In(r,u),qr(T,r,u),Kf;$p(M)||Yh(),n=ap(r,n,s)}else $p(M)?(n.flags|=192,n.child=r.child,n=null):(r=j.treeContext,ke=di(M.nextSibling),ar=n,ae=!0,Wa=null,hi=!1,r!==null&&w0(n,r),n=ip(n,u.children),n.flags|=4096);return n}return m?(Za(),M=u.fallback,m=n.mode,j=r.child,et=j.sibling,u=ha(j,{mode:"hidden",children:u.children}),u.subtreeFlags=j.subtreeFlags&65011712,et!==null?M=ha(et,M):(M=jn(M,m,s,null),M.flags|=2),M.return=n,u.return=n,u.sibling=M,n.child=u,Dl(null,u),u=n.child,M=r.child.memoizedState,M===null?M=ep(s):(m=M.cachePool,m!==null?(j=$e._currentValue,m=m.parent!==j?{parent:j,pool:j}:m):m=A0(),M={baseLanes:M.baseLanes|s,cachePool:m}),u.memoizedState=M,u.childLanes=rp(r,T,s),n.memoizedState=tp,Dl(r.child,u)):(Qa(n),s=r.child,r=s.sibling,s=ha(s,{mode:"visible",children:u.children}),s.return=n,s.sibling=null,r!==null&&(T=n.deletions,T===null?(n.deletions=[r],n.flags|=16):T.push(r)),n.child=s,n.memoizedState=null,s)}function ip(r,n){return n=$h({mode:"visible",children:n},r.mode),n.return=r,r.child=n}function $h(r,n){return r=Qr(22,r,null,n),r.lanes=0,r}function ap(r,n,s){return Vn(n,r.child,null,s),r=ip(n,n.pendingProps.children),r.flags|=2,n.memoizedState=null,r}function Px(r,n,s){r.lanes|=n;var u=r.alternate;u!==null&&(u.lanes|=n),bf(r.return,n,s)}function np(r,n,s,u,m,b){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:b}:(T.isBackwards=n,T.rendering=null,T.renderingStartTime=0,T.last=u,T.tail=s,T.tailMode=m,T.treeForkCount=b)}function Wx(r,n,s){var u=n.pendingProps,m=u.revealOrder,b=u.tail;u=u.children;var T=Re.current,M=(T&2)!==0;if(M?(T=T&1|2,n.flags|=128):T&=1,ct(Re,T),or(r,n,u,s),u=ae?Cl:0,!M&&r!==null&&(r.flags&128)!==0)t:for(r=n.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Px(r,s,n);else if(r.tag===19)Px(r,s,n);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break t;for(;r.sibling===null;){if(r.return===null||r.return===n)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=n.child,m=null;s!==null;)r=s.alternate,r!==null&&Th(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=n.child,n.child=null):(m=s.sibling,s.sibling=null),np(n,!1,m,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=n.child,n.child=null;m!==null;){if(r=m.alternate,r!==null&&Th(r)===null){n.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}np(n,!0,s,null,b,u);break;case"together":np(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function ma(r,n,s){if(r!==null&&(n.dependencies=r.dependencies),tn|=n.lanes,(s&n.childLanes)===0)if(r!==null){if(Yo(r,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(r!==null&&n.child!==r.child)throw Error(a(153));if(n.child!==null){for(r=n.child,s=ha(r,r.pendingProps),n.child=s,s.return=n;r.sibling!==null;)r=r.sibling,s=s.sibling=ha(r,r.pendingProps),s.return=n;s.sibling=null}return n.child}function op(r,n){return(r.lanes&n)!==0?!0:(r=r.dependencies,!!(r!==null&&yh(r)))}function TE(r,n,s){switch(n.tag){case 3:jt(n,n.stateNode.containerInfo),Ya(n,$e,r.memoizedState.cache),Hn();break;case 27:case 5:Ct(n);break;case 4:jt(n,n.stateNode.containerInfo);break;case 10:Ya(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Mf(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Qa(n),n.flags|=128,null):(s&n.child.childLanes)!==0?Hx(r,n,s):(Qa(n),r=ma(r,n,s),r!==null?r.sibling:null);Qa(n);break;case 19:var m=(r.flags&128)!==0;if(u=(s&n.childLanes)!==0,u||(Yo(r,n,s,!1),u=(s&n.childLanes)!==0),m){if(u)return Wx(r,n,s);n.flags|=128}if(m=n.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ct(Re,Re.current),u)break;return null;case 22:return n.lanes=0,zx(r,n,s,n.pendingProps);case 24:Ya(n,$e,r.memoizedState.cache)}return ma(r,n,s)}function Ux(r,n,s){if(r!==null)if(r.memoizedProps!==n.pendingProps)qe=!0;else{if(!op(r,s)&&(n.flags&128)===0)return qe=!1,TE(r,n,s);qe=(r.flags&131072)!==0}else qe=!1,ae&&(n.flags&1048576)!==0&&S0(n,Cl,n.index);switch(n.lanes=0,n.tag){case 16:t:{var u=n.pendingProps;if(r=Yn(n.elementType),n.type=r,typeof r=="function")uf(r)?(u=Qn(r,u),n.tag=1,n=Ix(null,n,r,u,s)):(n.tag=0,n=Jf(null,n,r,u,s));else{if(r!=null){var m=r.$$typeof;if(m===F){n.tag=11,n=Dx(null,n,r,u,s);break t}else if(m===N){n.tag=14,n=Rx(null,n,r,u,s);break t}}throw n=q(r)||r,Error(a(306,n,""))}}return n;case 0:return Jf(r,n,n.type,n.pendingProps,s);case 1:return u=n.type,m=Qn(u,n.pendingProps),Ix(r,n,u,m,s);case 3:t:{if(jt(n,n.stateNode.containerInfo),r===null)throw Error(a(387));u=n.pendingProps;var b=n.memoizedState;m=b.element,_f(r,n),El(n,u,null,s);var T=n.memoizedState;if(u=T.cache,Ya(n,$e,u),u!==b.cache&&Cf(n,[$e],s,!0),Bl(),u=T.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:T.cache},n.updateQueue.baseState=b,n.memoizedState=b,n.flags&256){n=jx(r,n,u,s);break t}else if(u!==m){m=si(Error(a(424)),n),vl(m),n=jx(r,n,u,s);break t}else{switch(r=n.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(ke=di(r.firstChild),ar=n,ae=!0,Wa=null,hi=!0,s=z0(n,null,u,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Hn(),u===m){n=ma(r,n,s);break t}or(r,n,u,s)}n=n.child}return n;case 26:return zh(r,n),r===null?(s=rC(n.type,null,n.pendingProps,null))?n.memoizedState=s:ae||(s=n.type,r=n.pendingProps,u=Jh(vt.current).createElement(s),u[Ue]=n,u[Kt]=r,sr(u,s,r),De(u),n.stateNode=u):n.memoizedState=rC(n.type,r.memoizedProps,n.pendingProps,r.memoizedState),null;case 27:return Ct(n),r===null&&ae&&(u=n.stateNode=Jb(n.type,n.pendingProps,vt.current),ar=n,hi=!0,m=ke,on(n.type)?(qp=m,ke=di(u.firstChild)):ke=m),or(r,n,n.pendingProps.children,s),zh(r,n),r===null&&(n.flags|=4194304),n.child;case 5:return r===null&&ae&&((m=u=ke)&&(u=eL(u,n.type,n.pendingProps,hi),u!==null?(n.stateNode=u,ar=n,ke=di(u.firstChild),hi=!1,m=!0):m=!1),m||Ua(n)),Ct(n),m=n.type,b=n.pendingProps,T=r!==null?r.memoizedProps:null,u=b.children,Rp(m,b)?u=null:T!==null&&Rp(m,T)&&(n.flags|=32),n.memoizedState!==null&&(m=Df(r,n,mE,null,null,s),Vl._currentValue=m),zh(r,n),or(r,n,u,s),n.child;case 6:return r===null&&ae&&((r=s=ke)&&(s=rL(s,n.pendingProps,hi),s!==null?(n.stateNode=s,ar=n,ke=null,r=!0):r=!1),r||Ua(n)),null;case 13:return Hx(r,n,s);case 4:return jt(n,n.stateNode.containerInfo),u=n.pendingProps,r===null?n.child=Vn(n,null,u,s):or(r,n,u,s),n.child;case 11:return Dx(r,n,n.type,n.pendingProps,s);case 7:return or(r,n,n.pendingProps,s),n.child;case 8:return or(r,n,n.pendingProps.children,s),n.child;case 12:return or(r,n,n.pendingProps.children,s),n.child;case 10:return u=n.pendingProps,Ya(n,n.type,u.value),or(r,n,u.children,s),n.child;case 9:return m=n.type._context,u=n.pendingProps.children,Wn(n),m=nr(m),u=u(m),n.flags|=1,or(r,n,u,s),n.child;case 14:return Rx(r,n,n.type,n.pendingProps,s);case 15:return Ox(r,n,n.type,n.pendingProps,s);case 19:return Wx(r,n,s);case 31:return wE(r,n,s);case 22:return zx(r,n,s,n.pendingProps);case 24:return Wn(n),u=nr($e),r===null?(m=Sf(),m===null&&(m=ve,b=vf(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=s),m=b),n.memoizedState={parent:u,cache:m},Tf(n),Ya(n,$e,m)):((r.lanes&s)!==0&&(_f(r,n),El(n,null,null,s),Bl()),m=r.memoizedState,b=n.memoizedState,m.parent!==u?(m={parent:u,cache:u},n.memoizedState=m,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=m),Ya(n,$e,u)):(u=b.cache,Ya(n,$e,u),u!==m.cache&&Cf(n,[$e],s,!0))),or(r,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ya(r){r.flags|=4}function sp(r,n,s,u,m){if((n=(r.mode&32)!==0)&&(n=!1),n){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(xb())r.flags|=8192;else throw Gn=vh,wf}else r.flags&=-16777217}function Yx(r,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!sC(n))if(xb())r.flags|=8192;else throw Gn=vh,wf}function Nh(r,n){n!==null&&(r.flags|=4),r.flags&16384&&(n=r.tag!==22?Yr():536870912,r.lanes|=n,as|=n)}function Rl(r,n){if(!ae)switch(r.tailMode){case"hidden":n=r.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?n||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Se(r){var n=r.alternate!==null&&r.alternate.child===r.child,s=0,u=0;if(n)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=s,n}function _E(r,n,s){var u=n.pendingProps;switch(gf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(n),null;case 1:return Se(n),null;case 3:return s=n.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),fa($e),Nt(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Uo(n)?ya(n):r===null||r.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,yf())),Se(n),null;case 26:var m=n.type,b=n.memoizedState;return r===null?(ya(n),b!==null?(Se(n),Yx(n,b)):(Se(n),sp(n,m,null,u,s))):b?b!==r.memoizedState?(ya(n),Se(n),Yx(n,b)):(Se(n),n.flags&=-16777217):(r=r.memoizedProps,r!==u&&ya(n),Se(n),sp(n,m,r,u,s)),null;case 27:if(dt(n),s=vt.current,m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&ya(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Se(n),null}r=ut.current,Uo(n)?T0(n):(r=Jb(m,u,s),n.stateNode=r,ya(n))}return Se(n),null;case 5:if(dt(n),m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&ya(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Se(n),null}if(b=ut.current,Uo(n))T0(n);else{var T=Jh(vt.current);switch(b){case 1:b=T.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:b=T.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":b=T.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":b=T.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":b=T.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?T.createElement("select",{is:u.is}):T.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?T.createElement(m,{is:u.is}):T.createElement(m)}}b[Ue]=n,b[Kt]=u;t:for(T=n.child;T!==null;){if(T.tag===5||T.tag===6)b.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===n)break t;for(;T.sibling===null;){if(T.return===null||T.return===n)break t;T=T.return}T.sibling.return=T.return,T=T.sibling}n.stateNode=b;t:switch(sr(b,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&ya(n)}}return Se(n),sp(n,n.type,r===null?null:r.memoizedProps,n.pendingProps,s),null;case 6:if(r&&n.stateNode!=null)r.memoizedProps!==u&&ya(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(r=vt.current,Uo(n)){if(r=n.stateNode,s=n.memoizedProps,u=null,m=ar,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[Ue]=n,r=!!(r.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||Hb(r.nodeValue,s)),r||Ua(n,!0)}else r=Jh(r).createTextNode(u),r[Ue]=n,n.stateNode=r}return Se(n),null;case 31:if(s=n.memoizedState,r===null||r.memoizedState!==null){if(u=Uo(n),s!==null){if(r===null){if(!u)throw Error(a(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Ue]=n}else Hn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Se(n),r=!1}else s=yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return n.flags&256?(Kr(n),n):(Kr(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Se(n),null;case 13:if(u=n.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Uo(n),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Ue]=n}else Hn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Se(n),m=!1}else m=yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return n.flags&256?(Kr(n),n):(Kr(n),null)}return Kr(n),(n.flags&128)!==0?(n.lanes=s,n):(s=u!==null,r=r!==null&&r.memoizedState!==null,s&&(u=n.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==m&&(u.flags|=2048)),s!==r&&s&&(n.child.flags|=8192),Nh(n,n.updateQueue),Se(n),null);case 4:return Nt(),r===null&&Lp(n.stateNode.containerInfo),Se(n),null;case 10:return fa(n.type),Se(n),null;case 19:if(G(Re),u=n.memoizedState,u===null)return Se(n),null;if(m=(n.flags&128)!==0,b=u.rendering,b===null)if(m)Rl(u,!1);else{if(Me!==0||r!==null&&(r.flags&128)!==0)for(r=n.child;r!==null;){if(b=Th(r),b!==null){for(n.flags|=128,Rl(u,!1),r=b.updateQueue,n.updateQueue=r,Nh(n,r),n.subtreeFlags=0,r=s,s=n.child;s!==null;)C0(s,r),s=s.sibling;return ct(Re,Re.current&1|2),ae&&ua(n,u.treeForkCount),n.child}r=r.sibling}u.tail!==null&&We()>Ph&&(n.flags|=128,m=!0,Rl(u,!1),n.lanes=4194304)}else{if(!m)if(r=Th(b),r!==null){if(n.flags|=128,m=!0,r=r.updateQueue,n.updateQueue=r,Nh(n,r),Rl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!ae)return Se(n),null}else 2*We()-u.renderingStartTime>Ph&&s!==536870912&&(n.flags|=128,m=!0,Rl(u,!1),n.lanes=4194304);u.isBackwards?(b.sibling=n.child,n.child=b):(r=u.last,r!==null?r.sibling=b:n.child=b,u.last=b)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=We(),r.sibling=null,s=Re.current,ct(Re,m?s&1|2:s&1),ae&&ua(n,u.treeForkCount),r):(Se(n),null);case 22:case 23:return Kr(n),Af(),u=n.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(s&536870912)!==0&&(n.flags&128)===0&&(Se(n),n.subtreeFlags&6&&(n.flags|=8192)):Se(n),s=n.updateQueue,s!==null&&Nh(n,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048),r!==null&&G(Un),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),fa($e),Se(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function BE(r,n){switch(gf(n),n.tag){case 1:return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 3:return fa($e),Nt(),r=n.flags,(r&65536)!==0&&(r&128)===0?(n.flags=r&-65537|128,n):null;case 26:case 27:case 5:return dt(n),null;case 31:if(n.memoizedState!==null){if(Kr(n),n.alternate===null)throw Error(a(340));Hn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 13:if(Kr(n),r=n.memoizedState,r!==null&&r.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Hn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 19:return G(Re),null;case 4:return Nt(),null;case 10:return fa(n.type),null;case 22:case 23:return Kr(n),Af(),r!==null&&G(Un),r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 24:return fa($e),null;case 25:return null;default:return null}}function Gx(r,n){switch(gf(n),n.tag){case 3:fa($e),Nt();break;case 26:case 27:case 5:dt(n);break;case 4:Nt();break;case 31:n.memoizedState!==null&&Kr(n);break;case 13:Kr(n);break;case 19:G(Re);break;case 10:fa(n.type);break;case 22:case 23:Kr(n),Af(),r!==null&&G(Un);break;case 24:fa($e)}}function Ol(r,n){try{var s=n.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&r)===r){u=void 0;var b=s.create,T=s.inst;u=b(),T.destroy=u}s=s.next}while(s!==m)}}catch(M){me(n,n.return,M)}}function Ka(r,n,s){try{var u=n.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var b=m.next;u=b;do{if((u.tag&r)===r){var T=u.inst,M=T.destroy;if(M!==void 0){T.destroy=void 0,m=n;var j=s,et=M;try{et()}catch(ht){me(m,j,ht)}}}u=u.next}while(u!==b)}}catch(ht){me(n,n.return,ht)}}function Vx(r){var n=r.updateQueue;if(n!==null){var s=r.stateNode;try{N0(n,s)}catch(u){me(r,r.return,u)}}}function Xx(r,n,s){s.props=Qn(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(u){me(r,n,u)}}function zl(r,n){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof s=="function"?r.refCleanup=s(u):s.current=u}}catch(m){me(r,n,m)}}function Hi(r,n){var s=r.ref,u=r.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){me(r,n,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){me(r,n,m)}else s.current=null}function Qx(r){var n=r.type,s=r.memoizedProps,u=r.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break t;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){me(r,r.return,m)}}function lp(r,n,s){try{var u=r.stateNode;XE(u,r.type,s,n),u[Kt]=n}catch(m){me(r,r.return,m)}}function Zx(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&on(r.type)||r.tag===4}function cp(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||Zx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&on(r.type)||r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function hp(r,n,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(r),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Vr));else if(u!==4&&(u===27&&on(r.type)&&(s=r.stateNode,n=null),r=r.child,r!==null))for(hp(r,n,s),r=r.sibling;r!==null;)hp(r,n,s),r=r.sibling}function qh(r,n,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?s.insertBefore(r,n):s.appendChild(r);else if(u!==4&&(u===27&&on(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(qh(r,n,s),r=r.sibling;r!==null;)qh(r,n,s),r=r.sibling}function Kx(r){var n=r.stateNode,s=r.memoizedProps;try{for(var u=r.type,m=n.attributes;m.length;)n.removeAttributeNode(m[0]);sr(n,u,s),n[Ue]=r,n[Kt]=s}catch(b){me(r,r.return,b)}}var xa=!1,Ie=!1,up=!1,Jx=typeof WeakSet=="function"?WeakSet:Set,tr=null;function EE(r,n){if(r=r.containerInfo,Fp=ou,r=u0(r),af(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else t:{s=(s=r.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break t}var T=0,M=-1,j=-1,et=0,ht=0,pt=r,it=null;e:for(;;){for(var st;pt!==s||m!==0&&pt.nodeType!==3||(M=T+m),pt!==b||u!==0&&pt.nodeType!==3||(j=T+u),pt.nodeType===3&&(T+=pt.nodeValue.length),(st=pt.firstChild)!==null;)it=pt,pt=st;for(;;){if(pt===r)break e;if(it===s&&++et===m&&(M=T),it===b&&++ht===u&&(j=T),(st=pt.nextSibling)!==null)break;pt=it,it=pt.parentNode}pt=st}s=M===-1||j===-1?null:{start:M,end:j}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:r,selectionRange:s},ou=!1,tr=n;tr!==null;)if(n=tr,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,tr=r;else for(;tr!==null;){switch(n=tr,b=n.alternate,r=n.flags,n.tag){case 0:if((r&4)!==0&&(r=n.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,s=n,m=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var At=Qn(s.type,m);r=u.getSnapshotBeforeUpdate(At,b),u.__reactInternalSnapshotBeforeUpdate=r}catch(It){me(s,s.return,It)}}break;case 3:if((r&1024)!==0){if(r=n.stateNode.containerInfo,s=r.nodeType,s===9)zp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":zp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=n.sibling,r!==null){r.return=n.return,tr=r;break}tr=n.return}}function tb(r,n,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Ca(r,s),u&4&&Ol(5,s);break;case 1:if(Ca(r,s),u&4)if(r=s.stateNode,n===null)try{r.componentDidMount()}catch(T){me(s,s.return,T)}else{var m=Qn(s.type,n.memoizedProps);n=n.memoizedState;try{r.componentDidUpdate(m,n,r.__reactInternalSnapshotBeforeUpdate)}catch(T){me(s,s.return,T)}}u&64&&Vx(s),u&512&&zl(s,s.return);break;case 3:if(Ca(r,s),u&64&&(r=s.updateQueue,r!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{N0(r,n)}catch(T){me(s,s.return,T)}}break;case 27:n===null&&u&4&&Kx(s);case 26:case 5:Ca(r,s),n===null&&u&4&&Qx(s),u&512&&zl(s,s.return);break;case 12:Ca(r,s);break;case 31:Ca(r,s),u&4&&ib(r,s);break;case 13:Ca(r,s),u&4&&ab(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=$E.bind(null,s),iL(r,s))));break;case 22:if(u=s.memoizedState!==null||xa,!u){n=n!==null&&n.memoizedState!==null||Ie,m=xa;var b=Ie;xa=u,(Ie=n)&&!b?va(r,s,(s.subtreeFlags&8772)!==0):Ca(r,s),xa=m,Ie=b}break;case 30:break;default:Ca(r,s)}}function eb(r){var n=r.alternate;n!==null&&(r.alternate=null,eb(n)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(n=r.stateNode,n!==null&&hl(n)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var we=null,Or=!1;function ba(r,n,s){for(s=s.child;s!==null;)rb(r,n,s),s=s.sibling}function rb(r,n,s){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(Oa,s)}catch{}switch(s.tag){case 26:Ie||Hi(s,n),ba(r,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ie||Hi(s,n);var u=we,m=Or;on(s.type)&&(we=s.stateNode,Or=!1),ba(r,n,s),Ul(s.stateNode),we=u,Or=m;break;case 5:Ie||Hi(s,n);case 6:if(u=we,m=Or,we=null,ba(r,n,s),we=u,Or=m,we!==null)if(Or)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(s.stateNode)}catch(b){me(s,n,b)}else try{we.removeChild(s.stateNode)}catch(b){me(s,n,b)}break;case 18:we!==null&&(Or?(r=we,Vb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),ds(r)):Vb(we,s.stateNode));break;case 4:u=we,m=Or,we=s.stateNode.containerInfo,Or=!0,ba(r,n,s),we=u,Or=m;break;case 0:case 11:case 14:case 15:Ka(2,s,n),Ie||Ka(4,s,n),ba(r,n,s);break;case 1:Ie||(Hi(s,n),u=s.stateNode,typeof u.componentWillUnmount=="function"&&Xx(s,n,u)),ba(r,n,s);break;case 21:ba(r,n,s);break;case 22:Ie=(u=Ie)||s.memoizedState!==null,ba(r,n,s),Ie=u;break;default:ba(r,n,s)}}function ib(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ds(r)}catch(s){me(n,n.return,s)}}}function ab(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ds(r)}catch(s){me(n,n.return,s)}}function LE(r){switch(r.tag){case 31:case 13:case 19:var n=r.stateNode;return n===null&&(n=r.stateNode=new Jx),n;case 22:return r=r.stateNode,n=r._retryCache,n===null&&(n=r._retryCache=new Jx),n;default:throw Error(a(435,r.tag))}}function Ih(r,n){var s=LE(r);n.forEach(function(u){if(!s.has(u)){s.add(u);var m=NE.bind(null,r,u);u.then(m,m)}})}function zr(r,n){var s=n.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u],b=r,T=n,M=T;t:for(;M!==null;){switch(M.tag){case 27:if(on(M.type)){we=M.stateNode,Or=!1;break t}break;case 5:we=M.stateNode,Or=!1;break t;case 3:case 4:we=M.stateNode.containerInfo,Or=!0;break t}M=M.return}if(we===null)throw Error(a(160));rb(b,T,m),we=null,Or=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)nb(n,r),n=n.sibling}var Ci=null;function nb(r,n){var s=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:zr(n,r),$r(r),u&4&&(Ka(3,r,r.return),Ol(3,r),Ka(5,r,r.return));break;case 1:zr(n,r),$r(r),u&512&&(Ie||s===null||Hi(s,s.return)),u&64&&xa&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var m=Ci;if(zr(n,r),$r(r),u&512&&(Ie||s===null||Hi(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=r.memoizedState,s===null)if(u===null)if(r.stateNode===null){t:{u=r.type,s=r.memoizedProps,m=m.ownerDocument||m;e:switch(u){case"title":b=m.getElementsByTagName("title")[0],(!b||b[qa]||b[Ue]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=m.createElement(u),m.head.insertBefore(b,m.querySelector("head > title"))),sr(b,u,s),b[Ue]=r,De(b),u=b;break t;case"link":var T=nC("link","href",m).get(u+(s.href||""));if(T){for(var M=0;M<T.length;M++)if(b=T[M],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){T.splice(M,1);break e}}b=m.createElement(u),sr(b,u,s),m.head.appendChild(b);break;case"meta":if(T=nC("meta","content",m).get(u+(s.content||""))){for(M=0;M<T.length;M++)if(b=T[M],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){T.splice(M,1);break e}}b=m.createElement(u),sr(b,u,s),m.head.appendChild(b);break;default:throw Error(a(468,u))}b[Ue]=r,De(b),u=b}r.stateNode=u}else oC(m,r.type,r.stateNode);else r.stateNode=aC(m,u,r.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?oC(m,r.type,r.stateNode):aC(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&lp(r,r.memoizedProps,s.memoizedProps)}break;case 27:zr(n,r),$r(r),u&512&&(Ie||s===null||Hi(s,s.return)),s!==null&&u&4&&lp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(zr(n,r),$r(r),u&512&&(Ie||s===null||Hi(s,s.return)),r.flags&32){m=r.stateNode;try{xt(m,"")}catch(At){me(r,r.return,At)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,lp(r,m,s!==null?s.memoizedProps:m)),u&1024&&(up=!0);break;case 6:if(zr(n,r),$r(r),u&4){if(r.stateNode===null)throw Error(a(162));u=r.memoizedProps,s=r.stateNode;try{s.nodeValue=u}catch(At){me(r,r.return,At)}}break;case 3:if(ru=null,m=Ci,Ci=tu(n.containerInfo),zr(n,r),Ci=m,$r(r),u&4&&s!==null&&s.memoizedState.isDehydrated)try{ds(n.containerInfo)}catch(At){me(r,r.return,At)}up&&(up=!1,ob(r));break;case 4:u=Ci,Ci=tu(r.stateNode.containerInfo),zr(n,r),$r(r),Ci=u;break;case 12:zr(n,r),$r(r);break;case 31:zr(n,r),$r(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Ih(r,u)));break;case 13:zr(n,r),$r(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Hh=We()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Ih(r,u)));break;case 22:m=r.memoizedState!==null;var j=s!==null&&s.memoizedState!==null,et=xa,ht=Ie;if(xa=et||m,Ie=ht||j,zr(n,r),Ie=ht,xa=et,$r(r),u&8192)t:for(n=r.stateNode,n._visibility=m?n._visibility&-2:n._visibility|1,m&&(s===null||j||xa||Ie||Zn(r)),s=null,n=r;;){if(n.tag===5||n.tag===26){if(s===null){j=s=n;try{if(b=j.stateNode,m)T=b.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{M=j.stateNode;var pt=j.memoizedProps.style,it=pt!=null&&pt.hasOwnProperty("display")?pt.display:null;M.style.display=it==null||typeof it=="boolean"?"":(""+it).trim()}}catch(At){me(j,j.return,At)}}}else if(n.tag===6){if(s===null){j=n;try{j.stateNode.nodeValue=m?"":j.memoizedProps}catch(At){me(j,j.return,At)}}}else if(n.tag===18){if(s===null){j=n;try{var st=j.stateNode;m?Xb(st,!0):Xb(j.stateNode,!1)}catch(At){me(j,j.return,At)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===r)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break t;for(;n.sibling===null;){if(n.return===null||n.return===r)break t;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=r.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,Ih(r,s))));break;case 19:zr(n,r),$r(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Ih(r,u)));break;case 30:break;case 21:break;default:zr(n,r),$r(r)}}function $r(r){var n=r.flags;if(n&2){try{for(var s,u=r.return;u!==null;){if(Zx(u)){s=u;break}u=u.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,b=cp(r);qh(r,b,m);break;case 5:var T=s.stateNode;s.flags&32&&(xt(T,""),s.flags&=-33);var M=cp(r);qh(r,M,T);break;case 3:case 4:var j=s.stateNode.containerInfo,et=cp(r);hp(r,et,j);break;default:throw Error(a(161))}}catch(ht){me(r,r.return,ht)}r.flags&=-3}n&4096&&(r.flags&=-4097)}function ob(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var n=r;ob(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),r=r.sibling}}function Ca(r,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)tb(r,n.alternate,n),n=n.sibling}function Zn(r){for(r=r.child;r!==null;){var n=r;switch(n.tag){case 0:case 11:case 14:case 15:Ka(4,n,n.return),Zn(n);break;case 1:Hi(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&Xx(n,n.return,s),Zn(n);break;case 27:Ul(n.stateNode);case 26:case 5:Hi(n,n.return),Zn(n);break;case 22:n.memoizedState===null&&Zn(n);break;case 30:Zn(n);break;default:Zn(n)}r=r.sibling}}function va(r,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,m=r,b=n,T=b.flags;switch(b.tag){case 0:case 11:case 15:va(m,b,s),Ol(4,b);break;case 1:if(va(m,b,s),u=b,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(et){me(u,u.return,et)}if(u=b,m=u.updateQueue,m!==null){var M=u.stateNode;try{var j=m.shared.hiddenCallbacks;if(j!==null)for(m.shared.hiddenCallbacks=null,m=0;m<j.length;m++)$0(j[m],M)}catch(et){me(u,u.return,et)}}s&&T&64&&Vx(b),zl(b,b.return);break;case 27:Kx(b);case 26:case 5:va(m,b,s),s&&u===null&&T&4&&Qx(b),zl(b,b.return);break;case 12:va(m,b,s);break;case 31:va(m,b,s),s&&T&4&&ib(m,b);break;case 13:va(m,b,s),s&&T&4&&ab(m,b);break;case 22:b.memoizedState===null&&va(m,b,s),zl(b,b.return);break;case 30:break;default:va(m,b,s)}n=n.sibling}}function dp(r,n){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&kl(s))}function fp(r,n){r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&kl(r))}function vi(r,n,s,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)sb(r,n,s,u),n=n.sibling}function sb(r,n,s,u){var m=n.flags;switch(n.tag){case 0:case 11:case 15:vi(r,n,s,u),m&2048&&Ol(9,n);break;case 1:vi(r,n,s,u);break;case 3:vi(r,n,s,u),m&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&kl(r)));break;case 12:if(m&2048){vi(r,n,s,u),r=n.stateNode;try{var b=n.memoizedProps,T=b.id,M=b.onPostCommit;typeof M=="function"&&M(T,n.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(j){me(n,n.return,j)}}else vi(r,n,s,u);break;case 31:vi(r,n,s,u);break;case 13:vi(r,n,s,u);break;case 23:break;case 22:b=n.stateNode,T=n.alternate,n.memoizedState!==null?b._visibility&2?vi(r,n,s,u):$l(r,n):b._visibility&2?vi(r,n,s,u):(b._visibility|=2,es(r,n,s,u,(n.subtreeFlags&10256)!==0||!1)),m&2048&&dp(T,n);break;case 24:vi(r,n,s,u),m&2048&&fp(n.alternate,n);break;default:vi(r,n,s,u)}}function es(r,n,s,u,m){for(m=m&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=r,T=n,M=s,j=u,et=T.flags;switch(T.tag){case 0:case 11:case 15:es(b,T,M,j,m),Ol(8,T);break;case 23:break;case 22:var ht=T.stateNode;T.memoizedState!==null?ht._visibility&2?es(b,T,M,j,m):$l(b,T):(ht._visibility|=2,es(b,T,M,j,m)),m&&et&2048&&dp(T.alternate,T);break;case 24:es(b,T,M,j,m),m&&et&2048&&fp(T.alternate,T);break;default:es(b,T,M,j,m)}n=n.sibling}}function $l(r,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=r,u=n,m=u.flags;switch(u.tag){case 22:$l(s,u),m&2048&&dp(u.alternate,u);break;case 24:$l(s,u),m&2048&&fp(u.alternate,u);break;default:$l(s,u)}n=n.sibling}}var Nl=8192;function rs(r,n,s){if(r.subtreeFlags&Nl)for(r=r.child;r!==null;)lb(r,n,s),r=r.sibling}function lb(r,n,s){switch(r.tag){case 26:rs(r,n,s),r.flags&Nl&&r.memoizedState!==null&&gL(s,Ci,r.memoizedState,r.memoizedProps);break;case 5:rs(r,n,s);break;case 3:case 4:var u=Ci;Ci=tu(r.stateNode.containerInfo),rs(r,n,s),Ci=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=Nl,Nl=16777216,rs(r,n,s),Nl=u):rs(r,n,s));break;default:rs(r,n,s)}}function cb(r){var n=r.alternate;if(n!==null&&(r=n.child,r!==null)){n.child=null;do n=r.sibling,r.sibling=null,r=n;while(r!==null)}}function ql(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];tr=u,ub(u,r)}cb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)hb(r),r=r.sibling}function hb(r){switch(r.tag){case 0:case 11:case 15:ql(r),r.flags&2048&&Ka(9,r,r.return);break;case 3:ql(r);break;case 12:ql(r);break;case 22:var n=r.stateNode;r.memoizedState!==null&&n._visibility&2&&(r.return===null||r.return.tag!==13)?(n._visibility&=-3,jh(r)):ql(r);break;default:ql(r)}}function jh(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];tr=u,ub(u,r)}cb(r)}for(r=r.child;r!==null;){switch(n=r,n.tag){case 0:case 11:case 15:Ka(8,n,n.return),jh(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,jh(n));break;default:jh(n)}r=r.sibling}}function ub(r,n){for(;tr!==null;){var s=tr;switch(s.tag){case 0:case 11:case 15:Ka(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:kl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,tr=u;else t:for(s=r;tr!==null;){u=tr;var m=u.sibling,b=u.return;if(eb(u),u===s){tr=null;break t}if(m!==null){m.return=b,tr=m;break t}tr=b}}}var AE={getCacheForType:function(r){var n=nr($e),s=n.data.get(r);return s===void 0&&(s=r(),n.data.set(r,s)),s},cacheSignal:function(){return nr($e).controller.signal}},ME=typeof WeakMap=="function"?WeakMap:Map,fe=0,ve=null,Jt=null,re=0,ge=0,Jr=null,Ja=!1,is=!1,pp=!1,ka=0,Me=0,tn=0,Kn=0,gp=0,ti=0,as=0,Il=null,Nr=null,mp=!1,Hh=0,db=0,Ph=1/0,Wh=null,en=null,Ve=0,rn=null,ns=null,Sa=0,yp=0,xp=null,fb=null,jl=0,bp=null;function ei(){return(fe&2)!==0&&re!==0?re&-re:A.T!==null?Tp():Kc()}function pb(){if(ti===0)if((re&536870912)===0||ae){var r=En;En<<=1,(En&3932160)===0&&(En=262144),ti=r}else ti=536870912;return r=Zr.current,r!==null&&(r.flags|=32),ti}function qr(r,n,s){(r===ve&&(ge===2||ge===9)||r.cancelPendingCommit!==null)&&(os(r,0),an(r,re,ti,!1)),oa(r,s),((fe&2)===0||r!==ve)&&(r===ve&&((fe&2)===0&&(Kn|=s),Me===4&&an(r,re,ti,!1)),Pi(r))}function gb(r,n,s){if((fe&6)!==0)throw Error(a(327));var u=!s&&(n&127)===0&&(n&r.expiredLanes)===0||Oi(r,n),m=u?RE(r,n):vp(r,n,!0),b=u;do{if(m===0){is&&!u&&an(r,n,0,!1);break}else{if(s=r.current.alternate,b&&!FE(s)){m=vp(r,n,!1),b=!1;continue}if(m===2){if(b=n,r.errorRecoveryDisabledLanes&b)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){n=T;t:{var M=r;m=Il;var j=M.current.memoizedState.isDehydrated;if(j&&(os(M,T).flags|=256),T=vp(M,T,!1),T!==2){if(pp&&!j){M.errorRecoveryDisabledLanes|=b,Kn|=b,m=4;break t}b=Nr,Nr=m,b!==null&&(Nr===null?Nr=b:Nr.push.apply(Nr,b))}m=T}if(b=!1,m!==2)continue}}if(m===1){os(r,0),an(r,n,0,!0);break}t:{switch(u=r,b=m,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:an(u,n,ti,!Ja);break t;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(m=Hh+300-We(),10<m)){if(an(u,n,ti,!Ja),An(u,0,!0)!==0)break t;Sa=n,u.timeoutHandle=Yb(mb.bind(null,u,s,Nr,Wh,mp,n,ti,Kn,as,Ja,b,"Throttled",-0,0),m);break t}mb(u,s,Nr,Wh,mp,n,ti,Kn,as,Ja,b,null,-0,0)}}break}while(!0);Pi(r)}function mb(r,n,s,u,m,b,T,M,j,et,ht,pt,it,st){if(r.timeoutHandle=-1,pt=n.subtreeFlags,pt&8192||(pt&16785408)===16785408){pt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vr},lb(n,b,pt);var At=(b&62914560)===b?Hh-We():(b&4194048)===b?db-We():0;if(At=mL(pt,At),At!==null){Sa=b,r.cancelPendingCommit=At(wb.bind(null,r,n,b,s,u,m,T,M,j,ht,pt,null,it,st)),an(r,b,T,!et);return}}wb(r,n,b,s,u,m,T,M,j)}function FE(r){for(var n=r;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],b=m.getSnapshot;m=m.value;try{if(!Xr(b(),m))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function an(r,n,s,u){n&=~gp,n&=~Kn,r.suspendedLanes|=n,r.pingedLanes&=~n,u&&(r.warmLanes|=n),u=r.expirationTimes;for(var m=n;0<m;){var b=31-ir(m),T=1<<b;u[b]=-1,m&=~T}s!==0&&Zc(r,s,n)}function Uh(){return(fe&6)===0?(Hl(0),!1):!0}function Cp(){if(Jt!==null){if(ge===0)var r=Jt.return;else r=Jt,da=Pn=null,zf(r),Qo=null,wl=0,r=Jt;for(;r!==null;)Gx(r.alternate,r),r=r.return;Jt=null}}function os(r,n){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,KE(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Sa=0,Cp(),ve=r,Jt=s=ha(r.current,null),re=n,ge=0,Jr=null,Ja=!1,is=Oi(r,n),pp=!1,as=ti=gp=Kn=tn=Me=0,Nr=Il=null,mp=!1,(n&8)!==0&&(n|=n&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=n;0<u;){var m=31-ir(u),b=1<<m;n|=r[m],u&=~b}return ka=n,dh(),s}function yb(r,n){Vt=null,A.H=Fl,n===Xo||n===Ch?(n=D0(),ge=3):n===wf?(n=D0(),ge=4):ge=n===Kf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Jr=n,Jt===null&&(Me=1,Rh(r,si(n,r.current)))}function xb(){var r=Zr.current;return r===null?!0:(re&4194048)===re?ui===null:(re&62914560)===re||(re&536870912)!==0?r===ui:!1}function bb(){var r=A.H;return A.H=Fl,r===null?Fl:r}function Cb(){var r=A.A;return A.A=AE,r}function Yh(){Me=4,Ja||(re&4194048)!==re&&Zr.current!==null||(is=!0),(tn&134217727)===0&&(Kn&134217727)===0||ve===null||an(ve,re,ti,!1)}function vp(r,n,s){var u=fe;fe|=2;var m=bb(),b=Cb();(ve!==r||re!==n)&&(Wh=null,os(r,n)),n=!1;var T=Me;t:do try{if(ge!==0&&Jt!==null){var M=Jt,j=Jr;switch(ge){case 8:Cp(),T=6;break t;case 3:case 2:case 9:case 6:Zr.current===null&&(n=!0);var et=ge;if(ge=0,Jr=null,ss(r,M,j,et),s&&is){T=0;break t}break;default:et=ge,ge=0,Jr=null,ss(r,M,j,et)}}DE(),T=Me;break}catch(ht){yb(r,ht)}while(!0);return n&&r.shellSuspendCounter++,da=Pn=null,fe=u,A.H=m,A.A=b,Jt===null&&(ve=null,re=0,dh()),T}function DE(){for(;Jt!==null;)vb(Jt)}function RE(r,n){var s=fe;fe|=2;var u=bb(),m=Cb();ve!==r||re!==n?(Wh=null,Ph=We()+500,os(r,n)):is=Oi(r,n);t:do try{if(ge!==0&&Jt!==null){n=Jt;var b=Jr;e:switch(ge){case 1:ge=0,Jr=null,ss(r,n,b,1);break;case 2:case 9:if(M0(b)){ge=0,Jr=null,kb(n);break}n=function(){ge!==2&&ge!==9||ve!==r||(ge=7),Pi(r)},b.then(n,n);break t;case 3:ge=7;break t;case 4:ge=5;break t;case 7:M0(b)?(ge=0,Jr=null,kb(n)):(ge=0,Jr=null,ss(r,n,b,7));break;case 5:var T=null;switch(Jt.tag){case 26:T=Jt.memoizedState;case 5:case 27:var M=Jt;if(T?sC(T):M.stateNode.complete){ge=0,Jr=null;var j=M.sibling;if(j!==null)Jt=j;else{var et=M.return;et!==null?(Jt=et,Gh(et)):Jt=null}break e}}ge=0,Jr=null,ss(r,n,b,5);break;case 6:ge=0,Jr=null,ss(r,n,b,6);break;case 8:Cp(),Me=6;break t;default:throw Error(a(462))}}OE();break}catch(ht){yb(r,ht)}while(!0);return da=Pn=null,A.H=u,A.A=m,fe=s,Jt!==null?0:(ve=null,re=0,dh(),Me)}function OE(){for(;Jt!==null&&!Qc();)vb(Jt)}function vb(r){var n=Ux(r.alternate,r,ka);r.memoizedProps=r.pendingProps,n===null?Gh(r):Jt=n}function kb(r){var n=r,s=n.alternate;switch(n.tag){case 15:case 0:n=qx(s,n,n.pendingProps,n.type,void 0,re);break;case 11:n=qx(s,n,n.pendingProps,n.type.render,n.ref,re);break;case 5:zf(n);default:Gx(s,n),n=Jt=C0(n,ka),n=Ux(s,n,ka)}r.memoizedProps=r.pendingProps,n===null?Gh(r):Jt=n}function ss(r,n,s,u){da=Pn=null,zf(n),Qo=null,wl=0;var m=n.return;try{if(SE(r,m,n,s,re)){Me=1,Rh(r,si(s,r.current)),Jt=null;return}}catch(b){if(m!==null)throw Jt=m,b;Me=1,Rh(r,si(s,r.current)),Jt=null;return}n.flags&32768?(ae||u===1?r=!0:is||(re&536870912)!==0?r=!1:(Ja=r=!0,(u===2||u===9||u===3||u===6)&&(u=Zr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Sb(n,r)):Gh(n)}function Gh(r){var n=r;do{if((n.flags&32768)!==0){Sb(n,Ja);return}r=n.return;var s=_E(n.alternate,n,ka);if(s!==null){Jt=s;return}if(n=n.sibling,n!==null){Jt=n;return}Jt=n=r}while(n!==null);Me===0&&(Me=5)}function Sb(r,n){do{var s=BE(r.alternate,r);if(s!==null){s.flags&=32767,Jt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(r=r.sibling,r!==null)){Jt=r;return}Jt=r=s}while(r!==null);Me=6,Jt=null}function wb(r,n,s,u,m,b,T,M,j){r.cancelPendingCommit=null;do Vh();while(Ve!==0);if((fe&6)!==0)throw Error(a(327));if(n!==null){if(n===r.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=cf,nl(r,s,b,T,M,j),r===ve&&(Jt=ve=null,re=0),ns=n,rn=r,Sa=s,yp=b,xp=m,fb=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,qE(Ra,function(){return Lb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=A.T,A.T=null,m=$.p,$.p=2,T=fe,fe|=4;try{EE(r,n,s)}finally{fe=T,$.p=m,A.T=u}}Ve=1,Tb(),_b(),Bb()}}function Tb(){if(Ve===1){Ve=0;var r=rn,n=ns,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=A.T,A.T=null;var u=$.p;$.p=2;var m=fe;fe|=4;try{nb(n,r);var b=Dp,T=u0(r.containerInfo),M=b.focusedElem,j=b.selectionRange;if(T!==M&&M&&M.ownerDocument&&h0(M.ownerDocument.documentElement,M)){if(j!==null&&af(M)){var et=j.start,ht=j.end;if(ht===void 0&&(ht=et),"selectionStart"in M)M.selectionStart=et,M.selectionEnd=Math.min(ht,M.value.length);else{var pt=M.ownerDocument||document,it=pt&&pt.defaultView||window;if(it.getSelection){var st=it.getSelection(),At=M.textContent.length,It=Math.min(j.start,At),be=j.end===void 0?It:Math.min(j.end,At);!st.extend&&It>be&&(T=be,be=It,It=T);var Z=c0(M,It),U=c0(M,be);if(Z&&U&&(st.rangeCount!==1||st.anchorNode!==Z.node||st.anchorOffset!==Z.offset||st.focusNode!==U.node||st.focusOffset!==U.offset)){var tt=pt.createRange();tt.setStart(Z.node,Z.offset),st.removeAllRanges(),It>be?(st.addRange(tt),st.extend(U.node,U.offset)):(tt.setEnd(U.node,U.offset),st.addRange(tt))}}}}for(pt=[],st=M;st=st.parentNode;)st.nodeType===1&&pt.push({element:st,left:st.scrollLeft,top:st.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<pt.length;M++){var ft=pt[M];ft.element.scrollLeft=ft.left,ft.element.scrollTop=ft.top}}ou=!!Fp,Dp=Fp=null}finally{fe=m,$.p=u,A.T=s}}r.current=n,Ve=2}}function _b(){if(Ve===2){Ve=0;var r=rn,n=ns,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=A.T,A.T=null;var u=$.p;$.p=2;var m=fe;fe|=4;try{tb(r,n.alternate,n)}finally{fe=m,$.p=u,A.T=s}}Ve=3}}function Bb(){if(Ve===4||Ve===3){Ve=0,Ri();var r=rn,n=ns,s=Sa,u=fb;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ve=5:(Ve=0,ns=rn=null,Eb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(en=null),Mn(s),n=n.stateNode,gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(Oa,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=A.T,m=$.p,$.p=2,A.T=null;try{for(var b=r.onRecoverableError,T=0;T<u.length;T++){var M=u[T];b(M.value,{componentStack:M.stack})}}finally{A.T=n,$.p=m}}(Sa&3)!==0&&Vh(),Pi(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===bp?jl++:(jl=0,bp=r):jl=0,Hl(0)}}function Eb(r,n){(r.pooledCacheLanes&=n)===0&&(n=r.pooledCache,n!=null&&(r.pooledCache=null,kl(n)))}function Vh(){return Tb(),_b(),Bb(),Lb()}function Lb(){if(Ve!==5)return!1;var r=rn,n=yp;yp=0;var s=Mn(Sa),u=A.T,m=$.p;try{$.p=32>s?32:s,A.T=null,s=xp,xp=null;var b=rn,T=Sa;if(Ve=0,ns=rn=null,Sa=0,(fe&6)!==0)throw Error(a(331));var M=fe;if(fe|=4,hb(b.current),sb(b,b.current,T,s),fe=M,Hl(0,!1),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(Oa,b)}catch{}return!0}finally{$.p=m,A.T=u,Eb(r,n)}}function Ab(r,n,s){n=si(s,n),n=Zf(r.stateNode,n,2),r=Xa(r,n,2),r!==null&&(oa(r,2),Pi(r))}function me(r,n,s){if(r.tag===3)Ab(r,r,s);else for(;n!==null;){if(n.tag===3){Ab(n,r,s);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(en===null||!en.has(u))){r=si(s,r),s=Mx(2),u=Xa(n,s,2),u!==null&&(Fx(s,u,n,r),oa(u,2),Pi(u));break}}n=n.return}}function kp(r,n,s){var u=r.pingCache;if(u===null){u=r.pingCache=new ME;var m=new Set;u.set(n,m)}else m=u.get(n),m===void 0&&(m=new Set,u.set(n,m));m.has(s)||(pp=!0,m.add(s),r=zE.bind(null,r,n,s),n.then(r,r))}function zE(r,n,s){var u=r.pingCache;u!==null&&u.delete(n),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,ve===r&&(re&s)===s&&(Me===4||Me===3&&(re&62914560)===re&&300>We()-Hh?(fe&2)===0&&os(r,0):gp|=s,as===re&&(as=0)),Pi(r)}function Mb(r,n){n===0&&(n=Yr()),r=In(r,n),r!==null&&(oa(r,n),Pi(r))}function $E(r){var n=r.memoizedState,s=0;n!==null&&(s=n.retryLane),Mb(r,s)}function NE(r,n){var s=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),Mb(r,s)}function qE(r,n){return Bn(r,n)}var Xh=null,ls=null,Sp=!1,Qh=!1,wp=!1,nn=0;function Pi(r){r!==ls&&r.next===null&&(ls===null?Xh=ls=r:ls=ls.next=r),Qh=!0,Sp||(Sp=!0,jE())}function Hl(r,n){if(!wp&&Qh){wp=!0;do for(var s=!1,u=Xh;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var b=0;else{var T=u.suspendedLanes,M=u.pingedLanes;b=(1<<31-ir(42|r)+1)-1,b&=m&~(T&~M),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,Ob(u,b))}else b=re,b=An(u,u===ve?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||Oi(u,b)||(s=!0,Ob(u,b));u=u.next}while(s);wp=!1}}function IE(){Fb()}function Fb(){Qh=Sp=!1;var r=0;nn!==0&&ZE()&&(r=nn);for(var n=We(),s=null,u=Xh;u!==null;){var m=u.next,b=Db(u,n);b===0?(u.next=null,s===null?Xh=m:s.next=m,m===null&&(ls=s)):(s=u,(r!==0||(b&3)!==0)&&(Qh=!0)),u=m}Ve!==0&&Ve!==5||Hl(r),nn!==0&&(nn=0)}function Db(r,n){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var T=31-ir(b),M=1<<T,j=m[T];j===-1?((M&s)===0||(M&u)!==0)&&(m[T]=Lo(M,n)):j<=n&&(r.expiredLanes|=M),b&=~M}if(n=ve,s=re,s=An(r,r===n?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,s===0||r===n&&(ge===2||ge===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&wo(u),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Oi(r,s)){if(n=s&-s,n===r.callbackPriority)return n;switch(u!==null&&wo(u),Mn(s)){case 2:case 8:s=_o;break;case 32:s=Ra;break;case 268435456:s=na;break;default:s=Ra}return u=Rb.bind(null,r),s=Bn(s,u),r.callbackPriority=n,r.callbackNode=s,n}return u!==null&&u!==null&&wo(u),r.callbackPriority=2,r.callbackNode=null,2}function Rb(r,n){if(Ve!==0&&Ve!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Vh()&&r.callbackNode!==s)return null;var u=re;return u=An(r,r===ve?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(gb(r,u,n),Db(r,We()),r.callbackNode!=null&&r.callbackNode===s?Rb.bind(null,r):null)}function Ob(r,n){if(Vh())return null;gb(r,n,!0)}function jE(){JE(function(){(fe&6)!==0?Bn(To,IE):Fb()})}function Tp(){if(nn===0){var r=Go;r===0&&(r=$a,$a<<=1,($a&261888)===0&&($a=256)),nn=r}return nn}function zb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:mr(""+r)}function $b(r,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,r.id&&s.setAttribute("form",r.id),n.parentNode.insertBefore(s,n),r=new FormData(r),s.parentNode.removeChild(s),r}function HE(r,n,s,u,m){if(n==="submit"&&s&&s.stateNode===m){var b=zb((m[Kt]||null).action),T=u.submitter;T&&(n=(n=T[Kt]||null)?zb(n.formAction):T.getAttribute("formAction"),n!==null&&(b=n,T=null));var M=new lh("action","action",null,u,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(nn!==0){var j=T?$b(m,T):new FormData(m);Uf(s,{pending:!0,data:j,method:m.method,action:b},null,j)}}else typeof b=="function"&&(M.preventDefault(),j=T?$b(m,T):new FormData(m),Uf(s,{pending:!0,data:j,method:m.method,action:b},b,j))},currentTarget:m}]})}}for(var _p=0;_p<lf.length;_p++){var Bp=lf[_p],PE=Bp.toLowerCase(),WE=Bp[0].toUpperCase()+Bp.slice(1);bi(PE,"on"+WE)}bi(p0,"onAnimationEnd"),bi(g0,"onAnimationIteration"),bi(m0,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(oE,"onTransitionRun"),bi(sE,"onTransitionStart"),bi(lE,"onTransitionCancel"),bi(y0,"onTransitionEnd"),la("onMouseEnter",["mouseout","mouseover"]),la("onMouseLeave",["mouseout","mouseover"]),la("onPointerEnter",["pointerout","pointerover"]),la("onPointerLeave",["pointerout","pointerover"]),sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pl="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(" "),UE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pl));function Nb(r,n){n=(n&4)!==0;for(var s=0;s<r.length;s++){var u=r[s],m=u.event;u=u.listeners;t:{var b=void 0;if(n)for(var T=u.length-1;0<=T;T--){var M=u[T],j=M.instance,et=M.currentTarget;if(M=M.listener,j!==b&&m.isPropagationStopped())break t;b=M,m.currentTarget=et;try{b(m)}catch(ht){uh(ht)}m.currentTarget=null,b=j}else for(T=0;T<u.length;T++){if(M=u[T],j=M.instance,et=M.currentTarget,M=M.listener,j!==b&&m.isPropagationStopped())break t;b=M,m.currentTarget=et;try{b(m)}catch(ht){uh(ht)}m.currentTarget=null,b=j}}}}function te(r,n){var s=n[sl];s===void 0&&(s=n[sl]=new Set);var u=r+"__bubble";s.has(u)||(qb(n,r,2,!1),s.add(u))}function Ep(r,n,s){var u=0;n&&(u|=4),qb(s,r,u,n)}var Zh="_reactListening"+Math.random().toString(36).slice(2);function Lp(r){if(!r[Zh]){r[Zh]=!0,Ni.forEach(function(s){s!=="selectionchange"&&(UE.has(s)||Ep(s,!1,r),Ep(s,!0,r))});var n=r.nodeType===9?r:r.ownerDocument;n===null||n[Zh]||(n[Zh]=!0,Ep("selectionchange",!1,n))}}function qb(r,n,s,u){switch(pC(n)){case 2:var m=bL;break;case 8:m=CL;break;default:m=Wp}s=m.bind(null,n,s,r),m=void 0,!Vd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(n,s,{capture:!0,passive:m}):r.addEventListener(n,s,!0):m!==void 0?r.addEventListener(n,s,{passive:m}):r.addEventListener(n,s,!1)}function Ap(r,n,s,u,m){var b=u;if((n&1)===0&&(n&2)===0&&u!==null)t:for(;;){if(u===null)return;var T=u.tag;if(T===3||T===4){var M=u.stateNode.containerInfo;if(M===m)break;if(T===4)for(T=u.return;T!==null;){var j=T.tag;if((j===3||j===4)&&T.stateNode.containerInfo===m)return;T=T.return}for(;M!==null;){if(T=Ia(M),T===null)return;if(j=T.tag,j===5||j===6||j===26||j===27){u=b=T;continue t}M=M.parentNode}}u=u.return}Wy(function(){var et=b,ht=Yd(s),pt=[];t:{var it=x0.get(r);if(it!==void 0){var st=lh,At=r;switch(r){case"keypress":if(oh(s)===0)break t;case"keydown":case"keyup":st=NB;break;case"focusin":At="focus",st=Kd;break;case"focusout":At="blur",st=Kd;break;case"beforeblur":case"afterblur":st=Kd;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":st=Gy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":st=_B;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":st=jB;break;case p0:case g0:case m0:st=LB;break;case y0:st=PB;break;case"scroll":case"scrollend":st=wB;break;case"wheel":st=UB;break;case"copy":case"cut":case"paste":st=MB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":st=Xy;break;case"toggle":case"beforetoggle":st=GB}var It=(n&4)!==0,be=!It&&(r==="scroll"||r==="scrollend"),Z=It?it!==null?it+"Capture":null:it;It=[];for(var U=et,tt;U!==null;){var ft=U;if(tt=ft.stateNode,ft=ft.tag,ft!==5&&ft!==26&&ft!==27||tt===null||Z===null||(ft=ul(U,Z),ft!=null&&It.push(Wl(U,ft,tt))),be)break;U=U.return}0<It.length&&(it=new st(it,At,null,s,ht),pt.push({event:it,listeners:It}))}}if((n&7)===0){t:{if(it=r==="mouseover"||r==="pointerover",st=r==="mouseout"||r==="pointerout",it&&s!==Ge&&(At=s.relatedTarget||s.fromElement)&&(Ia(At)||At[Gr]))break t;if((st||it)&&(it=ht.window===ht?ht:(it=ht.ownerDocument)?it.defaultView||it.parentWindow:window,st?(At=s.relatedTarget||s.toElement,st=et,At=At?Ia(At):null,At!==null&&(be=l(At),It=At.tag,At!==be||It!==5&&It!==27&&It!==6)&&(At=null)):(st=null,At=et),st!==At)){if(It=Gy,ft="onMouseLeave",Z="onMouseEnter",U="mouse",(r==="pointerout"||r==="pointerover")&&(It=Xy,ft="onPointerLeave",Z="onPointerEnter",U="pointer"),be=st==null?it:Fn(st),tt=At==null?it:Fn(At),it=new It(ft,U+"leave",st,s,ht),it.target=be,it.relatedTarget=tt,ft=null,Ia(ht)===et&&(It=new It(Z,U+"enter",At,s,ht),It.target=tt,It.relatedTarget=be,ft=It),be=ft,st&&At)e:{for(It=YE,Z=st,U=At,tt=0,ft=Z;ft;ft=It(ft))tt++;ft=0;for(var zt=U;zt;zt=It(zt))ft++;for(;0<tt-ft;)Z=It(Z),tt--;for(;0<ft-tt;)U=It(U),ft--;for(;tt--;){if(Z===U||U!==null&&Z===U.alternate){It=Z;break e}Z=It(Z),U=It(U)}It=null}else It=null;st!==null&&Ib(pt,it,st,It,!1),At!==null&&be!==null&&Ib(pt,be,At,It,!0)}}t:{if(it=et?Fn(et):window,st=it.nodeName&&it.nodeName.toLowerCase(),st==="select"||st==="input"&&it.type==="file")var he=i0;else if(e0(it))if(a0)he=iE;else{he=eE;var Dt=tE}else st=it.nodeName,!st||st.toLowerCase()!=="input"||it.type!=="checkbox"&&it.type!=="radio"?et&&Ee(et.elementType)&&(he=i0):he=rE;if(he&&(he=he(r,et))){r0(pt,he,s,ht);break t}Dt&&Dt(r,it,et),r==="focusout"&&et&&it.type==="number"&&et.memoizedProps.value!=null&&zn(it,"number",it.value)}switch(Dt=et?Fn(et):window,r){case"focusin":(e0(Dt)||Dt.contentEditable==="true")&&(qo=Dt,nf=et,bl=null);break;case"focusout":bl=nf=qo=null;break;case"mousedown":of=!0;break;case"contextmenu":case"mouseup":case"dragend":of=!1,d0(pt,s,ht);break;case"selectionchange":if(nE)break;case"keydown":case"keyup":d0(pt,s,ht)}var Qt;if(tf)t:{switch(r){case"compositionstart":var ie="onCompositionStart";break t;case"compositionend":ie="onCompositionEnd";break t;case"compositionupdate":ie="onCompositionUpdate";break t}ie=void 0}else No?Jy(r,s)&&(ie="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(ie="onCompositionStart");ie&&(Qy&&s.locale!=="ko"&&(No||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&No&&(Qt=Uy()):(Ha=ht,Xd="value"in Ha?Ha.value:Ha.textContent,No=!0)),Dt=Kh(et,ie),0<Dt.length&&(ie=new Vy(ie,r,null,s,ht),pt.push({event:ie,listeners:Dt}),Qt?ie.data=Qt:(Qt=t0(s),Qt!==null&&(ie.data=Qt)))),(Qt=XB?QB(r,s):ZB(r,s))&&(ie=Kh(et,"onBeforeInput"),0<ie.length&&(Dt=new Vy("onBeforeInput","beforeinput",null,s,ht),pt.push({event:Dt,listeners:ie}),Dt.data=Qt)),HE(pt,r,et,s,ht)}Nb(pt,n)})}function Wl(r,n,s){return{instance:r,listener:n,currentTarget:s}}function Kh(r,n){for(var s=n+"Capture",u=[];r!==null;){var m=r,b=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||b===null||(m=ul(r,s),m!=null&&u.unshift(Wl(r,m,b)),m=ul(r,n),m!=null&&u.push(Wl(r,m,b))),r.tag===3)return u;r=r.return}return[]}function YE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Ib(r,n,s,u,m){for(var b=n._reactName,T=[];s!==null&&s!==u;){var M=s,j=M.alternate,et=M.stateNode;if(M=M.tag,j!==null&&j===u)break;M!==5&&M!==26&&M!==27||et===null||(j=et,m?(et=ul(s,b),et!=null&&T.unshift(Wl(s,et,j))):m||(et=ul(s,b),et!=null&&T.push(Wl(s,et,j)))),s=s.return}T.length!==0&&r.push({event:n,listeners:T})}var GE=/\r\n?/g,VE=/\u0000|\uFFFD/g;function jb(r){return(typeof r=="string"?r:""+r).replace(GE,`
`).replace(VE,"")}function Hb(r,n){return n=jb(n),jb(r)===n}function xe(r,n,s,u,m,b){switch(s){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||xt(r,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&xt(r,""+u);break;case"className":qi(r,"class",u);break;case"tabIndex":qi(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":qi(r,s,u);break;case"style":ee(r,u,b);break;case"data":if(n!=="object"){qi(r,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||s!=="href")){r.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=mr(""+u),r.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(s==="formAction"?(n!=="input"&&xe(r,n,"name",m.name,m,null),xe(r,n,"formEncType",m.formEncType,m,null),xe(r,n,"formMethod",m.formMethod,m,null),xe(r,n,"formTarget",m.formTarget,m,null)):(xe(r,n,"encType",m.encType,m,null),xe(r,n,"method",m.method,m,null),xe(r,n,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=mr(""+u),r.setAttribute(s,u);break;case"onClick":u!=null&&(r.onclick=Vr);break;case"onScroll":u!=null&&te("scroll",r);break;case"onScrollEnd":u!=null&&te("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}s=mr(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""+u):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":u===!0?r.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,u):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(s,u):r.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(s):r.setAttribute(s,u);break;case"popover":te("beforetoggle",r),te("toggle",r),xi(r,"popover",u);break;case"xlinkActuate":Ye(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ye(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ye(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ye(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ye(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ye(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ye(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ye(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ye(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":xi(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Le.get(s)||s,xi(r,s,u))}}function Mp(r,n,s,u,m,b){switch(s){case"style":ee(r,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof u=="string"?xt(r,u):(typeof u=="number"||typeof u=="bigint")&&xt(r,""+u);break;case"onScroll":u!=null&&te("scroll",r);break;case"onScrollEnd":u!=null&&te("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Vr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!th.hasOwnProperty(s))t:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),n=s.slice(2,m?s.length-7:void 0),b=r[Kt]||null,b=b!=null?b[s]:null,typeof b=="function"&&r.removeEventListener(n,b,m),typeof u=="function")){typeof b!="function"&&b!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(n,u,m);break t}s in r?r[s]=u:u===!0?r.setAttribute(s,""):xi(r,s,u)}}}function sr(r,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":te("error",r),te("load",r);var u=!1,m=!1,b;for(b in s)if(s.hasOwnProperty(b)){var T=s[b];if(T!=null)switch(b){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,b,T,s,null)}}m&&xe(r,n,"srcSet",s.srcSet,s,null),u&&xe(r,n,"src",s.src,s,null);return;case"input":te("invalid",r);var M=b=T=m=null,j=null,et=null;for(u in s)if(s.hasOwnProperty(u)){var ht=s[u];if(ht!=null)switch(u){case"name":m=ht;break;case"type":T=ht;break;case"checked":j=ht;break;case"defaultChecked":et=ht;break;case"value":b=ht;break;case"defaultValue":M=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(a(137,n));break;default:xe(r,n,u,ht,s,null)}}On(r,b,M,j,et,T,m,!1);return;case"select":te("invalid",r),u=T=b=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":b=M;break;case"defaultValue":T=M;break;case"multiple":u=M;default:xe(r,n,m,M,s,null)}n=b,s=T,r.multiple=!!u,n!=null?bt(r,!!u,n,!1):s!=null&&bt(r,!!u,s,!0);return;case"textarea":te("invalid",r),b=m=u=null;for(T in s)if(s.hasOwnProperty(T)&&(M=s[T],M!=null))switch(T){case"value":u=M;break;case"defaultValue":m=M;break;case"children":b=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:xe(r,n,T,M,s,null)}rt(r,u,m,b);return;case"option":for(j in s)if(s.hasOwnProperty(j)&&(u=s[j],u!=null))switch(j){case"selected":r.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:xe(r,n,j,u,s,null)}return;case"dialog":te("beforetoggle",r),te("toggle",r),te("cancel",r),te("close",r);break;case"iframe":case"object":te("load",r);break;case"video":case"audio":for(u=0;u<Pl.length;u++)te(Pl[u],r);break;case"image":te("error",r),te("load",r);break;case"details":te("toggle",r);break;case"embed":case"source":case"link":te("error",r),te("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(et in s)if(s.hasOwnProperty(et)&&(u=s[et],u!=null))switch(et){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,et,u,s,null)}return;default:if(Ee(n)){for(ht in s)s.hasOwnProperty(ht)&&(u=s[ht],u!==void 0&&Mp(r,n,ht,u,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(u=s[M],u!=null&&xe(r,n,M,u,s,null))}function XE(r,n,s,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,b=null,T=null,M=null,j=null,et=null,ht=null;for(st in s){var pt=s[st];if(s.hasOwnProperty(st)&&pt!=null)switch(st){case"checked":break;case"value":break;case"defaultValue":j=pt;default:u.hasOwnProperty(st)||xe(r,n,st,null,u,pt)}}for(var it in u){var st=u[it];if(pt=s[it],u.hasOwnProperty(it)&&(st!=null||pt!=null))switch(it){case"type":b=st;break;case"name":m=st;break;case"checked":et=st;break;case"defaultChecked":ht=st;break;case"value":T=st;break;case"defaultValue":M=st;break;case"children":case"dangerouslySetInnerHTML":if(st!=null)throw Error(a(137,n));break;default:st!==pt&&xe(r,n,it,st,u,pt)}}Oo(r,T,M,j,et,ht,b,m);return;case"select":st=T=M=it=null;for(b in s)if(j=s[b],s.hasOwnProperty(b)&&j!=null)switch(b){case"value":break;case"multiple":st=j;default:u.hasOwnProperty(b)||xe(r,n,b,null,u,j)}for(m in u)if(b=u[m],j=s[m],u.hasOwnProperty(m)&&(b!=null||j!=null))switch(m){case"value":it=b;break;case"defaultValue":M=b;break;case"multiple":T=b;default:b!==j&&xe(r,n,m,b,u,j)}n=M,s=T,u=st,it!=null?bt(r,!!s,it,!1):!!u!=!!s&&(n!=null?bt(r,!!s,n,!0):bt(r,!!s,s?[]:"",!1));return;case"textarea":st=it=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!u.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:xe(r,n,M,null,u,m)}for(T in u)if(m=u[T],b=s[T],u.hasOwnProperty(T)&&(m!=null||b!=null))switch(T){case"value":it=m;break;case"defaultValue":st=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==b&&xe(r,n,T,m,u,b)}O(r,it,st);return;case"option":for(var At in s)if(it=s[At],s.hasOwnProperty(At)&&it!=null&&!u.hasOwnProperty(At))switch(At){case"selected":r.selected=!1;break;default:xe(r,n,At,null,u,it)}for(j in u)if(it=u[j],st=s[j],u.hasOwnProperty(j)&&it!==st&&(it!=null||st!=null))switch(j){case"selected":r.selected=it&&typeof it!="function"&&typeof it!="symbol";break;default:xe(r,n,j,it,u,st)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var It in s)it=s[It],s.hasOwnProperty(It)&&it!=null&&!u.hasOwnProperty(It)&&xe(r,n,It,null,u,it);for(et in u)if(it=u[et],st=s[et],u.hasOwnProperty(et)&&it!==st&&(it!=null||st!=null))switch(et){case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(a(137,n));break;default:xe(r,n,et,it,u,st)}return;default:if(Ee(n)){for(var be in s)it=s[be],s.hasOwnProperty(be)&&it!==void 0&&!u.hasOwnProperty(be)&&Mp(r,n,be,void 0,u,it);for(ht in u)it=u[ht],st=s[ht],!u.hasOwnProperty(ht)||it===st||it===void 0&&st===void 0||Mp(r,n,ht,it,u,st);return}}for(var Z in s)it=s[Z],s.hasOwnProperty(Z)&&it!=null&&!u.hasOwnProperty(Z)&&xe(r,n,Z,null,u,it);for(pt in u)it=u[pt],st=s[pt],!u.hasOwnProperty(pt)||it===st||it==null&&st==null||xe(r,n,pt,it,u,st)}function Pb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QE(){if(typeof performance.getEntriesByType=="function"){for(var r=0,n=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],b=m.transferSize,T=m.initiatorType,M=m.duration;if(b&&M&&Pb(T)){for(T=0,M=m.responseEnd,u+=1;u<s.length;u++){var j=s[u],et=j.startTime;if(et>M)break;var ht=j.transferSize,pt=j.initiatorType;ht&&Pb(pt)&&(j=j.responseEnd,T+=ht*(j<M?1:(M-et)/(j-et)))}if(--u,n+=8*(b+T)/(m.duration/1e3),r++,10<r)break}}if(0<r)return n/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Fp=null,Dp=null;function Jh(r){return r.nodeType===9?r:r.ownerDocument}function Wb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ub(r,n){if(r===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&n==="foreignObject"?0:r}function Rp(r,n){return r==="textarea"||r==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Op=null;function ZE(){var r=window.event;return r&&r.type==="popstate"?r===Op?!1:(Op=r,!0):(Op=null,!1)}var Yb=typeof setTimeout=="function"?setTimeout:void 0,KE=typeof clearTimeout=="function"?clearTimeout:void 0,Gb=typeof Promise=="function"?Promise:void 0,JE=typeof queueMicrotask=="function"?queueMicrotask:typeof Gb<"u"?function(r){return Gb.resolve(null).then(r).catch(tL)}:Yb;function tL(r){setTimeout(function(){throw r})}function on(r){return r==="head"}function Vb(r,n){var s=n,u=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){r.removeChild(m),ds(n);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Ul(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ul(s);for(var b=s.firstChild;b;){var T=b.nextSibling,M=b.nodeName;b[qa]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=T}}else s==="body"&&Ul(r.ownerDocument.body);s=m}while(s);ds(n)}function Xb(r,n){var s=r;r=0;do{var u=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=u}while(s)}function zp(r){var n=r.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":zp(s),hl(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function eL(r,n,s,u){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[qa])switch(n){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(n==="input"&&r.type==="hidden"){var b=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=di(r.nextSibling),r===null)break}return null}function rL(r,n,s){if(n==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=di(r.nextSibling),r===null))return null;return r}function Qb(r,n){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!n||(r=di(r.nextSibling),r===null))return null;return r}function $p(r){return r.data==="$?"||r.data==="$~"}function Np(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function iL(r,n){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=n;else if(r.data!=="$?"||s.readyState!=="loading")n();else{var u=function(){n(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function di(r){for(;r!=null;r=r.nextSibling){var n=r.nodeType;if(n===1||n===3)break;if(n===8){if(n=r.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return r}var qp=null;function Zb(r){r=r.nextSibling;for(var n=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(n===0)return di(r.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}r=r.nextSibling}return null}function Kb(r){r=r.previousSibling;for(var n=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return r;n--}else s!=="/$"&&s!=="/&"||n++}r=r.previousSibling}return null}function Jb(r,n,s){switch(n=Jh(s),r){case"html":if(r=n.documentElement,!r)throw Error(a(452));return r;case"head":if(r=n.head,!r)throw Error(a(453));return r;case"body":if(r=n.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ul(r){for(var n=r.attributes;n.length;)r.removeAttributeNode(n[0]);hl(r)}var fi=new Map,tC=new Set;function tu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var wa=$.d;$.d={f:aL,r:nL,D:oL,C:sL,L:lL,m:cL,X:uL,S:hL,M:dL};function aL(){var r=wa.f(),n=Uh();return r||n}function nL(r){var n=ja(r);n!==null&&n.tag===5&&n.type==="form"?yx(n):wa.r(r)}var cs=typeof document>"u"?null:document;function eC(r,n,s){var u=cs;if(u&&typeof n=="string"&&n){var m=Fr(n);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),tC.has(m)||(tC.add(m),r={rel:r,crossOrigin:s,href:n},u.querySelector(m)===null&&(n=u.createElement("link"),sr(n,"link",r),De(n),u.head.appendChild(n)))}}function oL(r){wa.D(r),eC("dns-prefetch",r,null)}function sL(r,n){wa.C(r,n),eC("preconnect",r,n)}function lL(r,n,s){wa.L(r,n,s);var u=cs;if(u&&r&&n){var m='link[rel="preload"][as="'+Fr(n)+'"]';n==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Fr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Fr(s.imageSizes)+'"]')):m+='[href="'+Fr(r)+'"]';var b=m;switch(n){case"style":b=hs(r);break;case"script":b=us(r)}fi.has(b)||(r=g({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:r,as:n},s),fi.set(b,r),u.querySelector(m)!==null||n==="style"&&u.querySelector(Yl(b))||n==="script"&&u.querySelector(Gl(b))||(n=u.createElement("link"),sr(n,"link",r),De(n),u.head.appendChild(n)))}}function cL(r,n){wa.m(r,n);var s=cs;if(s&&r){var u=n&&typeof n.as=="string"?n.as:"script",m='link[rel="modulepreload"][as="'+Fr(u)+'"][href="'+Fr(r)+'"]',b=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=us(r)}if(!fi.has(b)&&(r=g({rel:"modulepreload",href:r},n),fi.set(b,r),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Gl(b)))return}u=s.createElement("link"),sr(u,"link",r),De(u),s.head.appendChild(u)}}}function hL(r,n,s){wa.S(r,n,s);var u=cs;if(u&&r){var m=wr(u).hoistableStyles,b=hs(r);n=n||"default";var T=m.get(b);if(!T){var M={loading:0,preload:null};if(T=u.querySelector(Yl(b)))M.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":n},s),(s=fi.get(b))&&Ip(r,s);var j=T=u.createElement("link");De(j),sr(j,"link",r),j._p=new Promise(function(et,ht){j.onload=et,j.onerror=ht}),j.addEventListener("load",function(){M.loading|=1}),j.addEventListener("error",function(){M.loading|=2}),M.loading|=4,eu(T,n,u)}T={type:"stylesheet",instance:T,count:1,state:M},m.set(b,T)}}}function uL(r,n){wa.X(r,n);var s=cs;if(s&&r){var u=wr(s).hoistableScripts,m=us(r),b=u.get(m);b||(b=s.querySelector(Gl(m)),b||(r=g({src:r,async:!0},n),(n=fi.get(m))&&jp(r,n),b=s.createElement("script"),De(b),sr(b,"link",r),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function dL(r,n){wa.M(r,n);var s=cs;if(s&&r){var u=wr(s).hoistableScripts,m=us(r),b=u.get(m);b||(b=s.querySelector(Gl(m)),b||(r=g({src:r,async:!0,type:"module"},n),(n=fi.get(m))&&jp(r,n),b=s.createElement("script"),De(b),sr(b,"link",r),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function rC(r,n,s,u){var m=(m=vt.current)?tu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=hs(s.href),s=wr(m).hoistableStyles,u=s.get(n),u||(u={type:"style",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=hs(s.href);var b=wr(m).hoistableStyles,T=b.get(r);if(T||(m=m.ownerDocument||m,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,T),(b=m.querySelector(Yl(r)))&&!b._p&&(T.instance=b,T.state.loading=5),fi.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},fi.set(r,s),b||fL(m,r,s,T.state))),n&&u===null)throw Error(a(528,""));return T}if(n&&u!==null)throw Error(a(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=us(s),s=wr(m).hoistableScripts,u=s.get(n),u||(u={type:"script",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function hs(r){return'href="'+Fr(r)+'"'}function Yl(r){return'link[rel="stylesheet"]['+r+"]"}function iC(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function fL(r,n,s,u){r.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=r.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),sr(n,"link",s),De(n),r.head.appendChild(n))}function us(r){return'[src="'+Fr(r)+'"]'}function Gl(r){return"script[async]"+r}function aC(r,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var u=r.querySelector('style[data-href~="'+Fr(s.href)+'"]');if(u)return n.instance=u,De(u),u;var m=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),De(u),sr(u,"style",m),eu(u,s.precedence,r),n.instance=u;case"stylesheet":m=hs(s.href);var b=r.querySelector(Yl(m));if(b)return n.state.loading|=4,n.instance=b,De(b),b;u=iC(s),(m=fi.get(m))&&Ip(u,m),b=(r.ownerDocument||r).createElement("link"),De(b);var T=b;return T._p=new Promise(function(M,j){T.onload=M,T.onerror=j}),sr(b,"link",u),n.state.loading|=4,eu(b,s.precedence,r),n.instance=b;case"script":return b=us(s.src),(m=r.querySelector(Gl(b)))?(n.instance=m,De(m),m):(u=s,(m=fi.get(b))&&(u=g({},s),jp(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),De(m),sr(m,"link",u),r.head.appendChild(m),n.instance=m);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,eu(u,s.precedence,r));return n.instance}function eu(r,n,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,b=m,T=0;T<u.length;T++){var M=u[T];if(M.dataset.precedence===n)b=M;else if(b!==m)break}b?b.parentNode.insertBefore(r,b.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(r,n.firstChild))}function Ip(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.title==null&&(r.title=n.title)}function jp(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.integrity==null&&(r.integrity=n.integrity)}var ru=null;function nC(r,n,s){if(ru===null){var u=new Map,m=ru=new Map;m.set(s,u)}else m=ru,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(r))return u;for(u.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var b=s[m];if(!(b[qa]||b[Ue]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var T=b.getAttribute(n)||"";T=r+T;var M=u.get(T);M?M.push(b):u.set(T,[b])}}return u}function oC(r,n,s){r=r.ownerDocument||r,r.head.insertBefore(s,n==="title"?r.querySelector("head > title"):null)}function pL(r,n,s){if(s===1||n.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return r=n.disabled,typeof n.precedence=="string"&&r==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function sC(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function gL(r,n,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=hs(u.href),b=n.querySelector(Yl(m));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(r.count++,r=iu.bind(r),n.then(r,r)),s.state.loading|=4,s.instance=b,De(b);return}b=n.ownerDocument||n,u=iC(u),(m=fi.get(m))&&Ip(u,m),b=b.createElement("link"),De(b);var T=b;T._p=new Promise(function(M,j){T.onload=M,T.onerror=j}),sr(b,"link",u),s.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=iu.bind(r),n.addEventListener("load",s),n.addEventListener("error",s))}}var Hp=0;function mL(r,n){return r.stylesheets&&r.count===0&&nu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var u=setTimeout(function(){if(r.stylesheets&&nu(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+n);0<r.imgBytes&&Hp===0&&(Hp=62500*QE());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&nu(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>Hp?50:800)+n);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function iu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var au=null;function nu(r,n){r.stylesheets=null,r.unsuspend!==null&&(r.count++,au=new Map,n.forEach(yL,r),au=null,iu.call(r))}function yL(r,n){if(!(n.state.loading&4)){var s=au.get(r);if(s)var u=s.get(null);else{s=new Map,au.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<m.length;b++){var T=m[b];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(s.set(T.dataset.precedence,T),u=T)}u&&s.set(null,u)}m=n.instance,T=m.getAttribute("data-precedence"),b=s.get(T)||u,b===u&&s.set(null,m),s.set(T,m),this.count++,u=iu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),b?b.parentNode.insertBefore(m,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),n.state.loading|=4}}var Vl={$$typeof:L,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function xL(r,n,s,u,m,b,T,M,j){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=b,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function lC(r,n,s,u,m,b,T,M,j,et,ht,pt){return r=new xL(r,n,s,T,j,et,ht,pt,M),n=1,b===!0&&(n|=24),b=Qr(3,null,null,n),r.current=b,b.stateNode=r,n=vf(),n.refCount++,r.pooledCache=n,n.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:n},Tf(b),r}function cC(r){return r?(r=Ho,r):Ho}function hC(r,n,s,u,m,b){m=cC(m),u.context===null?u.context=m:u.pendingContext=m,u=Va(n),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Xa(r,u,n),s!==null&&(qr(s,r,n),_l(s,r,n))}function uC(r,n){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<n?s:n}}function Pp(r,n){uC(r,n),(r=r.alternate)&&uC(r,n)}function dC(r){if(r.tag===13||r.tag===31){var n=In(r,67108864);n!==null&&qr(n,r,67108864),Pp(r,67108864)}}function fC(r){if(r.tag===13||r.tag===31){var n=ei();n=Mo(n);var s=In(r,n);s!==null&&qr(s,r,n),Pp(r,n)}}var ou=!0;function bL(r,n,s,u){var m=A.T;A.T=null;var b=$.p;try{$.p=2,Wp(r,n,s,u)}finally{$.p=b,A.T=m}}function CL(r,n,s,u){var m=A.T;A.T=null;var b=$.p;try{$.p=8,Wp(r,n,s,u)}finally{$.p=b,A.T=m}}function Wp(r,n,s,u){if(ou){var m=Up(u);if(m===null)Ap(r,n,u,su,s),gC(r,u);else if(kL(m,r,n,s,u))u.stopPropagation();else if(gC(r,u),n&4&&-1<vL.indexOf(r)){for(;m!==null;){var b=ja(m);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var T=yi(b.pendingLanes);if(T!==0){var M=b;for(M.pendingLanes|=2,M.entangledLanes|=2;T;){var j=1<<31-ir(T);M.entanglements[1]|=j,T&=~j}Pi(b),(fe&6)===0&&(Ph=We()+500,Hl(0))}}break;case 31:case 13:M=In(b,2),M!==null&&qr(M,b,2),Uh(),Pp(b,2)}if(b=Up(u),b===null&&Ap(r,n,u,su,s),b===m)break;m=b}m!==null&&u.stopPropagation()}else Ap(r,n,u,null,s)}}function Up(r){return r=Yd(r),Yp(r)}var su=null;function Yp(r){if(su=null,r=Ia(r),r!==null){var n=l(r);if(n===null)r=null;else{var s=n.tag;if(s===13){if(r=c(n),r!==null)return r;r=null}else if(s===31){if(r=h(n),r!==null)return r;r=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;r=null}else n!==r&&(r=null)}}return su=r,null}function pC(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(aa()){case To:return 2;case _o:return 8;case Ra:case il:return 32;case na:return 268435456;default:return 32}default:return 32}}var Gp=!1,sn=null,ln=null,cn=null,Xl=new Map,Ql=new Map,hn=[],vL="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function gC(r,n){switch(r){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":Xl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ql.delete(n.pointerId)}}function Zl(r,n,s,u,m,b){return r===null||r.nativeEvent!==b?(r={blockedOn:n,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[m]},n!==null&&(n=ja(n),n!==null&&dC(n)),r):(r.eventSystemFlags|=u,n=r.targetContainers,m!==null&&n.indexOf(m)===-1&&n.push(m),r)}function kL(r,n,s,u,m){switch(n){case"focusin":return sn=Zl(sn,r,n,s,u,m),!0;case"dragenter":return ln=Zl(ln,r,n,s,u,m),!0;case"mouseover":return cn=Zl(cn,r,n,s,u,m),!0;case"pointerover":var b=m.pointerId;return Xl.set(b,Zl(Xl.get(b)||null,r,n,s,u,m)),!0;case"gotpointercapture":return b=m.pointerId,Ql.set(b,Zl(Ql.get(b)||null,r,n,s,u,m)),!0}return!1}function mC(r){var n=Ia(r.target);if(n!==null){var s=l(n);if(s!==null){if(n=s.tag,n===13){if(n=c(s),n!==null){r.blockedOn=n,Na(r.priority,function(){fC(s)});return}}else if(n===31){if(n=h(s),n!==null){r.blockedOn=n,Na(r.priority,function(){fC(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function lu(r){if(r.blockedOn!==null)return!1;for(var n=r.targetContainers;0<n.length;){var s=Up(r.nativeEvent);if(s===null){s=r.nativeEvent;var u=new s.constructor(s.type,s);Ge=u,s.target.dispatchEvent(u),Ge=null}else return n=ja(s),n!==null&&dC(n),r.blockedOn=s,!1;n.shift()}return!0}function yC(r,n,s){lu(r)&&s.delete(n)}function SL(){Gp=!1,sn!==null&&lu(sn)&&(sn=null),ln!==null&&lu(ln)&&(ln=null),cn!==null&&lu(cn)&&(cn=null),Xl.forEach(yC),Ql.forEach(yC)}function cu(r,n){r.blockedOn===n&&(r.blockedOn=null,Gp||(Gp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SL)))}var hu=null;function xC(r){hu!==r&&(hu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hu===r&&(hu=null);for(var n=0;n<r.length;n+=3){var s=r[n],u=r[n+1],m=r[n+2];if(typeof u!="function"){if(Yp(u||s)===null)continue;break}var b=ja(s);b!==null&&(r.splice(n,3),n-=3,Uf(b,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function ds(r){function n(j){return cu(j,r)}sn!==null&&cu(sn,r),ln!==null&&cu(ln,r),cn!==null&&cu(cn,r),Xl.forEach(n),Ql.forEach(n);for(var s=0;s<hn.length;s++){var u=hn[s];u.blockedOn===r&&(u.blockedOn=null)}for(;0<hn.length&&(s=hn[0],s.blockedOn===null);)mC(s),s.blockedOn===null&&hn.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],b=s[u+1],T=m[Kt]||null;if(typeof b=="function")T||xC(s);else if(T){var M=null;if(b&&b.hasAttribute("formAction")){if(m=b,T=b[Kt]||null)M=T.formAction;else if(Yp(m)!==null)continue}else M=T.action;typeof M=="function"?s[u+1]=M:(s.splice(u,3),u-=3),xC(s)}}}function bC(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(T){return m=T})},focusReset:"manual",scroll:"manual"})}function n(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),m!==null&&(m(),m=null)}}}function Vp(r){this._internalRoot=r}uu.prototype.render=Vp.prototype.render=function(r){var n=this._internalRoot;if(n===null)throw Error(a(409));var s=n.current,u=ei();hC(s,u,r,n,null,null)},uu.prototype.unmount=Vp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var n=r.containerInfo;hC(r.current,2,null,r,null,null),Uh(),n[Gr]=null}};function uu(r){this._internalRoot=r}uu.prototype.unstable_scheduleHydration=function(r){if(r){var n=Kc();r={blockedOn:null,target:r,priority:n};for(var s=0;s<hn.length&&n!==0&&n<hn[s].priority;s++);hn.splice(s,0,r),s===0&&mC(r)}};var CC=t.version;if(CC!=="19.2.7")throw Error(a(527,CC,"19.2.7"));$.findDOMNode=function(r){var n=r._reactInternals;if(n===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(n),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var wL={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Oa=du.inject(wL),gr=du}catch{}}return Jl.createRoot=function(r,n){if(!o(r))throw Error(a(299));var s=!1,u="",m=Bx,b=Ex,T=Lx;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(m=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(T=n.onRecoverableError)),n=lC(r,1,!1,null,null,s,u,null,m,b,T,bC),r[Gr]=n.current,Lp(r),new Vp(n)},Jl.hydrateRoot=function(r,n,s){if(!o(r))throw Error(a(299));var u=!1,m="",b=Bx,T=Ex,M=Lx,j=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(j=s.formState)),n=lC(r,1,!0,n,s??null,u,m,j,b,T,M,bC),n.context=cC(null),s=n.current,u=ei(),u=Mo(u),m=Va(u),m.callback=null,Xa(s,m,u),s=u,n.current.lanes=s,oa(n,s),Pi(n),r[Gr]=n.current,Lp(r),new uu(n)},Jl.version="19.2.7",Jl}var AC;function $L(){if(AC)return Zp.exports;AC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=zL(),Zp.exports}var NL=$L();const Dv={view:"Welcome",connectionType:null,activeFlow:null,progress:null,formSections:null,tableGroups:null,result:null,readinessResult:null,error:null,fabricForm:null};function MC(e){switch(e){case"fabric":return"FabricDialog";case"local":return"LocalDialog";case"pbip":return"PBIPDialog";case"update":return"UpdateDialog"}}function qL(e,t){switch(t.type){case"selectConnection":return{...e,view:MC(t.payload),connectionType:t.payload,activeFlow:"documentation",error:null};case"goBack":return{...e,view:"Welcome",error:null};case"startProgress":return{...e,view:"Progress",progress:{percent:0,message:"",phase:"connecting"},error:null};case"progressUpdate":return{...e,progress:t.payload};case"showForm":return{...e,view:"FormView",formSections:t.payload.sections,tableGroups:t.payload.tableGroups,progress:null,error:null};case"showResult":return{...e,view:"ResultView",result:t.payload,error:null};case"showImprint":return{...e,view:"ImprintView",error:null};case"showChangelog":return{...e,view:"ChangelogView",error:null};case"showTemplateEditor":return{...e,view:"TemplateEditor",error:null};case"showDiffView":return{...e,view:"DiffView",error:null};case"startWorkspace":return{...e,view:"Workspace",connectionType:"fabric",activeFlow:"documentation",error:null};case"startReadiness":return{...e,view:"PBIPDialog",connectionType:null,activeFlow:"readiness",error:null,readinessResult:null};case"showReadinessResult":return{...e,view:"ReadinessResult",readinessResult:t.payload,progress:null,error:null};case"showError":return{...e,error:t.payload};case"setFabricForm":return{...e,fabricForm:t.payload};case"connectionFailed":return{...e,view:MC(t.payload.connectionType),connectionType:t.payload.connectionType,progress:null,error:t.payload.error};case"reset":return{...Dv};default:return e}}const Rv=yt.createContext(null),Ov=yt.createContext(null);function IL({children:e}){const[t,i]=yt.useReducer(qL,Dv);return _.jsx(Rv.Provider,{value:t,children:_.jsx(Ov.Provider,{value:i,children:e})})}function Tn(){const e=yt.useContext(Rv);if(e===null)throw new Error("useAppState must be used within an AppProvider");return e}function Ur(){const e=yt.useContext(Ov);if(e===null)throw new Error("useAppDispatch must be used within an AppProvider");return e}const jL={"app.title":"PBI Documentation by Oliver Gropp","welcome.subtitle":"Bitte wählen Sie eine Verbindungsmethode:","connection.fabric":"Fabric Service","connection.fabric.desc":"Verbindung zum Microsoft Fabric Service herstellen","connection.local":"Lokaler Bericht","connection.local.desc":"Verbindung zu einem lokal geöffneten Power BI Bericht","connection.pbip":"PBIP-Projekt","connection.pbip.desc":"Metadaten aus einem Power BI Project-Ordner lesen","connection.update":"Bestehende Dokumentation aktualisieren","connection.update.desc":"Eine vorhandene Dokumentation laden und aktualisieren","status.ready":"Bereit – Bitte wählen Sie eine Verbindungsmethode","progress.connecting":"Verbinde …","progress.extracting":"Metadaten werden extrahiert …","progress.mapping":"Platzhalter werden zugeordnet …","progress.categorizing":"Kategorisierung …","form.save":"Dokumentation speichern","form.ignoreRequired":"Pflichtfelder ignorieren","form.summary.auto":"automatisch","form.summary.manual":"manuell","form.summary.partial":"teilweise","form.autoLabel":"(auto)","form.saving":"Speichern …","form.noTableData":"Keine Einträge vorhanden. Klicken Sie auf „Tabelle bearbeiten“ um Daten einzugeben.","result.success":"Dokumentation erfolgreich erstellt!","result.openFile":"Datei öffnen","result.newDoc":"Neue Dokumentation","result.outputPath":"Ausgabepfad:","result.version":"Version","result.changesCount":"Änderungen","result.openError":"Datei konnte nicht geöffnet werden:","result.exportPdf":"Als PDF exportieren","result.pdfExporting":"PDF wird erstellt …","result.pdfSuccess":"PDF gespeichert:","result.exportHtml":"Als HTML exportieren","result.htmlExporting":"HTML wird erstellt …","result.htmlSuccess":"HTML gespeichert:","result.preview":"Vorschau anzeigen","result.previewTitle":"Dokument-Vorschau","result.previewClose":"Schließen","result.previewLoading":"Vorschau wird geladen …","result.previewError":"Vorschau konnte nicht geladen werden:","templateEditor.button":"Vorlage anpassen","templateEditor.title":"Dokumentationsvorlage anpassen","templateEditor.save":"Speichern","templateEditor.saving":"Wird gespeichert …","templateEditor.saved":"Vorlage erfolgreich gespeichert.","templateEditor.loading":"Vorlage wird geladen …","templateEditor.hint":"Kapitel aktivieren/deaktivieren, umbenennen (Klick auf Titel) oder per Pfeile verschieben.","templateEditor.toggle":"Kapitel ein-/ausblenden","templateEditor.clickToRename":"Klicken zum Umbenennen","templateEditor.moveUp":"Nach oben","templateEditor.moveDown":"Nach unten","templateEditor.params":"Parameter","templateEditor.removeParam":"Parameter entfernen","templateEditor.addParam":"Hinzufügen","templateEditor.newParamPlaceholder":"Neuer Parameter-Name …","diff.button":"Versionen vergleichen","diff.title":"Versionen vergleichen","diff.oldVersion":"Alte Version","diff.newVersion":"Neue Version","diff.selectFile":"Datei auswählen …","diff.compare":"Vergleichen","diff.comparing":"Wird verglichen …","diff.summary":"Änderungen","diff.changes":"geänderte Zeilen","diff.identical":"Die Dateien sind identisch.","diff.viewRendered":"Gerendert","diff.viewCode":"Markdown","dialog.back":"Zurück","dialog.connect":"Verbinden","error.timeout":"Die Operation hat das Zeitlimit überschritten. Bitte versuchen Sie es erneut.","error.unexpected":"Ein unerwarteter Fehler ist aufgetreten.","tableEditor.title":"Tabelle bearbeiten","tableEditor.addRow":"Zeile hinzufügen","tableEditor.deleteRow":"Letzte Zeile löschen","tableEditor.save":"Speichern","tableEditor.cancel":"Abbrechen","changes.title":"Erkannte Änderungen","changes.noChanges":"Keine Unterschiede festgestellt.","changes.apply":"Änderungen übernehmen","changes.columnField":"Feld","changes.columnOldValue":"Alter Wert","changes.columnNewValue":"Neuer Wert","changes.columnType":"Typ","pbip.title":"PBIP-Projekt verbinden","pbip.selectFolder":"Ordner auswählen","pbip.selectedPath":"Gewählter Pfad:","pbip.noFolder":"Kein Ordner ausgewählt","local.discover":"Berichte suchen","local.searching":"Suche läuft …","local.selectInstance":"Erkannte Berichte:","local.noInstances":"Keine geöffneten Power BI Berichte gefunden.","update.selectFile":"Markdown-Datei auswählen","update.loading":"Dokument wird geladen …","update.version":"Version","update.lastUpdated":"Letzte Aktualisierung","update.continue":"Weiter zur Re-Extraktion","fabric.tenantId":"Tenant-ID","fabric.tenantId.placeholder":"z. B. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","fabric.workspaceId":"Workspace-ID","fabric.workspaceId.placeholder":"Workspace-ID eingeben","fabric.datasetId":"Dataset-ID","fabric.datasetId.placeholder":"Dataset-ID eingeben","fabric.reportId":"Report-ID","fabric.reportId.placeholder":"Report-ID eingeben (optional)","fabric.reportId.hint":"Optional – nur erforderlich für berichtsspezifische Visuals","fabric.clientId":"Client-ID","fabric.clientId.placeholder":"App-Registrierungs-Client-ID","fabric.clientSecret":"Client-Secret","fabric.clientSecret.placeholder":"App-Registrierungs-Client-Secret","fabric.advanced":"Erweiterte Einstellungen","fabric.connecting":"Verbinde …","fabric.error.workspaceRequired":"Workspace-ID darf nicht leer sein","fabric.error.datasetRequired":"Dataset-ID darf nicht leer sein","imprint.heading":"Impressum","imprint.tooltip":"Impressum","imprint.deps.heading":"Abhängigkeiten / Voraussetzungen","imprint.dep.python.name":"Python (≥ 3.10)","imprint.dep.python.desc":"Laufzeitumgebung für die Metadaten-Extraktion und Dokumentgenerierung","imprint.dep.powerbi.name":"Power BI Desktop","imprint.dep.powerbi.desc":"Muss installiert sein, damit lokale Berichte erkannt und analysiert werden können","imprint.dep.adomd.name":"ADOMD.NET Client Libraries","imprint.dep.adomd.desc":"Werden für die Verbindung zum Analysis-Services-Modell des lokalen Berichts benötigt","imprint.dep.pythonnet.name":"pythonnet","imprint.dep.pythonnet.desc":"Python-zu-.NET-Bridge für den Zugriff auf die ADOMD.NET-Bibliotheken","imprint.dep.fabric.name":"Microsoft Fabric-Zugang","imprint.dep.fabric.desc":"Erforderlich für die Fabric-Verbindungsmethode (Workspace- und Dataset-Zugriff)","imprint.dep.msal.name":"MSAL (Microsoft Authentication Library)","imprint.dep.msal.desc":"Wird für die OAuth2-Authentifizierung bei Microsoft Fabric verwendet","imprint.fields.heading":"Pflichtfelder der Dokumentationsvorlage","imprint.fields.empty":"In der aktuellen Vorlage sind keine Pflichtfelder definiert.","imprint.fields.group.META_":"Meta-Informationen","imprint.fields.group.KONTAKT_":"Kontaktdaten","imprint.fields.group.BIZ_":"Business-Kontext","imprint.fields.group.KPI_":"Kennzahlen (KPIs)","imprint.fields.group.GLOSSAR_":"Glossar","imprint.fields.group.DS_":"Datenquellen","imprint.fields.group.PQ_":"Power Query","imprint.fields.group.PQT_":"Power Query Transformationen","imprint.fields.group.PARAM_":"Parameter","imprint.fields.group.COL_":"Spalten","imprint.fields.group.MODELL_":"Datenmodell","imprint.fields.group.DAX_":"DAX-Measures","imprint.fields.group.TBLTYP_":"Tabellentypen","imprint.fields.group.REL_":"Beziehungen","imprint.fields.group.RLS_":"Row-Level Security","imprint.fields.group.SEC_":"Sicherheit","imprint.fields.group.REFRESH_":"Aktualisierung","imprint.fields.group.OPS_":"Betrieb / Operations","imprint.fields.group.VER_":"Versionierung","imprint.fields.group.LOG_":"Protokoll / Changelog","imprint.fields.group.REVIEW_":"Review / Freigabe","imprint.template.heading":"Vorlage anpassen","imprint.template.step1":"Kopieren Sie die Vorlagendatei (template.md) neben die ausführbare Datei.","imprint.template.step2":"Bearbeiten Sie die Kopie mit einem beliebigen Texteditor.","imprint.template.step3":"Starten Sie die Anwendung neu, damit die geänderte Vorlage verwendet wird.","imprint.template.naming":"Platzhalter folgen dem Format {{PREFIX_Name}}. Das Präfix bestimmt die Formularkategorie, der Name wird als Feldbezeichnung angezeigt.","imprint.template.custom":"Eigene Platzhalter verwenden das Präfix CUSTOM_, z. B. {{CUSTOM_MeinFeld}}. Sie erscheinen automatisch als Eingabefelder im Formular.","imprint.author.heading":"Autor","imprint.author.linkedin":"LinkedIn-Profil","imprint.author.website":"Webseite","imprint.error.openUrl":"Der Link konnte nicht geöffnet werden.","readiness.button":"Fabric IQ Readiness","readiness.hint":"Analysiert die Fabric-IQ-Readiness eines PBIP-Ordners","readiness.title":"Readiness-Analyse abgeschlossen","readiness.openFile":"Datei öffnen","readiness.backHome":"Zurück zur Startseite","readiness.filePath":"Bericht gespeichert unter:","readiness.errorOpen":"Datei konnte nicht geöffnet werden","changelog.button":"Changelog","changelog.tooltip":"Versionshistorie / Release Notes anzeigen","changelog.heading":"Changelog / Release Notes","changelog.currentVersion":"Aktuelle Version","changelog.empty":"Es sind noch keine Einträge vorhanden.","changelog.type.added":"Neu","changelog.type.changed":"Geändert","changelog.type.fixed":"Behoben","changelog.type.removed":"Entfernt","connection.workspace":"Kompletter Workspace","connection.workspace.desc":"Alle Berichte und Semantic Models eines Fabric-Workspaces dokumentieren","workspace.dialog.title":"Fabric-Workspace dokumentieren","workspace.dialog.desc":"Verbinden Sie sich mit einem Workspace, um alle enthaltenen Semantic Models und Berichte zu dokumentieren.","workspace.targetFolder":"Zielordner","workspace.selectFolder":"Ordner auswählen","workspace.noFolder":"Kein Ordner ausgewählt","workspace.onlyWorkspace":"Nur Workspace-Übersicht erstellen","workspace.onlyWorkspace.hint":"ohne Berichte und Semantic Models","workspace.start":"Workspace analysieren","workspace.cancel":"Abbrechen","workspace.error.workspaceRequired":"Workspace-ID darf nicht leer sein","workspace.error.tenantRequired":"Tenant-ID darf nicht leer sein","workspace.error.folderRequired":"Bitte wählen Sie einen Zielordner","workspace.busy.enumerating":"Workspace wird analysiert …","workspace.busy.extracting":"Metadaten werden extrahiert …","workspace.busy.generating":"Dokumente werden erzeugt …","workspace.items.title":"Gefundene Elemente","workspace.items.models":"Semantic Models","workspace.items.reports":"Berichte","workspace.items.other":"Sonstige","workspace.items.users":"Benutzer/Gruppen","workspace.items.colName":"Name","workspace.items.colType":"Typ","workspace.items.colReports":"Berichte","workspace.items.continue":"Extrahieren & Dokumentieren","workspace.form.doc":"Dokument","workspace.form.skip":"Überspringen","workspace.form.apply":"Übernehmen & Weiter","workspace.form.applyLast":"Übernehmen & Abschließen","workspace.result.title":"Workspace-Dokumentation erstellt!","workspace.result.outputDir":"Ausgabeordner:","workspace.result.files":"Dateien","workspace.result.errors":"Fehler","workspace.result.openOverview":"Übersicht öffnen","workspace.result.openLog":"Fehler-Log öffnen","workspace.result.backHome":"Zurück zur Startseite"},HL={"app.title":"PBI Documentation by Oliver Gropp","welcome.subtitle":"Please select a connection method:","connection.fabric":"Fabric Service","connection.fabric.desc":"Connect to the Microsoft Fabric Service","connection.local":"Local Report","connection.local.desc":"Connect to a locally opened Power BI report","connection.pbip":"PBIP Project","connection.pbip.desc":"Read metadata from a Power BI Project folder","connection.update":"Update Existing Documentation","connection.update.desc":"Load and update an existing documentation file","status.ready":"Ready – Please select a connection method","progress.connecting":"Connecting …","progress.extracting":"Extracting metadata …","progress.mapping":"Mapping placeholders …","progress.categorizing":"Categorizing …","form.save":"Save Documentation","form.ignoreRequired":"Ignore required fields","form.summary.auto":"automatic","form.summary.manual":"manual","form.summary.partial":"partial","form.autoLabel":"(auto)","form.saving":"Saving …","form.noTableData":'No entries. Click "Edit Table" to add data.',"result.success":"Documentation created successfully!","result.openFile":"Open File","result.newDoc":"New Documentation","result.outputPath":"Output path:","result.version":"Version","result.changesCount":"Changes","result.openError":"Failed to open file:","result.exportPdf":"Export as PDF","result.pdfExporting":"Creating PDF …","result.pdfSuccess":"PDF saved:","result.exportHtml":"Export as HTML","result.htmlExporting":"Creating HTML …","result.htmlSuccess":"HTML saved:","result.preview":"Show Preview","result.previewTitle":"Document Preview","result.previewClose":"Close","result.previewLoading":"Loading preview …","result.previewError":"Could not load preview:","templateEditor.button":"Edit Template","templateEditor.title":"Customize Documentation Template","templateEditor.save":"Save","templateEditor.saving":"Saving …","templateEditor.saved":"Template saved successfully.","templateEditor.loading":"Loading template …","templateEditor.hint":"Enable/disable chapters, rename (click title), or reorder with arrows.","templateEditor.toggle":"Toggle chapter","templateEditor.clickToRename":"Click to rename","templateEditor.moveUp":"Move up","templateEditor.moveDown":"Move down","templateEditor.params":"Parameters","templateEditor.removeParam":"Remove parameter","templateEditor.addParam":"Add","templateEditor.newParamPlaceholder":"New parameter name …","diff.button":"Compare Versions","diff.title":"Compare Versions","diff.oldVersion":"Old Version","diff.newVersion":"New Version","diff.selectFile":"Select file …","diff.compare":"Compare","diff.comparing":"Comparing …","diff.summary":"Changes","diff.changes":"changed lines","diff.identical":"The files are identical.","diff.viewRendered":"Rendered","diff.viewCode":"Markdown","dialog.back":"Back","dialog.connect":"Connect","error.timeout":"The operation timed out. Please try again.","error.unexpected":"An unexpected error occurred.","tableEditor.title":"Edit Table","tableEditor.addRow":"Add Row","tableEditor.deleteRow":"Delete Last Row","tableEditor.save":"Save","tableEditor.cancel":"Cancel","changes.title":"Detected Changes","changes.noChanges":"No differences detected.","changes.apply":"Apply Changes","changes.columnField":"Field","changes.columnOldValue":"Old Value","changes.columnNewValue":"New Value","changes.columnType":"Type","pbip.title":"Connect PBIP Project","pbip.selectFolder":"Select Folder","pbip.selectedPath":"Selected path:","pbip.noFolder":"No folder selected","local.discover":"Discover Reports","local.searching":"Searching …","local.selectInstance":"Detected reports:","local.noInstances":"No open Power BI reports found.","update.selectFile":"Select Markdown file","update.loading":"Loading document …","update.version":"Version","update.lastUpdated":"Last updated","update.continue":"Continue to re-extraction","fabric.tenantId":"Tenant ID","fabric.tenantId.placeholder":"e.g. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","fabric.workspaceId":"Workspace ID","fabric.workspaceId.placeholder":"Enter Workspace ID","fabric.datasetId":"Dataset ID","fabric.datasetId.placeholder":"Enter Dataset ID","fabric.reportId":"Report ID","fabric.reportId.placeholder":"Enter Report ID (optional)","fabric.reportId.hint":"Optional – only required for report-specific visuals","fabric.clientId":"Client ID","fabric.clientId.placeholder":"App registration Client ID","fabric.clientSecret":"Client Secret","fabric.clientSecret.placeholder":"App registration Client Secret","fabric.advanced":"Advanced Settings","fabric.connecting":"Connecting …","fabric.error.workspaceRequired":"Workspace ID must not be empty","fabric.error.datasetRequired":"Dataset ID must not be empty","imprint.heading":"Imprint","imprint.tooltip":"Imprint","imprint.deps.heading":"Dependencies & Prerequisites","imprint.dep.python.name":"Python 3.10+","imprint.dep.python.desc":"Required runtime for backend extraction logic","imprint.dep.powerbi.name":"Power BI Desktop","imprint.dep.powerbi.desc":"Must be installed for local report connections","imprint.dep.adomd.name":"ADOMD.NET Client Libraries","imprint.dep.adomd.desc":"Required for Analysis Services data access","imprint.dep.pythonnet.name":"pythonnet","imprint.dep.pythonnet.desc":"Python/.NET interop bridge for ADOMD access","imprint.dep.fabric.name":"Microsoft Fabric Access","imprint.dep.fabric.desc":"Service principal or user credentials for Fabric connections","imprint.dep.msal.name":"MSAL (Microsoft Authentication Library)","imprint.dep.msal.desc":"Handles OAuth2 authentication for Fabric and Azure AD","imprint.fields.heading":"Required Template Fields","imprint.fields.empty":"No mandatory fields are defined in the current template.","imprint.fields.group.META_":"META_ – Metadata","imprint.fields.group.KONTAKT_":"KONTAKT_ – Contact Information","imprint.fields.group.BIZ_":"BIZ_ – Business Context","imprint.fields.group.KPI_":"KPI_ – Key Performance Indicators","imprint.fields.group.GLOSSAR_":"GLOSSAR_ – Glossary","imprint.fields.group.DS_":"DS_ – Data Sources","imprint.fields.group.PQ_":"PQ_ – Power Query","imprint.fields.group.PQT_":"PQT_ – Power Query Tables","imprint.fields.group.PARAM_":"PARAM_ – Parameters","imprint.fields.group.COL_":"COL_ – Columns","imprint.fields.group.MODELL_":"MODELL_ – Data Model","imprint.fields.group.DAX_":"DAX_ – DAX Measures","imprint.fields.group.TBLTYP_":"TBLTYP_ – Table Types","imprint.fields.group.REL_":"REL_ – Relationships","imprint.fields.group.RLS_":"RLS_ – Row-Level Security","imprint.fields.group.SEC_":"SEC_ – Security","imprint.fields.group.REFRESH_":"REFRESH_ – Data Refresh","imprint.fields.group.OPS_":"OPS_ – Operations","imprint.fields.group.VER_":"VER_ – Versioning","imprint.fields.group.LOG_":"LOG_ – Change Log","imprint.fields.group.REVIEW_":"REVIEW_ – Review","imprint.template.heading":"Customize Template","imprint.template.step1":"Copy the template file next to the executable.","imprint.template.step2":"Edit the copy with any text editor.","imprint.template.step3":"Restart the application to use the modified template.","imprint.template.naming":"Placeholders use the format {{PREFIX_Name}}. The prefix determines the form category, and the name portion becomes the field label.","imprint.template.custom":"Use the CUSTOM_ prefix to add your own placeholders (e.g. {{CUSTOM_MyField}}). Custom placeholders appear automatically as input fields in the form.","imprint.author.heading":"Author","imprint.author.linkedin":"LinkedIn Profile","imprint.author.website":"Website","imprint.error.openUrl":"The link could not be opened in the browser.","readiness.button":"Fabric IQ Readiness","readiness.hint":"Analyzes Fabric IQ readiness of a PBIP folder","readiness.title":"Readiness analysis complete","readiness.openFile":"Open file","readiness.backHome":"Back to home","readiness.filePath":"Report saved at:","readiness.errorOpen":"Could not open file","changelog.button":"Changelog","changelog.tooltip":"Show version history / release notes","changelog.heading":"Changelog / Release Notes","changelog.currentVersion":"Current version","changelog.empty":"There are no entries yet.","changelog.type.added":"Added","changelog.type.changed":"Changed","changelog.type.fixed":"Fixed","changelog.type.removed":"Removed","connection.workspace":"Entire Workspace","connection.workspace.desc":"Document all reports and semantic models of a Fabric workspace","workspace.dialog.title":"Document Fabric Workspace","workspace.dialog.desc":"Connect to a workspace to document all contained semantic models and reports.","workspace.targetFolder":"Target folder","workspace.selectFolder":"Select folder","workspace.noFolder":"No folder selected","workspace.onlyWorkspace":"Create workspace overview only","workspace.onlyWorkspace.hint":"without reports and semantic models","workspace.start":"Analyze workspace","workspace.cancel":"Cancel","workspace.error.workspaceRequired":"Workspace ID must not be empty","workspace.error.tenantRequired":"Tenant ID must not be empty","workspace.error.folderRequired":"Please select a target folder","workspace.busy.enumerating":"Analyzing workspace …","workspace.busy.extracting":"Extracting metadata …","workspace.busy.generating":"Generating documents …","workspace.items.title":"Discovered items","workspace.items.models":"Semantic Models","workspace.items.reports":"Reports","workspace.items.other":"Other","workspace.items.users":"Users/Groups","workspace.items.colName":"Name","workspace.items.colType":"Type","workspace.items.colReports":"Reports","workspace.items.continue":"Extract & Document","workspace.form.doc":"Document","workspace.form.skip":"Skip","workspace.form.apply":"Apply & Next","workspace.form.applyLast":"Apply & Finish","workspace.result.title":"Workspace documentation created!","workspace.result.outputDir":"Output folder:","workspace.result.files":"Files","workspace.result.errors":"Errors","workspace.result.openOverview":"Open overview","workspace.result.openLog":"Open error log","workspace.result.backHome":"Back to start"},FC={de:jL,en:HL},zv="en",PL=FC[zv]??FC.de;function Je(){function e(t){return PL[t]??t}return{t:e,locale:zv}}function eg({children:e,onClick:t,className:i=""}){function a(o){o.key==="Enter"&&t&&t()}return _.jsx("div",{role:"button",tabIndex:0,className:`card-component ${i}`,onClick:t,onKeyDown:a,style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-lg)",border:"2px solid transparent",cursor:t?"pointer":"default",transition:"box-shadow var(--transition-normal), border-color var(--transition-normal)"},onMouseEnter:o=>{o.currentTarget.style.borderColor="var(--color-primary)",o.currentTarget.style.boxShadow="var(--shadow-elevated)"},onMouseLeave:o=>{o.currentTarget.style.borderColor="transparent",o.currentTarget.style.boxShadow="var(--shadow-card)"},children:e})}function WL(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("text",{x:"10",y:"14.5",textAnchor:"middle",fontSize:"12",fill:"currentColor",fontFamily:"serif",fontWeight:"bold",children:"i"})]})}const UL=[{type:"fabric",titleKey:"connection.fabric",descKey:"connection.fabric.desc"},{type:"local",titleKey:"connection.local",descKey:"connection.local.desc"},{type:"pbip",titleKey:"connection.pbip",descKey:"connection.pbip.desc"},{type:"update",titleKey:"connection.update",descKey:"connection.update.desc"}];function YL(){const{t:e}=Je(),t=Ur();function i(a){t({type:"selectConnection",payload:a})}return _.jsxs("main",{style:{position:"relative",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},children:[_.jsx("img",{src:"./images/LogoBlack.png",alt:"Logo",style:{height:"80px",marginBottom:"var(--spacing-md)"}}),_.jsx("h1",{style:{marginBottom:"var(--spacing-xs)"},children:e("app.title")}),_.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-sm)",fontStyle:"italic"},children:"by AI & BI Specialist Oliver Gropp"}),_.jsx("p",{style:{color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xl)"},children:e("welcome.subtitle")}),_.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"var(--spacing-md)",width:"100%",maxWidth:"800px"},children:UL.slice(0,3).map(a=>_.jsxs(eg,{onClick:()=>i(a.type),children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e(a.titleKey)}),_.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e(a.descKey)})]},a.type))}),_.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"var(--spacing-md)",width:"100%",maxWidth:"800px",marginTop:"var(--spacing-lg)"},children:[_.jsx("div",{style:{width:"280px"},children:_.jsxs(eg,{onClick:()=>i("update"),children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e("connection.update")}),_.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e("connection.update.desc")})]})}),_.jsx("div",{style:{width:"280px"},children:_.jsxs(eg,{onClick:()=>t({type:"startWorkspace"}),children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e("connection.workspace")}),_.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e("connection.workspace.desc")})]})})]}),_.jsx("div",{style:{width:"100%",maxWidth:"800px",marginTop:"var(--spacing-xl)",borderTop:"1px solid var(--color-border)",paddingTop:"var(--spacing-lg)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--spacing-sm)"},children:_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[_.jsx("button",{onClick:()=>t({type:"startReadiness"}),title:e("readiness.hint"),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("readiness.button")}),_.jsx("button",{onClick:()=>t({type:"showTemplateEditor"}),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("templateEditor.button")}),_.jsx("button",{onClick:()=>t({type:"showDiffView"}),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("diff.button")}),_.jsx("button",{onClick:()=>t({type:"showChangelog"}),title:e("changelog.tooltip"),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("changelog.button")})]})}),_.jsx("button",{onClick:()=>t({type:"showImprint"}),title:e("imprint.tooltip"),"aria-label":e("imprint.tooltip"),style:{position:"absolute",bottom:"var(--spacing-md)",right:"var(--spacing-md)",width:"20px",height:"20px",padding:0,border:"none",background:"none",color:"var(--color-text-hint)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:_.jsx(WL,{})})]})}function Be(e){try{const t=JSON.parse(e);return typeof t!="object"||t===null||!("success"in t)?{success:!1,error:{type:"UnexpectedError",message:"Bridge response is not a valid BridgeResponse object."}}:t}catch{return{success:!1,error:{type:"UnexpectedError",message:`Failed to parse Bridge response: ${e}`}}}}async function Am(e){const t=await window.pywebview.api.connect(JSON.stringify(e));return Be(t)}async function GL(){const e=await window.pywebview.api.cancel_operation();return Be(e)}async function $v(){const e=await window.pywebview.api.get_progress();return Be(e)}async function VL(){const e=await window.pywebview.api.get_form_data();return Be(e)}async function XL(e){const t=await window.pywebview.api.validate_form(JSON.stringify(e));return Be(t)}async function QL(e,t){const i=await window.pywebview.api.save_document(JSON.stringify(e),t);return Be(i)}async function Nv(){const e=await window.pywebview.api.select_folder();return Be(e)}async function qv(e){const t=await window.pywebview.api.select_file(e);return Be(t)}async function Bc(e){const t=await window.pywebview.api.open_file_external(e);return Be(t)}async function rg(e){const t=await window.pywebview.api.get_document_content(e);return Be(t)}async function ZL(e){const t=await window.pywebview.api.load_existing_doc(e);return Be(t)}async function KL(){const e=await window.pywebview.api.discover_local_instances();return Be(e)}async function JL(e){const t=await window.pywebview.api.run_readiness_analysis(e);return Be(t)}async function tA(e,t=""){const i=await window.pywebview.api.export_pdf(e,t);return Be(i)}async function eA(e,t){const i=await window.pywebview.api.export_html(e,t);return Be(i)}async function rA(){const e=await window.pywebview.api.get_template();return Be(e)}async function iA(e){const t=await window.pywebview.api.save_template(e);return Be(t)}async function aA(e,t){const i=await window.pywebview.api.compare_documents(e,t);return Be(i)}async function nA(e,t,i){const a=await window.pywebview.api.workspace_start(JSON.stringify({params:e}),t,i);return Be(a)}async function oA(){const e=await window.pywebview.api.workspace_extract();return Be(e)}async function sA(e){const t=await window.pywebview.api.workspace_get_document_form(e);return Be(t)}async function lA(e,t){const i=await window.pywebview.api.workspace_save_document_form(e,JSON.stringify(t));return Be(i)}async function cA(){const e=await window.pywebview.api.workspace_finalize();return Be(e)}const hA={tenantId:"",workspaceId:"",datasetId:"",reportId:"",clientId:"",clientSecret:""};function uA(){const{t:e}=Je(),t=Ur(),{fabricForm:i,error:a}=Tn(),[o,l]=yt.useState(i??hA),[c,h]=yt.useState({}),[d,f]=yt.useState(!1),[p,g]=yt.useState(!1),x=(a==null?void 0:a.message)??null;function y(w,B){l(L=>({...L,[w]:B})),w in c&&h(L=>{const F={...L};return delete F[w],F})}function C(){const w={};return o.workspaceId.trim()||(w.workspaceId=e("fabric.error.workspaceRequired")),o.datasetId.trim()||(w.datasetId=e("fabric.error.datasetRequired")),h(w),Object.keys(w).length===0}async function k(){if(C()){t({type:"setFabricForm",payload:o}),g(!0);try{t({type:"startProgress"});const w=await Am({connectionType:"fabric",params:{tenantId:o.tenantId||void 0,workspaceId:o.workspaceId,datasetId:o.datasetId,reportId:o.reportId||void 0,clientId:o.clientId||void 0,clientSecret:o.clientSecret||void 0}});w.success||t({type:"connectionFailed",payload:{connectionType:"fabric",error:w.error??{type:"UnexpectedError",message:e("error.unexpected")}}})}catch{t({type:"connectionFailed",payload:{connectionType:"fabric",error:{type:"UnexpectedError",message:e("error.unexpected")}}})}finally{g(!1)}}}function v(){t({type:"goBack"})}return _.jsx("main",{style:je.container,children:_.jsxs("div",{style:je.dialogCard,children:[_.jsx("h2",{style:je.title,children:e("connection.fabric")}),_.jsx("p",{style:je.description,children:e("connection.fabric.desc")}),x&&_.jsx("div",{style:je.errorBanner,role:"alert",children:x}),_.jsxs("div",{style:je.fieldsContainer,children:[_.jsx(fs,{label:e("fabric.tenantId"),value:o.tenantId,onChange:w=>y("tenantId",w),placeholder:e("fabric.tenantId.placeholder")}),_.jsx(fs,{label:e("fabric.workspaceId"),value:o.workspaceId,onChange:w=>y("workspaceId",w),placeholder:e("fabric.workspaceId.placeholder"),required:!0,error:c.workspaceId}),_.jsx(fs,{label:e("fabric.datasetId"),value:o.datasetId,onChange:w=>y("datasetId",w),placeholder:e("fabric.datasetId.placeholder"),required:!0,error:c.datasetId}),_.jsx(fs,{label:e("fabric.reportId"),value:o.reportId,onChange:w=>y("reportId",w),placeholder:e("fabric.reportId.placeholder"),hint:e("fabric.reportId.hint")})]}),_.jsxs("div",{style:je.advancedSection,children:[_.jsxs("button",{type:"button",onClick:()=>f(!d),style:je.advancedToggle,"aria-expanded":d,children:[_.jsx("span",{style:je.advancedIcon,children:d?"▾":"▸"}),e("fabric.advanced")]}),d&&_.jsxs("div",{style:je.advancedContent,children:[_.jsx(fs,{label:e("fabric.clientId"),value:o.clientId,onChange:w=>y("clientId",w),placeholder:e("fabric.clientId.placeholder")}),_.jsx(fs,{label:e("fabric.clientSecret"),value:o.clientSecret,onChange:w=>y("clientSecret",w),placeholder:e("fabric.clientSecret.placeholder"),type:"password"})]})]}),_.jsxs("div",{style:je.actions,children:[_.jsx("button",{type:"button",onClick:v,style:je.backButton,children:e("dialog.back")}),_.jsx("button",{type:"button",onClick:k,disabled:p,style:je.connectButton,children:e(p?"fabric.connecting":"dialog.connect")})]})]})})}function fs({label:e,value:t,onChange:i,placeholder:a,required:o,error:l,hint:c,type:h="text"}){const d=`fabric-${e.toLowerCase().replace(/\s+/g,"-")}`;return _.jsxs("div",{style:je.fieldWrapper,children:[_.jsxs("label",{htmlFor:d,style:je.label,children:[e,o&&_.jsx("span",{style:je.requiredMark,children:" *"})]}),_.jsx("input",{id:d,type:h,value:t,onChange:f=>i(f.target.value),placeholder:a,style:{...je.input,...l?je.inputError:{}},"aria-required":o,"aria-invalid":!!l,"aria-describedby":l?`${d}-error`:c?`${d}-hint`:void 0}),l&&_.jsx("span",{id:`${d}-error`,style:je.errorText,role:"alert",children:l}),c&&!l&&_.jsx("span",{id:`${d}-hint`,style:je.hintText,children:c})]})}const je={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"480px"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",marginBottom:"var(--spacing-xs)"},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-lg)"},errorBanner:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-md)",border:"1px solid var(--color-error)"},fieldsContainer:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},fieldWrapper:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},label:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},requiredMark:{color:"var(--color-error)"},input:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",outline:"none",transition:"border-color var(--transition-fast)",fontFamily:"var(--font-family)"},inputError:{borderColor:"var(--color-error)",borderWidth:"2px"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-hint)"},hintText:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)"},advancedSection:{marginTop:"var(--spacing-lg)"},advancedToggle:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",background:"none",border:"none",cursor:"pointer",fontSize:"var(--font-size-body)",color:"var(--color-primary)",fontWeight:"var(--font-weight-semibold)",padding:"var(--spacing-xs) 0",fontFamily:"var(--font-family)"},advancedIcon:{fontSize:"var(--font-size-body)"},advancedContent:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)",paddingLeft:"var(--spacing-md)",borderLeft:"2px solid var(--color-border)"},actions:{display:"flex",justifyContent:"space-between",marginTop:"var(--spacing-xl)",gap:"var(--spacing-md)"},backButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)"},connectButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"none",borderRadius:"var(--radius-sm)",background:"var(--color-primary)",color:"var(--color-primary-contrast)",cursor:"pointer",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",transition:"background-color var(--transition-fast)"}};function dA(){const{t:e}=Je(),t=Ur(),[i,a]=yt.useState([]),[o,l]=yt.useState(null),[c,h]=yt.useState(!1),[d,f]=yt.useState(!1),[p,g]=yt.useState(null),[x,y]=yt.useState(!1);async function C(){var B;h(!0),g(null),a([]),l(null),f(!1);const w=await KL();if(h(!1),f(!0),!w.success){g(((B=w.error)==null?void 0:B.message)??e("error.unexpected"));return}a(w.data??[])}yt.useEffect(()=>{C()},[]);async function k(){var B;if(o===null)return;y(!0),g(null),t({type:"startProgress"});const w=await Am({connectionType:"local",params:{port:o}});y(!1),w.success||(g(((B=w.error)==null?void 0:B.message)??e("error.unexpected")),t({type:"selectConnection",payload:"local"}))}function v(){t({type:"goBack"})}return _.jsx("main",{style:lr.container,children:_.jsxs("div",{style:lr.dialogCard,children:[_.jsx("h2",{style:lr.title,children:e("connection.local")}),_.jsxs("div",{style:lr.content,children:[_.jsx("button",{type:"button",onClick:C,disabled:c,style:lr.discoverButton,onMouseEnter:w=>{c||(w.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(c?"local.searching":"local.discover")}),d&&i.length>0&&_.jsxs("div",{style:lr.listContainer,children:[_.jsx("label",{style:lr.listLabel,children:e("local.selectInstance")}),_.jsx("ul",{style:lr.list,children:i.map(w=>_.jsxs("li",{role:"option","aria-selected":o===w.port,tabIndex:0,onClick:()=>l(w.port),onKeyDown:B=>{B.key==="Enter"&&l(w.port)},style:{...lr.listItem,borderColor:o===w.port?"var(--color-primary)":"var(--color-border)",backgroundColor:o===w.port?"var(--color-success-bg)":"var(--color-surface)"},children:[_.jsx("span",{style:lr.instanceName,children:w.name}),_.jsxs("span",{style:lr.instancePort,children:["Port ",w.port]})]},w.port))})]}),d&&i.length===0&&!p&&_.jsx("p",{style:lr.noInstances,children:e("local.noInstances")}),p&&_.jsx("div",{style:lr.errorContainer,role:"alert",children:_.jsx("p",{style:lr.errorText,children:p})})]}),_.jsxs("div",{style:lr.actions,children:[_.jsx("button",{type:"button",onClick:v,style:lr.backButton,onMouseEnter:w=>{w.currentTarget.style.borderColor="var(--color-primary)"},onMouseLeave:w=>{w.currentTarget.style.borderColor="var(--color-border)"},children:e("dialog.back")}),_.jsx("button",{type:"button",onClick:k,disabled:o===null||x,style:{...lr.connectButton,opacity:o===null||x?.5:1,cursor:o===null||x?"not-allowed":"pointer"},onMouseEnter:w=>{o!==null&&!x&&(w.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(x?"progress.connecting":"dialog.connect")})]})]})})}const lr={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"560px",display:"flex",flexDirection:"column",gap:"var(--spacing-lg)"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",margin:0},content:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},discoverButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-normal)",alignSelf:"flex-start"},listContainer:{display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},listLabel:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text-secondary)"},list:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",maxHeight:"240px",overflowY:"auto"},listItem:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",border:"2px solid",cursor:"pointer",transition:"border-color var(--transition-fast), background-color var(--transition-fast)"},instanceName:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)"},instancePort:{fontSize:"var(--font-size-hint)",color:"var(--color-text-hint)"},noInstances:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",fontStyle:"italic",padding:"var(--spacing-md)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",margin:0},errorContainer:{backgroundColor:"var(--color-error-bg)",border:"1px solid var(--color-error)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-body)",margin:0},actions:{display:"flex",justifyContent:"space-between",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)"},backButton:{backgroundColor:"transparent",color:"var(--color-text)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"border-color var(--transition-normal)"},connectButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",transition:"background-color var(--transition-normal)"}};function fA(){const{t:e}=Je(),{activeFlow:t}=Tn(),i=Ur(),[a,o]=yt.useState(null),[l,c]=yt.useState(null),[h,d]=yt.useState(!1);async function f(){c(null);const x=await Nv();x.success&&x.data?o(x.data):x.error&&c(x.error.message)}async function p(){var x,y;if(a)if(c(null),d(!0),t==="readiness"){i({type:"startProgress"});const C=await JL(a);if(C.success&&C.data)i({type:"showReadinessResult",payload:{outputPath:C.data.filePath}});else{const k=((x=C.error)==null?void 0:x.type)??"UnexpectedError",v=((y=C.error)==null?void 0:y.message)??"Unbekannter Fehler";i({type:"showError",payload:{type:k,message:v}}),i({type:"goBack"})}}else{const C=await Am({connectionType:"pbip",params:{folderPath:a}});C.success?i({type:"startProgress"}):C.error&&(c(C.error.message),d(!1))}}function g(){i({type:"goBack"})}return _.jsx("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},children:_.jsxs("div",{style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"500px"},children:[_.jsx("h2",{style:{fontSize:"var(--font-size-heading)",marginBottom:"var(--spacing-lg)"},children:e("pbip.title")}),_.jsx("div",{style:{marginBottom:"var(--spacing-lg)"},children:_.jsx("button",{type:"button",onClick:f,disabled:h,style:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:h?"not-allowed":"pointer",opacity:h?.6:1,transition:"background-color var(--transition-fast)",width:"100%"},children:e("pbip.selectFolder")})}),_.jsxs("div",{style:{marginBottom:"var(--spacing-lg)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",border:"1px solid var(--color-border)",fontSize:"var(--font-size-body)",wordBreak:"break-all"},children:[_.jsx("span",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-hint)"},children:e("pbip.selectedPath")}),_.jsx("p",{style:{margin:"var(--spacing-xs) 0 0 0",color:a?"var(--color-text)":"var(--color-text-hint)"},children:a??e("pbip.noFolder")})]}),l&&_.jsx("div",{role:"alert",style:{marginBottom:"var(--spacing-md)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",border:"1px solid var(--color-error)",color:"var(--color-error)",fontSize:"var(--font-size-body)"},children:l}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)",justifyContent:"flex-end"},children:[_.jsx("button",{type:"button",onClick:g,disabled:h,style:{backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:h?"not-allowed":"pointer",opacity:h?.6:1,transition:"background-color var(--transition-fast)"},children:e("dialog.back")}),_.jsx("button",{type:"button",onClick:p,disabled:!a||h,style:{backgroundColor:a&&!h?"var(--color-primary)":"var(--color-border)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:a&&!h?"pointer":"not-allowed",transition:"background-color var(--transition-fast)"},children:e("dialog.connect")})]})]})})}function pA(){const{t:e}=Je(),t=Ur(),[i,a]=yt.useState(null),[o,l]=yt.useState(null),[c,h]=yt.useState(null),[d,f]=yt.useState(!1);async function p(){var v;h(null);const y=await qv("Markdown files (*.md)");if(!y.success||!y.data){y.error&&h(y.error.message);return}const C=y.data;a(C),f(!0);const k=await ZL(C);if(f(!1),!k.success||!k.data){l(null),h(((v=k.error)==null?void 0:v.message)??e("error.unexpected"));return}l(k.data)}function g(){t({type:"goBack"})}function x(){t({type:"goBack"})}return _.jsx("main",{style:Xe.container,children:_.jsxs("div",{style:Xe.dialog,children:[_.jsx("h2",{style:Xe.title,children:e("connection.update")}),_.jsx("p",{style:Xe.description,children:e("connection.update.desc")}),_.jsx("button",{type:"button",onClick:p,disabled:d,style:Xe.selectButton,children:e("update.selectFile")}),i&&_.jsx("p",{style:Xe.filePath,title:i,children:i}),d&&_.jsx("p",{style:Xe.loading,children:e("update.loading")}),o&&_.jsxs("div",{style:Xe.infoBox,children:[_.jsxs("div",{style:Xe.infoRow,children:[_.jsxs("span",{style:Xe.infoLabel,children:[e("update.version"),":"]}),_.jsx("span",{style:Xe.infoValue,children:o.version})]}),_.jsxs("div",{style:Xe.infoRow,children:[_.jsxs("span",{style:Xe.infoLabel,children:[e("update.lastUpdated"),":"]}),_.jsx("span",{style:Xe.infoValue,children:o.lastUpdated})]})]}),c&&_.jsx("div",{style:Xe.errorBox,role:"alert",children:_.jsx("p",{style:Xe.errorText,children:c})}),_.jsxs("div",{style:Xe.actions,children:[_.jsx("button",{type:"button",onClick:g,style:Xe.backButton,children:e("dialog.back")}),o&&_.jsx("button",{type:"button",onClick:x,style:Xe.continueButton,children:e("update.continue")})]})]})})}const Xe={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialog:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"500px",display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",margin:0},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},selectButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)",alignSelf:"flex-start"},filePath:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",margin:0,wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis"},loading:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",margin:0},infoBox:{backgroundColor:"var(--color-success-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-md)",display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},infoRow:{display:"flex",gap:"var(--spacing-sm)",alignItems:"center"},infoLabel:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},infoValue:{fontSize:"var(--font-size-body)",color:"var(--color-text)"},errorBox:{backgroundColor:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-md)",border:"1px solid var(--color-error)"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-body)",margin:0},actions:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"var(--spacing-sm)"},backButton:{backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},continueButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"}},gA=200;function mA(){const e=Ur(),{view:t,connectionType:i}=Tn(),a=yt.useRef(null),o=yt.useRef(!1);yt.useEffect(()=>{if(t!=="Progress")return;function l(){a.current=setInterval(async()=>{var h,d;if(!o.current){o.current=!0;try{const f=await $v();if(!f.success||!f.data){ig(e,i,{type:((h=f.error)==null?void 0:h.type)??"UnexpectedError",message:((d=f.error)==null?void 0:d.message)??"Progress polling failed"}),c();return}const{percent:p,message:g,phase:x}=f.data;if(e({type:"progressUpdate",payload:{percent:p,message:g,phase:x}}),x==="done"){const y=await VL();y.success&&y.data?e({type:"showForm",payload:{sections:y.data.sections,tableGroups:y.data.tableGroups||[]}}):e({type:"showForm",payload:{sections:[],tableGroups:[]}}),c()}else x==="error"&&(ig(e,i,{type:"UnexpectedError",message:g}),c())}catch{ig(e,i,{type:"UnexpectedError",message:"Progress polling failed unexpectedly"}),c()}finally{o.current=!1}}},gA)}function c(){a.current!==null&&(clearInterval(a.current),a.current=null)}return l(),()=>{c()}},[t,i,e])}function ig(e,t,i){t?e({type:"connectionFailed",payload:{connectionType:t,error:i}}):(e({type:"showError",payload:i}),e({type:"goBack"}))}const DC={connecting:"progress.connecting",extracting:"progress.extracting",mapping:"progress.mapping",categorizing:"progress.categorizing",done:"progress.connecting",error:"progress.connecting"};function yA(){const{t:e}=Je(),{progress:t}=Tn();mA();const i=(t==null?void 0:t.percent)??0,a=(t==null?void 0:t.phase)??"connecting",o=a in DC?e(DC[a]):(t==null?void 0:t.message)??"";return _.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-md)"},children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:o}),_.jsx("div",{role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,style:{width:"100%",maxWidth:"480px",height:"8px",backgroundColor:"var(--color-border)",borderRadius:"4px",overflow:"hidden"},children:_.jsx("div",{style:{width:`${i}%`,height:"100%",backgroundColor:"var(--color-primary)",borderRadius:"4px",transition:"width 200ms ease-out"}})}),_.jsxs("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:[i,"%"]})]})}function xA({autoCount:e,manualCount:t,partialCount:i}){const{t:a}=Je();return _.jsxs("div",{className:"category-bar",role:"status","aria-label":"Field summary",style:{display:"flex",alignItems:"center",gap:"var(--spacing-md)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-sm)",boxShadow:"var(--shadow-card)",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[_.jsxs("span",{"data-testid":"category-auto",children:[_.jsx("strong",{children:e})," ",a("form.summary.auto")]}),_.jsx("span",{"aria-hidden":"true",style:{color:"var(--color-border)"},children:"|"}),_.jsxs("span",{"data-testid":"category-manual",children:[_.jsx("strong",{children:t})," ",a("form.summary.manual")]}),_.jsx("span",{"aria-hidden":"true",style:{color:"var(--color-border)"},children:"|"}),_.jsxs("span",{"data-testid":"category-partial",children:[_.jsx("strong",{children:i})," ",a("form.summary.partial")]})]})}function bA({name:e,label:t,value:i,source:a,tooltip:o,options:l,required:c,error:h,onChange:d,onEditTable:f}){const{t:p}=Je(),[g,x]=yt.useState(!1),y=yt.useRef(null),C=yt.useRef(null),k=a==="auto",v=!!h,w=l&&l.length>0;yt.useEffect(()=>{if(!g)return;function F(D){y.current&&!y.current.contains(D.target)&&C.current&&!C.current.contains(D.target)&&x(!1)}return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[g]);const B=`field-${e}`,L=`error-${e}`;return _.jsxs("div",{className:"form-field",style:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",marginBottom:"var(--spacing-md)"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},children:[_.jsxs("label",{htmlFor:B,style:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},children:[t,c&&_.jsx("span",{style:{color:"var(--color-error)",marginLeft:"2px"},children:"*"})]}),k&&_.jsx("span",{"data-testid":`auto-label-${e}`,style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-hint)",fontStyle:"italic"},children:p("form.autoLabel")}),o&&_.jsxs("span",{style:{position:"relative",display:"inline-flex"},children:[_.jsx("button",{ref:C,type:"button","aria-label":`Info: ${t}`,"aria-expanded":g,onClick:()=>x(F=>!F),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),style:{background:"none",border:"none",cursor:"pointer",padding:"0 2px",fontSize:"var(--font-size-body)",color:"var(--color-primary)",lineHeight:1},children:"ⓘ"}),g&&_.jsx("div",{ref:y,role:"tooltip",style:{position:"absolute",top:"100%",left:0,zIndex:100,maxWidth:"300px",padding:"var(--spacing-sm)",backgroundColor:"var(--color-text)",color:"var(--color-primary-contrast)",fontSize:"var(--font-size-hint)",borderRadius:"var(--radius-sm)",boxShadow:"var(--shadow-elevated)",lineHeight:"var(--line-height-body)",marginTop:"4px"},children:o})]})]}),w?_.jsxs("select",{id:B,value:i,onChange:F=>d(e,F.target.value),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%"},onFocus:F=>{v||(F.currentTarget.style.borderColor="var(--color-focus)")},onBlur:F=>{v||(F.currentTarget.style.borderColor="var(--color-border)")},children:[_.jsx("option",{value:"",children:"—"}),l.map(F=>_.jsx("option",{value:F,children:F},F))]}):i.includes(`
`)||i.length>80?_.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},children:[_.jsx("textarea",{id:B,value:i,onChange:F=>d(e,F.target.value),rows:Math.min(Math.max(i.split(`
`).length,2),8),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%",resize:"vertical"},onFocus:F=>{v||(F.currentTarget.style.borderColor="var(--color-focus)")},onBlur:F=>{v||(F.currentTarget.style.borderColor="var(--color-border)")}}),f&&_.jsx("button",{type:"button",onClick:f,style:{alignSelf:"flex-start",padding:"var(--spacing-xs) var(--spacing-sm)",fontSize:"var(--font-size-hint)",fontFamily:"var(--font-family)",color:"var(--color-primary)",backgroundColor:"transparent",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:p("tableEditor.title")})]}):_.jsx("input",{id:B,type:"text",value:i,onChange:F=>d(e,F.target.value),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%"},onFocus:F=>{v||(F.currentTarget.style.borderColor="var(--color-focus)")},onBlur:F=>{v||(F.currentTarget.style.borderColor="var(--color-border)")}}),v&&_.jsx("p",{id:L,role:"alert",style:{color:"var(--color-error)",fontSize:"var(--font-size-hint)",margin:0,paddingTop:"2px"},children:h.message})]})}function RC(e){return e.some(t=>t.trim().length>0)}function OC({columns:e,initialRows:t,onSave:i,onCancel:a}){const{t:o}=Je(),[l,c]=yt.useState(()=>t.length>0?t.map(x=>[...x]):[e.map(()=>"")]),h=l.filter(RC).length,d=yt.useCallback((x,y,C)=>{c(k=>k.map((v,w)=>w===x?v.map((B,L)=>L===y?C:B):v))},[]),f=yt.useCallback(()=>{c(x=>[...x,e.map(()=>"")])},[e]),p=yt.useCallback(()=>{c(x=>x.length>1?x.slice(0,-1):x)},[]),g=yt.useCallback(()=>{const x=l.filter(RC);i(x)},[l,i]);return _.jsx("div",{className:"table-editor-overlay",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:x=>{x.target===x.currentTarget&&a()},onKeyDown:x=>{x.key==="Escape"&&a()},children:_.jsxs("div",{className:"table-editor-modal",role:"dialog","aria-modal":"true","aria-label":o("tableEditor.title"),style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-elevated)",padding:"var(--spacing-lg)",maxWidth:"90vw",maxHeight:"80vh",minWidth:"400px",display:"flex",flexDirection:"column",gap:"var(--spacing-md)",overflow:"hidden"},children:[_.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[_.jsx("h2",{style:{margin:0,fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},children:o("tableEditor.title")}),_.jsxs("span",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:["(",h," ",h===1?"Eintrag":"Einträge",")"]})]}),_.jsx("div",{style:{overflowX:"auto",overflowY:"auto",flex:1},children:_.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)"},children:[_.jsx("thead",{children:_.jsx("tr",{children:e.map((x,y)=>_.jsx("th",{style:{textAlign:"left",padding:"var(--spacing-sm) var(--spacing-md)",borderBottom:"2px solid var(--color-border)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",whiteSpace:"nowrap"},children:x},y))})}),_.jsx("tbody",{children:l.map((x,y)=>_.jsx("tr",{children:x.map((C,k)=>_.jsx("td",{style:{padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:_.jsx("input",{type:"text",value:C,onChange:v=>d(y,k,v.target.value),"aria-label":`${e[k]} Zeile ${y+1}`,style:{width:"100%",padding:"var(--spacing-xs) var(--spacing-sm)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",outline:"none",transition:"border-color var(--transition-fast)"},onFocus:v=>{v.currentTarget.style.borderColor="var(--color-primary)"},onBlur:v=>{v.currentTarget.style.borderColor="var(--color-border)"}})},k))},y))})]})}),_.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"var(--spacing-sm)"},children:[_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[_.jsx("button",{type:"button",onClick:f,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",color:"var(--color-primary)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.addRow")}),_.jsx("button",{type:"button",onClick:p,disabled:l.length<=1,"aria-label":o("tableEditor.deleteRow"),style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-error)",borderRadius:"var(--radius-sm)",color:"var(--color-error)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:l.length<=1?"not-allowed":"pointer",opacity:l.length<=1?.5:1,transition:"opacity var(--transition-fast)"},children:o("tableEditor.deleteRow")})]}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[_.jsx("button",{type:"button",onClick:a,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",color:"var(--color-text)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.cancel")}),_.jsx("button",{type:"button",onClick:g,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",color:"var(--color-primary-contrast)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.save")})]})]})]})})}function CA(){const{t:e}=Je(),{formSections:t,tableGroups:i}=Tn(),a=Ur(),[o,l]=yt.useState(()=>{const F={};if(t)for(const D of t)for(const z of D.fields)F[z.name]=z.value;return F}),[c,h]=yt.useState(!1),[d,f]=yt.useState([]),[p,g]=yt.useState(!1),[x,y]=yt.useState(null),[C,k]=yt.useState(()=>{const F={};if(i)for(const D of i)F[D.id]=D.rows.length>0?D.rows:[];return F}),v=yt.useMemo(()=>{let F=0,D=0,z=0;if(t){for(const N of t)for(const P of N.fields)if(!P.tableGroup)switch(P.source){case"auto":F++;break;case"manual":D++;break;case"partial":z++;break}}return{autoCount:F,manualCount:D,partialCount:z}},[t]),w=yt.useCallback((F,D)=>{l(z=>({...z,[F]:D})),f(z=>z.filter(N=>N.field!==F))},[]),B=yt.useMemo(()=>{const F={};for(const D of d)F[D.field]=D;return F},[d]),L=async()=>{g(!0),f([]);try{const F={...o};if(i)for(const N of i){const P=C[N.id]||[],at=(t==null?void 0:t.flatMap(Y=>Y.fields).filter(Y=>Y.tableGroup===N.id))||[],K=i.find(Y=>Y.id===N.id);if(K)for(let Y=0;Y<K.columns.length;Y++){const W=at[Y];W&&(F[W.name]=P.map(X=>X[Y]||"").join(`
`))}}const D=await XL(F);if(D.success&&D.data&&D.data.length>0&&!c){f(D.data),g(!1);return}const z=await QL(F,c);z.success&&z.data?a({type:"showResult",payload:{outputPath:z.data.outputPath}}):z.error&&a({type:"showError",payload:{type:z.error.type,message:z.error.message}})}catch{a({type:"showError",payload:{type:"UnexpectedError",message:e("error.unexpected")}})}finally{g(!1)}};return t?_.jsxs("main",{className:"form-view",style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[_.jsxs("div",{style:{padding:"var(--spacing-md) var(--spacing-lg)",borderBottom:"1px solid var(--color-border)",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"var(--spacing-md)"},children:[_.jsx(xA,{autoCount:v.autoCount,manualCount:v.manualCount,partialCount:v.partialCount}),_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-md)"},children:[_.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",cursor:"pointer"},children:[_.jsx("input",{type:"checkbox",checked:c,onChange:F=>h(F.target.checked),style:{accentColor:"var(--color-primary)"}}),e("form.ignoreRequired")]}),_.jsx("button",{type:"button",onClick:L,disabled:p,style:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",fontFamily:"var(--font-family)",color:"var(--color-primary-contrast)",backgroundColor:p?"var(--color-text-hint)":"var(--color-primary)",border:"none",borderRadius:"var(--radius-sm)",cursor:p?"not-allowed":"pointer",transition:"background-color var(--transition-fast)",outline:"none"},onMouseEnter:F=>{p||(F.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:F=>{p||(F.currentTarget.style.backgroundColor="var(--color-primary)")},onFocus:F=>{F.currentTarget.style.boxShadow="0 0 0 var(--focus-ring-width) var(--focus-ring-color)"},onBlur:F=>{F.currentTarget.style.boxShadow="none"},children:e(p?"form.saving":"form.save")})]})]}),_.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"var(--spacing-lg)"},children:[t.map(F=>_.jsxs("section",{style:{marginBottom:"var(--spacing-xl)",padding:"var(--spacing-lg)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)"},children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginTop:0,marginBottom:"var(--spacing-md)",paddingBottom:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:F.title}),F.fields.filter(D=>!D.tableGroup).map(D=>{const z=o[D.name]??D.value,N=z.includes(`
`)||z.length>80;return _.jsx(bA,{name:D.name,label:D.label,value:z,source:D.source,tooltip:D.tooltip,options:D.options,required:D.required,error:B[D.name],onChange:w,onEditTable:N?()=>y(`field:${D.name}`):void 0},D.name)})]},F.title)),i&&i.map(F=>{const D=C[F.id]||[],z=D.some(N=>N.some(P=>P.trim().length>0));return _.jsxs("section",{style:{marginBottom:"var(--spacing-xl)",padding:"var(--spacing-lg)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)"},children:[_.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--spacing-md)",paddingBottom:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:[_.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",margin:0},children:F.title}),_.jsx("button",{type:"button",onClick:()=>y(F.id),style:{padding:"var(--spacing-xs) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",color:"var(--color-primary)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:e("tableEditor.title")})]}),z?_.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--font-size-body)"},children:[_.jsx("thead",{children:_.jsx("tr",{children:F.columns.map((N,P)=>_.jsx("th",{style:{textAlign:"left",padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"2px solid var(--color-border)",fontWeight:"var(--font-weight-semibold)"},children:N},P))})}),_.jsx("tbody",{children:D.map((N,P)=>_.jsx("tr",{children:N.map((at,K)=>_.jsx("td",{style:{padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:at},K))},P))})]}):_.jsx("p",{style:{color:"var(--color-text-hint)",fontStyle:"italic",margin:0},children:e("form.noTableData")})]},F.id)})]}),x&&(()=>{if(x.startsWith("field:")){const D=x.slice(6),N=(o[D]??"").split(`
`).filter(K=>K.trim().length>0),P=t==null?void 0:t.flatMap(K=>K.fields).find(K=>K.name===D),at=(P==null?void 0:P.label)||D;return _.jsx(OC,{columns:[at],initialRows:N.map(K=>[K]),onSave:K=>{const Y=K.map(W=>W[0]).join(`
`);l(W=>({...W,[D]:Y})),y(null)},onCancel:()=>y(null)})}if(!i)return null;const F=i.find(D=>D.id===x);return F?_.jsx(OC,{columns:F.columns,initialRows:C[x]||[],onSave:D=>{k(z=>({...z,[x]:D})),y(null)},onCancel:()=>y(null)}):null})()]}):null}const vA="modulepreload",kA=function(e,t){return new URL(e,t).href},zC={},Xt=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let c=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};const h=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(i.map(p=>{if(p=kA(p,a),p in zC)return;zC[p]=!0;const g=p.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(!!a)for(let k=h.length-1;k>=0;k--){const v=h[k];if(v.href===p&&(!g||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${x}`))return;const C=document.createElement("link");if(C.rel=g?"stylesheet":vA,g||(C.as="script"),C.crossOrigin="",C.href=p,f&&C.setAttribute("nonce",f),document.head.appendChild(C),g)return new Promise((k,v)=>{C.addEventListener("load",k),C.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return o.then(c=>{for(const h of c||[])h.status==="rejected"&&l(h.reason);return t().catch(l)})};var Iv=Object.defineProperty,S=(e,t)=>Iv(e,"name",{value:t,configurable:!0}),SA=(e,t)=>{for(var i in t)Iv(e,i,{get:t[i],enumerable:!0})},Lu={exports:{}},wA=Lu.exports,$C;function TA(){return $C||($C=1,(function(e,t){(function(i,a){e.exports=a()})(wA,(function(){var i=1e3,a=6e4,o=36e5,l="millisecond",c="second",h="minute",d="hour",f="day",p="week",g="month",x="quarter",y="year",C="date",k="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var H=["th","st","nd","rd"],A=q%100;return"["+q+(H[(A-20)%10]||H[A]||H[0])+"]"}},L=function(q,H,A){var $=String(q);return!$||$.length>=H?q:""+Array(H+1-$.length).join(A)+q},F={s:L,z:function(q){var H=-q.utcOffset(),A=Math.abs(H),$=Math.floor(A/60),I=A%60;return(H<=0?"+":"-")+L($,2,"0")+":"+L(I,2,"0")},m:function q(H,A){if(H.date()<A.date())return-q(A,H);var $=12*(A.year()-H.year())+(A.month()-H.month()),I=H.clone().add($,g),Q=A-I<0,lt=H.clone().add($+(Q?-1:1),g);return+(-($+(A-I)/(Q?I-lt:lt-I))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:g,y,w:p,d:f,D:C,h:d,m:h,s:c,ms:l,Q:x}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},D="en",z={};z[D]=B;var N="$isDayjsObject",P=function(q){return q instanceof W||!(!q||!q[N])},at=function q(H,A,$){var I;if(!H)return D;if(typeof H=="string"){var Q=H.toLowerCase();z[Q]&&(I=Q),A&&(z[Q]=A,I=Q);var lt=H.split("-");if(!I&&lt.length>1)return q(lt[0])}else{var R=H.name;z[R]=H,I=R}return!$&&I&&(D=I),I||!$&&D},K=function(q,H){if(P(q))return q.clone();var A=typeof H=="object"?H:{};return A.date=q,A.args=arguments,new W(A)},Y=F;Y.l=at,Y.i=P,Y.w=function(q,H){return K(q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var W=(function(){function q(A){this.$L=at(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[N]=!0}var H=q.prototype;return H.parse=function(A){this.$d=(function($){var I=$.date,Q=$.utc;if(I===null)return new Date(NaN);if(Y.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var lt=I.match(v);if(lt){var R=lt[2]-1||0,G=(lt[7]||"0").substring(0,3);return Q?new Date(Date.UTC(lt[1],R,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,G)):new Date(lt[1],R,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,G)}}return new Date(I)})(A),this.init()},H.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},H.$utils=function(){return Y},H.isValid=function(){return this.$d.toString()!==k},H.isSame=function(A,$){var I=K(A);return this.startOf($)<=I&&I<=this.endOf($)},H.isAfter=function(A,$){return K(A)<this.startOf($)},H.isBefore=function(A,$){return this.endOf($)<K(A)},H.$g=function(A,$,I){return Y.u(A)?this[$]:this.set(I,A)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(A,$){var I=this,Q=!!Y.u($)||$,lt=Y.p(A),R=function(Nt,Ct){var dt=Y.w(I.$u?Date.UTC(I.$y,Ct,Nt):new Date(I.$y,Ct,Nt),I);return Q?dt:dt.endOf(f)},G=function(Nt,Ct){return Y.w(I.toDate()[Nt].apply(I.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Ct)),I)},ct=this.$W,ut=this.$M,mt=this.$D,vt="set"+(this.$u?"UTC":"");switch(lt){case y:return Q?R(1,0):R(31,11);case g:return Q?R(1,ut):R(0,ut+1);case p:var _t=this.$locale().weekStart||0,jt=(ct<_t?ct+7:ct)-_t;return R(Q?mt-jt:mt+(6-jt),ut);case f:case C:return G(vt+"Hours",0);case d:return G(vt+"Minutes",1);case h:return G(vt+"Seconds",2);case c:return G(vt+"Milliseconds",3);default:return this.clone()}},H.endOf=function(A){return this.startOf(A,!1)},H.$set=function(A,$){var I,Q=Y.p(A),lt="set"+(this.$u?"UTC":""),R=(I={},I[f]=lt+"Date",I[C]=lt+"Date",I[g]=lt+"Month",I[y]=lt+"FullYear",I[d]=lt+"Hours",I[h]=lt+"Minutes",I[c]=lt+"Seconds",I[l]=lt+"Milliseconds",I)[Q],G=Q===f?this.$D+($-this.$W):$;if(Q===g||Q===y){var ct=this.clone().set(C,1);ct.$d[R](G),ct.init(),this.$d=ct.set(C,Math.min(this.$D,ct.daysInMonth())).$d}else R&&this.$d[R](G);return this.init(),this},H.set=function(A,$){return this.clone().$set(A,$)},H.get=function(A){return this[Y.p(A)]()},H.add=function(A,$){var I,Q=this;A=Number(A);var lt=Y.p($),R=function(ut){var mt=K(Q);return Y.w(mt.date(mt.date()+Math.round(ut*A)),Q)};if(lt===g)return this.set(g,this.$M+A);if(lt===y)return this.set(y,this.$y+A);if(lt===f)return R(1);if(lt===p)return R(7);var G=(I={},I[h]=a,I[d]=o,I[c]=i,I)[lt]||1,ct=this.$d.getTime()+A*G;return Y.w(ct,this)},H.subtract=function(A,$){return this.add(-1*A,$)},H.format=function(A){var $=this,I=this.$locale();if(!this.isValid())return I.invalidDate||k;var Q=A||"YYYY-MM-DDTHH:mm:ssZ",lt=Y.z(this),R=this.$H,G=this.$m,ct=this.$M,ut=I.weekdays,mt=I.months,vt=I.meridiem,_t=function(Ct,dt,St,Tt){return Ct&&(Ct[dt]||Ct($,Q))||St[dt].slice(0,Tt)},jt=function(Ct){return Y.s(R%12||12,Ct,"0")},Nt=vt||function(Ct,dt,St){var Tt=Ct<12?"AM":"PM";return St?Tt.toLowerCase():Tt};return Q.replace(w,(function(Ct,dt){return dt||(function(St){switch(St){case"YY":return String($.$y).slice(-2);case"YYYY":return Y.s($.$y,4,"0");case"M":return ct+1;case"MM":return Y.s(ct+1,2,"0");case"MMM":return _t(I.monthsShort,ct,mt,3);case"MMMM":return _t(mt,ct);case"D":return $.$D;case"DD":return Y.s($.$D,2,"0");case"d":return String($.$W);case"dd":return _t(I.weekdaysMin,$.$W,ut,2);case"ddd":return _t(I.weekdaysShort,$.$W,ut,3);case"dddd":return ut[$.$W];case"H":return String(R);case"HH":return Y.s(R,2,"0");case"h":return jt(1);case"hh":return jt(2);case"a":return Nt(R,G,!0);case"A":return Nt(R,G,!1);case"m":return String(G);case"mm":return Y.s(G,2,"0");case"s":return String($.$s);case"ss":return Y.s($.$s,2,"0");case"SSS":return Y.s($.$ms,3,"0");case"Z":return lt}return null})(Ct)||lt.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(A,$,I){var Q,lt=this,R=Y.p($),G=K(A),ct=(G.utcOffset()-this.utcOffset())*a,ut=this-G,mt=function(){return Y.m(lt,G)};switch(R){case y:Q=mt()/12;break;case g:Q=mt();break;case x:Q=mt()/3;break;case p:Q=(ut-ct)/6048e5;break;case f:Q=(ut-ct)/864e5;break;case d:Q=ut/o;break;case h:Q=ut/a;break;case c:Q=ut/i;break;default:Q=ut}return I?Q:Y.a(Q)},H.daysInMonth=function(){return this.endOf(g).$D},H.$locale=function(){return z[this.$L]},H.locale=function(A,$){if(!A)return this.$L;var I=this.clone(),Q=at(A,$,!0);return Q&&(I.$L=Q),I},H.clone=function(){return Y.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},q})(),X=W.prototype;return K.prototype=X,[["$ms",l],["$s",c],["$m",h],["$H",d],["$W",f],["$M",g],["$y",y],["$D",C]].forEach((function(q){X[q[1]]=function(H){return this.$g(H,q[0],q[1])}})),K.extend=function(q,H){return q.$i||(q(H,W,K),q.$i=!0),K},K.locale=at,K.isDayjs=P,K.unix=function(q){return K(1e3*q)},K.en=z[D],K.Ls=z,K.p={},K}))})(Lu)),Lu.exports}var _A=TA();const BA=EL(_A);var Ta={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},gt={trace:S((...e)=>{},"trace"),debug:S((...e)=>{},"debug"),info:S((...e)=>{},"info"),warn:S((...e)=>{},"warn"),error:S((...e)=>{},"error"),fatal:S((...e)=>{},"fatal")},Mm=S(function(e="fatal"){let t=Ta.fatal;typeof e=="string"?e.toLowerCase()in Ta&&(t=Ta[e]):typeof e=="number"&&(t=e),gt.trace=()=>{},gt.debug=()=>{},gt.info=()=>{},gt.warn=()=>{},gt.error=()=>{},gt.fatal=()=>{},t<=Ta.fatal&&(gt.fatal=console.error?console.error.bind(console,pi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pi("FATAL"))),t<=Ta.error&&(gt.error=console.error?console.error.bind(console,pi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pi("ERROR"))),t<=Ta.warn&&(gt.warn=console.warn?console.warn.bind(console,pi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pi("WARN"))),t<=Ta.info&&(gt.info=console.info?console.info.bind(console,pi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pi("INFO"))),t<=Ta.debug&&(gt.debug=console.debug?console.debug.bind(console,pi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pi("DEBUG"))),t<=Ta.trace&&(gt.trace=console.debug?console.debug.bind(console,pi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pi("TRACE")))},"setLogLevel"),pi=S(e=>`%c${BA().format("ss.SSS")} : ${e} : `,"format");const Au={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e),hsl2rgb:({h:e,s:t,l:i},a)=>{if(!t)return i*2.55;e/=360,t/=100,i/=100;const o=i<.5?i*(1+t):i+t-i*t,l=2*i-o;switch(a){case"r":return Au.hue2rgb(l,o,e+1/3)*255;case"g":return Au.hue2rgb(l,o,e)*255;case"b":return Au.hue2rgb(l,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:i},a)=>{e/=255,t/=255,i/=255;const o=Math.max(e,t,i),l=Math.min(e,t,i),c=(o+l)/2;if(a==="l")return c*100;if(o===l)return 0;const h=o-l,d=c>.5?h/(2-o-l):h/(o+l);if(a==="s")return d*100;switch(o){case e:return((t-i)/h+(t<i?6:0))*60;case t:return((i-e)/h+2)*60;case i:return((e-t)/h+4)*60;default:return-1}}},EA={clamp:(e,t,i)=>t>i?Math.min(t,Math.max(i,e)):Math.min(i,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},LA={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Ut={channel:Au,lang:EA,unit:LA},pn={};for(let e=0;e<=255;e++)pn[e]=Ut.unit.dec2hex(e);const xr={ALL:0,RGB:1,HSL:2};class AA{constructor(){this.type=xr.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=xr.ALL}is(t){return this.type===t}}class MA{constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new AA}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=xr.ALL,this}_ensureHSL(){const t=this.data,{h:i,s:a,l:o}=t;i===void 0&&(t.h=Ut.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=Ut.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=Ut.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:i,g:a,b:o}=t;i===void 0&&(t.r=Ut.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=Ut.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=Ut.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,i=t.r;return!this.type.is(xr.HSL)&&i!==void 0?i:(this._ensureHSL(),Ut.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,i=t.g;return!this.type.is(xr.HSL)&&i!==void 0?i:(this._ensureHSL(),Ut.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,i=t.b;return!this.type.is(xr.HSL)&&i!==void 0?i:(this._ensureHSL(),Ut.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,i=t.h;return!this.type.is(xr.RGB)&&i!==void 0?i:(this._ensureRGB(),Ut.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,i=t.s;return!this.type.is(xr.RGB)&&i!==void 0?i:(this._ensureRGB(),Ut.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,i=t.l;return!this.type.is(xr.RGB)&&i!==void 0?i:(this._ensureRGB(),Ut.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(xr.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(xr.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(xr.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(xr.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(xr.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(xr.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const wd=new MA({r:0,g:0,b:0,a:0},"transparent"),_s={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(_s.re);if(!t)return;const i=t[1],a=parseInt(i,16),o=i.length,l=o%4===0,c=o>4,h=c?1:17,d=c?8:4,f=l?0:-1,p=c?255:15;return wd.set({r:(a>>d*(f+3)&p)*h,g:(a>>d*(f+2)&p)*h,b:(a>>d*(f+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:i,b:a,a:o}=e;return o<1?`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}${pn[Math.round(o*255)]}`:`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}`}},no={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(no.hueRe);if(t){const[,i,a]=t;switch(a){case"grad":return Ut.channel.clamp.h(parseFloat(i)*.9);case"rad":return Ut.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Ut.channel.clamp.h(parseFloat(i)*360)}}return Ut.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const i=e.match(no.re);if(!i)return;const[,a,o,l,c,h]=i;return wd.set({h:no._hue2deg(a),s:Ut.channel.clamp.s(parseFloat(o)),l:Ut.channel.clamp.l(parseFloat(l)),a:c?Ut.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:i,l:a,a:o}=e;return o<1?`hsla(${Ut.lang.round(t)}, ${Ut.lang.round(i)}%, ${Ut.lang.round(a)}%, ${o})`:`hsl(${Ut.lang.round(t)}, ${Ut.lang.round(i)}%, ${Ut.lang.round(a)}%)`}},vc={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=vc.colors[e];if(t)return _s.parse(t)},stringify:e=>{const t=_s.stringify(e);for(const i in vc.colors)if(vc.colors[i]===t)return i}},uc={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const i=e.match(uc.re);if(!i)return;const[,a,o,l,c,h,d,f,p]=i;return wd.set({r:Ut.channel.clamp.r(o?parseFloat(a)*2.55:parseFloat(a)),g:Ut.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:Ut.channel.clamp.b(d?parseFloat(h)*2.55:parseFloat(h)),a:f?Ut.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:i,b:a,a:o}=e;return o<1?`rgba(${Ut.lang.round(t)}, ${Ut.lang.round(i)}, ${Ut.lang.round(a)}, ${Ut.lang.round(o)})`:`rgb(${Ut.lang.round(t)}, ${Ut.lang.round(i)}, ${Ut.lang.round(a)})`}},Zi={format:{keyword:vc,hex:_s,rgb:uc,rgba:uc,hsl:no,hsla:no},parse:e=>{if(typeof e!="string")return e;const t=_s.parse(e)||uc.parse(e)||no.parse(e)||vc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(xr.HSL)||e.data.r===void 0?no.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?uc.stringify(e):_s.stringify(e)},jv=(e,t)=>{const i=Zi.parse(e);for(const a in t)i[a]=Ut.channel.clamp[a](t[a]);return Zi.stringify(i)},bn=(e,t,i=0,a=1)=>{if(typeof e!="number")return jv(e,{a:t});const o=wd.set({r:Ut.channel.clamp.r(e),g:Ut.channel.clamp.g(t),b:Ut.channel.clamp.b(i),a:Ut.channel.clamp.a(a)});return Zi.stringify(o)},FA=e=>{const{r:t,g:i,b:a}=Zi.parse(e),o=.2126*Ut.channel.toLinear(t)+.7152*Ut.channel.toLinear(i)+.0722*Ut.channel.toLinear(a);return Ut.lang.round(o)},DA=e=>FA(e)>=.5,Fi=e=>!DA(e),Hv=(e,t,i)=>{const a=Zi.parse(e),o=a[t],l=Ut.channel.clamp[t](o+i);return o!==l&&(a[t]=l),Zi.stringify(a)},nt=(e,t)=>Hv(e,"l",t),ot=(e,t)=>Hv(e,"l",-t),E=(e,t)=>{const i=Zi.parse(e),a={};for(const o in t)t[o]&&(a[o]=i[o]+t[o]);return jv(e,a)},RA=(e,t,i=50)=>{const{r:a,g:o,b:l,a:c}=Zi.parse(e),{r:h,g:d,b:f,a:p}=Zi.parse(t),g=i/100,x=g*2-1,y=c-p,k=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,v=1-k,w=a*k+h*v,B=o*k+d*v,L=l*k+f*v,F=c*g+p*(1-g);return bn(w,B,L,F)},V=(e,t=100)=>{const i=Zi.parse(e);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,RA(i,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function NC(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function OA(e){if(Array.isArray(e))return e}function zA(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a,o,l,c,h=[],d=!0,f=!1;try{if(l=(i=i.call(e)).next,t!==0)for(;!(d=(a=l.call(i)).done)&&(h.push(a.value),h.length!==t);d=!0);}catch(p){f=!0,o=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw o}}return h}}function $A(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NA(e,t){return OA(e)||zA(e,t)||qA(e,t)||$A()}function qA(e,t){if(e){if(typeof e=="string")return NC(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?NC(e,t):void 0}}const Pv=Object.entries,qC=Object.setPrototypeOf,IA=Object.isFrozen,jA=Object.getPrototypeOf,HA=Object.getOwnPropertyDescriptor;let fr=Object.freeze,pr=Object.seal,Cs=Object.create,Wv=typeof Reflect<"u"&&Reflect,_g=Wv.apply,Bg=Wv.construct;fr||(fr=function(t){return t});pr||(pr=function(t){return t});_g||(_g=function(t,i){for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l<a;l++)o[l-2]=arguments[l];return t.apply(i,o)});Bg||(Bg=function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return new t(...a)});const tc=Pe(Array.prototype.forEach),PA=Pe(Array.prototype.lastIndexOf),IC=Pe(Array.prototype.pop),ps=Pe(Array.prototype.push),WA=Pe(Array.prototype.splice),mn=Array.isArray,dc=Pe(String.prototype.toLowerCase),ag=Pe(String.prototype.toString),jC=Pe(String.prototype.match),ec=Pe(String.prototype.replace),HC=Pe(String.prototype.indexOf),UA=Pe(String.prototype.trim),YA=Pe(Number.prototype.toString),GA=Pe(Boolean.prototype.toString),PC=typeof BigInt>"u"?null:Pe(BigInt.prototype.toString),WC=typeof Symbol>"u"?null:Pe(Symbol.prototype.toString),er=Pe(Object.prototype.hasOwnProperty),rc=Pe(Object.prototype.toString),hr=Pe(RegExp.prototype.test),Jn=VA(TypeError);function Pe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return _g(e,t,a)}}function VA(e){return function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return Bg(e,i)}}function oe(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:dc;if(qC&&qC(e,null),!mn(t))return e;let a=t.length;for(;a--;){let o=t[a];if(typeof o=="string"){const l=i(o);l!==o&&(IA(t)||(t[a]=l),o=l)}e[o]=!0}return e}function XA(e){for(let t=0;t<e.length;t++)er(e,t)||(e[t]=null);return e}function _r(e){const t=Cs(null);for(const a of Pv(e)){var i=NA(a,2);const o=i[0],l=i[1];er(e,o)&&(mn(l)?t[o]=XA(l):l&&typeof l=="object"&&l.constructor===Object?t[o]=_r(l):t[o]=l)}return t}function QA(e){switch(typeof e){case"string":return e;case"number":return YA(e);case"boolean":return GA(e);case"bigint":return PC?PC(e):"0";case"symbol":return WC?WC(e):"Symbol()";case"undefined":return rc(e);case"function":case"object":{if(e===null)return rc(e);const t=e,i=Ui(t,"toString");if(typeof i=="function"){const a=i(t);return typeof a=="string"?a:rc(a)}return rc(e)}default:return rc(e)}}function Ui(e,t){for(;e!==null;){const a=HA(e,t);if(a){if(a.get)return Pe(a.get);if(typeof a.value=="function")return Pe(a.value)}e=jA(e)}function i(){return null}return i}function ZA(e){try{return hr(e,""),!0}catch{return!1}}const UC=fr(["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"]),ng=fr(["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"]),og=fr(["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"]),KA=fr(["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"]),sg=fr(["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"]),JA=fr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),YC=fr(["#text"]),GC=fr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),lg=fr(["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"]),VC=fr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fu=fr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),t3=pr(/{{[\w\W]*|^[\w\W]*}}/g),e3=pr(/<%[\w\W]*|^[\w\W]*%>/g),r3=pr(/\${[\w\W]*/g),i3=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),a3=pr(/^aria-[\-\w]+$/),XC=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),n3=pr(/^(?:\w+script|data):/i),o3=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),s3=pr(/^html$/i),l3=pr(/^[a-z][.\w]*(-[.\w]+)+$/i),QC=pr(/<[/\w!]/g),c3=pr(/<[/\w]/g),h3=pr(/<\/no(script|embed|frames)/i),u3=pr(/\/>/i),Wi={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},d3=function(){return typeof window>"u"?null:window},f3=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const o="data-tt-policy-suffix";i&&i.hasAttribute(o)&&(a=i.getAttribute(o));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},ZC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},dn=function(t,i,a,o){return er(t,i)&&mn(t[i])?oe(o.base?_r(o.base):{},t[i],o.transform):a};function Uv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d3();const t=bt=>Uv(bt);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Wi.document||!e.Element)return t.isSupported=!1,t;let i=e.document;const a=i,o=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,d=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,y=Ui(x,"cloneNode"),C=Ui(x,"remove"),k=Ui(x,"nextSibling"),v=Ui(x,"childNodes"),w=Ui(x,"parentNode"),B=Ui(x,"shadowRoot"),L=Ui(x,"attributes"),F=c&&c.prototype?Ui(c.prototype,"nodeType"):null,D=c&&c.prototype?Ui(c.prototype,"nodeName"):null;if(typeof l=="function"){const bt=i.createElement("template");bt.content&&bt.content.ownerDocument&&(i=bt.content.ownerDocument)}let z,N="",P,at=!1,K=0;const Y=function(){if(K>0)throw Jn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},W=function(O){Y(),K++;try{return z.createHTML(O)}finally{K--}},X=function(O){Y(),K++;try{return z.createScriptURL(O)}finally{K--}},q=function(){return at||(P=f3(g,o),at=!0),P},H=i,A=H.implementation,$=H.createNodeIterator,I=H.createDocumentFragment,Q=H.getElementsByTagName,lt=a.importNode;let R=ZC();t.isSupported=typeof Pv=="function"&&typeof w=="function"&&A&&A.createHTMLDocument!==void 0;const G=t3,ct=e3,ut=r3,mt=i3,vt=a3,_t=n3,jt=o3,Nt=l3;let Ct=XC,dt=null;const St=oe({},[...UC,...ng,...og,...sg,...YC]);let Tt=null;const J=oe({},[...GC,...lg,...VC,...fu]);let kt=Object.seal(Cs(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}})),Ar=null,rl=null;const Sr=Object.seal(Cs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let So=!0,Bn=!0,wo=!1,Qc=!0,Ri=!1,We=!0,aa=!1,To=!1,_o=null,Ra=null,il=!1,na=!1,Bo=!1,Eo=!1,Oa=!0,gr=!1;const mi="user-content-";let ir=!0,al=!1,za={},ni=null;const $a=oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let En=null;const Ln=oe({},["audio","video","img","source","image","track"]);let yi=null;const An=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oi="http://www.w3.org/1998/Math/MathML",Lo="http://www.w3.org/2000/svg",Yr="http://www.w3.org/1999/xhtml";let zi=Yr,oa=!1,nl=null;const Zc=oe({},[Oi,Lo,Yr],ag),ol=fr(["mi","mo","mn","ms","mtext"]);let Ao=oe({},ol);const Mo=fr(["annotation-xml"]);let Mn=oe({},Mo);const Kc=oe({},["title","style","font","a","script"]);let Na=null;const $i=["application/xhtml+xml","text/html"],Ue="text/html";let Kt=null,Gr=null;const sl=i.createElement("form"),Jc=function(O){return O instanceof RegExp||O instanceof Function},ll=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gr&&Gr===O)return;(!O||typeof O!="object")&&(O={}),O=_r(O),Na=$i.indexOf(O.PARSER_MEDIA_TYPE)===-1?Ue:O.PARSER_MEDIA_TYPE,Kt=Na==="application/xhtml+xml"?ag:dc,dt=dn(O,"ALLOWED_TAGS",St,{transform:Kt}),Tt=dn(O,"ALLOWED_ATTR",J,{transform:Kt}),nl=dn(O,"ALLOWED_NAMESPACES",Zc,{transform:ag}),yi=dn(O,"ADD_URI_SAFE_ATTR",An,{transform:Kt,base:An}),En=dn(O,"ADD_DATA_URI_TAGS",Ln,{transform:Kt,base:Ln}),ni=dn(O,"FORBID_CONTENTS",$a,{transform:Kt}),Ar=dn(O,"FORBID_TAGS",_r({}),{transform:Kt}),rl=dn(O,"FORBID_ATTR",_r({}),{transform:Kt}),za=er(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?_r(O.USE_PROFILES):O.USE_PROFILES:!1,So=O.ALLOW_ARIA_ATTR!==!1,Bn=O.ALLOW_DATA_ATTR!==!1,wo=O.ALLOW_UNKNOWN_PROTOCOLS||!1,Qc=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ri=O.SAFE_FOR_TEMPLATES||!1,We=O.SAFE_FOR_XML!==!1,aa=O.WHOLE_DOCUMENT||!1,na=O.RETURN_DOM||!1,Bo=O.RETURN_DOM_FRAGMENT||!1,Eo=O.RETURN_TRUSTED_TYPE||!1,il=O.FORCE_BODY||!1,Oa=O.SANITIZE_DOM!==!1,gr=O.SANITIZE_NAMED_PROPS||!1,ir=O.KEEP_CONTENT!==!1,al=O.IN_PLACE||!1,Ct=ZA(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:XC,zi=typeof O.NAMESPACE=="string"?O.NAMESPACE:Yr,Ao=er(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?_r(O.MATHML_TEXT_INTEGRATION_POINTS):oe({},ol),Mn=er(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?_r(O.HTML_INTEGRATION_POINTS):oe({},Mo);const rt=er(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?_r(O.CUSTOM_ELEMENT_HANDLING):Cs(null);if(kt=Cs(null),er(rt,"tagNameCheck")&&Jc(rt.tagNameCheck)&&(kt.tagNameCheck=rt.tagNameCheck),er(rt,"attributeNameCheck")&&Jc(rt.attributeNameCheck)&&(kt.attributeNameCheck=rt.attributeNameCheck),er(rt,"allowCustomizedBuiltInElements")&&typeof rt.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=rt.allowCustomizedBuiltInElements),pr(kt),Ri&&(Bn=!1),Bo&&(na=!0),za&&(dt=oe({},YC),Tt=Cs(null),za.html===!0&&(oe(dt,UC),oe(Tt,GC)),za.svg===!0&&(oe(dt,ng),oe(Tt,lg),oe(Tt,fu)),za.svgFilters===!0&&(oe(dt,og),oe(Tt,lg),oe(Tt,fu)),za.mathMl===!0&&(oe(dt,sg),oe(Tt,VC),oe(Tt,fu))),Sr.tagCheck=null,Sr.attributeCheck=null,er(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?Sr.tagCheck=O.ADD_TAGS:mn(O.ADD_TAGS)&&(dt===St&&(dt=_r(dt)),oe(dt,O.ADD_TAGS,Kt))),er(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?Sr.attributeCheck=O.ADD_ATTR:mn(O.ADD_ATTR)&&(Tt===J&&(Tt=_r(Tt)),oe(Tt,O.ADD_ATTR,Kt))),er(O,"ADD_URI_SAFE_ATTR")&&mn(O.ADD_URI_SAFE_ATTR)&&oe(yi,O.ADD_URI_SAFE_ATTR,Kt),er(O,"FORBID_CONTENTS")&&mn(O.FORBID_CONTENTS)&&(ni===$a&&(ni=_r(ni)),oe(ni,O.FORBID_CONTENTS,Kt)),er(O,"ADD_FORBID_CONTENTS")&&mn(O.ADD_FORBID_CONTENTS)&&(ni===$a&&(ni=_r(ni)),oe(ni,O.ADD_FORBID_CONTENTS,Kt)),ir&&(dt["#text"]=!0),aa&&oe(dt,["html","head","body"]),dt.table&&(oe(dt,["tbody"]),delete Ar.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const xt=z;z=O.TRUSTED_TYPES_POLICY;try{N=W("")}catch(Ft){throw z=xt,Ft}}else O.TRUSTED_TYPES_POLICY===null?(z=void 0,N=""):(z===void 0&&(z=q()),z&&typeof N=="string"&&(N=W("")));fr&&fr(O),Gr=O},cl=oe({},[...ng,...og,...KA]),qa=oe({},[...sg,...JA]),hl=function(O,rt,xt){return rt.namespaceURI===Yr?O==="svg":rt.namespaceURI===Oi?O==="svg"&&(xt==="annotation-xml"||Ao[xt]):!!cl[O]},Ia=function(O,rt,xt){return rt.namespaceURI===Yr?O==="math":rt.namespaceURI===Lo?O==="math"&&Mn[xt]:!!qa[O]},ja=function(O,rt,xt){return rt.namespaceURI===Lo&&!Mn[xt]||rt.namespaceURI===Oi&&!Ao[xt]?!1:!qa[O]&&(Kc[O]||!cl[O])},Fn=function(O){let rt=w(O);(!rt||!rt.tagName)&&(rt={namespaceURI:zi,tagName:"template"});const xt=dc(O.tagName),Ft=dc(rt.tagName);return nl[O.namespaceURI]?O.namespaceURI===Lo?hl(xt,rt,Ft):O.namespaceURI===Oi?Ia(xt,rt,Ft):O.namespaceURI===Yr?ja(xt,rt,Ft):!!(Na==="application/xhtml+xml"&&nl[O.namespaceURI]):!1},wr=function(O){ps(t.removed,{element:O});try{w(O).removeChild(O)}catch{if(C(O),!w(O))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},De=function(O){const rt=v(O);if(rt){const Ft=[];tc(rt,Gt=>{ps(Ft,Gt)}),tc(Ft,Gt=>{try{C(Gt)}catch{}})}const xt=L(O);if(xt)for(let Ft=xt.length-1;Ft>=0;--Ft){const Gt=xt[Ft],ee=Gt&&Gt.name;if(typeof ee=="string")try{O.removeAttribute(ee)}catch{}}},Ni=function(O,rt){try{ps(t.removed,{attribute:rt.getAttributeNode(O),from:rt})}catch{ps(t.removed,{attribute:null,from:rt})}if(rt.removeAttribute(O),O==="is")if(na||Bo)try{wr(rt)}catch{}else try{rt.setAttribute(O,"")}catch{}},th=function(O){const rt=L(O);if(rt)for(let xt=rt.length-1;xt>=0;--xt){const Ft=rt[xt],Gt=Ft&&Ft.name;if(!(typeof Gt!="string"||Tt[Kt(Gt)]))try{O.removeAttribute(Gt)}catch{}}},sa=function(O){const rt=[O];for(;rt.length>0;){const xt=rt.pop();(F?F(xt):xt.nodeType)===Wi.element&&th(xt);const Gt=v(xt);if(Gt)for(let ee=Gt.length-1;ee>=0;--ee)rt.push(Gt[ee])}},la=function(O){let rt=null,xt=null;if(il)O="<remove></remove>"+O;else{const ee=jC(O,/^[\r\n\t ]+/);xt=ee&&ee[0]}Na==="application/xhtml+xml"&&zi===Yr&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const Ft=z?W(O):O;if(zi===Yr)try{rt=new p().parseFromString(Ft,Na)}catch{}if(!rt||!rt.documentElement){rt=A.createDocument(zi,"template",null);try{rt.documentElement.innerHTML=oa?N:Ft}catch{}}const Gt=rt.body||rt.documentElement;return O&&xt&&Gt.insertBefore(i.createTextNode(xt),Gt.childNodes[0]||null),zi===Yr?Q.call(rt,aa?"html":"body")[0]:aa?rt.documentElement:Gt},eh=function(O){return $.call(O.ownerDocument||O,O,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Dn=function(O){return O=ec(O,G," "),O=ec(O,ct," "),O=ec(O,ut," "),O},Fo=function(O){var rt;O.normalize();const xt=$.call(O.ownerDocument||O,O,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let Ft=xt.nextNode();for(;Ft;)Ft.data=Dn(Ft.data),Ft=xt.nextNode();const Gt=(rt=O.querySelectorAll)===null||rt===void 0?void 0:rt.call(O,"template");Gt&&tc(Gt,ee=>{xi(ee.content)&&Fo(ee.content)})},Do=function(O){const rt=D?D(O):null;return typeof rt!="string"||Kt(rt)!=="form"?!1:typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||O.attributes!==L(O)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function"||O.nodeType!==F(O)||O.childNodes!==v(O)},xi=function(O){if(!F||typeof O!="object"||O===null)return!1;try{return F(O)===Wi.documentFragment}catch{return!1}},qi=function(O){if(!F||typeof O!="object"||O===null)return!1;try{return typeof F(O)=="number"}catch{return!1}};function Ye(bt,O,rt){bt.length!==0&&tc(bt,xt=>{xt.call(t,O,rt,Gr)})}const Mr=function(O,rt){return!!(We&&O.hasChildNodes()&&!qi(O.firstElementChild)&&hr(QC,O.textContent)&&hr(QC,O.innerHTML)||We&&O.namespaceURI===Yr&&rt==="style"&&qi(O.firstElementChild)||O.nodeType===Wi.processingInstruction||We&&O.nodeType===Wi.comment&&hr(c3,O.data))},rh=function(O,rt){if(!Ar[rt]&&Rn(rt)&&(kt.tagNameCheck instanceof RegExp&&hr(kt.tagNameCheck,rt)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(rt)))return!1;if(ir&&!ni[rt]){const xt=w(O),Ft=v(O);if(Ft&&xt){const Gt=Ft.length;for(let ee=Gt-1;ee>=0;--ee){const Ee=al?Ft[ee]:y(Ft[ee],!0);xt.insertBefore(Ee,k(O))}}}return wr(O),!0},ih=function(O){if(Ye(R.beforeSanitizeElements,O,null),Do(O))return wr(O),!0;const rt=Kt(D?D(O):O.nodeName);if(Ye(R.uponSanitizeElement,O,{tagName:rt,allowedTags:dt}),Mr(O,rt))return wr(O),!0;if(Ar[rt]||!(Sr.tagCheck instanceof Function&&Sr.tagCheck(rt))&&!dt[rt])return rh(O,rt);if((F?F(O):O.nodeType)===Wi.element&&!Fn(O)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&hr(h3,O.innerHTML))return wr(O),!0;if(Ri&&O.nodeType===Wi.text){const Ft=Dn(O.textContent);O.textContent!==Ft&&(ps(t.removed,{element:O.cloneNode()}),O.textContent=Ft)}return Ye(R.afterSanitizeElements,O,null),!1},Ro=function(O,rt,xt){if(rl[rt]||Oa&&(rt==="id"||rt==="name")&&(xt in i||xt in sl))return!1;const Ft=Tt[rt]||Sr.attributeCheck instanceof Function&&Sr.attributeCheck(rt,O);if(!(Bn&&hr(mt,rt))){if(!(So&&hr(vt,rt))){if(Ft){if(!yi[rt]){if(!hr(Ct,ec(xt,jt,""))){if(!((rt==="src"||rt==="xlink:href"||rt==="href")&&O!=="script"&&HC(xt,"data:")===0&&En[O])){if(!(wo&&!hr(_t,ec(xt,jt,"")))){if(xt)return!1}}}}}else if(!(Rn(O)&&(kt.tagNameCheck instanceof RegExp&&hr(kt.tagNameCheck,O)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(O))&&(kt.attributeNameCheck instanceof RegExp&&hr(kt.attributeNameCheck,rt)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(rt,O))||rt==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&hr(kt.tagNameCheck,xt)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(xt))))return!1}}return!0},ah=oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rn=function(O){return!ah[dc(O)]&&hr(Nt,O)},Ud=function(O,rt,xt,Ft){if(z&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!xt)switch(g.getAttributeType(O,rt)){case"TrustedHTML":return W(Ft);case"TrustedScriptURL":return X(Ft)}return Ft},Fr=function(O,rt,xt,Ft){try{xt?O.setAttributeNS(xt,rt,Ft):O.setAttribute(rt,Ft),Do(O)?wr(O):IC(t.removed)}catch{Ni(rt,O)}},Oo=function(O){Ye(R.beforeSanitizeAttributes,O,null);const rt=O.attributes;if(!rt||Do(O))return;const xt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let Ft=rt.length;const Gt=Kt(O.nodeName);for(;Ft--;){const ee=rt[Ft],Ee=ee.name,Le=ee.namespaceURI,Dr=ee.value,mr=Kt(Ee),Vr=Dr;let Ge=Ee==="value"?Vr:UA(Vr);if(xt.attrName=mr,xt.attrValue=Ge,xt.keepAttr=!0,xt.forceKeepAttr=void 0,Ye(R.uponSanitizeAttribute,O,xt),Ge=xt.attrValue,gr&&(mr==="id"||mr==="name")&&HC(Ge,mi)!==0&&(Ni(Ee,O),Ge=mi+Ge),We&&hr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ge)){Ni(Ee,O);continue}if(mr==="attributename"&&jC(Ge,"href")){Ni(Ee,O);continue}if(!xt.forceKeepAttr){if(!xt.keepAttr){Ni(Ee,O);continue}if(!Qc&&hr(u3,Ge)){Ni(Ee,O);continue}if(Ri&&(Ge=Dn(Ge)),!Ro(Gt,mr,Ge)){Ni(Ee,O);continue}Ge=Ud(Gt,mr,Le,Ge),Ge!==Vr&&Fr(O,Ee,Le,Ge)}}Ye(R.afterSanitizeAttributes,O,null)},On=function(O){let rt=null;const xt=eh(O);for(Ye(R.beforeSanitizeShadowDOM,O,null);rt=xt.nextNode();)if(Ye(R.uponSanitizeShadowNode,rt,null),ih(rt),Oo(rt),xi(rt.content)&&On(rt.content),(F?F(rt):rt.nodeType)===Wi.element){const Gt=B(rt);xi(Gt)&&(zn(Gt),On(Gt))}Ye(R.afterSanitizeShadowDOM,O,null)},zn=function(O){const rt=[{node:O,shadow:null}];for(;rt.length>0;){const xt=rt.pop();if(xt.shadow){On(xt.shadow);continue}const Ft=xt.node,ee=(F?F(Ft):Ft.nodeType)===Wi.element,Ee=v(Ft);if(Ee)for(let Le=Ee.length-1;Le>=0;--Le)rt.push({node:Ee[Le],shadow:null});if(ee){const Le=D?D(Ft):null;if(typeof Le=="string"&&Kt(Le)==="template"){const Dr=Ft.content;xi(Dr)&&rt.push({node:Dr,shadow:null})}}if(ee){const Le=B(Ft);xi(Le)&&rt.push({node:null,shadow:Le},{node:Le,shadow:null})}}};return t.sanitize=function(bt){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=null,xt=null,Ft=null,Gt=null;if(oa=!bt,oa&&(bt="<!-->"),typeof bt!="string"&&!qi(bt)&&(bt=QA(bt),typeof bt!="string"))throw Jn("dirty is not a string, aborting");if(!t.isSupported)return bt;To?(dt=_o,Tt=Ra):ll(O),(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&(dt=_r(dt)),R.uponSanitizeAttribute.length>0&&(Tt=_r(Tt)),t.removed=[];const ee=al&&typeof bt!="string"&&qi(bt);if(ee){const Dr=D?D(bt):bt.nodeName;if(typeof Dr=="string"){const mr=Kt(Dr);if(!dt[mr]||Ar[mr])throw Jn("root node is forbidden and cannot be sanitized in-place")}if(Do(bt))throw Jn("root node is clobbered and cannot be sanitized in-place");try{zn(bt)}catch(mr){throw De(bt),mr}}else if(qi(bt))rt=la("<!---->"),xt=rt.ownerDocument.importNode(bt,!0),xt.nodeType===Wi.element&&xt.nodeName==="BODY"||xt.nodeName==="HTML"?rt=xt:rt.appendChild(xt),zn(xt);else{if(!na&&!Ri&&!aa&&bt.indexOf("<")===-1)return z&&Eo?W(bt):bt;if(rt=la(bt),!rt)return na?null:Eo?N:""}rt&&il&&wr(rt.firstChild);const Ee=eh(ee?bt:rt);try{for(;Ft=Ee.nextNode();)ih(Ft),Oo(Ft),xi(Ft.content)&&On(Ft.content)}catch(Dr){throw ee&&De(bt),Dr}if(ee)return tc(t.removed,Dr=>{Dr.element&&sa(Dr.element)}),Ri&&Fo(bt),bt;if(na){if(Ri&&Fo(rt),Bo)for(Gt=I.call(rt.ownerDocument);rt.firstChild;)Gt.appendChild(rt.firstChild);else Gt=rt;return(Tt.shadowroot||Tt.shadowrootmode)&&(Gt=lt.call(a,Gt,!0)),Gt}let Le=aa?rt.outerHTML:rt.innerHTML;return aa&&dt["!doctype"]&&rt.ownerDocument&&rt.ownerDocument.doctype&&rt.ownerDocument.doctype.name&&hr(s3,rt.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+rt.ownerDocument.doctype.name+`>
`+Le),Ri&&(Le=Dn(Le)),z&&Eo?W(Le):Le},t.setConfig=function(){let bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ll(bt),To=!0,_o=dt,Ra=Tt},t.clearConfig=function(){Gr=null,To=!1,_o=null,Ra=null,z=P,N=""},t.isValidAttribute=function(bt,O,rt){Gr||ll({});const xt=Kt(bt),Ft=Kt(O);return Ro(xt,Ft,rt)},t.addHook=function(bt,O){typeof O=="function"&&er(R,bt)&&ps(R[bt],O)},t.removeHook=function(bt,O){if(er(R,bt)){if(O!==void 0){const rt=PA(R[bt],O);return rt===-1?void 0:WA(R[bt],rt,1)[0]}return IC(R[bt])}},t.removeHooks=function(bt){er(R,bt)&&(R[bt]=[])},t.removeAllHooks=function(){R=ZC()},t}var Ps=Uv(),Eg=S((e,t,{depth:i=2,clobber:a=!1}={})=>{const o={depth:i,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Eg(e,l,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(l=>{e.includes(l)||e.push(l)}),e):e===void 0||i<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(l=>{typeof t[l]=="object"&&t[l]!==null&&(e[l]===void 0||typeof e[l]=="object")?(e[l]===void 0&&(e[l]=Array.isArray(t[l])?[]:{}),e[l]=Eg(e[l],t[l],{depth:i-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),Ze=Eg,Ji="#ffffff",ta="#f2f2f2",Wt=S((e,t)=>t?E(e,{s:-40,l:10}):E(e,{s:-40,l:-10}),"mkBorder"),Ls,p3=(Ls=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var i,a,o,l,c,h,d,f,p,g,x,y,C,k,v,w,B,L,F,D,z,N,P,at,K,Y,W,X,q,H,A,$,I,Q,lt,R,G,ct,ut,mt,vt,_t,jt,Nt,Ct,dt,St,Tt,J;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?ot(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||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ot(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10)):(this.rowOdd=this.rowOdd||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=ot(this["cScale"+kt],75);else for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=ot(this["cScale"+kt],25);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleInv"+kt]=this["cScaleInv"+kt]||V(this["cScale"+kt]);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this.darkMode?this["cScalePeer"+kt]=this["cScalePeer"+kt]||nt(this["cScale"+kt],10):this["cScalePeer"+kt]=this["cScalePeer"+kt]||ot(this["cScale"+kt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleLabel"+kt]=this["cScaleLabel"+kt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let kt=0;kt<5;kt++)this["surface"+kt]=this["surface"+kt]||E(this.mainBkg,{h:180,s:-15,l:t*(5+kt*3)}),this["surfacePeer"+kt]=this["surfacePeer"+kt]||E(this.mainBkg,{h:180,s:-15,l:t*(8+kt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((i=this.cynefin)==null?void 0:i.domainFontSize)||16,itemFontSize:((a=this.cynefin)==null?void 0:a.itemFontSize)||12,boundaryColor:((o=this.cynefin)==null?void 0:o.boundaryColor)||this.lineColor,boundaryWidth:((l=this.cynefin)==null?void 0:l.boundaryWidth)||2,cliffColor:((c=this.cynefin)==null?void 0:c.cliffColor)||"#8B0000",cliffWidth:((h=this.cynefin)==null?void 0:h.cliffWidth)||4,arrowColor:((d=this.cynefin)==null?void 0:d.arrowColor)||this.lineColor,arrowWidth:((f=this.cynefin)==null?void 0:f.arrowWidth)||2,complexBg:((p=this.cynefin)==null?void 0:p.complexBg)||"#E8F5E9",complicatedBg:((g=this.cynefin)==null?void 0:g.complicatedBg)||"#E3F2FD",chaoticBg:((x=this.cynefin)==null?void 0:x.chaoticBg)||"#FBE9E7",clearBg:((y=this.cynefin)==null?void 0:y.clearBg)||"#FFF8E1",confusionBg:((C=this.cynefin)==null?void 0:C.confusionBg)||"#F3E5F5",textColor:((k=this.cynefin)==null?void 0:k.textColor)||this.textColor,labelColor:((v=this.cynefin)==null?void 0:v.labelColor)||this.primaryTextColor},this.radar={axisColor:((w=this.radar)==null?void 0:w.axisColor)||this.lineColor,axisStrokeWidth:((B=this.radar)==null?void 0:B.axisStrokeWidth)||2,axisLabelFontSize:((L=this.radar)==null?void 0:L.axisLabelFontSize)||12,curveOpacity:((F=this.radar)==null?void 0:F.curveOpacity)||.5,curveStrokeWidth:((D=this.radar)==null?void 0:D.curveStrokeWidth)||2,graticuleColor:((z=this.radar)==null?void 0:z.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((P=this.radar)==null?void 0:P.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((K=this.radar)==null?void 0:K.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((Y=this.wardley)==null?void 0:Y.backgroundColor)||this.background,axisColor:((W=this.wardley)==null?void 0:W.axisColor)||this.lineColor,axisTextColor:((X=this.wardley)==null?void 0:X.axisTextColor)||this.primaryTextColor,gridColor:((q=this.wardley)==null?void 0:q.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:(($=this.wardley)==null?void 0:$.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((Q=this.wardley)==null?void 0:Q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((lt=this.wardley)==null?void 0:lt.annotationStroke)||this.lineColor,annotationTextColor:((R=this.wardley)==null?void 0:R.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((ct=this.xyChart)==null?void 0:ct.backgroundColor)||this.background,titleColor:((ut=this.xyChart)==null?void 0:ut.titleColor)||this.primaryTextColor,dataLabelColor:((mt=this.xyChart)==null?void 0:mt.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((vt=this.xyChart)==null?void 0:vt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_t=this.xyChart)==null?void 0:_t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((jt=this.xyChart)==null?void 0:jt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((dt=this.xyChart)==null?void 0:dt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((St=this.xyChart)==null?void 0:St.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Tt=this.xyChart)==null?void 0:Tt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((J=this.xyChart)==null?void 0:J.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?ot(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Ls,"Theme"),Ls),g3=S(e=>{const t=new p3;return t.calculate(e),t},"getThemeVariables"),As,m3=(As=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(V("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=bn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ot(this.sectionBkgColor,10),this.taskBorderColor=bn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=bn(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||nt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,i,a,o,l,c,h,d,f,p,g,x,y,C,k,v,w,B,L,F,D,z,N,P,at,K,Y,W,X,q,H,A,$,I,Q,lt,R,G,ct,ut,mt,vt,_t,jt,Nt,Ct,dt,St,Tt;this.secondBkg=nt(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=nt(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=nt(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=V(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330});for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||V(this["cScale"+J]);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScalePeer"+J]=this["cScalePeer"+J]||nt(this["cScale"+J],10);for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,s:-30,l:-(-10+J*4)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,s:-30,l:-(-7+J*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["pie"+J]=this["cScale"+J];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let J=0;J<8;J++)this["venn"+(J+1)]=this["venn"+(J+1)]??nt(this["cScale"+J],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#FF6B6B",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#1B5E20",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#0D47A1",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#BF360C",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#F57F17",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#4A148C",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((w=this.xyChart)==null?void 0:w.titleColor)||this.primaryTextColor,dataLabelColor:((B=this.xyChart)==null?void 0:B.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((L=this.xyChart)==null?void 0:L.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((F=this.xyChart)==null?void 0:F.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((D=this.xyChart)==null?void 0:D.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((P=this.xyChart)==null?void 0:P.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((at=this.xyChart)==null?void 0:at.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((K=this.xyChart)==null?void 0:K.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Y=this.xyChart)==null?void 0:Y.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:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((X=this.radar)==null?void 0:X.axisStrokeWidth)||2,axisLabelFontSize:((q=this.radar)==null?void 0:q.axisLabelFontSize)||12,curveOpacity:((H=this.radar)==null?void 0:H.curveOpacity)||.5,curveStrokeWidth:((A=this.radar)==null?void 0:A.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((I=this.radar)==null?void 0:I.graticuleStrokeWidth)||1,graticuleOpacity:((Q=this.radar)==null?void 0:Q.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((G=this.wardley)==null?void 0:G.backgroundColor)||this.background,axisColor:((ct=this.wardley)==null?void 0:ct.axisColor)||this.lineColor,axisTextColor:((ut=this.wardley)==null?void 0:ut.axisTextColor)||this.primaryTextColor,gridColor:((mt=this.wardley)==null?void 0:mt.gridColor)||this.gridColor,componentFill:((vt=this.wardley)==null?void 0:vt.componentFill)||this.mainBkg,componentStroke:((_t=this.wardley)==null?void 0:_t.componentStroke)||this.lineColor,componentLabelColor:((jt=this.wardley)==null?void 0:jt.componentLabelColor)||this.primaryTextColor,linkStroke:((Nt=this.wardley)==null?void 0:Nt.linkStroke)||this.lineColor,evolutionStroke:((Ct=this.wardley)==null?void 0:Ct.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((dt=this.wardley)==null?void 0:dt.annotationStroke)||this.lineColor,annotationTextColor:((St=this.wardley)==null?void 0:St.annotationTextColor)||this.primaryTextColor,annotationFill:((Tt=this.wardley)==null?void 0:Tt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=nt(this.secondaryColor,20),this.git1=nt(this.pie2||this.secondaryColor,20),this.git2=nt(this.pie3||this.tertiaryColor,20),this.git3=nt(this.pie4||E(this.primaryColor,{h:-30}),20),this.git4=nt(this.pie5||E(this.primaryColor,{h:-60}),20),this.git5=nt(this.pie6||E(this.primaryColor,{h:-90}),10),this.git6=nt(this.pie7||E(this.primaryColor,{h:60}),10),this.git7=nt(this.pie8||E(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||nt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||nt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||nt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||nt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||nt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||nt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||nt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(As,"Theme"),As),y3=S(e=>{const t=new m3;return t.calculate(e),t},"getThemeVariables"),Ms,x3=(Ms=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=E(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=bn(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,i,a,o,l,c,h,d,f,p,g,x,y,C,k,v,w,B,L,F,D,z,N,P,at,K,Y,W,X,q,H,A,$,I,Q,lt,R,G,ct,ut,mt,vt,_t,jt,Nt,Ct,dt,St,Tt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScale"+J]=ot(this["cScale"+J],10),this["cScalePeer"+J]=this["cScalePeer"+J]||ot(this["cScale"+J],25);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||E(this["cScale"+J],{h:180});for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,l:-(7+J*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||V(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||V(this.labelTextColor);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||nt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||nt(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||E(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||E(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B0000",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#E8F5E9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((v=this.radar)==null?void 0:v.axisColor)||this.lineColor,axisStrokeWidth:((w=this.radar)==null?void 0:w.axisStrokeWidth)||2,axisLabelFontSize:((B=this.radar)==null?void 0:B.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((F=this.radar)==null?void 0:F.curveStrokeWidth)||2,graticuleColor:((D=this.radar)==null?void 0:D.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((P=this.radar)==null?void 0:P.legendBoxSize)||12,legendFontSize:((at=this.radar)==null?void 0:at.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((K=this.wardley)==null?void 0:K.backgroundColor)||this.background,axisColor:((Y=this.wardley)==null?void 0:Y.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((X=this.wardley)==null?void 0:X.gridColor)||this.gridColor,componentFill:((q=this.wardley)==null?void 0:q.componentFill)||this.background,componentStroke:((H=this.wardley)==null?void 0:H.componentStroke)||this.lineColor,componentLabelColor:((A=this.wardley)==null?void 0:A.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Q=this.wardley)==null?void 0:Q.annotationStroke)||this.lineColor,annotationTextColor:((lt=this.wardley)==null?void 0:lt.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.xyChart={backgroundColor:((G=this.xyChart)==null?void 0:G.backgroundColor)||this.background,titleColor:((ct=this.xyChart)==null?void 0:ct.titleColor)||this.primaryTextColor,dataLabelColor:((ut=this.xyChart)==null?void 0:ut.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((mt=this.xyChart)==null?void 0:mt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((vt=this.xyChart)==null?void 0:vt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_t=this.xyChart)==null?void 0:_t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((jt=this.xyChart)==null?void 0:jt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((dt=this.xyChart)==null?void 0:dt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((St=this.xyChart)==null?void 0:St.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Tt=this.xyChart)==null?void 0:Tt.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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||ot(V(this.git0),25),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(Object.keys(this).forEach(a=>{this[a]==="calculated"&&(this[a]=void 0)}),typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Ms,"Theme"),Ms),b3=S(e=>{const t=new x3;return t.calculate(e),t},"getThemeVariables"),Fs,C3=(Fs=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=nt("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.primaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,i,a,o,l,c,h,d,f,p,g,x,y,C,k,v,w,B,L,F,D,z,N,P,at,K,Y,W,X,q,H,A,$,I,Q,lt,R,G,ct,ut,mt,vt,_t,jt,Nt,Ct,dt,St,Tt;this.actorBorder=ot(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScale"+J]=ot(this["cScale"+J],10),this["cScalePeer"+J]=this["cScalePeer"+J]||ot(this["cScale"+J],25);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||E(this["cScale"+J],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,s:-30,l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,s:-30,l:-(8+J*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||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{l:-30}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B4513",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#C8E6C9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#DCEDC8",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FFE0B2",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF9C4",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#D7CCC8",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((v=this.radar)==null?void 0:v.axisColor)||this.lineColor,axisStrokeWidth:((w=this.radar)==null?void 0:w.axisStrokeWidth)||2,axisLabelFontSize:((B=this.radar)==null?void 0:B.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((F=this.radar)==null?void 0:F.curveStrokeWidth)||2,graticuleColor:((D=this.radar)==null?void 0:D.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((P=this.radar)==null?void 0:P.legendBoxSize)||12,legendFontSize:((at=this.radar)==null?void 0:at.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((K=this.wardley)==null?void 0:K.backgroundColor)||this.background,axisColor:((Y=this.wardley)==null?void 0:Y.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((X=this.wardley)==null?void 0:X.gridColor)||this.gridColor,componentFill:((q=this.wardley)==null?void 0:q.componentFill)||this.background,componentStroke:((H=this.wardley)==null?void 0:H.componentStroke)||this.lineColor,componentLabelColor:((A=this.wardley)==null?void 0:A.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Q=this.wardley)==null?void 0:Q.annotationStroke)||this.lineColor,annotationTextColor:((lt=this.wardley)==null?void 0:lt.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.xyChart={backgroundColor:((G=this.xyChart)==null?void 0:G.backgroundColor)||this.background,titleColor:((ct=this.xyChart)==null?void 0:ct.titleColor)||this.primaryTextColor,dataLabelColor:((ut=this.xyChart)==null?void 0:ut.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((mt=this.xyChart)==null?void 0:mt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((vt=this.xyChart)==null?void 0:vt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_t=this.xyChart)==null?void 0:_t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((jt=this.xyChart)==null?void 0:jt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((dt=this.xyChart)==null?void 0:dt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((St=this.xyChart)==null?void 0:St.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Tt=this.xyChart)==null?void 0:Tt.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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Fs,"Theme"),Fs),v3=S(e=>{const t=new C3;return t.calculate(e),t},"getThemeVariables"),Ds,k3=(Ds=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=nt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,i,a,o,l,c,h,d,f,p,g,x,y,C,k,v,w,B,L,F,D,z,N,P,at,K,Y,W,X,q,H,A,$,I,Q,lt,R,G,ct,ut,mt,vt,_t,jt,Nt,Ct,dt,St,Tt;this.secondBkg=nt(this.contrast,55),this.border2=this.contrast,this.actorBorder=nt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||V(this["cScale"+J]);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this.darkMode?this["cScalePeer"+J]=this["cScalePeer"+J]||nt(this["cScale"+J],10):this["cScalePeer"+J]=this["cScalePeer"+J]||ot(this["cScale"+J],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{l:-(8+J*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=nt(this.contrast,30),this.sectionBkgColor2=nt(this.contrast,30),this.taskBorderColor=ot(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=nt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ot(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(this.secondaryColor,{h:128});for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["pie"+J]=this["cScale"+J];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let J=0;J<8;J++)this["venn"+(J+1)]=this["venn"+(J+1)]??this["cScale"+J];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B0000",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#E8F5E9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((w=this.xyChart)==null?void 0:w.titleColor)||this.primaryTextColor,dataLabelColor:((B=this.xyChart)==null?void 0:B.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((L=this.xyChart)==null?void 0:L.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((F=this.xyChart)==null?void 0:F.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((D=this.xyChart)==null?void 0:D.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((P=this.xyChart)==null?void 0:P.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((at=this.xyChart)==null?void 0:at.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((K=this.xyChart)==null?void 0:K.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Y=this.xyChart)==null?void 0:Y.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((X=this.radar)==null?void 0:X.axisStrokeWidth)||2,axisLabelFontSize:((q=this.radar)==null?void 0:q.axisLabelFontSize)||12,curveOpacity:((H=this.radar)==null?void 0:H.curveOpacity)||.5,curveStrokeWidth:((A=this.radar)==null?void 0:A.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((I=this.radar)==null?void 0:I.graticuleStrokeWidth)||1,graticuleOpacity:((Q=this.radar)==null?void 0:Q.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((G=this.wardley)==null?void 0:G.backgroundColor)||this.background,axisColor:((ct=this.wardley)==null?void 0:ct.axisColor)||this.lineColor,axisTextColor:((ut=this.wardley)==null?void 0:ut.axisTextColor)||this.primaryTextColor,gridColor:((mt=this.wardley)==null?void 0:mt.gridColor)||this.gridColor,componentFill:((vt=this.wardley)==null?void 0:vt.componentFill)||this.background,componentStroke:((_t=this.wardley)==null?void 0:_t.componentStroke)||this.lineColor,componentLabelColor:((jt=this.wardley)==null?void 0:jt.componentLabelColor)||this.primaryTextColor,linkStroke:((Nt=this.wardley)==null?void 0:Nt.linkStroke)||this.lineColor,evolutionStroke:((Ct=this.wardley)==null?void 0:Ct.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((dt=this.wardley)==null?void 0:dt.annotationStroke)||this.lineColor,annotationTextColor:((St=this.wardley)==null?void 0:St.annotationTextColor)||this.primaryTextColor,annotationFill:((Tt=this.wardley)==null?void 0:Tt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ot(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||E(this.primaryColor,{h:-30}),this.git4=this.pie5||E(this.primaryColor,{h:-60}),this.git5=this.pie6||E(this.primaryColor,{h:-90}),this.git6=this.pie7||E(this.primaryColor,{h:60}),this.git7=this.pie8||E(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Ds,"Theme"),Ds),S3=S(e=>{const t=new k3;return t.calculate(e),t},"getThemeVariables"),Rs,w3=(Rs=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var l,c,h,d,f,p,g,x,y,C,k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?ot(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||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||a,this.cScale3=this.cScale3||E(t,{h:30}),this.cScale4=this.cScale4||E(t,{h:60}),this.cScale5=this.cScale5||E(t,{h:90}),this.cScale6=this.cScale6||E(t,{h:120}),this.cScale7=this.cScale7||E(t,{h:150}),this.cScale8=this.cScale8||E(t,{h:210,l:150}),this.cScale9=this.cScale9||E(t,{h:270}),this.cScale10=this.cScale10||E(t,{h:300}),this.cScale11=this.cScale11||E(t,{h:330}),this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=ot(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=ot(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||ot(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Rs,"Theme"),Rs),T3=S(e=>{const t=new w3;return t.calculate(e),t},"getThemeVariables"),Os,_3=(Os=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(V("#323D47"),10),this.border1="#ccc",this.border2=bn(255,255,255,.25),this.arrowheadColor=V(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var i,a,o,l,c,h,d,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(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||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ot(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ot(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||nt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ot(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Os,"Theme"),Os),B3=S(e=>{const t=new _3;return t.calculate(e),t},"getThemeVariables"),zs,E3=(zs=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Wt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var l,c,h,d,f,p,g,x,y,C,k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=this.mainBkg;if(this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=ot(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=ot(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||ot(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(zs,"Theme"),zs),L3=S(e=>{const t=new E3;return t.calculate(e),t},"getThemeVariables"),$s,A3=($s=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(V("#323D47"),10),this.border1="#ccc",this.border2=bn(255,255,255,.25),this.arrowheadColor=V(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var i,a,o,l,c,h,d,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ot(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ot(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||nt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ot(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S($s,"Theme"),$s),M3=S(e=>{const t=new A3;return t.calculate(e),t},"getThemeVariables"),Ns,F3=(Ns=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var l,c,h,d,f,p,g,x,y,C,k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?ot(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||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||nt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||ot(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(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:((l=this.xyChart)==null?void 0:l.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Ns,"Theme"),Ns),D3=S(e=>{const t=new F3;return t.calculate(e),t},"getThemeVariables"),qs,R3=(qs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(V("#323D47"),10),this.border1="#ccc",this.border2=bn(255,255,255,.25),this.arrowheadColor=V(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var i,a,o,l,c,h,d,f,p,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||nt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||nt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ot(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=ot(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fi(this.quadrant1Fill)?nt(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(qs,"Theme"),qs),O3=S(e=>{const t=new R3;return t.calculate(e),t},"getThemeVariables"),La={base:{getThemeVariables:g3},dark:{getThemeVariables:y3},default:{getThemeVariables:b3},forest:{getThemeVariables:v3},neutral:{getThemeVariables:S3},neo:{getThemeVariables:T3},"neo-dark":{getThemeVariables:B3},redux:{getThemeVariables:L3},"redux-dark":{getThemeVariables:M3},"redux-color":{getThemeVariables:D3},"redux-dark-color":{getThemeVariables:O3}},cr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"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},Yv={...cr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:La.default.getThemeVariables(),sequence:{...cr.sequence,messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:S(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:S(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...cr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...cr.c4,useWidth:void 0,personFont:S(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...cr.flowchart,inheritDir:!1},external_personFont:S(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:S(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:S(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:S(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:S(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:S(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:S(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:S(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:S(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:S(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:S(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:S(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:S(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:S(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:S(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:S(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:S(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:S(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:S(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:S(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...cr.pie,useWidth:984},xyChart:{...cr.xyChart,useWidth:void 0},requirement:{...cr.requirement,useWidth:void 0},packet:{...cr.packet},eventmodeling:{...cr.eventmodeling},treeView:{...cr.treeView,useWidth:void 0},radar:{...cr.radar},railroad:{...cr.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...cr.ishikawa},sankey:{...cr.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...cr.venn},cynefin:{...cr.cynefin}},Gv=S((e,t="")=>Object.keys(e).reduce((i,a)=>Array.isArray(e[a])?i:typeof e[a]=="object"&&e[a]!==null?[...i,t+a,...Gv(e[a],"")]:[...i,t+a],[]),"keyify"),z3=new Set(Gv(Yv,"")),Vv=Yv,$3={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},N3=S((e,t)=>{for(const i of Object.keys(e)){const a=e[i];(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof a!="string"||!t.test(a))&&(gt.debug("sanitize deleting dictionary entry:",i,a),delete e[i])}},"sanitizeDictionaryConfig"),Pu=S(e=>{if(gt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Pu(t));return}for(const t of Object.keys(e)){if(gt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!z3.has(t)||e[t]==null){gt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const a=$3[t];a?N3(e[t],a):(gt.debug("sanitizing object",t),Pu(e[t]));continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const a of i)t.includes(a)&&(gt.debug("sanitizing css option",t),e[t]=Xv(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const i=e.themeVariables[t];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}gt.debug("After sanitization",e)}},"sanitizeDirective"),Xv=S(e=>{let t=0,i=0;for(const a of e){if(t<i)return"{ /* ERROR: Unbalanced CSS */ }";a==="{"?t++:a==="}"&&i++}return t!==i?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ws=Object.freeze(Vv),ea=S(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Hr=Ze({},Ws),Wu,uo=[],kc=Ze({},Ws),Td=S((e,t)=>{let i=Ze({},e),a={};for(const o of t)Kv(o),a=Ze(a,o);if(i=Ze(i,a),a.theme&&a.theme in La){const o=Ze({},Wu),l=Ze(o.themeVariables||{},a.themeVariables);i.theme&&i.theme in La&&(i.themeVariables=La[i.theme].getThemeVariables(l))}return kc=i,tk(kc),kc},"updateCurrentConfig"),q3=S(e=>(Hr=Ze({},Ws),Hr=Ze(Hr,e),e.theme&&La[e.theme]&&(Hr.themeVariables=La[e.theme].getThemeVariables(e.themeVariables)),Td(Hr,uo),Hr),"setSiteConfig"),I3=S(e=>{Wu=Ze({},e)},"saveConfigFromInitialize"),j3=S(e=>(Hr=Ze(Hr,e),Td(Hr,uo),Hr),"updateSiteConfig"),Qv=S(()=>Ze({},Hr),"getSiteConfig"),Zv=S(e=>(tk(e),Ze(kc,e),_e()),"setConfig"),_e=S(()=>Ze({},kc),"getConfig"),Kv=S(e=>{e&&(["secure",...Hr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(gt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Kv(e[t])}))},"sanitize"),H3=S(e=>{var t;Pu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),uo.push(e),Td(Hr,uo)},"addDirective"),Uu=S((e=Hr)=>{uo=[],Td(e,uo)},"reset"),P3={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},KC={},Jv=S(e=>{KC[e]||(gt.warn(P3[e]),KC[e]=!0)},"issueWarning"),tk=S(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Jv("LAZY_LOAD_DEPRECATED")},"checkConfig"),VI=S(()=>{let e={};Wu&&(e=Ze(e,Wu));for(const t of uo)e=Ze(e,t);return e},"getUserDefinedConfig"),Lr=S(e=>{var t,i;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Jv("FLOWCHART_HTML_LABELS_DEPRECATED"),ea(e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ek=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Sc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,W3=/\s*%%.*\n/gm,Is,rk=(Is=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},S(Is,"UnknownDiagramError"),Is),fo={},Fm=S(function(e,t){e=e.replace(ek,"").replace(Sc,"").replace(W3,`
`);for(const[i,{detector:a}]of Object.entries(fo))if(a(e,t))return i;throw new rk(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Lg=S((...e)=>{for(const{id:t,detector:i,loader:a}of e)ik(t,i,a)},"registerLazyLoadedDiagrams"),ik=S((e,t,i)=>{fo[e]&&gt.warn(`Detector with key ${e} already exists. Overwriting.`),fo[e]={detector:t,loader:i},gt.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),U3=S(e=>fo[e].loader,"getDiagramLoader"),Ic=/<br\s*\/?>/gi,Y3=S(e=>e?ok(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),G3=(()=>{let e=!1;return()=>{e||(ak(),e=!0)}})();function ak(){const e="data-temp-href-target";Ps.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ps.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}S(ak,"setupDompurifyHooks");var nk=S(e=>(G3(),Ps.sanitize(e)),"removeScript"),JC=S((e,t)=>{if(Lr(t)){const i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?e=nk(e):i!=="loose"&&(e=ok(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Z3(e))}return e},"sanitizeMore"),Mi=S((e,t)=>e&&(t.dompurifyConfig?e=Ps.sanitize(JC(e,t),t.dompurifyConfig).toString():e=Ps.sanitize(JC(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),V3=S((e,t)=>typeof e=="string"?Mi(e,t):e.flat().map(i=>Mi(i,t)),"sanitizeTextOrArray"),X3=S(e=>Ic.test(e),"hasBreaks"),Q3=S(e=>e.split(Ic),"splitBreaks"),Z3=S(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ok=S(e=>e.replace(Ic,"#br#"),"breakToPlaceholder"),K3=S(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),J3=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),tM=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),t1=S(function(e){const t=e.split(/(,)/),i=[];for(let a=0;a<t.length;a++){let o=t[a];if(o===","&&a>0&&a+1<t.length){const l=t[a-1],c=t[a+1];eM(l,c)&&(o=l+","+c,a++,i.pop())}i.push(rM(o))}return i.join("")},"parseGenericTypes"),Ag=S((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),eM=S((e,t)=>{const i=Ag(e,"~"),a=Ag(t,"~");return i===1&&a===1},"shouldCombineSets"),rM=S(e=>{const t=Ag(e,"~");let i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);const a=[...e];let o=a.indexOf("~"),l=a.lastIndexOf("~");for(;o!==-1&&l!==-1&&o!==l;)a[o]="<",a[l]=">",o=a.indexOf("~"),l=a.lastIndexOf("~");return i&&a.unshift("~"),a.join("")},"processSet"),e1=S(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Mg=/\$\$(.*?)\$\$/g,Ec=S(e=>{var t;return(((t=e.match(Mg))==null?void 0:t.length)??0)>0},"hasKatex"),XI=S(async(e,t)=>{const i=document.createElement("div");i.innerHTML=await sk(e,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const a=document.querySelector("body");a==null||a.insertAdjacentElement("beforeend",i);const o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),iM=S(async(e,t)=>{if(!Ec(e))return e;if(!(e1()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Mg,"MathML is unsupported in this environment.");{const{default:i}=await Xt(async()=>{const{default:o}=await import("./katex-C5jXJg4s.js");return{default:o}},[],import.meta.url),a=t.forceLegacyMathML||!e1()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ic).map(o=>Ec(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Mg,(o,l)=>i.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),sk=S(async(e,t)=>Mi(await iM(e,t),t),"renderKatexSanitized"),jc={getRows:Y3,sanitizeText:Mi,sanitizeTextOrArray:V3,hasBreaks:X3,splitBreaks:Q3,lineBreakRegex:Ic,removeScript:nk,getUrl:K3,evaluate:ea,getMax:J3,getMin:tM},aM=S(function(e,t){for(let i of t)e.attr(i[0],i[1])},"d3Attrs"),nM=S(function(e,t,i){let a=new Map;return i?(a.set("width","100%"),a.set("style",`max-width: ${t}px;`)):(a.set("height",e),a.set("width",t)),a},"calculateSvgSizeAttrs"),lk=S(function(e,t,i,a){const o=nM(t,i,a);aM(e,o)},"configureSvgSize"),oM=S(function(e,t,i,a){const o=t.node().getBBox(),l=o.width,c=o.height;gt.info(`SVG bounds: ${l}x${c}`,o);let h=0,d=0;gt.info(`Graph bounds: ${h}x${d}`,e),h=l+i*2,d=c+i*2,gt.info(`Calculated bounds: ${h}x${d}`),lk(t,d,h,a);const f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;t.attr("viewBox",f)},"setupGraphViewbox"),Mu={};function Fg(e){return[...e.cssRules].map(t=>t.cssText).join(`
`)}S(Fg,"cssStyleSheetToString");var sM=S((e,t,i,a)=>{let o="";return e in Mu&&Mu[e]?o=Mu[e]({...i,svgId:a}):gt.warn(`No theme found for ${e}`),` & {
    font-family: ${i.fontFamily};
    font-size: ${i.fontSize};
    fill: ${i.textColor}
  }
  @keyframes edge-animation-frame {
    from {
      stroke-dashoffset: 0;
    }
  }
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  & .edge-animation-slow {
    stroke-dasharray: 9,5 !important;
    stroke-dashoffset: 900;
    animation: dash 50s linear infinite;
    stroke-linecap: round;
  }
  & .edge-animation-fast {
    stroke-dasharray: 9,5 !important;
    stroke-dashoffset: 900;
    animation: dash 20s linear infinite;
    stroke-linecap: round;
  }
  /* Classes common for multiple diagrams */

  & .error-icon {
    fill: ${i.errorBkgColor};
  }
  & .error-text {
    fill: ${i.errorTextColor};
    stroke: ${i.errorTextColor};
  }

  & .edge-thickness-normal {
    stroke-width: ${i.strokeWidth??1}px;
  }
  & .edge-thickness-thick {
    stroke-width: 3.5px
  }
  & .edge-pattern-solid {
    stroke-dasharray: 0;
  }
  & .edge-thickness-invisible {
    stroke-width: 0;
    fill: none;
  }
  & .edge-pattern-dashed{
    stroke-dasharray: 3;
  }
  .edge-pattern-dotted {
    stroke-dasharray: 2;
  }

  & .marker {
    fill: ${i.lineColor};
    stroke: ${i.lineColor};
  }
  & .marker.cross {
    stroke: ${i.lineColor};
  }

  & svg {
    font-family: ${i.fontFamily};
    font-size: ${i.fontSize};
  }
   & p {
    margin: 0
   }

  ${o}
  .node .neo-node {
    stroke: ${i.nodeBorder};
  }

  [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }
  [data-look="neo"].swimlane.cluster rect {
    filter: none;
  }


  [data-look="neo"].node path {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    stroke-width: ${i.strokeWidth??1}px;
  }

  [data-look="neo"].node .outer-path {
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  [data-look="neo"].node .neo-line path {
    stroke: ${i.nodeBorder};
    filter: none;
  }

  [data-look="neo"].node circle{
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  [data-look="neo"].node circle .state-start{
    fill: #000000;
  }

  [data-look="neo"].icon-shape .icon {
    fill: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

    [data-look="neo"].icon-shape .icon-neo path {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  ${t}
`},"getStyles"),lM=S((e,t)=>{t!==void 0&&(Mu[e]=t)},"addStylesForDiagram"),cM=sM,ck={};SA(ck,{clear:()=>hM,getAccDescription:()=>pM,getAccTitle:()=>dM,getDiagramTitle:()=>mM,setAccDescription:()=>fM,setAccTitle:()=>uM,setDiagramTitle:()=>gM});var Dm="",Rm="",Om="",zm=S(e=>Mi(e,_e()),"sanitizeText"),hM=S(()=>{Dm="",Om="",Rm=""},"clear"),uM=S(e=>{Dm=zm(e).replace(/^\s+/g,"")},"setAccTitle"),dM=S(()=>Dm,"getAccTitle"),fM=S(e=>{Om=zm(e).replace(/\n\s+/g,`
`)},"setAccDescription"),pM=S(()=>Om,"getAccDescription"),gM=S(e=>{Rm=zm(e)},"setDiagramTitle"),mM=S(()=>Rm,"getDiagramTitle"),r1=gt,yM=Mm,ce=_e,QI=Zv,ZI=Ws,$m=S(e=>Mi(e,ce()),"sanitizeText"),xM=oM,bM=S(()=>ck,"getCommonDb"),Yu={},Gu=S((e,t,i)=>{var a;Yu[e]&&r1.warn(`Diagram with id ${e} already registered. Overwriting.`),Yu[e]=t,i&&ik(e,i),lM(e,t.styles),(a=t.injectUtils)==null||a.call(t,r1,yM,ce,$m,xM,bM(),()=>{})},"registerDiagram"),Dg=S(e=>{if(e in Yu)return Yu[e];throw new CM(e)},"getDiagram"),js,CM=(js=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},S(js,"DiagramNotFoundError"),js),vM={value:()=>{}};function hk(){for(var e=0,t=arguments.length,i={},a;e<t;++e){if(!(a=arguments[e]+"")||a in i||/[\s.]/.test(a))throw new Error("illegal type: "+a);i[a]=[]}return new Fu(i)}function Fu(e){this._=e}function kM(e,t){return e.trim().split(/^|\s+/).map(function(i){var a="",o=i.indexOf(".");if(o>=0&&(a=i.slice(o+1),i=i.slice(0,o)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:a}})}Fu.prototype=hk.prototype={constructor:Fu,on:function(e,t){var i=this._,a=kM(e+"",i),o,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((o=(e=a[l]).type)&&(o=SM(i[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<c;)if(o=(e=a[l]).type)i[o]=i1(i[o],e.name,t);else if(t==null)for(o in i)i[o]=i1(i[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new Fu(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var i=new Array(o),a=0,o,l;a<o;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,o=l.length;a<o;++a)l[a].value.apply(t,i)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],o=0,l=a.length;o<l;++o)a[o].value.apply(t,i)}};function SM(e,t){for(var i=0,a=e.length,o;i<a;++i)if((o=e[i]).name===t)return o.value}function i1(e,t,i){for(var a=0,o=e.length;a<o;++a)if(e[a].name===t){e[a]=vM,e=e.slice(0,a).concat(e.slice(a+1));break}return i!=null&&e.push({name:t,value:i}),e}var Rg="http://www.w3.org/1999/xhtml";const a1={svg:"http://www.w3.org/2000/svg",xhtml:Rg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _d(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),a1.hasOwnProperty(t)?{space:a1[t],local:e}:e}function wM(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===Rg&&t.documentElement.namespaceURI===Rg?t.createElement(e):t.createElementNS(i,e)}}function TM(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uk(e){var t=_d(e);return(t.local?TM:wM)(t)}function _M(){}function Nm(e){return e==null?_M:function(){return this.querySelector(e)}}function BM(e){typeof e!="function"&&(e=Nm(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),h[p]=f);return new ai(a,this._parents)}function EM(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function LM(){return[]}function dk(e){return e==null?LM:function(){return this.querySelectorAll(e)}}function AM(e){return function(){return EM(e.apply(this,arguments))}}function MM(e){typeof e=="function"?e=AM(e):e=dk(e);for(var t=this._groups,i=t.length,a=[],o=[],l=0;l<i;++l)for(var c=t[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&(a.push(e.call(d,d.__data__,f,c)),o.push(d));return new ai(a,o)}function fk(e){return function(){return this.matches(e)}}function pk(e){return function(t){return t.matches(e)}}var FM=Array.prototype.find;function DM(e){return function(){return FM.call(this.children,e)}}function RM(){return this.firstElementChild}function OM(e){return this.select(e==null?RM:DM(typeof e=="function"?e:pk(e)))}var zM=Array.prototype.filter;function $M(){return Array.from(this.children)}function NM(e){return function(){return zM.call(this.children,e)}}function qM(e){return this.selectAll(e==null?$M:NM(typeof e=="function"?e:pk(e)))}function IM(e){typeof e!="function"&&(e=fk(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new ai(a,this._parents)}function gk(e){return new Array(e.length)}function jM(){return new ai(this._enter||this._groups.map(gk),this._parents)}function Vu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vu.prototype={constructor:Vu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function HM(e){return function(){return e}}function PM(e,t,i,a,o,l){for(var c=0,h,d=t.length,f=l.length;c<f;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):i[c]=new Vu(e,l[c]);for(;c<d;++c)(h=t[c])&&(o[c]=h)}function WM(e,t,i,a,o,l,c){var h,d,f=new Map,p=t.length,g=l.length,x=new Array(p),y;for(h=0;h<p;++h)(d=t[h])&&(x[h]=y=c.call(d,d.__data__,h,t)+"",f.has(y)?o[h]=d:f.set(y,d));for(h=0;h<g;++h)y=c.call(e,l[h],h,l)+"",(d=f.get(y))?(a[h]=d,d.__data__=l[h],f.delete(y)):i[h]=new Vu(e,l[h]);for(h=0;h<p;++h)(d=t[h])&&f.get(x[h])===d&&(o[h]=d)}function UM(e){return e.__data__}function YM(e,t){if(!arguments.length)return Array.from(this,UM);var i=t?WM:PM,a=this._parents,o=this._groups;typeof e!="function"&&(e=HM(e));for(var l=o.length,c=new Array(l),h=new Array(l),d=new Array(l),f=0;f<l;++f){var p=a[f],g=o[f],x=g.length,y=GM(e.call(p,p&&p.__data__,f,a)),C=y.length,k=h[f]=new Array(C),v=c[f]=new Array(C),w=d[f]=new Array(x);i(p,g,k,v,w,y,t);for(var B=0,L=0,F,D;B<C;++B)if(F=k[B]){for(B>=L&&(L=B+1);!(D=v[L])&&++L<C;);F._next=D||null}}return c=new ai(c,a),c._enter=h,c._exit=d,c}function GM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VM(){return new ai(this._exit||this._groups.map(gk),this._parents)}function XM(e,t,i){var a=this.enter(),o=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),i==null?l.remove():i(l),a&&o?a.merge(o).order():o}function QM(e){for(var t=e.selection?e.selection():e,i=this._groups,a=t._groups,o=i.length,l=a.length,c=Math.min(o,l),h=new Array(o),d=0;d<c;++d)for(var f=i[d],p=a[d],g=f.length,x=h[d]=new Array(g),y,C=0;C<g;++C)(y=f[C]||p[C])&&(x[C]=y);for(;d<o;++d)h[d]=i[d];return new ai(h,this._parents)}function ZM(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var a=e[t],o=a.length-1,l=a[o],c;--o>=0;)(c=a[o])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function KM(e){e||(e=JM);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,a=i.length,o=new Array(a),l=0;l<a;++l){for(var c=i[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(d[p]=f);d.sort(t)}return new ai(o,this._parents).order()}function JM(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function t5(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function e5(){return Array.from(this)}function r5(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],o=0,l=a.length;o<l;++o){var c=a[o];if(c)return c}return null}function i5(){let e=0;for(const t of this)++e;return e}function a5(){return!this.node()}function n5(e){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var o=t[i],l=0,c=o.length,h;l<c;++l)(h=o[l])&&e.call(h,h.__data__,l,o);return this}function o5(e){return function(){this.removeAttribute(e)}}function s5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function l5(e,t){return function(){this.setAttribute(e,t)}}function c5(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function h5(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function u5(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function d5(e,t){var i=_d(e);if(arguments.length<2){var a=this.node();return i.local?a.getAttributeNS(i.space,i.local):a.getAttribute(i)}return this.each((t==null?i.local?s5:o5:typeof t=="function"?i.local?u5:h5:i.local?c5:l5)(i,t))}function mk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function f5(e){return function(){this.style.removeProperty(e)}}function p5(e,t,i){return function(){this.style.setProperty(e,t,i)}}function g5(e,t,i){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,i)}}function m5(e,t,i){return arguments.length>1?this.each((t==null?f5:typeof t=="function"?g5:p5)(e,t,i??"")):Us(this.node(),e)}function Us(e,t){return e.style.getPropertyValue(t)||mk(e).getComputedStyle(e,null).getPropertyValue(t)}function y5(e){return function(){delete this[e]}}function x5(e,t){return function(){this[e]=t}}function b5(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function C5(e,t){return arguments.length>1?this.each((t==null?y5:typeof t=="function"?b5:x5)(e,t)):this.node()[e]}function yk(e){return e.trim().split(/^|\s+/)}function qm(e){return e.classList||new xk(e)}function xk(e){this._node=e,this._names=yk(e.getAttribute("class")||"")}xk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function bk(e,t){for(var i=qm(e),a=-1,o=t.length;++a<o;)i.add(t[a])}function Ck(e,t){for(var i=qm(e),a=-1,o=t.length;++a<o;)i.remove(t[a])}function v5(e){return function(){bk(this,e)}}function k5(e){return function(){Ck(this,e)}}function S5(e,t){return function(){(t.apply(this,arguments)?bk:Ck)(this,e)}}function w5(e,t){var i=yk(e+"");if(arguments.length<2){for(var a=qm(this.node()),o=-1,l=i.length;++o<l;)if(!a.contains(i[o]))return!1;return!0}return this.each((typeof t=="function"?S5:t?v5:k5)(i,t))}function T5(){this.textContent=""}function _5(e){return function(){this.textContent=e}}function B5(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function E5(e){return arguments.length?this.each(e==null?T5:(typeof e=="function"?B5:_5)(e)):this.node().textContent}function L5(){this.innerHTML=""}function A5(e){return function(){this.innerHTML=e}}function M5(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function F5(e){return arguments.length?this.each(e==null?L5:(typeof e=="function"?M5:A5)(e)):this.node().innerHTML}function D5(){this.nextSibling&&this.parentNode.appendChild(this)}function R5(){return this.each(D5)}function O5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function z5(){return this.each(O5)}function $5(e){var t=typeof e=="function"?e:uk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function N5(){return null}function q5(e,t){var i=typeof e=="function"?e:uk(e),a=t==null?N5:typeof t=="function"?t:Nm(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),a.apply(this,arguments)||null)})}function I5(){var e=this.parentNode;e&&e.removeChild(this)}function j5(){return this.each(I5)}function H5(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function P5(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function W5(e){return this.select(e?P5:H5)}function U5(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Y5(e){return function(t){e.call(this,t,this.__data__)}}function G5(e){return e.trim().split(/^|\s+/).map(function(t){var i="",a=t.indexOf(".");return a>=0&&(i=t.slice(a+1),t=t.slice(0,a)),{type:t,name:i}})}function V5(e){return function(){var t=this.__on;if(t){for(var i=0,a=-1,o=t.length,l;i<o;++i)l=t[i],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++a]=l;++a?t.length=a:delete this.__on}}}function X5(e,t,i){return function(){var a=this.__on,o,l=Y5(t);if(a){for(var c=0,h=a.length;c<h;++c)if((o=a[c]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=l,o.options=i),o.value=t;return}}this.addEventListener(e.type,l,i),o={type:e.type,name:e.name,value:t,listener:l,options:i},a?a.push(o):this.__on=[o]}}function Q5(e,t,i){var a=G5(e+""),o,l=a.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var d=0,f=h.length,p;d<f;++d)for(o=0,p=h[d];o<l;++o)if((c=a[o]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?X5:V5,o=0;o<l;++o)this.each(h(a[o],t,i));return this}function vk(e,t,i){var a=mk(e),o=a.CustomEvent;typeof o=="function"?o=new o(t,i):(o=a.document.createEvent("Event"),i?(o.initEvent(t,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Z5(e,t){return function(){return vk(this,e,t)}}function K5(e,t){return function(){return vk(this,e,t.apply(this,arguments))}}function J5(e,t){return this.each((typeof t=="function"?K5:Z5)(e,t))}function*tF(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],o=0,l=a.length,c;o<l;++o)(c=a[o])&&(yield c)}var kk=[null];function ai(e,t){this._groups=e,this._parents=t}function Hc(){return new ai([[document.documentElement]],kk)}function eF(){return this}ai.prototype=Hc.prototype={constructor:ai,select:BM,selectAll:MM,selectChild:OM,selectChildren:qM,filter:IM,data:YM,enter:jM,exit:VM,join:XM,merge:QM,selection:eF,order:ZM,sort:KM,call:t5,nodes:e5,node:r5,size:i5,empty:a5,each:n5,attr:d5,style:m5,property:C5,classed:w5,text:E5,html:F5,raise:R5,lower:z5,append:$5,insert:q5,remove:j5,clone:W5,datum:U5,on:Q5,dispatch:J5,[Symbol.iterator]:tF};function Zt(e){return typeof e=="string"?new ai([[document.querySelector(e)]],[document.documentElement]):new ai([[e]],kk)}function Im(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Sk(e,t){var i=Object.create(e.prototype);for(var a in t)i[a]=t[a];return i}function Pc(){}var Lc=.7,Xu=1/Lc,Bs="\\s*([+-]?\\d+)\\s*",Ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rF=/^#([0-9a-f]{3,8})$/,iF=new RegExp(`^rgb\\(${Bs},${Bs},${Bs}\\)$`),aF=new RegExp(`^rgb\\(${Qi},${Qi},${Qi}\\)$`),nF=new RegExp(`^rgba\\(${Bs},${Bs},${Bs},${Ac}\\)$`),oF=new RegExp(`^rgba\\(${Qi},${Qi},${Qi},${Ac}\\)$`),sF=new RegExp(`^hsl\\(${Ac},${Qi},${Qi}\\)$`),lF=new RegExp(`^hsla\\(${Ac},${Qi},${Qi},${Ac}\\)$`),n1={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};Im(Pc,Mc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:o1,formatHex:o1,formatHex8:cF,formatHsl:hF,formatRgb:s1,toString:s1});function o1(){return this.rgb().formatHex()}function cF(){return this.rgb().formatHex8()}function hF(){return wk(this).formatHsl()}function s1(){return this.rgb().formatRgb()}function Mc(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=rF.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?l1(t):i===3?new Wr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?pu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?pu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=iF.exec(e))?new Wr(t[1],t[2],t[3],1):(t=aF.exec(e))?new Wr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nF.exec(e))?pu(t[1],t[2],t[3],t[4]):(t=oF.exec(e))?pu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sF.exec(e))?u1(t[1],t[2]/100,t[3]/100,1):(t=lF.exec(e))?u1(t[1],t[2]/100,t[3]/100,t[4]):n1.hasOwnProperty(e)?l1(n1[e]):e==="transparent"?new Wr(NaN,NaN,NaN,0):null}function l1(e){return new Wr(e>>16&255,e>>8&255,e&255,1)}function pu(e,t,i,a){return a<=0&&(e=t=i=NaN),new Wr(e,t,i,a)}function uF(e){return e instanceof Pc||(e=Mc(e)),e?(e=e.rgb(),new Wr(e.r,e.g,e.b,e.opacity)):new Wr}function Og(e,t,i,a){return arguments.length===1?uF(e):new Wr(e,t,i,a??1)}function Wr(e,t,i,a){this.r=+e,this.g=+t,this.b=+i,this.opacity=+a}Im(Wr,Og,Sk(Pc,{brighter(e){return e=e==null?Xu:Math.pow(Xu,e),new Wr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Wr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wr(co(this.r),co(this.g),co(this.b),Qu(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:c1,formatHex:c1,formatHex8:dF,formatRgb:h1,toString:h1}));function c1(){return`#${oo(this.r)}${oo(this.g)}${oo(this.b)}`}function dF(){return`#${oo(this.r)}${oo(this.g)}${oo(this.b)}${oo((isNaN(this.opacity)?1:this.opacity)*255)}`}function h1(){const e=Qu(this.opacity);return`${e===1?"rgb(":"rgba("}${co(this.r)}, ${co(this.g)}, ${co(this.b)}${e===1?")":`, ${e})`}`}function Qu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function oo(e){return e=co(e),(e<16?"0":"")+e.toString(16)}function u1(e,t,i,a){return a<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new Bi(e,t,i,a)}function wk(e){if(e instanceof Bi)return new Bi(e.h,e.s,e.l,e.opacity);if(e instanceof Pc||(e=Mc(e)),!e)return new Bi;if(e instanceof Bi)return e;e=e.rgb();var t=e.r/255,i=e.g/255,a=e.b/255,o=Math.min(t,i,a),l=Math.max(t,i,a),c=NaN,h=l-o,d=(l+o)/2;return h?(t===l?c=(i-a)/h+(i<a)*6:i===l?c=(a-t)/h+2:c=(t-i)/h+4,h/=d<.5?l+o:2-l-o,c*=60):h=d>0&&d<1?0:c,new Bi(c,h,d,e.opacity)}function fF(e,t,i,a){return arguments.length===1?wk(e):new Bi(e,t,i,a??1)}function Bi(e,t,i,a){this.h=+e,this.s=+t,this.l=+i,this.opacity=+a}Im(Bi,fF,Sk(Pc,{brighter(e){return e=e==null?Xu:Math.pow(Xu,e),new Bi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Bi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,a=i+(i<.5?i:1-i)*t,o=2*i-a;return new Wr(cg(e>=240?e-240:e+120,o,a),cg(e,o,a),cg(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new Bi(d1(this.h),gu(this.s),gu(this.l),Qu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qu(this.opacity);return`${e===1?"hsl(":"hsla("}${d1(this.h)}, ${gu(this.s)*100}%, ${gu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function d1(e){return e=(e||0)%360,e<0?e+360:e}function gu(e){return Math.max(0,Math.min(1,e||0))}function cg(e,t,i){return(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)*255}const jm=e=>()=>e;function Tk(e,t){return function(i){return e+i*t}}function pF(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(a){return Math.pow(e+a*t,i)}}function KI(e,t){var i=t-e;return i?Tk(e,i>180||i<-180?i-360*Math.round(i/360):i):jm(isNaN(e)?t:e)}function gF(e){return(e=+e)==1?_k:function(t,i){return i-t?pF(t,i,e):jm(isNaN(t)?i:t)}}function _k(e,t){var i=t-e;return i?Tk(e,i):jm(isNaN(e)?t:e)}const f1=(function e(t){var i=gF(t);function a(o,l){var c=i((o=Og(o)).r,(l=Og(l)).r),h=i(o.g,l.g),d=i(o.b,l.b),f=_k(o.opacity,l.opacity);return function(p){return o.r=c(p),o.g=h(p),o.b=d(p),o.opacity=f(p),o+""}}return a.gamma=e,a})(1);function gn(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var zg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hg=new RegExp(zg.source,"g");function mF(e){return function(){return e}}function yF(e){return function(t){return e(t)+""}}function xF(e,t){var i=zg.lastIndex=hg.lastIndex=0,a,o,l,c=-1,h=[],d=[];for(e=e+"",t=t+"";(a=zg.exec(e))&&(o=hg.exec(t));)(l=o.index)>i&&(l=t.slice(i,l),h[c]?h[c]+=l:h[++c]=l),(a=a[0])===(o=o[0])?h[c]?h[c]+=o:h[++c]=o:(h[++c]=null,d.push({i:c,x:gn(a,o)})),i=hg.lastIndex;return i<t.length&&(l=t.slice(i),h[c]?h[c]+=l:h[++c]=l),h.length<2?d[0]?yF(d[0].x):mF(t):(t=d.length,function(f){for(var p=0,g;p<t;++p)h[(g=d[p]).i]=g.x(f);return h.join("")})}var p1=180/Math.PI,$g={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bk(e,t,i,a,o,l){var c,h,d;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(d=e*i+t*a)&&(i-=e*d,a-=t*d),(h=Math.sqrt(i*i+a*a))&&(i/=h,a/=h,d/=h),e*a<t*i&&(e=-e,t=-t,d=-d,c=-c),{translateX:o,translateY:l,rotate:Math.atan2(t,e)*p1,skewX:Math.atan(d)*p1,scaleX:c,scaleY:h}}var mu;function bF(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?$g:Bk(t.a,t.b,t.c,t.d,t.e,t.f)}function CF(e){return e==null||(mu||(mu=document.createElementNS("http://www.w3.org/2000/svg","g")),mu.setAttribute("transform",e),!(e=mu.transform.baseVal.consolidate()))?$g:(e=e.matrix,Bk(e.a,e.b,e.c,e.d,e.e,e.f))}function Ek(e,t,i,a){function o(f){return f.length?f.pop()+" ":""}function l(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push("translate(",null,t,null,i);C.push({i:k-4,x:gn(f,g)},{i:k-2,x:gn(p,x)})}else(g||x)&&y.push("translate("+g+t+x+i)}function c(f,p,g,x){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),x.push({i:g.push(o(g)+"rotate(",null,a)-2,x:gn(f,p)})):p&&g.push(o(g)+"rotate("+p+a)}function h(f,p,g,x){f!==p?x.push({i:g.push(o(g)+"skewX(",null,a)-2,x:gn(f,p)}):p&&g.push(o(g)+"skewX("+p+a)}function d(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push(o(y)+"scale(",null,",",null,")");C.push({i:k-4,x:gn(f,g)},{i:k-2,x:gn(p,x)})}else(g!==1||x!==1)&&y.push(o(y)+"scale("+g+","+x+")")}return function(f,p){var g=[],x=[];return f=e(f),p=e(p),l(f.translateX,f.translateY,p.translateX,p.translateY,g,x),c(f.rotate,p.rotate,g,x),h(f.skewX,p.skewX,g,x),d(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,x),f=p=null,function(y){for(var C=-1,k=x.length,v;++C<k;)g[(v=x[C]).i]=v.x(y);return g.join("")}}}var vF=Ek(bF,"px, ","px)","deg)"),kF=Ek(CF,", ",")",")"),Ys=0,fc=0,ic=0,Lk=1e3,Zu,pc,Ku=0,po=0,Bd=0,Fc=typeof performance=="object"&&performance.now?performance:Date,Ak=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Hm(){return po||(Ak(SF),po=Fc.now()+Bd)}function SF(){po=0}function Ju(){this._call=this._time=this._next=null}Ju.prototype=Mk.prototype={constructor:Ju,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?Hm():+i)+(t==null?0:+t),!this._next&&pc!==this&&(pc?pc._next=this:Zu=this,pc=this),this._call=e,this._time=i,Ng()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ng())}};function Mk(e,t,i){var a=new Ju;return a.restart(e,t,i),a}function wF(){Hm(),++Ys;for(var e=Zu,t;e;)(t=po-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ys}function g1(){po=(Ku=Fc.now())+Bd,Ys=fc=0;try{wF()}finally{Ys=0,_F(),po=0}}function TF(){var e=Fc.now(),t=e-Ku;t>Lk&&(Bd-=t,Ku=e)}function _F(){for(var e,t=Zu,i,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(i=t._next,t._next=null,t=e?e._next=i:Zu=i);pc=e,Ng(a)}function Ng(e){if(!Ys){fc&&(fc=clearTimeout(fc));var t=e-po;t>24?(e<1/0&&(fc=setTimeout(g1,e-Fc.now()-Bd)),ic&&(ic=clearInterval(ic))):(ic||(Ku=Fc.now(),ic=setInterval(TF,Lk)),Ys=1,Ak(g1))}}function m1(e,t,i){var a=new Ju;return t=t==null?0:+t,a.restart(o=>{a.stop(),e(o+t)},t,i),a}var BF=hk("start","end","cancel","interrupt"),EF=[],Fk=0,y1=1,qg=2,Du=3,x1=4,Ig=5,Ru=6;function Ed(e,t,i,a,o,l){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;LF(e,i,{name:t,index:a,group:o,on:BF,tween:EF,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Fk})}function Pm(e,t){var i=Di(e,t);if(i.state>Fk)throw new Error("too late; already scheduled");return i}function ra(e,t){var i=Di(e,t);if(i.state>Du)throw new Error("too late; already running");return i}function Di(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function LF(e,t,i){var a=e.__transition,o;a[t]=i,i.timer=Mk(l,0,i.time);function l(f){i.state=y1,i.timer.restart(c,i.delay,i.time),i.delay<=f&&c(f-i.delay)}function c(f){var p,g,x,y;if(i.state!==y1)return d();for(p in a)if(y=a[p],y.name===i.name){if(y.state===Du)return m1(c);y.state===x1?(y.state=Ru,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[p]):+p<t&&(y.state=Ru,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[p])}if(m1(function(){i.state===Du&&(i.state=x1,i.timer.restart(h,i.delay,i.time),h(f))}),i.state=qg,i.on.call("start",e,e.__data__,i.index,i.group),i.state===qg){for(i.state=Du,o=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(y=i.tween[p].value.call(e,e.__data__,i.index,i.group))&&(o[++g]=y);o.length=g+1}}function h(f){for(var p=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=Ig,1),g=-1,x=o.length;++g<x;)o[g].call(e,p);i.state===Ig&&(i.on.call("end",e,e.__data__,i.index,i.group),d())}function d(){i.state=Ru,i.timer.stop(),delete a[t];for(var f in a)return;delete e.__transition}}function AF(e,t){var i=e.__transition,a,o,l=!0,c;if(i){t=t==null?null:t+"";for(c in i){if((a=i[c]).name!==t){l=!1;continue}o=a.state>qg&&a.state<Ig,a.state=Ru,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete i[c]}l&&delete e.__transition}}function MF(e){return this.each(function(){AF(this,e)})}function FF(e,t){var i,a;return function(){var o=ra(this,e),l=o.tween;if(l!==i){a=i=l;for(var c=0,h=a.length;c<h;++c)if(a[c].name===t){a=a.slice(),a.splice(c,1);break}}o.tween=a}}function DF(e,t,i){var a,o;if(typeof i!="function")throw new Error;return function(){var l=ra(this,e),c=l.tween;if(c!==a){o=(a=c).slice();for(var h={name:t,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===t){o[d]=h;break}d===f&&o.push(h)}l.tween=o}}function RF(e,t){var i=this._id;if(e+="",arguments.length<2){for(var a=Di(this.node(),i).tween,o=0,l=a.length,c;o<l;++o)if((c=a[o]).name===e)return c.value;return null}return this.each((t==null?FF:DF)(i,e,t))}function Wm(e,t,i){var a=e._id;return e.each(function(){var o=ra(this,a);(o.value||(o.value={}))[t]=i.apply(this,arguments)}),function(o){return Di(o,a).value[t]}}function Dk(e,t){var i;return(typeof t=="number"?gn:t instanceof Mc?f1:(i=Mc(t))?(t=i,f1):xF)(e,t)}function OF(e){return function(){this.removeAttribute(e)}}function zF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $F(e,t,i){var a,o=i+"",l;return function(){var c=this.getAttribute(e);return c===o?null:c===a?l:l=t(a=c,i)}}function NF(e,t,i){var a,o=i+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===o?null:c===a?l:l=t(a=c,i)}}function qF(e,t,i){var a,o,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),d=h+"",c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h)))}}function IF(e,t,i){var a,o,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),d=h+"",c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h)))}}function jF(e,t){var i=_d(e),a=i==="transform"?kF:Dk;return this.attrTween(e,typeof t=="function"?(i.local?IF:qF)(i,a,Wm(this,"attr."+e,t)):t==null?(i.local?zF:OF)(i):(i.local?NF:$F)(i,a,t))}function HF(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function PF(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function WF(e,t){var i,a;function o(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&PF(e,l)),i}return o._value=t,o}function UF(e,t){var i,a;function o(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&HF(e,l)),i}return o._value=t,o}function YF(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;var a=_d(e);return this.tween(i,(a.local?WF:UF)(a,t))}function GF(e,t){return function(){Pm(this,e).delay=+t.apply(this,arguments)}}function VF(e,t){return t=+t,function(){Pm(this,e).delay=t}}function XF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?GF:VF)(t,e)):Di(this.node(),t).delay}function QF(e,t){return function(){ra(this,e).duration=+t.apply(this,arguments)}}function ZF(e,t){return t=+t,function(){ra(this,e).duration=t}}function KF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?QF:ZF)(t,e)):Di(this.node(),t).duration}function JF(e,t){if(typeof t!="function")throw new Error;return function(){ra(this,e).ease=t}}function tD(e){var t=this._id;return arguments.length?this.each(JF(t,e)):Di(this.node(),t).ease}function eD(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;ra(this,e).ease=i}}function rD(e){if(typeof e!="function")throw new Error;return this.each(eD(this._id,e))}function iD(e){typeof e!="function"&&(e=fk(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new Ma(a,this._parents,this._name,this._id)}function aD(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,a=t.length,o=i.length,l=Math.min(a,o),c=new Array(a),h=0;h<l;++h)for(var d=t[h],f=i[h],p=d.length,g=c[h]=new Array(p),x,y=0;y<p;++y)(x=d[y]||f[y])&&(g[y]=x);for(;h<a;++h)c[h]=t[h];return new Ma(c,this._parents,this._name,this._id)}function nD(e){return(e+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");return i>=0&&(t=t.slice(0,i)),!t||t==="start"})}function oD(e,t,i){var a,o,l=nD(t)?Pm:ra;return function(){var c=l(this,e),h=c.on;h!==a&&(o=(a=h).copy()).on(t,i),c.on=o}}function sD(e,t){var i=this._id;return arguments.length<2?Di(this.node(),i).on.on(e):this.each(oD(i,e,t))}function lD(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function cD(){return this.on("end.remove",lD(this._id))}function hD(e){var t=this._name,i=this._id;typeof e!="function"&&(e=Nm(e));for(var a=this._groups,o=a.length,l=new Array(o),c=0;c<o;++c)for(var h=a[c],d=h.length,f=l[c]=new Array(d),p,g,x=0;x<d;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,Ed(f[x],t,i,x,f,Di(p,i)));return new Ma(l,this._parents,t,i)}function uD(e){var t=this._name,i=this._id;typeof e!="function"&&(e=dk(e));for(var a=this._groups,o=a.length,l=[],c=[],h=0;h<o;++h)for(var d=a[h],f=d.length,p,g=0;g<f;++g)if(p=d[g]){for(var x=e.call(p,p.__data__,g,d),y,C=Di(p,i),k=0,v=x.length;k<v;++k)(y=x[k])&&Ed(y,t,i,k,x,C);l.push(x),c.push(p)}return new Ma(l,c,t,i)}var dD=Hc.prototype.constructor;function fD(){return new dD(this._groups,this._parents)}function pD(e,t){var i,a,o;return function(){var l=Us(this,e),c=(this.style.removeProperty(e),Us(this,e));return l===c?null:l===i&&c===a?o:o=t(i=l,a=c)}}function Rk(e){return function(){this.style.removeProperty(e)}}function gD(e,t,i){var a,o=i+"",l;return function(){var c=Us(this,e);return c===o?null:c===a?l:l=t(a=c,i)}}function mD(e,t,i){var a,o,l;return function(){var c=Us(this,e),h=i(this),d=h+"";return h==null&&(d=h=(this.style.removeProperty(e),Us(this,e))),c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h))}}function yD(e,t){var i,a,o,l="style."+t,c="end."+l,h;return function(){var d=ra(this,e),f=d.on,p=d.value[l]==null?h||(h=Rk(t)):void 0;(f!==i||o!==p)&&(a=(i=f).copy()).on(c,o=p),d.on=a}}function xD(e,t,i){var a=(e+="")=="transform"?vF:Dk;return t==null?this.styleTween(e,pD(e,a)).on("end.style."+e,Rk(e)):typeof t=="function"?this.styleTween(e,mD(e,a,Wm(this,"style."+e,t))).each(yD(this._id,e)):this.styleTween(e,gD(e,a,t),i).on("end.style."+e,null)}function bD(e,t,i){return function(a){this.style.setProperty(e,t.call(this,a),i)}}function CD(e,t,i){var a,o;function l(){var c=t.apply(this,arguments);return c!==o&&(a=(o=c)&&bD(e,c,i)),a}return l._value=t,l}function vD(e,t,i){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,CD(e,t,i??""))}function kD(e){return function(){this.textContent=e}}function SD(e){return function(){var t=e(this);this.textContent=t??""}}function wD(e){return this.tween("text",typeof e=="function"?SD(Wm(this,"text",e)):kD(e==null?"":e+""))}function TD(e){return function(t){this.textContent=e.call(this,t)}}function _D(e){var t,i;function a(){var o=e.apply(this,arguments);return o!==i&&(t=(i=o)&&TD(o)),t}return a._value=e,a}function BD(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_D(e))}function ED(){for(var e=this._name,t=this._id,i=Ok(),a=this._groups,o=a.length,l=0;l<o;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)if(d=c[f]){var p=Di(d,t);Ed(d,e,i,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Ma(a,this._parents,e,i)}function LD(){var e,t,i=this,a=i._id,o=i.size();return new Promise(function(l,c){var h={value:c},d={value:function(){--o===0&&l()}};i.each(function(){var f=ra(this,a),p=f.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(d)),f.on=t}),o===0&&l()})}var AD=0;function Ma(e,t,i,a){this._groups=e,this._parents=t,this._name=i,this._id=a}function Ok(){return++AD}var _a=Hc.prototype;Ma.prototype={constructor:Ma,select:hD,selectAll:uD,selectChild:_a.selectChild,selectChildren:_a.selectChildren,filter:iD,merge:aD,selection:fD,transition:ED,call:_a.call,nodes:_a.nodes,node:_a.node,size:_a.size,empty:_a.empty,each:_a.each,on:sD,attr:jF,attrTween:YF,style:xD,styleTween:vD,text:wD,textTween:BD,remove:cD,tween:RF,delay:XF,duration:KF,ease:tD,easeVarying:rD,end:LD,[Symbol.iterator]:_a[Symbol.iterator]};function MD(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var FD={time:null,delay:0,duration:250,ease:MD};function DD(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}function RD(e){var t,i;e instanceof Ma?(t=e._id,e=e._name):(t=Ok(),(i=FD).time=Hm(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,l=0;l<o;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&Ed(d,e,t,f,c,i||DD(d,t));return new Ma(a,this._parents,e,t)}Hc.prototype.interrupt=MF;Hc.prototype.transition=RD;const jg=Math.PI,Hg=2*jg,ro=1e-6,OD=Hg-ro;function zk(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function zD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zk;const i=10**t;return function(a){this._+=a[0];for(let o=1,l=a.length;o<l;++o)this._+=Math.round(arguments[o]*i)/i+a[o]}}class $D{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?zk:zD(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,a,o){this._append`Q${+t},${+i},${this._x1=+a},${this._y1=+o}`}bezierCurveTo(t,i,a,o,l,c){this._append`C${+t},${+i},${+a},${+o},${this._x1=+l},${this._y1=+c}`}arcTo(t,i,a,o,l){if(t=+t,i=+i,a=+a,o=+o,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,d=a-t,f=o-i,p=c-t,g=h-i,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(x>ro)if(!(Math.abs(g*d-f*p)>ro)||!l)this._append`L${this._x1=t},${this._y1=i}`;else{let y=a-c,C=o-h,k=d*d+f*f,v=y*y+C*C,w=Math.sqrt(k),B=Math.sqrt(x),L=l*Math.tan((jg-Math.acos((k+x-v)/(2*w*B)))/2),F=L/B,D=L/w;Math.abs(F-1)>ro&&this._append`L${t+F*p},${i+F*g}`,this._append`A${l},${l},0,0,${+(g*y>p*C)},${this._x1=t+D*d},${this._y1=i+D*f}`}}arc(t,i,a,o,l,c){if(t=+t,i=+i,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(o),d=a*Math.sin(o),f=t+h,p=i+d,g=1^c,x=c?o-l:l-o;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>ro||Math.abs(this._y1-p)>ro)&&this._append`L${f},${p}`,a&&(x<0&&(x=x%Hg+Hg),x>OD?this._append`A${a},${a},0,1,${g},${t-h},${i-d}A${a},${a},0,1,${g},${this._x1=f},${this._y1=p}`:x>ro&&this._append`A${a},${a},0,${+(x>=jg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=i+a*Math.sin(l)}`)}rect(t,i,a,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${a=+a}v${+o}h${-a}Z`}toString(){return this._}}function gs(e){return function(){return e}}const JI=Math.abs,t7=Math.atan2,e7=Math.cos,r7=Math.max,i7=Math.min,a7=Math.sin,n7=Math.sqrt,b1=1e-12,Um=Math.PI,C1=Um/2,o7=2*Um;function s7(e){return e>1?0:e<-1?Um:Math.acos(e)}function l7(e){return e>=1?C1:e<=-1?-C1:Math.asin(e)}function ND(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const a=Math.floor(i);if(!(a>=0))throw new RangeError(`invalid digits: ${i}`);t=a}return e},()=>new $D(t)}function qD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $k(e){this._context=e}$k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wc(e){return new $k(e)}function ID(e){return e[0]}function jD(e){return e[1]}function HD(e,t){var i=gs(!0),a=null,o=wc,l=null,c=ND(h);e=typeof e=="function"?e:e===void 0?ID:gs(e),t=typeof t=="function"?t:t===void 0?jD:gs(t);function h(d){var f,p=(d=qD(d)).length,g,x=!1,y;for(a==null&&(l=o(y=c())),f=0;f<=p;++f)!(f<p&&i(g=d[f],f,d))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,f,d),+t(g,f,d));if(y)return l=null,y+""||null}return h.x=function(d){return arguments.length?(e=typeof d=="function"?d:gs(+d),h):e},h.y=function(d){return arguments.length?(t=typeof d=="function"?d:gs(+d),h):t},h.defined=function(d){return arguments.length?(i=typeof d=="function"?d:gs(!!d),h):i},h.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),h):o},h.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),h):a},h}class Nk{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i);break}}this._x0=t,this._y0=i}}function qk(e){return new Nk(e,!0)}function Ik(e){return new Nk(e,!1)}function vn(){}function td(e,t,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+i)/6)}function Ld(e){this._context=e}Ld.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:td(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pg(e){return new Ld(e)}function jk(e){this._context=e}jk.prototype={areaStart:vn,areaEnd:vn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PD(e){return new jk(e)}function Hk(e){this._context=e}Hk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function WD(e){return new Hk(e)}function Pk(e,t){this._basis=new Ld(e),this._beta=t}Pk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,i=e.length-1;if(i>0)for(var a=e[0],o=t[0],l=e[i]-a,c=t[i]-o,h=-1,d;++h<=i;)d=h/i,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+d*l),this._beta*t[h]+(1-this._beta)*(o+d*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const UD=(function e(t){function i(a){return t===1?new Ld(a):new Pk(a,t)}return i.beta=function(a){return e(+a)},i})(.85);function ed(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function Ym(e,t){this._context=e,this._k=(1-t)/6}Ym.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:ed(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ed(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wk=(function e(t){function i(a){return new Ym(a,t)}return i.tension=function(a){return e(+a)},i})(0);function Gm(e,t){this._context=e,this._k=(1-t)/6}Gm.prototype={areaStart:vn,areaEnd:vn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ed(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const YD=(function e(t){function i(a){return new Gm(a,t)}return i.tension=function(a){return e(+a)},i})(0);function Vm(e,t){this._context=e,this._k=(1-t)/6}Vm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ed(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const GD=(function e(t){function i(a){return new Vm(a,t)}return i.tension=function(a){return e(+a)},i})(0);function Xm(e,t,i){var a=e._x1,o=e._y1,l=e._x2,c=e._y2;if(e._l01_a>b1){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,d=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/d,o=(o*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/d}if(e._l23_a>b1){var f=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,p=3*e._l23_a*(e._l23_a+e._l12_a);l=(l*f+e._x1*e._l23_2a-t*e._l12_2a)/p,c=(c*f+e._y1*e._l23_2a-i*e._l12_2a)/p}e._context.bezierCurveTo(a,o,l,c,e._x2,e._y2)}function Uk(e,t){this._context=e,this._alpha=t}Uk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Xm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yk=(function e(t){function i(a){return t?new Uk(a,t):new Ym(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Gk(e,t){this._context=e,this._alpha=t}Gk.prototype={areaStart:vn,areaEnd:vn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Xm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const VD=(function e(t){function i(a){return t?new Gk(a,t):new Gm(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Vk(e,t){this._context=e,this._alpha=t}Vk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,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:Xm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const XD=(function e(t){function i(a){return t?new Vk(a,t):new Vm(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Xk(e){this._context=e}Xk.prototype={areaStart:vn,areaEnd:vn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function QD(e){return new Xk(e)}function v1(e){return e<0?-1:1}function k1(e,t,i){var a=e._x1-e._x0,o=t-e._x1,l=(e._y1-e._y0)/(a||o<0&&-0),c=(i-e._y1)/(o||a<0&&-0),h=(l*o+c*a)/(a+o);return(v1(l)+v1(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function S1(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function ug(e,t,i){var a=e._x0,o=e._y0,l=e._x1,c=e._y1,h=(l-a)/3;e._context.bezierCurveTo(a+h,o+h*t,l-h,c-h*i,l,c)}function rd(e){this._context=e}rd.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:ug(this,this._t0,S1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ug(this,S1(this,i=k1(this,e,t)),i);break;default:ug(this,this._t0,i=k1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function Qk(e){this._context=new Zk(e)}(Qk.prototype=Object.create(rd.prototype)).point=function(e,t){rd.prototype.point.call(this,t,e)};function Zk(e){this._context=e}Zk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,i,a,o,l){this._context.bezierCurveTo(t,e,a,i,l,o)}};function Kk(e){return new rd(e)}function Jk(e){return new Qk(e)}function t2(e){this._context=e}t2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),i===2)this._context.lineTo(e[1],t[1]);else for(var a=w1(e),o=w1(t),l=0,c=1;c<i;++l,++c)this._context.bezierCurveTo(a[0][l],o[0][l],a[1][l],o[1][l],e[c],t[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function w1(e){var t,i=e.length-1,a,o=new Array(i),l=new Array(i),c=new Array(i);for(o[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<i-1;++t)o[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(o[i-1]=2,l[i-1]=7,c[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)a=o[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(o[i-1]=c[i-1]/l[i-1],t=i-2;t>=0;--t)o[t]=(c[t]-o[t+1])/l[t];for(l[i-1]=(e[i]+o[i-1])/2,t=0;t<i-1;++t)l[t]=2*e[t+1]-o[t+1];return[o,l]}function e2(e){return new t2(e)}function Ad(e,t){this._context=e,this._t=t}Ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}break}}this._x=e,this._y=t}};function r2(e){return new Ad(e,.5)}function i2(e){return new Ad(e,0)}function a2(e){return new Ad(e,1)}function gc(e,t,i){this.k=e,this.x=t,this.y=i}gc.prototype={constructor:gc,scale:function(e){return e===1?this:new gc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new gc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};gc.prototype;var ZD=S(e=>{var o;const{securityLevel:t}=ce();let i=Zt("body");if(t==="sandbox"){const c=((o=Zt(`#i${e}`).node())==null?void 0:o.contentDocument)??document;i=Zt(c.body)}return i.select(`#${e}`)},"selectSvgElement");function Qm(e){return typeof e>"u"||e===null}S(Qm,"isNothing");function n2(e){return typeof e=="object"&&e!==null}S(n2,"isObject");function o2(e){return Array.isArray(e)?e:Qm(e)?[]:[e]}S(o2,"toArray");function s2(e,t){var i,a,o,l;if(t)for(l=Object.keys(t),i=0,a=l.length;i<a;i+=1)o=l[i],e[o]=t[o];return e}S(s2,"extend");function l2(e,t){var i="",a;for(a=0;a<t;a+=1)i+=e;return i}S(l2,"repeat");function c2(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}S(c2,"isNegativeZero");var KD=Qm,JD=n2,tR=o2,eR=l2,rR=c2,iR=s2,Ke={isNothing:KD,isObject:JD,toArray:tR,repeat:eR,isNegativeZero:rR,extend:iR};function Zm(e,t){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(i+=`

`+e.mark.snippet),a+" "+i):a}S(Zm,"formatError");function Gs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Zm(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}S(Gs,"YAMLException$1");Gs.prototype=Object.create(Error.prototype);Gs.prototype.constructor=Gs;Gs.prototype.toString=S(function(t){return this.name+": "+Zm(this,t)},"toString");var Pr=Gs;function Ou(e,t,i,a,o){var l="",c="",h=Math.floor(o/2)-1;return a-t>h&&(l=" ... ",t=a-h+l.length),i-a>h&&(c=" ...",i=a+h-c.length),{str:l+e.slice(t,i).replace(/\t/g,"→")+c,pos:a-t+l.length}}S(Ou,"getLine");function zu(e,t){return Ke.repeat(" ",t-e.length)+e}S(zu,"padStart");function h2(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var i=/\r?\n|\r|\0/g,a=[0],o=[],l,c=-1;l=i.exec(e.buffer);)o.push(l.index),a.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var h="",d,f,p=Math.min(e.line+t.linesAfter,o.length).toString().length,g=t.maxLength-(t.indent+p+3);for(d=1;d<=t.linesBefore&&!(c-d<0);d++)f=Ou(e.buffer,a[c-d],o[c-d],e.position-(a[c]-a[c-d]),g),h=Ke.repeat(" ",t.indent)+zu((e.line-d+1).toString(),p)+" | "+f.str+`
`+h;for(f=Ou(e.buffer,a[c],o[c],e.position,g),h+=Ke.repeat(" ",t.indent)+zu((e.line+1).toString(),p)+" | "+f.str+`
`,h+=Ke.repeat("-",t.indent+p+3+f.pos)+`^
`,d=1;d<=t.linesAfter&&!(c+d>=o.length);d++)f=Ou(e.buffer,a[c+d],o[c+d],e.position-(a[c]-a[c+d]),g),h+=Ke.repeat(" ",t.indent)+zu((e.line+d+1).toString(),p)+" | "+f.str+`
`;return h.replace(/\n$/,"")}S(h2,"makeSnippet");var aR=h2,nR=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],oR=["scalar","sequence","mapping"];function u2(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){t[String(a)]=i})}),t}S(u2,"compileStyleAliases");function d2(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(nR.indexOf(i)===-1)throw new Pr('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(i){return i},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=u2(t.styleAliases||null),oR.indexOf(this.kind)===-1)throw new Pr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}S(d2,"Type$1");var vr=d2;function Wg(e,t){var i=[];return e[t].forEach(function(a){var o=i.length;i.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(o=c)}),i[o]=a}),i}S(Wg,"compileList");function f2(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(S(a,"collectType"),t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(a);return e}S(f2,"compileMap");function id(e){return this.extend(e)}S(id,"Schema$1");id.prototype.extend=S(function(t){var i=[],a=[];if(t instanceof vr)a.push(t);else if(Array.isArray(t))a=a.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new Pr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof vr))throw new Pr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new Pr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new Pr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(l){if(!(l instanceof vr))throw new Pr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(id.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Wg(o,"implicit"),o.compiledExplicit=Wg(o,"explicit"),o.compiledTypeMap=f2(o.compiledImplicit,o.compiledExplicit),o},"extend");var sR=id,lR=new vr("tag:yaml.org,2002:str",{kind:"scalar",construct:S(function(e){return e!==null?e:""},"construct")}),cR=new vr("tag:yaml.org,2002:seq",{kind:"sequence",construct:S(function(e){return e!==null?e:[]},"construct")}),hR=new vr("tag:yaml.org,2002:map",{kind:"mapping",construct:S(function(e){return e!==null?e:{}},"construct")}),uR=new sR({explicit:[lR,cR,hR]});function p2(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}S(p2,"resolveYamlNull");function g2(){return null}S(g2,"constructYamlNull");function m2(e){return e===null}S(m2,"isNull");var dR=new vr("tag:yaml.org,2002:null",{kind:"scalar",resolve:p2,construct:g2,predicate:m2,represent:{canonical:S(function(){return"~"},"canonical"),lowercase:S(function(){return"null"},"lowercase"),uppercase:S(function(){return"NULL"},"uppercase"),camelcase:S(function(){return"Null"},"camelcase"),empty:S(function(){return""},"empty")},defaultStyle:"lowercase"});function y2(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}S(y2,"resolveYamlBoolean");function x2(e){return e==="true"||e==="True"||e==="TRUE"}S(x2,"constructYamlBoolean");function b2(e){return Object.prototype.toString.call(e)==="[object Boolean]"}S(b2,"isBoolean");var fR=new vr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:y2,construct:x2,predicate:b2,represent:{lowercase:S(function(e){return e?"true":"false"},"lowercase"),uppercase:S(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:S(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function C2(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}S(C2,"isHexCode");function v2(e){return 48<=e&&e<=55}S(v2,"isOctCode");function k2(e){return 48<=e&&e<=57}S(k2,"isDecCode");function S2(e){if(e===null)return!1;var t=e.length,i=0,a=!1,o;if(!t)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===t)return!0;if(o=e[++i],o==="b"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(!C2(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(!v2(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;i<t;i++)if(o=e[i],o!=="_"){if(!k2(e.charCodeAt(i)))return!1;a=!0}return!(!a||o==="_")}S(S2,"resolveYamlInteger");function w2(e){var t=e,i=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return i*parseInt(t.slice(2),2);if(t[1]==="x")return i*parseInt(t.slice(2),16);if(t[1]==="o")return i*parseInt(t.slice(2),8)}return i*parseInt(t,10)}S(w2,"constructYamlInteger");function T2(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ke.isNegativeZero(e)}S(T2,"isInteger");var pR=new vr("tag:yaml.org,2002:int",{kind:"scalar",resolve:S2,construct:w2,predicate:T2,represent:{binary:S(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:S(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:S(function(e){return e.toString(10)},"decimal"),hexadecimal:S(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),gR=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _2(e){return!(e===null||!gR.test(e)||e[e.length-1]==="_")}S(_2,"resolveYamlFloat");function B2(e){var t,i;return t=e.replace(/_/g,"").toLowerCase(),i=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:i*parseFloat(t,10)}S(B2,"constructYamlFloat");var mR=/^[-+]?[0-9]+e/;function E2(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ke.isNegativeZero(e))return"-0.0";return i=e.toString(10),mR.test(i)?i.replace("e",".e"):i}S(E2,"representYamlFloat");function L2(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ke.isNegativeZero(e))}S(L2,"isFloat");var yR=new vr("tag:yaml.org,2002:float",{kind:"scalar",resolve:_2,construct:B2,predicate:L2,represent:E2,defaultStyle:"lowercase"}),A2=uR.extend({implicit:[dR,fR,pR,yR]}),xR=A2,M2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),F2=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 D2(e){return e===null?!1:M2.exec(e)!==null||F2.exec(e)!==null}S(D2,"resolveYamlTimestamp");function R2(e){var t,i,a,o,l,c,h,d=0,f=null,p,g,x;if(t=M2.exec(e),t===null&&(t=F2.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],a=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(i,a,o));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(p=+t[10],g=+(t[11]||0),f=(p*60+g)*6e4,t[9]==="-"&&(f=-f)),x=new Date(Date.UTC(i,a,o,l,c,h,d)),f&&x.setTime(x.getTime()-f),x}S(R2,"constructYamlTimestamp");function O2(e){return e.toISOString()}S(O2,"representYamlTimestamp");var bR=new vr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:D2,construct:R2,instanceOf:Date,represent:O2});function z2(e){return e==="<<"||e===null}S(z2,"resolveYamlMerge");var CR=new vr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:z2}),Km=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function $2(e){if(e===null)return!1;var t,i,a=0,o=e.length,l=Km;for(i=0;i<o;i++)if(t=l.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}S($2,"resolveYamlBinary");function N2(e){var t,i,a=e.replace(/[\r\n=]/g,""),o=a.length,l=Km,c=0,h=[];for(t=0;t<o;t++)t%4===0&&t&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|l.indexOf(a.charAt(t));return i=o%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}S(N2,"constructYamlBinary");function q2(e){var t="",i=0,a,o,l=e.length,c=Km;for(a=0;a<l;a++)a%3===0&&a&&(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]),i=(i<<8)+e[a];return o=l%3,o===0?(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]):o===2?(t+=c[i>>10&63],t+=c[i>>4&63],t+=c[i<<2&63],t+=c[64]):o===1&&(t+=c[i>>2&63],t+=c[i<<4&63],t+=c[64],t+=c[64]),t}S(q2,"representYamlBinary");function I2(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}S(I2,"isBinary");var vR=new vr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:$2,construct:N2,predicate:I2,represent:q2}),kR=Object.prototype.hasOwnProperty,SR=Object.prototype.toString;function j2(e){if(e===null)return!0;var t=[],i,a,o,l,c,h=e;for(i=0,a=h.length;i<a;i+=1){if(o=h[i],c=!1,SR.call(o)!=="[object Object]")return!1;for(l in o)if(kR.call(o,l))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(l)===-1)t.push(l);else return!1}return!0}S(j2,"resolveYamlOmap");function H2(e){return e!==null?e:[]}S(H2,"constructYamlOmap");var wR=new vr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:j2,construct:H2}),TR=Object.prototype.toString;function P2(e){if(e===null)return!0;var t,i,a,o,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1){if(a=c[t],TR.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;l[t]=[o[0],a[o[0]]]}return!0}S(P2,"resolveYamlPairs");function W2(e){if(e===null)return[];var t,i,a,o,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1)a=c[t],o=Object.keys(a),l[t]=[o[0],a[o[0]]];return l}S(W2,"constructYamlPairs");var _R=new vr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:P2,construct:W2}),BR=Object.prototype.hasOwnProperty;function U2(e){if(e===null)return!0;var t,i=e;for(t in i)if(BR.call(i,t)&&i[t]!==null)return!1;return!0}S(U2,"resolveYamlSet");function Y2(e){return e!==null?e:{}}S(Y2,"constructYamlSet");var ER=new vr("tag:yaml.org,2002:set",{kind:"mapping",resolve:U2,construct:Y2}),G2=xR.extend({implicit:[bR,CR],explicit:[vR,wR,_R,ER]}),kn=Object.prototype.hasOwnProperty,ad=1,V2=2,X2=3,nd=4,dg=1,LR=2,T1=3,AR=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,MR=/[\x85\u2028\u2029]/,FR=/[,\[\]\{\}]/,Q2=/^(?:!|!!|![a-z\-]+!)$/i,Z2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ug(e){return Object.prototype.toString.call(e)}S(Ug,"_class");function Li(e){return e===10||e===13}S(Li,"is_EOL");function Cn(e){return e===9||e===32}S(Cn,"is_WHITE_SPACE");function Br(e){return e===9||e===32||e===10||e===13}S(Br,"is_WS_OR_EOL");function so(e){return e===44||e===91||e===93||e===123||e===125}S(so,"is_FLOW_INDICATOR");function K2(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}S(K2,"fromHexCode");function J2(e){return e===120?2:e===117?4:e===85?8:0}S(J2,"escapedHexLen");function tS(e){return 48<=e&&e<=57?e-48:-1}S(tS,"fromDecimalCode");function Yg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?"	":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}S(Yg,"simpleEscapeSequence");function eS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}S(eS,"charFromCodepoint");function Jm(e,t,i){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[t]=i}S(Jm,"setProperty");var rS=new Array(256),iS=new Array(256);for(to=0;to<256;to++)rS[to]=Yg(to)?1:0,iS[to]=Yg(to);var to;function aS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G2,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}S(aS,"State$1");function ty(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=aR(i),new Pr(t,i)}S(ty,"generateError");function Ot(e,t){throw ty(e,t)}S(Ot,"throwError");function Dc(e,t){e.onWarning&&e.onWarning.call(null,ty(e,t))}S(Dc,"throwWarning");var _1={YAML:S(function(t,i,a){var o,l,c;t.version!==null&&Ot(t,"duplication of %YAML directive"),a.length!==1&&Ot(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&Ot(t,"ill-formed argument of the YAML directive"),l=parseInt(o[1],10),c=parseInt(o[2],10),l!==1&&Ot(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&Dc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:S(function(t,i,a){var o,l;a.length!==2&&Ot(t,"TAG directive accepts exactly two arguments"),o=a[0],l=a[1],Q2.test(o)||Ot(t,"ill-formed tag handle (first argument) of the TAG directive"),kn.call(t.tagMap,o)&&Ot(t,'there is a previously declared suffix for "'+o+'" tag handle'),Z2.test(l)||Ot(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{Ot(t,"tag prefix is malformed: "+l)}t.tagMap[o]=l},"handleTagDirective")};function Aa(e,t,i,a){var o,l,c,h;if(t<i){if(h=e.input.slice(t,i),a)for(o=0,l=h.length;o<l;o+=1)c=h.charCodeAt(o),c===9||32<=c&&c<=1114111||Ot(e,"expected valid JSON character");else AR.test(h)&&Ot(e,"the stream contains non-printable characters");e.result+=h}}S(Aa,"captureSegment");function Gg(e,t,i,a){var o,l,c,h;for(Ke.isObject(i)||Ot(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),c=0,h=o.length;c<h;c+=1)l=o[c],kn.call(t,l)||(Jm(t,l,i[l]),a[l]=!0)}S(Gg,"mergeMappings");function lo(e,t,i,a,o,l,c,h,d){var f,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),f=0,p=o.length;f<p;f+=1)Array.isArray(o[f])&&Ot(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Ug(o[f])==="[object Object]"&&(o[f]="[object Object]");if(typeof o=="object"&&Ug(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(f=0,p=l.length;f<p;f+=1)Gg(e,t,l[f],i);else Gg(e,t,l,i);else!e.json&&!kn.call(i,o)&&kn.call(t,o)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=d||e.position,Ot(e,"duplicated mapping key")),Jm(t,o,l),delete i[o];return t}S(lo,"storeMappingPair");function Md(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ot(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}S(Md,"readLineBreak");function ze(e,t,i){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Cn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Li(o))for(Md(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Dc(e,"deficient indentation"),a}S(ze,"skipSeparationSpace");function Wc(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||Br(i)))}S(Wc,"testDocumentSeparator");function Fd(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ke.repeat(`
`,t-1))}S(Fd,"writeFoldedLines");function nS(e,t,i){var a,o,l,c,h,d,f,p,g=e.kind,x=e.result,y;if(y=e.input.charCodeAt(e.position),Br(y)||so(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(o=e.input.charCodeAt(e.position+1),Br(o)||i&&so(o)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;y!==0;){if(y===58){if(o=e.input.charCodeAt(e.position+1),Br(o)||i&&so(o))break}else if(y===35){if(a=e.input.charCodeAt(e.position-1),Br(a))break}else{if(e.position===e.lineStart&&Wc(e)||i&&so(y))break;if(Li(y))if(d=e.line,f=e.lineStart,p=e.lineIndent,ze(e,!1,-1),e.lineIndent>=t){h=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=d,e.lineStart=f,e.lineIndent=p;break}}h&&(Aa(e,l,c,!1),Fd(e,e.line-d),l=c=e.position,h=!1),Cn(y)||(c=e.position+1),y=e.input.charCodeAt(++e.position)}return Aa(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}S(nS,"readPlainScalar");function oS(e,t){var i,a,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Aa(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,o=e.position;else return!0;else Li(i)?(Aa(e,a,o,!0),Fd(e,ze(e,!1,t)),a=o=e.position):e.position===e.lineStart&&Wc(e)?Ot(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Ot(e,"unexpected end of the stream within a single quoted scalar")}S(oS,"readSingleQuotedScalar");function sS(e,t){var i,a,o,l,c,h;if(h=e.input.charCodeAt(e.position),h!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(h=e.input.charCodeAt(e.position))!==0;){if(h===34)return Aa(e,i,e.position,!0),e.position++,!0;if(h===92){if(Aa(e,i,e.position,!0),h=e.input.charCodeAt(++e.position),Li(h))ze(e,!1,t);else if(h<256&&rS[h])e.result+=iS[h],e.position++;else if((c=J2(h))>0){for(o=c,l=0;o>0;o--)h=e.input.charCodeAt(++e.position),(c=K2(h))>=0?l=(l<<4)+c:Ot(e,"expected hexadecimal character");e.result+=eS(l),e.position++}else Ot(e,"unknown escape sequence");i=a=e.position}else Li(h)?(Aa(e,i,a,!0),Fd(e,ze(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Wc(e)?Ot(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}Ot(e,"unexpected end of the stream within a double quoted scalar")}S(sS,"readDoubleQuotedScalar");function lS(e,t){var i=!0,a,o,l,c=e.tag,h,d=e.anchor,f,p,g,x,y,C=Object.create(null),k,v,w,B;if(B=e.input.charCodeAt(e.position),B===91)p=93,y=!1,h=[];else if(B===123)p=125,y=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),B=e.input.charCodeAt(++e.position);B!==0;){if(ze(e,!0,t),B=e.input.charCodeAt(e.position),B===p)return e.position++,e.tag=c,e.anchor=d,e.kind=y?"mapping":"sequence",e.result=h,!0;i?B===44&&Ot(e,"expected the node content, but found ','"):Ot(e,"missed comma between flow collection entries"),v=k=w=null,g=x=!1,B===63&&(f=e.input.charCodeAt(e.position+1),Br(f)&&(g=x=!0,e.position++,ze(e,!0,t))),a=e.line,o=e.lineStart,l=e.position,go(e,t,ad,!1,!0),v=e.tag,k=e.result,ze(e,!0,t),B=e.input.charCodeAt(e.position),(x||e.line===a)&&B===58&&(g=!0,B=e.input.charCodeAt(++e.position),ze(e,!0,t),go(e,t,ad,!1,!0),w=e.result),y?lo(e,h,C,v,k,w,a,o,l):g?h.push(lo(e,null,C,v,k,w,a,o,l)):h.push(k),ze(e,!0,t),B=e.input.charCodeAt(e.position),B===44?(i=!0,B=e.input.charCodeAt(++e.position)):i=!1}Ot(e,"unexpected end of the stream within a flow collection")}S(lS,"readFlowCollection");function cS(e,t){var i,a,o=dg,l=!1,c=!1,h=t,d=0,f=!1,p,g;if(g=e.input.charCodeAt(e.position),g===124)a=!1;else if(g===62)a=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)dg===o?o=g===43?T1:LR:Ot(e,"repeat of a chomping mode identifier");else if((p=tS(g))>=0)p===0?Ot(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Ot(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(Cn(g)){do g=e.input.charCodeAt(++e.position);while(Cn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Li(g)&&g!==0)}for(;g!==0;){for(Md(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!c||e.lineIndent<h)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>h&&(h=e.lineIndent),Li(g)){d++;continue}if(e.lineIndent<h){o===T1?e.result+=Ke.repeat(`
`,l?1+d:d):o===dg&&l&&(e.result+=`
`);break}for(a?Cn(g)?(f=!0,e.result+=Ke.repeat(`
`,l?1+d:d)):f?(f=!1,e.result+=Ke.repeat(`
`,d+1)):d===0?l&&(e.result+=" "):e.result+=Ke.repeat(`
`,d):e.result+=Ke.repeat(`
`,l?1+d:d),l=!0,c=!0,d=0,i=e.position;!Li(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Aa(e,i,e.position,!1)}return!0}S(cS,"readBlockScalar");function Vg(e,t){var i,a=e.tag,o=e.anchor,l=[],c,h=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ot(e,"tab characters must not be used in indentation")),!(d!==45||(c=e.input.charCodeAt(e.position+1),!Br(c))));){if(h=!0,e.position++,ze(e,!0,-1)&&e.lineIndent<=t){l.push(null),d=e.input.charCodeAt(e.position);continue}if(i=e.line,go(e,t,X2,!1,!0),l.push(e.result),ze(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&d!==0)Ot(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return h?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=l,!0):!1}S(Vg,"readBlockSequence");function hS(e,t,i){var a,o,l,c,h,d,f=e.tag,p=e.anchor,g={},x=Object.create(null),y=null,C=null,k=null,v=!1,w=!1,B;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),B=e.input.charCodeAt(e.position);B!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ot(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(B===63||B===58)&&Br(a))B===63?(v&&(lo(e,g,x,y,C,null,c,h,d),y=C=k=null),w=!0,v=!0,o=!0):v?(v=!1,o=!0):Ot(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,B=a;else{if(c=e.line,h=e.lineStart,d=e.position,!go(e,i,V2,!1,!0))break;if(e.line===l){for(B=e.input.charCodeAt(e.position);Cn(B);)B=e.input.charCodeAt(++e.position);if(B===58)B=e.input.charCodeAt(++e.position),Br(B)||Ot(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(lo(e,g,x,y,C,null,c,h,d),y=C=k=null),w=!0,v=!1,o=!1,y=e.tag,C=e.result;else if(w)Ot(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(w)Ot(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0}if((e.line===l||e.lineIndent>t)&&(v&&(c=e.line,h=e.lineStart,d=e.position),go(e,t,nd,!0,o)&&(v?C=e.result:k=e.result),v||(lo(e,g,x,y,C,k,c,h,d),y=C=k=null),ze(e,!0,-1),B=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&B!==0)Ot(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&lo(e,g,x,y,C,null,c,h,d),w&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=g),w}S(hS,"readBlockMapping");function uS(e){var t,i=!1,a=!1,o,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&Ot(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(i=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,o="!!",c=e.input.charCodeAt(++e.position)):o="!",t=e.position,i){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(l=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):Ot(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!Br(c);)c===33&&(a?Ot(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Q2.test(o)||Ot(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);l=e.input.slice(t,e.position),FR.test(l)&&Ot(e,"tag suffix cannot contain flow indicator characters")}l&&!Z2.test(l)&&Ot(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{Ot(e,"tag name is malformed: "+l)}return i?e.tag=l:kn.call(e.tagMap,o)?e.tag=e.tagMap[o]+l:o==="!"?e.tag="!"+l:o==="!!"?e.tag="tag:yaml.org,2002:"+l:Ot(e,'undeclared tag handle "'+o+'"'),!0}S(uS,"readTagProperty");function dS(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&Ot(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Br(i)&&!so(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Ot(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}S(dS,"readAnchorProperty");function fS(e){var t,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!Br(a)&&!so(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&Ot(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),kn.call(e.anchorMap,i)||Ot(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],ze(e,!0,-1),!0}S(fS,"readAlias");function go(e,t,i,a,o){var l,c,h,d=1,f=!1,p=!1,g,x,y,C,k,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=nd===i||X2===i,a&&ze(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;uS(e)||dS(e);)ze(e,!0,-1)?(f=!0,h=l,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):h=!1;if(h&&(h=f||o),(d===1||nd===i)&&(ad===i||V2===i?k=t:k=t+1,v=e.position-e.lineStart,d===1?h&&(Vg(e,v)||hS(e,v,k))||lS(e,k)?p=!0:(c&&cS(e,k)||oS(e,k)||sS(e,k)?p=!0:fS(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&Ot(e,"alias node should not have any properties")):nS(e,k,ad===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(p=h&&Vg(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ot(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,x=e.implicitTypes.length;g<x;g+=1)if(C=e.implicitTypes[g],C.resolve(e.result)){e.result=C.construct(e.result),e.tag=C.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(kn.call(e.typeMap[e.kind||"fallback"],e.tag))C=e.typeMap[e.kind||"fallback"][e.tag];else for(C=null,y=e.typeMap.multi[e.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(e.tag.slice(0,y[g].tag.length)===y[g].tag){C=y[g];break}C||Ot(e,"unknown tag !<"+e.tag+">"),e.result!==null&&C.kind!==e.kind&&Ot(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+C.kind+'", not "'+e.kind+'"'),C.resolve(e.result,e.tag)?(e.result=C.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ot(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}S(go,"composeNode");function pS(e){var t=e.position,i,a,o,l=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(c=e.input.charCodeAt(e.position))!==0&&(ze(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(l=!0,c=e.input.charCodeAt(++e.position),i=e.position;c!==0&&!Br(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),o=[],a.length<1&&Ot(e,"directive name must not be less than one character in length");c!==0;){for(;Cn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!Li(c));break}if(Li(c))break;for(i=e.position;c!==0&&!Br(c);)c=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}c!==0&&Md(e),kn.call(_1,a)?_1[a](e,a,o):Dc(e,'unknown document directive "'+a+'"')}if(ze(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ze(e,!0,-1)):l&&Ot(e,"directives end mark is expected"),go(e,e.lineIndent-1,nd,!1,!0),ze(e,!0,-1),e.checkLineBreaks&&MR.test(e.input.slice(t,e.position))&&Dc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Wc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ze(e,!0,-1));return}if(e.position<e.length-1)Ot(e,"end of the stream or a document separator is expected");else return}S(pS,"readDocument");function ey(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new aS(e,t),a=e.indexOf("\0");for(a!==-1&&(i.position=a,Ot(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)pS(i);return i.documents}S(ey,"loadDocuments");function DR(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var a=ey(e,i);if(typeof t!="function")return a;for(var o=0,l=a.length;o<l;o+=1)t(a[o])}S(DR,"loadAll$1");function gS(e,t){var i=ey(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new Pr("expected a single document in the stream, but found more")}}S(gS,"load$1");var RR=gS,OR={load:RR},mS=Object.prototype.toString,yS=Object.prototype.hasOwnProperty,ry=65279,zR=9,Rc=10,$R=13,NR=32,qR=33,IR=34,Xg=35,jR=37,HR=38,PR=39,WR=42,xS=44,UR=45,od=58,YR=61,GR=62,VR=63,XR=64,bS=91,CS=93,QR=96,vS=123,ZR=124,kS=125,kr={};kr[0]="\\0";kr[7]="\\a";kr[8]="\\b";kr[9]="\\t";kr[10]="\\n";kr[11]="\\v";kr[12]="\\f";kr[13]="\\r";kr[27]="\\e";kr[34]='\\"';kr[92]="\\\\";kr[133]="\\N";kr[160]="\\_";kr[8232]="\\L";kr[8233]="\\P";var KR=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],JR=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function SS(e,t){var i,a,o,l,c,h,d;if(t===null)return{};for(i={},a=Object.keys(t),o=0,l=a.length;o<l;o+=1)c=a[o],h=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),d=e.compiledTypeMap.fallback[c],d&&yS.call(d.styleAliases,h)&&(h=d.styleAliases[h]),i[c]=h;return i}S(SS,"compileStyleMap");function wS(e){var t,i,a;if(t=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new Pr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Ke.repeat("0",a-t.length)+t}S(wS,"encodeHex");var tO=1,Oc=2;function TS(e){this.schema=e.schema||G2,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ke.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=SS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Oc:tO,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}S(TS,"State");function Qg(e,t){for(var i=Ke.repeat(" ",t),a=0,o=-1,l="",c,h=e.length;a<h;)o=e.indexOf(`
`,a),o===-1?(c=e.slice(a),a=h):(c=e.slice(a,o+1),a=o+1),c.length&&c!==`
`&&(l+=i),l+=c;return l}S(Qg,"indentString");function sd(e,t){return`
`+Ke.repeat(" ",e.indent*t)}S(sd,"generateNextLine");function _S(e,t){var i,a,o;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(o=e.implicitTypes[i],o.resolve(t))return!0;return!1}S(_S,"testImplicitResolving");function zc(e){return e===NR||e===zR}S(zc,"isWhitespace");function Vs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ry||65536<=e&&e<=1114111}S(Vs,"isPrintable");function Zg(e){return Vs(e)&&e!==ry&&e!==$R&&e!==Rc}S(Zg,"isNsCharOrWhitespace");function Kg(e,t,i){var a=Zg(e),o=a&&!zc(e);return(i?a:a&&e!==xS&&e!==bS&&e!==CS&&e!==vS&&e!==kS)&&e!==Xg&&!(t===od&&!o)||Zg(t)&&!zc(t)&&e===Xg||t===od&&o}S(Kg,"isPlainSafe");function BS(e){return Vs(e)&&e!==ry&&!zc(e)&&e!==UR&&e!==VR&&e!==od&&e!==xS&&e!==bS&&e!==CS&&e!==vS&&e!==kS&&e!==Xg&&e!==HR&&e!==WR&&e!==qR&&e!==ZR&&e!==YR&&e!==GR&&e!==PR&&e!==IR&&e!==jR&&e!==XR&&e!==QR}S(BS,"isPlainSafeFirst");function ES(e){return!zc(e)&&e!==od}S(ES,"isPlainSafeLast");function ws(e,t){var i=e.charCodeAt(t),a;return i>=55296&&i<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}S(ws,"codePointAt");function iy(e){var t=/^\n* /;return t.test(e)}S(iy,"needIndentIndicator");var LS=1,Jg=2,AS=3,MS=4,vs=5;function FS(e,t,i,a,o,l,c,h){var d,f=0,p=null,g=!1,x=!1,y=a!==-1,C=-1,k=BS(ws(e,0))&&ES(ws(e,e.length-1));if(t||c)for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=ws(e,d),!Vs(f))return vs;k=k&&Kg(f,p,h),p=f}else{for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=ws(e,d),f===Rc)g=!0,y&&(x=x||d-C-1>a&&e[C+1]!==" ",C=d);else if(!Vs(f))return vs;k=k&&Kg(f,p,h),p=f}x=x||y&&d-C-1>a&&e[C+1]!==" "}return!g&&!x?k&&!c&&!o(e)?LS:l===Oc?vs:Jg:i>9&&iy(e)?vs:c?l===Oc?vs:Jg:x?MS:AS}S(FS,"chooseScalarStyle");function DS(e,t,i,a,o){e.dump=(function(){if(t.length===0)return e.quotingType===Oc?'""':"''";if(!e.noCompatMode&&(KR.indexOf(t)!==-1||JR.test(t)))return e.quotingType===Oc?'"'+t+'"':"'"+t+"'";var l=e.indent*Math.max(1,i),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),h=a||e.flowLevel>-1&&i>=e.flowLevel;function d(f){return _S(e,f)}switch(S(d,"testAmbiguity"),FS(t,h,e.indent,c,d,e.quotingType,e.forceQuotes&&!a,o)){case LS:return t;case Jg:return"'"+t.replace(/'/g,"''")+"'";case AS:return"|"+tm(t,e.indent)+em(Qg(t,l));case MS:return">"+tm(t,e.indent)+em(Qg(RS(t,c),l));case vs:return'"'+OS(t)+'"';default:throw new Pr("impossible error: invalid scalar style")}})()}S(DS,"writeScalar");function tm(e,t){var i=iy(e)?String(t):"",a=e[e.length-1]===`
`,o=a&&(e[e.length-2]===`
`||e===`
`),l=o?"+":a?"":"-";return i+l+`
`}S(tm,"blockHeader");function em(e){return e[e.length-1]===`
`?e.slice(0,-1):e}S(em,"dropEndingNewline");function RS(e,t){for(var i=/(\n+)([^\n]*)/g,a=(function(){var f=e.indexOf(`
`);return f=f!==-1?f:e.length,i.lastIndex=f,rm(e.slice(0,f),t)})(),o=e[0]===`
`||e[0]===" ",l,c;c=i.exec(e);){var h=c[1],d=c[2];l=d[0]===" ",a+=h+(!o&&!l&&d!==""?`
`:"")+rm(d,t),o=l}return a}S(RS,"foldString");function rm(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,o=0,l,c=0,h=0,d="";a=i.exec(e);)h=a.index,h-o>t&&(l=c>o?c:h,d+=`
`+e.slice(o,l),o=l+1),c=h;return d+=`
`,e.length-o>t&&c>o?d+=e.slice(o,c)+`
`+e.slice(c+1):d+=e.slice(o),d.slice(1)}S(rm,"foldLine");function OS(e){for(var t="",i=0,a,o=0;o<e.length;i>=65536?o+=2:o++)i=ws(e,o),a=kr[i],!a&&Vs(i)?(t+=e[o],i>=65536&&(t+=e[o+1])):t+=a||wS(i);return t}S(OS,"escapeString");function zS(e,t,i){var a="",o=e.tag,l,c,h;for(l=0,c=i.length;l<c;l+=1)h=i[l],e.replacer&&(h=e.replacer.call(i,String(l),h)),(Ki(e,t,h,!1,!1)||typeof h>"u"&&Ki(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}S(zS,"writeFlowSequence");function im(e,t,i,a){var o="",l=e.tag,c,h,d;for(c=0,h=i.length;c<h;c+=1)d=i[c],e.replacer&&(d=e.replacer.call(i,String(c),d)),(Ki(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&Ki(e,t+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=sd(e,t)),e.dump&&Rc===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=l,e.dump=o||"[]"}S(im,"writeBlockSequence");function $S(e,t,i){var a="",o=e.tag,l=Object.keys(i),c,h,d,f,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),d=l[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),Ki(e,t,d,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ki(e,t,f,!1,!1)&&(p+=e.dump,a+=p));e.tag=o,e.dump="{"+a+"}"}S($S,"writeFlowMapping");function NS(e,t,i,a){var o="",l=e.tag,c=Object.keys(i),h,d,f,p,g,x;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new Pr("sortKeys must be a boolean or a function");for(h=0,d=c.length;h<d;h+=1)x="",(!a||o!=="")&&(x+=sd(e,t)),f=c[h],p=i[f],e.replacer&&(p=e.replacer.call(i,f,p)),Ki(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Rc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=sd(e,t)),Ki(e,t+1,p,!0,g)&&(e.dump&&Rc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,o+=x));e.tag=l,e.dump=o||"{}"}S(NS,"writeBlockMapping");function am(e,t,i){var a,o,l,c,h,d;for(o=i?e.explicitTypes:e.implicitTypes,l=0,c=o.length;l<c;l+=1)if(h=o[l],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof t=="object"&&t instanceof h.instanceOf)&&(!h.predicate||h.predicate(t))){if(i?h.multi&&h.representName?e.tag=h.representName(t):e.tag=h.tag:e.tag="?",h.represent){if(d=e.styleMap[h.tag]||h.defaultStyle,mS.call(h.represent)==="[object Function]")a=h.represent(t,d);else if(yS.call(h.represent,d))a=h.represent[d](t,d);else throw new Pr("!<"+h.tag+'> tag resolver accepts not "'+d+'" style');e.dump=a}return!0}return!1}S(am,"detectType");function Ki(e,t,i,a,o,l,c){e.tag=null,e.dump=i,am(e,i,!1)||am(e,i,!0);var h=mS.call(e.dump),d=a,f;a&&(a=e.flowLevel<0||e.flowLevel>t);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=e.duplicates.indexOf(i),x=g!==-1),(e.tag!==null&&e.tag!=="?"||x||e.indent!==2&&t>0)&&(o=!1),x&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(p&&x&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),h==="[object Object]")a&&Object.keys(e.dump).length!==0?(NS(e,t,e.dump,o),x&&(e.dump="&ref_"+g+e.dump)):($S(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?im(e,t-1,e.dump,o):im(e,t,e.dump,o),x&&(e.dump="&ref_"+g+e.dump)):(zS(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&DS(e,e.dump,t,l,d);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Pr("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}S(Ki,"writeNode");function qS(e,t){var i=[],a=[],o,l;for(ld(e,i,a),o=0,l=a.length;o<l;o+=1)t.duplicates.push(i[a[o]]);t.usedDuplicates=new Array(l)}S(qS,"getDuplicateReferences");function ld(e,t,i){var a,o,l;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(t.push(e),Array.isArray(e))for(o=0,l=e.length;o<l;o+=1)ld(e[o],t,i);else for(a=Object.keys(e),o=0,l=a.length;o<l;o+=1)ld(e[a[o]],t,i)}S(ld,"inspectNode");function eO(e,t){t=t||{};var i=new TS(t);i.noRefs||qS(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),Ki(i,0,a,!0,!0)?i.dump+`
`:""}S(eO,"dump$1");function rO(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}S(rO,"renamed");var iO=A2,aO=OR.load;/*! Bundled license information:

js-yaml/dist/js-yaml.mjs:
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
*/var nO=S(e=>{const{handDrawnSeed:t}=ce();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Zs=S(e=>{const t=oO([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),oO=S(e=>{const t=new Map;return e.forEach(i=>{const[a,o]=i.split(":");t.set(a.trim(),o==null?void 0:o.trim())}),t},"styles2Map"),IS=S(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Mt=S(e=>{const{stylesArray:t}=Zs(e),i=[],a=[],o=[],l=[];return t.forEach(c=>{const h=c[0];IS(h)?i.push(c.join(":")+" !important"):(a.push(c.join(":")+" !important"),h.includes("stroke")&&o.push(c.join(":")+" !important"),h==="fill"&&l.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:l}},"styles2String"),Et=S((e,t)=>{var d;const{themeVariables:i,handDrawnSeed:a}=ce(),{nodeBorder:o,mainBkg:l}=i,{stylesMap:c}=Zs(e);return Object.assign({roughness:.7,fill:c.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||o,seed:a,strokeWidth:((d=c.get("stroke-width"))==null?void 0:d.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:sO(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),sO=S(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const i=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[i,a]},"getStrokeDashArray"),yu={},Qe={},B1;function lO(){return B1||(B1=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.BLANK_URL=Qe.relativeFirstCharacters=Qe.whitespaceEscapeCharsRegex=Qe.urlSchemeRegex=Qe.ctrlCharactersRegex=Qe.htmlCtrlEntityRegex=Qe.htmlEntitiesRegex=Qe.invalidProtocolRegex=void 0,Qe.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Qe.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Qe.htmlCtrlEntityRegex=/&(newline|tab);/gi,Qe.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Qe.urlSchemeRegex=/^.+(:|&colon;)/gim,Qe.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Qe.relativeFirstCharacters=[".","/"],Qe.BLANK_URL="about:blank"),Qe}var E1;function cO(){if(E1)return yu;E1=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.sanitizeUrl=l;var e=lO();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(e.ctrlCharactersRegex,"");return h.replace(e.htmlEntitiesRegex,function(d,f){return String.fromCharCode(f)})}function a(c){return URL.canParse(c)}function o(c){try{return decodeURIComponent(c)}catch{return c}}function l(c){if(!c)return e.BLANK_URL;var h,d=o(c.trim());do d=i(d).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),d=o(d),h=d.match(e.ctrlCharactersRegex)||d.match(e.htmlEntitiesRegex)||d.match(e.htmlCtrlEntityRegex)||d.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=d;if(!f)return e.BLANK_URL;if(t(f))return f;var p=f.trimStart(),g=p.match(e.urlSchemeRegex);if(!g)return f;var x=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var y=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!a(y))return e.BLANK_URL;var C=new URL(y);return C.protocol=C.protocol.toLowerCase(),C.hostname=C.hostname.toLowerCase(),C.toString()}return y}return yu}var hO=cO();function fg(e){var i;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const a=e[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&i.writable)?!1:e.toString()===`[object ${a}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function uO(){}function jS(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ay(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const dO="[object RegExp]",HS="[object String]",PS="[object Number]",WS="[object Boolean]",US="[object Arguments]",fO="[object Symbol]",pO="[object Date]",gO="[object Map]",mO="[object Set]",yO="[object Array]",xO="[object ArrayBuffer]",bO="[object Object]",CO="[object DataView]",vO="[object Uint8Array]",kO="[object Uint8ClampedArray]",SO="[object Uint16Array]",wO="[object Uint32Array]",TO="[object Int8Array]",_O="[object Int16Array]",BO="[object Int32Array]",EO="[object Float32Array]",LO="[object Float64Array]",L1=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ny(e){return typeof L1.Buffer<"u"&&L1.Buffer.isBuffer(e)}function AO(e){return Number.isSafeInteger(e)&&e>=0}function YS(e){return e!=null&&typeof e!="function"&&AO(e.length)}function MO(e){return e==="__proto__"}function oy(e){return e==null||typeof e!="object"&&typeof e!="function"}function sy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FO(e,t){return Ts(e,void 0,e,new Map,t)}function Ts(e,t,i,a=new Map,o=void 0){const l=o==null?void 0:o(e,t,i,a);if(l!==void 0)return l;if(oy(e))return e;if(a.has(e))return a.get(e);if(Array.isArray(e)){const c=new Array(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=Ts(e[h],h,i,a,o);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;a.set(e,c);for(const[h,d]of e)c.set(h,Ts(d,h,i,a,o));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(Ts(h,void 0,i,a,o));return c}if(ny(e))return e.subarray();if(sy(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=Ts(e[h],h,i,a,o);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return a.set(e,c),ki(c,e,i,a,o),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return a.set(e,c),ki(c,e,i,a,o),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),ki(c,e,i,a,o),c}if(e instanceof Error){const c=structuredClone(e);return a.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,ki(c,e,i,a,o),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),ki(c,e,i,a,o),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),ki(c,e,i,a,o),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),ki(c,e,i,a,o),c}if(typeof e=="object"&&DO(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),ki(c,e,i,a,o),c}return e}function ki(e,t,i=e,a,o){const l=[...Object.keys(t),...jS(t)];for(let c=0;c<l.length;c++){const h=l[c],d=Object.getOwnPropertyDescriptor(e,h);(d==null||d.writable)&&(e[h]=Ts(t[h],h,i,a,o))}}function DO(e){switch(ay(e)){case US:case yO:case xO:case CO:case WS:case pO:case EO:case LO:case TO:case _O:case BO:case gO:case PS:case bO:case dO:case mO:case HS:case fO:case vO:case kO:case SO:case wO:return!0;default:return!1}}function RO(e,t){return FO(e,(i,a,o,l)=>{if(typeof e=="object"){if(ay(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return l.set(e,c),ki(c,e,o,l),c}switch(Object.prototype.toString.call(e)){case PS:case HS:case WS:{const c=new e.constructor(e==null?void 0:e.valueOf());return ki(c,e),c}case US:{const c={};return ki(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function A1(e){return RO(e)}function nm(e){return e!==null&&typeof e=="object"&&ay(e)==="[object Arguments]"}function om(e){return typeof e=="object"&&e!==null}function OO(e){return om(e)&&YS(e)}function Uc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const i=function(...a){const o=t?t.apply(this,a):a[0],l=i.cache;if(l.has(o))return l.get(o);const c=e.apply(this,a);return i.cache=l.set(o,c)||l,c};return i.cache=new(Uc.Cache||Map),i}Uc.Cache=Map;function $u(e){return sy(e)}function zO(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function $O(e){if(oy(e))return e;if(Array.isArray(e)||sy(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const a=new i(e);return a.lastIndex=e.lastIndex,a}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let a;return e instanceof AggregateError?a=new i(e.errors,e.message,{cause:e.cause}):a=new i(e.message,{cause:e.cause}),a.stack=e.stack,Object.assign(a,e),a}return typeof File<"u"&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function NO(e,...t){const i=t.slice(0,-1),a=t[t.length-1];let o=e;for(let l=0;l<i.length;l++){const c=i[l];o=Nu(o,c,a,new Map)}return o}function Nu(e,t,i,a){if(oy(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return $O(a.get(t));if(a.set(t,e),Array.isArray(t)){t=t.slice();for(let l=0;l<t.length;l++)t[l]=t[l]??void 0}const o=[...Object.keys(t),...jS(t)];for(let l=0;l<o.length;l++){const c=o[l];if(MO(c))continue;let h=t[c],d=e[c];if(nm(h)&&(h={...h}),nm(d)&&(d={...d}),ny(h)&&(h=A1(h)),Array.isArray(h))if(Array.isArray(d)){const p=[],g=Reflect.ownKeys(d);for(let x=0;x<g.length;x++){const y=g[x];p[y]=d[y]}d=p}else if(OO(d)){const p=[];for(let g=0;g<d.length;g++)p[g]=d[g];d=p}else d=[];const f=i(d,h,c,e,t,a);f!==void 0?e[c]=f:Array.isArray(h)||om(d)&&om(h)&&(fg(d)||fg(h)||$u(d)||$u(h))?e[c]=Nu(d,h,i,a):d==null&&fg(h)?e[c]=Nu({},h,i,a):d==null&&$u(h)?e[c]=A1(h):(d===void 0||h!==void 0)&&(e[c]=h)}return e}function qO(e,...t){return NO(e,...t,uO)}function M1(e){if(e==null)return!0;if(YS(e))return typeof e.splice!="function"&&typeof e!="string"&&!ny(e)&&!$u(e)&&!nm(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return zO(e)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}var IO="​",jO={curveBasis:Pg,curveBasisClosed:PD,curveBasisOpen:WD,curveBumpX:qk,curveBumpY:Ik,curveBundle:UD,curveCardinalClosed:YD,curveCardinalOpen:GD,curveCardinal:Wk,curveCatmullRomClosed:VD,curveCatmullRomOpen:XD,curveCatmullRom:Yk,curveLinear:wc,curveLinearClosed:QD,curveMonotoneX:Kk,curveMonotoneY:Jk,curveNatural:e2,curveStep:r2,curveStepAfter:a2,curveStepBefore:i2},HO=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,PO=S(function(e,t){const i=GS(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(i)){const c=i.map(h=>h.args);Pu(c),a=Ze(a,[...c])}else a=i.args;if(!a)return;let o=Fm(e,t);const l="config";return a[l]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),a[o]=a[l],delete a[l]),a},"detectInit"),GS=S(function(e,t=null){var i,a;try{const o=new RegExp(`[%]{2}(?![{]${HO.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(o,"").replace(/'/gm,'"'),gt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let l;const c=[];for(;(l=Sc.exec(e))!==null;)if(l.index===Sc.lastIndex&&Sc.lastIndex++,l&&!t||t&&((i=l[1])!=null&&i.match(t))||t&&((a=l[2])!=null&&a.match(t))){const h=l[1]?l[1]:l[2],d=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;c.push({type:h,args:d})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(o){return gt.error(`ERROR: ${o.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),WO=S(function(e){return e.replace(Sc,"")},"removeDirectives"),UO=S(function(e,t){for(const[i,a]of t.entries())if(a.match(e))return i;return-1},"isSubstringInArray");function ly(e,t){if(!e)return t;const i=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return jO[i]??t}S(ly,"interpolateToCurve");function VS(e,t){const i=e.trim();if(i)return t.securityLevel!=="loose"?hO.sanitizeUrl(i):i}S(VS,"formatUrl");var YO=S((e,...t)=>{const i=e.split("."),a=i.length-1,o=i[a];let l=window;for(let c=0;c<a;c++)if(l=l[i[c]],!l){gt.error(`Function name: ${e} not found in window`);return}l[o](...t)},"runFunc");function cy(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}S(cy,"distance");function XS(e){let t,i=0;e.forEach(o=>{i+=cy(o,t),t=o});const a=i/2;return hy(e,a)}S(XS,"traverseEdge");function QS(e){return e.length===1?e[0]:XS(e)}S(QS,"calcLabelPosition");var F1=S((e,t=2)=>{const i=Math.pow(10,t);return Math.round(e*i)/i},"roundNumber"),hy=S((e,t)=>{let i,a=t;for(const o of e){if(i){const l=cy(o,i);if(l===0)return i;if(l<a)a-=l;else{const c=a/l;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:F1((1-c)*i.x+c*o.x,5),y:F1((1-c)*i.y+c*o.y,5)}}}i=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),GO=S((e,t,i)=>{gt.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());const o=hy(t,25),l=e?10:5,c=Math.atan2(t[0].y-o.y,t[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(t[0].x+o.x)/2,h.y=-Math.cos(c)*l+(t[0].y+o.y)/2,h},"calcCardinalityPosition");function ZS(e,t,i){const a=structuredClone(i);gt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const o=25+e,l=hy(a,o),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),d={x:0,y:0};return t==="start_left"?(d.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(d.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(d.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(d.x=Math.sin(h)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2),d}S(ZS,"calcTerminalLabelPosition");function KS(e){let t="",i="";for(const a of e)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?i=i+a+";":t=t+a+";");return{style:t,labelStyle:i}}S(KS,"getStylesFromArray");var D1=0,VO=S(()=>(D1++,"id-"+Math.random().toString(36).substr(2,12)+"-"+D1),"generateId");function JS(e){let t="";const i="0123456789abcdef",a=i.length;for(let o=0;o<e;o++)t+=i.charAt(Math.floor(Math.random()*a));return t}S(JS,"makeRandomHex");var XO=S(e=>JS(e.length),"random"),QO=S(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"),ZO=S(function(e,t){const i=t.text.replace(jc.lineBreakRegex," "),[,a]=Dd(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",a),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const l=o.append("tspan");return l.attr("x",t.x+t.textMargin*2),l.attr("fill",t.fill),l.text(i),o},"drawSimpleText"),KO=Uc((e,t,i)=>{if(!e||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),jc.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),o=[];let l="";return a.forEach((c,h)=>{const d=Fa(`${c} `,i),f=Fa(l,i);if(d>t){const{hyphenatedStrings:x,remainingWord:y}=JO(c,t,"-",i);o.push(l,...x),l=y}else f+d>=t?(o.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&o.push(l)}),o.filter(c=>c!=="").join(i.joinWith)},(e,t,i)=>`${e}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),JO=Uc((e,t,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const o=[...e],l=[];let c="";return o.forEach((h,d)=>{const f=`${c}${h}`;if(Fa(f,a)>=t){const g=d+1,x=o.length===g,y=`${f}${i}`;l.push(x?f:y),c=""}else c=f}),{hyphenatedStrings:l,remainingWord:c}},(e,t,i="-",a)=>`${e}${t}${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function tw(e,t){return uy(e,t).height}S(tw,"calculateTextHeight");function Fa(e,t){return uy(e,t).width}S(Fa,"calculateTextWidth");var uy=Uc((e,t)=>{const{fontSize:i=12,fontFamily:a="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,l]=Dd(i),c=["sans-serif",a],h=e.split(jc.lineBreakRegex),d=[],f=Zt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const x of c){let y=0;const C={width:0,height:0,lineHeight:0};for(const k of h){const v=QO();v.text=k||IO;const w=ZO(p,v).style("font-size",l).style("font-weight",o).style("font-family",x),B=(w._groups||w)[0][0].getBBox();if(B.width===0&&B.height===0)throw new Error("svg element not in render tree");C.width=Math.round(Math.max(C.width,B.width)),y=Math.round(B.height),C.height+=y,C.lineHeight=Math.round(Math.max(C.lineHeight,y))}d.push(C)}p.remove();const g=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Hs,tz=(Hs=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}},S(Hs,"InitIDGenerator"),Hs),xu,ez=S(function(e){return xu=xu||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xu.innerHTML=e,unescape(xu.textContent)},"entityDecode");function dy(e){return"str"in e}S(dy,"isDetailedError");var rz=S((e,t,i,a)=>{var l;if(!a)return;const o=(l=e.node())==null?void 0:l.getBBox();o&&e.append("text").text(a).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",t)},"insertTitle"),Dd=S(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function fy(e,t){return qO({},e,t)}S(fy,"cleanAndMerge");var Ei={assignWithDepth:Ze,wrapLabel:KO,calculateTextHeight:tw,calculateTextWidth:Fa,calculateTextDimensions:uy,cleanAndMerge:fy,detectInit:PO,detectDirective:GS,isSubstringInArray:UO,interpolateToCurve:ly,calcLabelPosition:QS,calcCardinalityPosition:GO,calcTerminalLabelPosition:ZS,formatUrl:VS,getStylesFromArray:KS,generateId:VO,random:XO,runFunc:YO,entityDecode:ez,insertTitle:rz,isLabelCoordinateInPath:ew,parseFontSize:Dd,InitIDGenerator:tz},iz=S(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/#\w+;/g,function(i){const a=i.substring(1,i.length-1);return/^\+?\d+$/.test(a)?"ﬂ°°"+a+"¶ß":"ﬂ°"+a+"¶ß"}),t},"encodeEntities"),mo=S(function(e){return e.replace(/ﬂ°°/g,"&#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),c7=S((e,t,{counter:i=0,prefix:a,suffix:o},l)=>l||`${a?`${a}_`:""}${e}_${t}_${i}${o?`_${o}`:""}`,"getEdgeId");function rr(e){return e??null}S(rr,"handleUndefinedAttr");function ew(e,t){const i=Math.round(e.x),a=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return o.includes(i.toString())||o.includes(a.toString())}S(ew,"isLabelCoordinateInPath");var py=S(({flowchart:e})=>{var o,l;const t=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.top)??0,i=((l=e==null?void 0:e.subGraphTitleMargin)==null?void 0:l.bottom)??0,a=t+i;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins");async function rw(e,t){const i=e.getElementsByTagName("img");if(!i||i.length===0)return;const a=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(o=>new Promise(l=>{function c(){if(o.style.display="flex",o.style.flexDirection="column",a){const h=ce().fontSize?ce().fontSize:window.getComputedStyle(document.body).fontSize,d=5,[f=Vv.fontSize]=Dd(h),p=f*d+"px";o.style.minWidth=p,o.style.maxWidth=p}else o.style.width="100%";l(o)}S(c,"setupImage"),setTimeout(()=>{o.complete&&c()}),o.addEventListener("error",c),o.addEventListener("load",c)})))}S(rw,"configureLabelImages");const az=Object.freeze({left:0,top:0,width:16,height:16}),cd=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),iw=Object.freeze({...az,...cd}),nz=Object.freeze({...iw,body:"",hidden:!1}),oz=Object.freeze({width:null,height:null}),sz=Object.freeze({...oz,...cd}),lz=(e,t,i,a="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;a=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const h=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:a,prefix:d,name:h};return pg(f)?f:null}const l=o[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return pg(h)?h:null}if(i&&a===""){const h={provider:a,prefix:"",name:l};return pg(h,i)?h:null}return null},pg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cz(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const a=((e.rotate||0)+(t.rotate||0))%4;return a&&(i.rotate=a),i}function R1(e,t){const i=cz(e,t);for(const a in nz)a in cd?a in e&&!(a in i)&&(i[a]=cd[a]):a in t?i[a]=t[a]:a in e&&(i[a]=e[a]);return i}function hz(e,t){const i=e.icons,a=e.aliases||Object.create(null),o=Object.create(null);function l(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;const h=a[c]&&a[c].parent,d=h&&l(h);d&&(o[c]=[h].concat(d))}return o[c]}return(t||Object.keys(i).concat(Object.keys(a))).forEach(l),o}function O1(e,t,i){const a=e.icons,o=e.aliases||Object.create(null);let l={};function c(h){l=R1(a[h]||o[h],l)}return c(t),i.forEach(c),R1(e,l)}function uz(e,t){if(e.icons[t])return O1(e,t,[]);const i=hz(e,[t])[t];return i?O1(e,t,i):null}const dz=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fz=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z1(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;const a=e.split(dz);if(a===null||!a.length)return e;const o=[];let l=a.shift(),c=fz.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?o.push(l):o.push(Math.ceil(h*t*i)/i)}else o.push(l);if(l=a.shift(),l===void 0)return o.join("");c=!c}}function pz(e,t="defs"){let i="";const a=e.indexOf("<"+t);for(;a>=0;){const o=e.indexOf(">",a),l=e.indexOf("</"+t);if(o===-1||l===-1)break;const c=e.indexOf(">",l);if(c===-1)break;i+=e.slice(o+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:i,content:e}}function gz(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mz(e,t,i){const a=pz(e);return gz(a.defs,t+a.content+i)}const yz=e=>e==="unset"||e==="undefined"||e==="none";function xz(e,t){const i={...iw,...e},a={...sz,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let l=i.body;[i,a].forEach(k=>{const v=[],w=k.hFlip,B=k.vFlip;let L=k.rotate;w?B?L+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):B&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let F;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:F=o.height/2+o.top,v.unshift("rotate(90 "+F.toString()+" "+F.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:F=o.width/2+o.left,v.unshift("rotate(-90 "+F.toString()+" "+F.toString()+")");break}L%2===1&&(o.left!==o.top&&(F=o.left,o.left=o.top,o.top=F),o.width!==o.height&&(F=o.width,o.width=o.height,o.height=F)),v.length&&(l=mz(l,'<g transform="'+v.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,d=o.width,f=o.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=z1(g,d/f)):(p=c==="auto"?d:c,g=h===null?z1(p,f/d):h==="auto"?f:h);const x={},y=(k,v)=>{yz(v)||(x[k]=v.toString())};y("width",p),y("height",g);const C=[o.left,o.top,d,f];return x.viewBox=C.join(" "),{attributes:x,viewBox:C,body:l}}const bz=/\sid="(\S+)"/g,$1=new Map;function Cz(e){e=e.replace(/[0-9]+$/,"")||"a";const t=$1.get(e)||0;return $1.set(e,t+1),t?`${e}${t}`:e}function vz(e){const t=[];let i;for(;i=bz.exec(e);)t.push(i[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const l=Cz(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function kz(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in t)i+=" "+a+'="'+t[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+e+"</svg>"}var Sz={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},sm=new Map,aw=new Map,wz=S(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(gt.debug("Registering icon pack:",t.name),"loader"in t)aw.set(t.name,t.loader);else if("icons"in t)sm.set(t.name,t.icons);else throw gt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nw=S(async(e,t)=>{const i=lz(e,!0,t!==void 0);if(!i)throw new Error(`Invalid icon name: ${e}`);const a=i.prefix||t;if(!a)throw new Error(`Icon name must contain a prefix: ${e}`);let o=sm.get(a);if(!o){const c=aw.get(a);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:a},sm.set(a,o)}catch(h){throw gt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const l=uz(o,i.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),Tz=S(async e=>{try{return await nw(e),!0}catch{return!1}},"isIconAvailable"),Yc=S(async(e,t,i)=>{let a;try{a=await nw(e,t==null?void 0:t.fallbackPrefix)}catch(c){gt.error(c),a=Sz}const o=xz(a,t),l=kz(vz(o.body),{...o.attributes,...i});return Mi(l,_e())},"getIconSVG");function gy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Co=gy();function ow(e){Co=e}var Tc={exec:()=>null};function de(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(o,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Er.caret,"$1"),i=i.replace(o,c),a},getRegex:()=>new RegExp(i,t)};return a}var _z=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Er={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Bz=/^(?:[ \t]*(?:\n|$))+/,Ez=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lz=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Az=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,my=/(?:[*+-]|\d{1,9}[.)])/,sw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lw=de(sw).replace(/bull/g,my).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(),Mz=de(sw).replace(/bull/g,my).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(),yy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fz=/^[^\n]+/,xy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Dz=de(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rz=de(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,my).getRegex(),Rd="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",by=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oz=de("^ {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",by).replace("tag",Rd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cw=de(yy).replace("hr",Gc).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",Rd).getRegex(),zz=de(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cw).getRegex(),Cy={blockquote:zz,code:Ez,def:Dz,fences:Lz,heading:Az,hr:Gc,html:Oz,lheading:lw,list:Rz,newline:Bz,paragraph:cw,table:Tc,text:Fz},N1=de("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gc).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",Rd).getRegex(),$z={...Cy,lheading:Mz,table:N1,paragraph:de(yy).replace("hr",Gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N1).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",Rd).getRegex()},Nz={...Cy,html:de(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",by).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:Tc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:de(yy).replace("hr",Gc).replace("heading",` *#{1,6} *[^
]`).replace("lheading",lw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qz=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Iz=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hw=/^( {2,}|\\)\n(?!\s*$)/,jz=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Od=/[\p{P}\p{S}]/u,vy=/[\s\p{P}\p{S}]/u,uw=/[^\s\p{P}\p{S}]/u,Hz=de(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vy).getRegex(),dw=/(?!~)[\p{P}\p{S}]/u,Pz=/(?!~)[\s\p{P}\p{S}]/u,Wz=/(?:[^\s\p{P}\p{S}]|~)/u,Uz=de(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",_z?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fw=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Yz=de(fw,"u").replace(/punct/g,Od).getRegex(),Gz=de(fw,"u").replace(/punct/g,dw).getRegex(),pw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Vz=de(pw,"gu").replace(/notPunctSpace/g,uw).replace(/punctSpace/g,vy).replace(/punct/g,Od).getRegex(),Xz=de(pw,"gu").replace(/notPunctSpace/g,Wz).replace(/punctSpace/g,Pz).replace(/punct/g,dw).getRegex(),Qz=de("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uw).replace(/punctSpace/g,vy).replace(/punct/g,Od).getRegex(),Zz=de(/\\(punct)/,"gu").replace(/punct/g,Od).getRegex(),Kz=de(/^<(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(),Jz=de(by).replace("(?:-->|$)","-->").getRegex(),t4=de("^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",Jz).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,e4=de(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gw=de(/^!?\[(label)\]\[(ref)\]/).replace("label",hd).replace("ref",xy).getRegex(),mw=de(/^!?\[(ref)\](?:\[\])?/).replace("ref",xy).getRegex(),r4=de("reflink|nolink(?!\\()","g").replace("reflink",gw).replace("nolink",mw).getRegex(),q1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ky={_backpedal:Tc,anyPunctuation:Zz,autolink:Kz,blockSkip:Uz,br:hw,code:Iz,del:Tc,emStrongLDelim:Yz,emStrongRDelimAst:Vz,emStrongRDelimUnd:Qz,escape:qz,link:e4,nolink:mw,punctuation:Hz,reflink:gw,reflinkSearch:r4,tag:t4,text:jz,url:Tc},i4={...ky,link:de(/^!?\[(label)\]\((.*?)\)/).replace("label",hd).getRegex(),reflink:de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hd).getRegex()},lm={...ky,emStrongRDelimAst:Xz,emStrongLDelim:Gz,url:de(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",q1).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:de(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",q1).getRegex()},a4={...lm,br:de(hw).replace("{2,}","*").getRegex(),text:de(lm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bu={normal:Cy,gfm:$z,pedantic:Nz},ac={normal:ky,gfm:lm,breaks:a4,pedantic:i4},n4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},I1=e=>n4[e];function Yi(e,t){if(t){if(Er.escapeTest.test(e))return e.replace(Er.escapeReplace,I1)}else if(Er.escapeTestNoEncode.test(e))return e.replace(Er.escapeReplaceNoEncode,I1);return e}function j1(e){try{e=encodeURI(e).replace(Er.percentDecode,"%")}catch{return null}return e}function H1(e,t){var l;let i=e.replace(Er.findPipe,(c,h,d)=>{let f=!1,p=h;for(;--p>=0&&d[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(Er.splitPipe),o=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;o<a.length;o++)a[o]=a[o].trim().replace(Er.slashPipe,"|");return a}function nc(e,t,i){let a=e.length;if(a===0)return"";let o=0;for(;o<a&&e.charAt(a-o-1)===t;)o++;return e.slice(0,a-o)}function o4(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function P1(e,t,i,a,o){let l=t.href,c=t.title||null,h=e[1].replace(o.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function s4(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let o=a[1];return t.split(`
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=o.length?l.slice(o.length):l}).join(`
`)}var ud=class{constructor(t){$t(this,"options");$t(this,"rules");$t(this,"lexer");this.options=t||Co}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?a:nc(a,`
`)}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],o=s4(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:o}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let o=nc(a,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(a=o.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:nc(i[0],`
`)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=nc(i[0],`
`).split(`
`),o="",l="",c=[];for(;a.length>0;){let h=!1,d=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))d.push(a[f]),h=!0;else if(!h)d.push(a[f]);else break;a=a.slice(f);let p=d.join(`
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
${p}`:p,l=l?`${l}
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,a.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let C=y,k=C.raw+`
`+a.join(`
`),v=this.blockquote(k);c[c.length-1]=v,o=o.substring(0,o.length-C.raw.length)+v.raw,l=l.substring(0,l.length-C.text.length)+v.text;break}else if((y==null?void 0:y.type)==="list"){let C=y,k=C.raw+`
`+a.join(`
`),v=this.list(k);c[c.length-1]=v,o=o.substring(0,o.length-y.raw.length)+v.raw,l=l.substring(0,l.length-C.raw.length)+v.raw,a=k.substring(c.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:o,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),o=a.length>1,l={type:"list",raw:"",ordered:o,start:o?+a.slice(0,-1):"",loose:!1,items:[]};a=o?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=o?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=i[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,B=>" ".repeat(3*B.length)),y=t.split(`
`,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=i[1].length+1:(k=i[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=i[1].length),C&&this.rules.other.blankLine.test(y)&&(p+=y+`
`,t=t.substring(y.length+1),f=!0),!f){let B=this.rules.other.nextBulletRegex(k),L=this.rules.other.hrRegex(k),F=this.rules.other.fencesBeginRegex(k),D=this.rules.other.headingBeginRegex(k),z=this.rules.other.htmlBeginRegex(k);for(;t;){let N=t.split(`
`,1)[0],P;if(y=N,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting,"  "),P=y):P=y.replace(this.rules.other.tabCharGlobal,"    "),F.test(y)||D.test(y)||z.test(y)||B.test(y)||L.test(y))break;if(P.search(this.rules.other.nonSpaceChar)>=k||!y.trim())g+=`
`+P.slice(k);else{if(C||x.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||F.test(x)||D.test(x)||L.test(x))break;g+=`
`+y}!C&&!y.trim()&&(C=!0),p+=N+`
`,t=t.substring(N.length+1),x=P.slice(k)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let v=null,w;this.options.gfm&&(v=this.rules.other.listIsTask.exec(g),v&&(w=v[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!v,checked:w,loose:!1,text:g,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f=0;f<l.items.length;f++)if(this.lexer.state.top=!1,l.items[f].tokens=this.lexer.blockTokens(l.items[f].text,[]),!l.loose){let p=l.items[f].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=g}if(l.loose)for(let f=0;f<l.items.length;f++)l.items[f].loose=!0;return l}}html(t){let i=this.rules.block.html.exec(t);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:o,title:l}}}table(t){var h;let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=H1(i[1]),o=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===o.length){for(let d of o)this.rules.other.tableAlignRight.test(d)?c.align.push("right"):this.rules.other.tableAlignCenter.test(d)?c.align.push("center"):this.rules.other.tableAlignLeft.test(d)?c.align.push("left"):c.align.push(null);for(let d=0;d<a.length;d++)c.header.push({text:a[d],tokens:this.lexer.inline(a[d]),header:!0,align:c.align[d]});for(let d of l)c.rows.push(H1(d,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=nc(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=o4(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let o=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(o);c&&(o=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?o=o.slice(1):o=o.slice(1,-1)),P1(i,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let o=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[o.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return P1(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...o[0]].length-1,c,h,d=l,f=0,p=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(o=p.exec(i))!=null;){if(c=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!c)continue;if(h=[...c].length,o[3]||o[4]){d+=h;continue}else if((o[5]||o[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(d-=h,d>0)continue;h=Math.min(h,h+d+f);let g=[...o[0]][0].length,x=t.slice(0,l+o.index+g+h);if(Math.min(l,h)%2){let C=x.slice(1,-1);return{type:"em",raw:x,text:C,tokens:this.lexer.inlineTokens(C)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return o&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t){let i=this.rules.inline.del.exec(t);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,o;return i[2]==="@"?(a=i[1],o="mailto:"+a):(a=i[1],o=a),{type:"link",raw:i[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let o,l;if(i[2]==="@")o=i[0],l="mailto:"+o;else{let c;do c=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(c!==i[0]);o=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:o,href:l,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},Si=class cm{constructor(t){$t(this,"tokens");$t(this,"options");$t(this,"state");$t(this,"tokenizer");$t(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Co,this.options.tokenizer=this.options.tokenizer||new ud,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Er,block:bu.normal,inline:ac.normal};this.options.pedantic?(i.block=bu.pedantic,i.inline=ac.pedantic):this.options.gfm&&(i.block=bu.gfm,this.options.breaks?i.inline=ac.breaks:i.inline=ac.gfm),this.tokenizer.rules=i}static get rules(){return{block:bu,inline:ac}}static lex(t,i){return new cm(i).lex(t)}static lexInline(t,i){return new cm(i).inlineTokens(t)}lex(t){t=t.replace(Er.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var o,l,c;for(this.options.pedantic&&(t=t.replace(Er.tabCharGlobal,"    ").replace(Er.spaceLine,""));t;){let h;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(f=>(h=f.call({lexer:this},t,i))?(t=t.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(t)){t=t.substring(h.raw.length);let f=i.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
`:i.push(h);continue}if(h=this.tokenizer.code(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
`)?"":`
`)+h.raw,f.text+=`
`+h.text,this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(h=this.tokenizer.fences(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
`)?"":`
`)+h.raw,f.text+=`
`+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},i.push(h));continue}if(h=this.tokenizer.table(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(t)){t=t.substring(h.raw.length),i.push(h);continue}let d=t;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0,p=t.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(d))){let f=i.at(-1);a&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
`)?"":`
`)+h.raw,f.text+=`
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h),a=d.length!==t.length,t=t.substring(h.raw.length);continue}if(h=this.tokenizer.text(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
`)?"":`
`)+h.raw,f.text+=`
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var d,f,p,g,x;let a=t,o=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)y.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=o[2]?o[2].length:0,a=a.slice(0,o.index+l)+"["+"a".repeat(o[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((f=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:f.call({lexer:this},a))??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let y;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(k=>(y=k.call({lexer:this},t,i))?(t=t.substring(y.raw.length),i.push(y),!0):!1))continue;if(y=this.tokenizer.escape(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.tag(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.link(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(y.raw.length);let k=i.at(-1);y.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=y.raw,k.text+=y.text):i.push(y);continue}if(y=this.tokenizer.emStrong(t,a,h)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.codespan(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.br(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.del(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.autolink(t)){t=t.substring(y.raw.length),i.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(t))){t=t.substring(y.raw.length),i.push(y);continue}let C=t;if((x=this.options.extensions)!=null&&x.startInline){let k=1/0,v=t.slice(1),w;this.options.extensions.startInline.forEach(B=>{w=B.call({lexer:this},v),typeof w=="number"&&w>=0&&(k=Math.min(k,w))}),k<1/0&&k>=0&&(C=t.substring(0,k+1))}if(y=this.tokenizer.inlineText(C)){t=t.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let k=i.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=y.raw,k.text+=y.text):i.push(y);continue}if(t){let k="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return i}},dd=class{constructor(t){$t(this,"options");$t(this,"parser");this.options=t||Co}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let o=(c=(i||"").match(Er.notSpaceStart))==null?void 0:c[0],l=t.replace(Er.endingNewline,"")+`
`;return o?'<pre><code class="language-'+Yi(o)+'">'+(a?l:Yi(l,!0))+`</code></pre>
`:"<pre><code>"+(a?l:Yi(l,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
`}hr(t){return`<hr>
`}list(t){let i=t.ordered,a=t.start,o="";for(let h=0;h<t.items.length;h++){let d=t.items[h];o+=this.listitem(d)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
`+o+"</"+l+`>
`}listitem(t){var a;let i="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((a=t.tokens[0])==null?void 0:a.type)==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+Yi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):i+=o+" "}return i+=this.parser.parse(t.tokens,!!t.loose),`<li>${i}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let o="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);o+=this.tablerow({text:a})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
<thead>
`+i+`</thead>
`+o+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Yi(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let o=this.parser.parseInline(a),l=j1(t);if(l===null)return o;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Yi(i)+'"'),c+=">"+o+"</a>",c}image({href:t,title:i,text:a,tokens:o}){o&&(a=this.parser.parseInline(o,this.parser.textRenderer));let l=j1(t);if(l===null)return Yi(a);t=l;let c=`<img src="${t}" alt="${a}"`;return i&&(c+=` title="${Yi(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Yi(t.text)}},Sy=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},wi=class hm{constructor(t){$t(this,"options");$t(this,"renderer");$t(this,"textRenderer");this.options=t||Co,this.options.renderer=this.options.renderer||new dd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Sy}static parse(t,i){return new hm(i).parse(t)}static parseInline(t,i){return new hm(i).parseInline(t)}parse(t,i=!0){var o,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[h.type]){let f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){a+=p||"";continue}}let d=h;switch(d.type){case"space":{a+=this.renderer.space(d);continue}case"hr":{a+=this.renderer.hr(d);continue}case"heading":{a+=this.renderer.heading(d);continue}case"code":{a+=this.renderer.code(d);continue}case"table":{a+=this.renderer.table(d);continue}case"blockquote":{a+=this.renderer.blockquote(d);continue}case"list":{a+=this.renderer.list(d);continue}case"html":{a+=this.renderer.html(d);continue}case"def":{a+=this.renderer.def(d);continue}case"paragraph":{a+=this.renderer.paragraph(d);continue}case"text":{let f=d,p=this.renderer.text(f);for(;c+1<t.length&&t[c+1].type==="text";)f=t[++c],p+=`
`+this.renderer.text(f);i?a+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):a+=p;continue}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}parseInline(t,i=this.renderer){var o,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=f||"";continue}}let d=h;switch(d.type){case"escape":{a+=i.text(d);break}case"html":{a+=i.html(d);break}case"link":{a+=i.link(d);break}case"image":{a+=i.image(d);break}case"strong":{a+=i.strong(d);break}case"em":{a+=i.em(d);break}case"codespan":{a+=i.codespan(d);break}case"br":{a+=i.br(d);break}case"del":{a+=i.del(d);break}case"text":{a+=i.text(d);break}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Bu,mc=(Bu=class{constructor(t){$t(this,"options");$t(this,"block");this.options=t||Co}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Si.lex:Si.lexInline}provideParser(){return this.block?wi.parse:wi.parseInline}},$t(Bu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$t(Bu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Bu),l4=class{constructor(...t){$t(this,"defaults",gy());$t(this,"options",this.setOptions);$t(this,"parse",this.parseMarkdown(!0));$t(this,"parseInline",this.parseMarkdown(!1));$t(this,"Parser",wi);$t(this,"Renderer",dd);$t(this,"TextRenderer",Sy);$t(this,"Lexer",Si);$t(this,"Tokenizer",ud);$t(this,"Hooks",mc);this.use(...t)}walkTokens(t,i){var o,l;let a=[];for(let c of t)switch(a=a.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let d of h.header)a=a.concat(this.walkTokens(d.tokens,i));for(let d of h.rows)for(let f of d)a=a.concat(this.walkTokens(f.tokens,i));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,i));break}default:{let h=c;(l=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(d=>{let f=h[d].flat(1/0);a=a.concat(this.walkTokens(f,i))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let o={...a};if(o.async=this.defaults.async||o.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let d=l.renderer.apply(this,h);return d===!1&&(d=c.apply(this,h)),d}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),o.extensions=i),a.renderer){let l=this.defaults.renderer||new dd(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,d=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}o.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new ud(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,d=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}o.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new mc;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,d=a.hooks[h],f=l[h];mc.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&mc.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await d.call(l,p);return f.call(l,x)})();let g=d.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await d.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}o.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;o.walkTokens=function(h){let d=[];return d.push(c.call(this,h)),l&&(d=d.concat(l.call(this,h))),d}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return Si.lex(t,i??this.defaults)}parser(t,i){return wi.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let o={...a},l={...this.defaults,...o},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&o.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,d=await(l.hooks?await l.hooks.provideLexer():t?Si.lex:Si.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(d):d;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?wi.parse:wi.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer():t?Si.lex:Si.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let d=(l.hooks?l.hooks.provideParser():t?wi.parse:wi.parseInline)(h,l);return l.hooks&&(d=l.hooks.postprocess(d)),d}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Yi(a.message+"",!0)+"</pre>";return i?Promise.resolve(o):o}if(i)return Promise.reject(a);throw a}}},yo=new l4;function pe(e,t){return yo.parse(e,t)}pe.options=pe.setOptions=function(e){return yo.setOptions(e),pe.defaults=yo.defaults,ow(pe.defaults),pe};pe.getDefaults=gy;pe.defaults=Co;pe.use=function(...e){return yo.use(...e),pe.defaults=yo.defaults,ow(pe.defaults),pe};pe.walkTokens=function(e,t){return yo.walkTokens(e,t)};pe.parseInline=yo.parseInline;pe.Parser=wi;pe.parser=wi.parse;pe.Renderer=dd;pe.TextRenderer=Sy;pe.Lexer=Si;pe.lexer=Si.lex;pe.Tokenizer=ud;pe.Hooks=mc;pe.parse=pe;pe.options;pe.setOptions;pe.use;pe.walkTokens;pe.parseInline;wi.parse;Si.lex;function yw(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var a=Array.from(typeof e=="string"?[e]:e);a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,"");var o=a.reduce(function(h,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);return f?h.concat(f.map(function(p){var g,x;return(x=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(o.length){var l=new RegExp(`
[	 ]{`.concat(Math.min.apply(Math,o),"}"),"g");a=a.map(function(h){return h.replace(l,`
`)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,d){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
`)&&(g=String(h).split(`
`).map(function(x,y){return y===0?x:"".concat(p).concat(x)}).join(`
`)),c+=g+a[d+1]}),c}function xw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`);return yw(a)}S(xw,"preprocessMarkdown");function bw(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var i;return((i=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(a=>({content:a,type:"normal"})))??[]})}S(bw,"nonMarkdownToLines");function Cw(e,t={}){const i=xw(e,t),a=pe.lexer(i),o=[[]];let l=0;function c(h,d="normal"){h.type==="text"?h.text.split(`
`).forEach((p,g)=>{g!==0&&(l++,o.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&o[l].push({content:x,type:d})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&o[l].push({content:h.text,type:"normal"})}return S(c,"processNode"),a.forEach(h=>{var d;h.type==="paragraph"?(d=h.tokens)==null||d.forEach(f=>{c(f)}):h.type==="html"?o[l].push({content:h.text,type:"normal"}):o[l].push({content:h.raw,type:"normal"})}),o}S(Cw,"markdownToLines");function vw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}S(vw,"nonMarkdownToHTML");function kw(e,{markdownAutoWrap:t}={}){const i=pe.lexer(e);function a(o){var l,c,h;return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${(l=o.tokens)==null?void 0:l.map(a).join("")}</strong>`:o.type==="em"?`<em>${(c=o.tokens)==null?void 0:c.map(a).join("")}</em>`:o.type==="paragraph"?`<p>${(h=o.tokens)==null?void 0:h.map(a).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(gt.warn(`Unsupported markdown: ${o.type}`),o.raw)}return S(a,"output"),i.map(a).join("")}S(kw,"markdownToHTML");function Sw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}S(Sw,"splitTextToChars");function ww(e,t){const i=Sw(t.content);return wy(e,[],i,t.type)}S(ww,"splitWordToFitWidth");function wy(e,t,i,a){if(i.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[o,...l]=i,c=[...t,o];return e([{content:c.join(""),type:a}])?wy(e,c,l,a):(t.length===0&&o&&(t.push(o),i.shift()),[{content:t.join(""),type:a},{content:i.join(""),type:a}])}S(wy,"splitWordToFitWidthRecursion");function Tw(e,t){if(e.some(({content:i})=>i.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return fd(e,t)}S(Tw,"splitLineToFitWidth");function fd(e,t,i=[],a=[]){if(e.length===0)return a.length>0&&i.push(a),i.length>0?i:[];let o="";e[0].content===" "&&(o=" ",e.shift());const l=e.shift()??{content:" ",type:"normal"},c=[...a];if(o!==""&&c.push({content:o,type:"normal"}),c.push(l),t(c))return fd(e,t,i,c);if(a.length>0)i.push(a),e.unshift(l);else if(l.content){const[h,d]=ww(t,l);i.push([h]),d.content&&e.unshift(d)}return fd(e,t,i)}S(fd,"splitLineToFitWidthRecursion");function um(e,t){t&&e.attr("style",t)}S(um,"applyStyle");var W1=16384;async function _w(e,t,i,a,o=!1,l=_e()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*i,W1)}px`),c.attr("height",`${Math.min(10*i,W1)}px`);const h=c.append("xhtml:div"),d=Ec(t.label)?await sk(t.label.replace(jc.lineBreakRegex,`
`),l):Mi(t.label,l),f=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(d),um(p,t.labelStyle),p.attr("class",`${f} ${a}`),um(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}S(_w,"addHtmlSpan");function zd(e,t,i,a=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*i-.1+"em").attr("dy",i+"em");return a&&o.attr("text-anchor","middle"),o}S(zd,"createTspan");function Bw(e,t,i){const a=e.append("text"),o=zd(a,1,t);$d(o,i);const l=o.node().getComputedTextLength();return a.remove(),l}S(Bw,"computeWidthOfText");function c4(e,t,i){var c;const a=e.append("text"),o=zd(a,1,t);$d(o,[{content:i,type:"normal"}]);const l=(c=o.node())==null?void 0:c.getBoundingClientRect();return l&&a.remove(),l}S(c4,"computeDimensionOfText");function Ew(e,t,i,a=!1,o=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");o&&d.attr("text-anchor","middle");let f=0;for(const p of i){const g=S(y=>Bw(c,1.1,y)<=e,"checkWidth"),x=g(p)?[p]:Tw(p,g);for(const y of x){const C=zd(d,f,1.1,o);$d(C,y),f++}}if(a){const p=d.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return d.node()}S(Ew,"createFormattedText");function dm(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(i,a)=>{switch(a){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}S(dm,"decodeHTMLEntities");function $d(e,t){e.text(""),t.forEach((i,a)=>{const o=e.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");a===0?o.text(dm(i.content)):o.text(" "+dm(i.content))})}S($d,"updateTextContentAndStyles");async function Lw(e,t={}){const i=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,l,c)=>(i.push((async()=>{const h=`${l}:${c}`;return await Tz(h)?await Yc(h,void 0,{class:"label-icon"}):`<i class='${Mi(o,t).replace(":"," ")}'></i>`})()),o));const a=await Promise.all(i);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}S(Lw,"replaceIconSubstring");var ia=S(async(e,t="",{style:i="",isTitle:a=!1,classes:o="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:d=200,addSvgBackground:f=!1}={},p)=>{if(gt.debug("XYZ createText",t,i,a,o,l,h,"addSvgBackground: ",f),l){const g=c?kw(t,p):vw(t),x=await Lw(mo(g),p),y=t.replace(/\\\\/g,"\\"),C={isNode:h,label:Ec(t)?y:x,labelStyle:i.replace("fill:","color:")};return await _w(e,C,d,o,f,p)}else{const g=mo(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?Cw(g.replace("<br>","<br/>"),p):bw(g),y=Ew(d,e,x,t?f:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zt(y).attr("style",C)}else{const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Zt(y).select("rect").attr("style",C.replace(/background:/g,"fill:"));const k=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zt(y).select("text").attr("style",k)}return a?Zt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Zt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function gg(e,t,i){if(e&&e.length){const[a,o]=t,l=Math.PI/180*i,c=Math.cos(l),h=Math.sin(l);for(const d of e){const[f,p]=d;d[0]=(f-a)*c-(p-o)*h+a,d[1]=(f-a)*h+(p-o)*c+o}}}function h4(e,t){return e[0]===t[0]&&e[1]===t[1]}function u4(e,t,i,a=1){const o=i,l=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,h=[0,0];if(o)for(const f of c)gg(f,h,o);const d=(function(f,p,g){const x=[];for(const B of f){const L=[...B];h4(L[0],L[L.length-1])||L.push([L[0][0],L[0][1]]),L.length>2&&x.push(L)}const y=[];p=Math.max(p,.1);const C=[];for(const B of x)for(let L=0;L<B.length-1;L++){const F=B[L],D=B[L+1];if(F[1]!==D[1]){const z=Math.min(F[1],D[1]);C.push({ymin:z,ymax:Math.max(F[1],D[1]),x:z===F[1]?F[0]:D[0],islope:(D[0]-F[0])/(D[1]-F[1])})}}if(C.sort(((B,L)=>B.ymin<L.ymin?-1:B.ymin>L.ymin?1:B.x<L.x?-1:B.x>L.x?1:B.ymax===L.ymax?0:(B.ymax-L.ymax)/Math.abs(B.ymax-L.ymax))),!C.length)return y;let k=[],v=C[0].ymin,w=0;for(;k.length||C.length;){if(C.length){let B=-1;for(let L=0;L<C.length&&!(C[L].ymin>v);L++)B=L;C.splice(0,B+1).forEach((L=>{k.push({s:v,edge:L})}))}if(k=k.filter((B=>!(B.edge.ymax<=v))),k.sort(((B,L)=>B.edge.x===L.edge.x?0:(B.edge.x-L.edge.x)/Math.abs(B.edge.x-L.edge.x))),(g!==1||w%p==0)&&k.length>1)for(let B=0;B<k.length;B+=2){const L=B+1;if(L>=k.length)break;const F=k[B].edge,D=k[L].edge;y.push([[Math.round(F.x),v],[Math.round(D.x),v]])}v+=g,k.forEach((B=>{B.edge.x=B.edge.x+g*B.edge.islope})),w++}return y})(c,l,a);if(o){for(const f of c)gg(f,h,-o);(function(f,p,g){const x=[];f.forEach((y=>x.push(...y))),gg(x,p,g)})(d,h,-o)}return d}function Vc(e,t){var i;const a=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let l=1;return t.roughness>=1&&(((i=t.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(l=o),u4(e,o,a,l||1)}class Ty{constructor(t){this.helper=t}fillPolygons(t,i){return this._fillPolygons(t,i)}_fillPolygons(t,i){const a=Vc(t,i);return{type:"fillSketch",ops:this.renderLines(a,i)}}renderLines(t,i){const a=[];for(const o of t)a.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],i));return a}}function Nd(e){const t=e[0],i=e[1];return Math.sqrt(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2))}class d4 extends Ty{fillPolygons(t,i){let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);const o=Vc(t,Object.assign({},i,{hachureGap:a})),l=Math.PI/180*i.hachureAngle,c=[],h=.5*a*Math.cos(l),d=.5*a*Math.sin(l);for(const[f,p]of o)Nd([f,p])&&c.push([[f[0]-h,f[1]+d],[...p]],[[f[0]+h,f[1]-d],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}}class f4 extends Ty{fillPolygons(t,i){const a=this._fillPolygons(t,i),o=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),l=this._fillPolygons(t,o);return a.ops=a.ops.concat(l.ops),a}}class p4{constructor(t){this.helper=t}fillPolygons(t,i){const a=Vc(t,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(a,i)}dotsOnLines(t,i){const a=[];let o=i.hachureGap;o<0&&(o=4*i.strokeWidth),o=Math.max(o,.1);let l=i.fillWeight;l<0&&(l=i.strokeWidth/2);const c=o/4;for(const h of t){const d=Nd(h),f=d/o,p=Math.ceil(f)-1,g=d-p*o,x=(h[0][0]+h[1][0])/2-o/4,y=Math.min(h[0][1],h[1][1]);for(let C=0;C<p;C++){const k=y+g+C*o,v=x-c+2*Math.random()*c,w=k-c+2*Math.random()*c,B=this.helper.ellipse(v,w,l,l,i);a.push(...B.ops)}}return{type:"fillSketch",ops:a}}}class g4{constructor(t){this.helper=t}fillPolygons(t,i){const a=Vc(t,i);return{type:"fillSketch",ops:this.dashedLine(a,i)}}dashedLine(t,i){const a=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,o=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,l=[];return t.forEach((c=>{const h=Nd(c),d=Math.floor(h/(a+o)),f=(h+o-d*(a+o))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<d;y++){const C=y*(a+o),k=C+a,v=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)],w=[p[0]+k*Math.cos(x)+f*Math.cos(x),p[1]+k*Math.sin(x)+f*Math.sin(x)];l.push(...this.helper.doubleLineOps(v[0],v[1],w[0],w[1],i))}})),l}}class m4{constructor(t){this.helper=t}fillPolygons(t,i){const a=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,o=i.zigzagOffset<0?a:i.zigzagOffset,l=Vc(t,i=Object.assign({},i,{hachureGap:a+o}));return{type:"fillSketch",ops:this.zigzagLines(l,o,i)}}zigzagLines(t,i,a){const o=[];return t.forEach((l=>{const c=Nd(l),h=Math.round(c/(2*i));let d=l[0],f=l[1];d[0]>f[0]&&(d=l[1],f=l[0]);const p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<h;g++){const x=2*g*i,y=2*(g+1)*i,C=Math.sqrt(2*Math.pow(i,2)),k=[d[0]+x*Math.cos(p),d[1]+x*Math.sin(p)],v=[d[0]+y*Math.cos(p),d[1]+y*Math.sin(p)],w=[k[0]+C*Math.cos(p+Math.PI/4),k[1]+C*Math.sin(p+Math.PI/4)];o.push(...this.helper.doubleLineOps(k[0],k[1],w[0],w[1],a),...this.helper.doubleLineOps(w[0],w[1],v[0],v[1],a))}})),o}}const Ir={};class y4{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const x4=0,mg=1,U1=2,Cu={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 yg(e,t){return e.type===t}function _y(e){const t=[],i=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:x4,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:mg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:U1,text:""},h})(e);let a="BOD",o=0,l=i[o];for(;!yg(l,U1);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return _y("M0,0"+e);o++,c=Cu[l.text],a=l.text}else yg(l,mg)?c=Cu[a]:(o++,c=Cu[l.text],a=l.text);if(!(o+c<i.length))throw new Error("Path data ended short");for(let d=o;d<o+c;d++){const f=i[d];if(!yg(f,mg))throw new Error("Param not a number: "+a+","+f.text);h[h.length]=+f.text}if(typeof Cu[a]!="number")throw new Error("Bad segment: "+a);{const d={key:a,data:h};t.push(d),o+=c,l=i[o],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function Aw(e){let t=0,i=0,a=0,o=0;const l=[];for(const{key:c,data:h}of e)switch(c){case"M":l.push({key:"M",data:[...h]}),[t,i]=h,[a,o]=h;break;case"m":t+=h[0],i+=h[1],l.push({key:"M",data:[t,i]}),a=t,o=i;break;case"L":l.push({key:"L",data:[...h]}),[t,i]=h;break;case"l":t+=h[0],i+=h[1],l.push({key:"L",data:[t,i]});break;case"C":l.push({key:"C",data:[...h]}),t=h[4],i=h[5];break;case"c":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"C",data:d}),t=d[4],i=d[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],i=h[3];break;case"q":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"Q",data:d}),t=d[2],i=d[3];break}case"A":l.push({key:"A",data:[...h]}),t=h[5],i=h[6];break;case"a":t+=h[5],i+=h[6],l.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,i]});break;case"H":l.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],l.push({key:"H",data:[t]});break;case"V":l.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],l.push({key:"V",data:[i]});break;case"S":l.push({key:"S",data:[...h]}),t=h[2],i=h[3];break;case"s":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"S",data:d}),t=d[2],i=d[3];break}case"T":l.push({key:"T",data:[...h]}),t=h[0],i=h[1];break;case"t":t+=h[0],i+=h[1],l.push({key:"T",data:[t,i]});break;case"Z":case"z":l.push({key:"Z",data:[]}),t=a,i=o}return l}function Mw(e){const t=[];let i="",a=0,o=0,l=0,c=0,h=0,d=0;for(const{key:f,data:p}of e){switch(f){case"M":t.push({key:"M",data:[...p]}),[a,o]=p,[l,c]=p;break;case"C":t.push({key:"C",data:[...p]}),a=p[4],o=p[5],h=p[2],d=p[3];break;case"L":t.push({key:"L",data:[...p]}),[a,o]=p;break;case"H":a=p[0],t.push({key:"L",data:[a,o]});break;case"V":o=p[0],t.push({key:"L",data:[a,o]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=a+(a-h),x=o+(o-d)):(g=a,x=o),t.push({key:"C",data:[g,x,...p]}),h=p[0],d=p[1],a=p[2],o=p[3];break}case"T":{const[g,x]=p;let y=0,C=0;i==="Q"||i==="T"?(y=a+(a-h),C=o+(o-d)):(y=a,C=o);const k=a+2*(y-a)/3,v=o+2*(C-o)/3,w=g+2*(y-g)/3,B=x+2*(C-x)/3;t.push({key:"C",data:[k,v,w,B,g,x]}),h=y,d=C,a=g,o=x;break}case"Q":{const[g,x,y,C]=p,k=a+2*(g-a)/3,v=o+2*(x-o)/3,w=y+2*(g-y)/3,B=C+2*(x-C)/3;t.push({key:"C",data:[k,v,w,B,y,C]}),h=g,d=x,a=y,o=C;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),y=p[2],C=p[3],k=p[4],v=p[5],w=p[6];g===0||x===0?(t.push({key:"C",data:[a,o,v,w,v,w]}),a=v,o=w):(a!==v||o!==w)&&(Fw(a,o,v,w,g,x,y,C,k).forEach((function(B){t.push({key:"C",data:B})})),a=v,o=w);break}case"Z":t.push({key:"Z",data:[]}),a=l,o=c}i=f}return t}function oc(e,t,i){return[e*Math.cos(i)-t*Math.sin(i),e*Math.sin(i)+t*Math.cos(i)]}function Fw(e,t,i,a,o,l,c,h,d,f){const p=(g=c,Math.PI*g/180);var g;let x=[],y=0,C=0,k=0,v=0;if(f)[y,C,k,v]=f;else{[e,t]=oc(e,t,-p),[i,a]=oc(i,a,-p);const X=(e-i)/2,q=(t-a)/2;let H=X*X/(o*o)+q*q/(l*l);H>1&&(H=Math.sqrt(H),o*=H,l*=H);const A=o*o,$=l*l,I=A*$-A*q*q-$*X*X,Q=A*q*q+$*X*X,lt=(h===d?-1:1)*Math.sqrt(Math.abs(I/Q));k=lt*o*q/l+(e+i)/2,v=lt*-l*X/o+(t+a)/2,y=Math.asin(parseFloat(((t-v)/l).toFixed(9))),C=Math.asin(parseFloat(((a-v)/l).toFixed(9))),e<k&&(y=Math.PI-y),i<k&&(C=Math.PI-C),y<0&&(y=2*Math.PI+y),C<0&&(C=2*Math.PI+C),d&&y>C&&(y-=2*Math.PI),!d&&C>y&&(C-=2*Math.PI)}let w=C-y;if(Math.abs(w)>120*Math.PI/180){const X=C,q=i,H=a;C=d&&C>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=Fw(i=k+o*Math.cos(C),a=v+l*Math.sin(C),q,H,o,l,c,0,d,[C,X,k,v])}w=C-y;const B=Math.cos(y),L=Math.sin(y),F=Math.cos(C),D=Math.sin(C),z=Math.tan(w/4),N=4/3*o*z,P=4/3*l*z,at=[e,t],K=[e+N*L,t-P*B],Y=[i+N*D,a-P*F],W=[i,a];if(K[0]=2*at[0]-K[0],K[1]=2*at[1]-K[1],f)return[K,Y,W].concat(x);{x=[K,Y,W].concat(x);const X=[];for(let q=0;q<x.length;q+=3){const H=oc(x[q][0],x[q][1],p),A=oc(x[q+1][0],x[q+1][1],p),$=oc(x[q+2][0],x[q+2][1],p);X.push([H[0],H[1],A[0],A[1],$[0],$[1]])}return X}}const b4={randOffset:function(e,t){return Pt(e,t)},randOffsetWithRange:function(e,t,i){return pd(e,t,i)},ellipse:function(e,t,i,a,o){const l=Rw(i,a,o);return fm(e,t,o,l).opset},doubleLineOps:function(e,t,i,a,o){return Sn(e,t,i,a,o,!0)}};function Dw(e,t,i,a,o){return{type:"path",ops:Sn(e,t,i,a,o)}}function qu(e,t,i){const a=(e||[]).length;if(a>2){const o=[];for(let l=0;l<a-1;l++)o.push(...Sn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],i));return t&&o.push(...Sn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],i)),{type:"path",ops:o}}return a===2?Dw(e[0][0],e[0][1],e[1][0],e[1][1],i):{type:"path",ops:[]}}function C4(e,t,i,a,o){return(function(l,c){return qu(l,!0,c)})([[e,t],[e+i,t],[e+i,t+a],[e,t+a]],o)}function Y1(e,t){if(e.length){const i=typeof e[0][0]=="number"?[e]:e,a=vu(i[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:vu(i[0],1.5*(1+.22*t.roughness),X1(t));for(let l=1;l<i.length;l++){const c=i[l];if(c.length){const h=vu(c,1*(1+.2*t.roughness),t),d=t.disableMultiStroke?[]:vu(c,1.5*(1+.22*t.roughness),X1(t));for(const f of h)f.op!=="move"&&a.push(f);for(const f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:a.concat(o)}}return{type:"path",ops:[]}}function Rw(e,t,i){const a=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/o;let c=Math.abs(e/2),h=Math.abs(t/2);const d=1-i.curveFitting;return c+=Pt(c*d,i),h+=Pt(h*d,i),{increment:l,rx:c,ry:h}}function fm(e,t,i,a){const[o,l]=Q1(a.increment,e,t,a.rx,a.ry,1,a.increment*pd(.1,pd(.4,1,i),i),i);let c=gd(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=Q1(a.increment,e,t,a.rx,a.ry,1.5,0,i),d=gd(h,null,i);c=c.concat(d)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function G1(e,t,i,a,o,l,c,h,d){const f=e,p=t;let g=Math.abs(i/2),x=Math.abs(a/2);g+=Pt(.01*g,d),x+=Pt(.01*x,d);let y=o,C=l;for(;y<0;)y+=2*Math.PI,C+=2*Math.PI;C-y>2*Math.PI&&(y=0,C=2*Math.PI);const k=2*Math.PI/d.curveStepCount,v=Math.min(k/2,(C-y)/2),w=Z1(v,f,p,g,x,y,C,1,d);if(!d.disableMultiStroke){const B=Z1(v,f,p,g,x,y,C,1.5,d);w.push(...B)}return c&&(h?w.push(...Sn(f,p,f+g*Math.cos(y),p+x*Math.sin(y),d),...Sn(f,p,f+g*Math.cos(C),p+x*Math.sin(C),d)):w.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(y),p+x*Math.sin(y)]})),{type:"path",ops:w}}function V1(e,t){const i=Mw(Aw(_y(e))),a=[];let o=[0,0],l=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":l=[h[0],h[1]],o=[h[0],h[1]];break;case"L":a.push(...Sn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[d,f,p,g,x,y]=h;a.push(...v4(d,f,p,g,x,y,l,t)),l=[x,y];break}case"Z":a.push(...Sn(l[0],l[1],o[0],o[1],t)),l=[o[0],o[1]]}return{type:"path",ops:a}}function xg(e,t){const i=[];for(const a of e)if(a.length){const o=t.maxRandomnessOffset||0,l=a.length;if(l>2){i.push({op:"move",data:[a[0][0]+Pt(o,t),a[0][1]+Pt(o,t)]});for(let c=1;c<l;c++)i.push({op:"lineTo",data:[a[c][0]+Pt(o,t),a[c][1]+Pt(o,t)]})}}return{type:"fillPath",ops:i}}function ms(e,t){return(function(i,a){let o=i.fillStyle||"hachure";if(!Ir[o])switch(o){case"zigzag":Ir[o]||(Ir[o]=new d4(a));break;case"cross-hatch":Ir[o]||(Ir[o]=new f4(a));break;case"dots":Ir[o]||(Ir[o]=new p4(a));break;case"dashed":Ir[o]||(Ir[o]=new g4(a));break;case"zigzag-line":Ir[o]||(Ir[o]=new m4(a));break;default:o="hachure",Ir[o]||(Ir[o]=new Ty(a))}return Ir[o]})(t,b4).fillPolygons(e,t)}function X1(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ow(e){return e.randomizer||(e.randomizer=new y4(e.seed||0)),e.randomizer.next()}function pd(e,t,i,a=1){return i.roughness*a*(Ow(i)*(t-e)+e)}function Pt(e,t,i=1){return pd(-e,e,t,i)}function Sn(e,t,i,a,o,l=!1){const c=l?o.disableMultiStrokeFill:o.disableMultiStroke,h=pm(e,t,i,a,o,!0,!1);if(c)return h;const d=pm(e,t,i,a,o,!0,!0);return h.concat(d)}function pm(e,t,i,a,o,l,c){const h=Math.pow(e-i,2)+Math.pow(t-a,2),d=Math.sqrt(h);let f=1;f=d<200?1:d>500?.4:-.0016668*d+1.233334;let p=o.maxRandomnessOffset||0;p*p*100>h&&(p=d/10);const g=p/2,x=.2+.2*Ow(o);let y=o.bowing*o.maxRandomnessOffset*(a-t)/200,C=o.bowing*o.maxRandomnessOffset*(e-i)/200;y=Pt(y,o,f),C=Pt(C,o,f);const k=[],v=()=>Pt(g,o,f),w=()=>Pt(p,o,f),B=o.preserveVertices;return c?k.push({op:"move",data:[e+(B?0:v()),t+(B?0:v())]}):k.push({op:"move",data:[e+(B?0:Pt(p,o,f)),t+(B?0:Pt(p,o,f))]}),c?k.push({op:"bcurveTo",data:[y+e+(i-e)*x+v(),C+t+(a-t)*x+v(),y+e+2*(i-e)*x+v(),C+t+2*(a-t)*x+v(),i+(B?0:v()),a+(B?0:v())]}):k.push({op:"bcurveTo",data:[y+e+(i-e)*x+w(),C+t+(a-t)*x+w(),y+e+2*(i-e)*x+w(),C+t+2*(a-t)*x+w(),i+(B?0:w()),a+(B?0:w())]}),k}function vu(e,t,i){if(!e.length)return[];const a=[];a.push([e[0][0]+Pt(t,i),e[0][1]+Pt(t,i)]),a.push([e[0][0]+Pt(t,i),e[0][1]+Pt(t,i)]);for(let o=1;o<e.length;o++)a.push([e[o][0]+Pt(t,i),e[o][1]+Pt(t,i)]),o===e.length-1&&a.push([e[o][0]+Pt(t,i),e[o][1]+Pt(t,i)]);return gd(a,null,i)}function gd(e,t,i){const a=e.length,o=[];if(a>3){const l=[],c=1-i.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const d=e[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*e[h+1][0]-c*e[h-1][0])/6,d[1]+(c*e[h+1][1]-c*e[h-1][1])/6],l[2]=[e[h+1][0]+(c*e[h][0]-c*e[h+2][0])/6,e[h+1][1]+(c*e[h][1]-c*e[h+2][1])/6],l[3]=[e[h+1][0],e[h+1][1]],o.push({op:"bcurveTo",data:[l[1][0],l[1][1],l[2][0],l[2][1],l[3][0],l[3][1]]})}}else a===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):a===2&&o.push(...pm(e[0][0],e[0][1],e[1][0],e[1][1],i,!0,!0));return o}function Q1(e,t,i,a,o,l,c,h){const d=[],f=[];if(h.roughness===0){e/=4,f.push([t+a*Math.cos(-e),i+o*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),i+o*Math.sin(p)];d.push(g),f.push(g)}f.push([t+a*Math.cos(0),i+o*Math.sin(0)]),f.push([t+a*Math.cos(e),i+o*Math.sin(e)])}else{const p=Pt(.5,h)-Math.PI/2;f.push([Pt(l,h)+t+.9*a*Math.cos(p-e),Pt(l,h)+i+.9*o*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const y=[Pt(l,h)+t+a*Math.cos(x),Pt(l,h)+i+o*Math.sin(x)];d.push(y),f.push(y)}f.push([Pt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),Pt(l,h)+i+o*Math.sin(p+2*Math.PI+.5*c)]),f.push([Pt(l,h)+t+.98*a*Math.cos(p+c),Pt(l,h)+i+.98*o*Math.sin(p+c)]),f.push([Pt(l,h)+t+.9*a*Math.cos(p+.5*c),Pt(l,h)+i+.9*o*Math.sin(p+.5*c)])}return[f,d]}function Z1(e,t,i,a,o,l,c,h,d){const f=l+Pt(.1,d),p=[];p.push([Pt(h,d)+t+.9*a*Math.cos(f-e),Pt(h,d)+i+.9*o*Math.sin(f-e)]);for(let g=f;g<=c;g+=e)p.push([Pt(h,d)+t+a*Math.cos(g),Pt(h,d)+i+o*Math.sin(g)]);return p.push([t+a*Math.cos(c),i+o*Math.sin(c)]),p.push([t+a*Math.cos(c),i+o*Math.sin(c)]),gd(p,null,d)}function v4(e,t,i,a,o,l,c,h){const d=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Pt(f[0],h)),c[1]+(x?0:Pt(f[0],h))]}),p=x?[o,l]:[o+Pt(f[y],h),l+Pt(f[y],h)],d.push({op:"bcurveTo",data:[e+Pt(f[y],h),t+Pt(f[y],h),i+Pt(f[y],h),a+Pt(f[y],h),p[0],p[1]]});return d}function sc(e){return[...e]}function K1(e,t=0){const i=e.length;if(i<3)throw new Error("A curve must have at least three points.");const a=[];if(i===3)a.push(sc(e[0]),sc(e[1]),sc(e[2]),sc(e[2]));else{const o=[];o.push(e[0],e[0]);for(let h=1;h<e.length;h++)o.push(e[h]),h===e.length-1&&o.push(e[h]);const l=[],c=1-t;a.push(sc(o[0]));for(let h=1;h+2<o.length;h++){const d=o[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*o[h+1][0]-c*o[h-1][0])/6,d[1]+(c*o[h+1][1]-c*o[h-1][1])/6],l[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],l[3]=[o[h+1][0],o[h+1][1]],a.push(l[1],l[2],l[3])}}return a}function Iu(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function k4(e,t,i){const a=Iu(t,i);if(a===0)return Iu(e,t);let o=((e[0]-t[0])*(i[0]-t[0])+(e[1]-t[1])*(i[1]-t[1]))/a;return o=Math.max(0,Math.min(1,o)),Iu(e,io(t,i,o))}function io(e,t,i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i]}function gm(e,t,i,a){const o=a||[];if((function(h,d){const f=h[d+0],p=h[d+1],g=h[d+2],x=h[d+3];let y=3*p[0]-2*f[0]-x[0];y*=y;let C=3*p[1]-2*f[1]-x[1];C*=C;let k=3*g[0]-2*x[0]-f[0];k*=k;let v=3*g[1]-2*x[1]-f[1];return v*=v,y<k&&(y=k),C<v&&(C=v),y+C})(e,t)<i){const h=e[t+0];o.length?(l=o[o.length-1],c=h,Math.sqrt(Iu(l,c))>1&&o.push(h)):o.push(h),o.push(e[t+3])}else{const d=e[t+0],f=e[t+1],p=e[t+2],g=e[t+3],x=io(d,f,.5),y=io(f,p,.5),C=io(p,g,.5),k=io(x,y,.5),v=io(y,C,.5),w=io(k,v,.5);gm([d,x,k,w],0,i,o),gm([w,v,C,g],0,i,o)}var l,c;return o}function S4(e,t){return md(e,0,e.length,t)}function md(e,t,i,a,o){const l=o||[],c=e[t],h=e[i-1];let d=0,f=1;for(let p=t+1;p<i-1;++p){const g=k4(e[p],c,h);g>d&&(d=g,f=p)}return Math.sqrt(d)>a?(md(e,t,f+1,a,l),md(e,f,i,a,l)):(l.length||l.push(c),l.push(h)),l}function bg(e,t=.15,i){const a=[],o=(e.length-1)/3;for(let l=0;l<o;l++)gm(e,3*l,t,a);return i&&i>0?md(a,0,a.length,i):a}const ri="none";let yd=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,i,a){return{shape:t,sets:i||[],options:a||this.defaultOptions}}line(t,i,a,o,l){const c=this._o(l);return this._d("line",[Dw(t,i,a,o,c)],c)}rectangle(t,i,a,o,l){const c=this._o(l),h=[],d=C4(t,i,a,o,c);if(c.fill){const f=[[t,i],[t+a,i],[t+a,i+o],[t,i+o]];c.fillStyle==="solid"?h.push(xg([f],c)):h.push(ms([f],c))}return c.stroke!==ri&&h.push(d),this._d("rectangle",h,c)}ellipse(t,i,a,o,l){const c=this._o(l),h=[],d=Rw(a,o,c),f=fm(t,i,c,d);if(c.fill)if(c.fillStyle==="solid"){const p=fm(t,i,c,d).opset;p.type="fillPath",h.push(p)}else h.push(ms([f.estimatedPoints],c));return c.stroke!==ri&&h.push(f.opset),this._d("ellipse",h,c)}circle(t,i,a,o){const l=this.ellipse(t,i,a,a,o);return l.shape="circle",l}linearPath(t,i){const a=this._o(i);return this._d("linearPath",[qu(t,!1,a)],a)}arc(t,i,a,o,l,c,h=!1,d){const f=this._o(d),p=[],g=G1(t,i,a,o,l,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const y=G1(t,i,a,o,l,c,!0,!1,x);y.type="fillPath",p.push(y)}else p.push((function(x,y,C,k,v,w,B){const L=x,F=y;let D=Math.abs(C/2),z=Math.abs(k/2);D+=Pt(.01*D,B),z+=Pt(.01*z,B);let N=v,P=w;for(;N<0;)N+=2*Math.PI,P+=2*Math.PI;P-N>2*Math.PI&&(N=0,P=2*Math.PI);const at=(P-N)/B.curveStepCount,K=[];for(let Y=N;Y<=P;Y+=at)K.push([L+D*Math.cos(Y),F+z*Math.sin(Y)]);return K.push([L+D*Math.cos(P),F+z*Math.sin(P)]),K.push([L,F]),ms([K],B)})(t,i,a,o,l,c,f));return f.stroke!==ri&&p.push(g),this._d("arc",p,f)}curve(t,i){const a=this._o(i),o=[],l=Y1(t,a);if(a.fill&&a.fill!==ri)if(a.fillStyle==="solid"){const c=Y1(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=t;if(h.length){const d=typeof h[0][0]=="number"?[h]:h;for(const f of d)f.length<3?c.push(...f):f.length===3?c.push(...bg(K1([f[0],f[0],f[1],f[2]]),10,(1+a.roughness)/2)):c.push(...bg(K1(f),10,(1+a.roughness)/2))}c.length&&o.push(ms([c],a))}return a.stroke!==ri&&o.push(l),this._d("curve",o,a)}polygon(t,i){const a=this._o(i),o=[],l=qu(t,!0,a);return a.fill&&(a.fillStyle==="solid"?o.push(xg([t],a)):o.push(ms([t],a))),a.stroke!==ri&&o.push(l),this._d("polygon",o,a)}path(t,i){const a=this._o(i),o=[];if(!t)return this._d("path",o,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const l=a.fill&&a.fill!=="transparent"&&a.fill!==ri,c=a.stroke!==ri,h=!!(a.simplification&&a.simplification<1),d=(function(p,g,x){const y=Mw(Aw(_y(p))),C=[];let k=[],v=[0,0],w=[];const B=()=>{w.length>=4&&k.push(...bg(w,g)),w=[]},L=()=>{B(),k.length&&(C.push(k),k=[])};for(const{key:D,data:z}of y)switch(D){case"M":L(),v=[z[0],z[1]],k.push(v);break;case"L":B(),k.push([z[0],z[1]]);break;case"C":if(!w.length){const N=k.length?k[k.length-1]:v;w.push([N[0],N[1]])}w.push([z[0],z[1]]),w.push([z[2],z[3]]),w.push([z[4],z[5]]);break;case"Z":B(),k.push([v[0],v[1]])}if(L(),!x)return C;const F=[];for(const D of C){const z=S4(D,x);z.length&&F.push(z)}return F})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),f=V1(t,a);if(l)if(a.fillStyle==="solid")if(d.length===1){const p=V1(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else o.push(xg(d,a));else o.push(ms(d,a));return c&&(h?d.forEach((p=>{o.push(qu(p,!1,a))})):o.push(f)),this._d("path",o,a)}opsToPath(t,i){let a="";for(const o of t.ops){const l=typeof i=="number"&&i>=0?o.data.map((c=>+c.toFixed(i))):o.data;switch(o.op){case"move":a+=`M${l[0]} ${l[1]} `;break;case"bcurveTo":a+=`C${l[0]} ${l[1]}, ${l[2]} ${l[3]}, ${l[4]} ${l[5]} `;break;case"lineTo":a+=`L${l[0]} ${l[1]} `}}return a.trim()}toPaths(t){const i=t.sets||[],a=t.options||this.defaultOptions,o=[];for(const l of i){let c=null;switch(l.type){case"path":c={d:this.opsToPath(l),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:ri};break;case"fillPath":c={d:this.opsToPath(l),stroke:ri,strokeWidth:0,fill:a.fill||ri};break;case"fillSketch":c=this.fillSketch(l,a)}c&&o.push(c)}return o}fillSketch(t,i){let a=i.fillWeight;return a<0&&(a=i.strokeWidth/2),{d:this.opsToPath(t),stroke:i.fill||ri,strokeWidth:a,fill:ri}}_mergedShape(t){return t.filter(((i,a)=>a===0||i.op!=="move"))}},w4=class{constructor(t,i){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new yd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),o=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":o.save(),o.strokeStyle=a.stroke==="none"?"transparent":a.stroke,o.lineWidth=a.strokeWidth,a.strokeLineDash&&o.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(o.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(o,c,l),o.restore();break;case"fillPath":{o.save(),o.fillStyle=a.fill||"";const h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,c,l,h),o.restore();break}case"fillSketch":this.fillSketch(o,c,a)}}fillSketch(t,i,a){let o=a.fillWeight;o<0&&(o=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=o,this._drawToContext(t,i,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,i,a,o="nonzero"){t.beginPath();for(const l of i.ops){const c=typeof a=="number"&&a>=0?l.data.map((h=>+h.toFixed(a))):l.data;switch(l.op){case"move":t.moveTo(c[0],c[1]);break;case"bcurveTo":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":t.lineTo(c[0],c[1])}}i.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,i,a,o,l){const c=this.gen.line(t,i,a,o,l);return this.draw(c),c}rectangle(t,i,a,o,l){const c=this.gen.rectangle(t,i,a,o,l);return this.draw(c),c}ellipse(t,i,a,o,l){const c=this.gen.ellipse(t,i,a,o,l);return this.draw(c),c}circle(t,i,a,o){const l=this.gen.circle(t,i,a,o);return this.draw(l),l}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a),a}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a),a}arc(t,i,a,o,l,c,h=!1,d){const f=this.gen.arc(t,i,a,o,l,c,h,d);return this.draw(f),f}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a),a}path(t,i){const a=this.gen.path(t,i);return this.draw(a),a}};const ku="http://www.w3.org/2000/svg";class T4{constructor(t,i){this.svg=t,this.gen=new yd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,l=o.createElementNS(ku,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of i){let d=null;switch(h.type){case"path":d=o.createElementNS(ku,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke",a.stroke),d.setAttribute("stroke-width",a.strokeWidth+""),d.setAttribute("fill","none"),a.strokeLineDash&&d.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&d.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":d=o.createElementNS(ku,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke","none"),d.setAttribute("stroke-width","0"),d.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||d.setAttribute("fill-rule","evenodd");break;case"fillSketch":d=this.fillSketch(o,h,a)}d&&l.appendChild(d)}return l}fillSketch(t,i,a){let o=a.fillWeight;o<0&&(o=a.strokeWidth/2);const l=t.createElementNS(ku,"path");return l.setAttribute("d",this.opsToPath(i,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",o+""),l.setAttribute("fill","none"),a.fillLineDash&&l.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),l}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,i){return this.gen.opsToPath(t,i)}line(t,i,a,o,l){const c=this.gen.line(t,i,a,o,l);return this.draw(c)}rectangle(t,i,a,o,l){const c=this.gen.rectangle(t,i,a,o,l);return this.draw(c)}ellipse(t,i,a,o,l){const c=this.gen.ellipse(t,i,a,o,l);return this.draw(c)}circle(t,i,a,o){const l=this.gen.circle(t,i,a,o);return this.draw(l)}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a)}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a)}arc(t,i,a,o,l,c,h=!1,d){const f=this.gen.arc(t,i,a,o,l,c,h,d);return this.draw(f)}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a)}path(t,i){const a=this.gen.path(t,i);return this.draw(a)}}var Lt={canvas:(e,t)=>new w4(e,t),svg:(e,t)=>new T4(e,t),generator:e=>new yd(e),newSeed:()=>yd.newSeed()},Ht=S(async(e,t,i)=>{var y,C;let a;const o=t.useHtmlLabels||ea((y=ce())==null?void 0:y.htmlLabels);i?a=i:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",rr(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const d=!!t.icon||!!t.img,f=t.labelType==="markdown",p=await ia(c,Mi(mo(h),ce()),{useHtmlLabels:o,width:t.width||((C=ce().flowchart)==null?void 0:C.wrappingWidth),classes:f?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:d,markdown:f},ce());let g=p.getBBox();const x=((t==null?void 0:t.padding)??0)/2;if(o){const k=p.children[0],v=Zt(p);await rw(k,h),g=k.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}return o?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:g,halfPadding:x,label:c}},"labelHelper"),Cg=S(async(e,t,i)=>{var d,f;const a=i.useHtmlLabels??Lr(ce()),o=e.insert("g").attr("class","label").attr("style",i.labelStyle||""),l=await ia(o,Mi(mo(t),ce()),{useHtmlLabels:a,width:i.width||((f=(d=ce())==null?void 0:d.flowchart)==null?void 0:f.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=l.getBBox();const h=i.padding/2;if(Lr(ce())){const p=l.children[0],g=Zt(l);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:h,label:o}},"insertLabel"),Rt=S((e,t)=>{const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),qt=S((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ne(e){const t=e.map((i,a)=>`${a===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}S(ne,"createPathFromPoints");function wn(e,t,i,a,o,l){const c=[],d=i-e,f=a-t,p=d/l,g=2*Math.PI/p,x=t+f/2;for(let y=0;y<=50;y++){const C=y/50,k=e+C*d,v=x+o*Math.sin(g*(k-e));c.push({x:k,y:v})}return c}S(wn,"generateFullSineWavePoints");function $c(e,t,i,a,o,l){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S($c,"generateCirclePoints");function mm(e){const t=Array.from(e.childNodes).filter(d=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(d=>d.getAttribute("d")).filter(d=>d!==null).join(" ");i.setAttribute("d",a);const o=t.find(d=>d.getAttribute("fill")!=="none"),l=t.find(d=>d.getAttribute("stroke")!=="none"),c=S((d,f)=>(d==null?void 0:d.getAttribute(f))??void 0,"getAttr");if(o){const d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}if(l){const d={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}S(mm,"mergePaths");var _4=S((e,t)=>{var i=e.x,a=e.y,o=t.x-i,l=t.y-a,c=e.width/2,h=e.height/2,d,f;return Math.abs(l)*c>Math.abs(o)*h?(l<0&&(h=-h),d=l===0?0:h*o/l,f=h):(o<0&&(c=-c),d=c,f=o===0?0:c*l/o),{x:i+d,y:a+f}},"intersectRect"),vo=_4,B4=S(async(e,t,i,a=!1,o=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=ce(),h=Lr(c);return await ia(e,l,{style:i,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),yn=B4,_n=S((e,t,i,a,o)=>["M",e+o,t,"H",e+i-o,"A",o,o,0,0,1,e+i,t+o,"V",t+a-o,"A",o,o,0,0,1,e+i-o,t+a,"H",e+o,"A",o,o,0,0,1,e,t+a-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),E4=S(async(e,t)=>{const i=ce(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,h=c,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=Mt(t),x=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),y=ea(i.flowchart.htmlLabels),C=t.direction==="LR",k=x.insert("g").attr("class","cluster-label swimlane-label"),v=await ia(k,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let w=v.getBBox();if(y){const X=v.children[0],q=Zt(v);w=X.getBoundingClientRect(),q.attr("width",w.width),q.attr("height",w.height)}const B=t.padding??0,L=t.width<=w.width+B?w.width+B:t.width;t.width<=w.width+B?t.diff=(L-t.width)/2-B:t.diff=-B;const F=t.height,D=t.y-F/2,z=t.y+F/2,N=t.x-L/2,P=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:D+F/3,at=C?4:0,K=w.height+2*at;let Y,W;if(C){const X=Math.max(K,w.height+2*at),q=N+X,H=Math.max(0,L-X);if(t.look==="handDrawn"){const I=Lt.svg(x),Q=Et(t,{roughness:.7,fill:l,stroke:h,fillWeight:3,seed:o}),lt=Et(t,{roughness:.7,fill:"none",stroke:h,seed:o}),R=I.rectangle(N,D,X,F,Q);Y=x.insert(()=>R,":first-child");const G=I.rectangle(q,D,H,F,lt);W=x.insert(()=>G,":first-child"),Y.select("path:nth-child(2)").attr("style",p.join(";")),Y.select("path").attr("style",g.join(";").replace("fill","stroke"))}else Y=x.insert("rect",":first-child"),W=x.insert("rect",":first-child"),Y.attr("class","swimlane-title").attr("style",f).attr("x",N).attr("y",D).attr("width",X).attr("height",F).attr("fill",l).attr("stroke",h),W.attr("class","swimlane-body").attr("style",f).attr("x",q).attr("y",D).attr("width",H).attr("height",F).attr("fill","none").attr("stroke",h);const A=N+X/2,$=t.y;k.attr("transform",`translate(${A}, ${$}) rotate(-90) translate(${-w.width/2}, ${-w.height/2})`)}else{const X=Math.max(0,P-D),q=Math.min(K,X),H=D+q,A=Math.max(0,z-H),$=t.x-L/2;if(t.look==="handDrawn"){const lt=Lt.svg(x),R=Et(t,{roughness:.7,fill:l,stroke:h,fillWeight:3,seed:o}),G=Et(t,{roughness:.7,fill:"none",stroke:h,seed:o}),ct=lt.rectangle($,D,L,q,R);Y=x.insert(()=>ct,":first-child");const ut=lt.rectangle($,H,L,A,G);W=x.insert(()=>ut,":first-child"),Y.select("path:nth-child(2)").attr("style",p.join(";")),Y.select("path").attr("style",g.join(";").replace("fill","stroke"))}else Y=x.insert("rect",":first-child"),W=x.insert("rect",":first-child"),Y.attr("class","swimlane-title").attr("style",f).attr("x",$).attr("y",D).attr("width",L).attr("height",q).attr("fill",l).attr("stroke",h),W.attr("class","swimlane-body").attr("style",f).attr("x",$).attr("y",H).attr("width",L).attr("height",A).attr("fill","none").attr("stroke",h);const I=t.x-w.width/2,Q=D+(q-w.height)/2;k.attr("transform",`translate(${I}, ${Q})`)}if(gt.trace("Swimlane data ",t,JSON.stringify(t)),d){const X=k.select("span");X&&X.attr("style",d)}return t.offsetX=0,t.width=L,t.height=F,t.offsetY=w.height-B/2,t.intersect=function(X){return vo(t,X)},{cluster:x,labelBBox:w}},"swimlane"),zw=S(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const i=ce(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=Mt(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Lr(i),y=g.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await ia(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):C=await yn(y,t.label,t.labelStyle||"",!1,!0);let k=C.getBBox();if(Lr(i)){const N=C.children[0],P=Zt(C);k=N.getBoundingClientRect(),P.attr("width",k.width),P.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const w=t.height,B=t.x-v/2,L=t.y-w/2;gt.trace("Data ",t,JSON.stringify(t));let F;if(t.look==="handDrawn"){const N=Lt.svg(g),P=Et(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:o}),at=N.path(_n(B,L,v,w,0),P);F=g.insert(()=>(gt.debug("Rough node insert CXC",at),at),":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";")),F.select("path").attr("style",p.join(";").replace("fill","stroke"))}else F=g.insert("rect",":first-child"),F.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",B).attr("y",L).attr("width",v).attr("height",w);const{subGraphTitleTopMargin:D}=py(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+D})`),h){const N=y.select("span");N&&N.attr("style",h)}const z=F.node().getBBox();return t.offsetX=0,t.width=z.width,t.height=z.height,t.offsetY=k.height-t.padding/2,t.intersect=function(N){return vo(t,N)},{cluster:g,labelBBox:k}},"rect"),L4=S((e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=i.insert("rect",":first-child"),o=0*t.padding,l=o/2;a.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-l).attr("y",t.y-t.height/2-l).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const c=a.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(h){return vo(t,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),A4=S(async(e,t)=>{const i=ce(),{themeVariables:a,handDrawnSeed:o}=i,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:d}=a,f=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let x=f.append("rect");const y=await yn(g,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(Lr(i)){const at=y.children[0],K=Zt(y);C=at.getBoundingClientRect(),K.attr("width",C.width),K.attr("height",C.height)}const k=0*t.padding,v=k/2,w=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+k;t.width<=C.width+t.padding?t.diff=(w-t.width)/2-t.padding:t.diff=-t.padding;const B=t.height+k,L=t.height+k-C.height-6,F=t.x-w/2,D=t.y-B/2;t.width=w;const z=t.y-t.height/2-v+C.height+2;let N;if(t.look==="handDrawn"){const at=t.cssClasses.includes("statediagram-cluster-alt"),K=Lt.svg(f),Y=t.rx||t.ry?K.path(_n(F,D,w,B,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:d,seed:o}):K.rectangle(F,D,w,B,{seed:o});N=f.insert(()=>Y,":first-child");const W=K.rectangle(F,z,w,L,{fill:at?l:c,fillStyle:at?"hachure":"solid",stroke:d,seed:o});N=f.insert(()=>Y,":first-child"),x=f.insert(()=>W)}else N=p.insert("rect",":first-child"),N.attr("class","outer").attr("x",F).attr("y",D).attr("width",w).attr("height",B).attr("data-look",t.look),x.attr("class","inner").attr("x",F).attr("y",z).attr("width",w).attr("height",L);g.attr("transform",`translate(${t.x-C.width/2}, ${D+1-(Lr(i)?0:3)})`);const P=N.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(at){return vo(t,at)},{cluster:f,labelBBox:C}},"roundedWithTitle"),M4=S(async(e,t)=>{gt.info("Creating subgraph rect for ",t.id,t);const i=ce(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=Mt(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Lr(i),y=g.insert("g").attr("class","cluster-label "),C=await ia(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let k=C.getBBox();if(Lr(i)){const N=C.children[0],P=Zt(C);k=N.getBoundingClientRect(),P.attr("width",k.width),P.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const w=t.height,B=t.x-v/2,L=t.y-w/2;gt.trace("Data ",t,JSON.stringify(t));let F;if(t.look==="handDrawn"){const N=Lt.svg(g),P=Et(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:o}),at=N.path(_n(B,L,v,w,t.rx),P);F=g.insert(()=>(gt.debug("Rough node insert CXC",at),at),":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";")),F.select("path").attr("style",p.join(";").replace("fill","stroke"))}else F=g.insert("rect",":first-child"),F.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",B).attr("y",L).attr("width",v).attr("height",w);const{subGraphTitleTopMargin:D}=py(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+D})`),h){const N=y.select("span");N&&N.attr("style",h)}const z=F.node().getBBox();return t.offsetX=0,t.width=z.width,t.height=z.height,t.offsetY=k.height-t.padding/2,t.intersect=function(N){return vo(t,N)},{cluster:g,labelBBox:k}},"kanbanSection"),F4=S((e,t)=>{const i=ce(),{themeVariables:a,handDrawnSeed:o}=i,{nodeBorder:l}=a,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),h=c.insert("g",":first-child"),d=0*t.padding,f=t.width+d;t.diff=-t.padding;const p=t.height+d,g=t.x-f/2,x=t.y-p/2;t.width=f;let y;if(t.look==="handDrawn"){const v=Lt.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:o});y=c.insert(()=>v,":first-child")}else{y=h.insert("rect",":first-child");let k="outer";t.look,k="divider",y.attr("class",k).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",t.look)}const C=y.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(k){return vo(t,k)},{cluster:c,labelBBox:{}}},"divider"),D4=zw,R4={rect:zw,squareRect:D4,roundedWithTitle:A4,noteGroup:L4,divider:F4,kanbanSection:M4,swimlane:E4},$w=new Map,O4=S(async(e,t)=>{const i=t.shape||"rect",a=await R4[i](e,t);return $w.set(t.id,a),a},"insertCluster"),y7=S(()=>{$w=new Map},"clear");function Nw(e,t){return e.intersect(t)}S(Nw,"intersectNode");var z4=Nw;function qw(e,t,i,a){var o=e.x,l=e.y,c=o-a.x,h=l-a.y,d=Math.sqrt(t*t*h*h+i*i*c*c),f=Math.abs(t*i*c/d);a.x<o&&(f=-f);var p=Math.abs(t*i*h/d);return a.y<l&&(p=-p),{x:o+f,y:l+p}}S(qw,"intersectEllipse");var Iw=qw;function jw(e,t,i){return Iw(e,t,t,i)}S(jw,"intersectCircle");var $4=jw;function Hw(e,t,i,a){{const o=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=o*i.x+l*i.y+c,d=o*a.x+l*a.y+c,f=1e-6;if(h!==0&&d!==0&&ym(h,d))return;const p=a.y-i.y,g=i.x-a.x,x=a.x*i.y-i.x*a.y,y=p*e.x+g*e.y+x,C=p*t.x+g*t.y+x;if(Math.abs(y)<f&&Math.abs(C)<f&&ym(y,C))return;const k=o*g-p*l;if(k===0)return;const v=Math.abs(k/2);let w=l*x-g*c;const B=w<0?(w-v)/k:(w+v)/k;w=p*c-o*x;const L=w<0?(w-v)/k:(w+v)/k;return{x:B,y:L}}}S(Hw,"intersectLine");function ym(e,t){return e*t>0}S(ym,"sameSign");var N4=Hw;function Pw(e,t,i){let a=e.x,o=e.y,l=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,t.x),h=Math.min(h,t.y));let d=a-e.width/2-c,f=o-e.height/2-h;for(let p=0;p<t.length;p++){let g=t[p],x=t[p<t.length-1?p+1:0],y=N4(e,i,{x:d+g.x,y:f+g.y},{x:d+x.x,y:f+x.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-i.x,y=p.y-i.y,C=Math.sqrt(x*x+y*y),k=g.x-i.x,v=g.y-i.y,w=Math.sqrt(k*k+v*v);return C<w?-1:C===w?0:1}),l[0]):e}S(Pw,"intersectPolygon");var q4=Pw,Bt={node:z4,circle:$4,ellipse:Iw,polygon:q4,rect:vo};function Ww(e,t){const{labelStyles:i}=Mt(t);t.labelStyle=i;const a=qt(t);let o=a;a||(o="anchor");const l=e.insert("g").attr("class",o).attr("id",t.domId||t.id),c=1,{cssStyles:h}=t,d=Lt.svg(l),f=Et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const p=d.circle(0,0,c*2,f),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",rr(h)),Rt(t,g),t.intersect=function(x){return gt.info("Circle intersect",t,c,x),Bt.circle(t,c,x)},l}S(Ww,"anchor");function xm(e,t,i,a,o,l,c){const d=(e+i)/2,f=(t+a)/2,p=Math.atan2(a-t,i-e),g=(i-e)/2,x=(a-t)/2,y=g/o,C=x/l,k=Math.sqrt(y**2+C**2);if(k>1)throw new Error("The given radii are too small to create an arc between the points.");const v=Math.sqrt(1-k**2),w=d+v*l*Math.sin(p)*(c?-1:1),B=f-v*o*Math.cos(p)*(c?-1:1),L=Math.atan2((t-B)/l,(e-w)/o);let D=Math.atan2((a-B)/l,(i-w)/o)-L;c&&D<0&&(D+=2*Math.PI),!c&&D>0&&(D-=2*Math.PI);const z=[];for(let N=0;N<20;N++){const P=N/19,at=L+P*D,K=w+o*Math.cos(at),Y=B+l*Math.sin(at);z.push({x:K,y:Y})}return z}S(xm,"generateArcPoints");function Uw(e,t,i){const[a,o]=[t,i].sort((l,c)=>c-l);return o*(1-Math.sqrt(1-(e/a/2)**2))}S(Uw,"calculateArcSagitta");async function Yw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=S(at=>at+c,"calcTotalHeight"),d=S(at=>{const K=at/2;return[K/(2.5+at/50),K]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await Ht(e,t,qt(t)),g=h(t!=null&&t.height?t==null?void 0:t.height:p.height),[x,y]=d(g),C=Uw(g,x,y),v=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2+C-C,w=g,{cssStyles:B}=t,L=[{x:v/2,y:-w/2},{x:-v/2,y:-w/2},...xm(-v/2,-w/2,-v/2,w/2,x,y,!1),{x:v/2,y:w/2},...xm(v/2,w/2,v/2,-w/2,x,y,!0)],F=Lt.svg(f),D=Et(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const z=ne(L),N=F.path(z,D),P=f.insert(()=>N,":first-child");return P.attr("class","basic label-container outer-path"),B&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",B),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),P.attr("transform",`translate(${x/2}, 0)`),Rt(t,P),t.intersect=function(at){return Bt.polygon(t,L,at)},f}S(Yw,"bowTieRect");function Da(e,t,i,a){return e.insert("polygon",":first-child").attr("points",a.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}S(Da,"insertPolygonShape");var Su=12;async function Gw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?28:o,c=t.look==="neo"?24:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.width)??d.width)+(t.look==="neo"?l*2:l+Su),p=((t==null?void 0:t.height)??d.height)+(t.look==="neo"?c*2:c),g=0,x=f,y=-p,C=0,k=[{x:g+Su,y},{x,y},{x,y:C},{x:g,y:C},{x:g,y:y+Su},{x:g+Su,y}];let v;const{cssStyles:w}=t;if(t.look==="handDrawn"){const B=Lt.svg(h),L=Et(t,{}),F=ne(k),D=B.path(F,L);v=h.insert(()=>D,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),w&&v.attr("style",w)}else v=Da(h,f,p,k);return a&&v.attr("style",a),Rt(t,v),t.intersect=function(B){return Bt.polygon(t,k,B)},h}S(Gw,"card");function Vw(e,t){const{nodeStyles:i}=Mt(t);t.label="";const a=e.insert("g").attr("class",qt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,l=Math.max(28,t.width??0),c=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h=Lt.svg(a),d=Et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=ne(c),p=h.path(f,d),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(x){return Bt.polygon(t,c,x)},a}S(Vw,"choice");async function By(e,t,i){const{labelStyles:a,nodeStyles:o}=Mt(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await Ht(e,t,qt(t)),d=16,f=(i==null?void 0:i.padding)??h,p=t.look==="neo"?c.width/2+d*2:c.width/2+f;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=Lt.svg(l),C=Et(t,{}),k=y.circle(0,0,p*2,C);g=l.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",rr(x))}else g=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",p).attr("cx",0).attr("cy",0);return Rt(t,g),t.calcIntersect=function(y,C){const k=y.width/2;return Bt.circle(y,k,C)},t.intersect=function(y){return gt.info("Circle intersect",t,p,y),Bt.circle(t,p,y)},l}S(By,"circle");function Xw(e){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),a=e*2,o={x:a/2*t,y:a/2*i},l={x:-(a/2)*t,y:a/2*i},c={x:-(a/2)*t,y:-(a/2)*i},h={x:a/2*t,y:-(a/2)*i};return`M ${l.x},${l.y} L ${h.x},${h.y}
                   M ${o.x},${o.y} L ${c.x},${c.y}`}S(Xw,"createLine");function Qw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i,t.label="";const o=e.insert("g").attr("class",qt(t)).attr("id",t.domId??t.id),l=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,h=Lt.svg(o),d=Et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=h.circle(0,0,l*2,d),p=Xw(l),g=h.path(p,d),x=o.insert(()=>f,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),Rt(t,x),t.intersect=function(y){return gt.info("crossedCircle intersect",t,{radius:l,point:y}),Bt.circle(t,l,y)},o}S(Qw,"crossedCircle");function Ba(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S(Ba,"generateCirclePoints");async function Zw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Ht(e,t,qt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+h,p=l.height+d,g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...Ba(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...Ba(f/2+g*2,-g,g,20,-180,-270),...Ba(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...Ba(f/2,p/2,g,20,0,90)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...Ba(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...Ba(f/2+f*.1,-g,g,20,-180,-270),...Ba(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...Ba(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],k=Lt.svg(o),v=Et(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=ne(y).replace("Z",""),L=k.path(B,v),F=ne(C),D=k.path(F,{...v}),z=o.insert("g",":first-child");return z.insert(()=>D,":first-child").attr("stroke-opacity",0),z.insert(()=>L,":first-child"),z.attr("class","text"),x&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",a),z.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Rt(t,z),t.intersect=function(N){return Bt.polygon(t,C,N)},o}S(Zw,"curlyBraceLeft");function Ea(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:y,y:C})}return c}S(Ea,"generateCirclePoints");async function Kw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Ht(e,t,qt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...Ea(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...Ea(f/2+g*2,-g,g,20,-180,-270),...Ea(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...Ea(f/2,p/2,g,20,0,90)],C=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...Ea(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...Ea(f/2+g*2,-g,g,20,-180,-270),...Ea(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...Ea(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],k=Lt.svg(o),v=Et(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=ne(y).replace("Z",""),L=k.path(B,v),F=ne(C),D=k.path(F,{...v}),z=o.insert("g",":first-child");return z.insert(()=>D,":first-child").attr("stroke-opacity",0),z.insert(()=>L,":first-child"),z.attr("class","text"),x&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",a),z.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Rt(t,z),t.intersect=function(N){return Bt.polygon(t,C,N)},o}S(Kw,"curlyBraceRight");function ur(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S(ur,"generateCirclePoints");async function Jw(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Ht(e,t,qt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...ur(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...ur(f/2+g*2,-g,g,20,-180,-270),...ur(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...ur(f/2,p/2,g,20,0,90)],C=[...ur(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...ur(-f/2-g/2,-g,g,20,0,90),...ur(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...ur(-f/2+g+g/2,p/2,g,30,-180,-270)],k=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...ur(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...ur(f/2+g*2,-g,g,20,-180,-270),...ur(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...ur(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2-g-g/2,y:p/2+g},...ur(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...ur(-f/2-g/2,-g,g,20,0,90),...ur(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...ur(-f/2+g+g/2,p/2,g,30,-180,-270)],v=Lt.svg(o),w=Et(t,{fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=ne(y).replace("Z",""),F=v.path(L,w),z=ne(C).replace("Z",""),N=v.path(z,w),P=ne(k),at=v.path(P,{...w}),K=o.insert("g",":first-child");return K.insert(()=>at,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.insert(()=>N,":first-child"),K.attr("class","text"),x&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",a),K.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Rt(t,K),t.intersect=function(Y){return Bt.polygon(t,k,Y)},o}S(Jw,"curlyBraces");async function tT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=20,d=5,{shapeSvg:f,bbox:p}=await Ht(e,t,qt(t)),g=Math.max(h,(p.width+l*2)*1.25,(t==null?void 0:t.width)??0),x=Math.max(d,p.height+c*2,(t==null?void 0:t.height)??0),y=x/2,{cssStyles:C}=t,k=Lt.svg(f),v=Et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=g,B=x,L=w-y,F=B/4,D=[{x:L,y:0},{x:F,y:0},{x:0,y:B/2},{x:F,y:B},{x:L,y:B},...$c(-L,-B/2,y,50,270,90)],z=ne(D),N=k.path(z,v),P=f.insert(()=>N,":first-child");return P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",a),P.attr("transform",`translate(${-g/2}, ${-x/2})`),Rt(t,P),t.intersect=function(at){return Bt.polygon(t,D,at)},f}S(tT,"curvedTrapezoid");var I4=S((e,t,i,a,o,l)=>[`M${e},${t+l}`,`a${o},${l} 0,0,0 ${i},0`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),j4=S((e,t,i,a,o,l)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),H4=S((e,t,i,a,o,l)=>[`M${e-i/2},${-a/2}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),J1=8,tv=8;async function eT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?24:o,c=t.look==="neo"?24:o;if(t.width||t.height){const v=t.width??0;t.width=(t.width??0)-c,t.width<tv&&(t.width=tv);const B=v/2/(2.5+v/50);t.height=(t.height??0)-l-B*3,t.height<J1&&(t.height=J1)}const{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=(t.width?t.width:d.width)+c,g=p/2,x=g/(2.5+p/50),y=(t.height?t.height:d.height)+l+x;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const v=Lt.svg(h),w=j4(0,0,p,y,g,x),B=H4(0,x,p,y,g,x),L=Et(t,{}),F=v.path(w,L),D=v.path(B,Et(t,{fill:"none"}));C=h.insert(()=>D,":first-child"),C=h.insert(()=>F,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const v=I4(0,0,p,y,g,x);C=h.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",rr(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Rt(t,C),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(t.padding??0)/1.5-(d.y-(d.top??0))})`),t.intersect=function(v){const w=Bt.rect(t,v),B=w.x-(t.x??0);if(g!=0&&(Math.abs(B)<(t.width??0)/2||Math.abs(B)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-x)){let L=x*x*(1-B*B/(g*g));L>0&&(L=Math.sqrt(L)),L=x-L,v.y-(t.y??0)>0&&(L=-L),w.y+=L}return w},h}S(eT,"cylinder");async function Ks(e,t,i){const{labelStyles:a,nodeStyles:o}=Mt(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await Ht(e,t,qt(t)),h=Math.max(c.width+i.labelPaddingX*2,(t==null?void 0:t.width)||0),d=Math.max(c.height+i.labelPaddingY*2,(t==null?void 0:t.height)||0),f=-h/2,p=-d/2;let g,{rx:x,ry:y}=t;const{cssStyles:C}=t;if(i!=null&&i.rx&&i.ry&&(x=i.rx,y=i.ry),t.look==="handDrawn"){const k=Lt.svg(l),v=Et(t,{}),w=x||y?k.path(_n(f,p,h,d,x||0),v):k.rectangle(f,p,h,d,v);g=l.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",rr(C))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",o).attr("rx",rr(x)).attr("ry",rr(y)).attr("x",f).attr("y",p).attr("width",h).attr("height",d);return Rt(t,g),t.calcIntersect=function(k,v){return Bt.rect(k,v)},t.intersect=function(k){return Bt.rect(t,k)},l}S(Ks,"drawRect");async function rT(e,t){const{cssClasses:i,labelPaddingX:a,labelPaddingY:o,padding:l,width:c,height:h}=t,d={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:o??l??0},f=await Ks(e,t,d);if(t.look==="handDrawn"){const y=Lt.svg(f),C=Et(t,{}),k=f.select(".basic.label-container > path:nth-child(2)"),v=k.node();if(!v)return f;let w=null;if(v instanceof SVGGraphicsElement)w=v.getBBox();else return f;return f.insert(()=>y.line(w.x,w.y,w.x+w.width,w.y,C),".basic.label-container g.label"),f.insert(()=>y.line(w.x,w.y+w.height,w.x+w.width,w.y+w.height,C),".basic.label-container g.label"),k.remove(),f}const p=f.select(".basic.label-container"),g=(Number(p.attr("width"))||c)??0,x=(Number(p.attr("height"))||h)??0;return g>0&&x>0&&p.attr("stroke-dasharray",`${g} ${x}`),f}S(rT,"datastore");async function iT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=h.width+o,p=h.height+l,g=p*.2,x=-f/2,y=-p/2-g/2,{cssStyles:C}=t,k=Lt.svg(c),v=Et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],B=k.polygon(w.map(F=>[F.x,F.y]),v),L=c.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),d.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Rt(t,L),t.intersect=function(F){return Bt.rect(t,F)},c}S(iT,"dividedRectangle");async function aT(e,t){var y,C;const{labelStyles:i,nodeStyles:a}=Mt(t),o=t.look==="neo"?12:5;t.labelStyle=i;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=(t!=null&&t.width?(t==null?void 0:t.width)/2:d.width/2)+(c??0),p=f-o;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=Lt.svg(h),v=Et(t,{roughness:.2,strokeWidth:2.5}),w=Et(t,{roughness:.2,strokeWidth:1.5}),B=k.circle(0,0,f*2,v),L=k.circle(0,0,p*2,w);g=h.insert("g",":first-child"),g.attr("class",rr(t.cssClasses)).attr("style",rr(x)),(y=g.node())==null||y.appendChild(B),(C=g.node())==null||C.appendChild(L)}else{g=h.insert("g",":first-child");const k=g.insert("circle",":first-child"),v=g.insert("circle");g.attr("class","basic label-container").attr("style",a),k.attr("class","outer-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0),v.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Rt(t,g),t.intersect=function(k){return gt.info("DoubleCircle intersect",t,f,k),Bt.circle(t,f,k)},h}S(aT,"doublecircle");function nT(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:o}=Mt(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",qt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,d=Lt.svg(l),{nodeBorder:f}=i,p=Et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=d.circle(0,0,c*2,p),x=l.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),Rt(t,x),t.intersect=function(y){return gt.info("filledCircle intersect",t,{radius:c,point:y}),Bt.circle(t,c,y)},l}S(nT,"filledCircle");var ev=10,rv=10;async function oT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<ev&&(t.height=ev),t.width=((t==null?void 0:t.width)??0)-l-l/2,t.width<rv&&(t.width=rv));const{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(l??0),p=t!=null&&t.height?t==null?void 0:t.height:f+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:y}=t,C=Lt.svg(c),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ne(x),w=C.path(v,k),B=c.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),t.width=f,t.height=p,Rt(t,B),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(t.padding??0)/2+(h.y-(h.top??0))})`),t.intersect=function(L){return gt.info("Triangle intersect",t,x,L),Bt.polygon(t,x,L)},c}S(oT,"flippedTriangle");function sT(e,t,{dir:i,config:{state:a,themeVariables:o}}){const{nodeStyles:l}=Mt(t);t.label="";const c=e.insert("g").attr("class",qt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let d=Math.max(70,(t==null?void 0:t.width)??0),f=Math.max(10,(t==null?void 0:t.height)??0);i==="LR"&&(d=Math.max(10,(t==null?void 0:t.width)??0),f=Math.max(70,(t==null?void 0:t.height)??0));const p=-1*d/2,g=-1*f/2,x=Lt.svg(c),y=Et(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=x.rectangle(p,g,d,f,y),k=c.insert(()=>C,":first-child");h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),l&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",l),Rt(t,k);const v=(a==null?void 0:a.padding)??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(w){return Bt.rect(t,w)},c}S(sT,"forkJoin");async function lT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=15,l=10,c=t.look==="neo"?16:t.padding??0,h=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-h*2,t.height<l&&(t.height=l),t.width=((t==null?void 0:t.width)??0)-c*2,t.width<o&&(t.width=o));const{shapeSvg:d,bbox:f}=await Ht(e,t,qt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:Math.max(o,f.width))+c*2,g=(t!=null&&t.height?t==null?void 0:t.height:Math.max(l,f.height))+h*2,x=g/2,{cssStyles:y}=t,C=Lt.svg(d),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...$c(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],w=ne(v),B=C.path(w,k),L=d.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),Rt(t,L),t.intersect=function(F){return gt.info("Pill intersect",t,{radius:x,point:F}),Bt.polygon(t,v,F)},d}S(lT,"halfRoundedRectangle");var P4=S((e,t,i,a,o)=>[`M${e+o},${t}`,`L${e+i-o},${t}`,`L${e+i},${t-a/2}`,`L${e+i-o},${t-a}`,`L${e+o},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function cT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t),o=t.look==="neo"?3.5:4;t.labelStyle=i;const l=t.padding??0,c=70,h=32,d=t.look==="neo"?c:l,f=t.look==="neo"?h:l;if(t.width||t.height){const L=(t.height??0)/o;t.width=((t==null?void 0:t.width)??0)-2*L-f,t.height=(t.height??0)-d}const{shapeSvg:p,bbox:g}=await Ht(e,t,qt(t)),x=(t!=null&&t.height?t==null?void 0:t.height:g.height)+d,y=x/o,C=(t!=null&&t.width?t==null?void 0:t.width:g.width)+2*y+f,k=[{x:y,y:0},{x:C-y,y:0},{x:C,y:-x/2},{x:C-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let v;const{cssStyles:w}=t;if(t.look==="handDrawn"){const B=Lt.svg(p),L=Et(t,{}),F=P4(0,0,C,x,y),D=B.path(F,L);v=p.insert(()=>D,":first-child").attr("transform",`translate(${-C/2}, ${x/2})`),w&&v.attr("style",w)}else v=Da(p,C,x,k);return a&&v.attr("style",a),t.width=C,t.height=x,Rt(t,v),t.intersect=function(B){return Bt.polygon(t,k,B)},p}S(cT,"hexagon");async function hT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.label="",t.labelStyle=i;const{shapeSvg:o}=await Ht(e,t,qt(t)),l=Math.max(30,(t==null?void 0:t.width)??0),c=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:h}=t,d=Lt.svg(o),f=Et(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:l,y:0},{x:0,y:c},{x:l,y:c}],g=ne(p),x=d.path(g,f),y=o.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",a),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Rt(t,y),t.intersect=function(C){return gt.info("Pill intersect",t,{points:p}),Bt.polygon(t,p,C)},o}S(hT,"hourglass");async function uT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Mt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Ht(e,t,"icon-shape default"),x=t.pos==="t",y=h,C=h,{nodeBorder:k}=i,{stylesMap:v}=Zs(t),w=-C/2,B=-y/2,L=t.label?8:0,F=Lt.svg(f),D=Et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const z=F.rectangle(w,B,C,y,D),N=Math.max(C,p.width),P=y+p.height+L,at=F.rectangle(-N/2,-P/2,N,P,{...D,fill:"transparent",stroke:"none"}),K=f.insert(()=>z,":first-child"),Y=f.insert(()=>at);if(t.icon){const W=f.append("g");W.html(`<g>${await Yc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const X=W.node().getBBox(),q=X.width,H=X.height,A=X.x,$=X.y;W.attr("transform",`translate(${-q/2-A},${x?p.height/2+L/2-H/2-$:-p.height/2-L/2-H/2-$})`),W.attr("style",`color: ${v.get("stroke")??k};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-P/2:P/2-p.height})`),K.attr("transform",`translate(0,${x?p.height/2+L/2:-p.height/2-L/2})`),Rt(t,Y),t.intersect=function(W){if(gt.info("iconSquare intersect",t,W),!t.label)return Bt.rect(t,W);const X=t.x??0,q=t.y??0,H=t.height??0;let A=[];return x?A=[{x:X-p.width/2,y:q-H/2},{x:X+p.width/2,y:q-H/2},{x:X+p.width/2,y:q-H/2+p.height+L},{x:X+C/2,y:q-H/2+p.height+L},{x:X+C/2,y:q+H/2},{x:X-C/2,y:q+H/2},{x:X-C/2,y:q-H/2+p.height+L},{x:X-p.width/2,y:q-H/2+p.height+L}]:A=[{x:X-C/2,y:q-H/2},{x:X+C/2,y:q-H/2},{x:X+C/2,y:q-H/2+y},{x:X+p.width/2,y:q-H/2+y},{x:X+p.width/2/2,y:q+H/2},{x:X-p.width/2,y:q+H/2},{x:X-p.width/2,y:q-H/2+y},{x:X-C/2,y:q-H/2+y}],Bt.polygon(t,A,W)},f}S(uT,"icon");async function dT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Mt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Ht(e,t,"icon-shape default"),x=20,y=t.label?8:0,C=t.pos==="t",{nodeBorder:k,mainBkg:v}=i,{stylesMap:w}=Zs(t),B=Lt.svg(f),L=Et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const F=w.get("fill");L.stroke=F??v;const D=f.append("g");t.icon&&D.html(`<g>${await Yc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const z=D.node().getBBox(),N=z.width,P=z.height,at=z.x,K=z.y,Y=Math.max(N,P)*Math.SQRT2+x*2,W=B.circle(0,0,Y,L),X=Math.max(Y,p.width),q=Y+p.height+y,H=B.rectangle(-X/2,-q/2,X,q,{...L,fill:"transparent",stroke:"none"}),A=f.insert(()=>W,":first-child"),$=f.insert(()=>H);return D.attr("transform",`translate(${-N/2-at},${C?p.height/2+y/2-P/2-K:-p.height/2-y/2-P/2-K})`),D.attr("style",`color: ${w.get("stroke")??k};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-q/2:q/2-p.height})`),A.attr("transform",`translate(0,${C?p.height/2+y/2:-p.height/2-y/2})`),Rt(t,$),t.intersect=function(I){return gt.info("iconSquare intersect",t,I),Bt.rect(t,I)},f}S(dT,"iconCircle");async function fT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Mt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Ht(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:w}=i,{stylesMap:B}=Zs(t),L=-k/2,F=-C/2,D=t.label?8:0,z=Lt.svg(f),N=Et(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const P=B.get("fill");N.stroke=P??w;const at=z.path(_n(L,F,k,C,5),N),K=Math.max(k,p.width),Y=C+p.height+D,W=z.rectangle(-K/2,-Y/2,K,Y,{...N,fill:"transparent",stroke:"none"}),X=f.insert(()=>at,":first-child").attr("class","icon-shape2"),q=f.insert(()=>W);if(t.icon){const H=f.append("g");H.html(`<g>${await Yc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=H.node().getBBox(),$=A.width,I=A.height,Q=A.x,lt=A.y;H.attr("transform",`translate(${-$/2-Q},${y?p.height/2+D/2-I/2-lt:-p.height/2-D/2-I/2-lt})`),H.attr("style",`color: ${B.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-Y/2:Y/2-p.height})`),X.attr("transform",`translate(0,${y?p.height/2+D/2:-p.height/2-D/2})`),Rt(t,q),t.intersect=function(H){if(gt.info("iconSquare intersect",t,H),!t.label)return Bt.rect(t,H);const A=t.x??0,$=t.y??0,I=t.height??0;let Q=[];return y?Q=[{x:A-p.width/2,y:$-I/2},{x:A+p.width/2,y:$-I/2},{x:A+p.width/2,y:$-I/2+p.height+D},{x:A+k/2,y:$-I/2+p.height+D},{x:A+k/2,y:$+I/2},{x:A-k/2,y:$+I/2},{x:A-k/2,y:$-I/2+p.height+D},{x:A-p.width/2,y:$-I/2+p.height+D}]:Q=[{x:A-k/2,y:$-I/2},{x:A+k/2,y:$-I/2},{x:A+k/2,y:$-I/2+C},{x:A+p.width/2,y:$-I/2+C},{x:A+p.width/2/2,y:$+I/2},{x:A-p.width/2,y:$+I/2},{x:A-p.width/2,y:$-I/2+C},{x:A-k/2,y:$-I/2+C}],Bt.polygon(t,Q,H)},f}S(fT,"iconRounded");async function pT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Mt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Ht(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:w}=i,{stylesMap:B}=Zs(t),L=-k/2,F=-C/2,D=t.label?8:0,z=Lt.svg(f),N=Et(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const P=B.get("fill");N.stroke=P??w;const at=z.path(_n(L,F,k,C,.1),N),K=Math.max(k,p.width),Y=C+p.height+D,W=z.rectangle(-K/2,-Y/2,K,Y,{...N,fill:"transparent",stroke:"none"}),X=f.insert(()=>at,":first-child"),q=f.insert(()=>W);if(t.icon){const H=f.append("g");H.html(`<g>${await Yc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const A=H.node().getBBox(),$=A.width,I=A.height,Q=A.x,lt=A.y;H.attr("transform",`translate(${-$/2-Q},${y?p.height/2+D/2-I/2-lt:-p.height/2-D/2-I/2-lt})`),H.attr("style",`color: ${B.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-Y/2:Y/2-p.height})`),X.attr("transform",`translate(0,${y?p.height/2+D/2:-p.height/2-D/2})`),Rt(t,q),t.intersect=function(H){if(gt.info("iconSquare intersect",t,H),!t.label)return Bt.rect(t,H);const A=t.x??0,$=t.y??0,I=t.height??0;let Q=[];return y?Q=[{x:A-p.width/2,y:$-I/2},{x:A+p.width/2,y:$-I/2},{x:A+p.width/2,y:$-I/2+p.height+D},{x:A+k/2,y:$-I/2+p.height+D},{x:A+k/2,y:$+I/2},{x:A-k/2,y:$+I/2},{x:A-k/2,y:$-I/2+p.height+D},{x:A-p.width/2,y:$-I/2+p.height+D}]:Q=[{x:A-k/2,y:$-I/2},{x:A+k/2,y:$-I/2},{x:A+k/2,y:$-I/2+C},{x:A+p.width/2,y:$-I/2+C},{x:A+p.width/2/2,y:$+I/2},{x:A-p.width/2,y:$+I/2},{x:A-p.width/2,y:$-I/2+C},{x:A-k/2,y:$-I/2+C}],Bt.polygon(t,Q,H)},f}S(pT,"iconSquare");async function gT(e,t,{config:{flowchart:i}}){const a=new Image;a.src=(t==null?void 0:t.img)??"",await a.decode();const o=Number(a.naturalWidth.toString().replace("px","")),l=Number(a.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/l;const{labelStyles:c}=Mt(t);t.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;t.defaultWidth=i==null?void 0:i.wrappingWidth;const d=Math.max(t.label?h??0:0,(t==null?void 0:t.assetWidth)??o),f=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:d,p=t.constraint==="on"?f/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??l;t.width=Math.max(f,h??0);const{shapeSvg:g,bbox:x,label:y}=await Ht(e,t,"image-shape default"),C=t.pos==="t",k=-f/2,v=-p/2,w=t.label?8:0,B=Lt.svg(g),L=Et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const F=B.rectangle(k,v,f,p,L),D=Math.max(f,x.width),z=p+x.height+w,N=B.rectangle(-D/2,-z/2,D,z,{...L,fill:"none",stroke:"none"}),P=g.insert(()=>F,":first-child"),at=g.insert(()=>N);if(t.img){const K=g.append("image");K.attr("href",t.img),K.attr("width",f),K.attr("height",p),K.attr("preserveAspectRatio","none"),K.attr("transform",`translate(${-f/2},${C?z/2-p:-z/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${C?-p/2-x.height/2-w/2:p/2-x.height/2+w/2})`),P.attr("transform",`translate(0,${C?x.height/2+w/2:-x.height/2-w/2})`),Rt(t,at),t.intersect=function(K){if(gt.info("iconSquare intersect",t,K),!t.label)return Bt.rect(t,K);const Y=t.x??0,W=t.y??0,X=t.height??0;let q=[];return C?q=[{x:Y-x.width/2,y:W-X/2},{x:Y+x.width/2,y:W-X/2},{x:Y+x.width/2,y:W-X/2+x.height+w},{x:Y+f/2,y:W-X/2+x.height+w},{x:Y+f/2,y:W+X/2},{x:Y-f/2,y:W+X/2},{x:Y-f/2,y:W-X/2+x.height+w},{x:Y-x.width/2,y:W-X/2+x.height+w}]:q=[{x:Y-f/2,y:W-X/2},{x:Y+f/2,y:W-X/2},{x:Y+f/2,y:W-X/2+p},{x:Y+x.width/2,y:W-X/2+p},{x:Y+x.width/2/2,y:W+X/2},{x:Y-x.width/2,y:W+X/2},{x:Y-x.width/2,y:W-X/2+p},{x:Y-f/2,y:W-X/2+p}],Bt.polygon(t,q,K)},g}S(gT,"imageSquare");async function mT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=Math.max(d.width+(c??0)*2,(t==null?void 0:t.width)??0),p=Math.max(d.height+(l??0)*2,(t==null?void 0:t.height)??0),g=[{x:0,y:0},{x:f,y:0},{x:f+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Lt.svg(h),k=Et(t,{}),v=ne(g),w=C.path(v,k);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),y&&x.attr("style",y)}else x=Da(h,f,p,g);return a&&x.attr("style",a),t.width=f,t.height=p,Rt(t,x),t.intersect=function(C){return Bt.polygon(t,g,C)},h}S(mT,"inv_trapezoid");async function yT(e,t){const{shapeSvg:i,bbox:a,label:o}=await Ht(e,t,"label"),l=i.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Rt(t,l),t.intersect=function(d){return Bt.rect(t,d)},i}S(yT,"labelRect");async function xT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Lt.svg(h),k=Et(t,{}),v=ne(g),w=C.path(v,k);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Da(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Rt(t,x),t.intersect=function(C){return Bt.polygon(t,g,C)},h}S(xT,"lean_left");async function bT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Lt.svg(h),k=Et(t,{}),v=ne(g),w=C.path(v,k);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Da(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Rt(t,x),t.intersect=function(C){return Bt.polygon(t,g,C)},h}S(bT,"lean_right");function CT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",qt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,c=Math.max(35,(t==null?void 0:t.width)??0),h=Math.max(35,(t==null?void 0:t.height)??0),d=7,f=[{x:c,y:0},{x:0,y:h+d/2},{x:c-2*d,y:h+d/2},{x:0,y:2*h},{x:c,y:h-d/2},{x:2*d,y:h-d/2}],p=Lt.svg(o),g=Et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ne(f),y=p.path(x,g),C=o.insert(()=>y,":first-child");return C.attr("class","outer-path"),l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),C.attr("transform",`translate(-${c/2},${-h})`),Rt(t,C),t.intersect=function(k){return gt.info("lightningBolt intersect",t,k),Bt.polygon(t,f,k)},o}S(CT,"lightningBolt");var W4=S((e,t,i,a,o,l,c)=>[`M${e},${t+l}`,`a${o},${l} 0,0,0 ${i},0`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),U4=S((e,t,i,a,o,l,c)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),Y4=S((e,t,i,a,o,l)=>[`M${e-i/2},${-a/2}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),iv=10,av=10;async function vT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?24:o;if(t.width||t.height){const w=t.width??0;t.width=(t.width??0)-l,t.width<av&&(t.width=av);const L=w/2/(2.5+w/50);t.height=(t.height??0)-c-L*3,t.height<iv&&(t.height=iv)}const{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,g=p/2,x=g/(2.5+p/50),y=(t!=null&&t.height?t==null?void 0:t.height:d.height)+x+c*2,C=y*.1;let k;const{cssStyles:v}=t;if(t.look==="handDrawn"){const w=Lt.svg(h),B=U4(0,0,p,y,g,x,C),L=Y4(0,x,p,y,g,x),F=Et(t,{}),D=w.path(B,F),z=w.path(L,F);h.insert(()=>z,":first-child").attr("class","line"),k=h.insert(()=>D,":first-child"),k.attr("class","basic label-container"),v&&k.attr("style",v)}else{const w=W4(0,0,p,y,g,x,C);k=h.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",rr(v)).attr("style",a)}return k.attr("label-offset-y",x),k.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Rt(t,k),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),t.intersect=function(w){const B=Bt.rect(t,w),L=B.x-(t.x??0);if(g!=0&&(Math.abs(L)<(t.width??0)/2||Math.abs(L)==(t.width??0)/2&&Math.abs(B.y-(t.y??0))>(t.height??0)/2-x)){let F=x*x*(1-L*L/(g*g));F>0&&(F=Math.sqrt(F)),F=x-F,w.y-(t.y??0)>0&&(F=-F),B.y+=F}return B},h}S(vT,"linedCylinder");async function kT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;if(t.width||t.height){const F=t.width;t.width=(F??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10)}const{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+(l??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,y=g+x,{cssStyles:C}=t,k=Lt.svg(h),v=Et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},...wn(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,x,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],B=k.polygon(w.map(F=>[F.x,F.y]),v),L=h.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),L.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(d.x-(d.left??0))},${-g/2+(t.padding??0)-x/2-(d.y-(d.top??0))})`),Rt(t,L),t.intersect=function(F){return Bt.polygon(t,w,F)},h}S(kT,"linedWaveEdgedRect");async function ST(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-2*h,10),t.height=Math.max(((t==null?void 0:t.height)??0)-c*2-2*h,10));const{shapeSvg:d,bbox:f,label:p}=await Ht(e,t,qt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2+2*h,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+c*2+2*h,y=g-2*h,C=x-2*h,k=-y/2,v=-C/2,{cssStyles:w}=t,B=Lt.svg(d),L=Et(t,{}),F=[{x:k-h,y:v+h},{x:k-h,y:v+C+h},{x:k+y-h,y:v+C+h},{x:k+y-h,y:v+C},{x:k+y,y:v+C},{x:k+y,y:v+C-h},{x:k+y+h,y:v+C-h},{x:k+y+h,y:v-h},{x:k+h,y:v-h},{x:k+h,y:v},{x:k,y:v},{x:k,y:v+h}],D=[{x:k,y:v+h},{x:k+y-h,y:v+h},{x:k+y-h,y:v+C},{x:k+y,y:v+C},{x:k+y,y:v},{x:k,y:v}];t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const z=ne(F);let N=B.path(z,L);const P=ne(D);let at=B.path(P,L);t.look!=="handDrawn"&&(N=mm(N),at=mm(at));const K=d.insert("g",":first-child");return K.insert(()=>N),K.insert(()=>at),K.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",w),a&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",a),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),Rt(t,K),t.intersect=function(Y){return Bt.polygon(t,F,Y)},d}S(ST,"multiRect");async function wT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Ht(e,t,qt(t)),h=t.padding??0,d=t.look==="neo"?16:h,f=t.look==="neo"?12:h;let p=!0;(t.width||t.height)&&(p=!1,t.width=((t==null?void 0:t.width)??0)-d*2,t.height=((t==null?void 0:t.height)??0)-f*3);const g=Math.max(l.width,(t==null?void 0:t.width)??0)+d*2,x=Math.max(l.height,(t==null?void 0:t.height)??0)+f*3,y=t.look==="neo"?x/4:x/8,C=x+(p?y/2:-y/2),k=-g/2,v=-C/2,w=10,{cssStyles:B}=t,L=wn(k-w,v+C+w,k+g-w,v+C+w,y,.8),F=L==null?void 0:L[L.length-1],D=[{x:k-w,y:v+w},{x:k-w,y:v+C+w},...L,{x:k+g-w,y:F.y-w},{x:k+g,y:F.y-w},{x:k+g,y:F.y-2*w},{x:k+g+w,y:F.y-2*w},{x:k+g+w,y:v-w},{x:k+w,y:v-w},{x:k+w,y:v},{x:k,y:v},{x:k,y:v+w}],z=[{x:k,y:v+w},{x:k+g-w,y:v+w},{x:k+g-w,y:F.y-w},{x:k+g,y:F.y-w},{x:k+g,y:v},{x:k,y:v}],N=Lt.svg(o),P=Et(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");const at=ne(D),K=N.path(at,P),Y=ne(z),W=N.path(Y,P),X=o.insert(()=>K,":first-child");return X.insert(()=>W),X.attr("class","basic label-container outer-path"),B&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",B),a&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",a),X.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(l.width/2)-w-(l.x-(l.left??0))}, ${-(l.height/2)+w-y/2-(l.y-(l.top??0))})`),Rt(t,X),t.intersect=function(q){return Bt.polygon(t,D,q)},o}S(wT,"multiWaveEdgedRectangle");async function TT(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:o}=Mt(t);t.labelStyle=a,t.useHtmlLabels||Lr(_e())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=Math.max(h.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),p=Math.max(h.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),g=-f/2,x=-p/2,{cssStyles:y}=t,C=Lt.svg(c),k=Et(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=C.rectangle(g,x,f,p,k),w=c.insert(()=>v,":first-child");return w.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),o&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",o),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Rt(t,w),t.intersect=function(B){return Bt.rect(t,B)},c}S(TT,"note");var G4=S((e,t,i)=>[`M${e+i/2},${t}`,`L${e+i},${t-i/2}`,`L${e+i/2},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function _T(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l}=await Ht(e,t,qt(t)),c=l.width+(t.padding??0),h=l.height+(t.padding??0),d=c+h,f=.5,p=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}];let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=Lt.svg(o),C=Et(t,{}),k=G4(0,0,d),v=y.path(k,C);g=o.insert(()=>v,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x&&g.attr("style",x)}else g=Da(o,d,d,p),g.attr("transform",`translate(${-d/2+f}, ${d/2})`);return a&&g.attr("style",a),Rt(t,g),t.calcIntersect=function(y,C){const k=y.width,v=[{x:k/2,y:0},{x:k,y:-k/2},{x:k/2,y:-k},{x:0,y:-k/2}],w=Bt.polygon(y,v,C);return{x:w.x-.5,y:w.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},o}S(_T,"question");async function BT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?21:o??0,c=t.look==="neo"?12:o??0,{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=((t==null?void 0:t.width)??d.width)+(t.look==="neo"?l*2:l),g=((t==null?void 0:t.height)??d.height)+(t.look==="neo"?c*2:c),x=-p/2,y=-g/2,C=y/2,k=[{x:x+C,y},{x,y:0},{x:x+C,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:v}=t,w=Lt.svg(h),B=Et(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=ne(k),F=w.path(L,B),D=h.insert(()=>F,":first-child");return D.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),D.attr("transform",`translate(${-C/2},0)`),f.attr("transform",`translate(${-C/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),Rt(t,D),t.intersect=function(z){return Bt.polygon(t,k,z)},h}S(BT,"rect_left_inv_arrow");async function ET(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const l=e.insert("g").attr("class",o).attr("id",t.domId||t.id),c=l.insert("g"),h=l.insert("g").attr("class","label").attr("style",a),d=t.description,f=t.label,p=await yn(h,f,t.labelStyle,!0,!0);let g={width:0,height:0};if(Lr(ce())){const P=p.children[0],at=Zt(p);g=P.getBoundingClientRect(),at.attr("width",g.width),at.attr("height",g.height)}gt.info("Text 2",d);const x=d||[],y=p.getBBox(),C=await yn(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),k=C.children[0],v=Zt(C);g=k.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height);const w=(t.padding||0)/2;Zt(C).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+w+5)+")"),Zt(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-w+3)+")");const B=g.width+(t.padding||0),L=g.height+(t.padding||0),F=-g.width/2-w,D=-g.height/2-w;let z,N;if(t.look==="handDrawn"){const P=Lt.svg(l),at=Et(t,{}),K=P.path(_n(F,D,B,L,t.rx||0),at),Y=P.line(-g.width/2-w,-g.height/2-w+y.height+w,g.width/2+w,-g.height/2-w+y.height+w,at);N=l.insert(()=>(gt.debug("Rough node insert CXC",K),Y),":first-child"),z=l.insert(()=>(gt.debug("Rough node insert CXC",K),K),":first-child")}else z=c.insert("rect",":first-child"),N=c.insert("line"),z.attr("class","outer title-state").attr("style",a).attr("x",-g.width/2-w).attr("y",-g.height/2-w).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),N.attr("class","divider").attr("x1",-g.width/2-w).attr("x2",g.width/2+w).attr("y1",-g.height/2-w+y.height+w).attr("y2",-g.height/2-w+y.height+w);return Rt(t,z),t.intersect=function(P){return Bt.rect(t,P)},l}S(ET,"rectWithTitle");async function LT(e,t,{config:{themeVariables:i}}){const a=(i==null?void 0:i.radius)??5,o={rx:a,ry:a,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ks(e,t,o)}S(LT,"roundedRect");var eo=8;async function AT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.width)??h.width)+o*2+(t.look==="neo"?eo:eo*2),p=((t==null?void 0:t.height)??h.height)+l*2,g=f-eo,x=p,y=eo-f/2,C=-p/2,{cssStyles:k}=t,v=Lt.svg(c),w=Et(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=[{x:y,y:C},{x:y+g,y:C},{x:y+g,y:C+x},{x:y-eo,y:C+x},{x:y-eo,y:C},{x:y,y:C},{x:y,y:C+x}],L=v.polygon(B.map(D=>[D.x,D.y]),w),F=c.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path").attr("style",rr(k)),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),d.attr("transform",`translate(${eo/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Rt(t,F),t.intersect=function(D){return Bt.rect(t,D)},c}S(AT,"shadedProcess");async function MT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,g=((t!=null&&t.height?t==null?void 0:t.height:d.height)+c*2)*1.5,x=p,y=g/1.5,C=-x/2,k=-y/2,{cssStyles:v}=t,w=Lt.svg(h),B=Et(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=[{x:C,y:k},{x:C,y:k+y},{x:C+x,y:k+y},{x:C+x,y:k-y/2}],F=ne(L),D=w.path(F,B),z=h.insert(()=>D,":first-child");return z.attr("class","basic label-container  outer-path"),v&&t.look!=="handDrawn"&&z.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&z.selectChildren("path").attr("style",a),z.attr("transform",`translate(0, ${y/4})`),f.attr("transform",`translate(${-x/2+(t.padding??0)-(d.x-(d.left??0))}, ${-y/4+(t.padding??0)-(d.y-(d.top??0))})`),Rt(t,z),t.intersect=function(N){return Bt.polygon(t,L,N)},h}S(MT,"slopedRect");async function FT(e,t){const i=t.padding??0,a=t.look==="neo"?16:i*2,o=t.look==="neo"?12:i,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:o};return Ks(e,t,l)}S(FT,"squareRect");async function DT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?20:o,c=t.look==="neo"?12:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=d.height+(t.look==="neo"?c*2:c),p=d.width+f/4+(t.look==="neo"?l*2:l),g=f/2,{cssStyles:x}=t,y=Lt.svg(h),C=Et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...$c(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...$c(p/2-g,0,g,50,270,450)],v=ne(k),w=y.path(v,C),B=h.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",x),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),Rt(t,B),t.intersect=function(L){return Bt.polygon(t,k,L)},h}S(DT,"stadium");async function RT(e,t){const i={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ks(e,t,i)}S(RT,"state");function OT(e,t,{config:{themeVariables:i}}){var B,L;const{labelStyles:a,nodeStyles:o}=Mt(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:d,nodeShadow:f}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const p=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),g=Lt.svg(p),x=Et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),C=h??d,k=(t.width??0)*5/14,v=g.circle(0,0,k,{...x,fill:C,stroke:C,strokeWidth:2,fillStyle:"solid"}),w=p.insert(()=>y,":first-child");if(w.insert(()=>v),t.look!=="handDrawn"&&w.attr("class","outer-path"),l&&w.selectAll("path").attr("style",l),o&&w.selectAll("path").attr("style",o),t.width<25&&f&&t.look!=="handDrawn"){const F=((L=(B=e.node())==null?void 0:B.ownerSVGElement)==null?void 0:L.id)??"",D=F?`${F}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${D})`)}return Rt(t,w),t.intersect=function(F){return Bt.circle(t,(t.width??0)/2,F)},p}S(OT,"stateEnd");function zT(e,t,{config:{themeVariables:i}}){var h,d;const{lineColor:a,nodeShadow:o}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let c;if(t.look==="handDrawn"){const p=Lt.svg(l).circle(0,0,t.width,nO(a));c=l.insert(()=>p),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else c=l.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const f=((d=(h=e.node())==null?void 0:h.ownerSVGElement)==null?void 0:d.id)??"",p=f?`${f}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return Rt(t,c),t.intersect=function(f){return Bt.circle(t,(t.width??7)/2,f)},l}S(zT,"stateStart");var ys=8;async function $T(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=(t==null?void 0:t.padding)??8,l=t.look==="neo"?28:o,c=t.look==="neo"?12:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.width)??d.width)+2*ys+l,p=((t==null?void 0:t.height)??d.height)+c,g=f-2*ys,x=p,y=-f/2,C=-p/2,k=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(t.look==="handDrawn"){const v=Lt.svg(h),w=Et(t,{}),B=v.rectangle(y,C,g+16,x,w),L=v.line(y+ys,C,y+ys,C+x,w),F=v.line(y+ys+g,C,y+ys+g,C+x,w);h.insert(()=>L,":first-child"),h.insert(()=>F,":first-child");const D=h.insert(()=>B,":first-child"),{cssStyles:z}=t;D.attr("class","basic label-container").attr("style",rr(z)),Rt(t,D)}else{const v=Da(h,g,x,k);a&&v.attr("style",a),Rt(t,v)}return t.intersect=function(v){return Bt.polygon(t,k,v)},h}S($T,"subroutine");var vg=.2;async function NT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-c*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-vg*(t.height+c*2),10));const{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c*2,p=vg*f,g=vg*f,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2+p-p,C=f,k=-y/2,v=-C/2,{cssStyles:w}=t,B=Lt.svg(h),L=Et(t,{}),F=[{x:k-p/2,y:v},{x:k+y+p/2,y:v},{x:k+y+p/2,y:v+C},{x:k-p/2,y:v+C}],D=[{x:k+y-p/2,y:v+C},{x:k+y+p/2,y:v+C},{x:k+y+p/2,y:v+C-g}];t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const z=ne(F),N=B.path(z,L),P=ne(D),at=B.path(P,{...L,fillStyle:"solid"}),K=h.insert(()=>at,":first-child");return K.insert(()=>N,":first-child"),K.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",w),a&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",a),Rt(t,K),t.intersect=function(Y){return Bt.polygon(t,F,Y)},h}S(NT,"taggedRect");async function qT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Ht(e,t,qt(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=d/8,p=.2*h,g=.2*d,x=d+f,{cssStyles:y}=t,C=Lt.svg(o),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-h/2-h/2*.1,y:x/2},...wn(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,f,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],w=-h/2+h/2*.1,B=-x/2-g*.4,L=[{x:w+h-p,y:(B+d)*1.3},{x:w+h,y:B+d-g},{x:w+h,y:(B+d)*.9},...wn(w+h,(B+d)*1.25,w+h-p,(B+d)*1.3,-d*.02,.5)],F=ne(v),D=C.path(F,k),z=ne(L),N=C.path(z,{...k,fillStyle:"solid"}),P=o.insert(()=>N,":first-child");return P.insert(()=>D,":first-child"),P.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),P.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Rt(t,P),t.intersect=function(at){return Bt.polygon(t,v,at)},o}S(qT,"taggedWaveEdgedRectangle");async function IT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l}=await Ht(e,t,qt(t)),c=Math.max(l.width+(t.padding??0),(t==null?void 0:t.width)||0),h=Math.max(l.height+(t.padding??0),(t==null?void 0:t.height)||0),d=-c/2,f=-h/2,p=o.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",h),Rt(t,p),t.intersect=function(g){return Bt.rect(t,g)},o}S(IT,"text");var V4=S((e,t,i,a,o,l)=>`M${e},${t}
    a${o},${l} 0,0,1 0,${-a}
    l${i},0
    a${o},${l} 0,0,1 0,${a}
    M${i},${-a}
    a${o},${l} 0,0,0 0,${a}
    l${-i},0`,"createCylinderPathD"),X4=S((e,t,i,a,o,l)=>[`M${e},${t}`,`M${e+i},${t}`,`a${o},${l} 0,0,0 0,${-a}`,`l${-i},0`,`a${o},${l} 0,0,0 0,${a}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),Q4=S((e,t,i,a,o,l)=>[`M${e+i/2},${-a/2}`,`a${o},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),nv=5,ov=10;async function jT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?12:o/2;if(t.width||t.height){const k=t.height??0;t.height=(t.height??0)-l,t.height<nv&&(t.height=nv);const w=k/2/(2.5+k/50);t.width=(t.width??0)-l-w*3,t.width<ov&&(t.width=ov)}const{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=(t.height?t.height:h.height)+l,p=f/2,g=p/(2.5+f/50),x=(t.width?t.width:h.width)+g+l,{cssStyles:y}=t;let C;if(t.look==="handDrawn"){const k=Lt.svg(c),v=X4(0,0,x,f,g,p),w=Q4(0,0,x,f,g,p),B=k.path(v,Et(t,{})),L=k.path(w,Et(t,{fill:"none"}));C=c.insert(()=>L,":first-child"),C=c.insert(()=>B,":first-child"),C.attr("class","basic label-container"),y&&C.attr("style",y)}else{const k=V4(0,0,x,f,g,p);C=c.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",rr(y)).attr("style",a),C.attr("class","basic label-container outer-path"),y&&C.selectAll("path").attr("style",y),a&&C.selectAll("path").attr("style",a)}return C.attr("label-offset-x",g),C.attr("transform",`translate(${-x/2}, ${f/2} )`),d.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Rt(t,C),t.intersect=function(k){const v=Bt.rect(t,k),w=v.y-(t.y??0);if(p!=0&&(Math.abs(w)<(t.height??0)/2||Math.abs(w)==(t.height??0)/2&&Math.abs(v.x-(t.x??0))>(t.width??0)/2-g)){let B=g*g*(1-w*w/(p*p));B!=0&&(B=Math.sqrt(Math.abs(B))),B=g-B,k.x-(t.x??0)>0&&(B=-B),v.x+=B}return v},c}S(jT,"tiltedCylinder");async function HT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=(t.look==="neo",o),c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Lt.svg(h),k=Et(t,{}),v=ne(g),w=C.path(v,k);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Da(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Rt(t,x),t.intersect=function(C){return Bt.polygon(t,g,C)},h}S(HT,"trapezoid");async function PT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=15,d=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<d&&(t.height=d),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:f,bbox:p}=await Ht(e,t,qt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2,x=(t!=null&&t.height?t==null?void 0:t.height:p.height)+c*2,{cssStyles:y}=t,C=Lt.svg(f),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],w=ne(v),B=C.path(w,k),L=f.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),Rt(t,L),t.intersect=function(F){return Bt.polygon(t,v,F)},f}S(PT,"trapezoidalPentagon");var sv=10,lv=10;async function WT(e,t){var F;const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-l)/2,t.width<lv&&(t.width=lv),t.height=(t==null?void 0:t.height)??0,t.height<sv&&(t.height=sv));const{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=ea((F=ce().flowchart)==null?void 0:F.htmlLabels),p=(t!=null&&t.width?t==null?void 0:t.width:h.width)+l,g=t!=null&&t.height?t==null?void 0:t.height:p+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:C}=t,k=Lt.svg(c),v=Et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=ne(y),B=k.path(w,v),L=c.insert(()=>B,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),t.width=p,t.height=g,Rt(t,L),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(t.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),t.intersect=function(D){return gt.info("Triangle intersect",t,y,D),Bt.polygon(t,y,D)},c}S(WT,"triangle");async function UT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10));const{shapeSvg:d,bbox:f,label:p}=await Ht(e,t,qt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+(l??0)*2,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+(c??0)*2,y=t.look==="neo"?x/4:x/8,C=x+(h?y:-y),{cssStyles:k}=t,w=14-g,B=w>0?w/2:0,L=Lt.svg(d),F=Et(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const D=[{x:-g/2-B,y:C/2},...wn(-g/2-B,C/2,g/2+B,C/2,y,.8),{x:g/2+B,y:-C/2},{x:-g/2-B,y:-C/2}],z=ne(D),N=L.path(z,F),P=d.insert(()=>N,":first-child");return P.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),P.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(f.x-(f.left??0))},${-x/2+(t.padding??0)-y-(f.y-(f.top??0))})`),Rt(t,P),t.intersect=function(at){return Bt.polygon(t,D,at)},d}S(UT,"waveEdgedRectangle");async function YT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?20:o;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const F=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-F*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:d}=await Ht(e,t,qt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c,g=p/8,x=p+g*2,{cssStyles:y}=t,C=Lt.svg(h),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-f/2,y:x/2},...wn(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},...wn(f/2,-x/2,-f/2,-x/2,g,-1)],w=ne(v),B=C.path(w,k),L=h.insert(()=>B,":first-child");return L.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),Rt(t,L),t.intersect=function(F){return Bt.polygon(t,v,F)},h}S(YT,"waveRectangle");var Fe=10;async function GT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-Fe,10),t.height=Math.max(((t==null?void 0:t.height)??0)-l*2-Fe,10));const{shapeSvg:c,bbox:h,label:d}=await Ht(e,t,qt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+Fe,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l*2+Fe,g=f-Fe,x=p-Fe,y=-g/2,C=-x/2,{cssStyles:k}=t,v=Lt.svg(c),w=Et(t,{}),B=[{x:y-Fe,y:C-Fe},{x:y-Fe,y:C+x},{x:y+g,y:C+x},{x:y+g,y:C-Fe}],L=`M${y-Fe},${C-Fe} L${y+g},${C-Fe} L${y+g},${C+x} L${y-Fe},${C+x} L${y-Fe},${C-Fe}
                M${y-Fe},${C} L${y+g},${C}
                M${y},${C-Fe} L${y},${C+x}`;t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const F=v.path(L,w),D=c.insert(()=>F,":first-child");return D.attr("transform",`translate(${Fe/2}, ${Fe/2})`),D.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),d.attr("transform",`translate(${-(h.width/2)+Fe/2-(h.x-(h.left??0))}, ${-(h.height/2)+Fe/2-(h.y-(h.top??0))})`),Rt(t,D),t.intersect=function(z){return Bt.polygon(t,B,z)},c}S(GT,"windowPane");var cv=new Set(["redux-color","redux-dark-color"]),Z4=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ey(e,t){var vt,_t,jt,Nt;const i=t;i.alias&&(t.label=i.alias);const{theme:a,themeVariables:o}=_e(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:d}=o;if(t.look==="handDrawn"){const{themeVariables:Ct}=_e(),{background:dt}=Ct,St={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${dt}`]};await Ey(e,St)}const f=_e();t.useHtmlLabels=f.htmlLabels;let p=((vt=f.er)==null?void 0:vt.diagramPadding)??10,g=((_t=f.er)==null?void 0:_t.entityPadding)??6;const{cssStyles:x}=t,{labelStyles:y,nodeStyles:C}=Mt(t);if(i.attributes.length===0&&t.label){const Ct={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};Fa(t.label,f)+Ct.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);const dt=await Ks(e,t,Ct);if(a!=null&&cv.has(a)){const St=i.colorIndex??0;dt.attr("data-color-id",`color-${St%d.length}`)}if(!ea(f.htmlLabels)){const St=dt.select("text"),Tt=(jt=St.node())==null?void 0:jt.getBBox();St.attr("transform",`translate(${-Tt.width/2}, 0)`)}return dt}f.htmlLabels||(p*=1.25,g*=1.25);let k=qt(t);k||(k="node default");const v=e.insert("g").attr("class",k).attr("id",t.domId||t.id),w=await ks(v,t.label??"",f,0,0,["name"],y);w.height+=g;let B=0;const L=[],F=[];let D=0,z=0,N=0,P=0,at=!0,K=!0;for(const Ct of i.attributes){const dt=await ks(v,Ct.type,f,0,B,["attribute-type"],y);D=Math.max(D,dt.width+p);const St=await ks(v,Ct.name,f,0,B,["attribute-name"],y);z=Math.max(z,St.width+p);const Tt=await ks(v,Ct.keys.join(),f,0,B,["attribute-keys"],y);N=Math.max(N,Tt.width+p);const J=await ks(v,Ct.comment,f,0,B,["attribute-comment"],y);P=Math.max(P,J.width+p);const kt=Math.max(dt.height,St.height,Tt.height,J.height)+g;F.push({yOffset:B,rowHeight:kt}),B+=kt}let Y=4;N<=p&&(at=!1,N=0,Y--),P<=p&&(K=!1,P=0,Y--);const W=v.node().getBBox();if(w.width+p*2-(D+z+N+P)>0){const Ct=w.width+p*2-(D+z+N+P);D+=Ct/Y,z+=Ct/Y,N>0&&(N+=Ct/Y),P>0&&(P+=Ct/Y)}const X=D+z+N+P,q=Lt.svg(v),H=Et(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");let A=0;F.length>0&&(A=F.reduce((Ct,dt)=>Ct+((dt==null?void 0:dt.rowHeight)??0),0));const $=Math.max(W.width+p*2,(t==null?void 0:t.width)||0,X),I=Math.max((A??0)+w.height,(t==null?void 0:t.height)||0),Q=-$/2,lt=-I/2;if(v.selectAll("g:not(:first-child)").each((Ct,dt,St)=>{const Tt=Zt(St[dt]),J=Tt.attr("transform");let kt=0,Ar=0;if(J){const Sr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(J);Sr&&(kt=parseFloat(Sr[1]),Ar=parseFloat(Sr[2]),Tt.attr("class").includes("attribute-name")?kt+=D:Tt.attr("class").includes("attribute-keys")?kt+=D+z:Tt.attr("class").includes("attribute-comment")&&(kt+=D+z+N))}Tt.attr("transform",`translate(${Q+p/2+kt}, ${Ar+lt+w.height+g/2})`)}),v.select(".name").attr("transform","translate("+-w.width/2+", "+(lt+g/2)+")"),a!=null&&cv.has(a)){const Ct=i.colorIndex??0;v.attr("data-color-id",`color-${Ct%d.length}`)}const R=q.rectangle(Q,lt,$,I,H),G=v.insert(()=>R,":first-child").attr("class","outer-path").attr("style",x.join(""));L.push(0);for(const[Ct,dt]of F.entries()){const Tt=(Ct+1)%2===0&&dt.yOffset!==0,J=q.rectangle(Q,w.height+lt+(dt==null?void 0:dt.yOffset),$,dt==null?void 0:dt.rowHeight,{...H,fill:Tt?l:c,stroke:h});v.insert(()=>J,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Tt?"even":"odd"}`)}const ct=1e-4;let ut=Ss(Q,w.height+lt,$+Q,w.height+lt,ct),mt=q.polygon(ut.map(Ct=>[Ct.x,Ct.y]),H);if(v.insert(()=>mt).attr("class","divider"),ut=Ss(D+Q,w.height+lt,D+Q,I+lt,ct),mt=q.polygon(ut.map(Ct=>[Ct.x,Ct.y]),H),v.insert(()=>mt).attr("class","divider"),at){const Ct=D+z+Q;ut=Ss(Ct,w.height+lt,Ct,I+lt,ct),mt=q.polygon(ut.map(dt=>[dt.x,dt.y]),H),v.insert(()=>mt).attr("class","divider")}if(K){const Ct=D+z+N+Q;ut=Ss(Ct,w.height+lt,Ct,I+lt,ct),mt=q.polygon(ut.map(dt=>[dt.x,dt.y]),H),v.insert(()=>mt).attr("class","divider")}for(const Ct of L){const dt=w.height+lt+Ct;ut=Ss(Q,dt,$+Q,dt,ct),mt=q.polygon(ut.map(St=>[St.x,St.y]),H),v.insert(()=>mt).attr("class","divider")}if(Rt(t,G),C&&t.look!=="handDrawn")if(a!=null&&Z4.has(a))v.selectAll("path").attr("style",C);else{const Ct=C.split(";"),dt=(Nt=Ct==null?void 0:Ct.filter(St=>St.includes("stroke")))==null?void 0:Nt.map(St=>`${St}`).join("; ");v.selectAll("path").attr("style",dt??""),v.selectAll(".row-rect-even path").attr("style",C)}return t.intersect=function(Ct){return Bt.rect(t,Ct)},v}S(Ey,"erBox");async function ks(e,t,i,a=0,o=0,l=[],c=""){const h=e.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${a}, ${o})`).attr("style",c);t!==t1(t)&&(t=t1(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const d=h.node().appendChild(await ia(h,t,{width:Fa(t,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(t.includes("&lt;")||t.includes("&gt;")){let p=d.children[0];for(p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if(ea(i.htmlLabels)){const p=d.children[0];p.style.textAlign="start";const g=Zt(d);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}S(ks,"addText");function Ss(e,t,i,a,o){return e===i?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:i+o/2,y:a},{x:i-o/2,y:a}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:i,y:a+o/2},{x:i,y:a-o/2}]}S(Ss,"lineToPolygon");async function VT(e,t,i,a,o=i.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",qt(t)).attr("id",t.domId||t.id);let h=null,d=null,f=null,p=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const B=t.annotations[0];await yc(h,{text:`«${B}»`},0),g=h.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await yc(d,t,0,["font-weight: bolder"]);const C=d.node().getBBox();x=C.height,f=c.insert("g").attr("class","members-group text");let k=0;for(const B of t.members){const L=await yc(f,B,k,[B.parseClassifier()]);k+=L+l}y=f.node().getBBox().height,y<=0&&(y=o/2),p=c.insert("g").attr("class","methods-group text");let v=0;for(const B of t.methods){const L=await yc(p,B,v,[B.parseClassifier()]);v+=L+l}let w=c.node().getBBox();if(h!==null){const B=h.node().getBBox();h.attr("transform",`translate(${-B.width/2})`)}return d.attr("transform",`translate(${-C.width/2}, ${g})`),w=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+o*2})`),w=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(y?y+o*4:o*2)})`),w=c.node().getBBox(),{shapeSvg:c,bbox:w}}S(VT,"textHelper");async function yc(e,t,i,a=[]){const o=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=_e();let c="useHtmlLabels"in t?t.useHtmlLabels:ea(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Ec(h)&&(c=!0);const d=await ia(o,$m(mo(h)),{width:Fa(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);let f,p=1;if(c){const g=d.children[0],x=Zt(d);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const C=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(k=>new Promise(v=>{function w(){var B;if(k.style.display="flex",k.style.flexDirection="column",C){const L=((B=l.fontSize)==null?void 0:B.toString())??window.getComputedStyle(document.body).fontSize,D=parseInt(L,10)*5+"px";k.style.minWidth=D,k.style.maxWidth=D}else k.style.width="100%";v(k)}S(w,"setupImage"),setTimeout(()=>{k.complete&&w()}),k.addEventListener("error",w),k.addEventListener("load",w)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{a.includes("font-weight: bolder")&&Zt(d).selectAll("tspan").attr("font-weight",""),p=d.children.length;const g=d.children[0];(d.textContent===""||d.textContent.includes("&gt"))&&(g.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),f=d.getBBox()}return o.attr("transform","translate(0,"+(-f.height/(2*p)+i)+")"),f.height}S(yc,"addText");async function XT(e,t){var q,H;const i=ce(),{themeVariables:a}=i,{useGradient:o}=a,l=i.class.padding??12,c=l,h=t.useHtmlLabels??ea(i.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];const{shapeSvg:f,bbox:p}=await VT(e,t,i,h,c),{labelStyles:g,nodeStyles:x}=Mt(t);t.labelStyle=g,t.cssStyles=d.styles||"";const y=((q=d.styles)==null?void 0:q.join(";"))||x||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=d.members.length===0&&d.methods.length===0&&!((H=i.class)!=null&&H.hideEmptyMembersBox),k=Lt.svg(f),v=Et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=Math.max(t.width??0,p.width);let B=Math.max(t.height??0,p.height);const L=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?B+=c:d.members.length>0&&d.methods.length===0&&(B+=c*2);const F=-w/2,D=-B/2;let z=C?l*2:d.members.length===0&&d.methods.length===0?-l:0;L&&(z=l*2);const N=k.rectangle(F-l,D-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0),w+2*l,B+2*l+z,v),P=f.insert(()=>N,":first-child");P.attr("class","basic label-container outer-path");const at=P.node().getBBox(),K=f.select(".annotation-group").node().getBBox().height-(C?l/2:0)||0,Y=f.select(".label-group").node().getBBox().height-(C?l/2:0)||0,W=f.select(".members-group").node().getBBox().height-(C?l/2:0)||0,X=(K+Y+D+l-(D-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((A,$,I)=>{var ut,mt;const Q=Zt(I[$]),lt=Q.attr("transform");let R=0;if(lt){const _t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(lt);_t&&(R=parseFloat(_t[2]))}let G=R+D+l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0);if(Q.attr("class").includes("methods-group")){const vt=Math.max(W,c/2);L?G=Math.max(X,K+Y+vt+D+c*2+l)+c*2:G=K+Y+vt+D+c*4+l}d.members.length===0&&d.methods.length===0&&((ut=i.class)!=null&&ut.hideEmptyMembersBox)&&(d.annotations.length>0?G=R-c:G=R),h||(G-=4);let ct=F;(Q.attr("class").includes("label-group")||Q.attr("class").includes("annotation-group"))&&(ct=-((mt=Q.node())==null?void 0:mt.getBBox().width)/2||0,f.selectAll("text").each(function(vt,_t,jt){window.getComputedStyle(jt[_t]).textAnchor==="middle"&&(ct=0)})),Q.attr("transform",`translate(${ct}, ${G})`)}),d.members.length>0||d.methods.length>0||C){const A=K+Y+D+l,$=k.line(at.x,A,at.x+at.width,A+.001,v);f.insert(()=>$).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(C||d.members.length>0||d.methods.length>0){const A=K+Y+W+D+c*2+l,$=k.line(at.x,L?Math.max(X,A):A,at.x+at.width,(L?Math.max(X,A):A)+.001,v);f.insert(()=>$).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(d.look!=="handDrawn"&&f.selectAll("path").attr("style",y),P.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",y),!h){const A=RegExp(/color\s*:\s*([^;]*)/),$=A.exec(y);if($){const I=$[0].replace("color","fill");f.selectAll("tspan").attr("style",I)}else if(g){const I=A.exec(g);if(I){const Q=I[0].replace("color","fill");f.selectAll("tspan").attr("style",Q)}}}return Rt(t,P),t.intersect=function(A){return Bt.rect(t,A)},f}S(XT,"classBox");async function QT(e,t){var at,K;const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const o=t,l=t,c=20,h=20,d="verifyMethod"in t,f=qt(t),{themeVariables:p}=ce(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,y=e.insert("g").attr("class",f).attr("id",t.domId??t.id);let C;d?C=await Gi(y,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):C=await Gi(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let k=C;const v=await Gi(y,o.name,k,t.labelStyle+"; font-weight: bold;");if(k+=v+h,d){const Y=await Gi(y,`${o.requirementId?`ID: ${o.requirementId}`:""}`,k,t.labelStyle);k+=Y;const W=await Gi(y,`${o.text?`Text: ${o.text}`:""}`,k,t.labelStyle);k+=W;const X=await Gi(y,`${o.risk?`Risk: ${o.risk}`:""}`,k,t.labelStyle);k+=X,await Gi(y,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,k,t.labelStyle)}else{const Y=await Gi(y,`${l.type?`Type: ${l.type}`:""}`,k,t.labelStyle);k+=Y,await Gi(y,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,k,t.labelStyle)}const w=(((at=y.node())==null?void 0:at.getBBox().width)??200)+c,B=(((K=y.node())==null?void 0:K.getBBox().height)??200)+c,L=-w/2,F=-B/2,D=Lt.svg(y),z=Et(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");const N=D.rectangle(L,F,w,B,z),P=y.insert(()=>N,":first-child");if(P.attr("class","basic label-container outer-path").attr("style",a),g!=null&&g.length){const Y=t.colorIndex??0;y.attr("data-color-id",`color-${Y%g.length}`)}if(y.selectAll(".label").each((Y,W,X)=>{const q=Zt(X[W]),H=q.attr("transform");let A=0,$=0;if(H){const R=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(H);R&&(A=parseFloat(R[1]),$=parseFloat(R[2]))}const I=$-B/2;let Q=L+c/2;(W===0||W===1)&&(Q=A),q.attr("transform",`translate(${Q}, ${I+c})`)}),k>C+v+h){const Y=F+C+v+h;let W;if(t.look==="neo"){const H=[[L,Y],[L+w,Y],[L+w,Y+.001],[L,Y+.001]];W=D.polygon(H,z)}else W=D.line(L,Y,L+w,Y,z);y.insert(()=>W).attr("class","divider")}return Rt(t,P),t.intersect=function(Y){return Bt.rect(t,Y)},a&&t.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",a),y}S(QT,"requirementBox");async function Gi(e,t,i,a=""){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",a),l=ce(),c=l.htmlLabels??!0,h=await ia(o,$m(mo(t)),{width:Fa(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);let d;if(c){const f=h.children[0],p=Zt(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}else{const f=h.children[0];for(const p of f.children)a&&p.setAttribute("style",a);d=h.getBBox(),d.height+=6}return o.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}S(Gi,"addText");var K4=S(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ZT(e,t,{config:i}){var W,X;const{labelStyles:a,nodeStyles:o}=Mt(t);t.labelStyle=a||"";const l=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:h,bbox:d,label:f}=await Ht(e,t,qt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&((W=i==null?void 0:i.kanban)!=null&&W.ticketBaseUrl)&&(g=(X=i==null?void 0:i.kanban)==null?void 0:X.ticketBaseUrl.replace("#TICKET#",t.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let C,k;x?{label:C,bbox:k}=await Cg(x,"ticket"in t&&t.ticket||"",y):{label:C,bbox:k}=await Cg(h,"ticket"in t&&t.ticket||"",y);const{label:v,bbox:w}=await Cg(h,"assigned"in t&&t.assigned||"",y);t.width=c;const B=10,L=(t==null?void 0:t.width)||0,F=Math.max(k.height,w.height)/2,D=Math.max(d.height+B*2,(t==null?void 0:t.height)||0)+F,z=-L/2,N=-D/2;f.attr("transform","translate("+(p-L/2)+", "+(-F-d.height/2)+")"),C.attr("transform","translate("+(p-L/2)+", "+(-F+d.height/2)+")"),v.attr("transform","translate("+(p+L/2-w.width-2*l)+", "+(-F+d.height/2)+")");let P;const{rx:at,ry:K}=t,{cssStyles:Y}=t;if(t.look==="handDrawn"){const q=Lt.svg(h),H=Et(t,{}),A=at||K?q.path(_n(z,N,L,D,at||0),H):q.rectangle(z,N,L,D,H);P=h.insert(()=>A,":first-child"),P.attr("class","basic label-container").attr("style",Y||null)}else{P=h.insert("rect",":first-child"),P.attr("class","basic label-container __APA__").attr("style",o).attr("rx",at??5).attr("ry",K??5).attr("x",z).attr("y",N).attr("width",L).attr("height",D);const q="priority"in t&&t.priority;if(q){const H=h.append("line"),A=z+2,$=N+Math.floor((at??0)/2),I=N+D-Math.floor((at??0)/2);H.attr("x1",A).attr("y1",$).attr("x2",A).attr("y2",I).attr("stroke-width","4").attr("stroke",K4(q))}}return Rt(t,P),t.height=D,t.intersect=function(q){return Bt.rect(t,q)},h}S(ZT,"kanbanItem");async function KT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Ht(e,t,qt(t)),d=l.width+10*c,f=l.height+8*c,p=.15*d,{cssStyles:g}=t,x=l.width+20,y=l.height+20,C=Math.max(d,x),k=Math.max(f,y);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let v;const w=`M0 0 
    a${p},${p} 1 0,0 ${C*.25},${-1*k*.1}
    a${p},${p} 1 0,0 ${C*.25},0
    a${p},${p} 1 0,0 ${C*.25},0
    a${p},${p} 1 0,0 ${C*.25},${k*.1}

    a${p},${p} 1 0,0 ${C*.15},${k*.33}
    a${p*.8},${p*.8} 1 0,0 0,${k*.34}
    a${p},${p} 1 0,0 ${-1*C*.15},${k*.33}

    a${p},${p} 1 0,0 ${-1*C*.25},${k*.15}
    a${p},${p} 1 0,0 ${-1*C*.25},0
    a${p},${p} 1 0,0 ${-1*C*.25},0
    a${p},${p} 1 0,0 ${-1*C*.25},${-1*k*.15}

    a${p},${p} 1 0,0 ${-1*C*.1},${-1*k*.33}
    a${p*.8},${p*.8} 1 0,0 0,${-1*k*.34}
    a${p},${p} 1 0,0 ${C*.1},${-1*k*.33}
  H0 V0 Z`;if(t.look==="handDrawn"){const B=Lt.svg(o),L=Et(t,{}),F=B.path(w,L);v=o.insert(()=>F,":first-child"),v.attr("class","basic label-container").attr("style",rr(g))}else v=o.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",w);return v.attr("transform",`translate(${-C/2}, ${-k/2})`),Rt(t,v),t.calcIntersect=function(B,L){return Bt.rect(B,L)},t.intersect=function(B){return gt.info("Bang intersect",t,B),Bt.rect(t,B)},o}S(KT,"bang");async function JT(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Ht(e,t,qt(t)),d=l.width+2*c,f=l.height+2*c,p=.15*d,g=.25*d,x=.35*d,y=.2*d,{cssStyles:C}=t;let k;const v=`M0 0 
    a${p},${p} 0 0,1 ${d*.25},${-1*d*.1}
    a${x},${x} 1 0,1 ${d*.4},${-1*d*.1}
    a${g},${g} 1 0,1 ${d*.35},${d*.2}

    a${p},${p} 1 0,1 ${d*.15},${f*.35}
    a${y},${y} 1 0,1 ${-1*d*.15},${f*.65}

    a${g},${p} 1 0,1 ${-1*d*.25},${d*.15}
    a${x},${x} 1 0,1 ${-1*d*.5},0
    a${p},${p} 1 0,1 ${-1*d*.25},${-1*d*.15}

    a${p},${p} 1 0,1 ${-1*d*.1},${-1*f*.35}
    a${y},${y} 1 0,1 ${d*.1},${-1*f*.65}
  H0 V0 Z`;if(t.look==="handDrawn"){const w=Lt.svg(o),B=Et(t,{}),L=w.path(v,B);k=o.insert(()=>L,":first-child"),k.attr("class","basic label-container").attr("style",rr(C))}else k=o.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",v);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),k.attr("transform",`translate(${-d/2}, ${-f/2})`),Rt(t,k),t.calcIntersect=function(w,B){return Bt.rect(w,B)},t.intersect=function(w){return gt.info("Cloud intersect",t,w),Bt.rect(t,w)},o}S(JT,"cloud");async function t_(e,t){const{labelStyles:i,nodeStyles:a}=Mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Ht(e,t,qt(t)),d=l.width+8*c,f=l.height+2*c,p=5,g=t.look==="neo"?`
    M${-d/2} ${f/2-p}
    v${-f+2*p}
    q0,-${p} ${p},-${p}
    h${d-2*p}
    q${p},0 ${p},${p}
    v${f-p}
    H${-d/2}
    Z
  `:`
    M${-d/2} ${f/2-p}
    v${-f+2*p}
    q0,-${p} ${p},-${p}
    h${d-2*p}
    q${p},0 ${p},${p}
    v${f-2*p}
    q0,${p} ${-p},${p}
    h${-(d-2*p)}
    q${-p},0 ${-p},${-p}
    Z
  `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",a).attr("d",g);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),o.append(()=>h.node()),Rt(t,x),t.calcIntersect=function(y,C){return Bt.rect(y,C)},t.intersect=function(y){return Bt.rect(t,y)},o}S(t_,"defaultMindmapNode");async function e_(e,t){const i={padding:t.padding??0};return By(e,t,i)}S(e_,"mindmapCircle");var J4=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:FT},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:LT},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:DT},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$T},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:eT},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:rT},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:By},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:KT},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:JT},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:_T},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cT},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bT},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xT},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:HT},{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:mT},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:aT},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:IT},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Gw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:AT},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zT},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:OT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:sT},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hT},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Zw},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Kw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jw},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:CT},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:UT},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:lT},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jT},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vT},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tT},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:iT},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:WT},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:GT},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:nT},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:PT},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:oT},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:MT},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:wT},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ST},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Yw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Qw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qT},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:NT},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:YT},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:BT},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:kT}],t6=S(()=>{const t=[...Object.entries({state:RT,choice:Vw,note:TT,rectWithTitle:ET,labelRect:yT,iconSquare:pT,iconCircle:dT,icon:uT,iconRounded:fT,imageSquare:gT,anchor:Ww,kanbanItem:ZT,mindmapCircle:e_,defaultMindmapNode:t_,classBox:XT,erBox:Ey,requirementBox:QT}),...J4.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(o=>[o,i.handler]))];return Object.fromEntries(t)},"generateShapeMap"),r_=t6();function e6(e){return e in r_}S(e6,"isValidShape");var qd=new Map;async function i_(e,t,i){let a,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?r_[t.shape]:void 0;if(!l)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;i.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),a=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),o=await l(a,t,i)}else o=await l(e,t,i),a=o;return a.attr("data-look",rr(t.look)),t.tooltip&&o.attr("title",t.tooltip),qd.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}S(i_,"insertNode");var x7=S((e,t)=>{qd.set(t.id,e)},"setNodeElem"),b7=S(()=>{qd.clear()},"clear"),C7=S(e=>{const t=qd.get(e.id);gt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const i=8,a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-i)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode"),lc=S((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const i=e.x??0,a=e.y??0;return"translate("+-(i+e.width/2)+", "+-(a+e.height/2)+")"},"computeLabelTransform"),br={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},hv={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xc(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Te(e),t=Te(t);const[i,a]=[e.x,e.y],[o,l]=[t.x,t.y],c=o-i,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}S(xc,"calculateDeltaAndAngle");var Te=S(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),r6=S(e=>({x:S(function(t,i,a){let o=0;const l=Te(a[0]).x<Te(a[a.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(br,e.arrowTypeStart)){const{angle:y,deltaX:C}=xc(a[0],a[1]);o=br[e.arrowTypeStart]*Math.cos(y)*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(br,e.arrowTypeEnd)){const{angle:y,deltaX:C}=xc(a[a.length-1],a[a.length-2]);o=br[e.arrowTypeEnd]*Math.cos(y)*(C>=0?1:-1)}const c=Math.abs(Te(t).x-Te(a[a.length-1]).x),h=Math.abs(Te(t).y-Te(a[a.length-1]).y),d=Math.abs(Te(t).x-Te(a[0]).x),f=Math.abs(Te(t).y-Te(a[0]).y),p=br[e.arrowTypeStart],g=br[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="right"?-1:1,o-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="right"?-1:1,o+=y}return Te(t).x+o},"x"),y:S(function(t,i,a){let o=0;const l=Te(a[0]).y<Te(a[a.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(br,e.arrowTypeStart)){const{angle:y,deltaY:C}=xc(a[0],a[1]);o=br[e.arrowTypeStart]*Math.abs(Math.sin(y))*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(br,e.arrowTypeEnd)){const{angle:y,deltaY:C}=xc(a[a.length-1],a[a.length-2]);o=br[e.arrowTypeEnd]*Math.abs(Math.sin(y))*(C>=0?1:-1)}const c=Math.abs(Te(t).y-Te(a[a.length-1]).y),h=Math.abs(Te(t).x-Te(a[a.length-1]).x),d=Math.abs(Te(t).y-Te(a[0]).y),f=Math.abs(Te(t).x-Te(a[0]).x),p=br[e.arrowTypeStart],g=br[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="up"?-1:1,o-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="up"?-1:1,o+=y}return Te(t).y+o},"y")}),"getLineFunctionsWithOffset"),i6=S((e,t,i,a,o,l=!1,c)=>{t.arrowTypeStart&&uv(e,"start",t.arrowTypeStart,i,a,o,l,c),t.arrowTypeEnd&&uv(e,"end",t.arrowTypeEnd,i,a,o,l,c)},"addEdgeMarkers"),a6={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},n6=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],uv=S((e,t,i,a,o,l,c=!1,h)=>{var C;const d=a6[i],f=d&&n6.includes(d.type);if(!d){gt.warn(`Unknown arrow type: ${i}`);return}const p=d.type,y=`${o}_${l}-${p}${t==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const k=h.replace(/[^\dA-Za-z]/g,"_"),v=`${y}_${k}`;if(!document.getElementById(v)){const w=document.getElementById(y);if(w){const B=w.cloneNode(!0);B.id=v,B.querySelectorAll("path, circle, line").forEach(F=>{F.setAttribute("stroke",h),d.fill&&F.setAttribute("fill",h)}),(C=w.parentNode)==null||C.appendChild(B)}}e.attr(`marker-${t}`,`url(${a}#${v})`)}else e.attr(`marker-${t}`,`url(${a}#${y})`)},"addEdgeMarker"),o6=S(e=>{var t,i;return typeof e=="string"?e:(i=(t=ce())==null?void 0:t.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),xd=new Map,dr=new Map,v7=S(()=>{xd.clear(),dr.clear()},"clear"),cc=S(e=>e?typeof e=="string"?e:e.reduce((t,i)=>t+";"+i,""):"","getLabelStyles"),s6=S(async(e,t)=>{const i=ce();let a=Lr(i);const{labelStyles:o}=Mt(t);t.labelStyle=o;const l=e.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label").attr("data-id",t.id),h=t.labelType==="markdown",f=await ia(e,t.label,{style:cc(t.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(f),gt.info("abc82",t,t.labelType);let p=f.getBBox(),g=p;if(a){const y=f.children[0],C=Zt(f);p=y.getBoundingClientRect(),g=p,C.attr("width",p.width),C.attr("height",p.height)}else{const y=Zt(f).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",lc(g,a)),xd.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await yn(C,t.startLabelLeft,cc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const w=k.children[0],B=Zt(k);v=w.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",lc(v,a)),dr.get(t.id)||dr.set(t.id,{}),dr.get(t.id).startLeft=y,bc(x,t.startLabelLeft)}if(t.startLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await yn(C,t.startLabelRight,cc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const w=k.children[0],B=Zt(k);v=w.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",lc(v,a)),dr.get(t.id)||dr.set(t.id,{}),dr.get(t.id).startRight=y,bc(x,t.startLabelRight)}if(t.endLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await yn(y,t.endLabelLeft,cc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const w=k.children[0],B=Zt(k);v=w.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",lc(v,a)),dr.get(t.id)||dr.set(t.id,{}),dr.get(t.id).endLeft=y,bc(x,t.endLabelLeft)}if(t.endLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await yn(y,t.endLabelRight,cc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const w=k.children[0],B=Zt(k);v=w.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",lc(v,a)),dr.get(t.id)||dr.set(t.id,{}),dr.get(t.id).endRight=y,bc(x,t.endLabelRight)}return f},"insertEdgeLabel");function bc(e,t){Lr(ce())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}S(bc,"setTerminalWidth");var l6=S((e,t)=>{gt.debug("Moving label abc88 ",e.id,e.label,xd.get(e.id),t);let i=t.updatedPath?t.updatedPath:t.originalPath;const a=ce(),{subGraphTitleTotalMargin:o}=py(a);if(e.label){const l=xd.get(e.id);let c=e.x,h=e.y;if(i){const d=Ei.calcLabelPosition(i);gt.debug("Moving label "+e.label+" from (",c,",",h,") to (",d.x,",",d.y,") abc88"),t.updatedPath&&(c=d.x,h=d.y)}l.attr("transform",`translate(${c}, ${h+o/2})`)}if(e.startLabelLeft){const l=dr.get(e.id).startLeft;let c=e.x,h=e.y;if(i){const d=Ei.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=dr.get(e.id).startRight;let c=e.x,h=e.y;if(i){const d=Ei.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=dr.get(e.id).endLeft;let c=e.x,h=e.y;if(i){const d=Ei.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=dr.get(e.id).endRight;let c=e.x,h=e.y;if(i){const d=Ei.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),c6=S((e,t)=>{var c;if(!(e!=null&&e.isLabelEdge)||!((c=e==null?void 0:e.id)!=null&&c.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[i,a]=t,o=Math.abs(a.x-i.x),l=Math.abs(a.y-i.y);return o<.001||l<.001?t:l>=o?[i,{x:i.x,y:a.y},a]:[i,{x:a.x,y:i.y},a]},"orthogonalizeToLabelClippedPoints"),h6=S((e,t)=>{const i=e.x,a=e.y,o=Math.abs(t.x-i),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return o>=c||l>=h},"outsideNode"),u6=S((e,t,i)=>{gt.debug(`intersection calc abc89:
  outsidePoint: ${JSON.stringify(t)}
  insidePoint : ${JSON.stringify(i)}
  node        : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,o=e.y,l=Math.abs(a-i.x),c=e.width/2;let h=i.x<t.x?c-l:c+l;const d=e.height/2,f=Math.abs(t.y-i.y),p=Math.abs(t.x-i.x);if(Math.abs(o-t.y)*c>Math.abs(a-t.x)*d){let g=i.y<t.y?t.y-d-o:o-d-t.y;h=p*g/f;const x={x:i.x<t.x?i.x+h:i.x-p+h,y:i.y<t.y?i.y+f-g:i.y-f+g};return h===0&&(x.x=t.x,x.y=t.y),p===0&&(x.x=t.x),f===0&&(x.y=t.y),gt.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,x),x}else{i.x<t.x?h=t.x-c-a:h=a-c-t.x;let g=f*h/p,x=i.x<t.x?i.x+p-h:i.x-p+h,y=i.y<t.y?i.y+g:i.y-g;return gt.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:y}),h===0&&(x=t.x,y=t.y),p===0&&(x=t.x),f===0&&(y=t.y),{x,y}}},"intersection"),dv=S((e,t)=>{gt.warn("abc88 cutPathAtIntersect",e,t);let i=[],a=e[0],o=!1;return e.forEach(l=>{if(gt.info("abc88 checking point",l,t),!h6(t,l)&&!o){const c=u6(t,a,l);gt.debug("abc88 inside",l,a,c),gt.debug("abc88 intersection",c,t);let h=!1;i.forEach(d=>{h=h||d.x===c.x&&d.y===c.y}),i.some(d=>d.x===c.x&&d.y===c.y)?gt.warn("abc88 no intersect",c,i):i.push(c),o=!0}else gt.warn("abc88 outside",l,a),a=l,o||i.push(l)}),gt.debug("returning points",i),i},"cutPathAtIntersect");function a_(e){const t=[],i=[];for(let a=1;a<e.length-1;a++){const o=e[a-1],l=e[a],c=e[a+1];(o.x===l.x&&l.y===c.y&&Math.abs(l.x-c.x)>5&&Math.abs(l.y-o.y)>5||o.y===l.y&&l.x===c.x&&Math.abs(l.x-o.x)>5&&Math.abs(l.y-c.y)>5)&&(t.push(l),i.push(a))}return{cornerPoints:t,cornerPointPositions:i}}S(a_,"extractCornerPoints");var fv=S(function(e,t,i){const a=t.x-e.x,o=t.y-e.y,l=Math.sqrt(a*a+o*o),c=i/l;return{x:t.x-c*a,y:t.y-c*o}},"findAdjacentPoint"),d6=S(function(e){const{cornerPointPositions:t}=a_(e),i=[];for(let a=0;a<e.length;a++)if(t.includes(a)){const o=e[a-1],l=e[a+1],c=e[a],h=fv(o,c,5),d=fv(l,c,5),f=d.x-h.x,p=d.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(l.x-o.x)>10&&Math.abs(l.y-o.y)>=10){gt.debug("Corner point fixing",Math.abs(l.x-o.x),Math.abs(l.y-o.y));const y=5;c.x===h.x?x={x:f<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:x={x:f<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else gt.debug("Corner point skipping fixing",Math.abs(l.x-o.x),Math.abs(l.y-o.y));i.push(x,d)}else i.push(e[a]);return i},"fixCorners"),f6=S((e,t,i)=>{const a=e-t-i,o=2,l=2,c=o+l,h=Math.floor(a/c),d=Array(h).fill(`${o} ${l}`).join(" ");return`0 ${t} ${d} ${i}`},"generateDashArray"),p6=S(function(e,t,i,a,o,l,c,h=!1){var I;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:d,layout:f}=ce();let p=t.points,g=!1;const x=o;var y=l;const C=[];for(const Q in t.cssCompiledStyles)IS(Q)||C.push(t.cssCompiledStyles[Q]);if(f==="swimlane"){if(y.intersect&&x.intersect&&Array.isArray(p)&&p.length>=2)if(p.length===2)p=[x.intersect(p[0]),y.intersect(p[1])];else{const Q=p.slice(1,-1),lt=Q[0],R=Q[Q.length-1],G=.5,ct=Math.abs(p[p.length-1].x-R.x)<G&&Math.abs(p[p.length-1].y-R.y)<G,ut=x.intersect(lt),mt=ct?R:y.intersect(R),vt=Math.abs(mt.x-R.x)<G&&Math.abs(mt.y-R.y)<G,jt=Math.abs(ut.x-lt.x)<G&&Math.abs(ut.y-lt.y)<G?[]:[ut],Nt=vt?[]:[mt];p=[...jt,...Q,...Nt]}p=c6(t,p)}else y.intersect&&x.intersect&&!h&&(p=p.slice(1,t.points.length-1),p.unshift(x.intersect(p[0])),p.push(y.intersect(p[p.length-1])));const k=btoa(JSON.stringify(p));t.toCluster&&(gt.info("to cluster abc88",i.get(t.toCluster)),p=dv(t.points,i.get(t.toCluster).node),g=!0),t.fromCluster&&(gt.debug("from cluster abc88",i.get(t.fromCluster),JSON.stringify(p,null,2)),p=dv(p.reverse(),i.get(t.fromCluster).node).reverse(),g=!0);let v=p.filter(Q=>!Number.isNaN(Q.y));const w=o6(t.curve);w!=="rounded"&&(v=d6(v));let B=wc;switch(w){case"linear":B=wc;break;case"basis":B=Pg;break;case"cardinal":B=Wk;break;case"bumpX":B=qk;break;case"bumpY":B=Ik;break;case"catmullRom":B=Yk;break;case"monotoneX":B=Kk;break;case"monotoneY":B=Jk;break;case"natural":B=e2;break;case"step":B=r2;break;case"stepAfter":B=a2;break;case"stepBefore":B=i2;break;case"rounded":B=wc;break;default:B=Pg}const{x:L,y:F}=r6(t),D=HD().x(L).y(F).curve(B);let z;switch(t.thickness){case"normal":z="edge-thickness-normal";break;case"thick":z="edge-thickness-thick";break;case"invisible":z="edge-thickness-invisible";break;default:z="edge-thickness-normal"}switch(t.pattern){case"solid":z+=" edge-pattern-solid";break;case"dotted":z+=" edge-pattern-dotted";break;case"dashed":z+=" edge-pattern-dashed";break;default:z+=" edge-pattern-solid"}let N,P=w==="rounded"?n_(o_(v,t),5):D(v);const at=Array.isArray(t.style)?t.style:[t.style];let K=at.find(Q=>Q==null?void 0:Q.startsWith("stroke:")),Y="";t.animate&&(Y="edge-animation-fast"),t.animation&&(Y="edge-animation-"+t.animation);let W=!1;if(t.look==="handDrawn"){const Q=Lt.svg(e);Object.assign([],v);const lt=Q.path(P,{roughness:.3,seed:d});z+=" transition",N=Zt(lt).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+z+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",at?at.reduce((G,ct)=>G+";"+ct,""):"");let R=N.attr("d");N.attr("d",R),e.node().appendChild(N.node())}else{const Q=C.join(";"),lt=at?at.reduce((vt,_t)=>vt+_t+";",""):"",R=(Q?Q+";"+lt+";":lt)+";"+(at?at.reduce((vt,_t)=>vt+";"+_t,""):"");N=e.append("path").attr("d",P).attr("id",`${c}-${t.id}`).attr("class"," "+z+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",R),K=(I=R.match(/stroke:([^;]+)/))==null?void 0:I[1],W=t.animate===!0||!!t.animation||Q.includes("animation");const G=N.node(),ct=typeof G.getTotalLength=="function"?G.getTotalLength():0,ut=hv[t.arrowTypeStart]||0,mt=hv[t.arrowTypeEnd]||0;if(t.look==="neo"&&!W){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?f6(ct,ut,mt):`0 ${ut} ${ct-ut-mt} ${mt}`}; stroke-dashoffset: 0;`;N.attr("style",_t+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",t.id),N.attr("data-points",k),N.attr("data-look",rr(t.look)),t.showPoints&&v.forEach(Q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Q.x).attr("cy",Q.y)});let X="";(ce().flowchart.arrowMarkerAbsolute||ce().state.arrowMarkerAbsolute)&&(X=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,X=X.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),gt.info("arrowTypeStart",t.arrowTypeStart),gt.info("arrowTypeEnd",t.arrowTypeEnd);const q=!W&&(t==null?void 0:t.look)==="neo";i6(N,t,X,c,a,q,K);const H=Math.floor(p.length/2),A=p[H];Ei.isLabelCoordinateInPath(A,N.attr("d"))||(g=!0);let $={};return g&&($.updatedPath=p),$.originalPath=t.points,$},"insertEdge");function n_(e,t){if(e.length<2)return"";let i="";const a=e.length,o=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],d=e[l+1];if(l===0)i+=`M${c.x},${c.y}`;else if(l===a-1)i+=`L${c.x},${c.y}`;else{const f=c.x-h.x,p=c.y-h.y,g=d.x-c.x,x=d.y-c.y,y=Math.hypot(f,p),C=Math.hypot(g,x);if(y<o||C<o){i+=`L${c.x},${c.y}`;continue}const k=f/y,v=p/y,w=g/C,B=x/C,L=k*w+v*B,F=Math.max(-1,Math.min(1,L)),D=Math.acos(F);if(D<o||Math.abs(Math.PI-D)<o){i+=`L${c.x},${c.y}`;continue}const z=Math.min(t/Math.sin(D/2),y/2,C/2),N=c.x-k*z,P=c.y-v*z,at=c.x+w*z,K=c.y+B*z;i+=`L${N},${P}`,i+=`Q${c.x},${c.y} ${at},${K}`}}return i}S(n_,"generateRoundedPath");function bm(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const i=t.x-e.x,a=t.y-e.y;return{angle:Math.atan2(a,i),deltaX:i,deltaY:a}}S(bm,"calculateDeltaAndAngle");function o_(e,t){const i=e.map(o=>({...o}));if(e.length>=2&&br[t.arrowTypeStart]){const o=br[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=bm(l,c),d=o*Math.cos(h),f=o*Math.sin(h);i[0].x=l.x+d,i[0].y=l.y+f}const a=e.length;if(a>=2&&br[t.arrowTypeEnd]){const o=br[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=bm(c,l),d=o*Math.cos(h),f=o*Math.sin(h);i[a-1].x=l.x-d,i[a-1].y=l.y-f}return i}S(o_,"applyMarkerOffsetsToPoints");var g6=S((e,t,i,a)=>{t.forEach(o=>{N6[o](e,i,a)})},"insertMarkers"),m6=S((e,t,i)=>{gt.trace("Making markers for ",i),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",i+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),y6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),x6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),b6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),C6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),v6=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),k6=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),S6=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",i+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),w6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),T6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{transitionColor:l}=o;e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${l}`)},"barbNeo"),_6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),B6=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),a.append("path").attr("d","M9,0 L9,18");const o=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),E6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),L6=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),A6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l}=o;e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${l}`)},"only_one_neo"),M6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l,mainBkg:c}=o,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${l}`);const d=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),F6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l}=o;e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${l}`)},"one_or_more_neo"),D6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l,mainBkg:c}=o,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${l}`);const d=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),R6=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
      L20,10
      M20,10
      L0,20`)},"requirement_arrow"),O6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l}=o;e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${l}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
      L20,10
      M20,10
      L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),z6=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),$6=S((e,t,i)=>{const a=_e(),{themeVariables:o}=a,{strokeWidth:l}=o,c=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${l}`)},"requirement_contains_neo"),N6={extension:m6,composition:y6,aggregation:x6,dependency:b6,lollipop:C6,point:v6,circle:k6,cross:S6,barb:w6,barbNeo:T6,only_one:_6,zero_or_one:B6,one_or_more:E6,zero_or_more:L6,only_one_neo:A6,zero_or_one_neo:M6,one_or_more_neo:F6,zero_or_more_neo:D6,requirement_arrow:R6,requirement_contains:z6,requirement_arrow_neo:O6,requirement_contains_neo:$6},q6=g6,I6={common:jc,getConfig:_e,insertCluster:O4,insertEdge:p6,insertEdgeLabel:s6,insertMarkers:q6,insertNode:i_,interpolateToCurve:ly,labelHelper:Ht,log:gt,positionEdgeLabel:l6},Nc={},s_=S(e=>{for(const t of e)Nc[t.name]=t},"registerLayoutLoaders"),j6=S(()=>{s_([{name:"dagre",loader:S(async()=>await Xt(()=>import("./dagre-VKFMJZFB-q3IRkwCw.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader")},{name:"swimlane",loader:S(async()=>await Xt(()=>import("./swimlanes-5IMT3BWC-CmQ2pFlk.js"),__vite__mapDeps([5,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:S(async()=>await Xt(()=>import("./cose-bilkent-JH36ORCC-BEJOTnY0.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");j6();var k7=S(async(e,t,i)=>{if(!(e.layoutAlgorithm in Nc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const g of e.nodes){const x=g.domId||g.id;g.domId=`${e.diagramId}-${x}`}const a=Nc[e.layoutAlgorithm],o=await a.loader(),{theme:l,themeVariables:c}=e.config,{useGradient:h,gradientStart:d,gradientStop:f}=c,p=t.attr("id");if(t.append("defs").append("filter").attr("id",`${p}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${l!=null&&l.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${p}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${l!=null&&l.includes("dark")?"#FFFFFF":"#000000"}`),h){const g=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");g.append("svg:stop").attr("offset","0%").attr("stop-color",d).attr("stop-opacity",1),g.append("svg:stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}return o.render(e,t,I6,{algorithm:a.algorithm},i)},"render"),S7=S((e="",{fallback:t="dagre"}={})=>{if(e in Nc)return e;if(t in Nc)return gt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ly="comm",l_="rule",c_="decl",H6="@media",P6="@import",W6="@supports",U6="@namespace",Cm="@keyframes",h_="@layer",Y6="@scope",G6=Math.abs,_c=String.fromCharCode;function u_(e){return e.trim()}function vm(e,t,i){return e.replace(t,i)}function Es(e,t){return e.charCodeAt(t)|0}function Xs(e,t,i){return e.slice(t,i)}function Xi(e){return e.length}function d_(e){return e.length}function wu(e,t){return t.push(e),e}var Id=1,Qs=1,f_=0,gi=0,He=0,Js="";function Ay(e,t,i,a,o,l,c,h){return{value:e,root:t,parent:i,type:a,props:o,children:l,line:Id,column:Qs,length:c,return:"",siblings:h}}function V6(){return He}function X6(){return He=gi>0?Es(Js,--gi):0,Qs--,He===10&&(Qs=1,Id--),He}function Ai(){return He=gi<f_?Es(Js,gi++):0,Qs++,He===10&&(Qs=1,Id++),He}function xn(){return Es(Js,gi)}function ju(){return gi}function jd(e,t){return Xs(Js,e,t)}function qc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Q6(e){return Id=Qs=1,f_=Xi(Js=e),gi=0,[]}function Z6(e){return Js="",e}function kg(e){return u_(jd(gi-1,km(e===91?e+2:e===40?e+1:e)))}function K6(e){for(;(He=xn())&&He<33;)Ai();return qc(e)>2||qc(He)>3?"":" "}function J6(e,t){for(;--t&&Ai()&&!(He<48||He>102||He>57&&He<65||He>70&&He<97););return jd(e,ju()+(t<6&&xn()==32&&Ai()==32))}function km(e){for(;Ai();)switch(He){case e:return gi;case 34:case 39:e!==34&&e!==39&&km(He);break;case 40:e===41&&km(e);break;case 92:Ai();break}return gi}function t8(e,t){for(;Ai()&&e+He!==57;)if(e+He===84&&xn()===47)break;return"/*"+jd(t,gi-1)+"*"+_c(e===47?e:Ai())}function e8(e){for(;!qc(xn());)Ai();return jd(e,gi)}function r8(e){return Z6(Hu("",null,null,null,[""],e=Q6(e),0,[0],e))}function Hu(e,t,i,a,o,l,c,h,d){for(var f=0,p=0,g=c,x=0,y=0,C=0,k=1,v=1,w=1,B=0,L=0,F="",D=o,z=l,N=a,P=F;v;)switch(C=L,L=Ai()){case 40:C!=108&&Es(P,g-1)==58?(B++,P+="("):P+=kg(L);break;case 41:B--,P+=")";break;case 34:case 39:case 91:P+=kg(L);break;case 9:case 10:case 13:case 32:if(B>0){P+=_c(L);break}P+=K6(C);break;case 92:P+=J6(ju()-1,7);continue;case 47:switch(xn()){case 42:case 47:wu(i8(t8(Ai(),ju()),t,i,d),d),(qc(C||1)==5||qc(xn()||1)==5)&&Xi(P)&&Xs(P,-1,void 0)!==" "&&(P+=" ");break;default:P+="/"}break;case 123*k:h[f++]=Xi(P)*w;case 125*k:case 59:case 0:if(B>0&&L){P+=_c(L);break}switch(L){case 0:case 125:v=0;case 59+p:w==-1&&(P=vm(P,/\f/g,"")),y>0&&(Xi(P)-g||k===0)&&wu(y>32?gv(P+";",a,i,g-1,d):gv(vm(P," ","")+";",a,i,g-2,d),d);break;case 59:P+=";";default:if(wu(N=pv(P,t,i,f,p,o,h,F,D=[],z=[],g,l),l),L===123)if(p===0)Hu(P,t,N,N,D,l,g,h,z);else{switch(x){case 99:if(Es(P,3)===110)break;case 108:if(Es(P,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Hu(e,N,N,a&&wu(pv(e,N,N,0,0,o,h,F,o,D=[],g,z),z),o,z,g,h,a?D:z):Hu(P,N,N,N,[""],z,0,h,z)}}f=p=y=0,k=w=1,F=P="",g=c;break;case 58:g=1+Xi(P),y=C;default:if(k<1){if(L==123)--k;else if(L==125&&k++==0&&X6()==125)continue}switch(P+=_c(L),L*k){case 38:w=p>0?1:(P+="\f",-1);break;case 44:if(B>0)break;h[f++]=(Xi(P)-1)*w,w=1;break;case 64:xn()===45&&(P+=kg(Ai())),x=xn(),p=g=Xi(F=P+=e8(ju())),L++;break;case 45:C===45&&Xi(P)==2&&(k=0)}}return l}function pv(e,t,i,a,o,l,c,h,d,f,p,g){for(var x=o-1,y=o===0?l:[""],C=d_(y),k=0,v=0,w=0;k<a;++k)for(var B=0,L=Xs(e,x+1,x=G6(v=c[k])),F=e;B<C;++B)(F=u_(v>0?y[B]+" "+L:vm(L,/&\f/g,y[B])))&&(d[w++]=F);return Ay(e,t,i,o===0?l_:h,d,f,p,g)}function i8(e,t,i,a){return Ay(e,t,i,Ly,_c(V6()),Xs(e,2,-2),0,a)}function gv(e,t,i,a,o){return Ay(e,t,i,c_,Xs(e,0,a),Xs(e,a+1,-1),a,o)}function Sm(e,t){for(var i="",a=0;a<e.length;a++)i+=t(e[a],a,e,t)||"";return i}function a8(e,t,i,a){switch(e.type){case h_:if(e.children.length)break;case P6:case U6:case c_:return e.return=e.return||e.value;case Ly:return"";case Cm:return e.return=e.value+"{"+Sm(e.children,a)+"}";case l_:if(!Xi(e.value=e.props.join(",")))return""}return Xi(i=Sm(e.children,a))?e.return=e.value+"{"+i+"}":""}function n8(e){var t=d_(e);return function(i,a,o,l){for(var c="",h=0;h<t;h++)c+=e[h](i,a,o,l)||"";return c}}var p_="c4",o8=S(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-CbmDPYiP.js");return{diagram:t}},__vite__mapDeps([8,9]),import.meta.url);return{id:p_,diagram:e}},"loader"),l8={id:p_,detector:o8,loader:s8},c8=l8,g_="flowchart",h8=S((e,t)=>{var i,a;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),u8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-IGRag_A_.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:g_,diagram:e}},"loader"),d8={id:g_,detector:h8,loader:u8},f8=d8,m_="flowchart-v2",p8=S((e,t)=>{var i,a,o;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((o=t==null?void 0:t.flowchart)==null?void 0:o.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),g8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-IGRag_A_.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:m_,diagram:e}},"loader"),m8={id:m_,detector:p8,loader:g8},y8=m8,y_="swimlane",x8=S(e=>/^\s*swimlane-beta\b/.test(e),"detector"),b8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-CbrvpYke.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,14]),import.meta.url);return{id:y_,diagram:e}},"loader"),C8={id:y_,detector:x8,loader:b8},v8=C8,x_="er",k8=S(e=>/^\s*erDiagram/.test(e),"detector"),S8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-BbNOYVdM.js");return{diagram:t}},__vite__mapDeps([16,12,13,14]),import.meta.url);return{id:x_,diagram:e}},"loader"),w8={id:x_,detector:k8,loader:S8},T8=w8,b_="gitGraph",_8=S(e=>/^\s*gitGraph/.test(e),"detector"),B8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-puiitGV_.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]),import.meta.url);return{id:b_,diagram:e}},"loader"),E8={id:b_,detector:_8,loader:B8},L8=E8,C_="gantt",A8=S(e=>/^\s*gantt/.test(e),"detector"),M8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-BCXu_P4y.js");return{diagram:t}},__vite__mapDeps([21,22,23,24]),import.meta.url);return{id:C_,diagram:e}},"loader"),F8={id:C_,detector:A8,loader:M8},D8=F8,v_="info",R8=S(e=>/^\s*info/.test(e),"detector"),O8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-BJB74rqC.js");return{diagram:t}},__vite__mapDeps([25,20]),import.meta.url);return{id:v_,diagram:e}},"loader"),z8={id:v_,detector:R8,loader:O8},k_="pie",$8=S(e=>/^\s*pie/.test(e),"detector"),N8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-BGSUOVcV.js");return{diagram:t}},__vite__mapDeps([26,19,20,27,28,23]),import.meta.url);return{id:k_,diagram:e}},"loader"),q8={id:k_,detector:$8,loader:N8},S_="quadrantChart",I8=S(e=>/^\s*quadrantChart/.test(e),"detector"),j8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-BOdUL_Jk.js");return{diagram:t}},__vite__mapDeps([29,22,23,24]),import.meta.url);return{id:S_,diagram:e}},"loader"),H8={id:S_,detector:I8,loader:j8},P8=H8,w_="xychart",W8=S(e=>/^\s*xychart(-beta)?/.test(e),"detector"),U8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-C3vpOpc1.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24]),import.meta.url);return{id:w_,diagram:e}},"loader"),Y8={id:w_,detector:W8,loader:U8},G8=Y8,T_="requirement",V8=S(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),X8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-DNjLgaYM.js");return{diagram:t}},__vite__mapDeps([31,12,13]),import.meta.url);return{id:T_,diagram:e}},"loader"),Q8={id:T_,detector:V8,loader:X8},Z8=Q8,__="sequence",K8=S(e=>/^\s*sequenceDiagram/.test(e),"detector"),J8=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-DLiwRf0d.js");return{diagram:t}},__vite__mapDeps([32,18,9]),import.meta.url);return{id:__,diagram:e}},"loader"),t$={id:__,detector:K8,loader:J8},e$=t$,B_="class",r$=S((e,t)=>{var i;return((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),i$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-CnCUM-rR.js");return{diagram:t}},__vite__mapDeps([33,34,11,12,13,9]),import.meta.url);return{id:B_,diagram:e}},"loader"),a$={id:B_,detector:r$,loader:i$},n$=a$,E_="classDiagram",o$=S((e,t)=>{var i;return/^\s*classDiagram/.test(e)&&((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),s$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-CnCUM-rR.js");return{diagram:t}},__vite__mapDeps([35,34,11,12,13,9]),import.meta.url);return{id:E_,diagram:e}},"loader"),l$={id:E_,detector:o$,loader:s$},c$=l$,L_="state",h$=S((e,t)=>{var i;return((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),u$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-3IUQ_XIK.js");return{diagram:t}},__vite__mapDeps([36,37,12,13,9,2,4,3]),import.meta.url);return{id:L_,diagram:e}},"loader"),d$={id:L_,detector:h$,loader:u$},f$=d$,A_="stateDiagram",p$=S((e,t)=>{var i;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),g$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-C2uxuORm.js");return{diagram:t}},__vite__mapDeps([38,37,12,13,9]),import.meta.url);return{id:A_,diagram:e}},"loader"),m$={id:A_,detector:p$,loader:g$},y$=m$,M_="journey",x$=S(e=>/^\s*journey/.test(e),"detector"),b$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-B2f7fVeM.js");return{diagram:t}},__vite__mapDeps([39,11,9,27]),import.meta.url);return{id:M_,diagram:e}},"loader"),C$={id:M_,detector:x$,loader:b$},v$=C$,k$=S((e,t,i)=>{gt.debug(`rendering svg for syntax error
`);const a=ZD(t),o=a.append("g");a.attr("viewBox","0 0 2412 512"),lk(a,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),F_={draw:k$},S$=F_,w$={db:{},renderer:F_,parser:{parse:S(()=>{},"parse")}},T$=w$,D_="flowchart-elk",_$=S((e,t={})=>{var i;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),B$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-IGRag_A_.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:D_,diagram:e}},"loader"),E$={id:D_,detector:_$,loader:B$},L$=E$,R_="timeline",A$=S(e=>/^\s*timeline/.test(e),"detector"),M$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-C6C6ql9w.js");return{diagram:t}},__vite__mapDeps([40,27]),import.meta.url);return{id:R_,diagram:e}},"loader"),F$={id:R_,detector:A$,loader:M$},D$=F$,O_="mindmap",R$=S(e=>/^\s*mindmap/.test(e),"detector"),O$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-5ZYuq6qc.js");return{diagram:t}},__vite__mapDeps([41,12,13]),import.meta.url);return{id:O_,diagram:e}},"loader"),z$={id:O_,detector:R$,loader:O$},$$=z$,z_="kanban",N$=S(e=>/^\s*kanban/.test(e),"detector"),q$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-B7dEEvyY.js");return{diagram:t}},__vite__mapDeps([42,11]),import.meta.url);return{id:z_,diagram:e}},"loader"),I$={id:z_,detector:N$,loader:q$},j$=I$,$_="sankey",H$=S(e=>/^\s*sankey(-beta)?/.test(e),"detector"),P$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-Tm0gMmkV.js");return{diagram:t}},__vite__mapDeps([43,28,23]),import.meta.url);return{id:$_,diagram:e}},"loader"),W$={id:$_,detector:H$,loader:P$},U$=W$,N_="packet",Y$=S(e=>/^\s*packet(-beta)?/.test(e),"detector"),G$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-2sh_00eB.js");return{diagram:t}},__vite__mapDeps([44,19,20]),import.meta.url);return{id:N_,diagram:e}},"loader"),V$={id:N_,detector:Y$,loader:G$},q_="radar",X$=S(e=>/^\s*radar-beta/.test(e),"detector"),Q$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-DGPwfgXz.js");return{diagram:t}},__vite__mapDeps([45,19,20]),import.meta.url);return{id:q_,diagram:e}},"loader"),Z$={id:q_,detector:X$,loader:Q$},I_="block",K$=S(e=>/^\s*block(-beta)?/.test(e),"detector"),J$=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-DTgzXk7o.js");return{diagram:t}},__vite__mapDeps([46,11,2,14]),import.meta.url);return{id:I_,diagram:e}},"loader"),tN={id:I_,detector:K$,loader:J$},eN=tN,j_="treeView",rN=S(e=>/^\s*treeView-beta/.test(e),"detector"),iN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-Dh8FUcnH.js");return{diagram:t}},__vite__mapDeps([47,18,19,20]),import.meta.url);return{id:j_,diagram:e}},"loader"),aN={id:j_,detector:rN,loader:iN},nN=aN,H_="architecture",oN=S(e=>/^\s*architecture/.test(e),"detector"),sN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-Cdb82cy6.js");return{diagram:t}},__vite__mapDeps([48,19,20,7]),import.meta.url);return{id:H_,diagram:e}},"loader"),lN={id:H_,detector:oN,loader:sN},cN=lN,P_="eventmodeling",hN=S(e=>/^\s*eventmodeling/.test(e),"detector"),uN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-CMkEJD4N.js");return{diagram:t}},__vite__mapDeps([49,19,20]),import.meta.url);return{id:P_,diagram:e}},"loader"),dN={id:P_,detector:hN,loader:uN},fN=dN,W_="ishikawa",pN=S(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),gN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-CCa4STEM.js");return{diagram:t}},[],import.meta.url);return{id:W_,diagram:e}},"loader"),mN={id:W_,detector:pN,loader:gN},U_="venn",yN=S(e=>/^\s*venn-beta/.test(e),"detector"),xN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-caaQpwo1.js");return{diagram:t}},[],import.meta.url);return{id:U_,diagram:e}},"loader"),bN={id:U_,detector:yN,loader:xN},CN=bN,Y_="treemap",vN=S(e=>/^\s*treemap/.test(e),"detector"),kN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-DOo0tBMj.js");return{diagram:t}},__vite__mapDeps([50,19,13,20,24,28,23]),import.meta.url);return{id:Y_,diagram:e}},"loader"),SN={id:Y_,detector:vN,loader:kN},G_="wardley",wN=S(e=>/^\s*wardley-beta/i.test(e),"detector"),TN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-D0gkRwGW.js");return{diagram:t}},__vite__mapDeps([51,19,20]),import.meta.url);return{id:G_,diagram:e}},"loader"),_N={id:G_,detector:wN,loader:TN},BN=_N,V_="cynefin",EN=S(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),LN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-DqL03VTd.js");return{diagram:t}},__vite__mapDeps([52,19,20]),import.meta.url);return{id:V_,diagram:e}},"loader"),AN={id:V_,detector:EN,loader:LN},X_="railroad",MN=S(e=>/^\s*railroad-beta/i.test(e),"detector"),FN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-Dkutg8u8.js");return{diagram:t}},__vite__mapDeps([53,54,19,20]),import.meta.url);return{id:X_,diagram:e}},"loader"),DN={id:X_,detector:MN,loader:FN},Q_="railroadEbnf",RN=S(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),ON=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-DdFflhdL.js");return{diagram:t}},__vite__mapDeps([55,54,19,20]),import.meta.url);return{id:Q_,diagram:e}},"loader"),zN={id:Q_,detector:RN,loader:ON},Z_="railroadAbnf",$N=S(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),NN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-DvtgGPw6.js");return{diagram:t}},__vite__mapDeps([56,54,19,20]),import.meta.url);return{id:Z_,diagram:e}},"loader"),qN={id:Z_,detector:$N,loader:NN},K_="railroadPeg",IN=S(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),jN=S(async()=>{const{diagram:e}=await Xt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-BqvlrE_x.js");return{diagram:t}},__vite__mapDeps([57,54,19,20]),import.meta.url);return{id:K_,diagram:e}},"loader"),HN={id:K_,detector:IN,loader:jN},mv=!1,Hd=S(()=>{mv||(mv=!0,Gu("error",T$,e=>e.toLowerCase().trim()==="error"),Gu("---",{db:{clear:S(()=>{},"clear")},styles:{},renderer:{draw:S(()=>{},"draw")},parser:{parse:S(()=>{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:S(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Lg(L$,$$,cN),Lg(c8,j$,c$,n$,T8,D8,z8,q8,Z8,e$,v8,y8,f8,D$,L8,y$,f$,v$,P8,U$,V$,G8,eN,fN,nN,Z$,mN,SN,DN,zN,qN,HN,CN,BN,AN))},"addDiagrams"),PN=S(async()=>{gt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(fo).map(async([i,{detector:a,loader:o}])=>{if(o)try{Dg(i)}catch{try{const{diagram:l,id:c}=await o();Gu(c,l,a)}catch(l){throw gt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete fo[i],l}}}))).filter(i=>i.status==="rejected");if(t.length>0){gt.error(`Failed to load ${t.length} external diagrams`);for(const i of t)gt.error(i);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),WN="graphics-document document";function J_(e,t){e.attr("role",WN),t!==""&&e.attr("aria-roledescription",t)}S(J_,"setA11yDiagramInfo");function tB(e,t,i,a){if(e.insert!==void 0){if(i){const o=`chart-desc-${a}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(i)}if(t){const o=`chart-title-${a}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}S(tB,"addSVGa11yTitleDescription");var ho,wm=(ho=class{constructor(t,i,a,o,l){this.type=t,this.text=i,this.db=a,this.parser=o,this.renderer=l}static async fromText(t,i={}){var f,p;const a=_e(),o=Fm(t,a);t=iz(t)+`
`;try{Dg(o)}catch{const g=U3(o);if(!g)throw new rk(`Diagram ${o} not found.`);const{id:x,diagram:y}=await g();Gu(x,y)}const{db:l,parser:c,renderer:h,init:d}=Dg(o);return c.parser&&(c.parser.yy=l),(f=l.clear)==null||f.call(l),d==null||d(a),i.title&&((p=l.setDiagramTitle)==null||p.call(l,i.title)),await c.parse(t),new ho(o,t,l,c,h)}async render(t,i){await this.renderer.draw(this.text,t,i,this)}getParser(){return this.parser}getType(){return this.type}},S(ho,"Diagram"),ho),yv=[],UN=S(()=>{yv.forEach(e=>{e()}),yv=[]},"attachFunctions"),YN=S(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function eB(e){const t=e.match(ek);if(!t)return{text:e,metadata:{}};const i=t[1],a=i?t[2].split(`
`).map(c=>c.startsWith(i)?c.slice(i.length):c).join(`
`):t[2];let o=aO(a,{schema:iO})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const l={};return o.displayMode&&(l.displayMode=o.displayMode.toString()),o.title&&(l.title=o.title.toString()),o.config&&(l.config=o.config),{text:e.slice(t[0].length),metadata:l}}S(eB,"extractFrontMatter");var GN=S(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,i,a)=>"<"+i+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),VN=S(e=>{const{text:t,metadata:i}=eB(e),{displayMode:a,title:o,config:l={}}=i;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:o,config:l,text:t}},"processFrontmatter"),XN=S(e=>{const t=Ei.detectInit(e)??{},i=Ei.detectDirective(e,"wrap");return Array.isArray(i)?t.wrap=i.some(({type:a})=>a==="wrap"):(i==null?void 0:i.type)==="wrap"&&(t.wrap=!0),{text:WO(e),directive:t}},"processDirectives");function My(e){const t=GN(e),i=VN(t),a=XN(i.text),o=fy(i.config,a.directive);return e=YN(a.text),{code:e,title:i.title,config:o}}S(My,"preprocessDiagram");function rB(e){const t=new TextEncoder().encode(e),i=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(i)}S(rB,"toBase64");var QN=5e4,ZN="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",KN="sandbox",JN="loose",tq="http://www.w3.org/2000/svg",eq="http://www.w3.org/1999/xlink",rq="http://www.w3.org/1999/xhtml",iq="100%",aq="100%",nq="border:0;margin:0;",oq="margin:0",sq="allow-top-navigation-by-user-activation allow-popups",lq='The "iframe" tag is not supported by your browser.',cq=["foreignobject"],hq=["dominant-baseline"];function Fy(e){const t=My(e);return Uu(),H3(t.config??{}),t}S(Fy,"processAndSetConfigs");async function iB(e,t){Hd();try{const{code:i,config:a}=Fy(e);return{diagramType:(await nB(i)).type,config:a}}catch(i){if(t!=null&&t.suppressErrors)return!1;throw i}}S(iB,"parse");var xv=S((e,t,i=[])=>{const a=Xv(`{ ${i.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),uq=S((e,t=new Map)=>{const i=new CSSStyleSheet;if(e.fontFamily!==void 0&&i.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,i.cssRules.length),e.altFontFamily!==void 0&&i.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,i.cssRules.length),t instanceof Map){const h=Lr(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(d=>{M1(d.styles)||h.forEach(f=>{i.insertRule(xv(d.id,f,d.styles),i.cssRules.length)}),M1(d.textStyles)||i.insertRule(xv(d.id,"tspan",((d==null?void 0:d.textStyles)||[]).map(f=>f.replace("color","fill"))),i.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof i.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),a=Fg(o)+`
`}else a+=`${e.themeCSS}
`;return a+Fg(i)},"createCssStyles"),dq=S((e,t)=>Sm(r8(`${e}{${t}}`),n8([S(function(a,o,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===Cm)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[H6,W6,h_,Y6,"@container","@starting-style"],Cm].includes(a.type)||(gt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=Ly))},"addNamespace"),a8])),"compileCSS"),fq=S((e,t,i,a)=>{const o=uq(e,i),l=cM(t,o,{...e.themeVariables,theme:e.theme,look:e.look},a);return dq(a,l)},"createUserStyles"),pq=S((e="",t,i)=>{let a=e;return!i&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=mo(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),gq=S((e="",t)=>{var o,l;const i=(l=(o=t==null?void 0:t.viewBox)==null?void 0:o.baseVal)!=null&&l.height?t.viewBox.baseVal.height+"px":aq,a=rB(`<body style="${oq}">${e}</body>`);return`<iframe style="width:${iq};height:${i};${nq}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${sq}">
  ${lq}
</iframe>`},"putIntoIFrame"),bv=S((e,t,i,a,o)=>{const l=e.append("div");l.attr("id",i),a&&l.attr("style",a);const c=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns",tq);return o&&c.attr("xmlns:xlink",o),c.append("g"),e},"appendDivSvgG");function Tm(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}S(Tm,"sandboxedIframe");var mq=S((e,t,i,a)=>{var o,l,c;(o=e.getElementById(t))==null||o.remove(),(l=e.getElementById(i))==null||l.remove(),(c=e.getElementById(a))==null||c.remove()},"removeExistingElements"),yq=S(async function(e,t,i){var W,X,q,H,A,$;Hd();const a=Fy(t);t=a.code;const o=_e();gt.debug(o),t.length>((o==null?void 0:o.maxTextSize)??QN)&&(t=ZN);const l=`#${e}`,c="i"+e,h="#"+c,d="d"+e,f="#"+d,p=S(()=>{const Q=Zt(x?h:f).node();Q&&"remove"in Q&&Q.remove()},"removeTempElements");let g=Zt(document.body);const x=o.securityLevel===KN,y=o.securityLevel===JN,C=o.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const I=Tm(Zt(i),c);g=Zt(I.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Zt(i);bv(g,e,d,`font-family: ${C}`,eq)}else{if(mq(document,e,d,c),x){const I=Tm(Zt(document.body),c);g=Zt(I.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Zt("body");bv(g,e,d)}let k,v;try{k=await wm.fromText(t,{title:a.title})}catch(I){if(o.suppressErrorRendering)throw p(),I;k=await wm.fromText("error"),v=I}const w=g.select(f).node(),B=k.type,L=w.firstChild,F=L.firstChild,D=(X=(W=k.renderer).getClasses)==null?void 0:X.call(W,t,k),z=fq(o,B,D,l),N=document.createElement("style");N.innerHTML=z,L.insertBefore(N,F);try{await k.renderer.draw(t,e,"11.16.0",k)}catch(I){throw o.suppressErrorRendering?p():S$.draw(t,e,"11.16.0"),I}const P=g.select(`${f} svg`),at=(H=(q=k.db).getAccTitle)==null?void 0:H.call(q),K=($=(A=k.db).getAccDescription)==null?void 0:$.call(A);oB(B,P,at,K),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",rq);let Y=g.select(f).node().innerHTML;if(gt.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),Y=pq(Y,x,ea(o.arrowMarkerAbsolute)),x){const I=g.select(f+" svg").node();Y=gq(Y,I)}else y||(Y=Ps.sanitize(Y,{ADD_TAGS:cq,ADD_ATTR:hq,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(UN(),v)throw v;return p(),{diagramType:B,svg:Y,bindFunctions:k.db.bindFunctions}},"render");function aB(e={}){var a;const t=Ze({},e);t!=null&&t.fontFamily&&!((a=t.themeVariables)!=null&&a.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),I3(t),t!=null&&t.theme&&t.theme in La?t.themeVariables=La[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=La.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?q3(t):Qv();Mm(i.logLevel),Hd()}S(aB,"initialize");var nB=S((e,t={})=>{const{code:i}=My(e);return wm.fromText(i,t)},"getDiagramFromText");function oB(e,t,i,a){J_(t,e),tB(t,i,a,t.attr("id"))}S(oB,"addA11yInfo");var xo=Object.freeze({render:yq,parse:iB,getDiagramFromText:nB,initialize:aB,getConfig:_e,setConfig:Zv,getSiteConfig:Qv,updateSiteConfig:j3,reset:S(()=>{Uu()},"reset"),globalReset:S(()=>{Uu(Ws)},"globalReset"),defaultConfig:Ws});Mm(_e().logLevel);Uu(_e());var xq=S((e,t,i)=>{gt.warn(e),dy(e)?(i&&i(e.str,e.hash),t.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),sB=S(async function(e={querySelector:".mermaid"}){try{await bq(e)}catch(t){if(dy(t)&&gt.error(t.str),ii.parseError&&ii.parseError(t),!e.suppressErrors)throw gt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),bq=S(async function({postRenderCallback:e,querySelector:t,nodes:i}={querySelector:".mermaid"}){const a=xo.getConfig();gt.debug(`${e?"":"No "}Callback function found`);let o;if(i)o=i;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");gt.debug(`Found ${o.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(gt.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),xo.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const l=new Ei.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const d of Array.from(o)){if(gt.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const f=`mermaid-${l.next()}`;c=d.innerHTML,c=yw(Ei.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Ei.detectInit(c);p&&gt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await uB(f,c,d);d.innerHTML=g,e&&await e(f),x&&x(d)}catch(g){xq(g,h,ii.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),lB=S(function(e){xo.initialize(e)},"initialize"),Cq=S(async function(e,t,i){gt.warn("mermaid.init is deprecated. Please use run instead."),e&&lB(e);const a={postRenderCallback:i,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await sB(a)},"init"),vq=S(async(e,{lazyLoad:t=!0}={})=>{Hd(),Lg(...e),t===!1&&await PN()},"registerExternalDiagrams"),cB=S(function(){if(ii.startOnLoad){const{startOnLoad:e}=xo.getConfig();e&&ii.run().catch(t=>gt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",cB,!1);var kq=S(function(e){ii.parseError=e},"setParseErrorHandler"),bd=[],Sg=!1,hB=S(async()=>{if(!Sg){for(Sg=!0;bd.length>0;){const e=bd.shift();if(e)try{await e()}catch(t){gt.error("Error executing queue",t)}}Sg=!1}},"executeQueue"),Sq=S(async(e,t)=>new Promise((i,a)=>{const o=S(()=>new Promise((l,c)=>{xo.parse(e,t).then(h=>{l(h),i(h)},h=>{var d;gt.error("Error parsing",h),(d=ii.parseError)==null||d.call(ii,h),c(h),a(h)})}),"performCall");bd.push(o),hB().catch(a)}),"parse"),uB=S((e,t,i)=>new Promise((a,o)=>{const l=S(()=>new Promise((c,h)=>{xo.render(e,t,i).then(d=>{c(d),a(d)},d=>{var f;gt.error("Error parsing",d),(f=ii.parseError)==null||f.call(ii,d),h(d),o(d)})}),"performCall");bd.push(l),hB().catch(o)}),"render"),wq=S(()=>Object.keys(fo).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ii={startOnLoad:!0,mermaidAPI:xo,parse:Sq,render:uB,init:Cq,run:sB,registerExternalDiagrams:vq,registerLayoutLoaders:s_,initialize:lB,parseError:void 0,contentLoaded:cB,setParseErrorHandler:kq,detectType:Fm,registerIconPacks:wz,getRegisteredDiagramsMetadata:wq},tl=ii;/*! Check if previously processed *//*!
 * Wait for document loaded before starting the execution
 */tl.initialize({startOnLoad:!1,securityLevel:"strict"});const Cv=/```mermaid\s*\n([\s\S]*?)```/g;function dB(e){const t=[];Cv.lastIndex=0;let i;for(;(i=Cv.exec(e))!==null;)t.push((i[1]??"").trim());return t}function Tq(e){const i=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;let a=parseFloat(i.getAttribute("width")??""),o=parseFloat(i.getAttribute("height")??"");const l=i.getAttribute("viewBox");if((!a||!o)&&l){const c=l.split(/[\s,]+/).map(Number);c.length===4&&(a||(a=c[2]??0),o||(o=c[3]??0))}return(!a||a<=0)&&(a=800),(!o||o<=0)&&(o=600),i.setAttribute("width",String(a)),i.setAttribute("height",String(o)),{svg:new XMLSerializer().serializeToString(i),width:a,height:o}}async function _q(e,t,i){const a=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(a);try{const l=new Image;l.width=t,l.height=i,l.src=o,await l.decode();const c=2,h=document.createElement("canvas");h.width=Math.max(1,Math.round(t*c)),h.height=Math.max(1,Math.round(i*c));const d=h.getContext("2d");return d?(d.fillStyle="#ffffff",d.fillRect(0,0,h.width,h.height),d.drawImage(l,0,0,h.width,h.height),{dataUrl:h.toDataURL("image/png"),width:t,height:i}):null}catch{return null}finally{URL.revokeObjectURL(o)}}async function Bq(e,t){try{const i=`pdf-mermaid-${t}-${Date.now()}`,{svg:a}=await tl.render(i,e),o=Tq(a);return await _q(o.svg,o.width,o.height)}catch{return null}}async function Eq(e){const t=dB(e),i=[];for(let a=0;a<t.length;a++){const o=t[a]??"";i.push(await Bq(o,a))}return i}function Dy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ko=Dy();function fB(e){ko=e}var ao={exec:()=>null};function xs(e){let t=[];return i=>{let a=Math.max(0,Math.min(3,i-1)),o=t[a];return o||(o=e(a),t[a]=o),o}}function se(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(o,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Cr.caret,"$1"),i=i.replace(o,c),a},getRegex:()=>new RegExp(i,t)};return a}var Lq=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Cr={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:xs(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`)),hrRegex:xs(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:xs(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:xs(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:xs(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:xs(e=>new RegExp(`^ {0,${e}}>`))},Aq=/^(?:[ \t]*(?:\n|$))+/,Mq=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fq=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dq=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ry=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gB=se(pB).replace(/bull/g,Ry).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(),Rq=se(pB).replace(/bull/g,Ry).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(),Oy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Oq=/^[^\n]+/,zy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zq=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$q=se(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ry).getRegex(),Pd="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",$y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nq=se("^ {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",$y).replace("tag",Pd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mB=se(Oy).replace("hr",Xc).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[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pd).getRegex(),qq=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mB).getRegex(),Ny={blockquote:qq,code:Mq,def:zq,fences:Fq,heading:Dq,hr:Xc,html:Nq,lheading:gB,list:$q,newline:Aq,paragraph:mB,table:ao,text:Oq},vv=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xc).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pd).getRegex(),Iq={...Ny,lheading:Rq,table:vv,paragraph:se(Oy).replace("hr",Xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pd).getRegex()},jq={...Ny,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$y).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:ao,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(Oy).replace("hr",Xc).replace("heading",` *#{1,6} *[^
]`).replace("lheading",gB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hq=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pq=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yB=/^( {2,}|\\)\n(?!\s*$)/,Wq=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,el=/[\p{P}\p{S}]/u,Wd=/[\s\p{P}\p{S}]/u,qy=/[^\s\p{P}\p{S}]/u,Uq=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wd).getRegex(),xB=/(?!~)[\p{P}\p{S}]/u,Yq=/(?!~)[\s\p{P}\p{S}]/u,Gq=/(?:[^\s\p{P}\p{S}]|~)/u,Vq=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Lq?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bB=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Xq=se(bB,"u").replace(/punct/g,el).getRegex(),Qq=se(bB,"u").replace(/punct/g,xB).getRegex(),CB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zq=se(CB,"gu").replace(/notPunctSpace/g,qy).replace(/punctSpace/g,Wd).replace(/punct/g,el).getRegex(),Kq=se(CB,"gu").replace(/notPunctSpace/g,Gq).replace(/punctSpace/g,Yq).replace(/punct/g,xB).getRegex(),Jq=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,qy).replace(/punctSpace/g,Wd).replace(/punct/g,el).getRegex(),tI=se(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,el).getRegex(),eI="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",rI=se(eI,"gu").replace(/notPunctSpace/g,qy).replace(/punctSpace/g,Wd).replace(/punct/g,el).getRegex(),iI=se(/\\(punct)/,"gu").replace(/punct/g,el).getRegex(),aI=se(/^<(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(),nI=se($y).replace("(?:-->|$)","-->").getRegex(),oI=se("^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",nI).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,sI=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Cd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vB=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Cd).replace("ref",zy).getRegex(),kB=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",zy).getRegex(),lI=se("reflink|nolink(?!\\()","g").replace("reflink",vB).replace("nolink",kB).getRegex(),kv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Iy={_backpedal:ao,anyPunctuation:iI,autolink:aI,blockSkip:Vq,br:yB,code:Pq,del:ao,delLDelim:ao,delRDelim:ao,emStrongLDelim:Xq,emStrongRDelimAst:Zq,emStrongRDelimUnd:Jq,escape:Hq,link:sI,nolink:kB,punctuation:Uq,reflink:vB,reflinkSearch:lI,tag:oI,text:Wq,url:ao},cI={...Iy,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Cd).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cd).getRegex()},_m={...Iy,emStrongRDelimAst:Kq,emStrongLDelim:Qq,delLDelim:tI,delRDelim:rI,url:se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",kv).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:se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",kv).getRegex()},hI={..._m,br:se(yB).replace("{2,}","*").getRegex(),text:se(_m.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Tu={normal:Ny,gfm:Iq,pedantic:jq},hc={normal:Iy,gfm:_m,breaks:hI,pedantic:cI},uI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sv=e=>uI[e];function Vi(e,t){if(t){if(Cr.escapeTest.test(e))return e.replace(Cr.escapeReplace,Sv)}else if(Cr.escapeTestNoEncode.test(e))return e.replace(Cr.escapeReplaceNoEncode,Sv);return e}function wv(e){try{e=encodeURI(e).replace(Cr.percentDecode,"%")}catch{return null}return e}function Tv(e,t){var l;let i=e.replace(Cr.findPipe,(c,h,d)=>{let f=!1,p=h;for(;--p>=0&&d[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(Cr.splitPipe),o=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;o<a.length;o++)a[o]=a[o].trim().replace(Cr.slashPipe,"|");return a}function fn(e,t,i){let a=e.length;if(a===0)return"";let o=0;for(;o<a&&e.charAt(a-o-1)===t;)o++;return e.slice(0,a-o)}function _v(e){let t=e.split(`
`),i=t.length-1;for(;i>=0&&Cr.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join(`
`)}function dI(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function fI(e,t=0){let i=t,a="";for(let o of e)if(o==="	"){let l=4-i%4;a+=" ".repeat(l),i+=l}else a+=o,i++;return a}function Bv(e,t,i,a,o){let l=t.href,c=t.title||null,h=e[1].replace(o.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function pI(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let o=a[1];return t.split(`
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=o.length?l.slice(o.length):l}).join(`
`)}var vd=class{constructor(e){$t(this,"options");$t(this,"rules");$t(this,"lexer");this.options=e||ko}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let i=this.options.pedantic?t[0]:_v(t[0]),a=i.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i,codeBlockStyle:"indented",text:a}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let i=t[0],a=pI(i,t[3]||"",this.rules);return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(this.rules.other.endingHash.test(i)){let a=fn(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:fn(t[0],`
`),depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:fn(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let i=fn(t[0],`
`).split(`
`),a="",o="",l=[];for(;i.length>0;){let c=!1,h=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))h.push(i[d]),c=!0;else if(!c)h.push(i[d]);else break;i=i.slice(d);let f=h.join(`
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${f}`:f,o=o?`${o}
${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=g,i.length===0)break;let x=l.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){let y=x,C=y.raw+`
`+i.join(`
`),k=this.blockquote(C);l[l.length-1]=k,a=a.substring(0,a.length-y.raw.length)+k.raw,o=o.substring(0,o.length-y.text.length)+k.text;break}else if((x==null?void 0:x.type)==="list"){let y=x,C=y.raw+`
`+i.join(`
`),k=this.list(C);l[l.length-1]=k,a=a.substring(0,a.length-x.raw.length)+k.raw,o=o.substring(0,o.length-y.raw.length)+k.raw,i=C.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:a,tokens:l,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,o={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let l=this.rules.other.listItemRegex(i),c=!1;for(;e;){let d=!1,f="",p="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let g=fI(t[2].split(`
`,1)[0],t[1].length),x=e.split(`
`,1)[0],y=!g.trim(),C=0;if(this.options.pedantic?(C=2,p=g.trimStart()):y?C=t[1].length+1:(C=g.search(this.rules.other.nonSpaceChar),C=C>4?1:C,p=g.slice(C),C+=t[1].length),y&&this.rules.other.blankLine.test(x)&&(f+=x+`
`,e=e.substring(x.length+1),d=!0),!d){let k=this.rules.other.nextBulletRegex(C),v=this.rules.other.hrRegex(C),w=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),L=this.rules.other.htmlBeginRegex(C),F=this.rules.other.blockquoteBeginRegex(C);for(;e;){let D=e.split(`
`,1)[0],z;if(x=D,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting,"  "),z=x):z=x.replace(this.rules.other.tabCharGlobal,"    "),w.test(x)||B.test(x)||L.test(x)||F.test(x)||k.test(x)||v.test(x))break;if(z.search(this.rules.other.nonSpaceChar)>=C||!x.trim())p+=`
`+z.slice(C);else{if(y||g.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||B.test(g)||v.test(g))break;p+=`
`+x}y=!x.trim(),f+=D+`
`,e=e.substring(D.length+1),g=z.slice(C)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0)),o.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),o.raw+=f}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]);let f=d.tokens[0];if(d.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(d.raw);if(p){let g={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};d.checked=g.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=g.raw+d.tokens[0].raw,d.tokens[0].text=g.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(g)):d.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):d.tokens.unshift(g)}}else d.task&&(d.task=!1);if(!o.loose){let p=d.tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}}if(o.loose)for(let d of o.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let i=_v(t[0]);return{type:"html",block:!0,raw:i,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:i}}}def(e){let t=this.rules.block.def.exec(e);if(t){let i=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:fn(t[0],`
`),href:a,title:o}}}table(e){var c;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let i=Tv(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:fn(t[0],`
`),header:[],align:[],rows:[]};if(i.length===a.length){for(let h of a)this.rules.other.tableAlignRight.test(h)?l.align.push("right"):this.rules.other.tableAlignCenter.test(h)?l.align.push("center"):this.rules.other.tableAlignLeft.test(h)?l.align.push("left"):l.align.push(null);for(let h=0;h<i.length;h++)l.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:l.align[h]});for(let h of o)l.rows.push(Tv(h,l.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:l.align[f]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let i=t[1].trim();return{type:"heading",raw:fn(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:i,tokens:this.lexer.inline(i)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let i=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let l=fn(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{let l=dI(t[2],"()");if(l===-2)return;if(l>-1){let c=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let a=t[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(a);l&&(a=l[1],o=l[3])}else o=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Bv(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[a.toLowerCase()];if(!o){let l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return Bv(i,o,i[0],this.lexer,this.rules)}}emStrong(e,t,i=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!i||this.rules.inline.punctuation.exec(i))){let o=[...a[0]].length-1,l,c,h=o,d=0,f=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+o);(a=f.exec(t))!==null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l)continue;if(c=[...l].length,a[3]||a[4]){h+=c;continue}else if((a[5]||a[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+d);let p=[...a[0]][0].length,g=e.slice(0,o+a.index+p+c);if(Math.min(o,c)%2){let y=g.slice(1,-1);return{type:"em",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}let x=g.slice(2,-2);return{type:"strong",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:t[0],text:i}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,i=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!i||this.rules.inline.punctuation.exec(i))){let o=[...a[0]].length-1,l,c,h=o,d=this.rules.inline.delRDelim;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(a=d.exec(t))!==null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l||(c=[...l].length,c!==o))continue;if(a[3]||a[4]){h+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h);let f=[...a[0]][0].length,p=e.slice(0,o+a.index+f+c),g=p.slice(o,-o);return{type:"del",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let i,a;return t[2]==="@"?(i=t[1],a="mailto:"+i):(i=t[1],a=i),{type:"link",raw:t[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(e){var i;let t;if(t=this.rules.inline.url.exec(e)){let a,o;if(t[2]==="@")a=t[0],o="mailto:"+a;else{let l;do l=t[0],t[0]=((i=this.rules.inline._backpedal.exec(t[0]))==null?void 0:i[0])??"";while(l!==t[0]);a=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let i=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:i}}}},Ti=class Bm{constructor(t){$t(this,"tokens");$t(this,"options");$t(this,"state");$t(this,"inlineQueue");$t(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ko,this.options.tokenizer=this.options.tokenizer||new vd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Cr,block:Tu.normal,inline:hc.normal};this.options.pedantic?(i.block=Tu.pedantic,i.inline=hc.pedantic):this.options.gfm&&(i.block=Tu.gfm,this.options.breaks?i.inline=hc.breaks:i.inline=hc.gfm),this.tokenizer.rules=i}static get rules(){return{block:Tu,inline:hc}}static lex(t,i){return new Bm(i).lex(t)}static lexInline(t,i){return new Bm(i).inlineTokens(t)}lex(t){t=t.replace(Cr.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var l,c,h;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Cr.tabCharGlobal,"    ").replace(Cr.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let d;if((c=(l=this.options.extensions)==null?void 0:l.block)!=null&&c.some(p=>(d=p.call({lexer:this},t,i))?(t=t.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.space(t)){t=t.substring(d.raw.length);let p=i.at(-1);d.raw.length===1&&p!==void 0?p.raw+=`
`:i.push(d);continue}if(d=this.tokenizer.code(t)){t=t.substring(d.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(d=this.tokenizer.fences(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.heading(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.hr(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.blockquote(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.list(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.html(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.def(t)){t=t.substring(d.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title},i.push(d));continue}if(d=this.tokenizer.table(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.lheading(t)){t=t.substring(d.raw.length),i.push(d);continue}let f=t;if((h=this.options.extensions)!=null&&h.startBlock){let p=1/0,g=t.slice(1),x;this.options.extensions.startBlock.forEach(y=>{x=y.call({lexer:this},g),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(this.state.top&&(d=this.tokenizer.paragraph(f))){let p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d),a=f.length!==t.length,t=t.substring(d.raw.length);continue}if(d=this.tokenizer.text(t)){t=t.substring(d.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var f,p,g,x,y;this.tokenizer.lexer=this;let a=t,o=null;if(this.tokens.links){let C=Object.keys(this.tokens.links);if(C.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)C.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)l=o[2]?o[2].length:0,a=a.slice(0,o.index+l)+"["+"a".repeat(o[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},a))??a;let c=!1,h="",d=1/0;for(;t;){if(t.length<d)d=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let C;if((x=(g=this.options.extensions)==null?void 0:g.inline)!=null&&x.some(v=>(C=v.call({lexer:this},t,i))?(t=t.substring(C.raw.length),i.push(C),!0):!1))continue;if(C=this.tokenizer.escape(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.tag(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.link(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(C.raw.length);let v=i.at(-1);C.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):i.push(C);continue}if(C=this.tokenizer.emStrong(t,a,h)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.codespan(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.br(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.del(t,a,h)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.autolink(t)){t=t.substring(C.raw.length),i.push(C);continue}if(!this.state.inLink&&(C=this.tokenizer.url(t))){t=t.substring(C.raw.length),i.push(C);continue}let k=t;if((y=this.options.extensions)!=null&&y.startInline){let v=1/0,w=t.slice(1),B;this.options.extensions.startInline.forEach(L=>{B=L.call({lexer:this},w),typeof B=="number"&&B>=0&&(v=Math.min(v,B))}),v<1/0&&v>=0&&(k=t.substring(0,v+1))}if(C=this.tokenizer.inlineText(k)){t=t.substring(C.raw.length),C.raw.slice(-1)!=="_"&&(h=C.raw.slice(-1)),c=!0;let v=i.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):i.push(C);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return i}infiniteLoopError(t){let i="Infinite loop on byte: "+t;if(this.options.silent)console.error(i);else throw new Error(i)}},kd=class{constructor(e){$t(this,"options");$t(this,"parser");this.options=e||ko}space(e){return""}code({text:e,lang:t,escaped:i}){var l;let a=(l=(t||"").match(Cr.notSpaceStart))==null?void 0:l[0],o=e.replace(Cr.endingNewline,"")+`
`;return a?'<pre><code class="language-'+Vi(a)+'">'+(i?o:Vi(o,!0))+`</code></pre>
`:"<pre><code>"+(i?o:Vi(o,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){let t=e.ordered,i=e.start,a="";for(let c=0;c<e.items.length;c++){let h=e.items[c];a+=this.listitem(h)}let o=t?"ol":"ul",l=t&&i!==1?' start="'+i+'"':"";return"<"+o+l+`>
`+a+"</"+o+`>
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",i="";for(let o=0;o<e.header.length;o++)i+=this.tablecell(e.header[o]);t+=this.tablerow({text:i});let a="";for(let o=0;o<e.rows.length;o++){let l=e.rows[o];i="";for(let c=0;c<l.length;c++)i+=this.tablecell(l[c]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+a+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>
`}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>${Vi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:i}){let a=this.parser.parseInline(i),o=wv(e);if(o===null)return a;e=o;let l='<a href="'+e+'"';return t&&(l+=' title="'+Vi(t)+'"'),l+=">"+a+"</a>",l}image({href:e,title:t,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let o=wv(e);if(o===null)return Vi(i);e=o;let l=`<img src="${e}" alt="${Vi(i)}"`;return t&&(l+=` title="${Vi(t)}"`),l+=">",l}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Vi(e.text)}},jy=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""}checkbox({raw:e}){return e}},_i=class Em{constructor(t){$t(this,"options");$t(this,"renderer");$t(this,"textRenderer");this.options=t||ko,this.options.renderer=this.options.renderer||new kd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jy}static parse(t,i){return new Em(i).parse(t)}static parseInline(t,i){return new Em(i).parseInline(t)}parse(t){var a,o;this.renderer.parser=this;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[c.type]){let d=c,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){i+=f||"";continue}}let h=c;switch(h.type){case"space":{i+=this.renderer.space(h);break}case"hr":{i+=this.renderer.hr(h);break}case"heading":{i+=this.renderer.heading(h);break}case"code":{i+=this.renderer.code(h);break}case"table":{i+=this.renderer.table(h);break}case"blockquote":{i+=this.renderer.blockquote(h);break}case"list":{i+=this.renderer.list(h);break}case"checkbox":{i+=this.renderer.checkbox(h);break}case"html":{i+=this.renderer.html(h);break}case"def":{i+=this.renderer.def(h);break}case"paragraph":{i+=this.renderer.paragraph(h);break}case"text":{i+=this.renderer.text(h);break}default:{let d='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}parseInline(t,i=this.renderer){var o,l;this.renderer.parser=this;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){a+=f||"";continue}}let d=h;switch(d.type){case"escape":{a+=i.text(d);break}case"html":{a+=i.html(d);break}case"link":{a+=i.link(d);break}case"image":{a+=i.image(d);break}case"checkbox":{a+=i.checkbox(d);break}case"strong":{a+=i.strong(d);break}case"em":{a+=i.em(d);break}case"codespan":{a+=i.codespan(d);break}case"br":{a+=i.br(d);break}case"del":{a+=i.del(d);break}case"text":{a+=i.text(d);break}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Eu,Cc=(Eu=class{constructor(e){$t(this,"options");$t(this,"block");this.options=e||ko}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Ti.lex:Ti.lexInline}provideParser(e=this.block){return e?_i.parse:_i.parseInline}},$t(Eu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$t(Eu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Eu),Hy=class{constructor(...e){$t(this,"defaults",Dy());$t(this,"options",this.setOptions);$t(this,"parse",this.parseMarkdown(!0));$t(this,"parseInline",this.parseMarkdown(!1));$t(this,"Parser",_i);$t(this,"Renderer",kd);$t(this,"TextRenderer",jy);$t(this,"Lexer",Ti);$t(this,"Tokenizer",vd);$t(this,"Hooks",Cc);this.use(...e)}walkTokens(e,t){var a,o;let i=[];for(let l of e)switch(i=i.concat(t.call(this,l)),l.type){case"table":{let c=l;for(let h of c.header)i=i.concat(this.walkTokens(h.tokens,t));for(let h of c.rows)for(let d of h)i=i.concat(this.walkTokens(d.tokens,t));break}case"list":{let c=l;i=i.concat(this.walkTokens(c.items,t));break}default:{let c=l;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{let d=c[h].flat(1/0);i=i.concat(this.walkTokens(d,t))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=t.renderers[o.name];l?t.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=l.apply(this,c)),h}:t.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 l=t[o.level];l?l.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),a.extensions=t),i.renderer){let o=this.defaults.renderer||new kd(this.defaults);for(let l in i.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,h=i.renderer[c],d=o[c];o[c]=(...f)=>{let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p||""}}a.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new vd(this.defaults);for(let l in i.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,h=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}a.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Cc;for(let l in i.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,h=i.hooks[c],d=o[c];Cc.passThroughHooks.has(l)?o[c]=f=>{if(this.defaults.async&&Cc.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await h.call(o,f);return d.call(o,g)})();let p=h.call(o,f);return d.call(o,p)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let g=await h.apply(o,f);return g===!1&&(g=await d.apply(o,f)),g})();let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}a.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,l=i.walkTokens;a.walkTokens=function(c){let h=[];return h.push(l.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ti.lex(e,t??this.defaults)}parser(e,t){return _i.parse(e,t??this.defaults)}parseMarkdown(e){return(t,i)=>{let a={...i},o={...this.defaults,...a},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return l(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 t>"u"||t===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(t):t,h=await(o.hooks?await o.hooks.provideLexer(e):e?Ti.lex:Ti.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser(e):e?_i.parse:_i.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(l);try{o.hooks&&(t=o.hooks.preprocess(t));let c=(o.hooks?o.hooks.provideLexer(e):e?Ti.lex:Ti.lexInline)(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser(e):e?_i.parse:_i.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return l(c)}}}onError(e,t){return i=>{if(i.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Vi(i.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(i);throw i}}},bo=new Hy;function Ce(e,t){return bo.parse(e,t)}Ce.options=Ce.setOptions=function(e){return bo.setOptions(e),Ce.defaults=bo.defaults,fB(Ce.defaults),Ce};Ce.getDefaults=Dy;Ce.defaults=ko;Ce.use=function(...e){return bo.use(...e),Ce.defaults=bo.defaults,fB(Ce.defaults),Ce};Ce.walkTokens=function(e,t){return bo.walkTokens(e,t)};Ce.parseInline=bo.parseInline;Ce.Parser=_i;Ce.parser=_i.parse;Ce.Renderer=kd;Ce.TextRenderer=jy;Ce.Lexer=Ti;Ce.lexer=Ti.lex;Ce.Tokenizer=vd;Ce.Hooks=Cc;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;_i.parse;Ti.lex;tl.initialize({startOnLoad:!1,securityLevel:"strict"});const gI="en";function Sd(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const mI=`
  :root { color-scheme: light; }
  * { box-sizing: border-box; }
  body { margin: 0; background: #f5f6f8; }
  .doc {
    max-width: 900px; margin: 0 auto; padding: 40px;
    background: #ffffff; color: #1a1a1a;
    font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6;
  }
  .doc h1, .doc h2, .doc h3, .doc h4 { line-height: 1.3; margin: 1.2em 0 0.5em; }
  .doc h1 { border-bottom: 2px solid #e0e0e0; padding-bottom: 0.3em; }
  .doc p { margin: 0.6em 0; }
  .doc table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.9em; }
  .doc th, .doc td { border: 1px solid #d0d0d0; padding: 6px 10px; text-align: left; vertical-align: top; }
  .doc th { background: #f0f2f5; }
  .doc pre.md-code {
    background: #f0f2f5; border: 1px solid #d0d0d0; border-radius: 4px;
    padding: 10px; overflow-x: auto; font-size: 0.9em;
  }
  .doc code { font-family: Consolas, 'Courier New', monospace; }
  .doc .mermaid-diagram { display: flex; justify-content: center; margin: 1.2em 0; }
  .doc .mermaid-diagram svg { max-width: 100%; height: auto; }
  .doc .mermaid-error {
    background: #fff4f4; border: 1px solid #e0b4b4; border-radius: 4px;
    padding: 10px; color: #7a2020; overflow-x: auto;
  }
  .doc hr { border: none; border-top: 1px solid #e0e0e0; margin: 1.5em 0; }
`;function yI(e){const t=e.match(/^#\s+(.+)$/m);return t?t[1].trim():"Dokumentation"}function xI(e,t){return`<!DOCTYPE html>
<html lang="${Sd(gI)}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${Sd(t)}</title>
<style>${mI}</style>
</head>
<body>
<main class="doc">
${e}
</main>
</body>
</html>
`}async function bI(e){const t=dB(e),i=[];for(let a=0;a<t.length;a++){const o=t[a]??"";try{const{svg:l}=await tl.render(`html-mermaid-${a}-${Date.now()}`,o);i.push(l)}catch{i.push(`<pre class="mermaid-error">${Sd(o)}</pre>`)}}return i}async function CI(e){const t=await bI(e);let i=0;const o=new Hy({renderer:{code({text:l,lang:c}){return(c??"").trim().toLowerCase()==="mermaid"?`<div class="mermaid-diagram">${t[i++]??""}</div>`:`<pre class="md-code"><code>${Sd(l)}</code></pre>`}}}).parse(e,{async:!1});return xI(o,yI(e))}tl.initialize({startOnLoad:!1,securityLevel:"strict"});function Ev(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const vI=new Hy({renderer:{code({text:e,lang:t}){return(t??"").trim().toLowerCase()==="mermaid"?`<pre class="mermaid">${Ev(e)}</pre>`:`<pre class="md-code"><code>${Ev(e)}</code></pre>`}}});function kI({markdown:e}){const t=yt.useRef(null),i=yt.useMemo(()=>vI.parse(e,{async:!1}),[e]);return yt.useEffect(()=>{const a=t.current;if(!a)return;const o=Array.from(a.querySelectorAll("pre.mermaid"));o.length!==0&&(o.forEach(l=>l.removeAttribute("data-processed")),tl.run({nodes:o}).catch(()=>{}))},[i]),_.jsx("div",{ref:t,className:"markdown-preview",dangerouslySetInnerHTML:{__html:i}})}function SI(){const{t:e}=Je(),{result:t}=Tn(),i=Ur(),[a,o]=yt.useState(null),[l,c]=yt.useState(!1),[h,d]=yt.useState(null),[f,p]=yt.useState(!1),[g,x]=yt.useState(null),[y,C]=yt.useState(null),[k,v]=yt.useState(!1),[w,B]=yt.useState(null),L=(t==null?void 0:t.outputPath)??"",F=t==null?void 0:t.version,D=t==null?void 0:t.changesCount,z=F!=null;async function N(){var X;o(null);const W=await Bc(L);W.success||o(((X=W.error)==null?void 0:X.message)??e("error.unexpected"))}async function P(){var q;o(null),d(null),c(!0);let W="[]";try{const H=await rg(L);if(H.success&&H.data){const A=await Eq(H.data.content);W=JSON.stringify(A)}}catch{W="[]"}const X=await tA(L,W);c(!1),X.success&&X.data?d(X.data.pdfPath):o(((q=X.error)==null?void 0:q.message)??e("error.unexpected"))}async function at(){var H,A;o(null),x(null),p(!0);const W=await rg(L);if(!W.success||!W.data){p(!1),o(((H=W.error)==null?void 0:H.message)??e("error.unexpected"));return}const X=await CI(W.data.content),q=await eA(L,X);p(!1),q.success&&q.data?x(q.data.htmlPath):o(((A=q.error)==null?void 0:A.message)??e("error.unexpected"))}function K(){i({type:"goBack"})}async function Y(){var X;B(null),v(!0);const W=await rg(L);v(!1),W.success&&W.data?C(W.data.content):B(((X=W.error)==null?void 0:X.message)??e("error.unexpected"))}return _.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-lg)"},children:[_.jsx("div",{style:{width:"64px",height:"64px",borderRadius:"50%",backgroundColor:"var(--color-success-bg)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2rem"},"aria-hidden":"true",children:"✓"}),_.jsx("h1",{style:{fontSize:"var(--font-size-heading)",textAlign:"center",margin:0},children:e("result.success")}),_.jsxs("div",{style:{backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",padding:"var(--spacing-md)",width:"100%",maxWidth:"560px",wordBreak:"break-all"},children:[_.jsx("p",{style:{margin:0,fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xs)"},children:e("result.outputPath")}),_.jsx("p",{style:{margin:0,fontSize:"var(--font-size-body)",color:"var(--color-text)"},children:L})]}),z&&_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-lg)",alignItems:"center"},children:[_.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("result.version"),": ",_.jsx("strong",{children:F})]}),D!=null&&_.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("result.changesCount"),": ",_.jsx("strong",{children:D})]})]}),a&&_.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[e("result.openError")," ",a]}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[_.jsx("button",{type:"button",onClick:N,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:W=>{W.currentTarget.style.backgroundColor="var(--color-primary-hover)"},onMouseLeave:W=>{W.currentTarget.style.backgroundColor="var(--color-primary)"},children:e("result.openFile")}),_.jsx("button",{type:"button",onClick:P,disabled:l,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:l?"wait":"pointer",opacity:l?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:W=>{l||(W.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:W=>{W.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(l?"result.pdfExporting":"result.exportPdf")}),_.jsx("button",{type:"button",onClick:at,disabled:f,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:f?"wait":"pointer",opacity:f?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:W=>{f||(W.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:W=>{W.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(f?"result.htmlExporting":"result.exportHtml")}),_.jsx("button",{type:"button",onClick:Y,disabled:k,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:k?"wait":"pointer",opacity:k?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:W=>{k||(W.currentTarget.style.backgroundColor="var(--color-success-bg)")},onMouseLeave:W=>{W.currentTarget.style.backgroundColor="transparent"},children:e(k?"result.previewLoading":"result.preview")}),_.jsx("button",{type:"button",onClick:K,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:W=>{W.currentTarget.style.backgroundColor="var(--color-success-bg)"},onMouseLeave:W=>{W.currentTarget.style.backgroundColor="transparent"},children:e("result.newDoc")})]}),h&&_.jsxs("p",{style:{color:"var(--color-success)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",textAlign:"center"},children:[e("result.pdfSuccess")," ",h]}),g&&_.jsxs("p",{style:{color:"var(--color-success)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",textAlign:"center"},children:[e("result.htmlSuccess")," ",g]}),w&&_.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[e("result.previewError")," ",w]}),y!==null&&_.jsx("div",{role:"dialog","aria-modal":"true","aria-label":e("result.previewTitle"),style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"var(--spacing-lg)",zIndex:1e3},onClick:()=>C(null),children:_.jsxs("div",{style:{backgroundColor:"var(--color-background)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",width:"100%",maxWidth:"900px",maxHeight:"90vh",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:W=>W.stopPropagation(),children:[_.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--spacing-md) var(--spacing-lg)",borderBottom:"1px solid var(--color-border)"},children:[_.jsx("h2",{style:{margin:0,fontSize:"var(--font-size-heading)"},children:e("result.previewTitle")}),_.jsx("button",{type:"button",onClick:()=>C(null),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer"},children:e("result.previewClose")})]}),_.jsx("div",{style:{padding:"var(--spacing-lg)",overflowY:"auto",textAlign:"left"},children:_.jsx(kI,{markdown:y})})]})})]})}const wI=[{nameKey:"imprint.dep.python.name",descKey:"imprint.dep.python.desc"},{nameKey:"imprint.dep.powerbi.name",descKey:"imprint.dep.powerbi.desc"},{nameKey:"imprint.dep.adomd.name",descKey:"imprint.dep.adomd.desc"},{nameKey:"imprint.dep.pythonnet.name",descKey:"imprint.dep.pythonnet.desc"},{nameKey:"imprint.dep.fabric.name",descKey:"imprint.dep.fabric.desc"},{nameKey:"imprint.dep.msal.name",descKey:"imprint.dep.msal.desc"}];function TI(e){const t=new Map;for(const i of e){const a=t.get(i.prefix)??[];a.push(i),t.set(i.prefix,a)}return t}const Lv=[{prefix:"META_",name:"Kurzbeschreibung",descriptionKey:"imprint.fields.group.META_"},{prefix:"KONTAKT_",name:"Verantwortlicher",descriptionKey:"imprint.fields.group.KONTAKT_"},{prefix:"BIZ_",name:"Fachbereich",descriptionKey:"imprint.fields.group.BIZ_"},{prefix:"KPI_",name:"Kennzahl",descriptionKey:"imprint.fields.group.KPI_"},{prefix:"GLOSSAR_",name:"Begriff",descriptionKey:"imprint.fields.group.GLOSSAR_"},{prefix:"DS_",name:"Quelle",descriptionKey:"imprint.fields.group.DS_"},{prefix:"PQ_",name:"Abfrage",descriptionKey:"imprint.fields.group.PQ_"},{prefix:"PQT_",name:"Transformation",descriptionKey:"imprint.fields.group.PQT_"},{prefix:"PARAM_",name:"Parameter",descriptionKey:"imprint.fields.group.PARAM_"},{prefix:"COL_",name:"Spalte",descriptionKey:"imprint.fields.group.COL_"},{prefix:"MODELL_",name:"Tabelle",descriptionKey:"imprint.fields.group.MODELL_"},{prefix:"DAX_",name:"Measure",descriptionKey:"imprint.fields.group.DAX_"},{prefix:"TBLTYP_",name:"Tabellentyp",descriptionKey:"imprint.fields.group.TBLTYP_"},{prefix:"REL_",name:"Beziehung",descriptionKey:"imprint.fields.group.REL_"},{prefix:"RLS_",name:"Regel",descriptionKey:"imprint.fields.group.RLS_"},{prefix:"SEC_",name:"Rolle",descriptionKey:"imprint.fields.group.SEC_"},{prefix:"REFRESH_",name:"Zeitplan",descriptionKey:"imprint.fields.group.REFRESH_"},{prefix:"OPS_",name:"Prozess",descriptionKey:"imprint.fields.group.OPS_"},{prefix:"VER_",name:"Version",descriptionKey:"imprint.fields.group.VER_"},{prefix:"LOG_",name:"Eintrag",descriptionKey:"imprint.fields.group.LOG_"},{prefix:"REVIEW_",name:"Freigabe",descriptionKey:"imprint.fields.group.REVIEW_"}];function _I(){const{t:e}=Je(),t=Ur();function i(){t({type:"goBack"})}return _.jsx("main",{style:le.container,children:_.jsxs("div",{style:le.content,children:[_.jsxs("button",{type:"button",onClick:i,style:le.backButton,"aria-label":e("dialog.back"),children:["← ",e("dialog.back")]}),_.jsx("h1",{style:le.heading,children:e("imprint.heading")}),_.jsxs("section",{style:le.section,children:[_.jsx("h2",{style:le.sectionHeading,children:e("imprint.deps.heading")}),_.jsx("ul",{style:le.depList,children:wI.map(a=>_.jsxs("li",{style:le.depItem,children:[_.jsx("span",{style:le.depName,children:e(a.nameKey)}),_.jsx("span",{children:e(a.descKey)})]},a.nameKey))})]}),_.jsxs("section",{style:le.section,children:[_.jsx("h2",{style:le.sectionHeading,children:e("imprint.fields.heading")}),Lv.length===0?_.jsx("p",{style:le.paragraph,children:e("imprint.fields.empty")}):Array.from(TI(Lv).entries()).map(([a,o])=>_.jsxs("div",{style:le.fieldGroup,children:[_.jsx("h3",{style:le.groupHeading,children:e("imprint.fields.group."+a)}),_.jsx("ul",{style:le.fieldList,children:o.map(l=>_.jsxs("li",{style:le.fieldItem,children:[_.jsx("span",{style:le.fieldPrefix,children:l.prefix}),_.jsx("span",{style:le.fieldName,children:l.name})]},l.prefix+l.name))})]},a))]}),_.jsxs("section",{style:le.section,children:[_.jsx("h2",{style:le.sectionHeading,children:e("imprint.template.heading")}),_.jsxs("ol",{style:le.orderedList,children:[_.jsx("li",{style:le.listItem,children:e("imprint.template.step1")}),_.jsx("li",{style:le.listItem,children:e("imprint.template.step2")}),_.jsx("li",{style:le.listItem,children:e("imprint.template.step3")})]}),_.jsx("p",{style:le.paragraph,children:e("imprint.template.naming")}),_.jsx("p",{style:le.paragraph,children:e("imprint.template.custom")})]}),_.jsx(BI,{})]})})}const wg="Oliver Gropp",Av="https://www.linkedin.com/in/oliver-gropp-a6b731163/",Mv="https://www.oliver-gropp.com";function BI(){const{t:e}=Je(),[t,i]=yt.useState(null);async function a(o,l){o.preventDefault(),(await Bc(l)).success?i(null):i(e("imprint.error.openUrl"))}return _.jsxs("section",{style:le.section,children:[_.jsx("h2",{style:le.sectionHeading,children:e("imprint.author.heading")}),_.jsx("p",{style:le.authorName,children:wg}),_.jsxs("div",{style:le.authorLinks,children:[_.jsx("a",{href:Av,rel:"noopener noreferrer",target:"_blank","aria-label":`${e("imprint.author.linkedin")} – ${wg}`,onClick:o=>a(o,Av),style:le.authorLink,children:e("imprint.author.linkedin")}),_.jsx("a",{href:Mv,rel:"noopener noreferrer",target:"_blank","aria-label":`${e("imprint.author.website")} – ${wg}`,onClick:o=>a(o,Mv),style:le.authorLink,children:e("imprint.author.website")})]}),t&&_.jsx("p",{style:le.urlError,children:t})]})}const le={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflowY:"auto",padding:"var(--spacing-xl)"},content:{width:"100%",maxWidth:"800px"},backButton:{display:"inline-flex",alignItems:"center",gap:"var(--spacing-xs)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)",marginBottom:"var(--spacing-lg)"},heading:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-lg)"},section:{marginBottom:"var(--spacing-lg)"},sectionHeading:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-md)"},depList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},depItem:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},depName:{fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},orderedList:{margin:"0 0 var(--spacing-md) 0",paddingLeft:"var(--spacing-lg)",color:"var(--color-text)"},listItem:{marginBottom:"var(--spacing-xs)",fontSize:"var(--font-size-body)",lineHeight:"1.5"},paragraph:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"},fieldGroup:{marginBottom:"var(--spacing-md)"},groupHeading:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-xs)"},fieldList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},fieldItem:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},fieldPrefix:{fontFamily:"monospace",fontSize:"var(--font-size-small)",color:"var(--color-text-hint)"},fieldName:{color:"var(--color-text)"},authorName:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},authorLinks:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},authorLink:{color:"var(--color-primary)",fontSize:"var(--font-size-body)",textDecoration:"underline",cursor:"pointer"},urlError:{margin:"var(--spacing-sm) 0 0 0",fontSize:"var(--font-size-small)",color:"var(--color-error, #d32f2f)"}},EI="2.0.0",Fv=[{version:"2.0.0",date:"2025-06-23",changes:[{type:"added",de:"Vier Verbindungsmethoden: Microsoft Fabric Service, lokaler Power-BI-Bericht, PBIP-Projektordner und Aktualisierung bestehender Dokumentation.",en:"Four connection methods: Microsoft Fabric Service, local Power BI report, PBIP project folder, and updating existing documentation."},{type:"added",de:"Dokumentation kompletter Fabric-Workspaces inkl. aller Semantic Models und Berichte.",en:"Documentation of complete Fabric workspaces including all semantic models and reports."},{type:"added",de:"Fabric IQ Readiness-Analyse für PBIP-Ordner.",en:"Fabric IQ readiness analysis for PBIP folders."},{type:"added",de:"Anpassbare Dokumentationsvorlage über den integrierten Vorlagen-Editor.",en:"Customizable documentation template via the built-in template editor."},{type:"added",de:"Versionsvergleich (Diff) zweier Dokumentationsstände.",en:"Version comparison (diff) of two documentation states."},{type:"added",de:"Export der erzeugten Dokumentation als PDF und HTML.",en:"Export of generated documentation as PDF and HTML."},{type:"added",de:"Automatische Änderungserkennung mit Versionsinkrement und Änderungsprotokoll beim Aktualisieren bestehender Dokumente.",en:"Automatic change detection with version increment and change log when updating existing documents."}]}],LI={added:"changelog.type.added",changed:"changelog.type.changed",fixed:"changelog.type.fixed",removed:"changelog.type.removed"},AI={added:"#2e7d32",changed:"#1565c0",fixed:"#c77700",removed:"#b71c1c"};function MI(e,t){const i=new Date(e+"T00:00:00");return Number.isNaN(i.getTime())?e:i.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function FI(){const{t:e}=Je(),t=Ur();function i(){t({type:"goBack"})}return _.jsx("main",{style:jr.container,children:_.jsxs("div",{style:jr.content,children:[_.jsxs("button",{type:"button",onClick:i,style:jr.backButton,"aria-label":e("dialog.back"),children:["← ",e("dialog.back")]}),_.jsx("h1",{style:jr.heading,children:e("changelog.heading")}),_.jsxs("p",{style:jr.currentVersion,children:[e("changelog.currentVersion"),": ",EI]}),Fv.length===0?_.jsx("p",{style:jr.paragraph,children:e("changelog.empty")}):Fv.map(a=>_.jsxs("section",{style:jr.section,children:[_.jsxs("div",{style:jr.releaseHeader,children:[_.jsxs("h2",{style:jr.sectionHeading,children:["v",a.version]}),_.jsx("span",{style:jr.releaseDate,children:MI(a.date)})]}),_.jsx("ul",{style:jr.changeList,children:a.changes.map((o,l)=>_.jsxs("li",{style:jr.changeItem,children:[_.jsx("span",{style:{...jr.badge,background:AI[o.type]},children:e(LI[o.type])}),_.jsx("span",{style:jr.changeText,children:o.en})]},l))})]},a.version))]})})}const jr={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflowY:"auto",padding:"var(--spacing-xl)"},content:{width:"100%",maxWidth:"800px"},backButton:{display:"inline-flex",alignItems:"center",gap:"var(--spacing-xs)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)",marginBottom:"var(--spacing-lg)"},heading:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-xs)"},currentVersion:{margin:"0 0 var(--spacing-lg) 0",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},section:{marginBottom:"var(--spacing-lg)"},releaseHeader:{display:"flex",alignItems:"baseline",gap:"var(--spacing-md)",borderBottom:"1px solid var(--color-border)",paddingBottom:"var(--spacing-xs)",marginBottom:"var(--spacing-md)"},sectionHeading:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",margin:0},releaseDate:{fontSize:"var(--font-size-small)",color:"var(--color-text-hint)"},changeList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},changeItem:{display:"flex",alignItems:"flex-start",gap:"var(--spacing-sm)"},badge:{flexShrink:0,display:"inline-block",minWidth:"72px",textAlign:"center",padding:"2px var(--spacing-sm)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-small)",fontWeight:"var(--font-weight-semibold)",color:"#ffffff",textTransform:"uppercase",letterSpacing:"0.03em"},changeText:{fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"},paragraph:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"}};function DI(){const{readinessResult:e}=Tn(),t=Ur(),[i,a]=yt.useState(null),{t:o}=Je(),l=(e==null?void 0:e.outputPath)??"";async function c(){var f;a(null);const d=await Bc(l);d.success||a(((f=d.error)==null?void 0:f.message)??"Unknown error")}function h(){t({type:"reset"})}return _.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-lg)"},children:[_.jsx("div",{style:{width:"64px",height:"64px",borderRadius:"50%",backgroundColor:"var(--color-success-bg)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2rem"},"aria-hidden":"true",children:"✓"}),_.jsx("h1",{style:{fontSize:"var(--font-size-heading)",textAlign:"center",margin:0},children:o("readiness.title")}),_.jsxs("div",{style:{backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",padding:"var(--spacing-md)",width:"100%",maxWidth:"560px",wordBreak:"break-all"},children:[_.jsx("p",{style:{margin:0,fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xs)"},children:o("readiness.filePath")}),_.jsx("p",{style:{margin:0,fontSize:"var(--font-size-body)",color:"var(--color-text)"},children:l})]}),i&&_.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[o("readiness.errorOpen"),": ",i]}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[_.jsx("button",{type:"button",onClick:c,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--color-primary-hover)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="var(--color-primary)"},children:o("readiness.openFile")}),_.jsx("button",{type:"button",onClick:h,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--color-success-bg)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:o("readiness.backHome")})]})]})}const RI=new Set(["META_ReportName","DS_Quelle","DS_System","DS_SchemaTabellen","DS_Owner","DS_Domäne","PQ_Name","PQ_Quelle","PQ_ZielTabelle","PQ_Beschreibung","PQT_Abfrage","PQT_MCode","PQT_Schrittname","PQT_Beschreibung","COL_Abfrage","COL_Spalte","COL_QuellTyp","COL_ZielTyp","COL_Transformation","MODELL_DatasetName","MODELL_BerichtName","DEP_BerichtName","DEP_BerichtID","DEP_BerichtURL","TBLTYP_Tabelle","TBLTYP_Typ","TBLTYP_Beschreibung","REL_Von","REL_Nach","REL_Kardinalität","REL_Kreuzfilter","REL_Aktiv","DAX_Measure","DAX_Beschreibung","DAX_Formel","RLS_Rolle","RLS_Beschreibung","RLS_Tabelle","RLS_FilterLogik","REFRESH_Frequenz","REFRESH_Uhrzeit","ENDORSEMENT_Analyse","DS_Lineage","DS_Architektur","MODELL_Visuals","META_Version","META_LetzteAktualisierung"]),SB=/\{\{(\w+)\}\}/g;function OI(e,t){const i=e.split(`
`),a=[];let o="",l="",c=[],h=0;function d(){if(h>0){const f=c.join(`
`),p=[],g=new Set;for(const x of f.matchAll(SB)){const y=x[1]??"";y&&!g.has(y)&&(g.add(y),p.push({id:`${h}-${y}`,name:y,label:t[y]??y.replace(/_/g," "),required:RI.has(y)}))}a.push({id:h,title:l,enabled:!0,params:p,rawContent:f})}else o=c.join(`
`)}for(const f of i)f.match(/^## \d+\./)?(d(),h++,l=f.replace(/^## \d+\.\s*/,""),c=[]):c.push(f);return d(),{header:o,chapters:a}}function zI(e,t){let i=e,a=1;for(const o of t){if(!o.enabled)continue;const l=new Set(o.params.map(h=>h.name)),c=o.rawContent.split(`
`).filter(h=>{const d=[...h.matchAll(SB)];return d.length===0?!0:d.some(f=>l.has(f[1]??""))});i+=`
## ${a}. ${o.title}${c.join(`
`)}`,a++}return i}function $I(){const{t:e}=Je(),t=Ur(),[i,a]=yt.useState(""),[o,l]=yt.useState([]),[c,h]=yt.useState(null),[d,f]=yt.useState(!0),[p,g]=yt.useState(!1),[x,y]=yt.useState(null),[C,k]=yt.useState(null),[v,w]=yt.useState(null),[B,L]=yt.useState("");yt.useEffect(()=>{(async()=>{var X;const W=await rA();if(W.success&&W.data){const q=OI(W.data.content,W.data.labels??{});a(q.header),l(q.chapters)}else y({type:"error",text:((X=W.error)==null?void 0:X.message)??e("error.unexpected")});f(!1)})()},[]);function F(W){l(X=>X.map(q=>q.id===W?{...q,enabled:!q.enabled}:q))}function D(W,X){l(q=>q.map(H=>H.id===W?{...H,title:X}:H)),k(null)}function z(W,X){l(q=>{const H=q.findIndex(lt=>lt.id===W),A=X==="up"?H-1:H+1;if(A<0||A>=q.length)return q;const $=[...q],I=$[H],Q=$[A];return $[H]=Q,$[A]=I,$})}function N(W,X){l(q=>q.map(H=>H.id===W?{...H,params:H.params.filter(A=>A.id!==X)}:H))}function P(W,X,q){l(H=>H.map(A=>A.id===W?{...A,params:A.params.map($=>$.id===X?{...$,label:q}:$)}:A)),w(null)}function at(W,X,q){l(H=>H.map(A=>{if(A.id!==W)return A;const $=A.params.findIndex(G=>G.id===X),I=q==="up"?$-1:$+1;if(I<0||I>=A.params.length)return A;const Q=[...A.params],lt=Q[$],R=Q[I];return Q[$]=R,Q[I]=lt,{...A,params:Q}}))}function K(W){if(!B.trim())return;const X=B.trim(),q=X.replace(/\s+/g,"_");l(H=>H.map(A=>{if(A.id!==W)return A;const $=`${A.id}-${q}`;if(A.params.some(Q=>Q.name===q))return A;const I=A.rawContent+`
{{${q}}}`;return{...A,params:[...A.params,{id:$,name:q,label:X,required:!1}],rawContent:I}})),L("")}async function Y(){var q;g(!0),y(null);const W=zI(i,o),X=await iA(W);g(!1),X.success?y({type:"success",text:e("templateEditor.saved")}):y({type:"error",text:((q=X.error)==null?void 0:q.message)??e("error.unexpected")})}return d?_.jsx("main",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:_.jsx("p",{children:e("templateEditor.loading")})}):_.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",padding:"var(--spacing-md)",gap:"var(--spacing-sm)",overflow:"auto"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[_.jsx("h1",{style:{fontSize:"var(--font-size-heading)",margin:0},children:e("templateEditor.title")}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[_.jsx("button",{type:"button",onClick:Y,disabled:p,style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e(p?"templateEditor.saving":"templateEditor.save")}),_.jsx("button",{type:"button",onClick:()=>t({type:"goBack"}),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e("dialog.back")})]})]}),x&&_.jsx("p",{style:{margin:0,padding:"var(--spacing-xs) var(--spacing-sm)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",color:x.type==="success"?"var(--color-success)":"var(--color-error)",backgroundColor:x.type==="success"?"var(--color-success-bg)":"var(--color-error-bg)"},children:x.text}),_.jsx("p",{style:{margin:0,color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)"},children:e("templateEditor.hint")}),_.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:o.map((W,X)=>_.jsxs("div",{style:{border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",overflow:"hidden"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)",padding:"var(--spacing-sm)",backgroundColor:W.enabled?"var(--color-surface)":"var(--color-error-bg)",opacity:W.enabled?1:.6},children:[_.jsx("input",{type:"checkbox",checked:W.enabled,onChange:()=>F(W.id),style:{width:"18px",height:"18px",cursor:"pointer"}}),_.jsxs("span",{style:{fontWeight:"bold",minWidth:"28px",color:"var(--color-text-secondary)"},children:[X+1,"."]}),C===W.id?_.jsx("input",{autoFocus:!0,defaultValue:W.title,onBlur:q=>D(W.id,q.target.value),onKeyDown:q=>{q.key==="Enter"&&D(W.id,q.currentTarget.value),q.key==="Escape"&&k(null)},style:{flex:1,fontSize:"var(--font-size-body)",padding:"2px 6px",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)"}}):_.jsx("span",{onClick:()=>k(W.id),title:e("templateEditor.clickToRename"),style:{flex:1,cursor:"text",fontSize:"var(--font-size-body)"},children:W.title}),_.jsx("button",{type:"button",onClick:()=>h(c===W.id?null:W.id),style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center"},children:c===W.id?"▾":"▸"}),_.jsx("button",{type:"button",onClick:()=>z(W.id,"up"),disabled:X===0,style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:X===0?"default":"pointer",fontSize:"15px",display:"flex",alignItems:"center",justifyContent:"center",opacity:X===0?.3:1},children:"⬆"}),_.jsx("button",{type:"button",onClick:()=>z(W.id,"down"),disabled:X===o.length-1,style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:X===o.length-1?"default":"pointer",fontSize:"15px",display:"flex",alignItems:"center",justifyContent:"center",opacity:X===o.length-1?.3:1},children:"⬇"})]}),c===W.id&&W.enabled&&_.jsxs("div",{style:{padding:"var(--spacing-sm)",paddingTop:0,borderTop:"1px solid var(--color-border)",backgroundColor:"var(--color-surface)"},children:[_.jsxs("p",{style:{margin:"var(--spacing-xs) 0",fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:[e("templateEditor.params")," (",W.params.length,")"]}),W.params.map((q,H)=>_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"3px 0"},children:[v===q.id?_.jsx("input",{autoFocus:!0,defaultValue:q.label,onBlur:A=>P(W.id,q.id,A.target.value),onKeyDown:A=>{A.key==="Enter"&&P(W.id,q.id,A.currentTarget.value),A.key==="Escape"&&w(null)},style:{flex:1,fontSize:"13px",padding:"2px 6px",border:"1px solid var(--color-primary)",borderRadius:"3px"}}):_.jsxs("span",{onClick:()=>{q.required||w(q.id)},style:{flex:1,fontSize:"13px",cursor:q.required?"default":"text",color:q.required?"var(--color-primary)":"var(--color-text)"},children:[q.required?"🔒 ":"",q.label]}),_.jsx("button",{type:"button",onClick:()=>at(W.id,q.id,"up"),disabled:H===0,style:{width:"22px",height:"22px",border:"1px solid var(--color-border)",borderRadius:"3px",background:"var(--color-surface)",cursor:H===0?"default":"pointer",fontSize:"13px",display:"flex",alignItems:"center",justifyContent:"center",opacity:H===0?.3:1},children:"⬆"}),_.jsx("button",{type:"button",onClick:()=>at(W.id,q.id,"down"),disabled:H===W.params.length-1,style:{width:"22px",height:"22px",border:"1px solid var(--color-border)",borderRadius:"3px",background:"var(--color-surface)",cursor:H===W.params.length-1?"default":"pointer",fontSize:"13px",display:"flex",alignItems:"center",justifyContent:"center",opacity:H===W.params.length-1?.3:1},children:"⬇"}),!q.required&&_.jsx("button",{type:"button",onClick:()=>N(W.id,q.id),title:e("templateEditor.removeParam"),style:{width:"22px",height:"22px",border:"1px solid var(--color-error)",borderRadius:"3px",background:"var(--color-error-bg)",color:"var(--color-error)",cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]},q.id)),_.jsxs("div",{style:{display:"flex",gap:"6px",marginTop:"var(--spacing-xs)"},children:[_.jsx("input",{type:"text",placeholder:e("templateEditor.newParamPlaceholder"),value:B,onChange:q=>L(q.target.value),onKeyDown:q=>{q.key==="Enter"&&K(W.id)},style:{flex:1,fontSize:"13px",padding:"4px 8px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)"}}),_.jsxs("button",{type:"button",onClick:()=>K(W.id),style:{padding:"4px 12px",fontSize:"13px",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",color:"var(--color-primary)",cursor:"pointer"},children:["+ ",e("templateEditor.addParam")]})]})]})]},W.id))})]})}function NI(){const{t:e}=Je(),t=Ur(),[i,a]=yt.useState(""),[o,l]=yt.useState(""),[c,h]=yt.useState(null),[d,f]=yt.useState(null),[p,g]=yt.useState(!1),[x,y]=yt.useState("rendered");async function C(v){const w=await qv("Markdown files (*.md)");w.success&&w.data&&(v==="old"?a(w.data):l(w.data))}async function k(){var w;if(!i||!o)return;g(!0),f(null),h(null);const v=await aA(i,o);g(!1),v.success&&v.data?h(v.data):f(((w=v.error)==null?void 0:w.message)??e("error.unexpected"))}return _.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",padding:"var(--spacing-md)",gap:"var(--spacing-sm)",overflow:"hidden"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[_.jsx("h1",{style:{fontSize:"var(--font-size-heading)",margin:0},children:e("diff.title")}),_.jsx("button",{type:"button",onClick:()=>t({type:"goBack"}),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e("dialog.back")})]}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)",alignItems:"center",flexWrap:"wrap"},children:[_.jsxs("div",{style:{flex:1,minWidth:"200px"},children:[_.jsx("label",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",display:"block",marginBottom:"4px"},children:e("diff.oldVersion")}),_.jsxs("div",{style:{display:"flex",gap:"6px"},children:[_.jsx("input",{type:"text",readOnly:!0,value:i?i.split(/[\\/]/).pop()??"":"",placeholder:e("diff.selectFile"),style:{flex:1,padding:"6px 10px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",backgroundColor:"var(--color-surface)"}}),_.jsx("button",{type:"button",onClick:()=>C("old"),style:{padding:"6px 12px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"var(--font-size-body)"},children:"…"})]})]}),_.jsxs("div",{style:{flex:1,minWidth:"200px"},children:[_.jsx("label",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",display:"block",marginBottom:"4px"},children:e("diff.newVersion")}),_.jsxs("div",{style:{display:"flex",gap:"6px"},children:[_.jsx("input",{type:"text",readOnly:!0,value:o?o.split(/[\\/]/).pop()??"":"",placeholder:e("diff.selectFile"),style:{flex:1,padding:"6px 10px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",backgroundColor:"var(--color-surface)"}}),_.jsx("button",{type:"button",onClick:()=>C("new"),style:{padding:"6px 12px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"var(--font-size-body)"},children:"…"})]})]}),_.jsx("button",{type:"button",onClick:k,disabled:!i||!o||p,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:i&&o?"var(--color-primary)":"var(--color-border)",color:i&&o?"var(--color-primary-contrast)":"var(--color-text-secondary)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:i&&o?"pointer":"default",alignSelf:"flex-end"},children:e(p?"diff.comparing":"diff.compare")})]}),d&&_.jsx("p",{style:{margin:0,color:"var(--color-error)",fontSize:"var(--font-size-body)"},children:d}),c&&_.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[_.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("diff.summary"),": ",_.jsx("strong",{children:c.totalChanges})," ",e("diff.changes")]}),_.jsxs("div",{style:{display:"flex",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",overflow:"hidden"},children:[_.jsx("button",{type:"button",onClick:()=>y("rendered"),style:{padding:"4px 12px",fontSize:"var(--font-size-hint)",border:"none",cursor:"pointer",backgroundColor:x==="rendered"?"var(--color-primary)":"var(--color-surface)",color:x==="rendered"?"var(--color-primary-contrast)":"var(--color-text)"},children:e("diff.viewRendered")}),_.jsx("button",{type:"button",onClick:()=>y("code"),style:{padding:"4px 12px",fontSize:"var(--font-size-hint)",border:"none",borderLeft:"1px solid var(--color-border)",cursor:"pointer",backgroundColor:x==="code"?"var(--color-primary)":"var(--color-surface)",color:x==="code"?"var(--color-primary-contrast)":"var(--color-text)"},children:e("diff.viewCode")})]})]}),c&&x==="code"&&_.jsxs("div",{style:{flex:1,overflow:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontFamily:"Consolas, monospace",fontSize:"12px",lineHeight:"1.6"},children:[c.lines.map((v,w)=>_.jsx(qI,{line:v},w)),c.lines.length===0&&_.jsx("p",{style:{padding:"var(--spacing-md)",color:"var(--color-text-secondary)",textAlign:"center"},children:e("diff.identical")})]}),c&&x==="rendered"&&_.jsx("div",{style:{flex:1,overflow:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"13px",lineHeight:"1.7"},children:c.lines.length===0?_.jsx("p",{style:{padding:"var(--spacing-md)",color:"var(--color-text-secondary)",textAlign:"center"},children:e("diff.identical")}):_.jsx(II,{lines:c.lines})})]})}function qI({line:e}){const t={add:{backgroundColor:"#e6ffec",color:"#1a7f37",padding:"1px 8px"},remove:{backgroundColor:"#ffebe9",color:"#cf222e",padding:"1px 8px"},context:{backgroundColor:"transparent",color:"var(--color-text)",padding:"1px 8px"},hunk:{backgroundColor:"#ddf4ff",color:"#0969da",padding:"4px 8px",fontWeight:"bold"},header:{backgroundColor:"var(--color-surface)",color:"var(--color-text-secondary)",padding:"4px 8px",fontStyle:"italic"}},i=e.type==="add"?"+ ":e.type==="remove"?"- ":"  ";return _.jsx("div",{style:{...t[e.type],whiteSpace:"pre-wrap",borderBottom:"1px solid var(--color-border)"},children:e.type==="header"||e.type==="hunk"?e.text:i+e.text})}function II({lines:e}){const t=[];for(let i=0;i<e.length;i++){const a=e[i];if(a.type==="header"||a.type==="hunk")continue;const o=a.text;a.type==="remove"?t.push(_.jsx("div",{style:{backgroundColor:"#ffebe9",padding:"2px 12px",borderLeft:"3px solid #cf222e"},children:_.jsx(Tg,{text:o,strikethrough:!0})},i)):a.type==="add"?t.push(_.jsx("div",{style:{backgroundColor:"#e6ffec",padding:"2px 12px",borderLeft:"3px solid #1a7f37"},children:_.jsx(Tg,{text:o})},i)):t.push(_.jsx("div",{style:{padding:"2px 12px"},children:_.jsx(Tg,{text:o})},i))}return _.jsx(_.Fragment,{children:t})}function Tg({text:e,strikethrough:t}){const i=e,a=t?{textDecoration:"line-through",opacity:.7}:{};if(i.startsWith("#### "))return _.jsx("h4",{style:{margin:"4px 0",fontSize:"13px",...a},children:i.slice(5)});if(i.startsWith("### "))return _.jsx("h3",{style:{margin:"4px 0",fontSize:"14px",...a},children:i.slice(4)});if(i.startsWith("## "))return _.jsx("h2",{style:{margin:"6px 0",fontSize:"15px",...a},children:i.slice(3)});if(i.startsWith("# "))return _.jsx("h1",{style:{margin:"8px 0",fontSize:"17px",...a},children:i.slice(2)});if(i.includes("|")&&i.trim().startsWith("|")){const l=i.split("|").filter((c,h,d)=>h>0&&h<d.length-1);return l.every(c=>/^[\s\-:]+$/.test(c))?null:_.jsx("div",{style:{display:"flex",gap:"4px",fontSize:"12px",...a},children:l.map((c,h)=>_.jsx("span",{style:{flex:1,padding:"2px 4px",backgroundColor:"rgba(0,0,0,0.03)",borderRadius:"2px"},children:c.trim()},h))})}if(/^---+$/.test(i.trim()))return _.jsx("hr",{style:{margin:"6px 0",border:"none",borderTop:"1px solid var(--color-border)"}});if(!i.trim())return _.jsx("div",{style:{height:"8px"}});const o=i.split(/(\*\*.*?\*\*)/);return _.jsx("p",{style:{margin:"2px 0",...a},children:o.map((l,c)=>l.startsWith("**")&&l.endsWith("**")?_.jsx("strong",{children:l.slice(2,-2)},c):_.jsx("span",{children:l},c))})}const jI=300;function HI(){const{t:e}=Je(),t=Ur(),[i,a]=yt.useState("dialog"),[o,l]=yt.useState(null),[c,h]=yt.useState(""),[d,f]=yt.useState(""),[p,g]=yt.useState(""),[x,y]=yt.useState(""),[C,k]=yt.useState(!1),[v,w]=yt.useState(""),[B,L]=yt.useState(!1),[F,D]=yt.useState(0),[z,N]=yt.useState(""),P=yt.useRef(null),[at,K]=yt.useState(null),[Y,W]=yt.useState([]),[X,q]=yt.useState(0),[H,A]=yt.useState(null),[$,I]=yt.useState({}),[Q,lt]=yt.useState(null);yt.useEffect(()=>()=>G(),[]);function R(){G(),P.current=setInterval(async()=>{const dt=await $v();dt.success&&dt.data&&(D(dt.data.percent),N(dt.data.message))},jI)}function G(){P.current!==null&&(clearInterval(P.current),P.current=null)}function ct(){return{tenantId:c||void 0,workspaceId:d,clientId:p||void 0,clientSecret:x||void 0,authMode:p&&x?"service_principal":"sso"}}async function ut(){var dt;if(l(null),!d.trim()){l(e("workspace.error.workspaceRequired"));return}if(!c.trim()){l(e("workspace.error.tenantRequired"));return}if(!v.trim()){l(e("workspace.error.folderRequired"));return}a("busy"),N(e("workspace.busy.enumerating")),D(0),R();try{const St=await nA(ct(),v,B);if(G(),!St.success||!St.data){l(((dt=St.error)==null?void 0:dt.message)??e("error.unexpected")),a("dialog");return}K(St.data),St.data.onlyWorkspace?await jt():a("items")}catch{G(),l(e("error.unexpected")),a("dialog")}}async function mt(){var dt;l(null),a("busy"),N(e("workspace.busy.extracting")),D(0),R();try{const St=await oA();if(G(),!St.success||!St.data){l(((dt=St.error)==null?void 0:dt.message)??e("error.unexpected")),a("items");return}const Tt=St.data.documents;W(Tt),Tt.length>0?(q(0),await vt(Tt[0].index),a("form")):await jt()}catch{G(),l(e("error.unexpected")),a("items")}}async function vt(dt){const St=await sA(dt);if(St.success&&St.data){A({name:St.data.name,sections:St.data.sections});const Tt={};for(const J of St.data.sections)for(const kt of J.fields)Tt[kt.name]=kt.value;I(Tt)}else A({name:"",sections:[]}),I({})}async function _t(dt){const St=Y[X];dt&&St&&await lA(St.index,$);const Tt=X+1;Tt<Y.length?(q(Tt),await vt(Y[Tt].index)):await jt()}async function jt(){var dt;a("busy"),N(e("workspace.busy.generating")),D(50),R();try{const St=await cA();if(G(),!St.success||!St.data){l(((dt=St.error)==null?void 0:dt.message)??e("error.unexpected")),a(Y.length>0?"form":"items");return}lt(St.data),a("result")}catch{G(),l(e("error.unexpected")),a("items")}}async function Nt(){await GL(),G()}function Ct(){G(),t({type:"reset"})}if(i==="busy")return _.jsxs("main",{style:wt.center,children:[_.jsx("h2",{style:wt.subheading,children:z}),_.jsx("div",{style:wt.progressTrack,children:_.jsx("div",{style:{...wt.progressFill,width:`${F}%`}})}),_.jsxs("p",{style:wt.muted,children:[F,"%"]}),_.jsx("button",{type:"button",style:wt.backButton,onClick:Nt,children:e("workspace.cancel")})]});if(i==="items"&&at)return _.jsx("main",{style:wt.container,children:_.jsxs("div",{style:wt.wideCard,children:[_.jsx("h2",{style:wt.title,children:e("workspace.items.title")}),_.jsx("p",{style:wt.description,children:at.workspaceName}),_.jsxs("div",{style:wt.statsRow,children:[_.jsx(bs,{label:e("workspace.items.models"),value:at.modelCount}),_.jsx(bs,{label:e("workspace.items.reports"),value:at.reportCount}),_.jsx(bs,{label:e("workspace.items.other"),value:at.otherCount}),_.jsx(bs,{label:e("workspace.items.users"),value:at.userCount})]}),o&&_.jsx("div",{style:wt.errorBanner,role:"alert",children:o}),_.jsx("div",{style:wt.tableWrap,children:_.jsxs("table",{style:wt.table,children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{style:wt.th,children:e("workspace.items.colName")}),_.jsx("th",{style:wt.th,children:e("workspace.items.colType")}),_.jsx("th",{style:wt.th,children:e("workspace.items.colReports")})]})}),_.jsx("tbody",{children:at.items.map((dt,St)=>_.jsxs("tr",{children:[_.jsx("td",{style:wt.td,children:dt.name}),_.jsx("td",{style:wt.td,children:dt.type}),_.jsx("td",{style:wt.td,children:dt.reports??""})]},`${dt.type}-${dt.name}-${St}`))})]})}),_.jsxs("div",{style:wt.actions,children:[_.jsx("button",{type:"button",style:wt.backButton,onClick:Ct,children:e("dialog.back")}),_.jsx("button",{type:"button",style:wt.primaryButton,onClick:mt,children:e("workspace.items.continue")})]})]})});if(i==="form"&&H){const dt=Y.length,St=`${e("workspace.form.doc")} ${X+1} / ${dt}: ${H.name}`;return _.jsx("main",{style:wt.container,children:_.jsxs("div",{style:wt.wideCard,children:[_.jsx("h2",{style:wt.title,children:St}),_.jsx("div",{style:wt.progressTrack,children:_.jsx("div",{style:{...wt.progressFill,width:`${X/dt*100}%`}})}),_.jsx("div",{style:wt.formScroll,children:H.sections.map(Tt=>_.jsxs("div",{style:{marginBottom:"var(--spacing-md)"},children:[_.jsx("h3",{style:wt.sectionTitle,children:Tt.title}),Tt.fields.map(J=>_.jsx(PI,{field:J,value:$[J.name]??"",onChange:kt=>I(Ar=>({...Ar,[J.name]:kt}))},J.name))]},Tt.title))}),_.jsxs("div",{style:wt.actions,children:[_.jsx("button",{type:"button",style:wt.backButton,onClick:()=>void _t(!1),children:e("workspace.form.skip")}),_.jsx("button",{type:"button",style:wt.primaryButton,onClick:()=>void _t(!0),children:X+1<dt?e("workspace.form.apply"):e("workspace.form.applyLast")})]})]})})}return i==="result"&&Q?_.jsx("main",{style:wt.container,children:_.jsxs("div",{style:wt.wideCard,children:[_.jsx("h2",{style:wt.title,children:e("workspace.result.title")}),_.jsx("p",{style:wt.description,children:e("workspace.result.outputDir")}),_.jsx("p",{style:wt.pathText,children:Q.outputDir}),_.jsxs("div",{style:wt.statsRow,children:[_.jsx(bs,{label:e("workspace.result.files"),value:Q.fileCount}),_.jsx(bs,{label:e("workspace.result.errors"),value:Q.errorCount})]}),Q.errorCount>0&&Q.errors.length>0&&_.jsx("div",{style:wt.errorList,children:Q.errors.slice(0,10).map((dt,St)=>_.jsxs("div",{style:wt.errorListItem,children:["• ",dt]},St))}),_.jsxs("div",{style:wt.actions,children:[_.jsx("button",{type:"button",style:wt.primaryButton,onClick:()=>void Bc(Q.overviewPath),children:e("workspace.result.openOverview")}),Q.errorLogPath&&_.jsx("button",{type:"button",style:wt.backButton,onClick:()=>void Bc(Q.errorLogPath),children:e("workspace.result.openLog")}),_.jsx("button",{type:"button",style:wt.backButton,onClick:Ct,children:e("workspace.result.backHome")})]})]})}):_.jsx("main",{style:wt.container,children:_.jsxs("div",{style:wt.dialogCard,children:[_.jsx("h2",{style:wt.title,children:e("workspace.dialog.title")}),_.jsx("p",{style:wt.description,children:e("workspace.dialog.desc")}),o&&_.jsx("div",{style:wt.errorBanner,role:"alert",children:o}),_.jsxs("div",{style:wt.fields,children:[_.jsx(_u,{label:e("fabric.tenantId"),value:c,onChange:h,placeholder:e("fabric.tenantId.placeholder")}),_.jsx(_u,{label:e("fabric.workspaceId"),value:d,onChange:f,placeholder:e("fabric.workspaceId.placeholder"),required:!0}),_.jsxs("div",{style:wt.fieldWrapper,children:[_.jsx("label",{style:wt.label,children:e("workspace.targetFolder")}),_.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[_.jsx("input",{readOnly:!0,value:v,placeholder:e("workspace.noFolder"),style:{...wt.input,flex:1}}),_.jsx("button",{type:"button",style:wt.backButton,onClick:async()=>{const dt=await Nv();dt.success&&dt.data&&w(dt.data)},children:e("workspace.selectFolder")})]})]}),_.jsxs("label",{style:wt.checkboxRow,children:[_.jsx("input",{type:"checkbox",checked:B,onChange:dt=>L(dt.target.checked)}),_.jsxs("span",{children:[e("workspace.onlyWorkspace"),_.jsxs("span",{style:wt.hintText,children:[" — ",e("workspace.onlyWorkspace.hint")]})]})]})]}),_.jsxs("div",{style:wt.advancedSection,children:[_.jsxs("button",{type:"button",style:wt.advancedToggle,onClick:()=>k(!C),children:[_.jsx("span",{children:C?"▾":"▸"})," ",e("fabric.advanced")]}),C&&_.jsxs("div",{style:wt.advancedContent,children:[_.jsx(_u,{label:e("fabric.clientId"),value:p,onChange:g,placeholder:e("fabric.clientId.placeholder")}),_.jsx(_u,{label:e("fabric.clientSecret"),value:x,onChange:y,placeholder:e("fabric.clientSecret.placeholder"),type:"password"})]})]}),_.jsxs("div",{style:wt.actions,children:[_.jsx("button",{type:"button",style:wt.backButton,onClick:Ct,children:e("dialog.back")}),_.jsx("button",{type:"button",style:wt.primaryButton,onClick:ut,children:e("workspace.start")})]})]})})}function bs({label:e,value:t}){return _.jsxs("div",{style:wt.stat,children:[_.jsx("div",{style:wt.statValue,children:t}),_.jsx("div",{style:wt.statLabel,children:e})]})}function _u({label:e,value:t,onChange:i,placeholder:a,required:o,type:l="text"}){return _.jsxs("div",{style:wt.fieldWrapper,children:[_.jsxs("label",{style:wt.label,children:[e,o&&_.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),_.jsx("input",{type:l,value:t,onChange:c=>i(c.target.value),placeholder:a,style:wt.input})]})}function PI({field:e,value:t,onChange:i}){const a=t.length>60||t.includes(`
`);return _.jsxs("div",{style:wt.fieldWrapper,children:[_.jsxs("label",{style:wt.label,children:[e.label,e.source==="auto"&&_.jsx("span",{style:wt.autoBadge,children:" (auto)"})]}),a?_.jsx("textarea",{value:t,onChange:o=>i(o.target.value),rows:3,style:{...wt.input,resize:"vertical",fontFamily:"var(--font-family)"}}):_.jsx("input",{value:t,onChange:o=>i(o.target.value),style:wt.input}),e.tooltip&&_.jsx("span",{style:wt.hintText,children:e.tooltip})]})}const wt={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},center:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-md)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"520px"},wideCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"760px"},title:{fontSize:"var(--font-size-heading)",fontWeight:600,marginBottom:"var(--spacing-xs)"},subheading:{fontSize:"var(--font-size-subheading)"},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-lg)"},pathText:{fontFamily:"monospace",fontSize:"var(--font-size-body)",wordBreak:"break-all",marginBottom:"var(--spacing-md)"},fields:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},fieldWrapper:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",marginBottom:"var(--spacing-sm)"},label:{fontSize:"var(--font-size-body)",fontWeight:600,color:"var(--color-text)"},input:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",outline:"none",fontFamily:"var(--font-family)"},checkboxRow:{display:"flex",alignItems:"flex-start",gap:"var(--spacing-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},hintText:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)"},autoBadge:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)",fontWeight:400},advancedSection:{marginTop:"var(--spacing-md)"},advancedToggle:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",background:"none",border:"none",cursor:"pointer",fontSize:"var(--font-size-body)",color:"var(--color-primary)",fontWeight:600,padding:"var(--spacing-xs) 0",fontFamily:"var(--font-family)"},advancedContent:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)",paddingLeft:"var(--spacing-md)",borderLeft:"2px solid var(--color-border)"},actions:{display:"flex",justifyContent:"space-between",marginTop:"var(--spacing-xl)",gap:"var(--spacing-md)"},backButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)"},primaryButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"none",borderRadius:"var(--radius-sm)",background:"var(--color-primary)",color:"var(--color-primary-contrast)",cursor:"pointer",fontFamily:"var(--font-family)",fontWeight:600},errorBanner:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-md)",border:"1px solid var(--color-error)"},statsRow:{display:"flex",gap:"var(--spacing-lg)",marginBottom:"var(--spacing-lg)"},stat:{display:"flex",flexDirection:"column",alignItems:"center"},statValue:{fontSize:"var(--font-size-heading)",fontWeight:700,color:"var(--color-primary)"},statLabel:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},tableWrap:{maxHeight:"280px",overflowY:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)"},table:{width:"100%",borderCollapse:"collapse",fontSize:"var(--font-size-body)"},th:{textAlign:"left",padding:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)",position:"sticky",top:0,background:"var(--color-surface)"},td:{padding:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},formScroll:{maxHeight:"360px",overflowY:"auto",paddingRight:"var(--spacing-sm)"},sectionTitle:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)",marginTop:"var(--spacing-md)"},progressTrack:{width:"100%",maxWidth:"480px",height:"8px",backgroundColor:"var(--color-border)",borderRadius:"4px",overflow:"hidden",marginBottom:"var(--spacing-sm)"},progressFill:{height:"100%",backgroundColor:"var(--color-primary)",borderRadius:"4px",transition:"width 200ms ease-out"},muted:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},errorList:{maxHeight:"160px",overflowY:"auto",background:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm)",marginBottom:"var(--spacing-md)"},errorListItem:{color:"var(--color-error)",fontSize:"var(--font-size-hint)"}};function WI({status:e}){const{t}=Je(),i=e??t("status.ready");return _.jsx("footer",{style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",borderTop:"1px solid var(--color-border)",fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:i})}function UI(){const{view:e}=Tn();return _.jsxs(_.Fragment,{children:[e==="Welcome"&&_.jsx(YL,{}),e==="FabricDialog"&&_.jsx(uA,{}),e==="LocalDialog"&&_.jsx(dA,{}),e==="PBIPDialog"&&_.jsx(fA,{}),e==="UpdateDialog"&&_.jsx(pA,{}),e==="Progress"&&_.jsx(yA,{}),e==="FormView"&&_.jsx(CA,{}),e==="ResultView"&&_.jsx(SI,{}),e==="ReadinessResult"&&_.jsx(DI,{}),e==="ImprintView"&&_.jsx(_I,{}),e==="ChangelogView"&&_.jsx(FI,{}),e==="TemplateEditor"&&_.jsx($I,{}),e==="DiffView"&&_.jsx(NI,{}),e==="Workspace"&&_.jsx(HI,{}),_.jsx(WI,{})]})}function YI(){return _.jsx(IL,{children:_.jsx(UI,{})})}NL.createRoot(document.getElementById("root")).render(_.jsx(yt.StrictMode,{children:_.jsx(YI,{})}));export{C1 as $,fy as A,Vv as B,XO as C,ZD as D,b3 as E,QI as F,aO as G,Ec as H,XI as I,iO as J,Dd as K,K3 as L,sk as M,Ps as N,t1 as O,HD as P,Pg as Q,VO as R,Ic as S,Fi as T,nt as U,ot as V,oM as W,ck as X,ND as Y,IO as Z,S as _,dM as a,Lr as a$,b1 as a0,o7 as a1,e7 as a2,a7 as a3,i7 as a4,JI as a5,Um as a6,n7 as a7,t7 as a8,gs as a9,c4 as aA,oy as aB,ay as aC,$u as aD,wO as aE,SO as aF,kO as aG,vO as aH,fO as aI,HS as aJ,mO as aK,dO as aL,bO as aM,PS as aN,gO as aO,BO as aP,_O as aQ,TO as aR,LO as aS,EO as aT,pO as aU,WS as aV,CO as aW,xO as aX,yO as aY,US as aZ,r6 as a_,l7 as aa,s7 as ab,r7 as ac,O4 as ad,i_ as ae,C7 as af,Ut as ag,Zi as ah,Yc as ai,wz as aj,uy as ak,Lt as al,q6 as am,b7 as an,v7 as ao,y7 as ap,Rt as aq,x7 as ar,py as as,p6 as at,l6 as au,s6 as av,Xt as aw,xd as ax,dr as ay,br as az,uM as b,ia as b0,lc as b1,KS as b2,mo as b3,rw as b4,Hv as b5,qD as b6,VI as b7,EL as b8,Sz as b9,ZI as ba,jm as bb,gn as bc,Mc as bd,f1 as be,xF as bf,Mt as bg,IS as bh,Wr as bi,uF as bj,Im as bk,Sk as bl,Pc as bm,_k as bn,KI as bo,BA as bp,e6 as bq,ce as c,Zt as d,lk as e,Ze as f,pM as g,Fa as h,Mi as i,hO as j,jc as k,gt as l,tw as m,gM as n,mM as o,hM as p,c7 as q,bn as r,fM as s,SA as t,S7 as u,k7 as v,KO as w,Ei as x,_e as y,xM as z};
