attraverso 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ var vC=Object.defineProperty;var wC=(e,t,n)=>t in e?vC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ge=(e,t,n)=>wC(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ms(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J0={exports:{}},du={},ew={exports:{}},we={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Os=Symbol.for("react.element"),xC=Symbol.for("react.portal"),bC=Symbol.for("react.fragment"),EC=Symbol.for("react.strict_mode"),kC=Symbol.for("react.profiler"),_C=Symbol.for("react.provider"),SC=Symbol.for("react.context"),CC=Symbol.for("react.forward_ref"),AC=Symbol.for("react.suspense"),NC=Symbol.for("react.memo"),DC=Symbol.for("react.lazy"),dg=Symbol.iterator;function TC(e){return e===null||typeof e!="object"?null:(e=dg&&e[dg]||e["@@iterator"],typeof e=="function"?e:null)}var tw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nw=Object.assign,rw={};function fo(e,t,n){this.props=e,this.context=t,this.refs=rw,this.updater=n||tw}fo.prototype.isReactComponent={};fo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iw(){}iw.prototype=fo.prototype;function eh(e,t,n){this.props=e,this.context=t,this.refs=rw,this.updater=n||tw}var th=eh.prototype=new iw;th.constructor=eh;nw(th,fo.prototype);th.isPureReactComponent=!0;var hg=Array.isArray,ow=Object.prototype.hasOwnProperty,nh={current:null},sw={key:!0,ref:!0,__self:!0,__source:!0};function lw(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)ow.call(t,r)&&!sw.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Os,type:e,key:o,ref:s,props:i,_owner:nh.current}}function RC(e,t){return{$$typeof:Os,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function rh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Os}function IC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pg=/\/+/g;function Ju(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IC(""+e.key):t.toString(36)}function zl(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Os:case xC:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Ju(s,0):r,hg(i)?(n="",e!=null&&(n=e.replace(pg,"$&/")+"/"),zl(i,t,n,"",function(u){return u})):i!=null&&(rh(i)&&(i=RC(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(pg,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",hg(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+Ju(o,l);s+=zl(o,t,n,a,i)}else if(a=TC(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+Ju(o,l++),s+=zl(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ks(e,t,n){if(e==null)return e;var r=[],i=0;return zl(e,r,"","",function(o){return t.call(n,o,i++)}),r}function MC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var wt={current:null},jl={transition:null},OC={ReactCurrentDispatcher:wt,ReactCurrentBatchConfig:jl,ReactCurrentOwner:nh};function aw(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:Ks,forEach:function(e,t,n){Ks(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ks(e,function(){t++}),t},toArray:function(e){return Ks(e,function(t){return t})||[]},only:function(e){if(!rh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=fo;we.Fragment=bC;we.Profiler=kC;we.PureComponent=eh;we.StrictMode=EC;we.Suspense=AC;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OC;we.act=aw;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=nw({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=nh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)ow.call(t,a)&&!sw.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Os,type:e.type,key:i,ref:o,props:r,_owner:s}};we.createContext=function(e){return e={$$typeof:SC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_C,_context:e},e.Consumer=e};we.createElement=lw;we.createFactory=function(e){var t=lw.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:CC,render:e}};we.isValidElement=rh;we.lazy=function(e){return{$$typeof:DC,_payload:{_status:-1,_result:e},_init:MC}};we.memo=function(e,t){return{$$typeof:NC,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=jl.transition;jl.transition={};try{e()}finally{jl.transition=t}};we.unstable_act=aw;we.useCallback=function(e,t){return wt.current.useCallback(e,t)};we.useContext=function(e){return wt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return wt.current.useDeferredValue(e)};we.useEffect=function(e,t){return wt.current.useEffect(e,t)};we.useId=function(){return wt.current.useId()};we.useImperativeHandle=function(e,t,n){return wt.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return wt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return wt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return wt.current.useMemo(e,t)};we.useReducer=function(e,t,n){return wt.current.useReducer(e,t,n)};we.useRef=function(e){return wt.current.useRef(e)};we.useState=function(e){return wt.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return wt.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return wt.current.useTransition()};we.version="18.3.1";ew.exports=we;var L=ew.exports;const fa=Ms(L);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var PC=L,LC=Symbol.for("react.element"),zC=Symbol.for("react.fragment"),jC=Object.prototype.hasOwnProperty,FC=PC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BC={key:!0,ref:!0,__self:!0,__source:!0};function uw(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)jC.call(t,r)&&!BC.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:LC,type:e,key:o,ref:s,props:i,_owner:FC.current}}du.Fragment=zC;du.jsx=uw;du.jsxs=uw;J0.exports=du;var C=J0.exports,cw={exports:{}},$t={},fw={exports:{}},dw={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(I,M){var E=I.length;I.push(M);e:for(;0<E;){var B=E-1>>>1,H=I[B];if(0<i(H,M))I[B]=M,I[E]=H,E=B;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var M=I[0],E=I.pop();if(E!==M){I[0]=E;e:for(var B=0,H=I.length,D=H>>>1;B<D;){var Y=2*(B+1)-1,ne=I[Y],J=Y+1,ee=I[J];if(0>i(ne,E))J<H&&0>i(ee,ne)?(I[B]=ee,I[J]=E,B=J):(I[B]=ne,I[Y]=E,B=Y);else if(J<H&&0>i(ee,E))I[B]=ee,I[J]=E,B=J;else break e}}return M}function i(I,M){var E=I.sortIndex-M.sortIndex;return E!==0?E:I.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,h=3,d=!1,p=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(I){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=I)r(u),M.sortIndex=M.expirationTime,t(a,M);else break;M=n(u)}}function x(I){if(v=!1,m(I),!p)if(n(a)!==null)p=!0,P(_);else{var M=n(u);M!==null&&z(x,M.startTime-I)}}function _(I,M){p=!1,v&&(v=!1,g(A),A=-1),d=!0;var E=h;try{for(m(M),f=n(a);f!==null&&(!(f.expirationTime>M)||I&&!R());){var B=f.callback;if(typeof B=="function"){f.callback=null,h=f.priorityLevel;var H=B(f.expirationTime<=M);M=e.unstable_now(),typeof H=="function"?f.callback=H:f===n(a)&&r(a),m(M)}else r(a);f=n(a)}if(f!==null)var D=!0;else{var Y=n(u);Y!==null&&z(x,Y.startTime-M),D=!1}return D}finally{f=null,h=E,d=!1}}var b=!1,k=null,A=-1,T=5,N=-1;function R(){return!(e.unstable_now()-N<T)}function j(){if(k!==null){var I=e.unstable_now();N=I;var M=!0;try{M=k(!0,I)}finally{M?F():(b=!1,k=null)}}else b=!1}var F;if(typeof y=="function")F=function(){y(j)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,O=S.port2;S.port1.onmessage=j,F=function(){O.postMessage(null)}}else F=function(){w(j,0)};function P(I){k=I,b||(b=!0,F())}function z(I,M){A=w(function(){I(e.unstable_now())},M)}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(I){I.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,P(_))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(I){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var E=h;h=M;try{return I()}finally{h=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,M){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var E=h;h=I;try{return M()}finally{h=E}},e.unstable_scheduleCallback=function(I,M,E){var B=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?B+E:B):E=B,I){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=E+H,I={id:c++,callback:M,priorityLevel:I,startTime:E,expirationTime:H,sortIndex:-1},E>B?(I.sortIndex=E,t(u,I),n(a)===null&&I===n(u)&&(v?(g(A),A=-1):v=!0,z(x,E-B))):(I.sortIndex=H,t(a,I),p||d||(p=!0,P(_))),I},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(I){var M=h;return function(){var E=h;h=M;try{return I.apply(this,arguments)}finally{h=E}}}})(dw);fw.exports=dw;var HC=fw.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var $C=L,Bt=HC;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hw=new Set,ts={};function ci(e,t){Yi(e,t),Yi(e+"Capture",t)}function Yi(e,t){for(ts[e]=t,e=0;e<t.length;e++)hw.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ef=Object.prototype.hasOwnProperty,VC=/^[: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]*$/,gg={},mg={};function UC(e){return Ef.call(mg,e)?!0:Ef.call(gg,e)?!1:VC.test(e)?mg[e]=!0:(gg[e]=!0,!1)}function WC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function GC(e,t,n,r){if(t===null||typeof t>"u"||WC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xt(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new xt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){st[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ih=/[\-:]([a-z])/g;function oh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ih,oh);st[t]=new xt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ih,oh);st[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ih,oh);st[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function sh(e,t,n,r){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(GC(t,n,i,r)&&(n=null),r||i===null?UC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qn=$C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Js=Symbol.for("react.element"),ki=Symbol.for("react.portal"),_i=Symbol.for("react.fragment"),lh=Symbol.for("react.strict_mode"),kf=Symbol.for("react.profiler"),pw=Symbol.for("react.provider"),gw=Symbol.for("react.context"),ah=Symbol.for("react.forward_ref"),_f=Symbol.for("react.suspense"),Sf=Symbol.for("react.suspense_list"),uh=Symbol.for("react.memo"),nr=Symbol.for("react.lazy"),mw=Symbol.for("react.offscreen"),yg=Symbol.iterator;function vo(e){return e===null||typeof e!="object"?null:(e=yg&&e[yg]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Object.assign,ec;function To(e){if(ec===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ec=t&&t[1]||""}return`
34
+ `+ec+e}var tc=!1;function nc(e,t){if(!e||tc)return"";tc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
37
+ `+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{tc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?To(e):""}function YC(e){switch(e.tag){case 5:return To(e.type);case 16:return To("Lazy");case 13:return To("Suspense");case 19:return To("SuspenseList");case 0:case 2:case 15:return e=nc(e.type,!1),e;case 11:return e=nc(e.type.render,!1),e;case 1:return e=nc(e.type,!0),e;default:return""}}function Cf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _i:return"Fragment";case ki:return"Portal";case kf:return"Profiler";case lh:return"StrictMode";case _f:return"Suspense";case Sf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gw:return(e.displayName||"Context")+".Consumer";case pw:return(e._context.displayName||"Context")+".Provider";case ah:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uh:return t=e.displayName||null,t!==null?t:Cf(e.type)||"Memo";case nr:t=e._payload,e=e._init;try{return Cf(e(t))}catch{}}return null}function QC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Cf(t);case 8:return t===lh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Er(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qC(e){var t=yw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function el(e){e._valueTracker||(e._valueTracker=qC(e))}function vw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function da(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Af(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Er(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ww(e,t){t=t.checked,t!=null&&sh(e,"checked",t,!1)}function Nf(e,t){ww(e,t);var n=Er(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Df(e,t.type,n):t.hasOwnProperty("defaultValue")&&Df(e,t.type,Er(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Df(e,t,n){(t!=="number"||da(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ro=Array.isArray;function zi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Er(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Tf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(Ro(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Er(n)}}function xw(e,t){var n=Er(t.value),r=Er(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var tl,Ew=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(tl=tl||document.createElement("div"),tl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ns(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XC=["Webkit","ms","Moz","O"];Object.keys(zo).forEach(function(e){XC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zo[t]=zo[e]})});function kw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zo.hasOwnProperty(e)&&zo[e]?(""+t).trim():t+"px"}function _w(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ZC=Fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function If(e,t){if(t){if(ZC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Mf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Of=null;function ch(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pf=null,ji=null,Fi=null;function Eg(e){if(e=zs(e)){if(typeof Pf!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=yu(t),Pf(e.stateNode,e.type,t))}}function Sw(e){ji?Fi?Fi.push(e):Fi=[e]:ji=e}function Cw(){if(ji){var e=ji,t=Fi;if(Fi=ji=null,Eg(e),t)for(e=0;e<t.length;e++)Eg(t[e])}}function Aw(e,t){return e(t)}function Nw(){}var rc=!1;function Dw(e,t,n){if(rc)return e(t,n);rc=!0;try{return Aw(e,t,n)}finally{rc=!1,(ji!==null||Fi!==null)&&(Nw(),Cw())}}function rs(e,t){var n=e.stateNode;if(n===null)return null;var r=yu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var Lf=!1;if($n)try{var wo={};Object.defineProperty(wo,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{Lf=!1}function KC(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var jo=!1,ha=null,pa=!1,zf=null,JC={onError:function(e){jo=!0,ha=e}};function eA(e,t,n,r,i,o,s,l,a){jo=!1,ha=null,KC.apply(JC,arguments)}function tA(e,t,n,r,i,o,s,l,a){if(eA.apply(this,arguments),jo){if(jo){var u=ha;jo=!1,ha=null}else throw Error(Q(198));pa||(pa=!0,zf=u)}}function fi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Tw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function kg(e){if(fi(e)!==e)throw Error(Q(188))}function nA(e){var t=e.alternate;if(!t){if(t=fi(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return kg(i),e;if(o===r)return kg(i),t;o=o.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function Rw(e){return e=nA(e),e!==null?Iw(e):null}function Iw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Iw(e);if(t!==null)return t;e=e.sibling}return null}var Mw=Bt.unstable_scheduleCallback,_g=Bt.unstable_cancelCallback,rA=Bt.unstable_shouldYield,iA=Bt.unstable_requestPaint,We=Bt.unstable_now,oA=Bt.unstable_getCurrentPriorityLevel,fh=Bt.unstable_ImmediatePriority,Ow=Bt.unstable_UserBlockingPriority,ga=Bt.unstable_NormalPriority,sA=Bt.unstable_LowPriority,Pw=Bt.unstable_IdlePriority,hu=null,Cn=null;function lA(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(hu,e,void 0,(e.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:cA,aA=Math.log,uA=Math.LN2;function cA(e){return e>>>=0,e===0?32:31-(aA(e)/uA|0)|0}var nl=64,rl=4194304;function Io(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ma(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Io(l):(o&=s,o!==0&&(r=Io(o)))}else s=n&~i,s!==0?r=Io(s):o!==0&&(r=Io(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-dn(t),i=1<<n,r|=e[n],t&=~i;return r}function fA(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dA(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-dn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=fA(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function jf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Lw(){var e=nl;return nl<<=1,!(nl&4194240)&&(nl=64),e}function ic(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ps(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function hA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-dn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function dh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ce=0;function zw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jw,hh,Fw,Bw,Hw,Ff=!1,il=[],dr=null,hr=null,pr=null,is=new Map,os=new Map,ir=[],pA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sg(e,t){switch(e){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":pr=null;break;case"pointerover":case"pointerout":is.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":os.delete(t.pointerId)}}function xo(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=zs(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function gA(e,t,n,r,i){switch(t){case"focusin":return dr=xo(dr,e,t,n,r,i),!0;case"dragenter":return hr=xo(hr,e,t,n,r,i),!0;case"mouseover":return pr=xo(pr,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return is.set(o,xo(is.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,os.set(o,xo(os.get(o)||null,e,t,n,r,i)),!0}return!1}function $w(e){var t=Hr(e.target);if(t!==null){var n=fi(t);if(n!==null){if(t=n.tag,t===13){if(t=Tw(n),t!==null){e.blockedOn=t,Hw(e.priority,function(){Fw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Of=r,n.target.dispatchEvent(r),Of=null}else return t=zs(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Cg(e,t,n){Fl(e)&&n.delete(t)}function mA(){Ff=!1,dr!==null&&Fl(dr)&&(dr=null),hr!==null&&Fl(hr)&&(hr=null),pr!==null&&Fl(pr)&&(pr=null),is.forEach(Cg),os.forEach(Cg)}function bo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ff||(Ff=!0,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,mA)))}function ss(e){function t(i){return bo(i,e)}if(0<il.length){bo(il[0],e);for(var n=1;n<il.length;n++){var r=il[n];r.blockedOn===e&&(r.blockedOn=null)}}for(dr!==null&&bo(dr,e),hr!==null&&bo(hr,e),pr!==null&&bo(pr,e),is.forEach(t),os.forEach(t),n=0;n<ir.length;n++)r=ir[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ir.length&&(n=ir[0],n.blockedOn===null);)$w(n),n.blockedOn===null&&ir.shift()}var Bi=qn.ReactCurrentBatchConfig,ya=!0;function yA(e,t,n,r){var i=Ce,o=Bi.transition;Bi.transition=null;try{Ce=1,ph(e,t,n,r)}finally{Ce=i,Bi.transition=o}}function vA(e,t,n,r){var i=Ce,o=Bi.transition;Bi.transition=null;try{Ce=4,ph(e,t,n,r)}finally{Ce=i,Bi.transition=o}}function ph(e,t,n,r){if(ya){var i=Bf(e,t,n,r);if(i===null)pc(e,t,r,va,n),Sg(e,r);else if(gA(i,e,t,n,r))r.stopPropagation();else if(Sg(e,r),t&4&&-1<pA.indexOf(e)){for(;i!==null;){var o=zs(i);if(o!==null&&jw(o),o=Bf(e,t,n,r),o===null&&pc(e,t,r,va,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else pc(e,t,r,null,n)}}var va=null;function Bf(e,t,n,r){if(va=null,e=ch(r),e=Hr(e),e!==null)if(t=fi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return va=e,null}function Vw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(oA()){case fh:return 1;case Ow:return 4;case ga:case sA:return 16;case Pw:return 536870912;default:return 16}default:return 16}}var lr=null,gh=null,Bl=null;function Uw(){if(Bl)return Bl;var e,t=gh,n=t.length,r,i="value"in lr?lr.value:lr.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Bl=i.slice(e,1<r?1-r:void 0)}function Hl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ol(){return!0}function Ag(){return!1}function Vt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ol:Ag,this.isPropagationStopped=Ag,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ol)},persist:function(){},isPersistent:ol}),t}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mh=Vt(ho),Ls=Fe({},ho,{view:0,detail:0}),wA=Vt(Ls),oc,sc,Eo,pu=Fe({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Eo&&(Eo&&e.type==="mousemove"?(oc=e.screenX-Eo.screenX,sc=e.screenY-Eo.screenY):sc=oc=0,Eo=e),oc)},movementY:function(e){return"movementY"in e?e.movementY:sc}}),Ng=Vt(pu),xA=Fe({},pu,{dataTransfer:0}),bA=Vt(xA),EA=Fe({},Ls,{relatedTarget:0}),lc=Vt(EA),kA=Fe({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),_A=Vt(kA),SA=Fe({},ho,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),CA=Vt(SA),AA=Fe({},ho,{data:0}),Dg=Vt(AA),NA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DA={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"},TA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=TA[e])?!!t[e]:!1}function yh(){return RA}var IA=Fe({},Ls,{key:function(e){if(e.key){var t=NA[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DA[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yh,charCode:function(e){return e.type==="keypress"?Hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),MA=Vt(IA),OA=Fe({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tg=Vt(OA),PA=Fe({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yh}),LA=Vt(PA),zA=Fe({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),jA=Vt(zA),FA=Fe({},pu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),BA=Vt(FA),HA=[9,13,27,32],vh=$n&&"CompositionEvent"in window,Fo=null;$n&&"documentMode"in document&&(Fo=document.documentMode);var $A=$n&&"TextEvent"in window&&!Fo,Ww=$n&&(!vh||Fo&&8<Fo&&11>=Fo),Rg=" ",Ig=!1;function Gw(e,t){switch(e){case"keyup":return HA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Si=!1;function VA(e,t){switch(e){case"compositionend":return Yw(t);case"keypress":return t.which!==32?null:(Ig=!0,Rg);case"textInput":return e=t.data,e===Rg&&Ig?null:e;default:return null}}function UA(e,t){if(Si)return e==="compositionend"||!vh&&Gw(e,t)?(e=Uw(),Bl=gh=lr=null,Si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ww&&t.locale!=="ko"?null:t.data;default:return null}}var WA={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 Mg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!WA[e.type]:t==="textarea"}function Qw(e,t,n,r){Sw(r),t=wa(t,"onChange"),0<t.length&&(n=new mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bo=null,ls=null;function GA(e){ox(e,0)}function gu(e){var t=Ni(e);if(vw(t))return e}function YA(e,t){if(e==="change")return t}var qw=!1;if($n){var ac;if($n){var uc="oninput"in document;if(!uc){var Og=document.createElement("div");Og.setAttribute("oninput","return;"),uc=typeof Og.oninput=="function"}ac=uc}else ac=!1;qw=ac&&(!document.documentMode||9<document.documentMode)}function Pg(){Bo&&(Bo.detachEvent("onpropertychange",Xw),ls=Bo=null)}function Xw(e){if(e.propertyName==="value"&&gu(ls)){var t=[];Qw(t,ls,e,ch(e)),Dw(GA,t)}}function QA(e,t,n){e==="focusin"?(Pg(),Bo=t,ls=n,Bo.attachEvent("onpropertychange",Xw)):e==="focusout"&&Pg()}function qA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gu(ls)}function XA(e,t){if(e==="click")return gu(t)}function ZA(e,t){if(e==="input"||e==="change")return gu(t)}function KA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:KA;function as(e,t){if(gn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ef.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function Lg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zg(e,t){var n=Lg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lg(n)}}function Zw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kw(){for(var e=window,t=da();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=da(e.document)}return t}function wh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function JA(e){var t=Kw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zw(n.ownerDocument.documentElement,n)){if(r!==null&&wh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=zg(n,o);var s=zg(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var eN=$n&&"documentMode"in document&&11>=document.documentMode,Ci=null,Hf=null,Ho=null,$f=!1;function jg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$f||Ci==null||Ci!==da(r)||(r=Ci,"selectionStart"in r&&wh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ho&&as(Ho,r)||(Ho=r,r=wa(Hf,"onSelect"),0<r.length&&(t=new mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ci)))}function sl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ai={animationend:sl("Animation","AnimationEnd"),animationiteration:sl("Animation","AnimationIteration"),animationstart:sl("Animation","AnimationStart"),transitionend:sl("Transition","TransitionEnd")},cc={},Jw={};$n&&(Jw=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function mu(e){if(cc[e])return cc[e];if(!Ai[e])return e;var t=Ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jw)return cc[e]=t[n];return e}var ex=mu("animationend"),tx=mu("animationiteration"),nx=mu("animationstart"),rx=mu("transitionend"),ix=new Map,Fg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cr(e,t){ix.set(e,t),ci(t,[e])}for(var fc=0;fc<Fg.length;fc++){var dc=Fg[fc],tN=dc.toLowerCase(),nN=dc[0].toUpperCase()+dc.slice(1);Cr(tN,"on"+nN)}Cr(ex,"onAnimationEnd");Cr(tx,"onAnimationIteration");Cr(nx,"onAnimationStart");Cr("dblclick","onDoubleClick");Cr("focusin","onFocus");Cr("focusout","onBlur");Cr(rx,"onTransitionEnd");Yi("onMouseEnter",["mouseout","mouseover"]);Yi("onMouseLeave",["mouseout","mouseover"]);Yi("onPointerEnter",["pointerout","pointerover"]);Yi("onPointerLeave",["pointerout","pointerover"]);ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),rN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mo));function Bg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tA(r,t,void 0,e),e.currentTarget=null}function ox(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;Bg(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;Bg(i,l,u),o=a}}}if(pa)throw e=zf,pa=!1,zf=null,e}function Ie(e,t){var n=t[Yf];n===void 0&&(n=t[Yf]=new Set);var r=e+"__bubble";n.has(r)||(sx(t,e,2,!1),n.add(r))}function hc(e,t,n){var r=0;t&&(r|=4),sx(n,e,r,t)}var ll="_reactListening"+Math.random().toString(36).slice(2);function us(e){if(!e[ll]){e[ll]=!0,hw.forEach(function(n){n!=="selectionchange"&&(rN.has(n)||hc(n,!1,e),hc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ll]||(t[ll]=!0,hc("selectionchange",!1,t))}}function sx(e,t,n,r){switch(Vw(t)){case 1:var i=yA;break;case 4:i=vA;break;default:i=ph}n=i.bind(null,t,n,e),i=void 0,!Lf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function pc(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Hr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Dw(function(){var u=o,c=ch(n),f=[];e:{var h=ix.get(e);if(h!==void 0){var d=mh,p=e;switch(e){case"keypress":if(Hl(n)===0)break e;case"keydown":case"keyup":d=MA;break;case"focusin":p="focus",d=lc;break;case"focusout":p="blur",d=lc;break;case"beforeblur":case"afterblur":d=lc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=Ng;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=bA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=LA;break;case ex:case tx:case nx:d=_A;break;case rx:d=jA;break;case"scroll":d=wA;break;case"wheel":d=BA;break;case"copy":case"cut":case"paste":d=CA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=Tg}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?h!==null?h+"Capture":null:h;v=[];for(var y=u,m;y!==null;){m=y;var x=m.stateNode;if(m.tag===5&&x!==null&&(m=x,g!==null&&(x=rs(y,g),x!=null&&v.push(cs(y,x,m)))),w)break;y=y.return}0<v.length&&(h=new d(h,p,null,n,c),f.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",h&&n!==Of&&(p=n.relatedTarget||n.fromElement)&&(Hr(p)||p[Vn]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(p=n.relatedTarget||n.toElement,d=u,p=p?Hr(p):null,p!==null&&(w=fi(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=u),d!==p)){if(v=Ng,x="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=Tg,x="onPointerLeave",g="onPointerEnter",y="pointer"),w=d==null?h:Ni(d),m=p==null?h:Ni(p),h=new v(x,y+"leave",d,n,c),h.target=w,h.relatedTarget=m,x=null,Hr(c)===u&&(v=new v(g,y+"enter",p,n,c),v.target=m,v.relatedTarget=w,x=v),w=x,d&&p)t:{for(v=d,g=p,y=0,m=v;m;m=wi(m))y++;for(m=0,x=g;x;x=wi(x))m++;for(;0<y-m;)v=wi(v),y--;for(;0<m-y;)g=wi(g),m--;for(;y--;){if(v===g||g!==null&&v===g.alternate)break t;v=wi(v),g=wi(g)}v=null}else v=null;d!==null&&Hg(f,h,d,v,!1),p!==null&&w!==null&&Hg(f,w,p,v,!0)}}e:{if(h=u?Ni(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var _=YA;else if(Mg(h))if(qw)_=ZA;else{_=qA;var b=QA}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=XA);if(_&&(_=_(e,u))){Qw(f,_,n,c);break e}b&&b(e,h,u),e==="focusout"&&(b=h._wrapperState)&&b.controlled&&h.type==="number"&&Df(h,"number",h.value)}switch(b=u?Ni(u):window,e){case"focusin":(Mg(b)||b.contentEditable==="true")&&(Ci=b,Hf=u,Ho=null);break;case"focusout":Ho=Hf=Ci=null;break;case"mousedown":$f=!0;break;case"contextmenu":case"mouseup":case"dragend":$f=!1,jg(f,n,c);break;case"selectionchange":if(eN)break;case"keydown":case"keyup":jg(f,n,c)}var k;if(vh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Si?Gw(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Ww&&n.locale!=="ko"&&(Si||A!=="onCompositionStart"?A==="onCompositionEnd"&&Si&&(k=Uw()):(lr=c,gh="value"in lr?lr.value:lr.textContent,Si=!0)),b=wa(u,A),0<b.length&&(A=new Dg(A,e,null,n,c),f.push({event:A,listeners:b}),k?A.data=k:(k=Yw(n),k!==null&&(A.data=k)))),(k=$A?VA(e,n):UA(e,n))&&(u=wa(u,"onBeforeInput"),0<u.length&&(c=new Dg("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}ox(f,t)})}function cs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wa(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=rs(e,n),o!=null&&r.unshift(cs(e,o,i)),o=rs(e,t),o!=null&&r.push(cs(e,o,i))),e=e.return}return r}function wi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Hg(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=rs(n,o),a!=null&&s.unshift(cs(n,a,l))):i||(a=rs(n,o),a!=null&&s.push(cs(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var iN=/\r\n?/g,oN=/\u0000|\uFFFD/g;function $g(e){return(typeof e=="string"?e:""+e).replace(iN,`
38
+ `).replace(oN,"")}function al(e,t,n){if(t=$g(t),$g(e)!==t&&n)throw Error(Q(425))}function xa(){}var Vf=null,Uf=null;function Wf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gf=typeof setTimeout=="function"?setTimeout:void 0,sN=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,lN=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(aN)}:Gf;function aN(e){setTimeout(function(){throw e})}function gc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ss(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ss(t)}function gr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ug(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),Sn="__reactFiber$"+po,fs="__reactProps$"+po,Vn="__reactContainer$"+po,Yf="__reactEvents$"+po,uN="__reactListeners$"+po,cN="__reactHandles$"+po;function Hr(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vn]||n[Sn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ug(e);e!==null;){if(n=e[Sn])return n;e=Ug(e)}return t}e=n,n=e.parentNode}return null}function zs(e){return e=e[Sn]||e[Vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function yu(e){return e[fs]||null}var Qf=[],Di=-1;function Ar(e){return{current:e}}function Me(e){0>Di||(e.current=Qf[Di],Qf[Di]=null,Di--)}function Re(e,t){Di++,Qf[Di]=e.current,e.current=t}var kr={},ft=Ar(kr),At=Ar(!1),Zr=kr;function Qi(e,t){var n=e.type.contextTypes;if(!n)return kr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Nt(e){return e=e.childContextTypes,e!=null}function ba(){Me(At),Me(ft)}function Wg(e,t,n){if(ft.current!==kr)throw Error(Q(168));Re(ft,t),Re(At,n)}function lx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,QC(e)||"Unknown",i));return Fe({},n,r)}function Ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,Zr=ft.current,Re(ft,e),Re(At,At.current),!0}function Gg(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=lx(e,t,Zr),r.__reactInternalMemoizedMergedChildContext=e,Me(At),Me(ft),Re(ft,e)):Me(At),Re(At,n)}var Pn=null,vu=!1,mc=!1;function ax(e){Pn===null?Pn=[e]:Pn.push(e)}function fN(e){vu=!0,ax(e)}function Nr(){if(!mc&&Pn!==null){mc=!0;var e=0,t=Ce;try{var n=Pn;for(Ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pn=null,vu=!1}catch(i){throw Pn!==null&&(Pn=Pn.slice(e+1)),Mw(fh,Nr),i}finally{Ce=t,mc=!1}}return null}var Ti=[],Ri=0,ka=null,_a=0,Ut=[],Wt=0,Kr=null,jn=1,Fn="";function Mr(e,t){Ti[Ri++]=_a,Ti[Ri++]=ka,ka=e,_a=t}function ux(e,t,n){Ut[Wt++]=jn,Ut[Wt++]=Fn,Ut[Wt++]=Kr,Kr=e;var r=jn;e=Fn;var i=32-dn(r)-1;r&=~(1<<i),n+=1;var o=32-dn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,jn=1<<32-dn(t)+i|n<<i|r,Fn=o+e}else jn=1<<o|n<<i|r,Fn=e}function xh(e){e.return!==null&&(Mr(e,1),ux(e,1,0))}function bh(e){for(;e===ka;)ka=Ti[--Ri],Ti[Ri]=null,_a=Ti[--Ri],Ti[Ri]=null;for(;e===Kr;)Kr=Ut[--Wt],Ut[Wt]=null,Fn=Ut[--Wt],Ut[Wt]=null,jn=Ut[--Wt],Ut[Wt]=null}var Lt=null,Pt=null,Pe=!1,an=null;function cx(e,t){var n=Yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Lt=e,Pt=gr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Lt=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kr!==null?{id:jn,overflow:Fn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Lt=e,Pt=null,!0):!1;default:return!1}}function qf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xf(e){if(Pe){var t=Pt;if(t){var n=t;if(!Yg(e,t)){if(qf(e))throw Error(Q(418));t=gr(n.nextSibling);var r=Lt;t&&Yg(e,t)?cx(r,n):(e.flags=e.flags&-4097|2,Pe=!1,Lt=e)}}else{if(qf(e))throw Error(Q(418));e.flags=e.flags&-4097|2,Pe=!1,Lt=e}}}function Qg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Lt=e}function ul(e){if(e!==Lt)return!1;if(!Pe)return Qg(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wf(e.type,e.memoizedProps)),t&&(t=Pt)){if(qf(e))throw fx(),Error(Q(418));for(;t;)cx(e,t),t=gr(t.nextSibling)}if(Qg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=gr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=Lt?gr(e.stateNode.nextSibling):null;return!0}function fx(){for(var e=Pt;e;)e=gr(e.nextSibling)}function qi(){Pt=Lt=null,Pe=!1}function Eh(e){an===null?an=[e]:an.push(e)}var dN=qn.ReactCurrentBatchConfig;function ko(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function cl(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qg(e){var t=e._init;return t(e._payload)}function dx(e){function t(g,y){if(e){var m=g.deletions;m===null?(g.deletions=[y],g.flags|=16):m.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=wr(g,y),g.index=0,g.sibling=null,g}function o(g,y,m){return g.index=m,e?(m=g.alternate,m!==null?(m=m.index,m<y?(g.flags|=2,y):m):(g.flags|=2,y)):(g.flags|=1048576,y)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,y,m,x){return y===null||y.tag!==6?(y=kc(m,g.mode,x),y.return=g,y):(y=i(y,m),y.return=g,y)}function a(g,y,m,x){var _=m.type;return _===_i?c(g,y,m.props.children,x,m.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===nr&&qg(_)===y.type)?(x=i(y,m.props),x.ref=ko(g,y,m),x.return=g,x):(x=Ql(m.type,m.key,m.props,null,g.mode,x),x.ref=ko(g,y,m),x.return=g,x)}function u(g,y,m,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=_c(m,g.mode,x),y.return=g,y):(y=i(y,m.children||[]),y.return=g,y)}function c(g,y,m,x,_){return y===null||y.tag!==7?(y=Yr(m,g.mode,x,_),y.return=g,y):(y=i(y,m),y.return=g,y)}function f(g,y,m){if(typeof y=="string"&&y!==""||typeof y=="number")return y=kc(""+y,g.mode,m),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Js:return m=Ql(y.type,y.key,y.props,null,g.mode,m),m.ref=ko(g,null,y),m.return=g,m;case ki:return y=_c(y,g.mode,m),y.return=g,y;case nr:var x=y._init;return f(g,x(y._payload),m)}if(Ro(y)||vo(y))return y=Yr(y,g.mode,m,null),y.return=g,y;cl(g,y)}return null}function h(g,y,m,x){var _=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return _!==null?null:l(g,y,""+m,x);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Js:return m.key===_?a(g,y,m,x):null;case ki:return m.key===_?u(g,y,m,x):null;case nr:return _=m._init,h(g,y,_(m._payload),x)}if(Ro(m)||vo(m))return _!==null?null:c(g,y,m,x,null);cl(g,m)}return null}function d(g,y,m,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(m)||null,l(y,g,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Js:return g=g.get(x.key===null?m:x.key)||null,a(y,g,x,_);case ki:return g=g.get(x.key===null?m:x.key)||null,u(y,g,x,_);case nr:var b=x._init;return d(g,y,m,b(x._payload),_)}if(Ro(x)||vo(x))return g=g.get(m)||null,c(y,g,x,_,null);cl(y,x)}return null}function p(g,y,m,x){for(var _=null,b=null,k=y,A=y=0,T=null;k!==null&&A<m.length;A++){k.index>A?(T=k,k=null):T=k.sibling;var N=h(g,k,m[A],x);if(N===null){k===null&&(k=T);break}e&&k&&N.alternate===null&&t(g,k),y=o(N,y,A),b===null?_=N:b.sibling=N,b=N,k=T}if(A===m.length)return n(g,k),Pe&&Mr(g,A),_;if(k===null){for(;A<m.length;A++)k=f(g,m[A],x),k!==null&&(y=o(k,y,A),b===null?_=k:b.sibling=k,b=k);return Pe&&Mr(g,A),_}for(k=r(g,k);A<m.length;A++)T=d(k,g,A,m[A],x),T!==null&&(e&&T.alternate!==null&&k.delete(T.key===null?A:T.key),y=o(T,y,A),b===null?_=T:b.sibling=T,b=T);return e&&k.forEach(function(R){return t(g,R)}),Pe&&Mr(g,A),_}function v(g,y,m,x){var _=vo(m);if(typeof _!="function")throw Error(Q(150));if(m=_.call(m),m==null)throw Error(Q(151));for(var b=_=null,k=y,A=y=0,T=null,N=m.next();k!==null&&!N.done;A++,N=m.next()){k.index>A?(T=k,k=null):T=k.sibling;var R=h(g,k,N.value,x);if(R===null){k===null&&(k=T);break}e&&k&&R.alternate===null&&t(g,k),y=o(R,y,A),b===null?_=R:b.sibling=R,b=R,k=T}if(N.done)return n(g,k),Pe&&Mr(g,A),_;if(k===null){for(;!N.done;A++,N=m.next())N=f(g,N.value,x),N!==null&&(y=o(N,y,A),b===null?_=N:b.sibling=N,b=N);return Pe&&Mr(g,A),_}for(k=r(g,k);!N.done;A++,N=m.next())N=d(k,g,A,N.value,x),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?A:N.key),y=o(N,y,A),b===null?_=N:b.sibling=N,b=N);return e&&k.forEach(function(j){return t(g,j)}),Pe&&Mr(g,A),_}function w(g,y,m,x){if(typeof m=="object"&&m!==null&&m.type===_i&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Js:e:{for(var _=m.key,b=y;b!==null;){if(b.key===_){if(_=m.type,_===_i){if(b.tag===7){n(g,b.sibling),y=i(b,m.props.children),y.return=g,g=y;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===nr&&qg(_)===b.type){n(g,b.sibling),y=i(b,m.props),y.ref=ko(g,b,m),y.return=g,g=y;break e}n(g,b);break}else t(g,b);b=b.sibling}m.type===_i?(y=Yr(m.props.children,g.mode,x,m.key),y.return=g,g=y):(x=Ql(m.type,m.key,m.props,null,g.mode,x),x.ref=ko(g,y,m),x.return=g,g=x)}return s(g);case ki:e:{for(b=m.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(g,y.sibling),y=i(y,m.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=_c(m,g.mode,x),y.return=g,g=y}return s(g);case nr:return b=m._init,w(g,y,b(m._payload),x)}if(Ro(m))return p(g,y,m,x);if(vo(m))return v(g,y,m,x);cl(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,m),y.return=g,g=y):(n(g,y),y=kc(m,g.mode,x),y.return=g,g=y),s(g)):n(g,y)}return w}var Xi=dx(!0),hx=dx(!1),Sa=Ar(null),Ca=null,Ii=null,kh=null;function _h(){kh=Ii=Ca=null}function Sh(e){var t=Sa.current;Me(Sa),e._currentValue=t}function Zf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hi(e,t){Ca=e,kh=Ii=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_t=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(kh!==e)if(e={context:e,memoizedValue:t,next:null},Ii===null){if(Ca===null)throw Error(Q(308));Ii=e,Ca.dependencies={lanes:0,firstContext:e}}else Ii=Ii.next=e;return t}var $r=null;function Ch(e){$r===null?$r=[e]:$r.push(e)}function px(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ch(t)):(n.next=i.next,i.next=n),t.interleaved=n,Un(e,r)}function Un(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rr=!1;function Ah(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,be&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Un(e,n)}return i=r.interleaved,i===null?(t.next=t,Ch(r)):(t.next=i.next,i.next=t),r.interleaved=t,Un(e,n)}function $l(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dh(e,n)}}function Xg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Aa(e,t,n,r){var i=e.updateQueue;rr=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,d=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,v=l;switch(h=t,d=n,v.tag){case 1:if(p=v.payload,typeof p=="function"){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=v.payload,h=typeof p=="function"?p.call(d,f,h):p,h==null)break e;f=Fe({},f,h);break e;case 2:rr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else d={eventTime:d,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=d,a=f):c=c.next=d,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);ei|=s,e.lanes=s,e.memoizedState=f}}function Zg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var js={},An=Ar(js),ds=Ar(js),hs=Ar(js);function Vr(e){if(e===js)throw Error(Q(174));return e}function Nh(e,t){switch(Re(hs,t),Re(ds,e),Re(An,js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rf(t,e)}Me(An),Re(An,t)}function Zi(){Me(An),Me(ds),Me(hs)}function mx(e){Vr(hs.current);var t=Vr(An.current),n=Rf(t,e.type);t!==n&&(Re(ds,e),Re(An,n))}function Dh(e){ds.current===e&&(Me(An),Me(ds))}var Le=Ar(0);function Na(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yc=[];function Th(){for(var e=0;e<yc.length;e++)yc[e]._workInProgressVersionPrimary=null;yc.length=0}var Vl=qn.ReactCurrentDispatcher,vc=qn.ReactCurrentBatchConfig,Jr=0,je=null,Ze=null,et=null,Da=!1,$o=!1,ps=0,hN=0;function lt(){throw Error(Q(321))}function Rh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function Ih(e,t,n,r,i,o){if(Jr=o,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Vl.current=e===null||e.memoizedState===null?yN:vN,e=n(r,i),$o){o=0;do{if($o=!1,ps=0,25<=o)throw Error(Q(301));o+=1,et=Ze=null,t.updateQueue=null,Vl.current=wN,e=n(r,i)}while($o)}if(Vl.current=Ta,t=Ze!==null&&Ze.next!==null,Jr=0,et=Ze=je=null,Da=!1,t)throw Error(Q(300));return e}function Mh(){var e=ps!==0;return ps=0,e}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?je.memoizedState=et=e:et=et.next=e,et}function Zt(){if(Ze===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=et===null?je.memoizedState:et.next;if(t!==null)et=t,Ze=e;else{if(e===null)throw Error(Q(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},et===null?je.memoizedState=et=e:et=et.next=e}return et}function gs(e,t){return typeof t=="function"?t(e):t}function wc(e){var t=Zt(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=Ze,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Jr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,je.lanes|=c,ei|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,gn(r,t.memoizedState)||(_t=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,je.lanes|=o,ei|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xc(e){var t=Zt(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);gn(o,t.memoizedState)||(_t=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function yx(){}function vx(e,t){var n=je,r=Zt(),i=t(),o=!gn(r.memoizedState,i);if(o&&(r.memoizedState=i,_t=!0),r=r.queue,Oh(bx.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,ms(9,xx.bind(null,n,r,i,t),void 0,null),nt===null)throw Error(Q(349));Jr&30||wx(n,t,i)}return i}function wx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xx(e,t,n,r){t.value=n,t.getSnapshot=r,Ex(t)&&kx(e)}function bx(e,t,n){return n(function(){Ex(t)&&kx(e)})}function Ex(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function kx(e){var t=Un(e,1);t!==null&&hn(t,e,1,-1)}function Kg(e){var t=bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:e},t.queue=e,e=e.dispatch=mN.bind(null,je,e),[t.memoizedState,e]}function ms(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _x(){return Zt().memoizedState}function Ul(e,t,n,r){var i=bn();je.flags|=e,i.memoizedState=ms(1|t,n,void 0,r===void 0?null:r)}function wu(e,t,n,r){var i=Zt();r=r===void 0?null:r;var o=void 0;if(Ze!==null){var s=Ze.memoizedState;if(o=s.destroy,r!==null&&Rh(r,s.deps)){i.memoizedState=ms(t,n,o,r);return}}je.flags|=e,i.memoizedState=ms(1|t,n,o,r)}function Jg(e,t){return Ul(8390656,8,e,t)}function Oh(e,t){return wu(2048,8,e,t)}function Sx(e,t){return wu(4,2,e,t)}function Cx(e,t){return wu(4,4,e,t)}function Ax(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nx(e,t,n){return n=n!=null?n.concat([e]):null,wu(4,4,Ax.bind(null,t,e),n)}function Ph(){}function Dx(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Tx(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rx(e,t,n){return Jr&21?(gn(n,t)||(n=Lw(),je.lanes|=n,ei|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_t=!0),e.memoizedState=n)}function pN(e,t){var n=Ce;Ce=n!==0&&4>n?n:4,e(!0);var r=vc.transition;vc.transition={};try{e(!1),t()}finally{Ce=n,vc.transition=r}}function Ix(){return Zt().memoizedState}function gN(e,t,n){var r=vr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mx(e))Ox(t,n);else if(n=px(e,t,n,r),n!==null){var i=vt();hn(n,e,r,i),Px(n,t,r)}}function mN(e,t,n){var r=vr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mx(e))Ox(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,gn(l,s)){var a=t.interleaved;a===null?(i.next=i,Ch(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=px(e,t,i,r),n!==null&&(i=vt(),hn(n,e,r,i),Px(n,t,r))}}function Mx(e){var t=e.alternate;return e===je||t!==null&&t===je}function Ox(e,t){$o=Da=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Px(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dh(e,n)}}var Ta={readContext:Xt,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},yN={readContext:Xt,useCallback:function(e,t){return bn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Jg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ul(4194308,4,Ax.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var n=bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gN.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=bn();return e={current:e},t.memoizedState=e},useState:Kg,useDebugValue:Ph,useDeferredValue:function(e){return bn().memoizedState=e},useTransition:function(){var e=Kg(!1),t=e[0];return e=pN.bind(null,e[1]),bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=bn();if(Pe){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),nt===null)throw Error(Q(349));Jr&30||wx(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Jg(bx.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,xx.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bn(),t=nt.identifierPrefix;if(Pe){var n=Fn,r=jn;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ps++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=hN++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vN={readContext:Xt,useCallback:Dx,useContext:Xt,useEffect:Oh,useImperativeHandle:Nx,useInsertionEffect:Sx,useLayoutEffect:Cx,useMemo:Tx,useReducer:wc,useRef:_x,useState:function(){return wc(gs)},useDebugValue:Ph,useDeferredValue:function(e){var t=Zt();return Rx(t,Ze.memoizedState,e)},useTransition:function(){var e=wc(gs)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:yx,useSyncExternalStore:vx,useId:Ix,unstable_isNewReconciler:!1},wN={readContext:Xt,useCallback:Dx,useContext:Xt,useEffect:Oh,useImperativeHandle:Nx,useInsertionEffect:Sx,useLayoutEffect:Cx,useMemo:Tx,useReducer:xc,useRef:_x,useState:function(){return xc(gs)},useDebugValue:Ph,useDeferredValue:function(e){var t=Zt();return Ze===null?t.memoizedState=e:Rx(t,Ze.memoizedState,e)},useTransition:function(){var e=xc(gs)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:yx,useSyncExternalStore:vx,useId:Ix,unstable_isNewReconciler:!1};function on(e,t){if(e&&e.defaultProps){t=Fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xu={isMounted:function(e){return(e=e._reactInternals)?fi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vt(),i=vr(e),o=Hn(r,i);o.payload=t,n!=null&&(o.callback=n),t=mr(e,o,i),t!==null&&(hn(t,e,i,r),$l(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vt(),i=vr(e),o=Hn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=mr(e,o,i),t!==null&&(hn(t,e,i,r),$l(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vt(),r=vr(e),i=Hn(n,r);i.tag=2,t!=null&&(i.callback=t),t=mr(e,i,r),t!==null&&(hn(t,e,r,n),$l(t,e,r))}};function em(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!as(n,r)||!as(i,o):!0}function Lx(e,t,n){var r=!1,i=kr,o=t.contextType;return typeof o=="object"&&o!==null?o=Xt(o):(i=Nt(t)?Zr:ft.current,r=t.contextTypes,o=(r=r!=null)?Qi(e,i):kr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function tm(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xu.enqueueReplaceState(t,t.state,null)}function Jf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ah(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Xt(o):(o=Nt(t)?Zr:ft.current,i.context=Qi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Kf(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&xu.enqueueReplaceState(i,i.state,null),Aa(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ki(e,t){try{var n="",r=t;do n+=YC(r),r=r.return;while(r);var i=n}catch(o){i=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:i,digest:null}}function bc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ed(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var xN=typeof WeakMap=="function"?WeakMap:Map;function zx(e,t,n){n=Hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ia||(Ia=!0,cd=r),ed(e,t)},n}function jx(e,t,n){n=Hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ed(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ed(e,t),typeof r!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function nm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new xN;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ON.bind(null,e,t,n),t.then(e,e))}function rm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function im(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Hn(-1,1),t.tag=2,mr(n,t,1))),n.lanes|=1),e)}var bN=qn.ReactCurrentOwner,_t=!1;function mt(e,t,n,r){t.child=e===null?hx(t,null,n,r):Xi(t,e.child,n,r)}function om(e,t,n,r,i){n=n.render;var o=t.ref;return Hi(t,i),r=Ih(e,t,n,r,o,i),n=Mh(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Pe&&n&&xh(t),t.flags|=1,mt(e,t,r,i),t.child)}function sm(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Vh(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Fx(e,t,o,r,i)):(e=Ql(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:as,n(s,r)&&e.ref===t.ref)return Wn(e,t,i)}return t.flags|=1,e=wr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Fx(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(as(o,r)&&e.ref===t.ref)if(_t=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(_t=!0);else return t.lanes=e.lanes,Wn(e,t,i)}return td(e,t,n,r,i)}function Bx(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Re(Oi,Mt),Mt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Re(Oi,Mt),Mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Re(Oi,Mt),Mt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Re(Oi,Mt),Mt|=r;return mt(e,t,i,n),t.child}function Hx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function td(e,t,n,r,i){var o=Nt(n)?Zr:ft.current;return o=Qi(t,o),Hi(t,i),n=Ih(e,t,n,r,o,i),r=Mh(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Pe&&r&&xh(t),t.flags|=1,mt(e,t,n,i),t.child)}function lm(e,t,n,r,i){if(Nt(n)){var o=!0;Ea(t)}else o=!1;if(Hi(t,i),t.stateNode===null)Wl(e,t),Lx(t,n,r),Jf(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Xt(u):(u=Nt(n)?Zr:ft.current,u=Qi(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&tm(t,s,r,u),rr=!1;var h=t.memoizedState;s.state=h,Aa(t,r,s,i),a=t.memoizedState,l!==r||h!==a||At.current||rr?(typeof c=="function"&&(Kf(t,n,c,r),a=t.memoizedState),(l=rr||em(t,n,l,r,h,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,gx(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:on(t.type,l),s.props=u,f=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Xt(a):(a=Nt(n)?Zr:ft.current,a=Qi(t,a));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||h!==a)&&tm(t,s,r,a),rr=!1,h=t.memoizedState,s.state=h,Aa(t,r,s,i);var p=t.memoizedState;l!==f||h!==p||At.current||rr?(typeof d=="function"&&(Kf(t,n,d,r),p=t.memoizedState),(u=rr||em(t,n,u,r,h,p,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return nd(e,t,n,r,o,i)}function nd(e,t,n,r,i,o){Hx(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Gg(t,n,!1),Wn(e,t,o);r=t.stateNode,bN.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Xi(t,e.child,null,o),t.child=Xi(t,null,l,o)):mt(e,t,l,o),t.memoizedState=r.state,i&&Gg(t,n,!0),t.child}function $x(e){var t=e.stateNode;t.pendingContext?Wg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Wg(e,t.context,!1),Nh(e,t.containerInfo)}function am(e,t,n,r,i){return qi(),Eh(i),t.flags|=256,mt(e,t,n,r),t.child}var rd={dehydrated:null,treeContext:null,retryLane:0};function id(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vx(e,t,n){var r=t.pendingProps,i=Le.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Re(Le,i&1),e===null)return Xf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=ku(s,r,0,null),e=Yr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=id(n),t.memoizedState=rd,e):Lh(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return EN(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=wr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=wr(l,o):(o=Yr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?id(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=rd,r}return o=e.child,e=o.sibling,r=wr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lh(e,t){return t=ku({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&Eh(r),Xi(t,e.child,null,n),e=Lh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EN(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=bc(Error(Q(422))),fl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ku({mode:"visible",children:r.children},i,0,null),o=Yr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Xi(t,e.child,null,s),t.child.memoizedState=id(s),t.memoizedState=rd,o);if(!(t.mode&1))return fl(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(Q(419)),r=bc(o,r,void 0),fl(e,t,s,r)}if(l=(s&e.childLanes)!==0,_t||l){if(r=nt,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Un(e,i),hn(r,e,i,-1))}return $h(),r=bc(Error(Q(421))),fl(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=PN.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Pt=gr(i.nextSibling),Lt=t,Pe=!0,an=null,e!==null&&(Ut[Wt++]=jn,Ut[Wt++]=Fn,Ut[Wt++]=Kr,jn=e.id,Fn=e.overflow,Kr=t),t=Lh(t,r.children),t.flags|=4096,t)}function um(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zf(e.return,t,n)}function Ec(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ux(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(mt(e,t,r.children,n),r=Le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&um(e,n,t);else if(e.tag===19)um(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Re(Le,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Na(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Na(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,o);break;case"together":Ec(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ei|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kN(e,t,n){switch(t.tag){case 3:$x(t),qi();break;case 5:mx(t);break;case 1:Nt(t.type)&&Ea(t);break;case 4:Nh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Re(Sa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Re(Le,Le.current&1),t.flags|=128,null):n&t.child.childLanes?Vx(e,t,n):(Re(Le,Le.current&1),e=Wn(e,t,n),e!==null?e.sibling:null);Re(Le,Le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ux(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Re(Le,Le.current),r)break;return null;case 22:case 23:return t.lanes=0,Bx(e,t,n)}return Wn(e,t,n)}var Wx,od,Gx,Yx;Wx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};od=function(){};Gx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Vr(An.current);var o=null;switch(n){case"input":i=Af(e,i),r=Af(e,r),o=[];break;case"select":i=Fe({},i,{value:void 0}),r=Fe({},r,{value:void 0}),o=[];break;case"textarea":i=Tf(e,i),r=Tf(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=xa)}If(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ts.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ts.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ie("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Yx=function(e,t,n,r){n!==r&&(t.flags|=4)};function _o(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _N(e,t,n){var r=t.pendingProps;switch(bh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return Nt(t.type)&&ba(),at(t),null;case 3:return r=t.stateNode,Zi(),Me(At),Me(ft),Th(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ul(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,an!==null&&(hd(an),an=null))),od(e,t),at(t),null;case 5:Dh(t);var i=Vr(hs.current);if(n=t.type,e!==null&&t.stateNode!=null)Gx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return at(t),null}if(e=Vr(An.current),ul(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Sn]=t,r[fs]=o,e=(t.mode&1)!==0,n){case"dialog":Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":case"embed":Ie("load",r);break;case"video":case"audio":for(i=0;i<Mo.length;i++)Ie(Mo[i],r);break;case"source":Ie("error",r);break;case"img":case"image":case"link":Ie("error",r),Ie("load",r);break;case"details":Ie("toggle",r);break;case"input":vg(r,o),Ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ie("invalid",r);break;case"textarea":xg(r,o),Ie("invalid",r)}If(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&al(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&al(r.textContent,l,e),i=["children",""+l]):ts.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ie("scroll",r)}switch(n){case"input":el(r),wg(r,o,!0);break;case"textarea":el(r),bg(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=xa)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Sn]=t,e[fs]=r,Wx(e,t,!1,!1),t.stateNode=e;e:{switch(s=Mf(n,r),n){case"dialog":Ie("cancel",e),Ie("close",e),i=r;break;case"iframe":case"object":case"embed":Ie("load",e),i=r;break;case"video":case"audio":for(i=0;i<Mo.length;i++)Ie(Mo[i],e);i=r;break;case"source":Ie("error",e),i=r;break;case"img":case"image":case"link":Ie("error",e),Ie("load",e),i=r;break;case"details":Ie("toggle",e),i=r;break;case"input":vg(e,r),i=Af(e,r),Ie("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Fe({},r,{value:void 0}),Ie("invalid",e);break;case"textarea":xg(e,r),i=Tf(e,r),Ie("invalid",e);break;default:i=r}If(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?_w(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Ew(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&ns(e,a):typeof a=="number"&&ns(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ts.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ie("scroll",e):a!=null&&sh(e,o,a,s))}switch(n){case"input":el(e),wg(e,r,!1);break;case"textarea":el(e),bg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Er(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?zi(e,!!r.multiple,o,!1):r.defaultValue!=null&&zi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=xa)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return at(t),null;case 6:if(e&&t.stateNode!=null)Yx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Vr(hs.current),Vr(An.current),ul(t)){if(r=t.stateNode,n=t.memoizedProps,r[Sn]=t,(o=r.nodeValue!==n)&&(e=Lt,e!==null))switch(e.tag){case 3:al(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&al(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Sn]=t,t.stateNode=r}return at(t),null;case 13:if(Me(Le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&Pt!==null&&t.mode&1&&!(t.flags&128))fx(),qi(),t.flags|=98560,o=!1;else if(o=ul(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[Sn]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else an!==null&&(hd(an),an=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Le.current&1?Ke===0&&(Ke=3):$h())),t.updateQueue!==null&&(t.flags|=4),at(t),null);case 4:return Zi(),od(e,t),e===null&&us(t.stateNode.containerInfo),at(t),null;case 10:return Sh(t.type._context),at(t),null;case 17:return Nt(t.type)&&ba(),at(t),null;case 19:if(Me(Le),o=t.memoizedState,o===null)return at(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)_o(o,!1);else{if(Ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Na(e),s!==null){for(t.flags|=128,_o(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Re(Le,Le.current&1|2),t.child}e=e.sibling}o.tail!==null&&We()>Ji&&(t.flags|=128,r=!0,_o(o,!1),t.lanes=4194304)}else{if(!r)if(e=Na(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_o(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Pe)return at(t),null}else 2*We()-o.renderingStartTime>Ji&&n!==1073741824&&(t.flags|=128,r=!0,_o(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=We(),t.sibling=null,n=Le.current,Re(Le,r?n&1|2:n&1),t):(at(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Mt&1073741824&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function SN(e,t){switch(bh(t),t.tag){case 1:return Nt(t.type)&&ba(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(),Me(At),Me(ft),Th(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dh(t),null;case 13:if(Me(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Le),null;case 4:return Zi(),null;case 10:return Sh(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var dl=!1,ut=!1,CN=typeof WeakSet=="function"?WeakSet:Set,te=null;function Mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$e(e,t,r)}else n.current=null}function sd(e,t,n){try{n()}catch(r){$e(e,t,r)}}var cm=!1;function AN(e,t){if(Vf=ya,e=Kw(),wh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===e)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uf={focusedElem:e,selectionRange:n},ya=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,w=p.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:on(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(x){$e(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return p=cm,cm=!1,p}function Vo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&sd(t,n,o)}i=i.next}while(i!==r)}}function bu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ld(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Qx(e){var t=e.alternate;t!==null&&(e.alternate=null,Qx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sn],delete t[fs],delete t[Yf],delete t[uN],delete t[cN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function qx(e){return e.tag===5||e.tag===3||e.tag===4}function fm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ad(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xa));else if(r!==4&&(e=e.child,e!==null))for(ad(e,t,n),e=e.sibling;e!==null;)ad(e,t,n),e=e.sibling}function ud(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ud(e,t,n),e=e.sibling;e!==null;)ud(e,t,n),e=e.sibling}var it=null,sn=!1;function Kn(e,t,n){for(n=n.child;n!==null;)Xx(e,t,n),n=n.sibling}function Xx(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(hu,n)}catch{}switch(n.tag){case 5:ut||Mi(n,t);case 6:var r=it,i=sn;it=null,Kn(e,t,n),it=r,sn=i,it!==null&&(sn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(sn?(e=it,n=n.stateNode,e.nodeType===8?gc(e.parentNode,n):e.nodeType===1&&gc(e,n),ss(e)):gc(it,n.stateNode));break;case 4:r=it,i=sn,it=n.stateNode.containerInfo,sn=!0,Kn(e,t,n),it=r,sn=i;break;case 0:case 11:case 14:case 15:if(!ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sd(n,t,s),i=i.next}while(i!==r)}Kn(e,t,n);break;case 1:if(!ut&&(Mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){$e(n,t,l)}Kn(e,t,n);break;case 21:Kn(e,t,n);break;case 22:n.mode&1?(ut=(r=ut)||n.memoizedState!==null,Kn(e,t,n),ut=r):Kn(e,t,n);break;default:Kn(e,t,n)}}function dm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CN),t.forEach(function(r){var i=LN.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:it=l.stateNode,sn=!1;break e;case 3:it=l.stateNode.containerInfo,sn=!0;break e;case 4:it=l.stateNode.containerInfo,sn=!0;break e}l=l.return}if(it===null)throw Error(Q(160));Xx(o,s,i),it=null,sn=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){$e(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zx(t,e),t=t.sibling}function Zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rn(t,e),xn(e),r&4){try{Vo(3,e,e.return),bu(3,e)}catch(v){$e(e,e.return,v)}try{Vo(5,e,e.return)}catch(v){$e(e,e.return,v)}}break;case 1:rn(t,e),xn(e),r&512&&n!==null&&Mi(n,n.return);break;case 5:if(rn(t,e),xn(e),r&512&&n!==null&&Mi(n,n.return),e.flags&32){var i=e.stateNode;try{ns(i,"")}catch(v){$e(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&ww(i,o),Mf(l,s);var u=Mf(l,o);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?_w(i,f):c==="dangerouslySetInnerHTML"?Ew(i,f):c==="children"?ns(i,f):sh(i,c,f,u)}switch(l){case"input":Nf(i,o);break;case"textarea":xw(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?zi(i,!!o.multiple,d,!1):h!==!!o.multiple&&(o.defaultValue!=null?zi(i,!!o.multiple,o.defaultValue,!0):zi(i,!!o.multiple,o.multiple?[]:"",!1))}i[fs]=o}catch(v){$e(e,e.return,v)}}break;case 6:if(rn(t,e),xn(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){$e(e,e.return,v)}}break;case 3:if(rn(t,e),xn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ss(t.containerInfo)}catch(v){$e(e,e.return,v)}break;case 4:rn(t,e),xn(e);break;case 13:rn(t,e),xn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Fh=We())),r&4&&dm(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(u=ut)||c,rn(t,e),ut=u):rn(t,e),xn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(te=e,c=e.child;c!==null;){for(f=te=c;te!==null;){switch(h=te,d=h.child,h.tag){case 0:case 11:case 14:case 15:Vo(4,h,h.return);break;case 1:Mi(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(v){$e(r,n,v)}}break;case 5:Mi(h,h.return);break;case 22:if(h.memoizedState!==null){pm(f);continue}}d!==null?(d.return=h,te=d):pm(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=kw("display",s))}catch(v){$e(e,e.return,v)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){$e(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:rn(t,e),xn(e),r&4&&dm(e);break;case 21:break;default:rn(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(qx(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ns(i,""),r.flags&=-33);var o=fm(e);ud(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=fm(e);ad(e,l,s);break;default:throw Error(Q(161))}}catch(a){$e(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NN(e,t,n){te=e,Kx(e)}function Kx(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var i=te,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||dl;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||ut;l=dl;var u=ut;if(dl=s,(ut=a)&&!u)for(te=i;te!==null;)s=te,a=s.child,s.tag===22&&s.memoizedState!==null?gm(i):a!==null?(a.return=s,te=a):gm(i);for(;o!==null;)te=o,Kx(o),o=o.sibling;te=i,dl=l,ut=u}hm(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,te=o):hm(e)}}function hm(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ut||bu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ut)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:on(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Zg(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Zg(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&ss(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}ut||t.flags&512&&ld(t)}catch(h){$e(t,t.return,h)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function pm(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function gm(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bu(4,t)}catch(a){$e(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){$e(t,i,a)}}var o=t.return;try{ld(t)}catch(a){$e(t,o,a)}break;case 5:var s=t.return;try{ld(t)}catch(a){$e(t,s,a)}}}catch(a){$e(t,t.return,a)}if(t===e){te=null;break}var l=t.sibling;if(l!==null){l.return=t.return,te=l;break}te=t.return}}var DN=Math.ceil,Ra=qn.ReactCurrentDispatcher,zh=qn.ReactCurrentOwner,qt=qn.ReactCurrentBatchConfig,be=0,nt=null,Qe=null,ot=0,Mt=0,Oi=Ar(0),Ke=0,ys=null,ei=0,Eu=0,jh=0,Uo=null,kt=null,Fh=0,Ji=1/0,On=null,Ia=!1,cd=null,yr=null,hl=!1,ar=null,Ma=0,Wo=0,fd=null,Gl=-1,Yl=0;function vt(){return be&6?We():Gl!==-1?Gl:Gl=We()}function vr(e){return e.mode&1?be&2&&ot!==0?ot&-ot:dN.transition!==null?(Yl===0&&(Yl=Lw()),Yl):(e=Ce,e!==0||(e=window.event,e=e===void 0?16:Vw(e.type)),e):1}function hn(e,t,n,r){if(50<Wo)throw Wo=0,fd=null,Error(Q(185));Ps(e,n,r),(!(be&2)||e!==nt)&&(e===nt&&(!(be&2)&&(Eu|=n),Ke===4&&or(e,ot)),Dt(e,r),n===1&&be===0&&!(t.mode&1)&&(Ji=We()+500,vu&&Nr()))}function Dt(e,t){var n=e.callbackNode;dA(e,t);var r=ma(e,e===nt?ot:0);if(r===0)n!==null&&_g(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_g(n),t===1)e.tag===0?fN(mm.bind(null,e)):ax(mm.bind(null,e)),lN(function(){!(be&6)&&Nr()}),n=null;else{switch(zw(r)){case 1:n=fh;break;case 4:n=Ow;break;case 16:n=ga;break;case 536870912:n=Pw;break;default:n=ga}n=sb(n,Jx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jx(e,t){if(Gl=-1,Yl=0,be&6)throw Error(Q(327));var n=e.callbackNode;if($i()&&e.callbackNode!==n)return null;var r=ma(e,e===nt?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Oa(e,r);else{t=r;var i=be;be|=2;var o=tb();(nt!==e||ot!==t)&&(On=null,Ji=We()+500,Gr(e,t));do try{IN();break}catch(l){eb(e,l)}while(!0);_h(),Ra.current=o,be=i,Qe!==null?t=0:(nt=null,ot=0,t=Ke)}if(t!==0){if(t===2&&(i=jf(e),i!==0&&(r=i,t=dd(e,i))),t===1)throw n=ys,Gr(e,0),or(e,r),Dt(e,We()),n;if(t===6)or(e,r);else{if(i=e.current.alternate,!(r&30)&&!TN(i)&&(t=Oa(e,r),t===2&&(o=jf(e),o!==0&&(r=o,t=dd(e,o))),t===1))throw n=ys,Gr(e,0),or(e,r),Dt(e,We()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Or(e,kt,On);break;case 3:if(or(e,r),(r&130023424)===r&&(t=Fh+500-We(),10<t)){if(ma(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){vt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Gf(Or.bind(null,e,kt,On),t);break}Or(e,kt,On);break;case 4:if(or(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-dn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=We()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*DN(r/1960))-r,10<r){e.timeoutHandle=Gf(Or.bind(null,e,kt,On),r);break}Or(e,kt,On);break;case 5:Or(e,kt,On);break;default:throw Error(Q(329))}}}return Dt(e,We()),e.callbackNode===n?Jx.bind(null,e):null}function dd(e,t){var n=Uo;return e.current.memoizedState.isDehydrated&&(Gr(e,t).flags|=256),e=Oa(e,t),e!==2&&(t=kt,kt=n,t!==null&&hd(t)),e}function hd(e){kt===null?kt=e:kt.push.apply(kt,e)}function TN(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!gn(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function or(e,t){for(t&=~jh,t&=~Eu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function mm(e){if(be&6)throw Error(Q(327));$i();var t=ma(e,0);if(!(t&1))return Dt(e,We()),null;var n=Oa(e,t);if(e.tag!==0&&n===2){var r=jf(e);r!==0&&(t=r,n=dd(e,r))}if(n===1)throw n=ys,Gr(e,0),or(e,t),Dt(e,We()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Or(e,kt,On),Dt(e,We()),null}function Bh(e,t){var n=be;be|=1;try{return e(t)}finally{be=n,be===0&&(Ji=We()+500,vu&&Nr())}}function ti(e){ar!==null&&ar.tag===0&&!(be&6)&&$i();var t=be;be|=1;var n=qt.transition,r=Ce;try{if(qt.transition=null,Ce=1,e)return e()}finally{Ce=r,qt.transition=n,be=t,!(be&6)&&Nr()}}function Hh(){Mt=Oi.current,Me(Oi)}function Gr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,sN(n)),Qe!==null)for(n=Qe.return;n!==null;){var r=n;switch(bh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ba();break;case 3:Zi(),Me(At),Me(ft),Th();break;case 5:Dh(r);break;case 4:Zi();break;case 13:Me(Le);break;case 19:Me(Le);break;case 10:Sh(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(nt=e,Qe=e=wr(e.current,null),ot=Mt=t,Ke=0,ys=null,jh=Eu=ei=0,kt=Uo=null,$r!==null){for(t=0;t<$r.length;t++)if(n=$r[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}$r=null}return e}function eb(e,t){do{var n=Qe;try{if(_h(),Vl.current=Ta,Da){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Da=!1}if(Jr=0,et=Ze=je=null,$o=!1,ps=0,zh.current=null,n===null||n.return===null){Ke=1,ys=t,Qe=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=ot,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=rm(s);if(d!==null){d.flags&=-257,im(d,s,l,o,t),d.mode&1&&nm(o,u,t),t=d,a=u;var p=t.updateQueue;if(p===null){var v=new Set;v.add(a),t.updateQueue=v}else p.add(a);break e}else{if(!(t&1)){nm(o,u,t),$h();break e}a=Error(Q(426))}}else if(Pe&&l.mode&1){var w=rm(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),im(w,s,l,o,t),Eh(Ki(a,l));break e}}o=a=Ki(a,l),Ke!==4&&(Ke=2),Uo===null?Uo=[o]:Uo.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=zx(o,a,t);Xg(o,g);break e;case 1:l=a;var y=o.type,m=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(yr===null||!yr.has(m)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=jx(o,l,t);Xg(o,x);break e}}o=o.return}while(o!==null)}rb(n)}catch(_){t=_,Qe===n&&n!==null&&(Qe=n=n.return);continue}break}while(!0)}function tb(){var e=Ra.current;return Ra.current=Ta,e===null?Ta:e}function $h(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),nt===null||!(ei&268435455)&&!(Eu&268435455)||or(nt,ot)}function Oa(e,t){var n=be;be|=2;var r=tb();(nt!==e||ot!==t)&&(On=null,Gr(e,t));do try{RN();break}catch(i){eb(e,i)}while(!0);if(_h(),be=n,Ra.current=r,Qe!==null)throw Error(Q(261));return nt=null,ot=0,Ke}function RN(){for(;Qe!==null;)nb(Qe)}function IN(){for(;Qe!==null&&!rA();)nb(Qe)}function nb(e){var t=ob(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?rb(e):Qe=t,zh.current=null}function rb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=SN(n,t),n!==null){n.flags&=32767,Qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ke=6,Qe=null;return}}else if(n=_N(n,t,Mt),n!==null){Qe=n;return}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);Ke===0&&(Ke=5)}function Or(e,t,n){var r=Ce,i=qt.transition;try{qt.transition=null,Ce=1,MN(e,t,n,r)}finally{qt.transition=i,Ce=r}return null}function MN(e,t,n,r){do $i();while(ar!==null);if(be&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(hA(e,o),e===nt&&(Qe=nt=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||hl||(hl=!0,sb(ga,function(){return $i(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=qt.transition,qt.transition=null;var s=Ce;Ce=1;var l=be;be|=4,zh.current=null,AN(e,n),Zx(n,e),JA(Uf),ya=!!Vf,Uf=Vf=null,e.current=n,NN(n),iA(),be=l,Ce=s,qt.transition=o}else e.current=n;if(hl&&(hl=!1,ar=e,Ma=i),o=e.pendingLanes,o===0&&(yr=null),lA(n.stateNode),Dt(e,We()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ia)throw Ia=!1,e=cd,cd=null,e;return Ma&1&&e.tag!==0&&$i(),o=e.pendingLanes,o&1?e===fd?Wo++:(Wo=0,fd=e):Wo=0,Nr(),null}function $i(){if(ar!==null){var e=zw(Ma),t=qt.transition,n=Ce;try{if(qt.transition=null,Ce=16>e?16:e,ar===null)var r=!1;else{if(e=ar,ar=null,Ma=0,be&6)throw Error(Q(331));var i=be;for(be|=4,te=e.current;te!==null;){var o=te,s=o.child;if(te.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(te=u;te!==null;){var c=te;switch(c.tag){case 0:case 11:case 15:Vo(8,c,o)}var f=c.child;if(f!==null)f.return=c,te=f;else for(;te!==null;){c=te;var h=c.sibling,d=c.return;if(Qx(c),c===u){te=null;break}if(h!==null){h.return=d,te=h;break}te=d}}}var p=o.alternate;if(p!==null){var v=p.child;if(v!==null){p.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}te=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,te=s;else e:for(;te!==null;){if(o=te,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Vo(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,te=g;break e}te=o.return}}var y=e.current;for(te=y;te!==null;){s=te;var m=s.child;if(s.subtreeFlags&2064&&m!==null)m.return=s,te=m;else e:for(s=y;te!==null;){if(l=te,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bu(9,l)}}catch(_){$e(l,l.return,_)}if(l===s){te=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,te=x;break e}te=l.return}}if(be=i,Nr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(hu,e)}catch{}r=!0}return r}finally{Ce=n,qt.transition=t}}return!1}function ym(e,t,n){t=Ki(n,t),t=zx(e,t,1),e=mr(e,t,1),t=vt(),e!==null&&(Ps(e,1,t),Dt(e,t))}function $e(e,t,n){if(e.tag===3)ym(e,e,n);else for(;t!==null;){if(t.tag===3){ym(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yr===null||!yr.has(r))){e=Ki(n,e),e=jx(t,e,1),t=mr(t,e,1),e=vt(),t!==null&&(Ps(t,1,e),Dt(t,e));break}}t=t.return}}function ON(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vt(),e.pingedLanes|=e.suspendedLanes&n,nt===e&&(ot&n)===n&&(Ke===4||Ke===3&&(ot&130023424)===ot&&500>We()-Fh?Gr(e,0):jh|=n),Dt(e,t)}function ib(e,t){t===0&&(e.mode&1?(t=rl,rl<<=1,!(rl&130023424)&&(rl=4194304)):t=1);var n=vt();e=Un(e,t),e!==null&&(Ps(e,t,n),Dt(e,n))}function PN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ib(e,n)}function LN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),ib(e,n)}var ob;ob=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||At.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,kN(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Pe&&t.flags&1048576&&ux(t,_a,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=Qi(t,ft.current);Hi(t,n),i=Ih(null,t,r,e,i,n);var o=Mh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nt(r)?(o=!0,Ea(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ah(t),i.updater=xu,t.stateNode=i,i._reactInternals=t,Jf(t,r,e,n),t=nd(null,t,r,!0,o,n)):(t.tag=0,Pe&&o&&xh(t),mt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=jN(r),e=on(r,e),i){case 0:t=td(null,t,r,e,n);break e;case 1:t=lm(null,t,r,e,n);break e;case 11:t=om(null,t,r,e,n);break e;case 14:t=sm(null,t,r,on(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:on(r,i),td(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:on(r,i),lm(e,t,r,i,n);case 3:e:{if($x(t),e===null)throw Error(Q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,gx(e,t),Aa(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ki(Error(Q(423)),t),t=am(e,t,r,n,i);break e}else if(r!==i){i=Ki(Error(Q(424)),t),t=am(e,t,r,n,i);break e}else for(Pt=gr(t.stateNode.containerInfo.firstChild),Lt=t,Pe=!0,an=null,n=hx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qi(),r===i){t=Wn(e,t,n);break e}mt(e,t,r,n)}t=t.child}return t;case 5:return mx(t),e===null&&Xf(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Wf(r,i)?s=null:o!==null&&Wf(r,o)&&(t.flags|=32),Hx(e,t),mt(e,t,s,n),t.child;case 6:return e===null&&Xf(t),null;case 13:return Vx(e,t,n);case 4:return Nh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xi(t,null,r,n):mt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:on(r,i),om(e,t,r,i,n);case 7:return mt(e,t,t.pendingProps,n),t.child;case 8:return mt(e,t,t.pendingProps.children,n),t.child;case 12:return mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Re(Sa,r._currentValue),r._currentValue=s,o!==null)if(gn(o.value,s)){if(o.children===i.children&&!At.current){t=Wn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Hn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zf(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Q(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Zf(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}mt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hi(t,n),i=Xt(i),r=r(i),t.flags|=1,mt(e,t,r,n),t.child;case 14:return r=t.type,i=on(r,t.pendingProps),i=on(r.type,i),sm(e,t,r,i,n);case 15:return Fx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:on(r,i),Wl(e,t),t.tag=1,Nt(r)?(e=!0,Ea(t)):e=!1,Hi(t,n),Lx(t,r,i),Jf(t,r,i,n),nd(null,t,r,!0,e,n);case 19:return Ux(e,t,n);case 22:return Bx(e,t,n)}throw Error(Q(156,t.tag))};function sb(e,t){return Mw(e,t)}function zN(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,n,r){return new zN(e,t,n,r)}function Vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jN(e){if(typeof e=="function")return Vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ah)return 11;if(e===uh)return 14}return 2}function wr(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ql(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Vh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _i:return Yr(n.children,i,o,t);case lh:s=8,i|=8;break;case kf:return e=Yt(12,n,t,i|2),e.elementType=kf,e.lanes=o,e;case _f:return e=Yt(13,n,t,i),e.elementType=_f,e.lanes=o,e;case Sf:return e=Yt(19,n,t,i),e.elementType=Sf,e.lanes=o,e;case mw:return ku(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pw:s=10;break e;case gw:s=9;break e;case ah:s=11;break e;case uh:s=14;break e;case nr:s=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Yt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Yr(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function ku(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=mw,e.lanes=n,e.stateNode={isHidden:!1},e}function kc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function _c(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FN(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uh(e,t,n,r,i,o,s,l,a){return e=new FN(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Yt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ah(o),e}function BN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function lb(e){if(!e)return kr;e=e._reactInternals;e:{if(fi(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Nt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(Nt(n))return lx(e,n,t)}return t}function ab(e,t,n,r,i,o,s,l,a){return e=Uh(n,r,!0,e,i,o,s,l,a),e.context=lb(null),n=e.current,r=vt(),i=vr(n),o=Hn(r,i),o.callback=t??null,mr(n,o,i),e.current.lanes=i,Ps(e,i,r),Dt(e,r),e}function _u(e,t,n,r){var i=t.current,o=vt(),s=vr(i);return n=lb(n),t.context===null?t.context=n:t.pendingContext=n,t=Hn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mr(i,t,s),e!==null&&(hn(e,i,s,o),$l(e,i,s)),s}function Pa(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wh(e,t){vm(e,t),(e=e.alternate)&&vm(e,t)}function HN(){return null}var ub=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gh(e){this._internalRoot=e}Su.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));_u(e,t,null,null)};Su.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ti(function(){_u(null,e,null,null)}),t[Vn]=null}};function Su(e){this._internalRoot=e}Su.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ir.length&&t!==0&&t<ir[n].priority;n++);ir.splice(n,0,e),n===0&&$w(e)}};function Yh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function wm(){}function $N(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Pa(s);o.call(u)}}var s=ab(t,r,e,0,null,!1,!1,"",wm);return e._reactRootContainer=s,e[Vn]=s.current,us(e.nodeType===8?e.parentNode:e),ti(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Pa(a);l.call(u)}}var a=Uh(e,0,!1,null,null,!1,!1,"",wm);return e._reactRootContainer=a,e[Vn]=a.current,us(e.nodeType===8?e.parentNode:e),ti(function(){_u(t,a,n,r)}),a}function Au(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=Pa(s);l.call(a)}}_u(t,s,e,i)}else s=$N(n,t,e,i,r);return Pa(s)}jw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Io(t.pendingLanes);n!==0&&(dh(t,n|1),Dt(t,We()),!(be&6)&&(Ji=We()+500,Nr()))}break;case 13:ti(function(){var r=Un(e,1);if(r!==null){var i=vt();hn(r,e,1,i)}}),Wh(e,1)}};hh=function(e){if(e.tag===13){var t=Un(e,134217728);if(t!==null){var n=vt();hn(t,e,134217728,n)}Wh(e,134217728)}};Fw=function(e){if(e.tag===13){var t=vr(e),n=Un(e,t);if(n!==null){var r=vt();hn(n,e,t,r)}Wh(e,t)}};Bw=function(){return Ce};Hw=function(e,t){var n=Ce;try{return Ce=e,t()}finally{Ce=n}};Pf=function(e,t,n){switch(t){case"input":if(Nf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=yu(r);if(!i)throw Error(Q(90));vw(r),Nf(r,i)}}}break;case"textarea":xw(e,n);break;case"select":t=n.value,t!=null&&zi(e,!!n.multiple,t,!1)}};Aw=Bh;Nw=ti;var VN={usingClientEntryPoint:!1,Events:[zs,Ni,yu,Sw,Cw,Bh]},So={findFiberByHostInstance:Hr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},UN={bundleType:So.bundleType,version:So.version,rendererPackageName:So.rendererPackageName,rendererConfig:So.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Rw(e),e===null?null:e.stateNode},findFiberByHostInstance:So.findFiberByHostInstance||HN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pl.isDisabled&&pl.supportsFiber)try{hu=pl.inject(UN),Cn=pl}catch{}}$t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VN;$t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yh(t))throw Error(Q(200));return BN(e,t,null,n)};$t.createRoot=function(e,t){if(!Yh(e))throw Error(Q(299));var n=!1,r="",i=ub;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Uh(e,1,!1,null,null,n,!1,r,i),e[Vn]=t.current,us(e.nodeType===8?e.parentNode:e),new Gh(t)};$t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Rw(t),e=e===null?null:e.stateNode,e};$t.flushSync=function(e){return ti(e)};$t.hydrate=function(e,t,n){if(!Cu(t))throw Error(Q(200));return Au(null,e,t,!0,n)};$t.hydrateRoot=function(e,t,n){if(!Yh(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=ub;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=ab(t,null,e,1,n??null,i,!1,o,s),e[Vn]=t.current,us(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Su(t)};$t.render=function(e,t,n){if(!Cu(t))throw Error(Q(200));return Au(null,e,t,!1,n)};$t.unmountComponentAtNode=function(e){if(!Cu(e))throw Error(Q(40));return e._reactRootContainer?(ti(function(){Au(null,null,e,!1,function(){e._reactRootContainer=null,e[Vn]=null})}),!0):!1};$t.unstable_batchedUpdates=Bh;$t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cu(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Au(e,t,n,!1,r)};$t.version="18.3.1-next-f1338f8080-20240426";function cb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cb)}catch(e){console.error(e)}}cb(),cw.exports=$t;var La=cw.exports,fb,xm=La;fb=xm.createRoot,xm.hydrateRoot;function Xe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Xe(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var WN={value:()=>{}};function Nu(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ql(n)}function ql(e){this._=e}function GN(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ql.prototype=Nu.prototype={constructor:ql,on:function(e,t){var n=this._,r=GN(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=YN(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=bm(n[i],e.name,t);else if(t==null)for(i in n)n[i]=bm(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ql(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function YN(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function bm(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=WN,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var pd="http://www.w3.org/1999/xhtml";const Em={svg:"http://www.w3.org/2000/svg",xhtml:pd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Du(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Em.hasOwnProperty(t)?{space:Em[t],local:e}:e}function QN(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===pd&&t.documentElement.namespaceURI===pd?t.createElement(e):t.createElementNS(n,e)}}function qN(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function db(e){var t=Du(e);return(t.local?qN:QN)(t)}function XN(){}function Qh(e){return e==null?XN:function(){return this.querySelector(e)}}function ZN(e){typeof e!="function"&&(e=Qh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=new Array(s),a,u,c=0;c<s;++c)(a=o[c])&&(u=e.call(a,a.__data__,c,o))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new Ht(r,this._parents)}function KN(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function JN(){return[]}function hb(e){return e==null?JN:function(){return this.querySelectorAll(e)}}function eD(e){return function(){return KN(e.apply(this,arguments))}}function tD(e){typeof e=="function"?e=eD(e):e=hb(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),i.push(a));return new Ht(r,i)}function pb(e){return function(){return this.matches(e)}}function gb(e){return function(t){return t.matches(e)}}var nD=Array.prototype.find;function rD(e){return function(){return nD.call(this.children,e)}}function iD(){return this.firstElementChild}function oD(e){return this.select(e==null?iD:rD(typeof e=="function"?e:gb(e)))}var sD=Array.prototype.filter;function lD(){return Array.from(this.children)}function aD(e){return function(){return sD.call(this.children,e)}}function uD(e){return this.selectAll(e==null?lD:aD(typeof e=="function"?e:gb(e)))}function cD(e){typeof e!="function"&&(e=pb(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],a,u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new Ht(r,this._parents)}function mb(e){return new Array(e.length)}function fD(){return new Ht(this._enter||this._groups.map(mb),this._parents)}function za(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}za.prototype={constructor:za,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 dD(e){return function(){return e}}function hD(e,t,n,r,i,o){for(var s=0,l,a=t.length,u=o.length;s<u;++s)(l=t[s])?(l.__data__=o[s],r[s]=l):n[s]=new za(e,o[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function pD(e,t,n,r,i,o,s){var l,a,u=new Map,c=t.length,f=o.length,h=new Array(c),d;for(l=0;l<c;++l)(a=t[l])&&(h[l]=d=s.call(a,a.__data__,l,t)+"",u.has(d)?i[l]=a:u.set(d,a));for(l=0;l<f;++l)d=s.call(e,o[l],l,o)+"",(a=u.get(d))?(r[l]=a,a.__data__=o[l],u.delete(d)):n[l]=new za(e,o[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(h[l])===a&&(i[l]=a)}function gD(e){return e.__data__}function mD(e,t){if(!arguments.length)return Array.from(this,gD);var n=t?pD:hD,r=this._parents,i=this._groups;typeof e!="function"&&(e=dD(e));for(var o=i.length,s=new Array(o),l=new Array(o),a=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],h=f.length,d=yD(e.call(c,c&&c.__data__,u,r)),p=d.length,v=l[u]=new Array(p),w=s[u]=new Array(p),g=a[u]=new Array(h);n(c,f,v,w,g,d,t);for(var y=0,m=0,x,_;y<p;++y)if(x=v[y]){for(y>=m&&(m=y+1);!(_=w[m])&&++m<p;);x._next=_||null}}return s=new Ht(s,r),s._enter=l,s._exit=a,s}function yD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vD(){return new Ht(this._exit||this._groups.map(mb),this._parents)}function wD(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function xD(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=r[a],f=u.length,h=l[a]=new Array(f),d,p=0;p<f;++p)(d=u[p]||c[p])&&(h[p]=d);for(;a<i;++a)l[a]=n[a];return new Ht(l,this._parents)}function bD(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function ED(e){e||(e=kD);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,a=i[o]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new Ht(i,this._parents).order()}function kD(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _D(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function SD(){return Array.from(this)}function CD(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function AD(){let e=0;for(const t of this)++e;return e}function ND(){return!this.node()}function DD(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&e.call(l,l.__data__,o,i);return this}function TD(e){return function(){this.removeAttribute(e)}}function RD(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ID(e,t){return function(){this.setAttribute(e,t)}}function MD(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function OD(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function PD(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function LD(e,t){var n=Du(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?RD:TD:typeof t=="function"?n.local?PD:OD:n.local?MD:ID)(n,t))}function yb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zD(e){return function(){this.style.removeProperty(e)}}function jD(e,t,n){return function(){this.style.setProperty(e,t,n)}}function FD(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function BD(e,t,n){return arguments.length>1?this.each((t==null?zD:typeof t=="function"?FD:jD)(e,t,n??"")):eo(this.node(),e)}function eo(e,t){return e.style.getPropertyValue(t)||yb(e).getComputedStyle(e,null).getPropertyValue(t)}function HD(e){return function(){delete this[e]}}function $D(e,t){return function(){this[e]=t}}function VD(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function UD(e,t){return arguments.length>1?this.each((t==null?HD:typeof t=="function"?VD:$D)(e,t)):this.node()[e]}function vb(e){return e.trim().split(/^|\s+/)}function qh(e){return e.classList||new wb(e)}function wb(e){this._node=e,this._names=vb(e.getAttribute("class")||"")}wb.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 xb(e,t){for(var n=qh(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function bb(e,t){for(var n=qh(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function WD(e){return function(){xb(this,e)}}function GD(e){return function(){bb(this,e)}}function YD(e,t){return function(){(t.apply(this,arguments)?xb:bb)(this,e)}}function QD(e,t){var n=vb(e+"");if(arguments.length<2){for(var r=qh(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?YD:t?WD:GD)(n,t))}function qD(){this.textContent=""}function XD(e){return function(){this.textContent=e}}function ZD(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function KD(e){return arguments.length?this.each(e==null?qD:(typeof e=="function"?ZD:XD)(e)):this.node().textContent}function JD(){this.innerHTML=""}function eT(e){return function(){this.innerHTML=e}}function tT(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function nT(e){return arguments.length?this.each(e==null?JD:(typeof e=="function"?tT:eT)(e)):this.node().innerHTML}function rT(){this.nextSibling&&this.parentNode.appendChild(this)}function iT(){return this.each(rT)}function oT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sT(){return this.each(oT)}function lT(e){var t=typeof e=="function"?e:db(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function aT(){return null}function uT(e,t){var n=typeof e=="function"?e:db(e),r=t==null?aT:typeof t=="function"?t:Qh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function cT(){var e=this.parentNode;e&&e.removeChild(this)}function fT(){return this.each(cT)}function dT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pT(e){return this.select(e?hT:dT)}function gT(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mT(e){return function(t){e.call(this,t,this.__data__)}}function yT(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function vT(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function wT(e,t,n){return function(){var r=this.__on,i,o=mT(t);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function xT(e,t,n){var r=yT(e+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<o;++i)if((s=r[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?wT:vT,i=0;i<o;++i)this.each(l(r[i],t,n));return this}function Eb(e,t,n){var r=yb(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function bT(e,t){return function(){return Eb(this,e,t)}}function ET(e,t){return function(){return Eb(this,e,t.apply(this,arguments))}}function kT(e,t){return this.each((typeof t=="function"?ET:bT)(e,t))}function*_T(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var kb=[null];function Ht(e,t){this._groups=e,this._parents=t}function Fs(){return new Ht([[document.documentElement]],kb)}function ST(){return this}Ht.prototype=Fs.prototype={constructor:Ht,select:ZN,selectAll:tD,selectChild:oD,selectChildren:uD,filter:cD,data:mD,enter:fD,exit:vD,join:wD,merge:xD,selection:ST,order:bD,sort:ED,call:_D,nodes:SD,node:CD,size:AD,empty:ND,each:DD,attr:LD,style:BD,property:UD,classed:QD,text:KD,html:nT,raise:iT,lower:sT,append:lT,insert:uT,remove:fT,clone:pT,datum:gT,on:xT,dispatch:kT,[Symbol.iterator]:_T};function Ot(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],kb)}function CT(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ln(e,t){if(e=CT(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const AT={passive:!1},vs={capture:!0,passive:!1};function Sc(e){e.stopImmediatePropagation()}function Vi(e){e.preventDefault(),e.stopImmediatePropagation()}function _b(e){var t=e.document.documentElement,n=Ot(e).on("dragstart.drag",Vi,vs);"onselectstart"in t?n.on("selectstart.drag",Vi,vs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Sb(e,t){var n=e.document.documentElement,r=Ot(e).on("dragstart.drag",null);t&&(r.on("click.drag",Vi,vs),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const gl=e=>()=>e;function gd(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}gd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function NT(e){return!e.ctrlKey&&!e.button}function DT(){return this.parentNode}function TT(e,t){return t??{x:e.x,y:e.y}}function RT(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cb(){var e=NT,t=DT,n=TT,r=RT,i={},o=Nu("start","drag","end"),s=0,l,a,u,c,f=0;function h(x){x.on("mousedown.drag",d).filter(r).on("touchstart.drag",w).on("touchmove.drag",g,AT).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(x,_){if(!(c||!e.call(this,x,_))){var b=m(this,t.call(this,x,_),x,_,"mouse");b&&(Ot(x.view).on("mousemove.drag",p,vs).on("mouseup.drag",v,vs),_b(x.view),Sc(x),u=!1,l=x.clientX,a=x.clientY,b("start",x))}}function p(x){if(Vi(x),!u){var _=x.clientX-l,b=x.clientY-a;u=_*_+b*b>f}i.mouse("drag",x)}function v(x){Ot(x.view).on("mousemove.drag mouseup.drag",null),Sb(x.view,u),Vi(x),i.mouse("end",x)}function w(x,_){if(e.call(this,x,_)){var b=x.changedTouches,k=t.call(this,x,_),A=b.length,T,N;for(T=0;T<A;++T)(N=m(this,k,x,_,b[T].identifier,b[T]))&&(Sc(x),N("start",x,b[T]))}}function g(x){var _=x.changedTouches,b=_.length,k,A;for(k=0;k<b;++k)(A=i[_[k].identifier])&&(Vi(x),A("drag",x,_[k]))}function y(x){var _=x.changedTouches,b=_.length,k,A;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),k=0;k<b;++k)(A=i[_[k].identifier])&&(Sc(x),A("end",x,_[k]))}function m(x,_,b,k,A,T){var N=o.copy(),R=ln(T||b,_),j,F,S;if((S=n.call(x,new gd("beforestart",{sourceEvent:b,target:h,identifier:A,active:s,x:R[0],y:R[1],dx:0,dy:0,dispatch:N}),k))!=null)return j=S.x-R[0]||0,F=S.y-R[1]||0,function O(P,z,I){var M=R,E;switch(P){case"start":i[A]=O,E=s++;break;case"end":delete i[A],--s;case"drag":R=ln(I||z,_),E=s;break}N.call(P,x,new gd(P,{sourceEvent:z,subject:S,target:h,identifier:A,active:E,x:R[0]+j,y:R[1]+F,dx:R[0]-M[0],dy:R[1]-M[1],dispatch:N}),k)}}return h.filter=function(x){return arguments.length?(e=typeof x=="function"?x:gl(!!x),h):e},h.container=function(x){return arguments.length?(t=typeof x=="function"?x:gl(x),h):t},h.subject=function(x){return arguments.length?(n=typeof x=="function"?x:gl(x),h):n},h.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:gl(!!x),h):r},h.on=function(){var x=o.on.apply(o,arguments);return x===o?h:x},h.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,h):Math.sqrt(f)},h}function Xh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ab(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Bs(){}var ws=.7,ja=1/ws,Ui="\\s*([+-]?\\d+)\\s*",xs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IT=/^#([0-9a-f]{3,8})$/,MT=new RegExp(`^rgb\\(${Ui},${Ui},${Ui}\\)$`),OT=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),PT=new RegExp(`^rgba\\(${Ui},${Ui},${Ui},${xs}\\)$`),LT=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${xs}\\)$`),zT=new RegExp(`^hsl\\(${xs},${Nn},${Nn}\\)$`),jT=new RegExp(`^hsla\\(${xs},${Nn},${Nn},${xs}\\)$`),km={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};Xh(Bs,ni,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_m,formatHex:_m,formatHex8:FT,formatHsl:BT,formatRgb:Sm,toString:Sm});function _m(){return this.rgb().formatHex()}function FT(){return this.rgb().formatHex8()}function BT(){return Nb(this).formatHsl()}function Sm(){return this.rgb().formatRgb()}function ni(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Cm(t):n===3?new St(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ml(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ml(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=MT.exec(e))?new St(t[1],t[2],t[3],1):(t=OT.exec(e))?new St(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=PT.exec(e))?ml(t[1],t[2],t[3],t[4]):(t=LT.exec(e))?ml(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zT.exec(e))?Dm(t[1],t[2]/100,t[3]/100,1):(t=jT.exec(e))?Dm(t[1],t[2]/100,t[3]/100,t[4]):km.hasOwnProperty(e)?Cm(km[e]):e==="transparent"?new St(NaN,NaN,NaN,0):null}function Cm(e){return new St(e>>16&255,e>>8&255,e&255,1)}function ml(e,t,n,r){return r<=0&&(e=t=n=NaN),new St(e,t,n,r)}function HT(e){return e instanceof Bs||(e=ni(e)),e?(e=e.rgb(),new St(e.r,e.g,e.b,e.opacity)):new St}function md(e,t,n,r){return arguments.length===1?HT(e):new St(e,t,n,r??1)}function St(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xh(St,md,Ab(Bs,{brighter(e){return e=e==null?ja:Math.pow(ja,e),new St(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ws:Math.pow(ws,e),new St(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new St(Qr(this.r),Qr(this.g),Qr(this.b),Fa(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:Am,formatHex:Am,formatHex8:$T,formatRgb:Nm,toString:Nm}));function Am(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}`}function $T(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}${Ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nm(){const e=Fa(this.opacity);return`${e===1?"rgb(":"rgba("}${Qr(this.r)}, ${Qr(this.g)}, ${Qr(this.b)}${e===1?")":`, ${e})`}`}function Fa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ur(e){return e=Qr(e),(e<16?"0":"")+e.toString(16)}function Dm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new un(e,t,n,r)}function Nb(e){if(e instanceof un)return new un(e.h,e.s,e.l,e.opacity);if(e instanceof Bs||(e=ni(e)),!e)return new un;if(e instanceof un)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,a=(o+i)/2;return l?(t===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?o+i:2-o-i,s*=60):l=a>0&&a<1?0:s,new un(s,l,a,e.opacity)}function VT(e,t,n,r){return arguments.length===1?Nb(e):new un(e,t,n,r??1)}function un(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xh(un,VT,Ab(Bs,{brighter(e){return e=e==null?ja:Math.pow(ja,e),new un(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ws:Math.pow(ws,e),new un(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new St(Cc(e>=240?e-240:e+120,i,r),Cc(e,i,r),Cc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new un(Tm(this.h),yl(this.s),yl(this.l),Fa(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=Fa(this.opacity);return`${e===1?"hsl(":"hsla("}${Tm(this.h)}, ${yl(this.s)*100}%, ${yl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tm(e){return e=(e||0)%360,e<0?e+360:e}function yl(e){return Math.max(0,Math.min(1,e||0))}function Cc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Zh=e=>()=>e;function UT(e,t){return function(n){return e+n*t}}function WT(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function GT(e){return(e=+e)==1?Db:function(t,n){return n-t?WT(t,n,e):Zh(isNaN(t)?n:t)}}function Db(e,t){var n=t-e;return n?UT(e,n):Zh(isNaN(e)?t:e)}const Ba=function e(t){var n=GT(t);function r(i,o){var s=n((i=md(i)).r,(o=md(o)).r),l=n(i.g,o.g),a=n(i.b,o.b),u=Db(i.opacity,o.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function YT(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function QT(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qT(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Go(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function XT(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ZT(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Go(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var yd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ac=new RegExp(yd.source,"g");function KT(e){return function(){return e}}function JT(e){return function(t){return e(t)+""}}function Tb(e,t){var n=yd.lastIndex=Ac.lastIndex=0,r,i,o,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=yd.exec(e))&&(i=Ac.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:kn(r,i)})),n=Ac.lastIndex;return n<t.length&&(o=t.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?a[0]?JT(a[0].x):KT(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}function Go(e,t){var n=typeof t,r;return t==null||n==="boolean"?Zh(t):(n==="number"?kn:n==="string"?(r=ni(t))?(t=r,Ba):Tb:t instanceof ni?Ba:t instanceof Date?XT:QT(t)?YT:Array.isArray(t)?qT:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ZT:kn)(e,t)}var Rm=180/Math.PI,vd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rb(e,t,n,r,i,o){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Rm,skewX:Math.atan(a)*Rm,scaleX:s,scaleY:l}}var vl;function eR(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vd:Rb(t.a,t.b,t.c,t.d,t.e,t.f)}function tR(e){return e==null||(vl||(vl=document.createElementNS("http://www.w3.org/2000/svg","g")),vl.setAttribute("transform",e),!(e=vl.transform.baseVal.consolidate()))?vd:(e=e.matrix,Rb(e.a,e.b,e.c,e.d,e.e,e.f))}function Ib(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push("translate(",null,t,null,n);p.push({i:v-4,x:kn(u,f)},{i:v-2,x:kn(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:kn(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function l(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:kn(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function a(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push(i(d)+"scale(",null,",",null,")");p.push({i:v-4,x:kn(u,f)},{i:v-2,x:kn(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),l(u.skewX,c.skewX,f,h),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var p=-1,v=h.length,w;++p<v;)f[(w=h[p]).i]=w.x(d);return f.join("")}}}var nR=Ib(eR,"px, ","px)","deg)"),rR=Ib(tR,", ",")",")"),iR=1e-12;function Im(e){return((e=Math.exp(e))+1/e)/2}function oR(e){return((e=Math.exp(e))-1/e)/2}function sR(e){return((e=Math.exp(2*e))-1)/(e+1)}const Xl=function e(t,n,r){function i(o,s){var l=o[0],a=o[1],u=o[2],c=s[0],f=s[1],h=s[2],d=c-l,p=f-a,v=d*d+p*p,w,g;if(v<iR)g=Math.log(h/u)/t,w=function(k){return[l+k*d,a+k*p,u*Math.exp(t*k*g)]};else{var y=Math.sqrt(v),m=(h*h-u*u+r*v)/(2*u*n*y),x=(h*h-u*u-r*v)/(2*h*n*y),_=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(x*x+1)-x);g=(b-_)/t,w=function(k){var A=k*g,T=Im(_),N=u/(n*y)*(T*sR(t*A+_)-oR(_));return[l+N*d,a+N*p,u*T/Im(t*A+_)]}}return w.duration=g*1e3*t/Math.SQRT2,w}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,a=l*l;return e(s,l,a)},i}(Math.SQRT2,2,4);var to=0,Oo=0,Co=0,Mb=1e3,Ha,Po,$a=0,ri=0,Tu=0,bs=typeof performance=="object"&&performance.now?performance:Date,Ob=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Kh(){return ri||(Ob(lR),ri=bs.now()+Tu)}function lR(){ri=0}function Va(){this._call=this._time=this._next=null}Va.prototype=Pb.prototype={constructor:Va,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Kh():+n)+(t==null?0:+t),!this._next&&Po!==this&&(Po?Po._next=this:Ha=this,Po=this),this._call=e,this._time=n,wd()},stop:function(){this._call&&(this._call=null,this._time=1/0,wd())}};function Pb(e,t,n){var r=new Va;return r.restart(e,t,n),r}function aR(){Kh(),++to;for(var e=Ha,t;e;)(t=ri-e._time)>=0&&e._call.call(void 0,t),e=e._next;--to}function Mm(){ri=($a=bs.now())+Tu,to=Oo=0;try{aR()}finally{to=0,cR(),ri=0}}function uR(){var e=bs.now(),t=e-$a;t>Mb&&(Tu-=t,$a=e)}function cR(){for(var e,t=Ha,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ha=n);Po=e,wd(r)}function wd(e){if(!to){Oo&&(Oo=clearTimeout(Oo));var t=e-ri;t>24?(e<1/0&&(Oo=setTimeout(Mm,e-bs.now()-Tu)),Co&&(Co=clearInterval(Co))):(Co||($a=bs.now(),Co=setInterval(uR,Mb)),to=1,Ob(Mm))}}function Om(e,t,n){var r=new Va;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var fR=Nu("start","end","cancel","interrupt"),dR=[],Lb=0,Pm=1,xd=2,Zl=3,Lm=4,bd=5,Kl=6;function Ru(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;hR(e,n,{name:t,index:r,group:i,on:fR,tween:dR,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Lb})}function Jh(e,t){var n=vn(e,t);if(n.state>Lb)throw new Error("too late; already scheduled");return n}function Tn(e,t){var n=vn(e,t);if(n.state>Zl)throw new Error("too late; already running");return n}function vn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function hR(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Pb(o,0,n.time);function o(u){n.state=Pm,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,h,d;if(n.state!==Pm)return a();for(c in r)if(d=r[c],d.name===n.name){if(d.state===Zl)return Om(s);d.state===Lm?(d.state=Kl,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete r[c]):+c<t&&(d.state=Kl,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete r[c])}if(Om(function(){n.state===Zl&&(n.state=Lm,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=xd,n.on.call("start",e,e.__data__,n.index,n.group),n.state===xd){for(n.state=Zl,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=d);i.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=bd,1),f=-1,h=i.length;++f<h;)i[f].call(e,c);n.state===bd&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Kl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Jl(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>xd&&r.state<bd,r.state=Kl,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function pR(e){return this.each(function(){Jl(this,e)})}function gR(e,t){var n,r;return function(){var i=Tn(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function mR(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Tn(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}o.tween=i}}function yR(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=vn(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?gR:mR)(n,e,t))}function ep(e,t,n){var r=e._id;return e.each(function(){var i=Tn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return vn(i,r).value[t]}}function zb(e,t){var n;return(typeof t=="number"?kn:t instanceof ni?Ba:(n=ni(t))?(t=n,Ba):Tb)(e,t)}function vR(e){return function(){this.removeAttribute(e)}}function wR(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xR(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function bR(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function ER(e,t,n){var r,i,o;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l)))}}function kR(e,t,n){var r,i,o;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l)))}}function _R(e,t){var n=Du(e),r=n==="transform"?rR:zb;return this.attrTween(e,typeof t=="function"?(n.local?kR:ER)(n,r,ep(this,"attr."+e,t)):t==null?(n.local?wR:vR)(n):(n.local?bR:xR)(n,r,t))}function SR(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function CR(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function AR(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&CR(e,o)),n}return i._value=t,i}function NR(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&SR(e,o)),n}return i._value=t,i}function DR(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Du(e);return this.tween(n,(r.local?AR:NR)(r,t))}function TR(e,t){return function(){Jh(this,e).delay=+t.apply(this,arguments)}}function RR(e,t){return t=+t,function(){Jh(this,e).delay=t}}function IR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TR:RR)(t,e)):vn(this.node(),t).delay}function MR(e,t){return function(){Tn(this,e).duration=+t.apply(this,arguments)}}function OR(e,t){return t=+t,function(){Tn(this,e).duration=t}}function PR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?MR:OR)(t,e)):vn(this.node(),t).duration}function LR(e,t){if(typeof t!="function")throw new Error;return function(){Tn(this,e).ease=t}}function zR(e){var t=this._id;return arguments.length?this.each(LR(t,e)):vn(this.node(),t).ease}function jR(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Tn(this,e).ease=n}}function FR(e){if(typeof e!="function")throw new Error;return this.each(jR(this._id,e))}function BR(e){typeof e!="function"&&(e=pb(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],a,u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new Gn(r,this._parents,this._name,this._id)}function HR(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),l=0;l<o;++l)for(var a=t[l],u=n[l],c=a.length,f=s[l]=new Array(c),h,d=0;d<c;++d)(h=a[d]||u[d])&&(f[d]=h);for(;l<r;++l)s[l]=t[l];return new Gn(s,this._parents,this._name,this._id)}function $R(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function VR(e,t,n){var r,i,o=$R(t)?Jh:Tn;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function UR(e,t){var n=this._id;return arguments.length<2?vn(this.node(),n).on.on(e):this.each(VR(n,e,t))}function WR(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GR(){return this.on("end.remove",WR(this._id))}function YR(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Qh(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],a=l.length,u=o[s]=new Array(a),c,f,h=0;h<a;++h)(c=l[h])&&(f=e.call(c,c.__data__,h,l))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,Ru(u[h],t,n,h,u,vn(c,n)));return new Gn(o,this._parents,t,n)}function QR(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hb(e));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var a=r[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var h=e.call(c,c.__data__,f,a),d,p=vn(c,n),v=0,w=h.length;v<w;++v)(d=h[v])&&Ru(d,t,n,v,h,p);o.push(h),s.push(c)}return new Gn(o,s,t,n)}var qR=Fs.prototype.constructor;function XR(){return new qR(this._groups,this._parents)}function ZR(e,t){var n,r,i;return function(){var o=eo(this,e),s=(this.style.removeProperty(e),eo(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function jb(e){return function(){this.style.removeProperty(e)}}function KR(e,t,n){var r,i=n+"",o;return function(){var s=eo(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function JR(e,t,n){var r,i,o;return function(){var s=eo(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),eo(this,e))),s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l))}}function eI(e,t){var n,r,i,o="style."+t,s="end."+o,l;return function(){var a=Tn(this,e),u=a.on,c=a.value[o]==null?l||(l=jb(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(s,i=c),a.on=r}}function tI(e,t,n){var r=(e+="")=="transform"?nR:zb;return t==null?this.styleTween(e,ZR(e,r)).on("end.style."+e,jb(e)):typeof t=="function"?this.styleTween(e,JR(e,r,ep(this,"style."+e,t))).each(eI(this._id,e)):this.styleTween(e,KR(e,r,t),n).on("end.style."+e,null)}function nI(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function rI(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&nI(e,s,n)),r}return o._value=t,o}function iI(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,rI(e,t,n??""))}function oI(e){return function(){this.textContent=e}}function sI(e){return function(){var t=e(this);this.textContent=t??""}}function lI(e){return this.tween("text",typeof e=="function"?sI(ep(this,"text",e)):oI(e==null?"":e+""))}function aI(e){return function(t){this.textContent=e.call(this,t)}}function uI(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&aI(i)),t}return r._value=e,r}function cI(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,uI(e))}function fI(){for(var e=this._name,t=this._id,n=Fb(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=vn(a,t);Ru(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Gn(r,this._parents,e,n)}function dI(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},a={value:function(){--i===0&&o()}};n.each(function(){var u=Tn(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&o()})}var hI=0;function Gn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Fb(){return++hI}var Mn=Fs.prototype;Gn.prototype={constructor:Gn,select:YR,selectAll:QR,selectChild:Mn.selectChild,selectChildren:Mn.selectChildren,filter:BR,merge:HR,selection:XR,transition:fI,call:Mn.call,nodes:Mn.nodes,node:Mn.node,size:Mn.size,empty:Mn.empty,each:Mn.each,on:UR,attr:_R,attrTween:DR,style:tI,styleTween:iI,text:lI,textTween:cI,remove:GR,tween:yR,delay:IR,duration:PR,ease:zR,easeVarying:FR,end:dI,[Symbol.iterator]:Mn[Symbol.iterator]};function pI(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gI={time:null,delay:0,duration:250,ease:pI};function mI(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function yI(e){var t,n;e instanceof Gn?(t=e._id,e=e._name):(t=Fb(),(n=gI).time=Kh(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,a,u=0;u<l;++u)(a=s[u])&&Ru(a,e,t,u,s,n||mI(a,t));return new Gn(r,this._parents,e,t)}Fs.prototype.interrupt=pR;Fs.prototype.transition=yI;const wl=e=>()=>e;function vI(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Bn(e,t,n){this.k=e,this.x=t,this.y=n}Bn.prototype={constructor:Bn,scale:function(e){return e===1?this:new Bn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Bn(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+")"}};var Iu=new Bn(1,0,0);Bb.prototype=Bn.prototype;function Bb(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Iu;return e.__zoom}function Nc(e){e.stopImmediatePropagation()}function Ao(e){e.preventDefault(),e.stopImmediatePropagation()}function wI(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function zm(){return this.__zoom||Iu}function bI(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EI(){return navigator.maxTouchPoints||"ontouchstart"in this}function kI(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function Hb(){var e=wI,t=xI,n=kI,r=bI,i=EI,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=Xl,u=Nu("start","zoom","end"),c,f,h,d=500,p=150,v=0,w=10;function g(S){S.property("__zoom",zm).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",R).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(S,O,P,z){var I=S.selection?S.selection():S;I.property("__zoom",zm),S!==I?_(S,O,P,z):I.interrupt().each(function(){b(this,arguments).event(z).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},g.scaleBy=function(S,O,P,z){g.scaleTo(S,function(){var I=this.__zoom.k,M=typeof O=="function"?O.apply(this,arguments):O;return I*M},P,z)},g.scaleTo=function(S,O,P,z){g.transform(S,function(){var I=t.apply(this,arguments),M=this.__zoom,E=P==null?x(I):typeof P=="function"?P.apply(this,arguments):P,B=M.invert(E),H=typeof O=="function"?O.apply(this,arguments):O;return n(m(y(M,H),E,B),I,s)},P,z)},g.translateBy=function(S,O,P,z){g.transform(S,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,z)},g.translateTo=function(S,O,P,z,I){g.transform(S,function(){var M=t.apply(this,arguments),E=this.__zoom,B=z==null?x(M):typeof z=="function"?z.apply(this,arguments):z;return n(Iu.translate(B[0],B[1]).scale(E.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof P=="function"?-P.apply(this,arguments):-P),M,s)},z,I)};function y(S,O){return O=Math.max(o[0],Math.min(o[1],O)),O===S.k?S:new Bn(O,S.x,S.y)}function m(S,O,P){var z=O[0]-P[0]*S.k,I=O[1]-P[1]*S.k;return z===S.x&&I===S.y?S:new Bn(S.k,z,I)}function x(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function _(S,O,P,z){S.on("start.zoom",function(){b(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(z).end()}).tween("zoom",function(){var I=this,M=arguments,E=b(I,M).event(z),B=t.apply(I,M),H=P==null?x(B):typeof P=="function"?P.apply(I,M):P,D=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Y=I.__zoom,ne=typeof O=="function"?O.apply(I,M):O,J=a(Y.invert(H).concat(D/Y.k),ne.invert(H).concat(D/ne.k));return function(ee){if(ee===1)ee=ne;else{var G=J(ee),Z=D/G[2];ee=new Bn(Z,H[0]-G[0]*Z,H[1]-G[1]*Z)}E.zoom(null,ee)}})}function b(S,O,P){return!P&&S.__zooming||new k(S,O)}function k(S,O){this.that=S,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(S,O),this.taps=0}k.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,O){return this.mouse&&S!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var O=Ot(this.that).datum();u.call(S,this.that,new vI(S,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:u}),O)}};function A(S,...O){if(!e.apply(this,arguments))return;var P=b(this,O).event(S),z=this.__zoom,I=Math.max(o[0],Math.min(o[1],z.k*Math.pow(2,r.apply(this,arguments)))),M=ln(S);if(P.wheel)(P.mouse[0][0]!==M[0]||P.mouse[0][1]!==M[1])&&(P.mouse[1]=z.invert(P.mouse[0]=M)),clearTimeout(P.wheel);else{if(z.k===I)return;P.mouse=[M,z.invert(M)],Jl(this),P.start()}Ao(S),P.wheel=setTimeout(E,p),P.zoom("mouse",n(m(y(z,I),P.mouse[0],P.mouse[1]),P.extent,s));function E(){P.wheel=null,P.end()}}function T(S,...O){if(h||!e.apply(this,arguments))return;var P=S.currentTarget,z=b(this,O,!0).event(S),I=Ot(S.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",D,!0),M=ln(S,P),E=S.clientX,B=S.clientY;_b(S.view),Nc(S),z.mouse=[M,this.__zoom.invert(M)],Jl(this),z.start();function H(Y){if(Ao(Y),!z.moved){var ne=Y.clientX-E,J=Y.clientY-B;z.moved=ne*ne+J*J>v}z.event(Y).zoom("mouse",n(m(z.that.__zoom,z.mouse[0]=ln(Y,P),z.mouse[1]),z.extent,s))}function D(Y){I.on("mousemove.zoom mouseup.zoom",null),Sb(Y.view,z.moved),Ao(Y),z.event(Y).end()}}function N(S,...O){if(e.apply(this,arguments)){var P=this.__zoom,z=ln(S.changedTouches?S.changedTouches[0]:S,this),I=P.invert(z),M=P.k*(S.shiftKey?.5:2),E=n(m(y(P,M),z,I),t.apply(this,O),s);Ao(S),l>0?Ot(this).transition().duration(l).call(_,E,z,S):Ot(this).call(g.transform,E,z,S)}}function R(S,...O){if(e.apply(this,arguments)){var P=S.touches,z=P.length,I=b(this,O,S.changedTouches.length===z).event(S),M,E,B,H;for(Nc(S),E=0;E<z;++E)B=P[E],H=ln(B,this),H=[H,this.__zoom.invert(H),B.identifier],I.touch0?!I.touch1&&I.touch0[2]!==H[2]&&(I.touch1=H,I.taps=0):(I.touch0=H,M=!0,I.taps=1+!!c);c&&(c=clearTimeout(c)),M&&(I.taps<2&&(f=H[0],c=setTimeout(function(){c=null},d)),Jl(this),I.start())}}function j(S,...O){if(this.__zooming){var P=b(this,O).event(S),z=S.changedTouches,I=z.length,M,E,B,H;for(Ao(S),M=0;M<I;++M)E=z[M],B=ln(E,this),P.touch0&&P.touch0[2]===E.identifier?P.touch0[0]=B:P.touch1&&P.touch1[2]===E.identifier&&(P.touch1[0]=B);if(E=P.that.__zoom,P.touch1){var D=P.touch0[0],Y=P.touch0[1],ne=P.touch1[0],J=P.touch1[1],ee=(ee=ne[0]-D[0])*ee+(ee=ne[1]-D[1])*ee,G=(G=J[0]-Y[0])*G+(G=J[1]-Y[1])*G;E=y(E,Math.sqrt(ee/G)),B=[(D[0]+ne[0])/2,(D[1]+ne[1])/2],H=[(Y[0]+J[0])/2,(Y[1]+J[1])/2]}else if(P.touch0)B=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(m(E,B,H),P.extent,s))}}function F(S,...O){if(this.__zooming){var P=b(this,O).event(S),z=S.changedTouches,I=z.length,M,E;for(Nc(S),h&&clearTimeout(h),h=setTimeout(function(){h=null},d),M=0;M<I;++M)E=z[M],P.touch0&&P.touch0[2]===E.identifier?delete P.touch0:P.touch1&&P.touch1[2]===E.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(E=ln(E,this),Math.hypot(f[0]-E[0],f[1]-E[1])<w)){var B=Ot(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return g.wheelDelta=function(S){return arguments.length?(r=typeof S=="function"?S:wl(+S),g):r},g.filter=function(S){return arguments.length?(e=typeof S=="function"?S:wl(!!S),g):e},g.touchable=function(S){return arguments.length?(i=typeof S=="function"?S:wl(!!S),g):i},g.extent=function(S){return arguments.length?(t=typeof S=="function"?S:wl([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),g):t},g.scaleExtent=function(S){return arguments.length?(o[0]=+S[0],o[1]=+S[1],g):[o[0],o[1]]},g.translateExtent=function(S){return arguments.length?(s[0][0]=+S[0][0],s[1][0]=+S[1][0],s[0][1]=+S[0][1],s[1][1]=+S[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(S){return arguments.length?(n=S,g):n},g.duration=function(S){return arguments.length?(l=+S,g):l},g.interpolate=function(S){return arguments.length?(a=S,g):a},g.on=function(){var S=u.on.apply(u,arguments);return S===u?g:S},g.clickDistance=function(S){return arguments.length?(v=(S=+S)*S,g):Math.sqrt(v)},g.tapDistance=function(S){return arguments.length?(w=+S,g):w},g}const mn={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Es=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$b=["Enter"," ","Escape"],Vb={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var no;(function(e){e.Strict="strict",e.Loose="loose"})(no||(no={}));var qr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(qr||(qr={}));var ks;(function(e){e.Partial="partial",e.Full="full"})(ks||(ks={}));const Ub={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var sr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(sr||(sr={}));var Ua;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ua||(Ua={}));var se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(se||(se={}));const jm={[se.Left]:se.Right,[se.Right]:se.Left,[se.Top]:se.Bottom,[se.Bottom]:se.Top};function Wb(e){return e===null?null:e?"valid":"invalid"}const Gb=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,_I=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),tp=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Hs=(e,t=[0,0])=>{const{width:n,height:r}=Rn(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},SI=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):tp(i)?i:t.nodeLookup.get(i.id));const l=s?Wa(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Mu(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ou(n)},$s=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Mu(n,Wa(i)),r=!0)}),r?Ou(n):{x:0,y:0,width:0,height:0}},np=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const l=(t.x-n)/i,a=(t.y-r)/i,u=t.width/i,c=t.height/i,f=[];for(const h of e.values()){const{measured:d,selectable:p=!0,hidden:v=!1}=h;if(s&&!p||v)continue;const w=d.width??h.width??h.initialWidth??0,g=d.height??h.height??h.initialHeight??0,{x:y,y:m}=h.internals.positionAbsolute,x=Xb(l,a,u,c,y,m,w,g),_=w*g,b=o&&x>0;(!h.internals.handleBounds||b||x>=_||h.dragging)&&f.push(h)}return f},CI=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function AI(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{let o;if(t!=null&&t.includeHiddenNodes){const{width:s,height:l}=Rn(i);o=s>0&&l>0}else o=!!(i.measured.width&&i.measured.height&&!i.hidden);o&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function NI({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return!0;const l=AI(e,s),a=$s(l),u=ip(a,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),!0}function Yb({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=s.origin??r;let f=s.extent||i;if(s.extent==="parent"&&!s.expandParent)if(!l)o==null||o("005",mn.error005());else{const d=l.measured.width,p=l.measured.height;d&&p&&(f=[[a,u],[a+d,u+p]])}else l&&oi(s.extent)&&(f=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const h=oi(f)?ii(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(o==null||o("015",mn.error015())),{position:{x:h.x-a+(s.measured.width??0)*c[0],y:h.y-u+(s.measured.height??0)*c[1]},positionAbsolute:h}}async function DI({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(h=>h.id)),s=[];for(const h of n){if(h.deletable===!1)continue;const d=o.has(h.id),p=!d&&h.parentId&&s.find(v=>v.id===h.parentId);(d||p)&&s.push(h)}const l=new Set(t.map(h=>h.id)),a=r.filter(h=>h.deletable!==!1),c=CI(s,a);for(const h of a)l.has(h.id)&&!c.find(p=>p.id===h.id)&&c.push(h);if(!i)return{edges:c,nodes:s};const f=await i({nodes:s,edges:c});return typeof f=="boolean"?f?{edges:c,nodes:s}:{edges:[],nodes:[]}:f}const ro=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ii=(e={x:0,y:0},t,n)=>({x:ro(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ro(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Qb(e,t,n){const{width:r,height:i}=Rn(n),{x:o,y:s}=n.internals.positionAbsolute;return ii(e,[[o,s],[o+r,s+i]],t)}const Fm=(e,t,n)=>e<t?ro(Math.abs(e-t),1,t)/t:e>n?-ro(Math.abs(e-n),1,t)/t:0,rp=(e,t,n=15,r=40)=>{const i=Fm(e.x,r,t.width-r)*n,o=Fm(e.y,r,t.height-r)*n;return[i,o]},Mu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ed=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ou=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),_s=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=tp(e)?e.internals.positionAbsolute:Hs(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Wa=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=tp(e)?e.internals.positionAbsolute:Hs(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},qb=(e,t)=>Ou(Mu(Ed(e),Ed(t))),Xb=(e,t,n,r,i,o,s,l)=>{const a=Math.max(0,Math.min(e+n,i+s)-Math.max(e,i)),u=Math.max(0,Math.min(t+r,o+l)-Math.max(t,o));return Math.ceil(a*u)},Ga=(e,t)=>Xb(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Bm=e=>cn(e.width)&&cn(e.height)&&cn(e.x)&&cn(e.y),cn=e=>!isNaN(e)&&isFinite(e),Zb=(e,t)=>(n,r)=>{},Vs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Us=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?Vs(l,s):l},io=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function xi(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function TI(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=xi(e,n),i=xi(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=xi(e.top??e.y??0,n),i=xi(e.bottom??e.y??0,n),o=xi(e.left??e.x??0,t),s=xi(e.right??e.x??0,t);return{top:r,right:s,bottom:i,left:o,x:o+s,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function RI(e,t,n,r,i,o){const{x:s,y:l}=io(e,[t,n,r]),{x:a,y:u}=io({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=i-a,f=o-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}const ip=(e,t,n,r,i,o)=>{const s=TI(o,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=ro(u,r,i),f=e.x+e.width/2,h=e.y+e.height/2,d=t/2-f*c,p=n/2-h*c,v=RI(e,d,p,c,t,n),w={left:Math.min(v.left-s.left,0),top:Math.min(v.top-s.top,0),right:Math.min(v.right-s.right,0),bottom:Math.min(v.bottom-s.bottom,0)};return{x:d-w.left+w.right,y:p-w.top+w.bottom,zoom:c}},Ss=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function oi(e){return e!=null&&e!=="parent"}function Rn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Kb(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Jb(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const l=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return o}function Hm(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function II(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function MI(e){return{...Vb,...e||{}}}function Yo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=fn(e),l=Us({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:a,y:u}=n?Vs(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const op=e=>({width:e.offsetWidth,height:e.offsetHeight}),eE=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},OI=["INPUT","SELECT","TEXTAREA"];function tE(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:OI.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const nE=e=>"clientX"in e,fn=(e,t)=>{var o,s;const n=nE(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},$m=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...op(s)}})};function rE({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:l}){const a=e*.125+i*.375+s*.375+n*.125,u=t*.125+o*.375+l*.375+r*.125,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}function xl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Vm({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case se.Left:return[t-xl(t-r,o),n];case se.Right:return[t+xl(r-t,o),n];case se.Top:return[t,n-xl(n-i,o)];case se.Bottom:return[t,n+xl(i-n,o)]}}function iE({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:o=se.Top,curvature:s=.25}){const[l,a]=Vm({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[u,c]=Vm({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[f,h,d,p]=rE({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${a} ${u},${c} ${r},${i}`,f,h,d,p]}function oE({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[o,l,i,s]}function PI({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const s=i&&n?r+1e3:r,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return s+l}function LI({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=Mu(Wa(e),Wa(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Ga(s,Ou(o))>0}const zI=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,jI=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),FI=(e,t,n={})=>{var o;if(!e.source||!e.target)return(o=n.onError)==null||o.call(n,"006",mn.error006()),t;const r=n.getEdgeId||zI;let i;return Gb(e)?i={...e}:i={...e,id:r(e)},jI(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function sE({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,l]=oE({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,l]}const Um={[se.Left]:{x:-1,y:0},[se.Right]:{x:1,y:0},[se.Top]:{x:0,y:-1},[se.Bottom]:{x:0,y:1}},BI=({source:e,sourcePosition:t=se.Bottom,target:n})=>t===se.Left||t===se.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Wm=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function HI({source:e,sourcePosition:t=se.Bottom,target:n,targetPosition:r=se.Top,center:i,offset:o,stepPosition:s}){const l=Um[t],a=Um[r],u={x:e.x+l.x*o,y:e.y+l.y*o},c={x:n.x+a.x*o,y:n.y+a.y*o},f=BI({source:u,sourcePosition:t,target:c}),h=f.x!==0?"x":"y",d=f[h];let p=[],v,w;const g={x:0,y:0},y={x:0,y:0},[,,m,x]=oE({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[h]*a[h]===-1){h==="x"?(v=i.x??u.x+(c.x-u.x)*s,w=i.y??(u.y+c.y)/2):(v=i.x??(u.x+c.x)/2,w=i.y??u.y+(c.y-u.y)*s);const A=[{x:v,y:u.y},{x:v,y:c.y}],T=[{x:u.x,y:w},{x:c.x,y:w}];l[h]===d?p=h==="x"?A:T:p=h==="x"?T:A}else{const A=[{x:u.x,y:c.y}],T=[{x:c.x,y:u.y}];if(h==="x"?p=l.x===d?T:A:p=l.y===d?A:T,t===r){const S=Math.abs(e[h]-n[h]);if(S<=o){const O=Math.min(o-1,o-S);l[h]===d?g[h]=(u[h]>e[h]?-1:1)*O:y[h]=(c[h]>n[h]?-1:1)*O}}if(t!==r){const S=h==="x"?"y":"x",O=l[h]===a[S],P=u[S]>c[S],z=u[S]<c[S];(l[h]===1&&(!O&&P||O&&z)||l[h]!==1&&(!O&&z||O&&P))&&(p=h==="x"?A:T)}const N={x:u.x+g.x,y:u.y+g.y},R={x:c.x+y.x,y:c.y+y.y},j=Math.max(Math.abs(N.x-p[0].x),Math.abs(R.x-p[0].x)),F=Math.max(Math.abs(N.y-p[0].y),Math.abs(R.y-p[0].y));j>=F?(v=(N.x+R.x)/2,w=p[0].y):(v=p[0].x,w=(N.y+R.y)/2)}const _={x:u.x+g.x,y:u.y+g.y},b={x:c.x+y.x,y:c.y+y.y};return[[e,..._.x!==p[0].x||_.y!==p[0].y?[_]:[],...p,...b.x!==p[p.length-1].x||b.y!==p[p.length-1].y?[b]:[],n],v,w,m,x]}function $I(e,t,n,r){const i=Math.min(Wm(e,t)/2,Wm(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${o+i*u},${s}Q ${o},${s} ${o},${s+i*c}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${o},${s+i*a}Q ${o},${s} ${o+i*l},${s}`}function kd({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:o=se.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:c=.5}){const[f,h,d,p,v]=HI({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:l,y:a},offset:u,stepPosition:c});let w=`M${f[0].x} ${f[0].y}`;for(let g=1;g<f.length-1;g++)w+=$I(f[g-1],f[g],f[g+1],s);return w+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[w,h,d,p,v]}function Gm(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function VI(e){var f;const{sourceNode:t,targetNode:n}=e;if(!Gm(t)||!Gm(n))return null;const r=t.internals.handleBounds||Ym(t.handles),i=n.internals.handleBounds||Ym(n.handles),o=Qm((r==null?void 0:r.source)??[],e.sourceHandle),s=Qm(e.connectionMode===no.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(f=e.onError)==null||f.call(e,"008",mn.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(o==null?void 0:o.position)||se.Bottom,a=(s==null?void 0:s.position)||se.Top,u=si(t,o,l),c=si(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:a}}function Ym(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function si(e,t,n=se.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Rn(e);if(r)return{x:i+s/2,y:o+l/2};switch((t==null?void 0:t.position)??n){case se.Top:return{x:i+s/2,y:o};case se.Right:return{x:i+s,y:o+l/2};case se.Bottom:return{x:i+s/2,y:o+l};case se.Left:return{x:i,y:o+l/2}}}function Qm(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _d(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function UI(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||i].forEach(a=>{if(a&&typeof a=="object"){const u=_d(a,t);o.has(u)||(s.push({id:u,color:a.color||n,...a}),o.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const lE=1e3,WI=10,sp={nodeOrigin:[0,0],nodeExtent:Es,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},GI={...sp,checkEquality:!0};function lp(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function YI(e,t,n){const r=lp(sp,n);for(const i of e.values())if(i.parentId)up(i,e,t,r);else{const o=Hs(i,r.nodeOrigin),s=oi(i.extent)?i.extent:r.nodeExtent,l=ii(o,s,Rn(i));i.internals.positionAbsolute=l}}function QI(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const o={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(o):i.type==="target"&&r.push(o)}return{source:n,target:r}}function ap(e){return e==="manual"}function Sd(e,t,n,r={}){var c,f;const i=lp(GI,r),o={i:0},s=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!ap(i.zIndexMode)?lE:0;let a=e.length>0,u=!1;t.clear(),n.clear();for(const h of e){let d=s.get(h.id);if(i.checkEquality&&h===(d==null?void 0:d.internals.userNode))t.set(h.id,d);else{const p=Hs(h,i.nodeOrigin),v=oi(h.extent)?h.extent:i.nodeExtent,w=ii(p,v,Rn(h));d={...i.defaults,...h,measured:{width:(c=h.measured)==null?void 0:c.width,height:(f=h.measured)==null?void 0:f.height},internals:{positionAbsolute:w,handleBounds:QI(h,d),z:aE(h,l,i.zIndexMode),userNode:h}},t.set(h.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(a=!1),h.parentId&&up(d,t,n,r,o),u||(u=h.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function qI(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function up(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=lp(sp,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}qI(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&a==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*WI),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);const f=o&&!ap(a)?lE:0,{x:h,y:d,z:p}=XI(e,c,s,l,f,a),{positionAbsolute:v}=e.internals,w=h!==v.x||d!==v.y;(w||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:w?{x:h,y:d}:v,z:p}})}function aE(e,t,n){const r=cn(e.zIndex)?e.zIndex:0;return ap(n)?r:r+(e.selected?t:0)}function XI(e,t,n,r,i,o){const{x:s,y:l}=t.internals.positionAbsolute,a=Rn(e),u=Hs(e,n),c=oi(e.extent)?ii(u,e.extent,a):u;let f=ii({x:s+c.x,y:l+c.y},r,a);e.extent==="parent"&&(f=Qb(f,a,t));const h=aE(e,i,o),d=t.internals.z??0;return{x:f.x,y:f.y,z:d>=h?d+1:h}}function cp(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((s=o.get(l.parentId))==null?void 0:s.expandedRect)??_s(a),c=qb(u,l.rect);o.set(l.parentId,{expandedRect:c,parent:a})}return o.size>0&&o.forEach(({expandedRect:l,parent:a},u)=>{var m;const c=a.internals.positionAbsolute,f=Rn(a),h=a.origin??r,d=l.x<c.x?Math.round(Math.abs(c.x-l.x)):0,p=l.y<c.y?Math.round(Math.abs(c.y-l.y)):0,v=Math.max(f.width,Math.round(l.width)),w=Math.max(f.height,Math.round(l.height)),g=(v-f.width)*h[0],y=(w-f.height)*h[1];(d>0||p>0||g||y)&&(i.push({id:u,type:"position",position:{x:a.position.x-d+g,y:a.position.y-p+y}}),(m=n.get(u))==null||m.forEach(x=>{e.some(_=>_.id===x.id)||i.push({id:x.id,type:"position",position:{x:x.position.x+d,y:x.position.y+p}})})),(f.width<l.width||f.height<l.height||d||p)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:v+(d?h[0]*d-g:0),height:w+(p?h[1]*p-y:0)}})}),i}function ZI(e,t,n,r,i,o,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],c=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(c.transform),h=[];for(const d of e.values()){const p=t.get(d.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),a=!0;continue}const v=op(d.nodeElement),w=p.measured.width!==v.width||p.measured.height!==v.height;if(!!(v.width&&v.height&&(w||!p.internals.handleBounds||d.force))){const y=d.nodeElement.getBoundingClientRect(),m=oi(p.extent)?p.extent:o;let{positionAbsolute:x}=p.internals;if(p.parentId&&p.extent==="parent"){const b=t.get(p.parentId);b&&(x=Qb(x,v,b))}else m&&(x=ii(x,m,v));const _={...p,measured:v,internals:{...p.internals,positionAbsolute:x,handleBounds:{source:$m("source",d.nodeElement,y,f,p.id),target:$m("target",d.nodeElement,y,f,p.id)}}};t.set(p.id,_),p.parentId&&up(_,t,n,{nodeOrigin:i,zIndexMode:s}),a=!0,w&&(u.push({id:p.id,type:"dimensions",dimensions:v}),p.expandParent&&p.parentId&&h.push({id:p.id,parentId:p.parentId,rect:_s(_,i)}))}}if(h.length>0){const d=cp(h,t,n,i);u.push(...d)}return{changes:u,updatedInternals:a}}async function KI({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function qm(e,t,n,r,i,o){let s=i;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${i}-${e}`;const a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),o){s=`${i}-${e}-${o}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function uE(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:l},u=`${i}-${s}--${o}-${l}`,c=`${o}-${l}--${i}-${s}`;qm("source",a,c,e,i,s),qm("target",a,u,e,o,l),t.set(r.id,r)}}function cE(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:cE(n,t):!1}function Xm(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function JI(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!cE(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(o);l&&i.set(o,{id:o,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function Dc({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const i=[];for(const[u,c]of t){const f=(s=n.get(u))==null?void 0:s.internals.userNode;f&&i.push({...f,position:c.position,dragging:r})}if(!e)return[i[0],i];const o=(l=n.get(e))==null?void 0:l.internals.userNode;return[o?{...o,position:((a=t.get(e))==null?void 0:a.position)||o.position,dragging:r}:i[0],i]}function eM({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const o={x:n-i.distance.x,y:r-i.distance.y},s=Vs(o,t);return{x:s.x-o.x,y:s.y-o.y}}function tM({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},c=null,f=!1,h=null,d=!1,p=!1,v=null;function w({noDragClassName:y,handleSelector:m,domNode:x,isSelectable:_,nodeId:b,nodeClickDistance:k=0}){h=Ot(x);function A({x:j,y:F}){const{nodeLookup:S,nodeExtent:O,snapGrid:P,snapToGrid:z,nodeOrigin:I,onNodeDrag:M,onSelectionDrag:E,onError:B,updateNodePositions:H}=t();o={x:j,y:F};let D=!1;const Y=l.size>1,ne=Y&&O?Ed($s(l)):null,J=Y&&z?eM({dragItems:l,snapGrid:P,x:j,y:F}):null;for(const[ee,G]of l){if(!S.has(ee))continue;let Z={x:j-G.distance.x,y:F-G.distance.y};z&&(Z=J?{x:Math.round(Z.x+J.x),y:Math.round(Z.y+J.y)}:Vs(Z,P));let le=null;if(Y&&O&&!G.extent&&ne){const{positionAbsolute:ie}=G.internals,ge=ie.x-ne.x+O[0][0],me=ie.x+G.measured.width-ne.x2+O[1][0],ce=ie.y-ne.y+O[0][1],Ae=ie.y+G.measured.height-ne.y2+O[1][1];le=[[ge,ce],[me,Ae]]}const{position:oe,positionAbsolute:re}=Yb({nodeId:ee,nextPosition:Z,nodeLookup:S,nodeExtent:le||O,nodeOrigin:I,onError:B});D=D||G.position.x!==oe.x||G.position.y!==oe.y,G.position=oe,G.internals.positionAbsolute=re}if(p=p||D,!!D&&(H(l,!0),v&&(r||M||!b&&E))){const[ee,G]=Dc({nodeId:b,dragItems:l,nodeLookup:S});r==null||r(v,l,ee,G),M==null||M(v,ee,G),b||E==null||E(v,G)}}async function T(){if(!c)return;const{transform:j,panBy:F,autoPanSpeed:S,autoPanOnNodeDrag:O}=t();if(!O){a=!1,cancelAnimationFrame(s);return}const[P,z]=rp(u,c,S);(P!==0||z!==0)&&(o.x=(o.x??0)-P/j[2],o.y=(o.y??0)-z/j[2],await F({x:P,y:z})&&A(o)),s=requestAnimationFrame(T)}function N(j){var Y;const{nodeLookup:F,multiSelectionActive:S,nodesDraggable:O,transform:P,snapGrid:z,snapToGrid:I,selectNodesOnDrag:M,onNodeDragStart:E,onSelectionDragStart:B,unselectNodesAndEdges:H}=t();f=!0,(!M||!_)&&!S&&b&&((Y=F.get(b))!=null&&Y.selected||H()),_&&M&&b&&(e==null||e(b));const D=Yo(j.sourceEvent,{transform:P,snapGrid:z,snapToGrid:I,containerBounds:c});if(o=D,l=JI(F,O,D,b),l.size>0&&(n||E||!b&&B)){const[ne,J]=Dc({nodeId:b,dragItems:l,nodeLookup:F});n==null||n(j.sourceEvent,l,ne,J),E==null||E(j.sourceEvent,ne,J),b||B==null||B(j.sourceEvent,J)}}const R=Cb().clickDistance(k).on("start",j=>{const{domNode:F,nodeDragThreshold:S,transform:O,snapGrid:P,snapToGrid:z}=t();c=(F==null?void 0:F.getBoundingClientRect())||null,d=!1,p=!1,v=j.sourceEvent,S===0&&N(j),o=Yo(j.sourceEvent,{transform:O,snapGrid:P,snapToGrid:z,containerBounds:c}),u=fn(j.sourceEvent,c)}).on("drag",j=>{const{autoPanOnNodeDrag:F,transform:S,snapGrid:O,snapToGrid:P,nodeDragThreshold:z,nodeLookup:I}=t(),M=Yo(j.sourceEvent,{transform:S,snapGrid:O,snapToGrid:P,containerBounds:c});if(v=j.sourceEvent,(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1||b&&!I.has(b))&&(d=!0),!d){if(!a&&F&&f&&(a=!0,T()),!f){const E=fn(j.sourceEvent,c),B=E.x-u.x,H=E.y-u.y;Math.sqrt(B*B+H*H)>z&&N(j)}(o.x!==M.xSnapped||o.y!==M.ySnapped)&&l&&f&&(u=fn(j.sourceEvent,c),A(M))}}).on("end",j=>{if(!f||d){d&&l.size>0&&t().updateNodePositions(l,!1);return}if(a=!1,f=!1,cancelAnimationFrame(s),l.size>0){const{nodeLookup:F,updateNodePositions:S,onNodeDragStop:O,onSelectionDragStop:P}=t();if(p&&(S(l,!1),p=!1),i||O||!b&&P){const[z,I]=Dc({nodeId:b,dragItems:l,nodeLookup:F,dragging:!1});i==null||i(j.sourceEvent,l,z,I),O==null||O(j.sourceEvent,z,I),b||P==null||P(j.sourceEvent,I)}}}).filter(j=>{const F=j.target;return!j.button&&(!y||!Xm(F,`.${y}`,x))&&(!m||Xm(F,m,x))});h.call(R)}function g(){h==null||h.on(".drag",null)}return{update:w,destroy:g}}function nM(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Ga(i,_s(o))>0&&r.push(o);return r}const rM=250;function iM(e,t,n,r){var l,a;let i=[],o=1/0;const s=nM(e,n,t+rM);for(const u of s){const c=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const f of c){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:h,y:d}=si(u,f,f.position,!0),p=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(d-e.y,2));p>t||(p<o?(i=[{...f,x:h,y:d}],o=p):p===o&&i.push({...f,x:h,y:d}))}}if(!i.length)return null;if(i.length>1){const u=r.type==="source"?"target":"source";return i.find(c=>c.type===u)??i[0]}return i[0]}function fE(e,t,n,r,i,o=!1){var u,c,f;const s=r.get(e);if(!s)return null;const l=i==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((c=s.internals.handleBounds)==null?void 0:c.source)??[],...((f=s.internals.handleBounds)==null?void 0:f.target)??[]],a=(n?l==null?void 0:l.find(h=>h.id===n):l==null?void 0:l[0])??null;return a&&o?{...a,...si(s,a,a.position,!0)}:a}function dE(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function oM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const hE=()=>!0;function sM(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:c,flowId:f,panBy:h,cancelConnection:d,onConnectStart:p,onConnect:v,onConnectEnd:w,isValidConnection:g=hE,onReconnectEnd:y,updateConnection:m,getTransform:x,getFromHandle:_,autoPanSpeed:b,dragThreshold:k=1,handleDomNode:A}){const T=eE(e.target);let N=0,R;const{x:j,y:F}=fn(e),S=dE(o,A),O=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!O||!S)return;const z=fE(i,S,r,a,t);if(!z)return;let I=fn(e,O),M=!1,E=null,B=!1,H=null;function D(){if(!c||!O)return;const[oe,re]=rp(I,O,b);h({x:oe,y:re}),N=requestAnimationFrame(D)}const Y={...z,nodeId:i,type:S,position:z.position},ne=a.get(i);let ee={inProgress:!0,isValid:null,from:si(ne,Y,se.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:ne,to:I,toHandle:null,toPosition:jm[Y.position],toNode:null,pointer:I};function G(){P=!0,m(ee),p==null||p(e,{nodeId:i,handleId:r,handleType:S})}k===0&&G();function Z(oe){if(!P){const{x:Ae,y:Je}=fn(oe),ht=Ae-j,pt=Je-F;if(!(ht*ht+pt*pt>k*k))return;G()}if(!_()||!Y){le(oe);return}const re=x();I=fn(oe,O),R=iM(Us(I,re,!1,[1,1]),n,a,Y),M||(D(),M=!0);const ie=pE(oe,{handle:R,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:g,doc:T,lib:u,flowId:f,nodeLookup:a});H=ie.handleDomNode,E=ie.connection,B=oM(!!R,ie.isValid);const ge=a.get(i),me=ge?si(ge,Y,se.Left,!0):ee.from,ce={...ee,from:me,isValid:B,to:ie.toHandle&&B?io({x:ie.toHandle.x,y:ie.toHandle.y},re):I,toHandle:ie.toHandle,toPosition:B&&ie.toHandle?ie.toHandle.position:jm[Y.position],toNode:ie.toHandle?a.get(ie.toHandle.nodeId):null,pointer:I};m(ce),ee=ce}function le(oe){if(!("touches"in oe&&oe.touches.length>0)){if(P){(R||H)&&E&&B&&(v==null||v(E));const{inProgress:re,...ie}=ee,ge={...ie,toPosition:ee.toHandle?ee.toPosition:null};w==null||w(oe,ge),o&&(y==null||y(oe,ge))}d(),cancelAnimationFrame(N),M=!1,B=!1,E=null,H=null,T.removeEventListener("mousemove",Z),T.removeEventListener("mouseup",le),T.removeEventListener("touchmove",Z),T.removeEventListener("touchend",le)}}T.addEventListener("mousemove",Z),T.addEventListener("mouseup",le),T.addEventListener("touchmove",Z),T.addEventListener("touchend",le)}function pE(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:l,flowId:a,isValidConnection:u=hE,nodeLookup:c}){const f=o==="target",h=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:d,y:p}=fn(e),v=s.elementFromPoint(d,p),w=v!=null&&v.classList.contains(`${l}-flow__handle`)?v:h,g={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const y=dE(void 0,w),m=w.getAttribute("data-nodeid"),x=w.getAttribute("data-handleid"),_=w.classList.contains("connectable"),b=w.classList.contains("connectableend");if(!m||!y)return g;const k={source:f?m:r,sourceHandle:f?x:i,target:f?r:m,targetHandle:f?i:x};g.connection=k;const T=_&&b&&(n===no.Strict?f&&y==="source"||!f&&y==="target":m!==r||x!==i);g.isValid=T&&u(k),g.toHandle=fE(m,y,x,c,n,!0)}return g}const Cd={onPointerDown:sM,isValid:pE};function lM({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Ot(e);function o({translateExtent:l,width:a,height:u,zoomStep:c=1,pannable:f=!0,zoomable:h=!0,inversePan:d=!1}){const p=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;const x=n(),_=m.sourceEvent.ctrlKey&&Ss()?10:1,b=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,k=x[2]*Math.pow(2,b*_);t.scaleTo(k)};let v=[0,0];const w=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(v=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},g=m=>{const x=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;const _=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],b=[_[0]-v[0],_[1]-v[1]];v=_;const k=r()*Math.max(x[2],Math.log(x[2]))*(d?-1:1),A={x:x[0]-b[0]*k,y:x[1]-b[1]*k},T=[[0,0],[a,u]];t.setViewportConstrained({x:A.x,y:A.y,zoom:x[2]},T,l)},y=Hb().on("start",w).on("zoom",f?g:null).on("zoom.wheel",h?p:null);i.call(y,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:ln}}const Pu=e=>({x:e.x,y:e.y,zoom:e.k}),Tc=({x:e,y:t,zoom:n})=>Iu.translate(e,t).scale(n),Pi=(e,t)=>e.target.closest(`.${t}`),gE=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),aM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Rc=(e,t=0,n=aM,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},mE=e=>{const t=e.ctrlKey&&Ss()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function uM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return c=>{if(Pi(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(c.ctrlKey&&s){const w=ln(c),g=mE(c),y=f*Math.pow(2,g);r.scaleTo(n,y,w,c);return}const h=c.deltaMode===1?20:1;let d=i===qr.Vertical?0:c.deltaX*h,p=i===qr.Horizontal?0:c.deltaY*h;!Ss()&&c.shiftKey&&i!==qr.Vertical&&(d=c.deltaY*h,p=0),r.translateBy(n,-(d/f)*o,-(p/f)*o,{internal:!0});const v=Pu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?a==null||a(c,v):(e.isPanScrolling=!0,l==null||l(c,v)),e.panScrollTimeout=setTimeout(()=>{u==null||u(c,v),e.isPanScrolling=!1},150)}}function cM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",s=!t&&o&&!r.ctrlKey,l=Pi(r,e);if(r.ctrlKey&&o&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,i)}}function fM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,l;if((o=r.sourceEvent)!=null&&o.internal)return;const i=Pu(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function dM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,l;e.usedRightMouseButton=!!(n&&gE(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((l=o.sourceEvent)!=null&&l.internal)&&(i==null||i(o.sourceEvent,Pu(o.transform)))}}function hM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,o&&gE(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const a=Pu(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,a)},n?150:0)}}}function pM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:c}){return f=>{var w;const h=e||t,d=n&&f.ctrlKey,p=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Pi(f,`${u}-flow__node`)||Pi(f,`${u}-flow__edge`)))return!0;if(!r&&!h&&!i&&!o&&!n||s||c&&!p||Pi(f,l)&&p||Pi(f,a)&&(!p||i&&p&&!e)||!n&&f.ctrlKey&&p)return!1;if(!n&&f.type==="touchstart"&&((w=f.touches)==null?void 0:w.length)>1)return f.preventDefault(),!1;if(!h&&!i&&!d&&p||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||p)&&v}}function gM({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect();let f=[[0,0],[c.width,c.height]];const h=typeof ResizeObserver<"u"?new ResizeObserver(F=>{const S=F[0];S&&(f=[[0,0],[S.contentRect.width,S.contentRect.height]])}):null;h==null||h.observe(e);const d=Hb().extent(()=>f).scaleExtent([t,n]).translateExtent(r),p=Ot(e).call(d);x({x:i.x,y:i.y,zoom:ro(i.zoom,t,n)},[[0,0],[c.width,c.height]],r);const v=p.on("wheel.zoom"),w=p.on("dblclick.zoom");d.wheelDelta(mE);async function g(F,S){return p?new Promise(O=>{d==null||d.interpolate((S==null?void 0:S.interpolate)==="linear"?Go:Xl).transform(Rc(p,S==null?void 0:S.duration,S==null?void 0:S.ease,()=>O(!0)),F)}):!1}function y({noWheelClassName:F,noPanClassName:S,onPaneContextMenu:O,userSelectionActive:P,panOnScroll:z,panOnDrag:I,panOnScrollMode:M,panOnScrollSpeed:E,preventScrolling:B,zoomOnPinch:H,zoomOnScroll:D,zoomOnDoubleClick:Y,zoomActivationKeyPressed:ne,lib:J,onTransformChange:ee,connectionInProgress:G,paneClickDistance:Z,selectionOnDrag:le}){P&&!u.isZoomingOrPanning&&m();const oe=z&&!ne&&!P;d.clickDistance(le?1/0:!cn(Z)||Z<0?0:Z);const re=oe?uM({zoomPanValues:u,noWheelClassName:F,d3Selection:p,d3Zoom:d,panOnScrollMode:M,panOnScrollSpeed:E,zoomOnPinch:H,onPanZoomStart:s,onPanZoom:o,onPanZoomEnd:l}):cM({noWheelClassName:F,preventScrolling:B,d3ZoomHandler:v});p.on("wheel.zoom",re,{passive:!1});const ie=fM({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});d.on("start",ie);const ge=dM({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!O,onPanZoom:o,onTransformChange:ee});d.on("zoom",ge);const me=hM({zoomPanValues:u,panOnDrag:I,panOnScroll:z,onPaneContextMenu:O,onPanZoomEnd:l,onDraggingChange:a});d.on("end",me);const ce=pM({zoomActivationKeyPressed:ne,panOnDrag:I,zoomOnScroll:D,panOnScroll:z,zoomOnDoubleClick:Y,zoomOnPinch:H,userSelectionActive:P,noPanClassName:S,noWheelClassName:F,lib:J,connectionInProgress:G});d.filter(ce),Y?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function m(){d.on("zoom",null)}async function x(F,S,O){const P=Tc(F),z=d==null?void 0:d.constrain()(P,S,O);return z&&await g(z),z}async function _(F,S){const O=Tc(F);return await g(O,S),O}function b(F){if(p){const S=Tc(F),O=p.property("__zoom");(O.k!==F.zoom||O.x!==F.x||O.y!==F.y)&&(d==null||d.transform(p,S,null,{sync:!0}))}}function k(){const F=p?Bb(p.node()):{x:0,y:0,k:1};return{x:F.x,y:F.y,zoom:F.k}}async function A(F,S){return p?new Promise(O=>{d==null||d.interpolate((S==null?void 0:S.interpolate)==="linear"?Go:Xl).scaleTo(Rc(p,S==null?void 0:S.duration,S==null?void 0:S.ease,()=>O(!0)),F)}):!1}async function T(F,S){return p?new Promise(O=>{d==null||d.interpolate((S==null?void 0:S.interpolate)==="linear"?Go:Xl).scaleBy(Rc(p,S==null?void 0:S.duration,S==null?void 0:S.ease,()=>O(!0)),F)}):!1}function N(F){d==null||d.scaleExtent(F)}function R(F){d==null||d.translateExtent(F)}function j(F){const S=!cn(F)||F<0?0:F;d==null||d.clickDistance(S)}return{update:y,destroy:m,setViewport:_,setViewportConstrained:x,getViewport:k,scaleTo:A,scaleBy:T,setScaleExtent:N,setTranslateExtent:R,syncViewport:b,setClickDistance:j}}var li;(function(e){e.Line="line",e.Handle="handle"})(li||(li={}));const mM=["top-left","top-right","bottom-left","bottom-right"],yM=["top","right","bottom","left"];function vM({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&i&&(a[0]=a[0]*-1),l&&o&&(a[1]=a[1]*-1),a}function Zm(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function Jn(e,t){return Math.max(0,t-e)}function er(e,t){return Math.max(0,e-t)}function bl(e,t,n){return Math.max(0,t-e,e-n)}function Km(e,t){return e?!t:t}function wM(e,t,n,r,i,o,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:c,isVertical:f}=t,h=c&&f,{xSnapped:d,ySnapped:p}=n,{minWidth:v,maxWidth:w,minHeight:g,maxHeight:y}=r,{x:m,y:x,width:_,height:b,aspectRatio:k}=e;let A=Math.floor(c?d-e.pointerX:0),T=Math.floor(f?p-e.pointerY:0);const N=_+(a?-A:A),R=b+(u?-T:T),j=-o[0]*_,F=-o[1]*b;let S=bl(N,v,w),O=bl(R,g,y);if(s){let I=0,M=0;a&&A<0?I=Jn(m+A+j,s[0][0]):!a&&A>0&&(I=er(m+N+j,s[1][0])),u&&T<0?M=Jn(x+T+F,s[0][1]):!u&&T>0&&(M=er(x+R+F,s[1][1])),S=Math.max(S,I),O=Math.max(O,M)}if(l){let I=0,M=0;a&&A>0?I=er(m+A,l[0][0]):!a&&A<0&&(I=Jn(m+N,l[1][0])),u&&T>0?M=er(x+T,l[0][1]):!u&&T<0&&(M=Jn(x+R,l[1][1])),S=Math.max(S,I),O=Math.max(O,M)}if(i){if(c){const I=bl(N/k,g,y)*k;if(S=Math.max(S,I),s){let M=0;!a&&!u||a&&!u&&h?M=er(x+F+N/k,s[1][1])*k:M=Jn(x+F+(a?A:-A)/k,s[0][1])*k,S=Math.max(S,M)}if(l){let M=0;!a&&!u||a&&!u&&h?M=Jn(x+N/k,l[1][1])*k:M=er(x+(a?A:-A)/k,l[0][1])*k,S=Math.max(S,M)}}if(f){const I=bl(R*k,v,w)/k;if(O=Math.max(O,I),s){let M=0;!a&&!u||u&&!a&&h?M=er(m+R*k+j,s[1][0])/k:M=Jn(m+(u?T:-T)*k+j,s[0][0])/k,O=Math.max(O,M)}if(l){let M=0;!a&&!u||u&&!a&&h?M=Jn(m+R*k,l[1][0])/k:M=er(m+(u?T:-T)*k,l[0][0])/k,O=Math.max(O,M)}}}T=T+(T<0?O:-O),A=A+(A<0?S:-S),i&&(h?N>R*k?T=(Km(a,u)?-A:A)/k:A=(Km(a,u)?-T:T)*k:c?(T=A/k,u=a):(A=T*k,a=u));const P=a?m+A:m,z=u?x+T:x;return{width:_+(a?-A:A),height:b+(u?-T:T),x:o[0]*A*(a?-1:1)+P,y:o[1]*T*(u?-1:1)+z}}const yE={width:0,height:0,x:0,y:0},xM={...yE,pointerX:0,pointerY:0,aspectRatio:1};function bM(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,l=n[0]*o,a=n[1]*s;return[[r-l,i-a],[r+o-l,i+s-a]]}function EM({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=Ot(e);let s={controlDirection:Zm("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:c,keepAspectRatio:f,resizeDirection:h,onResizeStart:d,onResize:p,onResizeEnd:v,shouldResize:w}){let g={...yE},y={...xM};s={boundaries:c,resizeDirection:h,keepAspectRatio:f,controlDirection:Zm(u)};let m,x=null,_=[],b,k,A,T=!1;const N=Cb().on("start",R=>{const{nodeLookup:j,transform:F,snapGrid:S,snapToGrid:O,nodeOrigin:P,paneDomNode:z}=n();if(m=j.get(t),!m)return;x=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:M}=Yo(R.sourceEvent,{transform:F,snapGrid:S,snapToGrid:O,containerBounds:x});g={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},y={...g,pointerX:I,pointerY:M,aspectRatio:g.width/g.height},b=void 0,k=oi(m.extent)?m.extent:void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(b=j.get(m.parentId)),b&&m.extent==="parent"&&(k=[[0,0],[b.measured.width,b.measured.height]]),_=[],A=void 0;for(const[E,B]of j)if(B.parentId===t&&(_.push({id:E,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const H=bM(B,m,B.origin??P);A?A=[[Math.min(H[0][0],A[0][0]),Math.min(H[0][1],A[0][1])],[Math.max(H[1][0],A[1][0]),Math.max(H[1][1],A[1][1])]]:A=H}d==null||d(R,{...g})}).on("drag",R=>{const{transform:j,snapGrid:F,snapToGrid:S,nodeOrigin:O}=n(),P=Yo(R.sourceEvent,{transform:j,snapGrid:F,snapToGrid:S,containerBounds:x}),z=[];if(!m)return;const{x:I,y:M,width:E,height:B}=g,H={},D=m.origin??O,{width:Y,height:ne,x:J,y:ee}=wM(y,s.controlDirection,P,s.boundaries,s.keepAspectRatio,D,k,A),G=Y!==E,Z=ne!==B,le=J!==I&&G,oe=ee!==M&&Z;if(!le&&!oe&&!G&&!Z)return;if((le||oe||D[0]===1||D[1]===1)&&(H.x=le?J:g.x,H.y=oe?ee:g.y,g.x=H.x,g.y=H.y,_.length>0)){const me=J-I,ce=ee-M;for(const Ae of _)Ae.position={x:Ae.position.x-me+D[0]*(Y-E),y:Ae.position.y-ce+D[1]*(ne-B)},z.push(Ae)}if((G||Z)&&(H.width=G&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Y:g.width,H.height=Z&&(!s.resizeDirection||s.resizeDirection==="vertical")?ne:g.height,g.width=H.width,g.height=H.height),b&&m.expandParent){const me=D[0]*(H.width??0);H.x&&H.x<me&&(g.x=me,y.x=y.x-(H.x-me));const ce=D[1]*(H.height??0);H.y&&H.y<ce&&(g.y=ce,y.y=y.y-(H.y-ce))}const re=vM({width:g.width,prevWidth:E,height:g.height,prevHeight:B,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ie={...g,direction:re};(w==null?void 0:w(R,ie))!==!1&&(T=!0,p==null||p(R,ie),r(H,z))}).on("end",R=>{T&&(v==null||v(R,{...g}),i==null||i({...g}),T=!1)});o.call(N)}function a(){o.on(".drag",null)}return{update:l,destroy:a}}var vE={exports:{}},wE={},xE={exports:{}},bE={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var oo=L;function kM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _M=typeof Object.is=="function"?Object.is:kM,SM=oo.useState,CM=oo.useEffect,AM=oo.useLayoutEffect,NM=oo.useDebugValue;function DM(e,t){var n=t(),r=SM({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return AM(function(){i.value=n,i.getSnapshot=t,Ic(i)&&o({inst:i})},[e,n,t]),CM(function(){return Ic(i)&&o({inst:i}),e(function(){Ic(i)&&o({inst:i})})},[e]),NM(n),n}function Ic(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_M(e,n)}catch{return!0}}function TM(e,t){return t()}var RM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?TM:DM;bE.useSyncExternalStore=oo.useSyncExternalStore!==void 0?oo.useSyncExternalStore:RM;xE.exports=bE;var IM=xE.exports;/**
49
+ * @license React
50
+ * use-sync-external-store-shim/with-selector.production.js
51
+ *
52
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */var Lu=L,MM=IM;function OM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PM=typeof Object.is=="function"?Object.is:OM,LM=MM.useSyncExternalStore,zM=Lu.useRef,jM=Lu.useEffect,FM=Lu.useMemo,BM=Lu.useDebugValue;wE.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=zM(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=FM(function(){function a(d){if(!u){if(u=!0,c=d,d=r(d),i!==void 0&&s.hasValue){var p=s.value;if(i(p,d))return f=p}return f=d}if(p=f,PM(c,d))return p;var v=r(d);return i!==void 0&&i(p,v)?(c=d,p):(c=d,f=v)}var u=!1,c,f,h=n===void 0?null:n;return[function(){return a(t())},h===null?void 0:function(){return a(h())}]},[t,n,r,i]);var l=LM(e,o[0],o[1]);return jM(function(){s.hasValue=!0,s.value=l},[l]),BM(l),l};vE.exports=wE;var HM=vE.exports;const $M=Ms(HM),VM={},Jm=e=>{let t;const n=new Set,r=(c,f)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const d=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,d))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(VM?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,a);return a},UM=e=>e?Jm(e):Jm,{useDebugValue:WM}=fa,{useSyncExternalStoreWithSelector:GM}=$M,YM=e=>e;function EE(e,t=YM,n){const r=GM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return WM(r),r}const ey=(e,t)=>{const n=UM(e),r=(i,o=t)=>EE(n,i,o);return Object.assign(r,n),r},QM=(e,t)=>e?ey(e,t):ey;function Be(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const zu=L.createContext(null),qM=zu.Provider,kE=mn.error001("react");function Ee(e,t){const n=L.useContext(zu);if(n===null)throw new Error(kE);return EE(n,e,t)}function Oe(){const e=L.useContext(zu);if(e===null)throw new Error(kE);return L.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ty={display:"none"},XM={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},_E="react-flow__node-desc",SE="react-flow__edge-desc",ZM="react-flow__aria-live",KM=e=>e.ariaLiveMessage,JM=e=>e.ariaLabelConfig;function eO({rfId:e}){const t=Ee(KM);return C.jsx("div",{id:`${ZM}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:XM,children:t})}function tO({rfId:e,disableKeyboardA11y:t}){const n=Ee(JM);return C.jsxs(C.Fragment,{children:[C.jsx("div",{id:`${_E}-${e}`,style:ty,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),C.jsx("div",{id:`${SE}-${e}`,style:ty,children:n["edge.a11yDescription.default"]}),!t&&C.jsx(eO,{rfId:e})]})}const ju=L.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=`${e}`.split("-");return C.jsx("div",{className:Xe(["react-flow__panel",n,...s]),style:r,ref:o,...i,children:t})});ju.displayName="Panel";const ny="https://reactflow.dev?utm_source=attribution";function nO({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:C.jsx(ju,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${ny}`,children:C.jsx("a",{href:ny,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const rO=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},El=e=>e.id;function iO(e,t){return Be(e.selectedNodes.map(El),t.selectedNodes.map(El))&&Be(e.selectedEdges.map(El),t.selectedEdges.map(El))}function oO({onSelectionChange:e}){const t=Oe(),{selectedNodes:n,selectedEdges:r}=Ee(rO,iO);return L.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const sO=e=>!!e.onSelectionChangeHandlers;function lO({onSelectionChange:e}){const t=Ee(sO);return e||t?C.jsx(oO,{onSelectionChange:e}):null}const CE=[0,0],aO={x:0,y:0,zoom:1},uO=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ry=[...uO,"rfId"],cO=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),iy={translateExtent:Es,nodeOrigin:CE,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function fO(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=Ee(cO,Be),u=Oe();L.useEffect(()=>(a(e.defaultNodes,e.defaultEdges),()=>{c.current=iy,l()}),[]);const c=L.useRef(iy);return L.useEffect(()=>{for(const f of ry){const h=e[f],d=c.current[f];h!==d&&(typeof e[f]>"u"||(f==="nodes"?t(h):f==="edges"?n(h):f==="minZoom"?r(h):f==="maxZoom"?i(h):f==="translateExtent"?o(h):f==="nodeExtent"?s(h):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:MI(h)}):f==="fitView"?u.setState({fitViewQueued:h}):f==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[f]:h})))}c.current=e},ry.map(f=>e[f])),null}function oy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function dO(e){var r;const[t,n]=L.useState(e==="system"?null:e);return L.useEffect(()=>{if(e!=="system"){n(e);return}const i=oy(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=oy())!=null&&r.matches?"dark":"light"}const sy=typeof document<"u"?document:null;function Cs(e=null,t={target:sy,actInsideInputWithModifier:!0}){const[n,r]=L.useState(!1),i=L.useRef(!1),o=L.useRef(new Set([])),[s,l]=L.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
57
+ `).replace(`
58
+
59
+ `,`
60
+ +`).split(`
61
+ `)),c=u.reduce((f,h)=>f.concat(...h),[]);return[u,c]}return[[],[]]},[e]);return L.useEffect(()=>{const a=(t==null?void 0:t.target)??sy,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const c=d=>{var w,g;if(i.current=d.ctrlKey||d.metaKey||d.shiftKey||d.altKey,(!i.current||i.current&&!u)&&tE(d))return!1;const v=ay(d.code,l);if(o.current.add(d[v]),ly(s,o.current,!1)){const y=((g=(w=d.composedPath)==null?void 0:w.call(d))==null?void 0:g[0])||d.target,m=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";t.preventDefault!==!1&&(i.current||!m)&&d.preventDefault(),r(!0)}},f=d=>{const p=ay(d.code,l);ly(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(d[p]),d.key==="Meta"&&o.current.clear(),i.current=!1},h=()=>{o.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",c),a==null||a.addEventListener("keyup",f),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{a==null||a.removeEventListener("keydown",c),a==null||a.removeEventListener("keyup",f),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,r]),n}function ly(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function ay(e,t){return t.includes(e)?"code":"key"}const hO=()=>{const e=Oe();return L.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),!0):!1},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:l}=e.getState(),a=ip(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:s}=e.getState();if(!s)return t;const{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},c=n.snapGrid??i,f=n.snapToGrid??o;return Us(u,r,f,c)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=io(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function AE(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...o};for(const a of s)pO(a,l);n.push(l)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function pO(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function fp(e,t){return AE(e,t)}function NE(e,t){return AE(e,t)}function Pr(e,t){return{id:e,type:"select",selected:t}}function Li(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(Pr(o.id,s)))}return r}function uy({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const l=t.get(s.id),a=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function cy(e){return{id:e.id,type:"remove"}}const gO=Zb();function mO(e,t,n={}){return FI(e,t,{...n,onError:n.onError??gO})}const fy=e=>_I(e),yO=e=>Gb(e);function DE(e){return L.forwardRef(e)}const TE=typeof window<"u"?L.useLayoutEffect:L.useEffect;function dy(e){const[t,n]=L.useState(BigInt(0)),[r]=L.useState(()=>vO(()=>n(i=>i+BigInt(1))));return TE(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function vO(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const RE=L.createContext(null);function wO({children:e}){const t=Oe(),n=L.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:c,onNodesChange:f,nodeLookup:h,fitViewQueued:d,onNodesChangeMiddlewareMap:p}=t.getState();let v=a;for(const g of l)v=typeof g=="function"?g(v):g;let w=uy({items:v,lookup:h});for(const g of p.values())w=g(w);c&&u(v),w.length>0?f==null||f(w):d&&window.requestAnimationFrame(()=>{const{fitViewQueued:g,nodes:y,setNodes:m}=t.getState();g&&m(y)})},[]),r=dy(n),i=L.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:f,edgeLookup:h}=t.getState();let d=a;for(const p of l)d=typeof p=="function"?p(d):p;c?u(d):f&&f(uy({items:d,lookup:h}))},[]),o=dy(i),s=L.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return C.jsx(RE.Provider,{value:s,children:e})}function xO(){const e=L.useContext(RE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const bO=e=>!!e.panZoom;function dp(){const e=hO(),t=Oe(),n=xO(),r=Ee(bO),i=L.useMemo(()=>{const o=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},a=f=>{var g,y;const{nodeLookup:h,nodeOrigin:d}=t.getState(),p=fy(f)?f:h.get(f.id),v=p.parentId?Jb(p.position,p.measured,p.parentId,h,d):p.position,w={...p,position:v,width:((g=p.measured)==null?void 0:g.width)??p.width,height:((y=p.measured)==null?void 0:y.height)??p.height};return _s(w)},u=(f,h,d={replace:!1})=>{s(p=>p.map(v=>{if(v.id===f){const w=typeof h=="function"?h(v):h;return d.replace&&fy(w)?w:{...v,...w}}return v}))},c=(f,h,d={replace:!1})=>{l(p=>p.map(v=>{if(v.id===f){const w=typeof h=="function"?h(v):h;return d.replace&&yO(w)?w:{...v,...w}}return v}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var h;return(h=o(f))==null?void 0:h.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(h=>({...h}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const h=Array.isArray(f)?f:[f];n.nodeQueue.push(d=>[...d,...h])},addEdges:f=>{const h=Array.isArray(f)?f:[f];n.edgeQueue.push(d=>[...d,...h])},toObject:()=>{const{nodes:f=[],edges:h=[],transform:d}=t.getState(),[p,v,w]=d;return{nodes:f.map(g=>({...g})),edges:h.map(g=>({...g})),viewport:{x:p,y:v,zoom:w}}},deleteElements:async({nodes:f=[],edges:h=[]})=>{const{nodes:d,edges:p,onNodesDelete:v,onEdgesDelete:w,triggerNodeChanges:g,triggerEdgeChanges:y,onDelete:m,onBeforeDelete:x}=t.getState(),{nodes:_,edges:b}=await DI({nodesToRemove:f,edgesToRemove:h,nodes:d,edges:p,onBeforeDelete:x}),k=b.length>0,A=_.length>0;if(k){const T=b.map(cy);w==null||w(b),y(T)}if(A){const T=_.map(cy);v==null||v(_),g(T)}return(A||k)&&(m==null||m({nodes:_,edges:b})),{deletedNodes:_,deletedEdges:b}},getIntersectingNodes:(f,h=!0,d)=>{const p=Bm(f),v=p?f:a(f),w=d!==void 0;return v?(d||t.getState().nodes).filter(g=>{const y=t.getState().nodeLookup.get(g.id);if(y&&!p&&(g.id===f.id||!y.internals.positionAbsolute))return!1;const m=_s(w?g:y),x=Ga(m,v);return h&&x>0||x>=m.width*m.height||x>=v.width*v.height}):[]},isNodeIntersecting:(f,h,d=!0)=>{const v=Bm(f)?f:a(f);if(!v)return!1;const w=Ga(v,h);return d&&w>0||w>=h.width*h.height||w>=v.width*v.height},updateNode:u,updateNodeData:(f,h,d={replace:!1})=>{u(f,p=>{const v=typeof h=="function"?h(p):h;return d.replace?{...p,data:v}:{...p,data:{...p.data,...v}}},d)},updateEdge:c,updateEdgeData:(f,h,d={replace:!1})=>{c(f,p=>{const v=typeof h=="function"?h(p):h;return d.replace?{...p,data:v}:{...p,data:{...p.data,...v}}},d)},getNodesBounds:f=>{const{nodeLookup:h,nodeOrigin:d}=t.getState();return SI(f,{nodeLookup:h,nodeOrigin:d})},getHandleConnections:({type:f,id:h,nodeId:d})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${d}-${f}${h?`-${h}`:""}`))==null?void 0:p.values())??[])},getNodeConnections:({type:f,handleId:h,nodeId:d})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${d}${f?h?`-${f}-${h}`:`-${f}`:""}`))==null?void 0:p.values())??[])},fitView:async f=>{const h=t.getState().fitViewResolver??II();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:h}),n.nodeQueue.push(d=>[...d]),h.promise}}},[]);return L.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const hy=e=>e.selected,EO=typeof window<"u"?window:void 0;function kO({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Oe(),{deleteElements:r}=dp(),i=Cs(e,{actInsideInputWithModifier:!1}),o=Cs(t,{target:EO});L.useEffect(()=>{if(i){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(hy),edges:s.filter(hy)}),n.setState({nodesSelectionActive:!1})}},[i]),L.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function _O(e){const t=Oe();L.useEffect(()=>{const n=()=>{var i,o,s,l;if(!e.current||!(((o=(i=e.current).checkVisibility)==null?void 0:o.call(i))??!0))return!1;const r=op(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",mn.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Fu={position:"absolute",width:"100%",height:"100%",top:0,left:0},SO=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function CO({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=qr.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:c,maxZoom:f,zoomActivationKeyCode:h,preventScrolling:d=!0,children:p,noWheelClassName:v,noPanClassName:w,onViewportChange:g,isControlledViewport:y,paneClickDistance:m,selectionOnDrag:x}){const _=Oe(),b=L.useRef(null),{userSelectionActive:k,lib:A,connectionInProgress:T}=Ee(SO,Be),N=Cs(h),R=L.useRef();_O(b);const j=L.useCallback(F=>{g==null||g({x:F[0],y:F[1],zoom:F[2]}),y||_.setState({transform:F})},[g,y]);return L.useEffect(()=>{if(b.current){R.current=gM({domNode:b.current,minZoom:c,maxZoom:f,translateExtent:u,viewport:a,onDraggingChange:P=>_.setState(z=>z.paneDragging===P?z:{paneDragging:P}),onPanZoomStart:(P,z)=>{const{onViewportChangeStart:I,onMoveStart:M}=_.getState();M==null||M(P,z),I==null||I(z)},onPanZoom:(P,z)=>{const{onViewportChange:I,onMove:M}=_.getState();M==null||M(P,z),I==null||I(z)},onPanZoomEnd:(P,z)=>{const{onViewportChangeEnd:I,onMoveEnd:M}=_.getState();M==null||M(P,z),I==null||I(z)}});const{x:F,y:S,zoom:O}=R.current.getViewport();return _.setState({panZoom:R.current,transform:[F,S,O],domNode:b.current.closest(".react-flow")}),()=>{var P;(P=R.current)==null||P.destroy()}}},[]),L.useEffect(()=>{var F;(F=R.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:N,preventScrolling:d,noPanClassName:w,userSelectionActive:k,noWheelClassName:v,lib:A,onTransformChange:j,connectionInProgress:T,selectionOnDrag:x,paneClickDistance:m})},[e,t,n,r,i,o,s,l,N,d,w,k,v,A,j,T,x,m]),C.jsx("div",{className:"react-flow__renderer",ref:b,style:Fu,children:p})}const AO=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function NO(){const{userSelectionActive:e,userSelectionRect:t}=Ee(AO,Be);return e&&t?C.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Mc=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},DO=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function TO({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ks.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:a,onPaneClick:u,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:h,onPaneMouseMove:d,onPaneMouseLeave:p,children:v}){const w=L.useRef(0),g=Oe(),{userSelectionActive:y,elementsSelectable:m,dragging:x,panBy:_,autoPanSpeed:b}=Ee(DO,Be),k=m&&(e||y),A=L.useRef(null),T=L.useRef(),N=L.useRef(new Set),R=L.useRef(new Set),j=L.useRef(!1),F=L.useRef(!1),S=L.useRef({x:0,y:0}),O=L.useRef(!1),P=G=>{if(F.current||j.current||g.getState().connection.inProgress){F.current=!1,j.current=!1;return}u==null||u(G),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},z=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}c==null||c(G)},I=f?G=>f(G):void 0,M=G=>{F.current&&(G.stopPropagation(),F.current=!1)},E=G=>{var Ae,Je;const{domNode:Z,transform:le}=g.getState();if(T.current=Z==null?void 0:Z.getBoundingClientRect(),!T.current)return;const oe=G.target===A.current;if(!oe&&!!G.target.closest(".nokey")||!e||!(s&&oe||t)||G.button!==0||!G.isPrimary)return;(Je=(Ae=G.target)==null?void 0:Ae.setPointerCapture)==null||Je.call(Ae,G.pointerId),F.current=!1;const{x:ge,y:me}=fn(G.nativeEvent,T.current),ce=Us({x:ge,y:me},le);g.setState({userSelectionRect:{width:0,height:0,startX:ce.x,startY:ce.y,x:ge,y:me}}),oe||(G.stopPropagation(),G.preventDefault())};function B(G,Z){const{userSelectionRect:le}=g.getState();if(!le)return;const{transform:oe,nodeLookup:re,edgeLookup:ie,connectionLookup:ge,triggerNodeChanges:me,triggerEdgeChanges:ce,defaultEdgeOptions:Ae}=g.getState(),Je={x:le.startX,y:le.startY},{x:ht,y:pt}=io(Je,oe),Rt={startX:Je.x,startY:Je.y,x:G<ht?G:ht,y:Z<pt?Z:pt,width:Math.abs(G-ht),height:Math.abs(Z-pt)},Jt=N.current,en=R.current;N.current=new Set(np(re,Rt,oe,n===ks.Partial,!0).map(gt=>gt.id)),R.current=new Set;const tn=(Ae==null?void 0:Ae.selectable)??!0;for(const gt of N.current){const W=ge.get(gt);if(W)for(const{edgeId:X}of W.values()){const ae=ie.get(X);ae&&(ae.selectable??tn)&&R.current.add(X)}}if(!Hm(Jt,N.current)){const gt=Li(re,N.current,!0);me(gt)}if(!Hm(en,R.current)){const gt=Li(ie,R.current);ce(gt)}g.setState({userSelectionRect:Rt,userSelectionActive:!0,nodesSelectionActive:!1})}function H(){if(!i||!T.current)return;const[G,Z]=rp(S.current,T.current,b);_({x:G,y:Z}).then(le=>{if(!F.current||!le){w.current=requestAnimationFrame(H);return}const{x:oe,y:re}=S.current;B(oe,re),w.current=requestAnimationFrame(H)})}const D=()=>{cancelAnimationFrame(w.current),w.current=0,O.current=!1};L.useEffect(()=>()=>D(),[]);const Y=G=>{const{userSelectionRect:Z,transform:le,resetSelectedElements:oe}=g.getState();if(!T.current||!Z)return;const{x:re,y:ie}=fn(G.nativeEvent,T.current);S.current={x:re,y:ie};const ge=io({x:Z.startX,y:Z.startY},le);if(!F.current){const me=t?0:o;if(Math.hypot(re-ge.x,ie-ge.y)<=me)return;oe(),l==null||l(G)}F.current=!0,O.current||(H(),O.current=!0),B(re,ie)},ne=G=>{var Z,le;if(!k){G.target===A.current&&g.getState().connection.inProgress&&(j.current=!0);return}G.button===0&&((le=(Z=G.target)==null?void 0:Z.releasePointerCapture)==null||le.call(Z,G.pointerId),!y&&G.target===A.current&&g.getState().userSelectionRect&&(P==null||P(G)),g.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(a==null||a(G),g.setState({nodesSelectionActive:N.current.size>0})),D())},J=G=>{var Z,le;(le=(Z=G.target)==null?void 0:Z.releasePointerCapture)==null||le.call(Z,G.pointerId),D()},ee=r===!0||Array.isArray(r)&&r.includes(0);return C.jsxs("div",{className:Xe(["react-flow__pane",{draggable:ee,dragging:x,selection:e}]),onClick:k?void 0:Mc(P,A),onContextMenu:Mc(z,A),onWheel:Mc(I,A),onPointerEnter:k?void 0:h,onPointerMove:k?Y:d,onPointerUp:ne,onPointerCancel:k?J:void 0,onPointerDownCapture:k?E:void 0,onClickCapture:k?M:void 0,onPointerLeave:p,ref:A,style:Fu,children:[v,C.jsx(NO,{})]})}function Ad({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",mn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function IE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const l=Oe(),[a,u]=L.useState(!1),c=L.useRef();return L.useEffect(()=>{if(!t)return c.current=tM({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Ad({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}}),()=>{var f;(f=c.current)==null||f.destroy(),c.current=void 0}},[t,l,e]),L.useEffect(()=>{t||!e.current||!c.current||c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s})},[n,r,t,o,e,i,s]),a}const RO=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function ME(){const e=Oe();return L.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:c}=e.getState(),f=new Map,h=RO(s),d=i?o[0]:5,p=i?o[1]:5,v=n.direction.x*d*n.factor,w=n.direction.y*p*n.factor;for(const[,g]of u){if(!h(g))continue;let y={x:g.internals.positionAbsolute.x+v,y:g.internals.positionAbsolute.y+w};i&&(y=Vs(y,o));const{position:m,positionAbsolute:x}=Yb({nodeId:g.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:l});g.position=m,g.internals.positionAbsolute=x,f.set(g.id,g)}a(f)},[])}const hp=L.createContext(null),IO=hp.Provider;hp.Consumer;const OE=()=>L.useContext(hp),MO=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),PE=L.createContext(null);function OO({children:e}){const t=Ee(MO,Be);return C.jsx(PE.Provider,{value:t,children:e})}function PO(){const e=L.useContext(PE);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const LO={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},zO=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s;if(!l&&!i)return LO;const c=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:c,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===no.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:c&&u}};function jO({type:e="source",position:t=se.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:c,onTouchStart:f,...h},d){var O,P;const p=s||null,v=e==="target",w=Oe(),g=OE(),{connectOnClick:y,noPanClassName:m,rfId:x}=PO(),{connectingFrom:_,connectingTo:b,clickConnecting:k,isPossibleEndHandle:A,connectionInProcess:T,clickConnectionInProcess:N,valid:R}=Ee(zO(g,p,e),Be);g||(P=(O=w.getState()).onError)==null||P.call(O,"010",mn.error010());const j=z=>{const{defaultEdgeOptions:I,onConnect:M,hasDefaultEdges:E}=w.getState(),B={...I,...z};if(E){const{edges:H,setEdges:D,onError:Y}=w.getState();D(mO(B,H,{onError:Y}))}M==null||M(B),l==null||l(B)},F=z=>{if(!g)return;const I=nE(z.nativeEvent);if(i&&(I&&z.button===0||!I)){const M=w.getState();Cd.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:v,handleId:p,nodeId:g,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...E)=>{var B,H;return(H=(B=w.getState()).onConnectEnd)==null?void 0:H.call(B,...E)},updateConnection:M.updateConnection,onConnect:j,isValidConnection:n||((...E)=>{var B,H;return((H=(B=w.getState()).isValidConnection)==null?void 0:H.call(B,...E))??!0}),getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}I?c==null||c(z):f==null||f(z)},S=z=>{const{onClickConnectStart:I,onClickConnectEnd:M,connectionClickStartHandle:E,connectionMode:B,isValidConnection:H,lib:D,rfId:Y,nodeLookup:ne,connection:J}=w.getState();if(!g||!E&&!i)return;if(!E){I==null||I(z.nativeEvent,{nodeId:g,handleId:p,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:g,type:e,id:p}});return}const ee=eE(z.target),G=n||H,{connection:Z,isValid:le}=Cd.isValid(z.nativeEvent,{handle:{nodeId:g,id:p,type:e},connectionMode:B,fromNodeId:E.nodeId,fromHandleId:E.id||null,fromType:E.type,isValidConnection:G,flowId:Y,doc:ee,lib:D,nodeLookup:ne});le&&Z&&j(Z);const oe=structuredClone(J);delete oe.inProgress,oe.toPosition=oe.toHandle?oe.toHandle.position:null,M==null||M(z,oe),w.setState({connectionClickStartHandle:null})};return C.jsx("div",{"data-handleid":p,"data-nodeid":g,"data-handlepos":t,"data-id":`${x}-${g}-${p}-${e}`,className:Xe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!v,target:v,connectable:r,connectablestart:i,connectableend:o,clickconnecting:k,connectingfrom:_,connectingto:b,valid:R,connectionindicator:r&&(!T||A)&&(T||N?o:i)}]),onMouseDown:F,onTouchStart:F,onClick:y?S:void 0,ref:d,...h,children:a})}const Yn=L.memo(DE(jO));function FO({data:e,isConnectable:t,sourcePosition:n=se.Bottom}){return C.jsxs(C.Fragment,{children:[e==null?void 0:e.label,C.jsx(Yn,{type:"source",position:n,isConnectable:t})]})}function BO({data:e,isConnectable:t,targetPosition:n=se.Top,sourcePosition:r=se.Bottom}){return C.jsxs(C.Fragment,{children:[C.jsx(Yn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,C.jsx(Yn,{type:"source",position:r,isConnectable:t})]})}function HO(){return null}function $O({data:e,isConnectable:t,targetPosition:n=se.Top}){return C.jsxs(C.Fragment,{children:[C.jsx(Yn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ya={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},py={input:FO,default:BO,output:$O,group:HO};function VO(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const UO=e=>{const{width:t,height:n,x:r,y:i}=$s(e.nodeLookup,{filter:o=>!!o.selected});return{width:cn(t)?t:null,height:cn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function WO({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Oe(),{width:i,height:o,transformString:s,userSelectionActive:l}=Ee(UO,Be),a=ME(),u=L.useRef(null);L.useEffect(()=>{var d;n||(d=u.current)==null||d.focus({preventScroll:!0})},[n]);const c=!l&&i!==null&&o!==null;if(IE({nodeRef:u,disabled:!c}),!c)return null;const f=e?d=>{const p=r.getState().nodes.filter(v=>v.selected);e(d,p)}:void 0,h=d=>{Object.prototype.hasOwnProperty.call(Ya,d.key)&&(d.preventDefault(),a({direction:Ya[d.key],factor:d.shiftKey?4:1}))};return C.jsx("div",{className:Xe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:C.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:o}})})}const gy=typeof window<"u"?window:void 0,GO=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function LE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:c,selectionMode:f,onSelectionStart:h,onSelectionEnd:d,multiSelectionKeyCode:p,panActivationKeyCode:v,zoomActivationKeyCode:w,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:x,panOnScrollSpeed:_,panOnScrollMode:b,zoomOnDoubleClick:k,panOnDrag:A,autoPanOnSelection:T,defaultViewport:N,translateExtent:R,minZoom:j,maxZoom:F,preventScrolling:S,onSelectionContextMenu:O,noWheelClassName:P,noPanClassName:z,disableKeyboardA11y:I,onViewportChange:M,isControlledViewport:E}){const{nodesSelectionActive:B,userSelectionActive:H}=Ee(GO,Be),D=Cs(u,{target:gy}),Y=Cs(v,{target:gy}),ne=Y||A,J=Y||x,ee=c&&ne!==!0,G=D||H||ee;return kO({deleteKeyCode:a,multiSelectionKeyCode:p}),C.jsx(CO,{onPaneContextMenu:o,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:J,panOnScrollSpeed:_,panOnScrollMode:b,zoomOnDoubleClick:k,panOnDrag:!D&&ne,defaultViewport:N,translateExtent:R,minZoom:j,maxZoom:F,zoomActivationKeyCode:w,preventScrolling:S,noWheelClassName:P,noPanClassName:z,onViewportChange:M,isControlledViewport:E,paneClickDistance:l,selectionOnDrag:ee,children:C.jsxs(TO,{onSelectionStart:h,onSelectionEnd:d,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:ne,autoPanOnSelection:T,isSelecting:!!G,selectionMode:f,selectionKeyPressed:D,paneClickDistance:l,selectionOnDrag:ee,children:[e,B&&C.jsx(WO,{onSelectionContextMenu:O,noPanClassName:z,disableKeyboardA11y:I})]})})}LE.displayName="FlowRenderer";const YO=L.memo(LE),QO=e=>t=>e?np(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function qO(e){return Ee(L.useCallback(QO(e),[e]),Be)}const XO=e=>e.updateNodeInternals;function ZO(){const e=Ee(XO),[t]=L.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return L.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function KO({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Oe(),o=L.useRef(null),s=L.useRef(null),l=L.useRef(e.sourcePosition),a=L.useRef(e.targetPosition),u=L.useRef(t),c=n&&!!e.internals.handleBounds;return L.useEffect(()=>{o.current&&!e.hidden&&(!c||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[c,e.hidden]),L.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),L.useEffect(()=>{if(o.current){const f=u.current!==t,h=l.current!==e.sourcePosition,d=a.current!==e.targetPosition;(f||h||d)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function JO({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:c,resizeObserver:f,noDragClassName:h,noPanClassName:d,disableKeyboardA11y:p,rfId:v,nodeTypes:w,nodeClickDistance:g,onError:y}){const{node:m,internals:x,isParent:_}=Ee(G=>{const Z=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:le}},Be);let b=m.type||"default",k=(w==null?void 0:w[b])||py[b];k===void 0&&(y==null||y("003",mn.error003(b)),b="default",k=(w==null?void 0:w.default)||py.default);const A=!!(m.draggable||l&&typeof m.draggable>"u"),T=!!(m.selectable||a&&typeof m.selectable>"u"),N=!!(m.connectable||u&&typeof m.connectable>"u"),R=!!(m.focusable||c&&typeof m.focusable>"u"),j=Oe(),F=Kb(m),S=KO({node:m,nodeType:b,hasDimensions:F,resizeObserver:f}),O=IE({nodeRef:S,disabled:m.hidden||!A,noDragClassName:h,handleSelector:m.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:g}),P=ME();if(m.hidden)return null;const z=Rn(m),I=VO(m),M=T||A||t||n||r||i,E=n?G=>n(G,{...x.userNode}):void 0,B=r?G=>r(G,{...x.userNode}):void 0,H=i?G=>i(G,{...x.userNode}):void 0,D=o?G=>o(G,{...x.userNode}):void 0,Y=s?G=>s(G,{...x.userNode}):void 0,ne=G=>{const{selectNodesOnDrag:Z,nodeDragThreshold:le}=j.getState();T&&(!Z||!A||le>0)&&Ad({id:e,store:j,nodeRef:S}),t&&t(G,{...x.userNode})},J=G=>{if(!(tE(G.nativeEvent)||p)){if($b.includes(G.key)&&T){const Z=G.key==="Escape";Ad({id:e,store:j,unselect:Z,nodeRef:S})}else if(A&&m.selected&&Object.prototype.hasOwnProperty.call(Ya,G.key)){G.preventDefault();const{ariaLabelConfig:Z}=j.getState();j.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),P({direction:Ya[G.key],factor:G.shiftKey?4:1})}}},ee=()=>{var ge;if(p||!((ge=S.current)!=null&&ge.matches(":focus-visible")))return;const{transform:G,width:Z,height:le,autoPanOnNodeFocus:oe,setCenter:re}=j.getState();if(!oe)return;np(new Map([[e,m]]),{x:0,y:0,width:Z,height:le},G,!0).length>0||re(m.position.x+z.width/2,m.position.y+z.height/2,{zoom:G[2]})};return C.jsx("div",{className:Xe(["react-flow__node",`react-flow__node-${b}`,{[d]:A},m.className,{selected:m.selected,selectable:T,parent:_,draggable:A,dragging:O}]),ref:S,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:F?"visible":"hidden",...m.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:E,onMouseMove:B,onMouseLeave:H,onContextMenu:D,onClick:ne,onDoubleClick:Y,onKeyDown:R?J:void 0,tabIndex:R?0:void 0,onFocus:R?ee:void 0,role:m.ariaRole??(R?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${_E}-${v}`,"aria-label":m.ariaLabel,...m.domAttributes,children:C.jsx(IO,{value:e,children:C.jsx(k,{id:e,data:m.data,type:b,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:m.selected??!1,selectable:T,draggable:A,deletable:m.deletable??!0,isConnectable:N,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:O,dragHandle:m.dragHandle,zIndex:x.z,parentId:m.parentId,...z})})})}var eP=L.memo(JO);const tP=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function zE(e){const{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=Ee(tP,Be),o=qO(e.onlyRenderVisibleElements),s=ZO();return C.jsx("div",{className:"react-flow__nodes",style:Fu,children:o.map(l=>C.jsx(eP,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}zE.displayName="NodeRenderer";const nP=L.memo(zE);function rP(e){return Ee(L.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&LI({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Be)}const iP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return C.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},oP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return C.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},my={[Ua.Arrow]:iP,[Ua.ArrowClosed]:oP};function sP(e){const t=Oe();return L.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(my,e)?my[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",mn.error009(e)),null)},[e])}const lP=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const a=sP(t);return a?C.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:l,refX:"0",refY:"0",children:C.jsx(a,{color:n,strokeWidth:s})}):null},jE=({defaultColor:e,rfId:t})=>{const n=Ee(o=>o.edges),r=Ee(o=>o.defaultEdgeOptions),i=L.useMemo(()=>UI(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?C.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:C.jsx("defs",{children:i.map(o=>C.jsx(lP,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};jE.displayName="MarkerDefinitions";var aP=L.memo(jE);function FE({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...c}){const[f,h]=L.useState({x:1,y:0,width:0,height:0}),d=Xe(["react-flow__edge-textwrapper",u]),p=L.useRef(null);return L.useEffect(()=>{if(p.current){const v=p.current.getBBox();h({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?C.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:d,visibility:f.width?"visible":"hidden",...c,children:[i&&C.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:l,ry:l}),C.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:p,style:r,children:n}),a]}):null}FE.displayName="EdgeText";const uP=L.memo(FE);function Bu({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...c}){return C.jsxs(C.Fragment,{children:[C.jsx("path",{...c,d:e,fill:"none",className:Xe(["react-flow__edge-path",c.className])}),u?C.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&cn(t)&&cn(n)?C.jsx(uP,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function yy({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===se.Left||e===se.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function BE({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:o=se.Top}){const[s,l]=yy({pos:n,x1:e,y1:t,x2:r,y2:i}),[a,u]=yy({pos:o,x1:r,y1:i,x2:e,y2:t}),[c,f,h,d]=rE({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${i}`,c,f,h,d]}function HE(e){return L.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:p,markerEnd:v,markerStart:w,interactionWidth:g})=>{const[y,m,x]=BE({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l}),_=e.isInternal?void 0:t;return C.jsx(Bu,{id:_,path:y,labelX:m,labelY:x,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:p,markerEnd:v,markerStart:w,interactionWidth:g})})}const cP=HE({isInternal:!1}),$E=HE({isInternal:!0});cP.displayName="SimpleBezierEdge";$E.displayName="SimpleBezierEdgeInternal";function VE(e){return L.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,sourcePosition:d=se.Bottom,targetPosition:p=se.Top,markerEnd:v,markerStart:w,pathOptions:g,interactionWidth:y})=>{const[m,x,_]=kd({sourceX:n,sourceY:r,sourcePosition:d,targetX:i,targetY:o,targetPosition:p,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset,stepPosition:g==null?void 0:g.stepPosition}),b=e.isInternal?void 0:t;return C.jsx(Bu,{id:b,path:m,labelX:x,labelY:_,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:v,markerStart:w,interactionWidth:y})})}const UE=VE({isInternal:!1}),WE=VE({isInternal:!0});UE.displayName="SmoothStepEdge";WE.displayName="SmoothStepEdgeInternal";function GE(e){return L.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return C.jsx(UE,{...n,id:r,pathOptions:L.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const fP=GE({isInternal:!1}),YE=GE({isInternal:!0});fP.displayName="StepEdge";YE.displayName="StepEdgeInternal";function QE(e){return L.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:d,markerStart:p,interactionWidth:v})=>{const[w,g,y]=sE({sourceX:n,sourceY:r,targetX:i,targetY:o}),m=e.isInternal?void 0:t;return C.jsx(Bu,{id:m,path:w,labelX:g,labelY:y,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:d,markerStart:p,interactionWidth:v})})}const dP=QE({isInternal:!1}),qE=QE({isInternal:!0});dP.displayName="StraightEdge";qE.displayName="StraightEdgeInternal";function XE(e){return L.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=se.Bottom,targetPosition:l=se.Top,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:p,markerEnd:v,markerStart:w,pathOptions:g,interactionWidth:y})=>{const[m,x,_]=iE({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l,curvature:g==null?void 0:g.curvature}),b=e.isInternal?void 0:t;return C.jsx(Bu,{id:b,path:m,labelX:x,labelY:_,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:p,markerEnd:v,markerStart:w,interactionWidth:y})})}const hP=XE({isInternal:!1}),ZE=XE({isInternal:!0});hP.displayName="BezierEdge";ZE.displayName="BezierEdgeInternal";const vy={default:ZE,straight:qE,step:YE,smoothstep:WE,simplebezier:$E},wy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},pP=(e,t,n)=>n===se.Left?e-t:n===se.Right?e+t:e,gP=(e,t,n)=>n===se.Top?e-t:n===se.Bottom?e+t:e,xy="react-flow__edgeupdater";function by({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:l}){return C.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:Xe([xy,`${xy}-${l}`]),cx:pP(t,r,e),cy:gP(n,r,e),r,stroke:"transparent",fill:"transparent"})}function mP({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:c,onReconnectEnd:f,setReconnecting:h,setUpdateHover:d}){const p=Oe(),v=(x,_)=>{if(x.button!==0)return;const{autoPanOnConnect:b,domNode:k,connectionMode:A,connectionRadius:T,lib:N,onConnectStart:R,cancelConnection:j,nodeLookup:F,rfId:S,panBy:O,updateConnection:P}=p.getState(),z=_.type==="target",I=(B,H)=>{h(!1),f==null||f(B,n,_.type,H)},M=B=>u==null?void 0:u(n,B),E=(B,H)=>{h(!0),c==null||c(x,n,_.type),R==null||R(B,H)};Cd.onPointerDown(x.nativeEvent,{autoPanOnConnect:b,connectionMode:A,connectionRadius:T,domNode:k,handleId:_.id,nodeId:_.nodeId,nodeLookup:F,isTarget:z,edgeUpdaterType:_.type,lib:N,flowId:S,cancelConnection:j,panBy:O,isValidConnection:(...B)=>{var H,D;return((D=(H=p.getState()).isValidConnection)==null?void 0:D.call(H,...B))??!0},onConnect:M,onConnectStart:E,onConnectEnd:(...B)=>{var H,D;return(D=(H=p.getState()).onConnectEnd)==null?void 0:D.call(H,...B)},onReconnectEnd:I,updateConnection:P,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},w=x=>v(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=x=>v(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>d(!0),m=()=>d(!1);return C.jsxs(C.Fragment,{children:[(e===!0||e==="source")&&C.jsx(by,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:w,onMouseEnter:y,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&C.jsx(by,{position:a,centerX:o,centerY:s,radius:t,onMouseDown:g,onMouseEnter:y,onMouseOut:m,type:"target"})]})}function yP({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:c,onReconnect:f,onReconnectStart:h,onReconnectEnd:d,rfId:p,edgeTypes:v,noPanClassName:w,onError:g,disableKeyboardA11y:y}){let m=Ee(re=>re.edgeLookup.get(e));const x=Ee(re=>re.defaultEdgeOptions);m=x?{...x,...m}:m;let _=m.type||"default",b=(v==null?void 0:v[_])||vy[_];b===void 0&&(g==null||g("011",mn.error011(_)),_="default",b=(v==null?void 0:v.default)||vy.default);const k=!!(m.focusable||t&&typeof m.focusable>"u"),A=typeof f<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),T=!!(m.selectable||r&&typeof m.selectable>"u"),N=L.useRef(null),[R,j]=L.useState(!1),[F,S]=L.useState(!1),O=Oe(),{zIndex:P=m.zIndex,sourceX:z,sourceY:I,targetX:M,targetY:E,sourcePosition:B,targetPosition:H}=Ee(L.useCallback(re=>{const ie=re.nodeLookup.get(m.source),ge=re.nodeLookup.get(m.target);if(!ie||!ge)return wy;const me=VI({id:e,sourceNode:ie,targetNode:ge,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:re.connectionMode,onError:g}),ce=PI({selected:m.selected,zIndex:m.zIndex,sourceNode:ie,targetNode:ge,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode});return{...me||wy,zIndex:ce}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),Be),D=L.useMemo(()=>m.markerStart?`url('#${_d(m.markerStart,p)}')`:void 0,[m.markerStart,p]),Y=L.useMemo(()=>m.markerEnd?`url('#${_d(m.markerEnd,p)}')`:void 0,[m.markerEnd,p]);if(m.hidden||z===null||I===null||M===null||E===null)return null;const ne=re=>{var ce;const{addSelectedEdges:ie,unselectNodesAndEdges:ge,multiSelectionActive:me}=O.getState();T&&(O.setState({nodesSelectionActive:!1}),m.selected&&me?(ge({nodes:[],edges:[m]}),(ce=N.current)==null||ce.blur()):ie([e])),i&&i(re,m)},J=o?re=>{o(re,{...m})}:void 0,ee=s?re=>{s(re,{...m})}:void 0,G=l?re=>{l(re,{...m})}:void 0,Z=a?re=>{a(re,{...m})}:void 0,le=u?re=>{u(re,{...m})}:void 0,oe=re=>{var ie;if(!y&&$b.includes(re.key)&&T){const{unselectNodesAndEdges:ge,addSelectedEdges:me}=O.getState();re.key==="Escape"?((ie=N.current)==null||ie.blur(),ge({edges:[m]})):me([e])}};return C.jsx("svg",{style:{zIndex:P},children:C.jsxs("g",{className:Xe(["react-flow__edge",`react-flow__edge-${_}`,m.className,w,{selected:m.selected,animated:m.animated,inactive:!T&&!i,updating:R,selectable:T}]),onClick:ne,onDoubleClick:J,onContextMenu:ee,onMouseEnter:G,onMouseMove:Z,onMouseLeave:le,onKeyDown:k?oe:void 0,tabIndex:k?0:void 0,role:m.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":k?`${SE}-${p}`:void 0,ref:N,...m.domAttributes,children:[!F&&C.jsx(b,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:T,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:z,sourceY:I,targetX:M,targetY:E,sourcePosition:B,targetPosition:H,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:D,markerEnd:Y,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),A&&C.jsx(mP,{edge:m,isReconnectable:A,reconnectRadius:c,onReconnect:f,onReconnectStart:h,onReconnectEnd:d,sourceX:z,sourceY:I,targetX:M,targetY:E,sourcePosition:B,targetPosition:H,setUpdateHover:j,setReconnecting:S})]})})}var vP=L.memo(yP);const wP=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function KE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:f,onEdgeDoubleClick:h,onReconnectStart:d,onReconnectEnd:p,disableKeyboardA11y:v}){const{edgesFocusable:w,edgesReconnectable:g,elementsSelectable:y,onError:m}=Ee(wP,Be),x=rP(t);return C.jsxs("div",{className:"react-flow__edges",children:[C.jsx(aP,{defaultColor:e,rfId:n}),x.map(_=>C.jsx(vP,{id:_,edgesFocusable:w,edgesReconnectable:g,elementsSelectable:y,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:c,reconnectRadius:f,onDoubleClick:h,onReconnectStart:d,onReconnectEnd:p,rfId:n,onError:m,edgeTypes:r,disableKeyboardA11y:v},_))]})}KE.displayName="EdgeRenderer";const xP=L.memo(KE),Ey=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function bP({children:e}){const t=Oe(),n=L.useRef(null),[r]=L.useState(()=>t.getState().transform);return TE(()=>{let i=null;const o=()=>{const s=t.getState().transform;i&&s[0]===i[0]&&s[1]===i[1]&&s[2]===i[2]||(i=s,n.current&&(n.current.style.transform=Ey(s)))};return o(),t.subscribe(o)},[t]),C.jsx("div",{ref:n,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:Ey(r)},children:e})}function EP(e){const t=dp(),n=L.useRef(!1);L.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const kP=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function _P(e){const t=Ee(kP),n=Oe();return L.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function SP(e){return e.connection.inProgress?{...e.connection,to:Us(e.connection.to,e.transform)}:{...e.connection}}function CP(e){return SP}function AP(e){const t=CP();return Ee(t,Be)}const NP=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function DP({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:l,inProgress:a}=Ee(NP,Be);return!(o&&i&&a)?null:C.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:C.jsx("g",{className:Xe(["react-flow__connection",Wb(l)]),children:C.jsx(JE,{style:t,type:n,CustomComponent:r,isValid:l})})})}const JE=({style:e,type:t=sr.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:c,toHandle:f,toPosition:h,pointer:d}=AP();if(!i)return;if(n)return C.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:o.x,fromY:o.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:h,connectionStatus:Wb(r),toNode:c,toHandle:f,pointer:d});let p="";const v={sourceX:o.x,sourceY:o.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:h};switch(t){case sr.Bezier:[p]=iE(v);break;case sr.SimpleBezier:[p]=BE(v);break;case sr.Step:[p]=kd({...v,borderRadius:0});break;case sr.SmoothStep:[p]=kd(v);break;default:[p]=sE(v)}return C.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};JE.displayName="ConnectionLine";const TP={};function ky(e=TP){L.useRef(e),Oe(),L.useEffect(()=>{},[e])}function RP(){Oe(),L.useRef(!1),L.useEffect(()=>{},[])}function ek({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:f,onSelectionStart:h,onSelectionEnd:d,connectionLineType:p,connectionLineStyle:v,connectionLineComponent:w,connectionLineContainerStyle:g,selectionKeyCode:y,selectionOnDrag:m,selectionMode:x,multiSelectionKeyCode:_,panActivationKeyCode:b,zoomActivationKeyCode:k,deleteKeyCode:A,onlyRenderVisibleElements:T,elementsSelectable:N,defaultViewport:R,translateExtent:j,minZoom:F,maxZoom:S,preventScrolling:O,defaultMarkerColor:P,zoomOnScroll:z,zoomOnPinch:I,panOnScroll:M,panOnScrollSpeed:E,panOnScrollMode:B,zoomOnDoubleClick:H,panOnDrag:D,autoPanOnSelection:Y,onPaneClick:ne,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:G,onPaneScroll:Z,onPaneContextMenu:le,paneClickDistance:oe,nodeClickDistance:re,onEdgeContextMenu:ie,onEdgeMouseEnter:ge,onEdgeMouseMove:me,onEdgeMouseLeave:ce,reconnectRadius:Ae,onReconnect:Je,onReconnectStart:ht,onReconnectEnd:pt,noDragClassName:Rt,noWheelClassName:Jt,noPanClassName:en,disableKeyboardA11y:tn,nodeExtent:gt,rfId:W,viewport:X,onViewportChange:ae,nodesDraggable:pe}){return ky(e),ky(t),RP(),EP(n),_P(X),C.jsx(YO,{onPaneClick:ne,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:Z,paneClickDistance:oe,deleteKeyCode:A,selectionKeyCode:y,selectionOnDrag:m,selectionMode:x,onSelectionStart:h,onSelectionEnd:d,multiSelectionKeyCode:_,panActivationKeyCode:b,zoomActivationKeyCode:k,elementsSelectable:N,zoomOnScroll:z,zoomOnPinch:I,zoomOnDoubleClick:H,panOnScroll:M,panOnScrollSpeed:E,panOnScrollMode:B,panOnDrag:D,autoPanOnSelection:Y,defaultViewport:R,translateExtent:j,minZoom:F,maxZoom:S,onSelectionContextMenu:f,preventScrolling:O,noDragClassName:Rt,noWheelClassName:Jt,noPanClassName:en,disableKeyboardA11y:tn,onViewportChange:ae,isControlledViewport:!!X,children:C.jsxs(bP,{children:[C.jsx(xP,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:Je,onReconnectStart:ht,onReconnectEnd:pt,onlyRenderVisibleElements:T,onEdgeContextMenu:ie,onEdgeMouseEnter:ge,onEdgeMouseMove:me,onEdgeMouseLeave:ce,reconnectRadius:Ae,defaultMarkerColor:P,noPanClassName:en,disableKeyboardA11y:tn,rfId:W}),C.jsx(DP,{style:v,type:p,component:w,containerStyle:g}),C.jsx("div",{className:"react-flow__edgelabel-renderer"}),C.jsx(nP,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:re,onlyRenderVisibleElements:T,noPanClassName:en,noDragClassName:Rt,disableKeyboardA11y:tn,nodeExtent:gt,rfId:W,nodesDraggable:pe}),C.jsx("div",{className:"react-flow__viewport-portal"})]})})}ek.displayName="GraphView";const IP=L.memo(ek),MP=Zb(),_y=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:f,zIndexMode:h="basic"}={})=>{const d=new Map,p=new Map,v=new Map,w=new Map,g=r??t??[],y=n??e??[],m=c??[0,0],x=f??Es;uE(v,w,g);const{nodesInitialized:_}=Sd(y,d,p,{nodeOrigin:m,nodeExtent:x,zIndexMode:h});let b=[0,0,1];if(s&&i&&o){const k=$s(d,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:A,y:T,zoom:N}=ip(k,i,o,a,u,(l==null?void 0:l.padding)??.1);b=[A,T,N]}return{rfId:"1",width:i??0,height:o??0,transform:b,nodes:y,nodesInitialized:_,nodeLookup:d,parentLookup:p,edges:g,edgeLookup:w,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:Es,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:no.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Ub},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:MP,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Vb,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},OP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,zIndexMode:h})=>QM((d,p)=>{async function v(){const{nodeLookup:w,panZoom:g,fitViewOptions:y,fitViewResolver:m,width:x,height:_,minZoom:b,maxZoom:k}=p();g&&(await NI({nodes:w,width:x,height:_,panZoom:g,minZoom:b,maxZoom:k},y),m==null||m.resolve(!0),d({fitViewResolver:null}))}return{..._y({nodes:e,edges:t,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:h}),setNodes:w=>{const{nodeLookup:g,parentLookup:y,nodeOrigin:m,elevateNodesOnSelect:x,fitViewQueued:_,zIndexMode:b,nodesSelectionActive:k}=p(),{nodesInitialized:A,hasSelectedNodes:T}=Sd(w,g,y,{nodeOrigin:m,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:b}),N=k&&T;_&&A?(v(),d({nodes:w,nodesInitialized:A,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:N})):d({nodes:w,nodesInitialized:A,nodesSelectionActive:N})},setEdges:w=>{const{connectionLookup:g,edgeLookup:y}=p();uE(g,y,w),d({edges:w})},setDefaultNodesAndEdges:(w,g)=>{if(w){const{setNodes:y}=p();y(w),d({hasDefaultNodes:!0})}if(g){const{setEdges:y}=p();y(g),d({hasDefaultEdges:!0})}},updateNodeInternals:w=>{const{triggerNodeChanges:g,nodeLookup:y,parentLookup:m,domNode:x,nodeOrigin:_,nodeExtent:b,debug:k,fitViewQueued:A,zIndexMode:T}=p(),{changes:N,updatedInternals:R}=ZI(w,y,m,x,_,b,T);R&&(YI(y,m,{nodeOrigin:_,nodeExtent:b,zIndexMode:T}),A?(v(),d({fitViewQueued:!1,fitViewOptions:void 0})):d({}),(N==null?void 0:N.length)>0&&(k&&console.log("React Flow: trigger node changes",N),g==null||g(N)))},updateNodePositions:(w,g=!1)=>{const y=[];let m=[];const{nodeLookup:x,triggerNodeChanges:_,connection:b,updateConnection:k,onNodesChangeMiddlewareMap:A}=p();for(const[T,N]of w){const R=x.get(T),j=!!(R!=null&&R.expandParent&&(R!=null&&R.parentId)&&(N!=null&&N.position)),F={id:T,type:"position",position:j?{x:Math.max(0,N.position.x),y:Math.max(0,N.position.y)}:N.position,dragging:g};if(R&&b.inProgress&&b.fromNode.id===R.id){const S=si(R,b.fromHandle,se.Left,!0);k({...b,from:S})}j&&R.parentId&&y.push({id:T,parentId:R.parentId,rect:{...N.internals.positionAbsolute,width:N.measured.width??0,height:N.measured.height??0}}),m.push(F)}if(y.length>0){const{parentLookup:T,nodeOrigin:N}=p(),R=cp(y,x,T,N);m.push(...R)}for(const T of A.values())m=T(m);_(m)},triggerNodeChanges:w=>{const{onNodesChange:g,setNodes:y,nodes:m,hasDefaultNodes:x,debug:_}=p();if(w!=null&&w.length){if(x){const b=fp(w,m);y(b)}_&&console.log("React Flow: trigger node changes",w),g==null||g(w)}},triggerEdgeChanges:w=>{const{onEdgesChange:g,setEdges:y,edges:m,hasDefaultEdges:x,debug:_}=p();if(w!=null&&w.length){if(x){const b=NE(w,m);y(b)}_&&console.log("React Flow: trigger edge changes",w),g==null||g(w)}},addSelectedNodes:w=>{const{multiSelectionActive:g,edgeLookup:y,nodeLookup:m,triggerNodeChanges:x,triggerEdgeChanges:_}=p();if(g){const b=w.map(k=>Pr(k,!0));x(b);return}x(Li(m,new Set([...w]),!0)),_(Li(y))},addSelectedEdges:w=>{const{multiSelectionActive:g,edgeLookup:y,nodeLookup:m,triggerNodeChanges:x,triggerEdgeChanges:_}=p();if(g){const b=w.map(k=>Pr(k,!0));_(b);return}_(Li(y,new Set([...w]))),x(Li(m,new Set,!0))},unselectNodesAndEdges:({nodes:w,edges:g}={})=>{const{edges:y,nodes:m,nodeLookup:x,triggerNodeChanges:_,triggerEdgeChanges:b}=p(),k=w||m,A=g||y,T=[];for(const R of k){if(!R.selected)continue;const j=x.get(R.id);j&&(j.selected=!1),T.push(Pr(R.id,!1))}const N=[];for(const R of A)R.selected&&N.push(Pr(R.id,!1));_(T),b(N)},setMinZoom:w=>{const{panZoom:g,maxZoom:y}=p();g==null||g.setScaleExtent([w,y]),d({minZoom:w})},setMaxZoom:w=>{const{panZoom:g,minZoom:y}=p();g==null||g.setScaleExtent([y,w]),d({maxZoom:w})},setTranslateExtent:w=>{var g;(g=p().panZoom)==null||g.setTranslateExtent(w),d({translateExtent:w})},resetSelectedElements:()=>{const{edges:w,nodes:g,triggerNodeChanges:y,triggerEdgeChanges:m,elementsSelectable:x}=p();if(!x)return;const _=g.reduce((k,A)=>A.selected?[...k,Pr(A.id,!1)]:k,[]),b=w.reduce((k,A)=>A.selected?[...k,Pr(A.id,!1)]:k,[]);y(_),m(b)},setNodeExtent:w=>{const{nodes:g,nodeLookup:y,parentLookup:m,nodeOrigin:x,elevateNodesOnSelect:_,nodeExtent:b,zIndexMode:k}=p();w[0][0]===b[0][0]&&w[0][1]===b[0][1]&&w[1][0]===b[1][0]&&w[1][1]===b[1][1]||(Sd(g,y,m,{nodeOrigin:x,nodeExtent:w,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:k}),d({nodeExtent:w}))},panBy:w=>{const{transform:g,width:y,height:m,panZoom:x,translateExtent:_}=p();return KI({delta:w,panZoom:x,transform:g,translateExtent:_,width:y,height:m})},setCenter:async(w,g,y)=>{const{width:m,height:x,maxZoom:_,panZoom:b}=p();if(!b)return!1;const k=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:_;return await b.setViewport({x:m/2-w*k,y:x/2-g*k,zoom:k},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{d({connection:{...Ub}})},updateConnection:w=>{d({connection:w})},reset:()=>d({..._y()})}},Object.is);function PP({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:c,nodeExtent:f,zIndexMode:h,children:d}){const[p]=L.useState(()=>OP({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:c,nodeExtent:f,zIndexMode:h}));return C.jsx(qM,{value:p,children:C.jsx(wO,{children:C.jsx(OO,{children:d})})})}function LP({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:c,nodeOrigin:f,nodeExtent:h,zIndexMode:d}){return L.useContext(zu)?C.jsx(C.Fragment,{children:e}):C.jsx(PP,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:f,nodeExtent:h,zIndexMode:d,children:e})}const zP={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function jP({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:h,onConnect:d,onConnectStart:p,onConnectEnd:v,onClickConnectStart:w,onClickConnectEnd:g,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:x,onNodeContextMenu:_,onNodeDoubleClick:b,onNodeDragStart:k,onNodeDrag:A,onNodeDragStop:T,onNodesDelete:N,onEdgesDelete:R,onDelete:j,onSelectionChange:F,onSelectionDragStart:S,onSelectionDrag:O,onSelectionDragStop:P,onSelectionContextMenu:z,onSelectionStart:I,onSelectionEnd:M,onBeforeDelete:E,connectionMode:B,connectionLineType:H=sr.Bezier,connectionLineStyle:D,connectionLineComponent:Y,connectionLineContainerStyle:ne,deleteKeyCode:J="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:G=!1,selectionMode:Z=ks.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:oe=Ss()?"Meta":"Control",zoomActivationKeyCode:re=Ss()?"Meta":"Control",snapToGrid:ie,snapGrid:ge,onlyRenderVisibleElements:me=!1,selectNodesOnDrag:ce,nodesDraggable:Ae,autoPanOnNodeFocus:Je,nodesConnectable:ht,nodesFocusable:pt,nodeOrigin:Rt=CE,edgesFocusable:Jt,edgesReconnectable:en,elementsSelectable:tn=!0,defaultViewport:gt=aO,minZoom:W=.5,maxZoom:X=2,translateExtent:ae=Es,preventScrolling:pe=!0,nodeExtent:V,defaultMarkerColor:K="#b1b1b7",zoomOnScroll:ye=!0,zoomOnPinch:ue=!0,panOnScroll:Ne=!1,panOnScrollSpeed:_e=.5,panOnScrollMode:Ue=qr.Free,zoomOnDoubleClick:nn=!0,panOnDrag:bt=!0,onPaneClick:kS,onPaneMouseEnter:_S,onPaneMouseMove:SS,onPaneMouseLeave:CS,onPaneScroll:AS,onPaneContextMenu:NS,paneClickDistance:DS=1,nodeClickDistance:TS=0,children:RS,onReconnect:IS,onReconnectStart:MS,onReconnectEnd:OS,onEdgeContextMenu:PS,onEdgeDoubleClick:LS,onEdgeMouseEnter:zS,onEdgeMouseMove:jS,onEdgeMouseLeave:FS,reconnectRadius:BS=10,onNodesChange:HS,onEdgesChange:$S,noDragClassName:VS="nodrag",noWheelClassName:US="nowheel",noPanClassName:og="nopan",fitView:sg,fitViewOptions:lg,connectOnClick:WS,attributionPosition:GS,proOptions:YS,defaultEdgeOptions:QS,elevateNodesOnSelect:qS=!0,elevateEdgesOnSelect:XS=!1,disableKeyboardA11y:ag=!1,autoPanOnConnect:ZS,autoPanOnNodeDrag:KS,autoPanOnSelection:JS=!0,autoPanSpeed:eC,connectionRadius:tC,isValidConnection:nC,onError:rC,style:iC,id:ug,nodeDragThreshold:oC,connectionDragThreshold:sC,viewport:lC,onViewportChange:aC,width:uC,height:cC,colorMode:fC="light",debug:dC,onScroll:Zs,ariaLabelConfig:hC,zIndexMode:cg="basic",...pC},gC){const Ku=ug||"1",mC=dO(fC),yC=L.useCallback(fg=>{fg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Zs==null||Zs(fg)},[Zs]);return C.jsx("div",{"data-testid":"rf__wrapper",...pC,onScroll:yC,style:{...iC,...zP},ref:gC,className:Xe(["react-flow",i,mC]),id:ug,role:"application",children:C.jsxs(LP,{nodes:e,edges:t,width:uC,height:cC,fitView:sg,fitViewOptions:lg,minZoom:W,maxZoom:X,nodeOrigin:Rt,nodeExtent:V,zIndexMode:cg,children:[C.jsx(fO,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:d,onConnectStart:p,onConnectEnd:v,onClickConnectStart:w,onClickConnectEnd:g,nodesDraggable:Ae,autoPanOnNodeFocus:Je,nodesConnectable:ht,nodesFocusable:pt,edgesFocusable:Jt,edgesReconnectable:en,elementsSelectable:tn,elevateNodesOnSelect:qS,elevateEdgesOnSelect:XS,minZoom:W,maxZoom:X,nodeExtent:V,onNodesChange:HS,onEdgesChange:$S,snapToGrid:ie,snapGrid:ge,connectionMode:B,translateExtent:ae,connectOnClick:WS,defaultEdgeOptions:QS,fitView:sg,fitViewOptions:lg,onNodesDelete:N,onEdgesDelete:R,onDelete:j,onNodeDragStart:k,onNodeDrag:A,onNodeDragStop:T,onSelectionDrag:O,onSelectionDragStart:S,onSelectionDragStop:P,onMove:c,onMoveStart:f,onMoveEnd:h,noPanClassName:og,nodeOrigin:Rt,rfId:Ku,autoPanOnConnect:ZS,autoPanOnNodeDrag:KS,autoPanSpeed:eC,onError:rC,connectionRadius:tC,isValidConnection:nC,selectNodesOnDrag:ce,nodeDragThreshold:oC,connectionDragThreshold:sC,onBeforeDelete:E,debug:dC,ariaLabelConfig:hC,zIndexMode:cg}),C.jsx(IP,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:x,onNodeContextMenu:_,onNodeDoubleClick:b,nodeTypes:o,edgeTypes:s,connectionLineType:H,connectionLineStyle:D,connectionLineComponent:Y,connectionLineContainerStyle:ne,selectionKeyCode:ee,selectionOnDrag:G,selectionMode:Z,deleteKeyCode:J,multiSelectionKeyCode:oe,panActivationKeyCode:le,zoomActivationKeyCode:re,onlyRenderVisibleElements:me,defaultViewport:gt,translateExtent:ae,minZoom:W,maxZoom:X,preventScrolling:pe,zoomOnScroll:ye,zoomOnPinch:ue,zoomOnDoubleClick:nn,panOnScroll:Ne,panOnScrollSpeed:_e,panOnScrollMode:Ue,panOnDrag:bt,autoPanOnSelection:JS,onPaneClick:kS,onPaneMouseEnter:_S,onPaneMouseMove:SS,onPaneMouseLeave:CS,onPaneScroll:AS,onPaneContextMenu:NS,paneClickDistance:DS,nodeClickDistance:TS,onSelectionContextMenu:z,onSelectionStart:I,onSelectionEnd:M,onReconnect:IS,onReconnectStart:MS,onReconnectEnd:OS,onEdgeContextMenu:PS,onEdgeDoubleClick:LS,onEdgeMouseEnter:zS,onEdgeMouseMove:jS,onEdgeMouseLeave:FS,reconnectRadius:BS,defaultMarkerColor:K,noDragClassName:VS,noWheelClassName:US,noPanClassName:og,rfId:Ku,disableKeyboardA11y:ag,nodeExtent:V,viewport:lC,onViewportChange:aC,nodesDraggable:Ae}),C.jsx(lO,{onSelectionChange:F}),RS,C.jsx(nO,{proOptions:YS,position:GS}),C.jsx(tO,{rfId:Ku,disableKeyboardA11y:ag})]})})}var FP=DE(jP);function BP(e){const[t,n]=L.useState(e),r=L.useCallback(i=>n(o=>fp(i,o)),[]);return[t,n,r]}function HP(e){const[t,n]=L.useState(e),r=L.useCallback(i=>n(o=>NE(i,o)),[]);return[t,n,r]}function $P({dimensions:e,lineWidth:t,variant:n,className:r}){return C.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Xe(["react-flow__background-pattern",n,r])})}function VP({radius:e,className:t}){return C.jsx("circle",{cx:e,cy:e,r:e,className:Xe(["react-flow__background-pattern","dots",t])})}var xr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xr||(xr={}));const UP={[xr.Dots]:1,[xr.Lines]:1,[xr.Cross]:6},WP=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tk({id:e,variant:t=xr.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:l,style:a,className:u,patternClassName:c}){const f=L.useRef(null),{transform:h,patternId:d}=Ee(WP,Be),p=r||UP[t],v=t===xr.Dots,w=t===xr.Cross,g=Array.isArray(n)?n:[n,n],y=[g[0]*h[2]||1,g[1]*h[2]||1],m=p*h[2],x=Array.isArray(o)?o:[o,o],_=w?[m,m]:y,b=[x[0]*h[2]||1+_[0]/2,x[1]*h[2]||1+_[1]/2],k=`${d}${e||""}`;return C.jsxs("svg",{className:Xe(["react-flow__background",u]),style:{...a,...Fu,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[C.jsx("pattern",{id:k,x:h[0]%y[0],y:h[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${b[0]},-${b[1]})`,children:v?C.jsx(VP,{radius:m/2,className:c}):C.jsx($P,{dimensions:_,lineWidth:i,variant:t,className:c})}),C.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}tk.displayName="Background";const GP=L.memo(tk);function YP(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:C.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QP(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:C.jsx("path",{d:"M0 0h32v4.2H0z"})})}function qP(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:C.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function XP(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:C.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function ZP(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:C.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function kl({children:e,className:t,...n}){return C.jsx("button",{type:"button",className:Xe(["react-flow__controls-button",t]),...n,children:e})}const KP=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function nk({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:c,position:f="bottom-left",orientation:h="vertical","aria-label":d}){const p=Oe(),{isInteractive:v,minZoomReached:w,maxZoomReached:g,ariaLabelConfig:y}=Ee(KP,Be),{zoomIn:m,zoomOut:x,fitView:_}=dp(),b=()=>{m(),o==null||o()},k=()=>{x(),s==null||s()},A=()=>{_(i),l==null||l()},T=()=>{p.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),a==null||a(!v)},N=h==="horizontal"?"horizontal":"vertical";return C.jsxs(ju,{className:Xe(["react-flow__controls",N,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":d??y["controls.ariaLabel"],children:[t&&C.jsxs(C.Fragment,{children:[C.jsx(kl,{onClick:b,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:g,children:C.jsx(YP,{})}),C.jsx(kl,{onClick:k,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:w,children:C.jsx(QP,{})})]}),n&&C.jsx(kl,{className:"react-flow__controls-fitview",onClick:A,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:C.jsx(qP,{})}),r&&C.jsx(kl,{className:"react-flow__controls-interactive",onClick:T,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:v?C.jsx(ZP,{}):C.jsx(XP,{})}),c]})}nk.displayName="Controls";const JP=L.memo(nk);function e2({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:c,shapeRendering:f,selected:h,onClick:d}){const{background:p,backgroundColor:v}=o||{},w=s||p||v;return C.jsx("rect",{className:Xe(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:c,ry:c,width:r,height:i,style:{fill:w,stroke:l,strokeWidth:a},shapeRendering:f,onClick:d?g=>d(g,e):void 0})}const t2=L.memo(e2),n2=e=>e.nodes.map(t=>t.id),Oc=e=>e instanceof Function?e:()=>e;function r2({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=t2,onClick:s}){const l=Ee(n2,Be),a=Oc(t),u=Oc(e),c=Oc(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return C.jsx(C.Fragment,{children:l.map(h=>C.jsx(o2,{id:h,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:f},h))})}function i2({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:c,y:f,width:h,height:d}=Ee(p=>{const v=p.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const w=v.internals.userNode,{x:g,y}=v.internals.positionAbsolute,{width:m,height:x}=Rn(w);return{node:w,x:g,y,width:m,height:x}},Be);return!u||u.hidden||!Kb(u)?null:C.jsx(l,{x:c,y:f,width:h,height:d,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:o,shapeRendering:s,onClick:a,id:u.id})}const o2=L.memo(i2);var s2=L.memo(r2);const l2=200,a2=150,u2=e=>!e.hidden,c2=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?qb($s(e.nodeLookup,{filter:u2}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Sy=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,f2=(e,t)=>Sy(e.viewBB,t.viewBB)&&Sy(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,d2="react-flow__minimap-desc";function rk({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:c,maskStrokeWidth:f,position:h="bottom-right",onClick:d,onNodeClick:p,pannable:v=!1,zoomable:w=!1,ariaLabel:g,inversePan:y,zoomStep:m=1,offsetScale:x=5}){const _=Oe(),b=L.useRef(null),{boundingRect:k,viewBB:A,rfId:T,panZoom:N,translateExtent:R,flowWidth:j,flowHeight:F,ariaLabelConfig:S}=Ee(c2,f2),O=(e==null?void 0:e.width)??l2,P=(e==null?void 0:e.height)??a2,z=k.width/O,I=k.height/P,M=Math.max(z,I),E=M*O,B=M*P,H=x*M,D=k.x-(E-k.width)/2-H,Y=k.y-(B-k.height)/2-H,ne=E+H*2,J=B+H*2,ee=`${d2}-${T}`,G=L.useRef(0),Z=L.useRef();G.current=M,L.useEffect(()=>{if(b.current&&N)return Z.current=lM({domNode:b.current,panZoom:N,getTransform:()=>_.getState().transform,getViewScale:()=>G.current}),()=>{var ie;(ie=Z.current)==null||ie.destroy()}},[N]),L.useEffect(()=>{var ie;(ie=Z.current)==null||ie.update({translateExtent:R,width:j,height:F,inversePan:y,pannable:v,zoomStep:m,zoomable:w})},[v,w,y,m,R,j,F]);const le=d?ie=>{var ce;const[ge,me]=((ce=Z.current)==null?void 0:ce.pointer(ie))||[0,0];d(ie,{x:ge,y:me})}:void 0,oe=p?L.useCallback((ie,ge)=>{const me=_.getState().nodeLookup.get(ge).internals.userNode;p(ie,me)},[]):void 0,re=g??S["minimap.ariaLabel"];return C.jsx(ju,{position:h,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*M:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Xe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:C.jsxs("svg",{width:O,height:P,viewBox:`${D} ${Y} ${ne} ${J}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:b,onClick:le,children:[re&&C.jsx("title",{id:ee,children:re}),C.jsx(s2,{onClick:oe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:l}),C.jsx("path",{className:"react-flow__minimap-mask",d:`M${D-H},${Y-H}h${ne+H*2}v${J+H*2}h${-ne-H*2}z
62
+ M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}rk.displayName="MiniMap";const h2=L.memo(rk),p2=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,g2={[li.Line]:"right",[li.Handle]:"bottom-right"};function m2({nodeId:e,position:t,variant:n=li.Handle,className:r,style:i=void 0,children:o,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:h,autoScale:d=!0,shouldResize:p,onResizeStart:v,onResize:w,onResizeEnd:g}){const y=OE(),m=typeof e=="string"?e:y,x=Oe(),_=L.useRef(null),b=n===li.Handle,k=Ee(L.useCallback(p2(b&&d),[b,d]),Be),A=L.useRef(null),T=t??g2[n];L.useEffect(()=>{if(!(!_.current||!m))return A.current||(A.current=EM({domNode:_.current,nodeId:m,getStoreItems:()=>{const{nodeLookup:R,transform:j,snapGrid:F,snapToGrid:S,nodeOrigin:O,domNode:P}=x.getState();return{nodeLookup:R,transform:j,snapGrid:F,snapToGrid:S,nodeOrigin:O,paneDomNode:P}},onChange:(R,j)=>{const{triggerNodeChanges:F,nodeLookup:S,parentLookup:O,nodeOrigin:P}=x.getState(),z=[],I={x:R.x,y:R.y},M=S.get(m);if(M&&M.expandParent&&M.parentId){const E=M.origin??P,B=R.width??M.measured.width??0,H=R.height??M.measured.height??0,D={id:M.id,parentId:M.parentId,rect:{width:B,height:H,...Jb({x:R.x??M.position.x,y:R.y??M.position.y},{width:B,height:H},M.parentId,S,E)}},Y=cp([D],S,O,P);z.push(...Y),I.x=R.x?Math.max(E[0]*B,R.x):void 0,I.y=R.y?Math.max(E[1]*H,R.y):void 0}if(I.x!==void 0&&I.y!==void 0){const E={id:m,type:"position",position:{...I}};z.push(E)}if(R.width!==void 0&&R.height!==void 0){const B={id:m,type:"dimensions",resizing:!0,setAttributes:h?h==="horizontal"?"width":"height":!0,dimensions:{width:R.width,height:R.height}};z.push(B)}for(const E of j){const B={...E,type:"position"};z.push(B)}F(z)},onEnd:({width:R,height:j})=>{const F={id:m,type:"dimensions",resizing:!1,dimensions:{width:R,height:j}};x.getState().triggerNodeChanges([F])}})),A.current.update({controlPosition:T,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:c},keepAspectRatio:f,resizeDirection:h,onResizeStart:v,onResize:w,onResizeEnd:g,shouldResize:p}),()=>{var R;(R=A.current)==null||R.destroy()}},[T,l,a,u,c,f,v,w,g,p]);const N=T.split("-");return C.jsx("div",{className:Xe(["react-flow__resize-control","nodrag",...N,n,r]),ref:_,style:{...i,scale:k,...s&&{[b?"backgroundColor":"borderColor"]:s}},children:o})}const Cy=L.memo(m2);function ik({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:r,lineClassName:i,lineStyle:o,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,autoScale:h=!0,shouldResize:d,onResizeStart:p,onResize:v,onResizeEnd:w}){return t?C.jsxs(C.Fragment,{children:[yM.map(g=>C.jsx(Cy,{className:i,style:o,nodeId:e,position:g,variant:li.Line,color:s,minWidth:l,minHeight:a,maxWidth:u,maxHeight:c,onResizeStart:p,keepAspectRatio:f,autoScale:h,shouldResize:d,onResize:v,onResizeEnd:w},g)),mM.map(g=>C.jsx(Cy,{className:n,style:r,nodeId:e,position:g,color:s,minWidth:l,minHeight:a,maxWidth:u,maxHeight:c,onResizeStart:p,keepAspectRatio:f,autoScale:h,shouldResize:d,onResize:v,onResizeEnd:w},g))]}):null}function y2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const v2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x2={};function Ay(e,t){return(x2.jsx?w2:v2).test(e)}const b2=/[ \t\n\f\r]/g;function E2(e){return typeof e=="object"?e.type==="text"?Ny(e.value):!1:Ny(e)}function Ny(e){return e.replace(b2,"")===""}class Ws{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ws.prototype.normal={};Ws.prototype.property={};Ws.prototype.space=void 0;function ok(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ws(n,r,t)}function Nd(e){return e.toLowerCase()}class Tt{constructor(t,n){this.attribute=n,this.property=t}}Tt.prototype.attribute="";Tt.prototype.booleanish=!1;Tt.prototype.boolean=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.defined=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.number=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.property="";Tt.prototype.spaceSeparated=!1;Tt.prototype.space=void 0;let k2=0;const he=di(),Ye=di(),Dd=di(),q=di(),De=di(),Xr=di(),It=di();function di(){return 2**++k2}const Td=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:Ye,commaOrSpaceSeparated:It,commaSeparated:Xr,number:q,overloadedBoolean:Dd,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),Pc=Object.keys(Td);class pp extends Tt{constructor(t,n,r,i){let o=-1;if(super(t,n),Dy(this,"space",i),typeof r=="number")for(;++o<Pc.length;){const s=Pc[o];Dy(this,Pc[o],(r&Td[s])===Td[s])}}}pp.prototype.defined=!0;function Dy(e,t,n){n&&(e[t]=n)}function go(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new pp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Nd(r)]=r,n[Nd(o.attribute)]=r}return new Ws(t,n,e.space)}const sk=go({properties:{ariaActiveDescendant:null,ariaAtomic:Ye,ariaAutoComplete:null,ariaBusy:Ye,ariaChecked:Ye,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:Ye,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:Ye,ariaFlowTo:De,ariaGrabbed:Ye,ariaHasPopup:null,ariaHidden:Ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:q,ariaLive:null,ariaModal:Ye,ariaMultiLine:Ye,ariaMultiSelectable:Ye,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:Ye,ariaReadOnly:Ye,ariaRelevant:null,ariaRequired:Ye,ariaRoleDescription:De,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:Ye,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function lk(e,t){return t in e?e[t]:t}function ak(e,t){return lk(e,t.toLowerCase())}const _2=go({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xr,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alpha:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:De,autoFocus:he,autoPlay:he,blocking:De,capture:null,charSet:null,checked:he,cite:null,className:De,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:Ye,controls:he,controlsList:De,coords:q|Xr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:Dd,draggable:Ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:De,height:q,hidden:Dd,high:q,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:De,itemRef:De,itemScope:he,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:he,optimum:q,pattern:null,ping:De,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:De,required:he,reversed:he,rows:q,rowSpan:q,sandbox:De,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootCustomElementRegistry:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shadowRootSerializable:he,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:Ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:Ye,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:Ye,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:he,disablePictureInPicture:he,disableRemotePlayback:he,exportParts:Xr,part:De,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:ak}),S2=go({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:It,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:De,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xr,g2:Xr,glyphName:Xr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:It,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:It,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:It,rev:It,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:It,requiredFeatures:It,requiredFonts:It,requiredFormats:It,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:It,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:It,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:It,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lk}),uk=go({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ck=go({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ak}),fk=go({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),C2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},A2=/[A-Z]/g,Ty=/-[a-z]/g,N2=/^data[-\w.:]+$/i;function D2(e,t){const n=Nd(t);let r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&N2.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Ty,R2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Ty.test(o)){let s=o.replace(A2,T2);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=pp}return new i(r,t)}function T2(e){return"-"+e.toLowerCase()}function R2(e){return e.charAt(1).toUpperCase()}const I2=ok([sk,_2,uk,ck,fk],"html"),gp=ok([sk,S2,uk,ck,fk],"svg");function M2(e){return e.join(" ").trim()}var mp={},Ry=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,O2=/\n/g,P2=/^\s*/,L2=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,z2=/^:\s*/,j2=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,F2=/^[;\s]*/,B2=/^\s+|\s+$/g,H2=`
63
+ `,Iy="/",My="*",Fr="",$2="comment",V2="declaration";function U2(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var v=p.match(O2);v&&(n+=v.length);var w=p.lastIndexOf(H2);r=~w?p.length-w:r+p.length}function o(){var p={line:n,column:r};return function(v){return v.position=new s(p),u(),v}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(p){var v=new Error(t.source+":"+n+":"+r+": "+p);if(v.reason=p,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(p){var v=p.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function u(){a(P2)}function c(p){var v;for(p=p||[];v=f();)v!==!1&&p.push(v);return p}function f(){var p=o();if(!(Iy!=e.charAt(0)||My!=e.charAt(1))){for(var v=2;Fr!=e.charAt(v)&&(My!=e.charAt(v)||Iy!=e.charAt(v+1));)++v;if(v+=2,Fr===e.charAt(v-1))return l("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,p({type:$2,comment:w})}}function h(){var p=o(),v=a(L2);if(v){if(f(),!a(z2))return l("property missing ':'");var w=a(j2),g=p({type:V2,property:Oy(v[0].replace(Ry,Fr)),value:w?Oy(w[0].replace(Ry,Fr)):Fr});return a(F2),g}}function d(){var p=[];c(p);for(var v;v=h();)v!==!1&&(p.push(v),c(p));return p}return u(),d()}function Oy(e){return e?e.replace(B2,Fr):Fr}var W2=U2,G2=ca&&ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mp,"__esModule",{value:!0});mp.default=Q2;const Y2=G2(W2);function Q2(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Y2.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.camelCase=void 0;var q2=/^--[a-zA-Z0-9_-]+$/,X2=/-([a-z])/g,Z2=/^[^-]+$/,K2=/^-(webkit|moz|ms|o|khtml)-/,J2=/^-(ms)-/,eL=function(e){return!e||Z2.test(e)||q2.test(e)},tL=function(e,t){return t.toUpperCase()},Py=function(e,t){return"".concat(t,"-")},nL=function(e,t){return t===void 0&&(t={}),eL(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(J2,Py):e=e.replace(K2,Py),e.replace(X2,tL))};Hu.camelCase=nL;var rL=ca&&ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},iL=rL(mp),oL=Hu;function Rd(e,t){var n={};return!e||typeof e!="string"||(0,iL.default)(e,function(r,i){r&&i&&(n[(0,oL.camelCase)(r,t)]=i)}),n}Rd.default=Rd;var sL=Rd;const lL=Ms(sL),dk=hk("end"),yp=hk("start");function hk(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function aL(e){const t=yp(e),n=dk(e);if(t&&n)return{start:t,end:n}}function Qo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ly(e.position):"start"in e||"end"in e?Ly(e):"line"in e||"column"in e?Id(e):""}function Id(e){return zy(e&&e.line)+":"+zy(e&&e.column)}function Ly(e){return Id(e&&e.start)+"-"+Id(e&&e.end)}function zy(e){return e&&typeof e=="number"?e:1}class dt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Qo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dt.prototype.file="";dt.prototype.name="";dt.prototype.reason="";dt.prototype.message="";dt.prototype.stack="";dt.prototype.column=void 0;dt.prototype.line=void 0;dt.prototype.ancestors=void 0;dt.prototype.cause=void 0;dt.prototype.fatal=void 0;dt.prototype.place=void 0;dt.prototype.ruleId=void 0;dt.prototype.source=void 0;const vp={}.hasOwnProperty,uL=new Map,cL=/[A-Z]/g,fL=new Set(["table","tbody","thead","tfoot","tr"]),dL=new Set(["td","th"]),pk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bL(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xL(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gp:I2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=gk(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function gk(e,t,n){if(t.type==="element")return pL(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gL(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yL(e,t,n);if(t.type==="mdxjsEsm")return mL(e,t);if(t.type==="root")return vL(e,t,n);if(t.type==="text")return wL(e,t)}function pL(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=gp,e.schema=i),e.ancestors.push(t);const o=yk(e,t.tagName,!1),s=EL(e,t);let l=xp(e,t);return fL.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!E2(a):!0})),mk(e,s,o,t),wp(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function gL(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}As(e,t.position)}function mL(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);As(e,t.position)}function yL(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=gp,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:yk(e,t.name,!0),s=kL(e,t),l=xp(e,t);return mk(e,s,o,t),wp(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function vL(e,t,n){const r={};return wp(r,xp(e,t)),e.create(t,e.Fragment,r,n)}function wL(e,t){return t.value}function mk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xL(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function bL(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=yp(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function EL(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&vp.call(t.properties,i)){const o=_L(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&dL.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function kL(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else As(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else As(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:uL;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const l=gk(e,o,s);l!==void 0&&n.push(l)}return n}function _L(e,t,n){const r=D2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?y2(n):M2(n)),r.property==="style"){let i=typeof n=="object"?n:SL(e,String(n));return e.stylePropertyNameCase==="css"&&(i=CL(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?C2[r.property]||r.property:r.attribute,n]}}function SL(e,t){try{return lL(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=pk+"#cannot-parse-style-attribute",i}}function yk(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Ay(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Ay(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return vp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);As(e)}function As(e,t){const n=new dt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=pk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CL(e){const t={};let n;for(n in e)vp.call(e,n)&&(t[AL(n)]=e[n]);return t}function AL(e){let t=e.replace(cL,NL);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function NL(e){return"-"+e.toLowerCase()}const Lc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},DL={};function bp(e,t){const n=DL,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return vk(e,r,i)}function vk(e,t,n){if(TL(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return jy(e.children,t,n)}return Array.isArray(e)?jy(e,t,n):""}function jy(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=vk(e[i],t,n);return r.join("")}function TL(e){return!!(e&&typeof e=="object")}const Fy=document.createElement("i");function Ep(e){const t="&"+e+";";Fy.innerHTML=t;const n=Fy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Gt(e,t){return e.length>0?(zt(e,e.length,0,t),e):t}const By={}.hasOwnProperty;function wk(e){const t={};let n=-1;for(;++n<e.length;)RL(t,e[n]);return t}function RL(e,t){let n;for(n in t){const i=(By.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){By.call(i,s)||(i[s]=[]);const l=o[s];IL(i[s],Array.isArray(l)?l:l?[l]:[])}}}function IL(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zt(e,0,0,r)}function xk(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=Dr(/[A-Za-z]/),ct=Dr(/[\dA-Za-z]/),ML=Dr(/[#-'*+\--9=?A-Z^-~]/);function Qa(e){return e!==null&&(e<32||e===127)}const Md=Dr(/\d/),OL=Dr(/[\dA-Fa-f]/),PL=Dr(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Te(e){return e!==null&&(e<0||e===32)}function ve(e){return e===-2||e===-1||e===32}const $u=Dr(new RegExp("\\p{P}|\\p{S}","u")),ai=Dr(/\s/);function Dr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function mo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&ct(e.charCodeAt(n+1))&&ct(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return ve(a)?(e.enter(n),l(a)):t(a)}function l(a){return ve(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const LL={tokenize:zL};function zL(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return fe(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const jL={tokenize:FL},Hy={tokenize:BL};function FL(e){const t=this,n=[];let r=0,i,o,s;return l;function l(m){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,a,u)(m)}return u(m)}function a(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const x=t.events.length;let _=x,b;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){b=t.events[_][1].end;break}g(r);let k=x;for(;k<t.events.length;)t.events[k][1].end={...b},k++;return zt(t.events,_+1,0,t.events.slice(x)),t.events.length=k,u(m)}return l(m)}function u(m){if(r===n.length){if(!i)return h(m);if(i.currentConstruct&&i.currentConstruct.concrete)return p(m);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hy,c,f)(m)}function c(m){return i&&y(),g(r),h(m)}function f(m){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(m)}function h(m){return t.containerState={},e.attempt(Hy,d,p)(m)}function d(m){return r++,n.push([t.currentConstruct,t.containerState]),h(m)}function p(m){if(m===null){i&&y(),g(0),e.consume(m);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(m)}function v(m){if(m===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(m);return}return fe(m)?(e.consume(m),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(m),v)}function w(m,x){const _=t.sliceStream(m);if(x&&_.push(null),m.previous=o,o&&(o.next=m),o=m,i.defineSkip(m.start),i.write(_),t.parser.lazy[m.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<s&&(!i.events[b][1].end||i.events[b][1].end.offset>s))return;const k=t.events.length;let A=k,T,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(T){N=t.events[A][1].end;break}T=!0}for(g(r),b=k;b<t.events.length;)t.events[b][1].end={...N},b++;zt(t.events,A+1,0,t.events.slice(k)),t.events.length=b}}function g(m){let x=n.length;for(;x-- >m;){const _=n[x];t.containerState=_[1],_[0].exit.call(t,e)}n.length=m}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function BL(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function so(e){if(e===null||Te(e)||ai(e))return 1;if($u(e))return 2}function Vu(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Od={name:"attention",resolveAll:HL,tokenize:$L};function HL(e,t){let n=-1,r,i,o,s,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};$y(f,-a),$y(h,a),s={type:a>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Gt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Gt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Gt(u,Vu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Gt(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Gt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,zt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $L(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=so(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=so(a),f=!c||c===2&&i||n.includes(a),h=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!h)),u._close=!!(o===42?h:h&&(c||!f)),t(a)}}function $y(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const VL={name:"autolink",tokenize:UL};function UL(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return yt(d)?(e.consume(d),s):d===64?n(d):u(d)}function s(d){return d===43||d===45||d===46||ct(d)?(r=1,l(d)):u(d)}function l(d){return d===58?(e.consume(d),r=0,a):(d===43||d===45||d===46||ct(d))&&r++<32?(e.consume(d),l):(r=0,u(d))}function a(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Qa(d)?n(d):(e.consume(d),a)}function u(d){return d===64?(e.consume(d),c):ML(d)?(e.consume(d),u):n(d)}function c(d){return ct(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):h(d)}function h(d){if((d===45||ct(d))&&r++<63){const p=d===45?h:f;return e.consume(d),p}return n(d)}}const Gs={partial:!0,tokenize:WL};function WL(e,t,n){return r;function r(o){return ve(o)?xe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||fe(o)?t(o):n(o)}}const bk={continuation:{tokenize:YL},exit:QL,name:"blockQuote",tokenize:GL};function GL(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return ve(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function YL(e,t,n){const r=this;return i;function i(s){return ve(s)?xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(bk,t,n)(s)}}function QL(e){e.exit("blockQuote")}const Ek={name:"characterEscape",tokenize:qL};function qL(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return PL(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const kk={name:"characterReference",tokenize:XL};function XL(e,t,n){const r=this;let i=0,o,s;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),a}function a(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=ct,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=OL,c):(e.enter("characterReferenceValue"),o=7,s=Md,c(f))}function c(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return s===ct&&!Ep(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),c):n(f)}}const Vy={partial:!0,tokenize:KL},Uy={concrete:!0,name:"codeFenced",tokenize:ZL};function ZL(e,t,n){const r=this,i={partial:!0,tokenize:_};let o=0,s=0,l;return a;function a(b){return u(b)}function u(b){const k=r.events[r.events.length-1];return o=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,l=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===l?(s++,e.consume(b),c):s<3?n(b):(e.exit("codeFencedFenceSequence"),ve(b)?xe(e,f,"whitespace")(b):f(b))}function f(b){return b===null||fe(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Vy,v,x)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||fe(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(b)):ve(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,d,"whitespace")(b)):b===96&&b===l?n(b):(e.consume(b),h)}function d(b){return b===null||fe(b)?f(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||fe(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(b)):b===96&&b===l?n(b):(e.consume(b),p)}function v(b){return e.attempt(i,x,w)(b)}function w(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g}function g(b){return o>0&&ve(b)?xe(e,y,"linePrefix",o+1)(b):y(b)}function y(b){return b===null||fe(b)?e.check(Vy,v,x)(b):(e.enter("codeFlowValue"),m(b))}function m(b){return b===null||fe(b)?(e.exit("codeFlowValue"),y(b)):(e.consume(b),m)}function x(b){return e.exit("codeFenced"),t(b)}function _(b,k,A){let T=0;return N;function N(O){return b.enter("lineEnding"),b.consume(O),b.exit("lineEnding"),R}function R(O){return b.enter("codeFencedFence"),ve(O)?xe(b,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):j(O)}function j(O){return O===l?(b.enter("codeFencedFenceSequence"),F(O)):A(O)}function F(O){return O===l?(T++,b.consume(O),F):T>=s?(b.exit("codeFencedFenceSequence"),ve(O)?xe(b,S,"whitespace")(O):S(O)):A(O)}function S(O){return O===null||fe(O)?(b.exit("codeFencedFence"),k(O)):A(O)}}}function KL(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const zc={name:"codeIndented",tokenize:ez},JL={partial:!0,tokenize:tz};function ez(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),xe(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):fe(u)?e.attempt(JL,s,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||fe(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function tz(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):xe(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):fe(s)?i(s):n(s)}}const nz={name:"codeText",previous:iz,resolve:rz,tokenize:oz};function rz(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function iz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oz(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),a):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):fe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||fe(f)?(e.exit("codeTextData"),a(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class sz{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&No(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),No(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),No(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);No(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);No(this.left,n.reverse())}}}function No(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _k(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new sz(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,lz(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return zt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function lz(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,f,h=-1,d=n,p=0,v=0;const w=[v];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(v=h+1,w.push(v),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):w.pop(),h=w.length;h--;){const g=l.slice(w[h],w[h+1]),y=o.pop();a.push([y,y+g.length-1]),e.splice(y,2,g)}for(a.reverse(),h=-1;++h<a.length;)u[p+a[h][0]]=p+a[h][1],p+=a[h][1]-a[h][0]-1;return u}const az={resolve:cz,tokenize:fz},uz={partial:!0,tokenize:dz};function cz(e){return _k(e),e}function fz(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):fe(l)?e.check(uz,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function dz(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,o,"linePrefix")}function o(s){if(s===null||fe(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Sk(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),h):g===null||g===32||g===41||Qa(g)?n(g):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(g))}function h(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(e.exit("chunkString"),e.exit(l),h(g)):g===null||g===60||fe(g)?n(g):(e.consume(g),g===92?p:d)}function p(g){return g===60||g===62||g===92?(e.consume(g),d):d(g)}function v(g){return!c&&(g===null||g===41||Te(g))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,v):g===41?(e.consume(g),c--,v):g===null||g===32||g===40||Qa(g)?n(g):(e.consume(g),g===92?w:v)}function w(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}function Ck(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return l>999||d===null||d===91||d===93&&!a||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||fe(d)||l++>999?(e.exit("chunkString"),c(d)):(e.consume(d),a||(a=!ve(d)),d===92?h:f)}function h(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}}function Ak(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),a(s)):h===null?n(h):fe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),xe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||fe(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:c)}function f(h){return h===s||h===92?(e.consume(h),c):c(h)}}function qo(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ve(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const hz={name:"definition",tokenize:gz},pz={partial:!0,tokenize:mz};function gz(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),s(d)}function s(d){return Ck.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),a):n(d)}function a(d){return Te(d)?qo(e,u)(d):u(d)}function u(d){return Sk(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(pz,f,f)(d)}function f(d){return ve(d)?xe(e,h,"whitespace")(d):h(d)}function h(d){return d===null||fe(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function mz(e,t,n){return r;function r(l){return Te(l)?qo(e,i)(l):n(l)}function i(l){return Ak(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ve(l)?xe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||fe(l)?t(l):n(l)}}const yz={name:"hardBreakEscape",tokenize:vz};function vz(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return fe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const wz={name:"headingAtx",resolve:xz,tokenize:bz};function xz(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},zt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function bz(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Te(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||fe(c)?(e.exit("atxHeading"),t(c)):ve(c)?xe(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Te(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Ez=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Wy=["pre","script","style","textarea"],kz={concrete:!0,name:"htmlFlow",resolveTo:Cz,tokenize:Az},_z={partial:!0,tokenize:Dz},Sz={partial:!0,tokenize:Nz};function Cz(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Az(e,t,n){const r=this;let i,o,s,l,a;return u;function u(D){return c(D)}function c(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),h):D===47?(e.consume(D),o=!0,v):D===63?(e.consume(D),i=3,r.interrupt?t:E):yt(D)?(e.consume(D),s=String.fromCharCode(D),w):n(D)}function h(D){return D===45?(e.consume(D),i=2,d):D===91?(e.consume(D),i=5,l=0,p):yt(D)?(e.consume(D),i=4,r.interrupt?t:E):n(D)}function d(D){return D===45?(e.consume(D),r.interrupt?t:E):n(D)}function p(D){const Y="CDATA[";return D===Y.charCodeAt(l++)?(e.consume(D),l===Y.length?r.interrupt?t:j:p):n(D)}function v(D){return yt(D)?(e.consume(D),s=String.fromCharCode(D),w):n(D)}function w(D){if(D===null||D===47||D===62||Te(D)){const Y=D===47,ne=s.toLowerCase();return!Y&&!o&&Wy.includes(ne)?(i=1,r.interrupt?t(D):j(D)):Ez.includes(s.toLowerCase())?(i=6,Y?(e.consume(D),g):r.interrupt?t(D):j(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?y(D):m(D))}return D===45||ct(D)?(e.consume(D),s+=String.fromCharCode(D),w):n(D)}function g(D){return D===62?(e.consume(D),r.interrupt?t:j):n(D)}function y(D){return ve(D)?(e.consume(D),y):N(D)}function m(D){return D===47?(e.consume(D),N):D===58||D===95||yt(D)?(e.consume(D),x):ve(D)?(e.consume(D),m):N(D)}function x(D){return D===45||D===46||D===58||D===95||ct(D)?(e.consume(D),x):_(D)}function _(D){return D===61?(e.consume(D),b):ve(D)?(e.consume(D),_):m(D)}function b(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),a=D,k):ve(D)?(e.consume(D),b):A(D)}function k(D){return D===a?(e.consume(D),a=null,T):D===null||fe(D)?n(D):(e.consume(D),k)}function A(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Te(D)?_(D):(e.consume(D),A)}function T(D){return D===47||D===62||ve(D)?m(D):n(D)}function N(D){return D===62?(e.consume(D),R):n(D)}function R(D){return D===null||fe(D)?j(D):ve(D)?(e.consume(D),R):n(D)}function j(D){return D===45&&i===2?(e.consume(D),P):D===60&&i===1?(e.consume(D),z):D===62&&i===4?(e.consume(D),B):D===63&&i===3?(e.consume(D),E):D===93&&i===5?(e.consume(D),M):fe(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_z,H,F)(D)):D===null||fe(D)?(e.exit("htmlFlowData"),F(D)):(e.consume(D),j)}function F(D){return e.check(Sz,S,H)(D)}function S(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),O}function O(D){return D===null||fe(D)?F(D):(e.enter("htmlFlowData"),j(D))}function P(D){return D===45?(e.consume(D),E):j(D)}function z(D){return D===47?(e.consume(D),s="",I):j(D)}function I(D){if(D===62){const Y=s.toLowerCase();return Wy.includes(Y)?(e.consume(D),B):j(D)}return yt(D)&&s.length<8?(e.consume(D),s+=String.fromCharCode(D),I):j(D)}function M(D){return D===93?(e.consume(D),E):j(D)}function E(D){return D===62?(e.consume(D),B):D===45&&i===2?(e.consume(D),E):j(D)}function B(D){return D===null||fe(D)?(e.exit("htmlFlowData"),H(D)):(e.consume(D),B)}function H(D){return e.exit("htmlFlow"),t(D)}}function Nz(e,t,n){const r=this;return i;function i(s){return fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Dz(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Gs,t,n)}}const Tz={name:"htmlText",tokenize:Rz};function Rz(e,t,n){const r=this;let i,o,s;return l;function l(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),a}function a(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),_):E===63?(e.consume(E),m):yt(E)?(e.consume(E),A):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),o=0,p):yt(E)?(e.consume(E),y):n(E)}function c(E){return E===45?(e.consume(E),d):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),h):fe(E)?(s=f,z(E)):(e.consume(E),f)}function h(E){return E===45?(e.consume(E),d):f(E)}function d(E){return E===62?P(E):E===45?h(E):f(E)}function p(E){const B="CDATA[";return E===B.charCodeAt(o++)?(e.consume(E),o===B.length?v:p):n(E)}function v(E){return E===null?n(E):E===93?(e.consume(E),w):fe(E)?(s=v,z(E)):(e.consume(E),v)}function w(E){return E===93?(e.consume(E),g):v(E)}function g(E){return E===62?P(E):E===93?(e.consume(E),g):v(E)}function y(E){return E===null||E===62?P(E):fe(E)?(s=y,z(E)):(e.consume(E),y)}function m(E){return E===null?n(E):E===63?(e.consume(E),x):fe(E)?(s=m,z(E)):(e.consume(E),m)}function x(E){return E===62?P(E):m(E)}function _(E){return yt(E)?(e.consume(E),b):n(E)}function b(E){return E===45||ct(E)?(e.consume(E),b):k(E)}function k(E){return fe(E)?(s=k,z(E)):ve(E)?(e.consume(E),k):P(E)}function A(E){return E===45||ct(E)?(e.consume(E),A):E===47||E===62||Te(E)?T(E):n(E)}function T(E){return E===47?(e.consume(E),P):E===58||E===95||yt(E)?(e.consume(E),N):fe(E)?(s=T,z(E)):ve(E)?(e.consume(E),T):P(E)}function N(E){return E===45||E===46||E===58||E===95||ct(E)?(e.consume(E),N):R(E)}function R(E){return E===61?(e.consume(E),j):fe(E)?(s=R,z(E)):ve(E)?(e.consume(E),R):T(E)}function j(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,F):fe(E)?(s=j,z(E)):ve(E)?(e.consume(E),j):(e.consume(E),S)}function F(E){return E===i?(e.consume(E),i=void 0,O):E===null?n(E):fe(E)?(s=F,z(E)):(e.consume(E),F)}function S(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Te(E)?T(E):(e.consume(E),S)}function O(E){return E===47||E===62||Te(E)?T(E):n(E)}function P(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function z(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),I}function I(E){return ve(E)?xe(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):M(E)}function M(E){return e.enter("htmlTextData"),s(E)}}const kp={name:"labelEnd",resolveAll:Pz,resolveTo:Lz,tokenize:zz},Iz={tokenize:jz},Mz={tokenize:Fz},Oz={tokenize:Bz};function Pz(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&zt(e,0,e.length,n),e}function Lz(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,t],["enter",u,t]],l=Gt(l,e.slice(o+1,o+r+3)),l=Gt(l,[["enter",c,t]]),l=Gt(l,Vu(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=Gt(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=Gt(l,e.slice(s+1)),l=Gt(l,[["exit",a,t]]),zt(e,o,e.length,l),e}function zz(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?f(h):(s=r.parser.defined.includes(pn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(Iz,c,s?c:f)(h):h===91?e.attempt(Mz,c,s?u:f)(h):s?c(h):f(h)}function u(h){return e.attempt(Oz,c,f)(h)}function c(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function jz(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Te(f)?qo(e,o)(f):o(f)}function o(f){return f===41?c(f):Sk(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Te(f)?qo(e,a)(f):c(f)}function l(f){return n(f)}function a(f){return f===34||f===39||f===40?Ak(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Te(f)?qo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Fz(e,t,n){const r=this;return i;function i(l){return Ck.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function Bz(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Hz={name:"labelStartImage",resolveAll:kp.resolveAll,tokenize:$z};function $z(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Vz={name:"labelStartLink",resolveAll:kp.resolveAll,tokenize:Uz};function Uz(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const jc={name:"lineEnding",tokenize:Wz};function Wz(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const ea={name:"thematicBreak",tokenize:Gz};function Gz(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||fe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),ve(u)?xe(e,l,"whitespace")(u):l(u))}}const Et={continuation:{tokenize:Xz},exit:Kz,name:"list",tokenize:qz},Yz={partial:!0,tokenize:Jz},Qz={partial:!0,tokenize:Zz};function qz(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(d){const p=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Md(d)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(ea,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(d)}return n(d)}function a(d){return Md(d)&&++s<10?(e.consume(d),a):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Gs,r.interrupt?n:c,e.attempt(Yz,h,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,h(d)}function f(d){return ve(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),h):n(d)}function h(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Xz(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Gs,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!ve(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qz,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(Et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Zz(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Kz(e){e.exit(this.containerState.type)}function Jz(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!ve(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Gy={name:"setextUnderline",resolveTo:ej,tokenize:tj};function ej(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function tj(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ve(u)?xe(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||fe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const nj={tokenize:rj};function rj(e){const t=this,n=e.attempt(Gs,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(az,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ij={resolveAll:Dk()},oj=Nk("string"),sj=Nk("text");function Nk(e){return{resolveAll:Dk(e==="text"?lj:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const f=i[c];let h=-1;if(f)for(;++h<f.length;){const d=f[h];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Dk(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function lj(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const aj={42:Et,43:Et,45:Et,48:Et,49:Et,50:Et,51:Et,52:Et,53:Et,54:Et,55:Et,56:Et,57:Et,62:bk},uj={91:hz},cj={[-2]:zc,[-1]:zc,32:zc},fj={35:wz,42:ea,45:[Gy,ea],60:kz,61:Gy,95:ea,96:Uy,126:Uy},dj={38:kk,92:Ek},hj={[-5]:jc,[-4]:jc,[-3]:jc,33:Hz,38:kk,42:Od,60:[VL,Tz],91:Vz,92:[yz,Ek],93:kp,95:Od,96:nz},pj={null:[Od,ij]},gj={null:[42,95]},mj={null:[]},yj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:gj,contentInitial:uj,disable:mj,document:aj,flow:fj,flowInitial:cj,insideSpan:pj,string:dj,text:hj},Symbol.toStringTag,{value:"Module"}));function vj(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:k(_),check:k(b),consume:y,enter:m,exit:x,interrupt:k(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:d,write:f};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function f(R){return s=Gt(s,R),w(),s[s.length-1]!==null?[]:(A(t,0),u.events=Vu(o,u.events,u),u.events)}function h(R,j){return xj(d(R),j)}function d(R){return wj(s,R)}function p(){const{_bufferIndex:R,_index:j,line:F,column:S,offset:O}=r;return{_bufferIndex:R,_index:j,line:F,column:S,offset:O}}function v(R){i[R.line]=R.column,N()}function w(){let R;for(;r._index<s.length;){const j=s[r._index];if(typeof j=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<j.length;)g(j.charCodeAt(r._bufferIndex));else g(j)}}function g(R){c=c(R)}function y(R){fe(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,N()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function m(R,j){const F=j||{};return F.type=R,F.start=p(),u.events.push(["enter",F,u]),l.push(F),F}function x(R){const j=l.pop();return j.end=p(),u.events.push(["exit",j,u]),j}function _(R,j){A(R,j.from)}function b(R,j){j.restore()}function k(R,j){return F;function F(S,O,P){let z,I,M,E;return Array.isArray(S)?H(S):"tokenize"in S?H([S]):B(S);function B(J){return ee;function ee(G){const Z=G!==null&&J[G],le=G!==null&&J.null,oe=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(le)?le:le?[le]:[]];return H(oe)(G)}}function H(J){return z=J,I=0,J.length===0?P:D(J[I])}function D(J){return ee;function ee(G){return E=T(),M=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?ne():J.tokenize.call(j?Object.assign(Object.create(u),j):u,a,Y,ne)(G)}}function Y(J){return R(M,E),O}function ne(J){return E.restore(),++I<z.length?D(z[I]):P}}}function A(R,j){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&zt(u.events,j,u.events.length-j,R.resolve(u.events.slice(j),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function T(){const R=p(),j=u.previous,F=u.currentConstruct,S=u.events.length,O=Array.from(l);return{from:S,restore:P};function P(){r=R,u.previous=j,u.currentConstruct=F,u.events.length=S,l=O,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function wj(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function xj(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
64
+ `;break}case-3:{s=`\r
65
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function bj(e){const r={constructs:wk([yj,...(e||{}).extensions||[]]),content:i(LL),defined:[],document:i(jL),flow:i(nj),lazy:{},string:i(oj),text:i(sj)};return r;function i(o){return s;function s(l){return vj(r,o,l)}}}function Ej(e){for(;!_k(e););return e}const Yy=/[\0\t\n\r]/g;function kj(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const a=[];let u,c,f,h,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Yy.lastIndex=f,u=Yy.exec(o),h=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(h),!u){t=o.slice(f);break}if(d===10&&f===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),f<h&&(a.push(o.slice(f,h)),e+=h-f),d){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const _j=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sj(e){return e.replace(_j,Cj)}function Cj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return xk(n.slice(o?2:1),o?16:10)}return Ep(n)||e}const Tk={}.hasOwnProperty;function Aj(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Nj(n)(Ej(bj(n).document().write(kj()(e,t,!0))))}function Nj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ht),autolinkProtocol:T,autolinkEmail:T,atxHeading:o(me),blockQuote:o(le),characterEscape:T,characterReference:T,codeFenced:o(oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(oe,s),codeText:o(re,s),codeTextData:T,data:T,codeFlowValue:T,definition:o(ie),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ge),hardBreakEscape:o(ce),hardBreakTrailing:o(ce),htmlFlow:o(Ae,s),htmlFlowData:T,htmlText:o(Ae,s),htmlTextData:T,image:o(Je),label:s,link:o(ht),listItem:o(Rt),listItemValue:h,listOrdered:o(pt,f),listUnordered:o(pt),paragraph:o(Jt),reference:D,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(me),strong:o(en),thematicBreak:o(gt)},exit:{atxHeading:a(),atxHeadingSequence:_,autolink:a(),autolinkEmail:Z,autolinkProtocol:G,blockQuote:a(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:J,characterReference:ee,codeFenced:a(w),codeFencedFence:v,codeFencedFenceInfo:d,codeFencedFenceMeta:p,codeFlowValue:N,codeIndented:a(g),codeText:a(O),codeTextData:N,data:N,definition:a(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:m,emphasis:a(),hardBreakEscape:a(j),hardBreakTrailing:a(j),htmlFlow:a(F),htmlFlowData:N,htmlText:a(S),htmlTextData:N,image:a(z),label:M,labelText:I,lineEnding:R,link:a(P),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:Y,resourceDestinationString:E,resourceTitleString:B,resource:H,setextHeading:a(A),setextHeadingLineSequence:k,setextHeadingText:b,strong:a(),thematicBreak:a()}};Rk(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let X={type:"root",children:[]};const ae={stack:[X],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:c,data:n},pe=[];let V=-1;for(;++V<W.length;)if(W[V][1].type==="listOrdered"||W[V][1].type==="listUnordered")if(W[V][0]==="enter")pe.push(V);else{const K=pe.pop();V=i(W,K,V)}for(V=-1;++V<W.length;){const K=t[W[V][0]];Tk.call(K,W[V][1].type)&&K[W[V][1].type].call(Object.assign({sliceSerialize:W[V][2].sliceSerialize},ae),W[V][1])}if(ae.tokenStack.length>0){const K=ae.tokenStack[ae.tokenStack.length-1];(K[1]||Qy).call(ae,void 0,K[0])}for(X.position={start:tr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:tr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)X=t.transforms[V](X)||X;return X}function i(W,X,ae){let pe=X-1,V=-1,K=!1,ye,ue,Ne,_e;for(;++pe<=ae;){const Ue=W[pe];switch(Ue[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ue[0]==="enter"?V++:V--,_e=void 0;break}case"lineEndingBlank":{Ue[0]==="enter"&&(ye&&!_e&&!V&&!Ne&&(Ne=pe),_e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_e=void 0}if(!V&&Ue[0]==="enter"&&Ue[1].type==="listItemPrefix"||V===-1&&Ue[0]==="exit"&&(Ue[1].type==="listUnordered"||Ue[1].type==="listOrdered")){if(ye){let nn=pe;for(ue=void 0;nn--;){const bt=W[nn];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;ue&&(W[ue][1].type="lineEndingBlank",K=!0),bt[1].type="lineEnding",ue=nn}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}Ne&&(!ue||Ne<ue)&&(ye._spread=!0),ye.end=Object.assign({},ue?W[ue][1].start:Ue[1].end),W.splice(ue||pe,0,["exit",ye,Ue[2]]),pe++,ae++}if(Ue[1].type==="listItemPrefix"){const nn={type:"listItem",_spread:!1,start:Object.assign({},Ue[1].start),end:void 0};ye=nn,W.splice(pe,0,["enter",nn,Ue[2]]),pe++,ae++,Ne=void 0,_e=!0}}}return W[X][1]._spread=K,ae}function o(W,X){return ae;function ae(pe){l.call(this,W(pe),pe),X&&X.call(this,pe)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(W,X,ae){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([X,ae||void 0]),W.position={start:tr(X.start),end:void 0}}function a(W){return X;function X(ae){W&&W.call(this,ae),u.call(this,ae)}}function u(W,X){const ae=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==W.type&&(X?X.call(this,W,pe[0]):(pe[1]||Qy).call(this,W,pe[0]));else throw new Error("Cannot close `"+W.type+"` ("+Qo({start:W.start,end:W.end})+"): it’s not open");ae.position.end=tr(W.end)}function c(){return bp(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(W){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function d(){const W=this.resume(),X=this.stack[this.stack.length-1];X.lang=W}function p(){const W=this.resume(),X=this.stack[this.stack.length-1];X.meta=W}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),X=this.stack[this.stack.length-1];X.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const W=this.resume(),X=this.stack[this.stack.length-1];X.value=W.replace(/(\r?\n|\r)$/g,"")}function y(W){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.label=X,ae.identifier=pn(this.sliceSerialize(W)).toLowerCase()}function m(){const W=this.resume(),X=this.stack[this.stack.length-1];X.title=W}function x(){const W=this.resume(),X=this.stack[this.stack.length-1];X.url=W}function _(W){const X=this.stack[this.stack.length-1];if(!X.depth){const ae=this.sliceSerialize(W).length;X.depth=ae}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function k(W){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function T(W){const ae=this.stack[this.stack.length-1].children;let pe=ae[ae.length-1];(!pe||pe.type!=="text")&&(pe=tn(),pe.position={start:tr(W.start),end:void 0},ae.push(pe)),this.stack.push(pe)}function N(W){const X=this.stack.pop();X.value+=this.sliceSerialize(W),X.position.end=tr(W.end)}function R(W){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=X.children[X.children.length-1];ae.position.end=tr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(T.call(this,W),N.call(this,W))}function j(){this.data.atHardBreak=!0}function F(){const W=this.resume(),X=this.stack[this.stack.length-1];X.value=W}function S(){const W=this.resume(),X=this.stack[this.stack.length-1];X.value=W}function O(){const W=this.resume(),X=this.stack[this.stack.length-1];X.value=W}function P(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=X,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function z(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=X,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function I(W){const X=this.sliceSerialize(W),ae=this.stack[this.stack.length-2];ae.label=Sj(X),ae.identifier=pn(X).toLowerCase()}function M(){const W=this.stack[this.stack.length-1],X=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const pe=W.children;ae.children=pe}else ae.alt=X}function E(){const W=this.resume(),X=this.stack[this.stack.length-1];X.url=W}function B(){const W=this.resume(),X=this.stack[this.stack.length-1];X.title=W}function H(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function Y(W){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.label=X,ae.identifier=pn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function ne(W){this.data.characterReferenceType=W.type}function J(W){const X=this.sliceSerialize(W),ae=this.data.characterReferenceType;let pe;ae?(pe=xk(X,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=Ep(X);const V=this.stack[this.stack.length-1];V.value+=pe}function ee(W){const X=this.stack.pop();X.position.end=tr(W.end)}function G(W){N.call(this,W);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(W)}function Z(W){N.call(this,W);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(W)}function le(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function ce(){return{type:"break"}}function Ae(){return{type:"html",value:""}}function Je(){return{type:"image",title:null,url:"",alt:null}}function ht(){return{type:"link",title:null,url:"",children:[]}}function pt(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function Rt(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Jt(){return{type:"paragraph",children:[]}}function en(){return{type:"strong",children:[]}}function tn(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function tr(e){return{line:e.line,column:e.column,offset:e.offset}}function Rk(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Rk(e,r):Dj(e,r)}}function Dj(e,t){let n;for(n in t)if(Tk.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Qy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qo({start:t.start,end:t.end})+") is still open")}function Tj(e){const t=this;t.parser=n;function n(r){return Aj(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Rj(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ij(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
66
+ `}]}function Mj(e,t){const n=t.value?t.value+`
67
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Oj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=mo(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function zj(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ik(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Fj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ik(e,t);const i={src:mo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Bj(e,t){const n={src:mo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function $j(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ik(e,t);const i={href:mo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Vj(e,t){const n={href:mo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Uj(e,t,n){const r=e.all(t),i=n?Wj(n):Mk(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
68
+ `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
69
+ `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function Wj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Mk(n[r])}return t}function Mk(e){const t=e.spread;return t??e.children.length>1}function Gj(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Yj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xj(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=yp(t.children[1]),a=dk(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Zj(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<l;){const f=t.children[a],h={},d=s?s[a]:void 0;d&&(h.align=d);let p={type:"element",tagName:o,properties:h,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function Kj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qy=9,Xy=32;function Jj(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Zy(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Zy(t.slice(i),i>0,!1)),o.join("")}function Zy(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qy||o===Xy;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qy||o===Xy;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function eF(e,t){const n={type:"text",value:Jj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tF(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nF={blockquote:Rj,break:Ij,code:Mj,delete:Oj,emphasis:Pj,footnoteReference:Lj,heading:zj,html:jj,imageReference:Fj,image:Bj,inlineCode:Hj,linkReference:$j,link:Vj,listItem:Uj,list:Gj,paragraph:Yj,root:Qj,strong:qj,table:Xj,tableCell:Kj,tableRow:Zj,text:eF,thematicBreak:tF,toml:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){}const Ok=-1,Uu=0,Xo=1,qa=2,_p=3,Sp=4,Cp=5,Ap=6,Pk=7,Lk=8,zk=typeof self=="object"?self:globalThis,Ky=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zk[e](t)},rF=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Uu:case Ok:return n(s,i);case Xo:{const l=n([],i);for(const a of s)l.push(r(a));return l}case qa:{const l=n({},i);for(const[a,u]of s)l[r(a)]=r(u);return l}case _p:return n(new Date(s),i);case Sp:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case Cp:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case Ap:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case Pk:{const{name:l,message:a}=s;return n(typeof zk[l]=="function"?Ky(l,a):new Error(a),i)}case Lk:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(Ky(o,s),i)};return r},Jy=e=>rF(new Map,e)(0),Lr="",{toString:iF}={},{keys:oF}=Object,Do=e=>{const t=typeof e;if(t!=="object"||!e)return[Uu,t];const n=iF.call(e).slice(8,-1);switch(n){case"Array":return[Xo,Lr];case"Object":return[qa,Lr];case"Date":return[_p,Lr];case"RegExp":return[Sp,Lr];case"Map":return[Cp,Lr];case"Set":return[Ap,Lr];case"DataView":return[Xo,n]}return n.includes("Array")?[Xo,n]:e instanceof Error?[Pk,e.name||"Error"]:[qa,n]},Sl=([e,t])=>e===Uu&&(t==="function"||t==="symbol"),sF=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=Do(s);switch(l){case Uu:{let c=s;switch(a){case"bigint":l=Lk,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Ok],s)}return i([l,c],s)}case Xo:{if(a){let h=s;return a==="DataView"?h=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(s)),i([a,[...h]],s)}const c=[],f=i([l,c],s);for(const h of s)c.push(o(h));return f}case qa:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],f=i([l,c],s);for(const h of oF(s))(e||!Sl(Do(s[h])))&&c.push([o(h),o(s[h])]);return f}case _p:return i([l,isNaN(s.getTime())?Lr:s.toISOString()],s);case Sp:{const{source:c,flags:f}=s;return i([l,{source:c,flags:f}],s)}case Cp:{const c=[],f=i([l,c],s);for(const[h,d]of s)(e||!(Sl(Do(h))||Sl(Do(d))))&&c.push([o(h),o(d)]);return f}case Ap:{const c=[],f=i([l,c],s);for(const h of s)(e||!Sl(Do(h)))&&c.push(o(h));return f}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},ev=(e,{json:t,lossy:n}={})=>{const r=[];return sF(!(t||n),!!t,new Map,r)(e),r},Xa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jy(ev(e,t)):structuredClone(e):(e,t)=>Jy(ev(e,t));function lF(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function aF(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function uF(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||lF,r=e.options.footnoteBackLabel||aF,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),h=mo(f.toLowerCase());let d=0;const p=[],v=e.footnoteCounts.get(f);for(;v!==void 0&&++d<=v;){p.length>0&&p.push({type:"text",value:" "});let y=typeof n=="string"?n:n(a,d);typeof y=="string"&&(y={type:"text",value:y}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,d),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const y=w.children[w.children.length-1];y&&y.type==="text"?y.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...p)}else c.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Xa(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
70
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
71
+ `}]}}const Wu=function(e){if(e==null)return hF;if(typeof e=="function")return Gu(e);if(typeof e=="object")return Array.isArray(e)?cF(e):fF(e);if(typeof e=="string")return dF(e);throw new Error("Expected function, string, or object as test")};function cF(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wu(e[n]);return Gu(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function fF(e){const t=e;return Gu(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function dF(e){return Gu(t);function t(n){return n&&n.type===e}}function Gu(e){return t;function t(n,r,i){return!!(pF(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function hF(){return!0}function pF(e){return e!==null&&typeof e=="object"&&"type"in e}const jk=[],gF=!0,Pd=!1,mF="skip";function Fk(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Wu(i),s=r?-1:1;l(e,void 0,[])();function l(a,u,c){const f=a&&typeof a=="object"?a:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(d?"<"+d+">":""))+")"})}return h;function h(){let d=jk,p,v,w;if((!t||o(a,u,c[c.length-1]||void 0))&&(d=yF(n(a,c)),d[0]===Pd))return d;if("children"in a&&a.children){const g=a;if(g.children&&d[0]!==mF)for(v=(r?g.children.length:-1)+s,w=c.concat(g);v>-1&&v<g.children.length;){const y=g.children[v];if(p=l(y,v,w)(),p[0]===Pd)return p;v=typeof p[1]=="number"?p[1]:v+s}}return d}}}function yF(e){return Array.isArray(e)?e:typeof e=="number"?[gF,e]:e==null?jk:[e]}function Np(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Fk(e,o,l,i);function l(a,u){const c=u[u.length-1],f=c?c.children.indexOf(a):void 0;return s(a,f,c)}}const Ld={}.hasOwnProperty,vF={};function wF(e,t){const n=t||vF,r=new Map,i=new Map,o=new Map,s={...nF,...n.handlers},l={all:u,applyData:bF,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:xF,wrap:kF};return Np(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,h=String(c.identifier).toUpperCase();f.has(h)||f.set(h,c)}}),l;function a(c,f){const h=c.type,d=l.handlers[h];if(Ld.call(l.handlers,h)&&d)return d(l,c,f);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in c){const{children:v,...w}=c,g=Xa(w);return g.children=l.all(c),g}return Xa(c)}return(l.options.unknownHandler||EF)(l,c,f)}function u(c){const f=[];if("children"in c){const h=c.children;let d=-1;for(;++d<h.length;){const p=l.one(h[d],c);if(p){if(d&&h[d-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=tv(p.value)),!Array.isArray(p)&&p.type==="element")){const v=p.children[0];v&&v.type==="text"&&(v.value=tv(v.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function xF(e,t){e.position&&(t.position=aL(e))}function bF(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Xa(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function EF(e,t){const n=t.data||{},r="value"in t&&!(Ld.call(n,"hProperties")||Ld.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kF(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
72
+ `});++r<e.length;)r&&n.push({type:"text",value:`
73
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
74
+ `}),n}function tv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nv(e,t){const n=wF(e,t),r=n.one(e,void 0),i=uF(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
75
+ `},i),o}function _F(e,t){return e&&"run"in e?async function(n,r){const i=nv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nv(n,{file:r,...e||t})}}function rv(e){if(e)throw e}var ta=Object.prototype.hasOwnProperty,Bk=Object.prototype.toString,iv=Object.defineProperty,ov=Object.getOwnPropertyDescriptor,sv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Bk.call(t)==="[object Array]"},lv=function(t){if(!t||Bk.call(t)!=="[object Object]")return!1;var n=ta.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ta.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ta.call(t,i)},av=function(t,n){iv&&n.name==="__proto__"?iv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},uv=function(t,n){if(n==="__proto__")if(ta.call(t,n)){if(ov)return ov(t,n).value}else return;return t[n]},SF=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=uv(l,n),i=uv(t,n),l!==i&&(c&&i&&(lv(i)||(o=sv(i)))?(o?(o=!1,s=r&&sv(r)?r:[]):s=r&&lv(r)?r:{},av(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&av(l,{name:n,newValue:i}));return l};const Fc=Ms(SF);function zd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CF(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=e[++o];let f=-1;if(a){s(a);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?AF(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function AF(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const En={basename:NF,dirname:DF,extname:TF,join:RF,sep:"/"};function NF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ys(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function DF(e){if(Ys(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function TF(e){Ys(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function RF(...e){let t=-1,n;for(;++t<e.length;)Ys(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":IF(n)}function IF(e){Ys(e);const t=e.codePointAt(0)===47;let n=MF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MF(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Ys(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const OF={cwd:PF};function PF(){return"/"}function jd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function LF(e){if(typeof e=="string")e=new URL(e);else if(!jd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return zF(e)}function zF(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Bc=["history","path","basename","stem","extname","dirname"];class Hk{constructor(t){let n;t?jd(t)?n={path:t}:typeof t=="string"||jF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":OF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bc.length;){const o=Bc[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Bc.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?En.basename(this.path):void 0}set basename(t){$c(t,"basename"),Hc(t,"basename"),this.path=En.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?En.dirname(this.path):void 0}set dirname(t){cv(this.basename,"dirname"),this.path=En.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?En.extname(this.path):void 0}set extname(t){if(Hc(t,"extname"),cv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=En.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jd(t)&&(t=LF(t)),$c(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?En.basename(this.path,this.extname):void 0}set stem(t){$c(t,"stem"),Hc(t,"stem"),this.path=En.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new dt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hc(e,t){if(e&&e.includes(En.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+En.sep+"`")}function $c(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FF=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},BF={}.hasOwnProperty;class Dp extends FF{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CF()}copy(){const t=new Dp;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Fc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Wc("data",this.frozen),this.namespace[t]=n,this):BF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Wc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Cl(t),r=this.parser||this.Parser;return Vc("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vc("process",this.parser||this.Parser),Uc("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Cl(t),a=r.parse(l);r.run(a,l,function(c,f,h){if(c||!f||!h)return u(c);const d=f,p=r.stringify(d,h);VF(p)?h.value=p:h.result=p,u(c,h)});function u(c,f){c||!f?s(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Vc("processSync",this.parser||this.Parser),Uc("processSync",this.compiler||this.Compiler),this.process(t,i),dv("processSync","process",n),r;function i(o,s){n=!0,rv(o),r=s}}run(t,n,r){fv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=Cl(n);i.run(t,a,u);function u(c,f,h){const d=f||t;c?l(c):s?s(d):r(void 0,d,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),dv("runSync","run",r),i;function o(s,l){rv(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Cl(n),i=this.compiler||this.Compiler;return Uc("stringify",i),fv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Wc("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;a(c,f)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Fc(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[d,...p]=c;const v=r[h][1];zd(v)&&zd(d)&&(d=Fc(!0,v,d)),r[h]=[u,d,...p]}}}}const HF=new Dp().freeze();function Vc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Uc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fv(e){if(!zd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cl(e){return $F(e)?e:new Hk(e)}function $F(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VF(e){return typeof e=="string"||UF(e)}function UF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WF="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hv=[],pv={allowDangerousHtml:!0},GF=/^(https?|ircs?|mailto|xmpp)$/i,YF=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function QF(e){const t=qF(e),n=XF(e);return ZF(t.runSync(t.parse(n),n),e)}function qF(e){const t=e.rehypePlugins||hv,n=e.remarkPlugins||hv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pv}:pv;return HF().use(Tj).use(n).use(_F,r).use(t)}function XF(e){const t=e.children||"",n=new Hk;return typeof t=="string"&&(n.value=t),n}function ZF(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||KF;for(const c of YF)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+WF+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Np(e,u),hL(e,{Fragment:C.Fragment,components:i,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function u(c,f,h){if(c.type==="raw"&&h&&typeof f=="number")return s?h.children.splice(f,1):h.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let d;for(d in Lc)if(Object.hasOwn(Lc,d)&&Object.hasOwn(c.properties,d)){const p=c.properties[d],v=Lc[d];(v===null||v.includes(c.tagName))&&(c.properties[d]=a(String(p||""),d,c))}}if(c.type==="element"){let d=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!d&&r&&typeof f=="number"&&(d=!r(c,f,h)),d&&h&&typeof f=="number")return l&&c.children?h.children.splice(f,1,...c.children):h.children.splice(f,1),f}}}function KF(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||GF.test(e.slice(0,t))?e:""}function $k({title:e,count:t,open:n,onToggle:r,children:i}){return C.jsxs("div",{className:"section",children:[C.jsxs("button",{className:"section__head",onClick:r,"aria-expanded":n,children:[C.jsx("span",{className:"section__caret","aria-hidden":"true",children:n?"▾":"▸"}),e,t!==void 0&&t>0&&C.jsx("span",{className:"section__count",children:t})]}),n&&C.jsx("div",{className:"section__body",children:i})]})}const Tp=()=>({});function JF(e,t){return e===void 0?Promise.resolve({mode:"local"}):e.start(t)}const Fd="/api/store",Vk=()=>new URLSearchParams(window.location.search).get("t"),Uk=()=>Vk()!==null||Object.keys(Tp()).length>0;function Rp(e){const t=Vk(),n=Tp();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw new Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function eB(e,t,n){const r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:"POST",headers:{"content-type":"application/json",...Rp("change a status")},body:JSON.stringify({status:n})});if(!r.ok)throw new Error((await r.json()).error??`could not change the status (${r.status})`)}async function tB(e,t){const n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:"DELETE",headers:Rp("remove an image")});if(!n.ok)throw new Error((await n.json()).error??`remove failed (${n.status})`)}async function nB(e,t,n){const r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:"POST",headers:{"content-type":n.type,...Rp("upload")},body:n}),i=await r.json();if(!r.ok)throw new Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}function rB(e,t){const n=new Map;for(const r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}async function iB(){const e=await fetch(Fd,{headers:Tp()});if(!e.ok)throw new Error(`${Fd} returned ${e.status} ${e.statusText}`);const{path:t,store:n,metrics:r,uploadsDisabled:i}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(o=>({key:o.key,name:o.name,items:o.items.map(s=>({id:s.ref,area:s.area,status:s.status,title:s.title,deps:s.deps??[],parent:s.parent??null,start:s.start,due:s.due,closed:s.closed_at})),next:(o.next??[]).filter(s=>o.items.some(l=>l.ref===s)),bodies:new Map(o.items.map(s=>[s.ref,s.body??""])),attachments:new Map(o.items.filter(s=>{var l;return(l=s.attachments)==null?void 0:l.length}).map(s=>[s.ref,s.attachments])),metrics:rB((r==null?void 0:r[o.key])??[],s=>s.ref??"")}))}}function oB(e){const t=decodeURIComponent(e.replace(/^#/,"")),n=t.indexOf("/"),r=(n===-1?t:t.slice(0,n))||null,i=n===-1?null:t.slice(n+1)||null;return{project:r,item:i}}function sB(e,t){if(e.length===0)return{project:null,notice:"This store has no projects yet. Create one and it will appear here."};if(t!==null){const n=e.find(r=>r.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(r=>r.key).join(", ")}.`}}return e.length===1?{project:e[0],notice:null}:{project:null,notice:"This store holds several projects. Choose one to see its graph."}}const lB=e=>e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function aB({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:o,onToggle:s}){const[l,a]=L.useState(!1),[u,c]=L.useState(null),[f,h]=L.useState(!1),d=L.useRef(null),p=Uk(),v=p&&r===null;L.useEffect(()=>c(null),[t]);async function w(y){a(!0),c(null);try{await y()}catch(m){c(m instanceof Error?m.message:String(m))}finally{a(!1),i()}}const g=y=>y===null||y.length===0?Promise.resolve():w(async()=>{for(const m of Array.from(y))await nB(e,t,m)});return C.jsxs($k,{title:"Images",count:n.length,open:o,onToggle:s,children:[n.length>0&&C.jsx("div",{className:"attachments__grid",children:n.map(y=>C.jsxs("div",{className:"attachments__item",children:[C.jsx("a",{href:`/media/${y.hash}`,target:"_blank",rel:"noreferrer",children:C.jsx("img",{className:"attachments__thumb",src:`/media/${y.hash}`,alt:y.caption??"attachment",loading:"lazy"})}),C.jsx("span",{className:"attachments__meta",children:lB(y.bytes)}),p&&C.jsx("button",{className:"attachments__remove",title:"Remove this image from the ticket",disabled:l,onClick:()=>void w(()=>tB(e,y.hash)),children:"x"})]},y.hash))}),v?C.jsxs("div",{className:`attachments__drop${f?" attachments__drop--over":""}`,onDragOver:y=>{y.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:y=>{y.preventDefault(),h(!1),g(y.dataTransfer.files)},onClick:()=>{var y;return(y=d.current)==null?void 0:y.click()},children:[C.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,hidden:!0,onChange:y=>{g(y.target.files),y.target.value=""}}),l?"Uploading...":`Drop an image on ${t}, or click to choose`]}):r!==null?C.jsx("p",{className:"attachments__readonly",children:r}):n.length===0&&C.jsx("p",{className:"attachments__readonly",children:"Open the viewer with the open_viewer tool to add images."}),u!==null&&C.jsx("p",{className:"attachments__error",children:u})]})}const Gc=e=>new Date(e).toLocaleDateString(void 0,{day:"numeric",month:"short"}),uB=e=>e.latest===null&&e.latestText===null;function cB(e){if(e.latest!==null){const t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,"");return e.units.length>0?`${t} ${e.units.join("/")}`:t}if(e.values.length>1){const t=e.values.map(r=>`${r.text} x${r.count}`).join(", "),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??""}function fB({metrics:e,open:t,onToggle:n}){return e.length===0?null:C.jsx($k,{title:"Metrics",count:e.length,open:t,onToggle:n,children:C.jsx("table",{className:"metrics__table",children:C.jsx("tbody",{children:e.map(r=>C.jsxs("tr",{children:[C.jsx("td",{className:"metrics__name",children:r.metric}),C.jsx("td",{className:"metrics__value","data-mixed":r.units.length>1,"data-wrap":r.values.length>1,children:cB(r)}),C.jsx("td",{className:"metrics__count",children:uB(r)?`${r.count} ${r.count===1?"occurrence":"occurrences"}, to ${Gc(r.latestAt)}`:r.count===1?Gc(r.latestAt):`${r.count} readings, to ${Gc(r.latestAt)}`})]},r.metric))})})})}function gv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function dB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hB(e,t,n){const i=Wu((n||{}).ignore||[]),o=pB(t);let s=-1;for(;++s<o.length;)Fk(e,"text",l);function l(u,c){let f=-1,h;for(;++f<c.length;){const d=c[f],p=h?h.children:void 0;if(i(d,p?p.indexOf(d):void 0,h))return;h=d}if(h)return a(u,c)}function a(u,c){const f=c[c.length-1],h=o[s][0],d=o[s][1];let p=0;const w=f.children.indexOf(u);let g=!1,y=[];h.lastIndex=0;let m=h.exec(u.value);for(;m;){const x=m.index,_={index:m.index,input:m.input,stack:[...c,u]};let b=d(...m,_);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?h.lastIndex=x+1:(p!==x&&y.push({type:"text",value:u.value.slice(p,x)}),Array.isArray(b)?y.push(...b):b&&y.push(b),p=x+m[0].length,g=!0),!h.global)break;m=h.exec(u.value)}return g?(p<u.value.length&&y.push({type:"text",value:u.value.slice(p)}),f.children.splice(w,1,...y)):y=[u],w+y.length}}function pB(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([gB(i[0]),mB(i[1])])}return t}function gB(e){return typeof e=="string"?new RegExp(dB(e),"g"):e}function mB(e){return typeof e=="function"?e:function(){return e}}const Yc="phrasing",Qc=["autolink","link","image","label"];function yB(){return{transforms:[_B],enter:{literalAutolink:wB,literalAutolinkEmail:qc,literalAutolinkHttp:qc,literalAutolinkWww:qc},exit:{literalAutolink:kB,literalAutolinkEmail:EB,literalAutolinkHttp:xB,literalAutolinkWww:bB}}}function vB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yc,notInConstruct:Qc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yc,notInConstruct:Qc},{character:":",before:"[ps]",after:"\\/",inConstruct:Yc,notInConstruct:Qc}]}}function wB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qc(e){this.config.enter.autolinkProtocol.call(this,e)}function xB(e){this.config.exit.autolinkProtocol.call(this,e)}function bB(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function EB(e){this.config.exit.autolinkEmail.call(this,e)}function kB(e){this.exit(e)}function _B(e){hB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CB]],{ignore:["link","linkReference"]})}function SB(e,t,n,r,i){let o="";if(!Wk(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!AB(n)))return!1;const s=NB(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function CB(e,t,n,r){return!Wk(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function AB(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function NB(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=gv(e,"(");let o=gv(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Wk(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ai(n)||$u(n))&&(!t||n!==47)}Gk.peek=zB;function DB(){this.buffer()}function TB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RB(){this.buffer()}function IB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function OB(e){this.exit(e)}function PB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LB(e){this.exit(e)}function zB(){return"["}function Gk(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function jB(){return{enter:{gfmFootnoteCallString:DB,gfmFootnoteCall:TB,gfmFootnoteDefinitionLabelString:RB,gfmFootnoteDefinition:IB},exit:{gfmFootnoteCallString:MB,gfmFootnoteCall:OB,gfmFootnoteDefinitionLabelString:PB,gfmFootnoteDefinition:LB}}}function FB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Gk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
76
+ `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Yk:BB))),u(),a}}function BB(e,t,n){return t===0?e:Yk(e,t,n)}function Yk(e,t,n){return(n?"":" ")+e}const HB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Qk.peek=GB;function $B(){return{canContainEols:["delete"],enter:{strikethrough:UB},exit:{strikethrough:WB}}}function VB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HB}],handlers:{delete:Qk}}}function UB(e){this.enter({type:"delete",children:[]},e)}function WB(e){this.exit(e)}function Qk(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function GB(){return"~"}function YB(e){return e.length}function QB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||YB,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const v=[],w=[];let g=-1;for(e[c].length>u&&(u=e[c].length);++g<e[c].length;){const y=qB(e[c][g]);if(n.alignDelimiters!==!1){const m=i(y);w[g]=m,(a[g]===void 0||m>a[g])&&(a[g]=m)}v.push(y)}s[c]=v,l[c]=w}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=mv(r[f]);else{const v=mv(r);for(;++f<u;)o[f]=v}f=-1;const h=[],d=[];for(;++f<u;){const v=o[f];let w="",g="";v===99?(w=":",g=":"):v===108?w=":":v===114&&(g=":");let y=n.alignDelimiters===!1?1:Math.max(1,a[f]-w.length-g.length);const m=w+"-".repeat(y)+g;n.alignDelimiters!==!1&&(y=w.length+y+g.length,y>a[f]&&(a[f]=y),d[f]=y),h[f]=m}s.splice(1,0,h),l.splice(1,0,d),c=-1;const p=[];for(;++c<s.length;){const v=s[c],w=l[c];f=-1;const g=[];for(;++f<u;){const y=v[f]||"";let m="",x="";if(n.alignDelimiters!==!1){const _=a[f]-(w[f]||0),b=o[f];b===114?m=" ".repeat(_):b===99?_%2?(m=" ".repeat(_/2+.5),x=" ".repeat(_/2-.5)):(m=" ".repeat(_/2),x=m):x=" ".repeat(_)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(m),g.push(y),n.alignDelimiters!==!1&&g.push(x),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&g.push("|")}p.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return p.join(`
77
+ `)}function qB(e){return e==null?"":String(e)}function mv(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function XB(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),ZB);return i(),s}function ZB(e,t,n){return">"+(n?"":" ")+e}function KB(e,t){return yv(e,t.inConstruct,!0)&&!yv(e,t.notInConstruct,!1)}function yv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vv(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
78
+ `&&KB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
79
+ `}function JB(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function e4(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function t4(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function n4(e,t,n,r){const i=t4(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(e4(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(o,r4);return f(),h}const l=n.createTracker(r),a=i.repeat(Math.max(JB(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const f=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:`
80
+ `,encode:["`"],...l.current()})),f()}return c+=l.move(`
81
+ `),o&&(c+=l.move(o+`
82
+ `)),c+=l.move(a),u(),c}function r4(e,t,n){return(n?"":" ")+e}function Ip(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function i4(e,t,n,r){const i=Ip(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
83
+ `,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function o4(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ns(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Za(e,t,n){const r=so(e),i=so(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qk.peek=s4;function qk(e,t,n,r){const i=o4(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=Za(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=Ns(u)+a.slice(1));const f=a.charCodeAt(a.length-1),h=Za(r.after.charCodeAt(0),f,i);h.inside&&(a=a.slice(0,-1)+Ns(f));const d=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+d}function s4(e,t,n){return n.options.emphasis||"*"}function l4(e,t){let n=!1;return Np(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Pd}),!!((!e.depth||e.depth<3)&&bp(e)&&(t.options.setext||n))}function a4(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(l4(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
84
+ `,after:`
85
+ `});return f(),c(),h+`
86
+ `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
87
+ `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
88
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=Ns(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Xk.peek=u4;function Xk(e){return e.value||""}function u4(){return"<"}Zk.peek=c4;function Zk(e,t,n,r){const i=Ip(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function c4(){return"!"}Kk.peek=f4;function Kk(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function f4(){return"!"}Jk.peek=d4;function Jk(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function d4(){return"`"}function e1(e,t){const n=bp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}t1.peek=h4;function t1(e,t,n,r){const i=Ip(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(e1(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),n.stack=c,f}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function h4(e,t,n){return e1(e,n)?"<":"["}n1.peek=p4;function n1(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function p4(){return"["}function Mp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function g4(e){const t=Mp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function m4(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function r1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function y4(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?m4(n):Mp(n);const l=e.ordered?s==="."?")":".":g4(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),r1(n)===s&&c){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function v4(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function w4(e,t,n,r){const i=v4(n);let o=n.bulletCurrent||Mp(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(f,h,d){return h?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function x4(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const b4=Wu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function E4(e,t,n,r){return(e.children.some(function(s){return b4(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function k4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}i1.peek=_4;function i1(e,t,n,r){const i=k4(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=Za(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=Ns(u)+a.slice(1));const f=a.charCodeAt(a.length-1),h=Za(r.after.charCodeAt(0),f,i);h.inside&&(a=a.slice(0,-1)+Ns(f));const d=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+d}function _4(e,t,n){return n.options.strong||"*"}function S4(e,t,n,r){return n.safe(e.value,r)}function C4(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function A4(e,t,n){const r=(r1(n)+(n.options.ruleSpaces?" ":"")).repeat(C4(n));return n.options.ruleSpaces?r.slice(0,-1):r}const o1={blockquote:XB,break:vv,code:n4,definition:i4,emphasis:qk,hardBreak:vv,heading:a4,html:Xk,image:Zk,imageReference:Kk,inlineCode:Jk,link:t1,linkReference:n1,list:y4,listItem:w4,paragraph:x4,root:E4,strong:i1,text:S4,thematicBreak:A4};function N4(){return{enter:{table:D4,tableData:wv,tableHeader:wv,tableRow:R4},exit:{codeText:I4,table:T4,tableData:Xc,tableHeader:Xc,tableRow:Xc}}}function D4(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function T4(e){this.exit(e),this.data.inTable=void 0}function R4(e){this.enter({type:"tableRow",children:[]},e)}function Xc(e){this.exit(e)}function wv(e){this.enter({type:"tableCell",children:[]},e)}function I4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,M4));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function M4(e,t){return t==="|"?t:e}function O4(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
89
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l}};function s(d,p,v,w){return u(c(d,v,w),d.align)}function l(d,p,v,w){const g=f(d,v,w),y=u([g]);return y.slice(0,y.indexOf(`
90
+ `))}function a(d,p,v,w){const g=v.enter("tableCell"),y=v.enter("phrasing"),m=v.containerPhrasing(d,{...w,before:o,after:o});return y(),g(),m}function u(d,p){return QB(d,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function c(d,p,v){const w=d.children;let g=-1;const y=[],m=p.enter("table");for(;++g<w.length;)y[g]=f(w[g],p,v);return m(),y}function f(d,p,v){const w=d.children;let g=-1;const y=[],m=p.enter("tableRow");for(;++g<w.length;)y[g]=a(w[g],d,p,v);return m(),y}function h(d,p,v){let w=o1.inlineCode(d,p,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function P4(){return{exit:{taskListCheckValueChecked:xv,taskListCheckValueUnchecked:xv,paragraph:z4}}}function L4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:j4}}}function xv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function z4(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function j4(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=o1.listItem(e,t,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+s}}function F4(){return[yB(),jB(),$B(),N4(),P4()]}function B4(e){return{extensions:[vB(),FB(e),VB(),O4(e),L4()]}}const H4={tokenize:Y4,partial:!0},s1={tokenize:Q4,partial:!0},l1={tokenize:q4,partial:!0},a1={tokenize:X4,partial:!0},$4={tokenize:Z4,partial:!0},u1={name:"wwwAutolink",tokenize:W4,previous:f1},c1={name:"protocolAutolink",tokenize:G4,previous:d1},Xn={name:"emailAutolink",tokenize:U4,previous:h1},In={};function V4(){return{text:In}}let Rr=48;for(;Rr<123;)In[Rr]=Xn,Rr++,Rr===58?Rr=65:Rr===91&&(Rr=97);In[43]=Xn;In[45]=Xn;In[46]=Xn;In[95]=Xn;In[72]=[Xn,c1];In[104]=[Xn,c1];In[87]=[Xn,u1];In[119]=[Xn,u1];function U4(e,t,n){const r=this;let i,o;return s;function s(f){return!Bd(f)||!h1.call(r,r.previous)||Op(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(f))}function l(f){return Bd(f)?(e.consume(f),l):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check($4,c,u)(f):f===45||f===95||ct(f)?(o=!0,e.consume(f),a):c(f)}function u(f){return e.consume(f),i=!0,a}function c(f){return o&&i&&yt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function W4(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!f1.call(r,r.previous)||Op(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(H4,e.attempt(s1,e.attempt(l1,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function G4(e,t,n){const r=this;let i="",o=!1;return s;function s(f){return(f===72||f===104)&&d1.call(r,r.previous)&&!Op(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),l):n(f)}function l(f){if(yt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),l;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),o?u:(o=!0,a)):n(f)}function u(f){return f===null||Qa(f)||Te(f)||ai(f)||$u(f)?n(f):e.attempt(s1,e.attempt(l1,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Y4(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Q4(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(a1,a,l)(u):u===null||Te(u)||ai(u)||u!==45&&$u(u)?a(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!o?n(u):t(u)}}function q4(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(a1,t,o)(s):s===null||Te(s)||ai(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function X4(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||Te(l)||ai(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Te(l)||ai(l)?t(l):r(l)}function o(l){return yt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):yt(l)?(e.consume(l),s):n(l)}}function Z4(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ct(o)?n(o):t(o)}}function f1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Te(e)}function d1(e){return!yt(e)}function h1(e){return!(e===47||Bd(e))}function Bd(e){return e===43||e===45||e===46||e===95||ct(e)}function Op(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const K4={tokenize:s3,partial:!0};function J4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r3,continuation:{tokenize:i3},exit:o3}},text:{91:{name:"gfmFootnoteCall",tokenize:n3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e3,resolveTo:t3}}}}function e3(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=pn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function t3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function n3(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!s||f===null||f===91||Te(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(pn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Te(f)||(s=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function r3(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(p)}function c(p){if(s>999||p===93&&!l||p===null||p===91||Te(p))return n(p);if(p===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=pn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Te(p)||(l=!0),s++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(o)||i.push(o),xe(e,d,"gfmFootnoteDefinitionWhitespace")):n(p)}function d(p){return t(p)}}function i3(e,t,n){return e.check(Gs,t,e.attempt(K4,t,n))}function o3(e){e.exit("gfmFootnoteDefinition")}function s3(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function l3(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},f={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",f,l]],d=l.parser.constructs.insideSpan.null;d&&zt(h,h.length,0,Vu(d,s.slice(u+1,a),l)),zt(h,h.length,0,[["exit",f,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),zt(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let f=0;return h;function h(p){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(p):(s.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const v=so(u);if(p===126)return f>1?a(p):(s.consume(p),f++,d);if(f<2&&!n)return a(p);const w=s.exit("strikethroughSequenceTemporary"),g=so(p);return w._open=!g||g===2&&!!v,w._close=!v||v===2&&!!g,l(p)}}}class a3{constructor(){this.map=[]}add(t,n,r){u3(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function u3(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function c3(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function f3(){return{flow:{null:{name:"table",tokenize:d3,resolveAll:h3}}}}function d3(e,t,n){const r=this;let i=0,o=0,s;return l;function l(N){let R=r.events.length-1;for(;R>-1;){const S=r.events[R][1].type;if(S==="lineEnding"||S==="linePrefix")R--;else break}const j=R>-1?r.events[R][1].type:null,F=j==="tableHead"||j==="tableRow"?b:a;return F===b&&r.parser.lazy[r.now().line]?n(N):F(N)}function a(N){return e.enter("tableHead"),e.enter("tableRow"),u(N)}function u(N){return N===124||(s=!0,o+=1),c(N)}function c(N){return N===null?n(N):fe(N)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),d):n(N):ve(N)?xe(e,c,"whitespace")(N):(o+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(N)))}function f(N){return N===null||N===124||Te(N)?(e.exit("data"),c(N)):(e.consume(N),N===92?h:f)}function h(N){return N===92||N===124?(e.consume(N),f):f(N)}function d(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,ve(N)?xe(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):p(N))}function p(N){return N===45||N===58?w(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),v):_(N)}function v(N){return ve(N)?xe(e,w,"whitespace")(N):w(N)}function w(N){return N===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),g):N===45?(o+=1,g(N)):N===null||fe(N)?x(N):_(N)}function g(N){return N===45?(e.enter("tableDelimiterFiller"),y(N)):_(N)}function y(N){return N===45?(e.consume(N),y):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(N))}function m(N){return ve(N)?xe(e,x,"whitespace")(N):x(N)}function x(N){return N===124?p(N):N===null||fe(N)?!s||i!==o?_(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):_(N)}function _(N){return n(N)}function b(N){return e.enter("tableRow"),k(N)}function k(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),k):N===null||fe(N)?(e.exit("tableRow"),t(N)):ve(N)?xe(e,k,"whitespace")(N):(e.enter("data"),A(N))}function A(N){return N===null||N===124||Te(N)?(e.exit("data"),k(N)):(e.consume(N),N===92?T:A)}function T(N){return N===92||N===124?(e.consume(N),A):A(N)}}function h3(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,f;const h=new a3;for(;++n<e.length;){const d=e[n],p=d[1];d[0]==="enter"?p.type==="tableHead"?(l=!1,a!==0&&(bv(h,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=Al(h,t,o,i,void 0,f),o=[0,0,0,0]),s[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],f=Al(h,t,o,i,void 0,f)),o=s,s=[o[1],n,0,0])):p.type==="tableHead"?(l=!0,a=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],f=Al(h,t,o,i,n,f)):s[1]!==0&&(f=Al(h,t,s,i,n,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&bv(h,t,a,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=c3(t.events,n))}return e}function Al(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},bi(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=bi(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=bi(t.events,n[2]),c=bi(t.events,n[3]),f={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],d=t.events[n[3]];if(h[1].end=Object.assign({},d[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,v=n[3]-n[2]-1;e.add(p,v,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},bi(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function bv(e,t,n,r,i){const o=[],s=bi(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function bi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const p3={name:"tasklistCheck",tokenize:m3};function g3(){return{text:{91:p3}}}function m3(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return Te(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return fe(a)?t(a):ve(a)?e.check({tokenize:y3},t,n)(a):n(a)}}function y3(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function v3(e){return wk([V4(),J4(),l3(e),f3(),g3()])}const w3={};function x3(e){const t=this,n=e||w3,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(v3(n)),o.push(F4()),s.push(B4(n))}const p1=L.createContext({}),b3=()=>L.useContext(p1),jt={done:{icon:"✓",label:"done",colour:"#34d399",strike:!0},review:{icon:"◐",label:"review",colour:"#a884f3",strike:!1},"in-progress":{icon:"●",label:"in-progress",colour:"#4f9dff",strike:!1},"to-do":{icon:"○",label:"to-do",colour:"#fbbf24",strike:!1},planning:{icon:"○",label:"planning",colour:"#e8590c",strike:!1}},E3=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,k3=e=>E3.test(e);function Pp(e){const t=e.indexOf(":");if(t<=0)return null;const n=e.slice(t+1);return k3(n)?{project:e.slice(0,t),ref:n}:null}function _3(e){const t=[];for(const n of e)t.includes(n.area)||t.push(n.area);return t}var S3="\0",Ir="\0",Ev="";let C3=class{constructor(t){Ge(this,"_isDirected",!0);Ge(this,"_isMultigraph",!1);Ge(this,"_isCompound",!1);Ge(this,"_label");Ge(this,"_defaultNodeLabelFn",()=>{});Ge(this,"_defaultEdgeLabelFn",()=>{});Ge(this,"_nodes",{});Ge(this,"_in",{});Ge(this,"_preds",{});Ge(this,"_out",{});Ge(this,"_sucs",{});Ge(this,"_edgeObjs",{});Ge(this,"_edgeLabels",{});Ge(this,"_nodeCount",0);Ge(this,"_edgeCount",0);Ge(this,"_parent");Ge(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[Ir]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(n=>Object.keys(t._in[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(t._out[n]).length===0)}setNodes(t,n){var r=arguments,i=this;return t.forEach(function(o){r.length>1?i.setNode(o,n):i.setNode(o)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ir,this._children[t]={},this._children[Ir][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var n=this;if(Object.hasOwn(this._nodes,t)){var r=i=>n.removeEdge(n._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(i){n.setParent(i)}),delete this._children[t]),Object.keys(this._in[t]).forEach(r),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=Ir;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==Ir)return n}}children(t=Ir){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===Ir)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=this._preds[t];if(n)return Object.keys(n)}successors(t){var n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const i=new Set(n);for(var r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([s,l]){t(s)&&n.setNode(s,l)}),Object.values(this._edgeObjs).forEach(function(s){n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,r.edge(s))});var i={};function o(s){var l=r.parent(s);return l===void 0||n.hasNode(l)?(i[s]=l,l):l in i?i[l]:o(l)}return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,o(s))),n}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){var r=this,i=arguments;return t.reduce(function(o,s){return i.length>1?r.setEdge(o,s,n):r.setEdge(o,s),s}),this}setEdge(){var t,n,r,i,o=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,n=s.w,r=s.name,arguments.length===2&&(i=arguments[1],o=!0)):(t=s,n=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var l=Lo(this._isDirected,t,n,r);if(Object.hasOwn(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(r!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(t,n,r);var a=A3(this._isDirected,t,n,r);return t=a.v,n=a.w,Object.freeze(a),this._edgeObjs[l]=a,kv(this._preds[n],t),kv(this._sucs[t],n),this._in[n][l]=a,this._out[t][l]=a,this._edgeCount++,this}edge(t,n,r){var i=arguments.length===1?Zc(this._isDirected,arguments[0]):Lo(this._isDirected,t,n,r);return this._edgeLabels[i]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var i=arguments.length===1?Zc(this._isDirected,arguments[0]):Lo(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,i)}removeEdge(t,n,r){var i=arguments.length===1?Zc(this._isDirected,arguments[0]):Lo(this._isDirected,t,n,r),o=this._edgeObjs[i];return o&&(t=o.v,n=o.w,delete this._edgeLabels[i],delete this._edgeObjs[i],_v(this._preds[n],t),_v(this._sucs[t],n),delete this._in[n][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,n){var r=this._in[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.v===n):i}}outEdges(t,n){var r=this._out[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.w===n):i}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}};function kv(e,t){e[t]?e[t]++:e[t]=1}function _v(e,t){--e[t]||delete e[t]}function Lo(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var s=i;i=o,o=s}return i+Ev+o+Ev+(r===void 0?S3:r)}function A3(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var s=i;i=o,o=s}var l={v:i,w:o};return r&&(l.name=r),l}function Zc(e,t){return Lo(e,t.v,t.w,t.name)}var Lp=C3,N3="2.2.4",D3={Graph:Lp,version:N3},T3=Lp,R3={write:I3,read:P3};function I3(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M3(e),edges:O3(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function M3(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function O3(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function P3(e){var t=new T3(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var L3=z3;function z3(e){var t={},n=[],r;function i(o){Object.hasOwn(t,o)||(t[o]=!0,r.push(o),e.successors(o).forEach(i),e.predecessors(o).forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&n.push(r)}),n}let j3=class{constructor(){Ge(this,"_arr",[]);Ge(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,n){var r=this._keyIndices;if(t=String(t),!Object.hasOwn(r,t)){var i=this._arr,o=i.length;return r[t]=o,i.push({key:t,priority:n}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,n){var r=this._keyIndices[t];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)}_heapify(t){var n=this._arr,r=2*t,i=r+1,o=t;r<n.length&&(o=n[r].priority<n[o].priority?r:o,i<n.length&&(o=n[i].priority<n[o].priority?i:o),o!==t&&(this._swap(t,o),this._heapify(o)))}_decrease(t){for(var n=this._arr,r=n[t].priority,i;t!==0&&(i=t>>1,!(n[i].priority<r));)this._swap(t,i),t=i}_swap(t,n){var r=this._arr,i=this._keyIndices,o=r[t],s=r[n];r[t]=s,r[n]=o,i[s.key]=t,i[o.key]=n}};var g1=j3,F3=g1,m1=H3,B3=()=>1;function H3(e,t,n,r){return $3(e,String(t),n||B3,r||function(i){return e.outEdges(i)})}function $3(e,t,n,r){var i={},o=new F3,s,l,a=function(u){var c=u.v!==s?u.v:u.w,f=i[c],h=n(u),d=l.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+h);d<f.distance&&(f.distance=d,f.predecessor=s,o.decrease(c,d))};for(e.nodes().forEach(function(u){var c=u===t?0:Number.POSITIVE_INFINITY;i[u]={distance:c},o.add(u,c)});o.size()>0&&(s=o.removeMin(),l=i[s],l.distance!==Number.POSITIVE_INFINITY);)r(s).forEach(a);return i}var V3=m1,U3=W3;function W3(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=V3(e,i,t,n),r},{})}var y1=G3;function G3(e){var t=0,n=[],r={},i=[];function o(s){var l=r[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(c){Object.hasOwn(r,c)?r[c].onStack&&(l.lowlink=Math.min(l.lowlink,r[c].index)):(o(c),l.lowlink=Math.min(l.lowlink,r[c].lowlink))}),l.lowlink===l.index){var a=[],u;do u=n.pop(),r[u].onStack=!1,a.push(u);while(s!==u);i.push(a)}}return e.nodes().forEach(function(s){Object.hasOwn(r,s)||o(s)}),i}var Y3=y1,Q3=q3;function q3(e){return Y3(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var X3=K3,Z3=()=>1;function K3(e,t,n){return J3(e,t||Z3,n||function(r){return e.outEdges(r)})}function J3(e,t,n){var r={},i=e.nodes();return i.forEach(function(o){r[o]={},r[o][o]={distance:0},i.forEach(function(s){o!==s&&(r[o][s]={distance:Number.POSITIVE_INFINITY})}),n(o).forEach(function(s){var l=s.v===o?s.w:s.v,a=t(s);r[o][l]={distance:a,predecessor:o}})}),i.forEach(function(o){var s=r[o];i.forEach(function(l){var a=r[l];i.forEach(function(u){var c=a[o],f=s[u],h=a[u],d=c.distance+f.distance;d<h.distance&&(h.distance=d,h.predecessor=f.predecessor)})})}),r}function v1(e){var t={},n={},r=[];function i(o){if(Object.hasOwn(n,o))throw new Hd;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(i),delete n[o],r.push(o))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Hd;return r}class Hd extends Error{constructor(){super(...arguments)}}var w1=v1;v1.CycleException=Hd;var Sv=w1,eH=tH;function tH(e){try{Sv(e)}catch(t){if(t instanceof Sv.CycleException)return!1;throw t}return!0}var x1=nH;function nH(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),i=n==="post"?rH:iH,o=[],s={};return t.forEach(l=>{if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);i(l,r,s,o)}),o}function rH(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),b1(t(o[0]),s=>i.push([s,!1])))}}function iH(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),b1(t(o),s=>i.push(s)))}}function b1(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var oH=x1,sH=lH;function lH(e,t){return oH(e,t,"post")}var aH=x1,uH=cH;function cH(e,t){return aH(e,t,"pre")}var fH=Lp,dH=g1,hH=pH;function pH(e,t){var n=new fH,r={},i=new dH,o;function s(a){var u=a.v===o?a.w:a.v,c=i.priority(u);if(c!==void 0){var f=t(a);f<c&&(r[u]=o,i.decrease(u,f))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(a){i.add(a,Number.POSITIVE_INFINITY),n.setNode(a)}),i.decrease(e.nodes()[0],0);for(var l=!1;i.size()>0;){if(o=i.removeMin(),Object.hasOwn(r,o))n.setEdge(o,r[o]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(o).forEach(s)}return n}var gH={components:L3,dijkstra:m1,dijkstraAll:U3,findCycles:Q3,floydWarshall:X3,isAcyclic:eH,postorder:sH,preorder:uH,prim:hH,tarjan:y1,topsort:w1},Cv=D3,wn={Graph:Cv.Graph,json:R3,alg:gH,version:Cv.version};let mH=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return Av(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&Av(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],n=this._sentinel,r=n._prev;for(;r!==n;)t.push(JSON.stringify(r,yH)),r=r._prev;return"["+t.join(", ")+"]"}};function Av(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function yH(e,t){if(e!=="_next"&&e!=="_prev")return t}var vH=mH;let wH=wn.Graph,xH=vH;var bH=kH;let EH=()=>1;function kH(e,t){if(e.nodeCount()<=1)return[];let n=SH(e,t||EH);return _H(n.graph,n.buckets,n.zeroIdx).flatMap(i=>e.outEdges(i.v,i.w))}function _H(e,t,n){let r=[],i=t[t.length-1],o=t[0],s;for(;e.nodeCount();){for(;s=o.dequeue();)Kc(e,t,n,s);for(;s=i.dequeue();)Kc(e,t,n,s);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(s=t[l].dequeue(),s){r=r.concat(Kc(e,t,n,s,!0));break}}}return r}function Kc(e,t,n,r,i){let o=i?[]:void 0;return e.inEdges(r.v).forEach(s=>{let l=e.edge(s),a=e.node(s.v);i&&o.push({v:s.v,w:s.w}),a.out-=l,$d(t,n,a)}),e.outEdges(r.v).forEach(s=>{let l=e.edge(s),a=s.w,u=e.node(a);u.in-=l,$d(t,n,u)}),e.removeNode(r.v),o}function SH(e,t){let n=new wH,r=0,i=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let a=n.edge(l.v,l.w)||0,u=t(l),c=a+u;n.setEdge(l.v,l.w,c),i=Math.max(i,n.node(l.v).out+=u),r=Math.max(r,n.node(l.w).in+=u)});let o=CH(i+r+3).map(()=>new xH),s=r+1;return n.nodes().forEach(l=>{$d(o,s,n.node(l))}),{graph:n,buckets:o,zeroIdx:s}}function $d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function CH(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}let E1=wn.Graph;var qe={addBorderNode:PH,addDummyNode:k1,applyWithChunking:Yu,asNonCompoundGraph:NH,buildLayerMatrix:IH,intersectRect:RH,mapValues:$H,maxRank:S1,normalizeRanks:MH,notime:FH,partition:zH,pick:HH,predecessorWeights:TH,range:A1,removeEmptyRanks:OH,simplify:AH,successorWeights:DH,time:jH,uniqueId:C1,zipObject:zp};function k1(e,t,n,r){for(var i=r;e.hasNode(i);)i=C1(r);return n.dummy=t,e.setNode(i,n),i}function AH(e){let t=new E1().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function NH(e){let t=new E1({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function DH(e){let t=e.nodes().map(n=>{let r={};return e.outEdges(n).forEach(i=>{r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return zp(e.nodes(),t)}function TH(e){let t=e.nodes().map(n=>{let r={};return e.inEdges(n).forEach(i=>{r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return zp(e.nodes(),t)}function RH(e,t){let n=e.x,r=e.y,i=t.x-n,o=t.y-r,s=e.width/2,l=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");let a,u;return Math.abs(o)*s>Math.abs(i)*l?(o<0&&(l=-l),a=l*i/o,u=l):(i<0&&(s=-s),a=s,u=s*o/i),{x:n+a,y:r+u}}function IH(e){let t=A1(S1(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function MH(e){let t=e.nodes().map(r=>{let i=e.node(r).rank;return i===void 0?Number.MAX_VALUE:i}),n=Yu(Math.min,t);e.nodes().forEach(r=>{let i=e.node(r);Object.hasOwn(i,"rank")&&(i.rank-=n)})}function OH(e){let t=e.nodes().map(s=>e.node(s).rank),n=Yu(Math.min,t),r=[];e.nodes().forEach(s=>{let l=e.node(s).rank-n;r[l]||(r[l]=[]),r[l].push(s)});let i=0,o=e.graph().nodeRankFactor;Array.from(r).forEach((s,l)=>{s===void 0&&l%o!==0?--i:s!==void 0&&i&&s.forEach(a=>e.node(a).rank+=i)})}function PH(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),k1(e,"border",i,t)}function LH(e,t=_1){const n=[];for(let r=0;r<e.length;r+=t){const i=e.slice(r,r+t);n.push(i)}return n}const _1=65535;function Yu(e,t){if(t.length>_1){const n=LH(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function S1(e){const n=e.nodes().map(r=>{let i=e.node(r).rank;return i===void 0?Number.MIN_VALUE:i});return Yu(Math.max,n)}function zH(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function jH(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function FH(e,t){return t()}let BH=0;function C1(e){var t=++BH;return e+(""+t)}function A1(e,t,n=1){t==null&&(t=e,e=0);let r=o=>o<t;n<0&&(r=o=>t<o);const i=[];for(let o=e;r(o);o+=n)i.push(o);return i}function HH(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function $H(e,t){let n=t;return typeof t=="string"&&(n=r=>r[t]),Object.entries(e).reduce((r,[i,o])=>(r[i]=n(o,i),r),{})}function zp(e,t){return e.reduce((n,r,i)=>(n[r]=t[i],n),{})}let VH=bH,UH=qe.uniqueId;var WH={run:GH,undo:QH};function GH(e){(e.graph().acyclicer==="greedy"?VH(e,n(e)):YH(e)).forEach(r=>{let i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,UH("rev"))});function n(r){return i=>r.edge(i).weight}}function YH(e){let t=[],n={},r={};function i(o){Object.hasOwn(r,o)||(r[o]=!0,n[o]=!0,e.outEdges(o).forEach(s=>{Object.hasOwn(n,s.w)?t.push(s):i(s.w)}),delete n[o])}return e.nodes().forEach(i),t}function QH(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}let qH=qe;var XH={run:ZH,undo:JH};function ZH(e){e.graph().dummyChains=[],e.edges().forEach(t=>KH(e,t))}function KH(e,t){let n=t.v,r=e.node(n).rank,i=t.w,o=e.node(i).rank,s=t.name,l=e.edge(t),a=l.labelRank;if(o===r+1)return;e.removeEdge(t);let u,c,f;for(f=0,++r;r<o;++f,++r)l.points=[],c={width:0,height:0,edgeLabel:l,edgeObj:t,rank:r},u=qH.addDummyNode(e,"edge",c,"_d"),r===a&&(c.width=l.width,c.height=l.height,c.dummy="edge-label",c.labelpos=l.labelpos),e.setEdge(n,u,{weight:l.weight},s),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:l.weight},s)}function JH(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}const{applyWithChunking:e$}=qe;var Qu={longestPath:t$,slack:n$};function t$(e){var t={};function n(r){var i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let o=e.outEdges(r).map(l=>l==null?Number.POSITIVE_INFINITY:n(l.w)-e.edge(l).minlen);var s=e$(Math.min,o);return s===Number.POSITIVE_INFINITY&&(s=0),i.rank=s}e.sources().forEach(n)}function n$(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var r$=wn.Graph,Ka=Qu.slack,N1=i$;function i$(e){var t=new r$({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;o$(t,e)<r;)i=s$(t,e),o=t.hasNode(i.v)?Ka(e,i):-Ka(e,i),l$(t,e,o);return t}function o$(e,t){function n(r){t.nodeEdges(r).forEach(i=>{var o=i.v,s=r===o?i.w:o;!e.hasNode(s)&&!Ka(t,i)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function s$(e,t){return t.edges().reduce((r,i)=>{let o=Number.POSITIVE_INFINITY;return e.hasNode(i.v)!==e.hasNode(i.w)&&(o=Ka(t,i)),o<r[0]?[o,i]:r},[Number.POSITIVE_INFINITY,null])[1]}function l$(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}var a$=N1,Nv=Qu.slack,u$=Qu.longestPath,c$=wn.alg.preorder,f$=wn.alg.postorder,d$=qe.simplify,h$=hi;hi.initLowLimValues=Fp;hi.initCutValues=jp;hi.calcCutValue=D1;hi.leaveEdge=R1;hi.enterEdge=I1;hi.exchangeEdges=M1;function hi(e){e=d$(e),u$(e);var t=a$(e);Fp(t),jp(t,e);for(var n,r;n=R1(t);)r=I1(t,e,n),M1(t,e,n,r)}function jp(e,t){var n=f$(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>p$(e,t,r))}function p$(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=D1(e,t,n)}function D1(e,t,n){var r=e.node(n),i=r.parent,o=!0,s=t.edge(n,i),l=0;return s||(o=!1,s=t.edge(i,n)),l=s.weight,t.nodeEdges(n).forEach(a=>{var u=a.v===n,c=u?a.w:a.v;if(c!==i){var f=u===o,h=t.edge(a).weight;if(l+=f?h:-h,m$(e,n,c)){var d=e.edge(n,c).cutvalue;l+=f?-d:d}}}),l}function Fp(e,t){arguments.length<2&&(t=e.nodes()[0]),T1(e,{},1,t)}function T1(e,t,n,r,i){var o=n,s=e.node(r);return t[r]=!0,e.neighbors(r).forEach(l=>{Object.hasOwn(t,l)||(n=T1(e,t,n,l,r))}),s.low=o,s.lim=n++,i?s.parent=i:delete s.parent,n}function R1(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function I1(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),s=e.node(i),l=o,a=!1;o.lim>s.lim&&(l=s,a=!0);var u=t.edges().filter(c=>a===Dv(e,e.node(c.v),l)&&a!==Dv(e,e.node(c.w),l));return u.reduce((c,f)=>Nv(t,f)<Nv(t,c)?f:c)}function M1(e,t,n,r){var i=n.v,o=n.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),Fp(e),jp(e,t),g$(e,t)}function g$(e,t){var n=e.nodes().find(i=>!t.node(i).parent),r=c$(e,n);r=r.slice(1),r.forEach(i=>{var o=e.node(i).parent,s=t.edge(i,o),l=!1;s||(s=t.edge(o,i),l=!0),t.node(i).rank=t.node(o).rank+(l?s.minlen:-s.minlen)})}function m$(e,t,n){return e.hasEdge(t,n)}function Dv(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var y$=Qu,O1=y$.longestPath,v$=N1,w$=h$,x$=b$;function b$(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":Tv(e);break;case"tight-tree":k$(e);break;case"longest-path":E$(e);break;case"none":break;default:Tv(e)}}var E$=O1;function k$(e){O1(e),v$(e)}function Tv(e){w$(e)}var _$=S$;function S$(e){let t=A$(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,o=C$(e,t,i.v,i.w),s=o.path,l=o.lca,a=0,u=s[a],c=!0;for(;n!==i.w;){if(r=e.node(n),c){for(;(u=s[a])!==l&&e.node(u).maxRank<r.rank;)a++;u===l&&(c=!1)}if(!c){for(;a<s.length-1&&e.node(u=s[a+1]).minRank<=r.rank;)a++;u=s[a]}e.setParent(n,u),n=e.successors(n)[0]}})}function C$(e,t,n,r){let i=[],o=[],s=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim),a,u;a=n;do a=e.parent(a),i.push(a);while(a&&(t[a].low>s||l>t[a].lim));for(u=a,a=r;(a=e.parent(a))!==u;)o.push(a);return{path:i.concat(o.reverse()),lca:u}}function A$(e){let t={},n=0;function r(i){let o=n;e.children(i).forEach(r),t[i]={low:o,lim:n++}}return e.children().forEach(r),t}let Ja=qe;var N$={run:D$,cleanup:I$};function D$(e){let t=Ja.addDummyNode(e,"root",{},"_root"),n=T$(e),r=Object.values(n),i=Ja.applyWithChunking(Math.max,r)-1,o=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=o);let s=R$(e)+1;e.children().forEach(l=>P1(e,t,o,s,i,n,l)),e.graph().nodeRankFactor=o}function P1(e,t,n,r,i,o,s){let l=e.children(s);if(!l.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}let a=Ja.addBorderNode(e,"_bt"),u=Ja.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(a,s),c.borderTop=a,e.setParent(u,s),c.borderBottom=u,l.forEach(f=>{P1(e,t,n,r,i,o,f);let h=e.node(f),d=h.borderTop?h.borderTop:f,p=h.borderBottom?h.borderBottom:f,v=h.borderTop?r:2*r,w=d!==p?1:i-o[s]+1;e.setEdge(a,d,{weight:v,minlen:w,nestingEdge:!0}),e.setEdge(p,u,{weight:v,minlen:w,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,a,{weight:0,minlen:i+o[s]})}function T$(e){var t={};function n(r,i){var o=e.children(r);o&&o.length&&o.forEach(s=>n(s,i+1)),t[r]=i}return e.children().forEach(r=>n(r,1)),t}function R$(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function I$(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}let M$=qe;var O$=P$;function P$(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let o=i.minRank,s=i.maxRank+1;o<s;++o)Rv(e,"borderLeft","_bl",n,i,o),Rv(e,"borderRight","_br",n,i,o)}}e.children().forEach(t)}function Rv(e,t,n,r,i,o){let s={width:0,height:0,rank:o,borderType:t},l=i[t][o-1],a=M$.addDummyNode(e,"border",s,n);i[t][o]=a,e.setParent(a,r),l&&e.setEdge(l,a,{weight:1})}var L$={adjust:z$,undo:j$};function z$(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&L1(e)}function j$(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&F$(e),(t==="lr"||t==="rl")&&(B$(e),L1(e))}function L1(e){e.nodes().forEach(t=>Iv(e.node(t))),e.edges().forEach(t=>Iv(e.edge(t)))}function Iv(e){let t=e.width;e.width=e.height,e.height=t}function F$(e){e.nodes().forEach(t=>Jc(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Jc),Object.hasOwn(n,"y")&&Jc(n)})}function Jc(e){e.y=-e.y}function B$(e){e.nodes().forEach(t=>ef(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(ef),Object.hasOwn(n,"x")&&ef(n)})}function ef(e){let t=e.x;e.x=e.y,e.y=t}let Mv=qe;var H$=$$;function $$(e){let t={},n=e.nodes().filter(a=>!e.children(a).length),r=n.map(a=>e.node(a).rank),i=Mv.applyWithChunking(Math.max,r),o=Mv.range(i+1).map(()=>[]);function s(a){if(t[a])return;t[a]=!0;let u=e.node(a);o[u.rank].push(a),e.successors(a).forEach(s)}return n.sort((a,u)=>e.node(a).rank-e.node(u).rank).forEach(s),o}let V$=qe.zipObject;var U$=W$;function W$(e,t){let n=0;for(let r=1;r<t.length;++r)n+=G$(e,t[r-1],t[r]);return n}function G$(e,t,n){let r=V$(n,n.map((u,c)=>c)),i=t.flatMap(u=>e.outEdges(u).map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,f)=>c.pos-f.pos)),o=1;for(;o<n.length;)o<<=1;let s=2*o-1;o-=1;let l=new Array(s).fill(0),a=0;return i.forEach(u=>{let c=u.pos+o;l[c]+=u.weight;let f=0;for(;c>0;)c%2&&(f+=l[c+1]),c=c-1>>1,l[c]+=u.weight;a+=u.weight*f}),a}var Y$=Q$;function Q$(e,t=[]){return t.map(n=>{let r=e.inEdges(n);if(r.length){let i=r.reduce((o,s)=>{let l=e.edge(s),a=e.node(s.v);return{sum:o.sum+l.weight*a.order,weight:o.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}let q$=qe;var X$=Z$;function Z$(e,t){let n={};e.forEach((i,o)=>{let s=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};i.barycenter!==void 0&&(s.barycenter=i.barycenter,s.weight=i.weight)}),t.edges().forEach(i=>{let o=n[i.v],s=n[i.w];o!==void 0&&s!==void 0&&(s.indegree++,o.out.push(n[i.w]))});let r=Object.values(n).filter(i=>!i.indegree);return K$(r)}function K$(e){let t=[];function n(i){return o=>{o.merged||(o.barycenter===void 0||i.barycenter===void 0||o.barycenter>=i.barycenter)&&J$(i,o)}}function r(i){return o=>{o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(i=>!i.merged).map(i=>q$.pick(i,["vs","i","barycenter","weight"]))}function J$(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}let eV=qe;var tV=nV;function nV(e,t){let n=eV.partition(e,c=>Object.hasOwn(c,"barycenter")),r=n.lhs,i=n.rhs.sort((c,f)=>f.i-c.i),o=[],s=0,l=0,a=0;r.sort(rV(!!t)),a=Ov(o,i,a),r.forEach(c=>{a+=c.vs.length,o.push(c.vs),s+=c.barycenter*c.weight,l+=c.weight,a=Ov(o,i,a)});let u={vs:o.flat(!0)};return l&&(u.barycenter=s/l,u.weight=l),u}function Ov(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function rV(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}let iV=Y$,oV=X$,sV=tV;var lV=z1;function z1(e,t,n,r){let i=e.children(t),o=e.node(t),s=o?o.borderLeft:void 0,l=o?o.borderRight:void 0,a={};s&&(i=i.filter(h=>h!==s&&h!==l));let u=iV(e,i);u.forEach(h=>{if(e.children(h.v).length){let d=z1(e,h.v,n,r);a[h.v]=d,Object.hasOwn(d,"barycenter")&&uV(h,d)}});let c=oV(u,n);aV(c,a);let f=sV(c,r);if(s&&(f.vs=[s,f.vs,l].flat(!0),e.predecessors(s).length)){let h=e.node(e.predecessors(s)[0]),d=e.node(e.predecessors(l)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+d.order)/(f.weight+2),f.weight+=2}return f}function aV(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function uV(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let cV=wn.Graph,fV=qe;var dV=hV;function hV(e,t,n,r){r||(r=e.nodes());let i=pV(e),o=new cV({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(s=>e.node(s));return r.forEach(s=>{let l=e.node(s),a=e.parent(s);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(o.setNode(s),o.setParent(s,a||i),e[n](s).forEach(u=>{let c=u.v===s?u.w:u.v,f=o.edge(c,s),h=f!==void 0?f.weight:0;o.setEdge(c,s,{weight:e.edge(u).weight+h})}),Object.hasOwn(l,"minRank")&&o.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),o}function pV(e){for(var t;e.hasNode(t=fV.uniqueId("_root")););return t}var gV=mV;function mV(e,t,n){let r={},i;n.forEach(o=>{let s=e.parent(o),l,a;for(;s;){if(l=e.parent(s),l?(a=r[l],r[l]=s):(a=i,i=s),a&&a!==s){t.setEdge(a,s);return}s=l}})}let yV=H$,vV=U$,wV=lV,xV=dV,bV=gV,EV=wn.Graph,Nl=qe;var kV=j1;function j1(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,j1);return}let n=Nl.maxRank(e),r=Pv(e,Nl.range(1,n+1),"inEdges"),i=Pv(e,Nl.range(n-1,-1,-1),"outEdges"),o=yV(e);if(Lv(e,o),t&&t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,l;for(let a=0,u=0;u<4;++a,++u){_V(a%2?r:i,a%4>=2),o=Nl.buildLayerMatrix(e);let c=vV(e,o);c<s&&(u=0,l=Object.assign({},o),s=c)}Lv(e,l)}function Pv(e,t,n){const r=new Map,i=(o,s)=>{r.has(o)||r.set(o,[]),r.get(o).push(s)};for(const o of e.nodes()){const s=e.node(o);if(typeof s.rank=="number"&&i(s.rank,o),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&i(l,o)}return t.map(function(o){return xV(e,o,n,r.get(o)||[])})}function _V(e,t){let n=new EV;e.forEach(function(r){let i=r.graph().root,o=wV(r,i,n,t);o.vs.forEach((s,l)=>r.node(s).order=l),bV(r,n,o.vs)})}function Lv(e,t){Object.values(t).forEach(n=>n.forEach((r,i)=>e.node(r).order=i))}let SV=wn.Graph,Ln=qe;var CV={positionX:zV};function AV(e,t){let n={};function r(i,o){let s=0,l=0,a=i.length,u=o[o.length-1];return o.forEach((c,f)=>{let h=DV(e,c),d=h?e.node(h).order:a;(h||c===u)&&(o.slice(l,f+1).forEach(p=>{e.predecessors(p).forEach(v=>{let w=e.node(v),g=w.order;(g<s||d<g)&&!(w.dummy&&e.node(p).dummy)&&F1(n,v,p)})}),l=f+1,s=d)}),o}return t.length&&t.reduce(r),n}function NV(e,t){let n={};function r(o,s,l,a,u){let c;Ln.range(s,l).forEach(f=>{c=o[f],e.node(c).dummy&&e.predecessors(c).forEach(h=>{let d=e.node(h);d.dummy&&(d.order<a||d.order>u)&&F1(n,h,c)})})}function i(o,s){let l=-1,a,u=0;return s.forEach((c,f)=>{if(e.node(c).dummy==="border"){let h=e.predecessors(c);h.length&&(a=e.node(h[0]).order,r(s,u,f,l,a),u=f,l=a)}r(s,u,s.length,a,o.length)}),s}return t.length&&t.reduce(i),n}function DV(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function F1(e,t,n){if(t>n){let i=t;t=n,n=i}let r=e[t];r||(e[t]=r={}),r[n]=!0}function TV(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function RV(e,t,n,r){let i={},o={},s={};return t.forEach(l=>{l.forEach((a,u)=>{i[a]=a,o[a]=a,s[a]=u})}),t.forEach(l=>{let a=-1;l.forEach(u=>{let c=r(u);if(c.length){c=c.sort((h,d)=>s[h]-s[d]);let f=(c.length-1)/2;for(let h=Math.floor(f),d=Math.ceil(f);h<=d;++h){let p=c[h];o[u]===u&&a<s[p]&&!TV(n,u,p)&&(o[p]=u,o[u]=i[u]=i[p],a=s[p])}}})}),{root:i,align:o}}function IV(e,t,n,r,i){let o={},s=MV(e,t,n,i),l=i?"borderLeft":"borderRight";function a(f,h){let d=s.nodes(),p=d.pop(),v={};for(;p;)v[p]?f(p):(v[p]=!0,d.push(p),d=d.concat(h(p))),p=d.pop()}function u(f){o[f]=s.inEdges(f).reduce((h,d)=>Math.max(h,o[d.v]+s.edge(d)),0)}function c(f){let h=s.outEdges(f).reduce((p,v)=>Math.min(p,o[v.w]-s.edge(v)),Number.POSITIVE_INFINITY),d=e.node(f);h!==Number.POSITIVE_INFINITY&&d.borderType!==l&&(o[f]=Math.max(o[f],h))}return a(u,s.predecessors.bind(s)),a(c,s.successors.bind(s)),Object.keys(r).forEach(f=>o[f]=o[n[f]]),o}function MV(e,t,n,r){let i=new SV,o=e.graph(),s=jV(o.nodesep,o.edgesep,r);return t.forEach(l=>{let a;l.forEach(u=>{let c=n[u];if(i.setNode(c),a){var f=n[a],h=i.edge(f,c);i.setEdge(f,c,Math.max(s(e,u,a),h||0))}a=u})}),i}function OV(e,t){return Object.values(t).reduce((n,r)=>{let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([l,a])=>{let u=FV(e,l)/2;i=Math.max(a+u,i),o=Math.min(a-u,o)});const s=i-o;return s<n[0]&&(n=[s,r]),n},[Number.POSITIVE_INFINITY,null])[1]}function PV(e,t){let n=Object.values(t),r=Ln.applyWithChunking(Math.min,n),i=Ln.applyWithChunking(Math.max,n);["u","d"].forEach(o=>{["l","r"].forEach(s=>{let l=o+s,a=e[l];if(a===t)return;let u=Object.values(a),c=r-Ln.applyWithChunking(Math.min,u);s!=="l"&&(c=i-Ln.applyWithChunking(Math.max,u)),c&&(e[l]=Ln.mapValues(a,f=>f+c))})})}function LV(e,t){return Ln.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let i=Object.values(e).map(o=>o[r]).sort((o,s)=>o-s);return(i[1]+i[2])/2}})}function zV(e){let t=Ln.buildLayerMatrix(e),n=Object.assign(AV(e,t),NV(e,t)),r={},i;["u","d"].forEach(s=>{i=s==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(i=i.map(f=>Object.values(f).reverse()));let a=(s==="u"?e.predecessors:e.successors).bind(e),u=RV(e,i,n,a),c=IV(e,i,u.root,u.align,l==="r");l==="r"&&(c=Ln.mapValues(c,f=>-f)),r[s+l]=c})});let o=OV(e,r);return PV(r,o),LV(r,e.graph().align)}function jV(e,t,n){return(r,i,o)=>{let s=r.node(i),l=r.node(o),a=0,u;if(a+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(a+=n?u:-u),u=0,a+=(s.dummy?t:e)/2,a+=(l.dummy?t:e)/2,a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=l.width/2;break;case"r":u=-l.width/2;break}return u&&(a+=n?u:-u),u=0,a}}function FV(e,t){return e.node(t).width}let B1=qe,BV=CV.positionX;var HV=$V;function $V(e){e=B1.asNonCompoundGraph(e),VV(e),Object.entries(BV(e)).forEach(([t,n])=>e.node(t).x=n)}function VV(e){let t=B1.buildLayerMatrix(e),n=e.graph().ranksep,r=0;t.forEach(i=>{const o=i.reduce((s,l)=>{const a=e.node(l).height;return s>a?s:a},0);i.forEach(s=>e.node(s).y=r+o/2),r+=o+n})}let zv=WH,jv=XH,UV=x$,WV=qe.normalizeRanks,GV=_$,YV=qe.removeEmptyRanks,Fv=N$,QV=O$,Bv=L$,qV=kV,XV=HV,Kt=qe,ZV=wn.Graph;var KV=JV;function JV(e,t){let n=t&&t.debugTiming?Kt.time:Kt.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>u5(e));n(" runLayout",()=>e5(r,n,t)),n(" updateInputGraph",()=>t5(e,r))})}function e5(e,t,n){t(" makeSpaceForEdgeLabels",()=>c5(e)),t(" removeSelfEdges",()=>w5(e)),t(" acyclic",()=>zv.run(e)),t(" nestingGraph.run",()=>Fv.run(e)),t(" rank",()=>UV(Kt.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>f5(e)),t(" removeEmptyRanks",()=>YV(e)),t(" nestingGraph.cleanup",()=>Fv.cleanup(e)),t(" normalizeRanks",()=>WV(e)),t(" assignRankMinMax",()=>d5(e)),t(" removeEdgeLabelProxies",()=>h5(e)),t(" normalize.run",()=>jv.run(e)),t(" parentDummyChains",()=>GV(e)),t(" addBorderSegments",()=>QV(e)),t(" order",()=>qV(e,n)),t(" insertSelfEdges",()=>x5(e)),t(" adjustCoordinateSystem",()=>Bv.adjust(e)),t(" position",()=>XV(e)),t(" positionSelfEdges",()=>b5(e)),t(" removeBorderNodes",()=>v5(e)),t(" normalize.undo",()=>jv.undo(e)),t(" fixupEdgeLabelCoords",()=>m5(e)),t(" undoCoordinateSystem",()=>Bv.undo(e)),t(" translateGraph",()=>p5(e)),t(" assignNodeIntersects",()=>g5(e)),t(" reversePoints",()=>y5(e)),t(" acyclic.undo",()=>zv.undo(e))}function t5(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let n5=["nodesep","edgesep","ranksep","marginx","marginy"],r5={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},i5=["acyclicer","ranker","rankdir","align"],o5=["width","height","rank"],Hv={width:0,height:0},s5=["minlen","weight","width","height","labeloffset"],l5={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},a5=["labelpos"];function u5(e){let t=new ZV({multigraph:!0,compound:!0}),n=nf(e.graph());return t.setGraph(Object.assign({},r5,tf(n,n5),Kt.pick(n,i5))),e.nodes().forEach(r=>{let i=nf(e.node(r));const o=tf(i,o5);Object.keys(Hv).forEach(s=>{o[s]===void 0&&(o[s]=Hv[s])}),t.setNode(r,o),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let i=nf(e.edge(r));t.setEdge(r,Object.assign({},l5,tf(i,s5),Kt.pick(i,a5)))}),t}function c5(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function f5(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};Kt.addDummyNode(e,"edge-proxy",o,"_ep")}})}function d5(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function h5(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function p5(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,l=o.marginy||0;function a(u){let c=u.x,f=u.y,h=u.width,d=u.height;t=Math.min(t,c-h/2),n=Math.max(n,c+h/2),r=Math.min(r,f-d/2),i=Math.max(i,f+d/2)}e.nodes().forEach(u=>a(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&a(c)}),t-=s,r-=l,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=r}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(f=>{f.x-=t,f.y-=r}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=r)}),o.width=n-t+s,o.height=i-r+l}function g5(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),o,s;n.points?(o=n.points[0],s=n.points[n.points.length-1]):(n.points=[],o=i,s=r),n.points.unshift(Kt.intersectRect(r,o)),n.points.push(Kt.intersectRect(i,s))})}function m5(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function y5(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function v5(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),o=e.node(n.borderLeft[n.borderLeft.length-1]),s=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function w5(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function x5(e){var t=Kt.buildLayerMatrix(e);t.forEach(n=>{var r=0;n.forEach((i,o)=>{var s=e.node(i);s.order=o+r,(s.selfEdges||[]).forEach(l=>{Kt.addDummyNode(e,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:o+ ++r,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function b5(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,s=n.x-i,l=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*s/3,y:o-l},{x:i+5*s/6,y:o-l},{x:i+s,y:o},{x:i+5*s/6,y:o+l},{x:i+2*s/3,y:o+l}],n.label.x=n.x,n.label.y=n.y}})}function tf(e,t){return Kt.mapValues(Kt.pick(e,t),Number)}function nf(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}let E5=qe,k5=wn.Graph;var _5={debugOrdering:S5};function S5(e){let t=E5.buildLayerMatrix(e),n=new k5({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>n.setEdge(r.v,r.w,{},r.name)),t.forEach((r,i)=>{let o="layer"+i;n.setNode(o,{rank:"same"}),r.reduce((s,l)=>(n.setEdge(s,l,{style:"invis"}),l))}),n}var C5="1.1.8",A5={graphlib:wn,layout:KV,debug:_5,util:{time:qe.time,notime:qe.notime},version:C5};const $v=Ms(A5),H1=(e,t)=>`elsewhere:${e}:${t}`,Vd=e=>`elsewhere:${e}`;function $1(e){return e.flatMap(t=>t.deps.flatMap(n=>{const r=Pp(n);return r===null?[]:[{ghostId:H1(r.project,r.ref),...r,dependent:t.id}]}))}const Vv=["#4f9dff","#34d399","#a884f3","#fbbf24","#f472b6","#22d3ee","#fb923c","#a3e635"];function Uv(e){return Object.fromEntries(e.map((t,n)=>[t,Vv[n%Vv.length]]))}const na=212,V1=62,rf=34,ra=18,ia=46,U1=20,Wv=68,of=34,Gv=12,N5=92,D5=30,W1=(e,t)=>e.filter(n=>n.parent===t),G1=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function T5(e,t){const n=W1(t,e.id);if(n.length===0)return{width:na,height:V1};const r=Q1(n,t).box;return{width:r.width,height:r.height}}function R5(e,t,n){const r=new $v.graphlib.Graph;r.setGraph({rankdir:"LR",nodesep:D5,ranksep:N5}),r.setDefaultEdgeLabel(()=>({}));for(const u of e){const c=n.get(u.id);r.setNode(u.id,{width:c.width,height:c.height})}for(const[u,c]of t)r.setEdge(u,c);$v.layout(r);const i=new Map;let o=1/0,s=1/0;for(const u of e){const c=r.node(u.id),f=n.get(u.id),h=c.x-f.width/2,d=c.y-f.height/2;i.set(u.id,{x:h,y:d,width:f.width,height:f.height}),o=Math.min(o,h),s=Math.min(s,d)}let l=0,a=0;for(const u of i.values())u.x-=o,u.y-=s,l=Math.max(l,u.x+u.width),a=Math.max(a,u.y+u.height);return{placements:i,extent:{width:l,height:a}}}function I5(e,t,n){const r=new Map;let i=0,o=0,s=0,l=0;for(const a of e)i>0&&i+a.width>t&&(o+=s+n,i=0,s=0),r.set(a.id,{x:i,y:o,width:a.width,height:a.height}),i+=a.width+n,l=Math.max(l,i-n),s=Math.max(s,a.height);return{placements:r,extent:{width:l,height:o+s}}}function M5(e,t,n){const r=Math.max(t,...e.map(u=>u.width));let i=[{x:0,y:0,width:r}];const o=new Map,s=[...e].sort((u,c)=>c.height-u.height||c.width-u.width);for(const u of s){let c=null;for(const h of i){const d=h.x;if(d+u.width>r)continue;let p=0;for(const v of i)v.x+v.width<=d||v.x>=d+u.width||(p=Math.max(p,v.y));(c===null||p<c.y||p===c.y&&d<c.x)&&(c={x:d,y:p})}const f=c??{x:0,y:0};o.set(u.id,{x:f.x,y:f.y,width:u.width,height:u.height}),i=O5(i,f.x,u.width+n,f.y+u.height+n)}let l=0,a=0;for(const u of o.values())l=Math.max(l,u.x+u.width),a=Math.max(a,u.y+u.height);return{placements:o,extent:{width:l,height:a}}}function O5(e,t,n,r){const i=t+n,o=[];for(const l of e){const a=l.x+l.width;if(a<=t||l.x>=i){o.push(l);continue}l.x<t&&o.push({x:l.x,y:l.y,width:t-l.x}),a>i&&o.push({x:i,y:l.y,width:a-i})}o.push({x:t,y:r,width:n}),o.sort((l,a)=>l.x-a.x);const s=[];for(const l of o){const a=s[s.length-1];a&&a.y===l.y&&a.x+a.width===l.x?a.width+=l.width:s.push({...l})}return s}function Y1(e,t,n=2.8){const r=e.reduce((o,s)=>o+(s.width+t)*(s.height+t),0),i=Math.max(...e.map(o=>o.width));return Math.max(i,Math.sqrt(r*n))}function Q1(e,t){const n=new Map(e.map(c=>[c.id,T5(c,t)])),r=new Set(e.map(c=>c.id)),i=e.flatMap(c=>c.deps.filter(f=>r.has(f)).map(f=>[f,c.id])),o=new Set(i.flat()),s=e.filter(c=>o.has(c.id)),l=e.filter(c=>!o.has(c.id)),a=new Map,u=s.length>0?R5(s,i,n):{placements:new Map,extent:{width:0,height:0}};for(const[c,f]of u.placements)a.set(c,f);if(l.length>0){const c=l.map(p=>({id:p.id,...n.get(p.id)})),f=Math.max(u.extent.width,Y1(c,rf)),h=I5(c,f,rf),d=s.length>0?u.extent.height+rf:0;for(const[p,v]of h.placements)a.set(p,{...v,y:v.y+d})}return{placements:a,box:P5(a)}}function P5(e){let t=0,n=0;for(const r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+2*ra,height:n+ia+U1}}function L5(e,t){const n=a=>a.split("-")[0]??a,r=new Map;for(const a of t)for(const u of a.deps){const c=Pp(u),[f,h]=[c===null?n(u):Vd(c.project),n(a.id)];if(f!==h){const d=r.get(h)??new Set;d.add(f),r.set(h,d)}}const i=new Map(e.map(a=>[a.area,a])),o=new Set,s=[],l=a=>{const u=i.get(a);if(!(!u||o.has(a))){o.add(a);for(const c of r.get(a)??[])l(c);s.push(u)}};for(const a of e)l(a.area);return s}function z5(e,t,n,r,i,o){const s=new Set(e.map(k=>k.id)),l=e.flatMap(k=>k.deps.filter(A=>s.has(A)&&!G1(A,k.id)).map(A=>({id:`${A}->${k.id}`,source:A,target:k.id}))),a=new Map;for(const k of $1(e))s.has(k.dependent)&&a.set(k.ghostId,[...a.get(k.ghostId)??[],k.dependent]);const u=[...a].flatMap(([k,A])=>A.map(T=>({source:k,target:T}))),c=i?new Set([...l,...u].filter(k=>k.source===i||k.target===i).flatMap(k=>[k.source,k.target])):null,f=k=>k.split("-")[0]??k,h=new Set(e.filter(k=>k.status==="done").map(k=>k.id)),d=new Set,p=new Set;for(const k of l){const A=o.has(k.source)||o.has(k.target),T=f(k.source)!==f(k.target)&&h.has(k.source);!A&&!T||(o.has(k.source)||p.add(k.source),o.has(k.target)||d.add(k.target))}const v=k=>{var A;return r==="area"?n[k.area]??"#94a3b8":((A=jt[k.status])==null?void 0:A.colour)??"#94a3b8"},w=k=>{var A;return{item:k,colour:v(k),statusColour:((A=jt[k.status])==null?void 0:A.colour)??"#94a3b8",selected:k.id===i,dimmed:c?!c.has(k.id):!1,hiddenLinkIn:d.has(k.id),hiddenLinkOut:p.has(k.id)}},g=(k,A)=>{const{placements:T,box:N}=Q1(A,e);return{nodes:A.flatMap(j=>{const F=T.get(j.id),S={x:ra+F.x,y:ia+F.y},O=W1(e,j.id);if(O.length>0){const z=g(j.id,O);return[{id:j.id,type:"ticket",parentId:k,position:S,hidden:o.has(j.id),style:{width:z.box.width,height:z.box.height},data:{...w(j),count:O.length},zIndex:1},...z.nodes]}return[{id:j.id,type:"item",parentId:k,position:S,hidden:o.has(j.id),style:{width:na,height:V1},data:w(j),zIndex:3}]}),box:N}},y=t.flatMap(k=>{const A=e.filter(N=>N.area===k&&N.parent===null);if(A.length===0)return[];const T=g(`area:${k}`,A);return[{area:k,inner:T,size:T.box}]}),m=[...new Set([...a.keys()].map(k=>k.split(":")[1]))].sort().map(k=>{const A=[...a.keys()].filter(R=>R.startsWith(`elsewhere:${k}:`)).map(R=>R.slice(`elsewhere:${k}:`.length)).sort(),T=A.map((R,j)=>{const F=H1(k,R);return{id:F,type:"ghost",parentId:`area:${Vd(k)}`,position:{x:ra,y:ia+j*(of+Gv)},hidden:(a.get(F)??[]).every(S=>o.has(S)),data:{project:k,ref:R,dimmed:c?!c.has(F):!1},style:{width:na,height:of},zIndex:3}}),N={width:na+ra*2,height:ia+A.length*of+(A.length-1)*Gv+U1};return{area:Vd(k),foreign:k,inner:{nodes:T,box:N},size:N}}),x=L5([...m,...y],e),_=M5(x.map(k=>({id:k.area,...k.size})),Y1(x.map(k=>k.size),Wv,1.6),Wv);return x.flatMap(k=>{const A=_.placements.get(k.area);if(k.foreign!==void 0)return[{id:`area:${k.area}`,type:"area",position:{x:A.x,y:A.y},hidden:k.inner.nodes.every(j=>j.hidden===!0),data:{area:k.foreign,colour:"#64748b",count:k.inner.nodes.length,foreign:!0},style:{width:k.size.width,height:k.size.height},zIndex:0},...k.inner.nodes];const T=e.filter(R=>R.area===k.area);return[{id:`area:${k.area}`,type:"area",position:{x:A.x,y:A.y},hidden:T.every(R=>o.has(R.id)),data:{area:k.area,colour:n[k.area]??"#94a3b8",count:T.length},style:{width:k.size.width,height:k.size.height},zIndex:0},...k.inner.nodes]})}function j5(e,t,n,r,i,o,s){const l=new Set(e.map(d=>d.id)),a=new Set(e.filter(d=>d.status==="done").map(d=>d.id)),u=d=>d.split("-")[0]??d,c=d=>{var p;return n==="area"?t[d.area]??"#94a3b8":((p=jt[d.status])==null?void 0:p.colour)??"#94a3b8"},f=$1(e).filter(d=>l.has(d.dependent)).map(d=>{const p=`${d.ghostId}->${d.dependent}`,v=r===d.ghostId||r===d.dependent,w=i!=null&&(d.ghostId===i||d.dependent===i),g=v||w||p===o,y=s.has(d.dependent);return{id:p,source:d.ghostId,target:d.dependent,type:"smoothstep",pathOptions:{borderRadius:12},hidden:y&&!w,animated:v,zIndex:-1,style:{stroke:g?"#cbd5e1":"#7c8aa0",strokeWidth:g?2.5:1.2,strokeDasharray:"6 5",opacity:g?1:r?.08:.4}}});return[...e.flatMap(d=>d.deps.filter(p=>l.has(p)&&!G1(p,d.id)).map(p=>{const v=`${p}->${d.id}`,w=r===p||r===d.id,g=i!=null&&(p===i||d.id===i),y=u(p)!==u(d.id),m=w||g||v===o,x=y&&a.has(p),_=s.has(p)||s.has(d.id),b=g&&_;return{id:v,source:p,target:d.id,type:"smoothstep",pathOptions:{borderRadius:12},hidden:_&&!b||x&&!m,animated:w,zIndex:-1,style:{stroke:m?c(d):"#7c8aa0",strokeWidth:m?2.5:y?1.2:1.5,strokeDasharray:y?"6 5":void 0,opacity:m?1:r?y?.08:.12:y?.4:.6}}})),...f]}function F5({data:e}){const{item:t,colour:n,statusColour:r,selected:i,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:l}=e,a=jt[t.status];return C.jsxs("div",{className:"item-node","data-selected":i,"data-dimmed":o,style:{"--area":n},children:[C.jsx(Yn,{type:"target",position:se.Left,className:s?"handle--hidden-link":void 0}),C.jsx("div",{className:"item-node__rail"}),C.jsxs("div",{className:"item-node__body",children:[C.jsxs("div",{className:"item-node__meta",children:[C.jsx("span",{className:"item-node__id",children:t.id}),C.jsx("span",{className:"item-node__status",title:(a==null?void 0:a.label)??t.status,style:{color:r},children:(a==null?void 0:a.icon)??"?"})]}),C.jsx("div",{className:"item-node__title","data-strike":(a==null?void 0:a.strike)??!1,children:t.title})]}),C.jsx(Yn,{type:"source",position:se.Right,className:l?"handle--hidden-link":void 0})]})}const Bp=L.createContext(!1);function B5({data:e,selected:t}){const n=L.useContext(Bp);return C.jsxs("div",{className:"area-box","data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[C.jsx(ik,{isVisible:t&&!n,minWidth:220,minHeight:120,lineClassName:"box-resize-line",handleClassName:"box-resize-handle"}),C.jsxs("div",{className:"area-box__title",children:[C.jsx("span",{className:"area-box__name",children:e.area}),C.jsx("span",{className:"area-box__count",children:e.count})]})]})}function H5({data:e}){const{item:t,colour:n,statusColour:r,count:i,selected:o,dimmed:s,hiddenLinkIn:l,hiddenLinkOut:a}=e,u=jt[t.status],c=L.useContext(Bp);return C.jsxs("div",{className:"ticket-box","data-selected":o,"data-dimmed":s,style:{"--area":n},children:[C.jsx(ik,{isVisible:o&&!c,minWidth:200,minHeight:100,lineClassName:"box-resize-line",handleClassName:"box-resize-handle"}),C.jsx(Yn,{type:"target",position:se.Left,className:l?"handle--hidden-link":void 0}),C.jsxs("div",{className:"ticket-box__title",children:[C.jsx("span",{className:"ticket-box__id",children:t.id}),C.jsx("span",{className:"ticket-box__status",title:(u==null?void 0:u.label)??t.status,style:{color:r},children:(u==null?void 0:u.icon)??"?"}),C.jsx("span",{className:"ticket-box__label","data-strike":(u==null?void 0:u.strike)??!1,children:t.title}),C.jsx("span",{className:"ticket-box__count",children:i})]}),C.jsx(Yn,{type:"source",position:se.Right,className:a?"handle--hidden-link":void 0})]})}function $5({data:e}){const{project:t,ref:n,dimmed:r}=e;return C.jsxs("div",{className:"ghost-node","data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[C.jsx("span",{className:"ghost-node__ref",children:n}),C.jsx(Yn,{type:"source",position:se.Right})]})}const Hp="roadmap.positions.v2",$p="roadmap.sizes.v2",lo=(e,t)=>`${e}:${t}`;function q1(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function X1(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const V5=e=>q1(lo(Hp,e)),U5=(e,t)=>X1(lo(Hp,e),t),W5=e=>q1(lo($p,e)),G5=(e,t)=>X1(lo($p,e),t);function Y5(e){try{localStorage.removeItem(lo(Hp,e)),localStorage.removeItem(lo($p,e))}catch{}}const Yv=e=>`${jt[e].icon} ${jt[e].label}`;function Q5({projectKey:e,ref_:t,status:n,reload:r}){const[i,o]=L.useState(!1),[s,l]=L.useState(null);if(L.useEffect(()=>l(null),[t]),!Uk())return C.jsx("span",{className:"detail__status",children:Yv(n)});async function a(u){if(u!==n){o(!0),l(null);try{await eB(e,t,u)}catch(c){l(c instanceof Error?c.message:String(c))}finally{o(!1),r()}}}return C.jsxs(C.Fragment,{children:[C.jsx("select",{className:"detail__status detail__status--edit",value:n,disabled:i,"aria-label":"Status",onChange:u=>void a(u.target.value),children:Object.keys(jt).map(u=>C.jsx("option",{value:u,children:Yv(u)},u))}),s!==null&&C.jsx("span",{className:"detail__status-error",children:s})]})}var qu,de,Z1,K1,ao,Br,Qv,J1,e_,eu={},t_=[],q5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ur(e,t){for(var n in t)e[n]=t[n];return e}function n_(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?qu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return oa(e,s,r,i,null)}function oa(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Z1};return i==null&&de.vnode!=null&&de.vnode(o),o}function Qn(){return{current:null}}function Ve(e){return e.children}function X5(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||tu(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||tu(e,o,t[o],n[o],r)}function qv(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||q5.test(t)?n:n+"px"}function tu(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||qv(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qv(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Zv:Xv,o):e.removeEventListener(t,o?Zv:Xv,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Xv(e){ao=!0;try{return this.l[e.type+!1](de.event?de.event(e):e)}finally{ao=!1}}function Zv(e){ao=!0;try{return this.l[e.type+!0](de.event?de.event(e):e)}finally{ao=!1}}function Ft(e,t){this.props=e,this.context=t}function Ds(e,t){if(t==null)return e.__?Ds(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ds(e):null}function r_(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return r_(e)}}function Z5(e){ao?setTimeout(e):J1(e)}function Ud(e){(!e.__d&&(e.__d=!0)&&Br.push(e)&&!nu.__r++||Qv!==de.debounceRendering)&&((Qv=de.debounceRendering)||Z5)(nu)}function nu(){var e,t,n,r,i,o,s,l;for(Br.sort(function(a,u){return a.__v.__b-u.__v.__b});e=Br.shift();)e.__d&&(t=Br.length,r=void 0,i=void 0,s=(o=(n=e).__v).__e,(l=n.__P)&&(r=[],(i=ur({},o)).__v=o.__v+1,Vp(l,o,i,n.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Ds(o),o.__h),a_(r,o),o.__e!=s&&r_(o)),Br.length>t&&Br.sort(function(a,u){return a.__v.__b-u.__v.__b}));nu.__r=0}function i_(e,t,n,r,i,o,s,l,a,u){var c,f,h,d,p,v,w,g=r&&r.__k||t_,y=g.length;for(n.__k=[],c=0;c<t.length;c++)if((d=n.__k[c]=(d=t[c])==null||typeof d=="boolean"?null:typeof d=="string"||typeof d=="number"||typeof d=="bigint"?oa(null,d,null,null,d):Array.isArray(d)?oa(Ve,{children:d},null,null,null):d.__b>0?oa(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)!=null){if(d.__=n,d.__b=n.__b+1,(h=g[c])===null||h&&d.key==h.key&&d.type===h.type)g[c]=void 0;else for(f=0;f<y;f++){if((h=g[f])&&d.key==h.key&&d.type===h.type){g[f]=void 0;break}h=null}Vp(e,d,h=h||eu,i,o,s,l,a,u),p=d.__e,(f=d.ref)&&h.ref!=f&&(w||(w=[]),h.ref&&w.push(h.ref,null,d),w.push(f,d.__c||p,d)),p!=null?(v==null&&(v=p),typeof d.type=="function"&&d.__k===h.__k?d.__d=a=o_(d,a,e):a=s_(e,d,h,g,p,a),typeof n.type=="function"&&(n.__d=a)):a&&h.__e==a&&a.parentNode!=e&&(a=Ds(h))}for(n.__e=v,c=y;c--;)g[c]!=null&&(typeof n.type=="function"&&g[c].__e!=null&&g[c].__e==n.__d&&(n.__d=l_(r).nextSibling),c_(g[c],g[c]));if(w)for(c=0;c<w.length;c++)u_(w[c],w[++c],w[++c])}function o_(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?o_(r,t,n):s_(n,r,r,i,r.__e,t));return t}function ru(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){ru(n,t)}):t.push(e)),t}function s_(e,t,n,r,i,o){var s,l,a;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(l=o,a=0;(l=l.nextSibling)&&a<r.length;a+=1)if(l==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function l_(e){var t,n,r;if(e.type==null||typeof e.type=="string")return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=l_(n)))return r}return null}function Vp(e,t,n,r,i,o,s,l,a){var u,c,f,h,d,p,v,w,g,y,m,x,_,b,k,A=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(a=n.__h,l=t.__e=n.__e,t.__h=null,o=[l]),(u=de.__b)&&u(t);try{e:if(typeof A=="function"){if(w=t.props,g=(u=A.contextType)&&r[u.__c],y=u?g?g.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in A&&A.prototype.render?t.__c=c=new A(w,y):(t.__c=c=new Ft(w,y),c.constructor=A,c.render=J5),g&&g.sub(c),c.props=w,c.state||(c.state={}),c.context=y,c.__n=r,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ur({},c.__s)),ur(c.__s,A.getDerivedStateFromProps(w,c.__s))),h=c.props,d=c.state,c.__v=t,f)A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(A.getDerivedStateFromProps==null&&w!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(w,y),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(w,c.__s,y)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=w,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(T){T&&(T.__=t)}),m=0;m<c._sb.length;m++)c.__h.push(c._sb[m]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(w,c.__s,y),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,d,p)})}if(c.context=y,c.props=w,c.__P=e,x=de.__r,_=0,"prototype"in A&&A.prototype.render){for(c.state=c.__s,c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),b=0;b<c._sb.length;b++)c.__h.push(c._sb[b]);c._sb=[]}else do c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++_<25);c.state=c.__s,c.getChildContext!=null&&(r=ur(ur({},r),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(p=c.getSnapshotBeforeUpdate(h,d)),k=u!=null&&u.type===Ve&&u.key==null?u.props.children:u,i_(e,Array.isArray(k)?k:[k],t,n,r,i,o,s,l,a),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),v&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=K5(n.__e,t,n,r,i,o,s,a);(u=de.diffed)&&u(t)}catch(T){t.__v=null,(a||o!=null)&&(t.__e=l,t.__h=!!a,o[o.indexOf(l)]=null),de.__e(T,t,n)}}function a_(e,t){de.__c&&de.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){de.__e(r,n.__v)}})}function K5(e,t,n,r,i,o,s,l){var a,u,c,f=n.props,h=t.props,d=t.type,p=0;if(d==="svg"&&(i=!0),o!=null){for(;p<o.length;p++)if((a=o[p])&&"setAttribute"in a==!!d&&(d?a.localName===d:a.nodeType===3)){e=a,o[p]=null;break}}if(e==null){if(d===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,h.is&&h),o=null,l=!1}if(d===null)f===h||l&&e.data===h||(e.data=h);else{if(o=o&&qu.call(e.childNodes),u=(f=n.props||eu).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!l){if(o!=null)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(X5(e,h,f,i,l),c)t.__k=[];else if(p=t.props.children,i_(e,Array.isArray(p)?p:[p],t,n,r,i&&d!=="foreignObject",o,s,o?o[0]:n.__k&&Ds(n,0),l),o!=null)for(p=o.length;p--;)o[p]!=null&&n_(o[p]);l||("value"in h&&(p=h.value)!==void 0&&(p!==e.value||d==="progress"&&!p||d==="option"&&p!==f.value)&&tu(e,"value",p,f.value,!1),"checked"in h&&(p=h.checked)!==void 0&&p!==e.checked&&tu(e,"checked",p,f.checked,!1))}return e}function u_(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){de.__e(r,n)}}function c_(e,t,n){var r,i;if(de.unmount&&de.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||u_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){de.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&c_(r[i],t,n||typeof e.type!="function");n||e.__e==null||n_(e.__e),e.__=e.__e=e.__d=void 0}function J5(e,t,n){return this.constructor(e,n)}function Ts(e,t,n){var r,i,o;de.__&&de.__(e,t),i=(r=!1)?null:t.__k,o=[],Vp(t,e=t.__k=$(Ve,null,[e]),i||eu,eu,t.ownerSVGElement!==void 0,i?null:t.firstChild?qu.call(t.childNodes):null,o,i?i.__e:t.firstChild,r),a_(o,e)}function eU(e,t){var n={__c:t="__cC"+e_++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(l){l.__e=!0,Ud(l)})},this.sub=function(s){i.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),l&&l.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}qu=t_.slice,de={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(l){e=l}throw e}},Z1=0,K1=function(e){return e!=null&&e.constructor===void 0},ao=!1,Ft.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ur({},this.state),typeof e=="function"&&(e=e(ur({},n),this.props)),e&&ur(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ud(this))},Ft.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ud(this))},Ft.prototype.render=Ve,Br=[],J1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,nu.__r=0,e_=0;var _n,sf,Kv,f_=[],lf=[],Jv=de.__b,e0=de.__r,t0=de.diffed,n0=de.__c,r0=de.unmount;function tU(){for(var e;e=f_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(sa),e.__H.__h.forEach(Wd),e.__H.__h=[]}catch(t){e.__H.__h=[],de.__e(t,e.__v)}}de.__b=function(e){_n=null,Jv&&Jv(e)},de.__r=function(e){e0&&e0(e);var t=(_n=e.__c).__H;t&&(sf===_n?(t.__h=[],_n.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=lf,n.__N=n.i=void 0})):(t.__h.forEach(sa),t.__h.forEach(Wd),t.__h=[])),sf=_n},de.diffed=function(e){t0&&t0(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(f_.push(t)!==1&&Kv===de.requestAnimationFrame||((Kv=de.requestAnimationFrame)||nU)(tU)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==lf&&(n.__=n.__V),n.i=void 0,n.__V=lf})),sf=_n=null},de.__c=function(e,t){t.some(function(n){try{n.__h.forEach(sa),n.__h=n.__h.filter(function(r){return!r.__||Wd(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],de.__e(r,n.__v)}}),n0&&n0(e,t)},de.unmount=function(e){r0&&r0(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{sa(r)}catch(i){t=i}}),n.__H=void 0,t&&de.__e(t,n.__v))};var i0=typeof requestAnimationFrame=="function";function nU(e){var t,n=function(){clearTimeout(r),i0&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);i0&&(t=requestAnimationFrame(n))}function sa(e){var t=_n,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),_n=t}function Wd(e){var t=_n;e.__c=e.__(),_n=t}function rU(e,t){for(var n in t)e[n]=t[n];return e}function o0(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function s0(e){this.props=e}(s0.prototype=new Ft).isPureReactComponent=!0,s0.prototype.shouldComponentUpdate=function(e,t){return o0(this.props,e)||o0(this.state,t)};var l0=de.__b;de.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l0&&l0(e)};var iU=de.__e;de.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}iU(e,t,n,r)};var a0=de.unmount;function d_(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=rU({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return d_(r,t,n)})),e}function h_(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return h_(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function af(){this.__u=0,this.t=null,this.__b=null}function p_(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Dl(){this.u=null,this.o=null}de.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),a0&&a0(e)},(af.prototype=new Ft).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=p_(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(l):l())};n.__R=s;var l=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=h_(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}},a=t.__h===!0;r.__u++||a||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},af.prototype.componentWillUnmount=function(){this.t=[]},af.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=d_(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&$(Ve,null,e.fallback);return i&&(i.__h=null),[$(Ve,null,t.__a?null:e.children),i]};var u0=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function oU(e){return this.getChildContext=function(){return e.context},e.children}function sU(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ts(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ts($(oU,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function lU(e,t){var n=$(sU,{__v:e,i:t});return n.containerInfo=t,n}(Dl.prototype=new Ft).__a=function(e){var t=this,n=p_(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),u0(t,e,r)):i()};n?n(o):o()}},Dl.prototype.render=function(e){this.u=null,this.o=new Map;var t=ru(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Dl.prototype.componentDidUpdate=Dl.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){u0(e,n,t)})};var aU=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,uU=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,cU=typeof document<"u",fU=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};Ft.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ft.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var c0=de.event;function dU(){}function hU(){return this.cancelBubble}function pU(){return this.defaultPrevented}de.event=function(e){return c0&&(e=c0(e)),e.persist=dU,e.isPropagationStopped=hU,e.isDefaultPrevented=pU,e.nativeEvent=e};var f0={configurable:!0,get:function(){return this.class}},d0=de.vnode;de.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var s=n[o];cU&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&s==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!fU(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&uU.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():s===null&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ru(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=ru(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),e.props=r,n.class!=n.className&&(f0.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",f0))}e.$$typeof=aU,d0&&d0(e)};var h0=de.__r;de.__r=function(e){h0&&h0(e),e.__c};const g_=[],Gd=new Map;function m_(e){g_.push(e),Gd.forEach(t=>{v_(t,e)})}function gU(e){e.isConnected&&e.getRootNode&&y_(e.getRootNode())}function y_(e){let t=Gd.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=yU();n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Gd.set(e,t),mU(t)}}function mU(e){for(const t of g_)v_(e,t)}function v_(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach((i,o)=>{i=i.trim(),i&&n.insertRule(i+"}",r+o)})}let uf;function yU(){return uf===void 0&&(uf=vU()),uf}function vU(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}typeof document<"u"&&y_(document);var wU=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';m_(wU);class Up{constructor(t){this.drainedOption=t,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(t){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),t==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),t))}pause(t=""){let{pauseDepths:n}=this;n[t]=(n[t]||0)+1,this.clearTimeout()}resume(t="",n){let{pauseDepths:r}=this;t in r&&(n?delete r[t]:(r[t]-=1,r[t]<=0&&delete r[t]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function xU(e){e.parentNode&&e.parentNode.removeChild(e)}function zn(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(bU(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function bU(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function EU(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let i=0;i<n.length;i+=1){let o=n[i].querySelectorAll(t);for(let s=0;s<o.length;s+=1)r.push(o[s])}return r}const kU=/(top|left|right|bottom|width|height)$/i;function _U(e,t){for(let n in t)w_(e,n,t[n])}function w_(e,t,n){n==null?e.style[t]="":typeof n=="number"&&kU.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function SU(e){var t,n;return(n=(t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])!==null&&n!==void 0?n:e.target}let p0=0;function Xu(){return p0+=1,"fc-dom-"+p0}function CU(e,t){return n=>{let r=zn(n.target,e);r&&t.call(r,n,r)}}function x_(e,t,n,r){let i=CU(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function AU(e,t,n,r){let i;return x_(e,"mouseover",t,(o,s)=>{if(s!==i){i=s,n(o,s);let l=a=>{i=null,r(a,s),s.removeEventListener("mouseleave",l)};s.addEventListener("mouseleave",l)}})}function b_(e){return Object.assign({onClick:e},E_(e))}function E_(e){return{tabIndex:0,onKeyDown(t){(t.key==="Enter"||t.key===" ")&&(e(t),t.preventDefault())}}}let g0=0;function pi(){return g0+=1,String(g0)}function NU(e){let t=[],n=[],r,i;for(typeof e=="string"?n=e.split(/\s*,\s*/):typeof e=="function"?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i=="string"?t.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&t.push({func:i});return t}function DU(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=TU(e,t,n[r]),i)return i;return 0}function TU(e,t,n){return n.func?n.func(e,t):RU(e[n.field],t[n.field])*(n.order||1)}function RU(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e=="string"||typeof t=="string"?String(e).localeCompare(String(t)):e-t}function cf(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function Zo(e,t,n){return typeof e=="function"?e(...t):typeof e=="string"?t.reduce((r,i,o)=>r.replace("$"+o,i||""),e):n}function ff(e){return e%1===0}function IU(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const MU=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Se(e,t){return typeof e=="string"?OU(e):typeof e=="object"&&e?m0(e):typeof e=="number"?m0({[t||"milliseconds"]:e}):null}function OU(e){let t=MU.exec(e);if(t){let n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function m0(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function PU(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function LU(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function zU(e){return Wi(e)/365}function jU(e){return Wi(e)/30}function Wi(e){return Rs(e)/864e5}function Rs(e){return e.years*(365*864e5)+e.months*(30*864e5)+e.days*864e5+e.milliseconds}function Yd(e){let t=e.milliseconds;if(t){if(t%1e3!==0)return{unit:"millisecond",value:t};if(t%(1e3*60)!==0)return{unit:"second",value:t/1e3};if(t%(1e3*60*60)!==0)return{unit:"minute",value:t/(1e3*60)};if(t)return{unit:"hour",value:t/(1e3*60*60)}}return e.days?e.specifiedWeeks&&e.days%7===0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function _r(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}const FU=["sun","mon","tue","wed","thu","fri","sat"];function y0(e,t){let n=cr(e);return n[2]+=t*7,Ct(n)}function rt(e,t){let n=cr(e);return n[2]+=t,Ct(n)}function Sr(e,t){let n=cr(e);return n[6]+=t,Ct(n)}function BU(e,t){return yo(e,t)/7}function yo(e,t){return(t.valueOf()-e.valueOf())/(1e3*60*60*24)}function HU(e,t){return(t.valueOf()-e.valueOf())/(1e3*60*60)}function $U(e,t){return(t.valueOf()-e.valueOf())/(1e3*60)}function VU(e,t){return(t.valueOf()-e.valueOf())/1e3}function UU(e,t){let n=ze(e),r=ze(t);return{years:0,months:0,days:Math.round(yo(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function WU(e,t){let n=iu(e,t);return n!==null&&n%7===0?n/7:null}function iu(e,t){return fr(e)===fr(t)?Math.round(yo(e,t)):null}function ze(e){return Ct([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function GU(e){return Ct([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function YU(e){return Ct([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function QU(e){return Ct([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function qU(e,t,n){let r=e.getUTCFullYear(),i=df(e,r,t,n);if(i<1)return df(e,r-1,t,n);let o=df(e,r+1,t,n);return o>=1?Math.min(i,o):i}function df(e,t,n,r){let i=Ct([t,0,1+XU(t,n,r)]),o=ze(e),s=Math.round(yo(i,o));return Math.floor(s/7)+1}function XU(e,t,n){let r=7+t-n;return-((7+Ct([e,0,r]).getUTCDay()-t)%7)+r-1}function v0(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function w0(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function cr(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ct(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function k_(e){return!isNaN(e.valueOf())}function fr(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function ZU(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(t==null?r=r.replace("Z",""):t!==0&&(r=r.replace("Z",Gp(t,!0)))),r}function Wp(e){return e.toISOString().replace(/T.*$/,"")}function KU(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function Gp(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?`${n+cf(i,2)}:${cf(o,2)}`:`GMT${n}${i}${o?`:${cf(o,2)}`:""}`}function ke(e,t,n){let r,i;return function(...o){if(!r)i=e.apply(this,o);else if(!_r(r,o)){let s=e.apply(this,o);(!t||!t(s,i))&&(i=s)}return r=o,i}}function la(e,t,n){let r,i;return o=>(r?yn(r,o)||(i=e.call(this,o)):i=e.call(this,o),r=o,i)}const hf={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},ou={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Tl=/\s*([ap])\.?m\.?/i,JU=/,/g,e6=/\s+/g,t6=/\u200e/g,n6=/UTC|GMT/;class r6{constructor(t){let n={},r={},i=9;for(let o in t)o in hf?(r[o]=t[o],hf[o]<9&&(i=Math.min(hf[o],i))):(n[o]=t[o],o in ou&&(i=Math.min(ou[o],i)));this.standardDateProps=n,this.extendedSettings=r,this.smallestUnitNum=i,this.buildFormattingFunc=ke(x0)}format(t,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(t)}formatRange(t,n,r,i){let{standardDateProps:o,extendedSettings:s}=this,l=u6(t.marker,n.marker,r.calendarSystem);if(!l)return this.format(t,r);let a=l;a>1&&(o.year==="numeric"||o.year==="2-digit")&&(o.month==="numeric"||o.month==="2-digit")&&(o.day==="numeric"||o.day==="2-digit")&&(a=1);let u=this.format(t,r),c=this.format(n,r);if(u===c)return u;let f=c6(o,a),h=x0(f,s,r),d=h(t),p=h(n),v=f6(u,d,c,p),w=s.separator||i||r.defaultSeparator||"";return v?v.before+d+w+p+v.after:u+w+c}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function x0(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName==="short"?i=>Gp(i.timeZoneOffset):r===0&&t.week?i=>a6(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,t.week):i6(e,t,n)}function i6(e,t,n){e=Object.assign({},e),t=Object.assign({},t),o6(e,t),e.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let o=Object.assign({},e);delete o.minute,i=new Intl.DateTimeFormat(n.locale.codes,o)}return o=>{let{marker:s}=o,l;i&&!s.getUTCMinutes()?l=i:l=r;let a=l.format(s);return s6(a,o,e,t,n)}}function o6(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),e.timeZoneName==="long"&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function s6(e,t,n,r,i){return e=e.replace(t6,""),n.timeZoneName==="short"&&(e=l6(e,i.timeZone==="UTC"||t.timeZoneOffset==null?"UTC":Gp(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(JU,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),r.meridiem===!1?e=e.replace(Tl,"").trim():r.meridiem==="narrow"?e=e.replace(Tl,(o,s)=>s.toLocaleLowerCase()):r.meridiem==="short"?e=e.replace(Tl,(o,s)=>`${s.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(e=e.replace(Tl,o=>o.toLocaleLowerCase())),e=e.replace(e6," "),e=e.trim(),e}function l6(e,t){let n=!1;return e=e.replace(n6,()=>(n=!0,t)),n||(e+=` ${t}`),e}function a6(e,t,n,r,i){let o=[];return i==="long"?o.push(n):(i==="short"||i==="narrow")&&o.push(t),(i==="long"||i==="short")&&o.push(" "),o.push(r.simpleNumberFormat.format(e)),r.options.direction==="rtl"&&o.reverse(),o.join("")}function u6(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:fr(e)!==fr(t)?1:0}function c6(e,t){let n={};for(let r in e)(!(r in ou)||ou[r]<=t)&&(n[r]=e[r]);return n}function f6(e,t,n,r){let i=0;for(;i<e.length;){let o=e.indexOf(t,i);if(o===-1)break;let s=e.substr(0,o);i=o+t.length;let l=e.substr(i),a=0;for(;a<n.length;){let u=n.indexOf(r,a);if(u===-1)break;let c=n.substr(0,u);a=u+r.length;let f=n.substr(a);if(s===c&&l===f)return{before:s,after:l}}}return null}function b0(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function su(e,t,n,r){let i=b0(e,n.calendarSystem),o=t?b0(t,n.calendarSystem):null;return{date:i,start:i,end:o,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class d6{constructor(t){this.cmdStr=t}format(t,n,r){return n.cmdFormatter(this.cmdStr,su(t,null,n,r))}formatRange(t,n,r,i){return r.cmdFormatter(this.cmdStr,su(t,n,r,i))}}class h6{constructor(t){this.func=t}format(t,n,r){return this.func(su(t,null,n,r))}formatRange(t,n,r,i){return this.func(su(t,n,r,i))}}function tt(e){return typeof e=="object"&&e?new r6(e):typeof e=="string"?new d6(e):typeof e=="function"?new h6(e):null}const E0={navLinkDayClick:U,navLinkWeekClick:U,duration:Se,bootstrapFontAwesome:U,buttonIcons:U,customButtons:U,defaultAllDayEventDuration:Se,defaultTimedEventDuration:Se,nextDayThreshold:Se,scrollTime:Se,scrollTimeReset:Boolean,slotMinTime:Se,slotMaxTime:Se,dayPopoverFormat:tt,slotDuration:Se,snapDuration:Se,headerToolbar:U,footerToolbar:U,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:tt,dayHeaderClassNames:U,dayHeaderContent:U,dayHeaderDidMount:U,dayHeaderWillUnmount:U,dayCellClassNames:U,dayCellContent:U,dayCellDidMount:U,dayCellWillUnmount:U,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:U,weekNumbers:Boolean,weekNumberClassNames:U,weekNumberContent:U,weekNumberDidMount:U,weekNumberWillUnmount:U,editable:Boolean,viewClassNames:U,viewDidMount:U,viewWillUnmount:U,nowIndicator:Boolean,nowIndicatorSnap:U,nowIndicatorClassNames:U,nowIndicatorContent:U,nowIndicatorDidMount:U,nowIndicatorWillUnmount:U,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:U,locale:U,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:U,eventOrder:NU,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:U,contentHeight:U,direction:String,weekNumberFormat:tt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:U,initialDate:U,now:U,eventDataTransform:U,stickyHeaderDates:U,stickyFooterScrollbar:U,viewHeight:U,defaultAllDay:Boolean,eventSourceFailure:U,eventSourceSuccess:U,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:U,eventConstraint:U,eventAllow:U,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:U,eventContent:U,eventDidMount:U,eventWillUnmount:U,selectConstraint:U,selectOverlap:U,selectAllow:U,droppable:Boolean,unselectCancel:String,slotLabelFormat:U,slotLaneClassNames:U,slotLaneContent:U,slotLaneDidMount:U,slotLaneWillUnmount:U,slotLabelClassNames:U,slotLabelContent:U,slotLabelDidMount:U,slotLabelWillUnmount:U,dayMaxEvents:U,dayMaxEventRows:U,dayMinWidth:Number,slotLabelInterval:Se,allDayText:String,allDayClassNames:U,allDayContent:U,allDayDidMount:U,allDayWillUnmount:U,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:tt,rerenderDelay:Number,moreLinkText:U,moreLinkHint:U,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:U,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Se,hiddenDays:U,fixedWeekCount:Boolean,validRange:U,visibleRange:U,titleFormat:U,eventInteractive:Boolean,noEventsText:String,viewHint:U,navLinkHint:U,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:U,moreLinkClassNames:U,moreLinkContent:U,moreLinkDidMount:U,moreLinkWillUnmount:U,monthStartFormat:tt,handleCustomRendering:U,customRenderingMetaMap:U,customRenderingReplaces:Boolean},Ko={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},nowIndicatorSnap:"auto"},k0={datesSet:U,eventsSet:U,eventAdd:U,eventChange:U,eventRemove:U,windowResize:U,eventClick:U,eventMouseEnter:U,eventMouseLeave:U,select:U,unselect:U,loading:U,_unmount:U,_beforeprint:U,_afterprint:U,_noEventDrop:U,_noEventResize:U,_resize:U,_scrollRequest:U},_0={buttonText:U,buttonHints:U,views:U,plugins:U,initialEvents:U,events:U,eventSources:U},zr={headerToolbar:jr,footerToolbar:jr,buttonText:jr,buttonHints:jr,buttonIcons:jr,dateIncrement:jr,plugins:Rl,events:Rl,eventSources:Rl,resources:Rl};function jr(e,t){return typeof e=="object"&&typeof t=="object"&&e&&t?yn(e,t):e===t}function Rl(e,t){return Array.isArray(e)&&Array.isArray(t)?_r(e,t):e===t}const p6={type:String,component:U,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:U,usesMinMaxTime:Boolean,classNames:U,content:U,didMount:U,willUnmount:U};function pf(e){return Qp(e,zr)}function Yp(e,t){let n={},r={};for(let i in t)i in e&&(n[i]=t[i](e[i]));for(let i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function U(e){return e}const{hasOwnProperty:lu}=Object.prototype;function Qp(e,t){let n={};if(t){for(let r in t)if(t[r]===jr){let i=[];for(let o=e.length-1;o>=0;o-=1){let s=e[o][r];if(typeof s=="object"&&s)i.unshift(s);else if(s!==void 0){n[r]=s;break}}i.length&&(n[r]=Qp(i))}}for(let r=e.length-1;r>=0;r-=1){let i=e[r];for(let o in i)o in n||(n[o]=i[o])}return n}function uo(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Qs(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function __(e){let t={};for(let n of e)t[n]=!0;return t}function qp(e){let t=[];for(let n in e)t.push(e[n]);return t}function yn(e,t){if(e===t)return!0;for(let n in e)if(lu.call(e,n)&&!(n in t))return!1;for(let n in t)if(lu.call(t,n)&&e[n]!==t[n])return!1;return!0}const g6=/^on[A-Z]/;function m6(e,t){const n=y6(e,t);for(let r of n)if(!g6.test(r))return!1;return!0}function y6(e,t){let n=[];for(let r in e)lu.call(e,r)&&(r in t||n.push(r));for(let r in t)lu.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function gf(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&v6(e[r],t[r],n[r])))return!1;for(let r in e)if(!(r in t))return!1;return!0}function v6(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function w6(e,t=0,n,r=1){let i=[];n==null&&(n=Object.keys(e).length);for(let o=t;o<n;o+=r){let s=e[o];s!==void 0&&i.push(s)}return i}let S_={};function x6(e,t){S_[e]=t}function b6(e){return new S_[e]}class E6{getMarkerYear(t){return t.getUTCFullYear()}getMarkerMonth(t){return t.getUTCMonth()}getMarkerDay(t){return t.getUTCDate()}arrayToMarker(t){return Ct(t)}markerToArray(t){return cr(t)}}x6("gregory",E6);const k6=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function _6(e){let t=k6.exec(e);if(t){let n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?+`0.${t[12]}`*1e3:0));if(k_(n)){let r=null;return t[13]&&(r=(t[15]==="-"?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}class S6{constructor(t){let n=this.timeZone=t.timeZone,r=n!=="local"&&n!=="UTC";t.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new t.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=b6(t.calendarSystem),this.locale=t.locale,this.weekDow=t.locale.week.dow,this.weekDoy=t.locale.week.doy,t.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof t.firstDay=="number"&&(this.weekDow=t.firstDay),typeof t.weekNumberCalculation=="function"&&(this.weekNumberFunc=t.weekNumberCalculation),this.weekText=t.weekText!=null?t.weekText:t.locale.options.weekText,this.weekTextLong=(t.weekTextLong!=null?t.weekTextLong:t.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=t.cmdFormatter,this.defaultSeparator=t.defaultSeparator}createMarker(t){let n=this.createMarkerMeta(t);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Ct(v0(new Date))}createMarkerMeta(t){if(typeof t=="string")return this.parse(t);let n=null;return typeof t=="number"?n=this.timestampToMarker(t):t instanceof Date?(t=t.valueOf(),isNaN(t)||(n=this.timestampToMarker(t))):Array.isArray(t)&&(n=Ct(t)),n===null||!k_(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(t){let n=_6(t);if(n===null)return null;let{marker:r}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}getYear(t){return this.calendarSystem.getMarkerYear(t)}getMonth(t){return this.calendarSystem.getMarkerMonth(t)}getDay(t){return this.calendarSystem.getMarkerDay(t)}add(t,n){let r=this.calendarSystem.markerToArray(t);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(t,n){let r=this.calendarSystem.markerToArray(t);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(t,n){let r=this.calendarSystem.markerToArray(t);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(t,n){let r=this.calendarSystem.markerToArray(t);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(t,n){let{calendarSystem:r}=this;return fr(t)===fr(n)&&r.getMarkerDay(t)===r.getMarkerDay(n)&&r.getMarkerMonth(t)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(t):null}diffWholeMonths(t,n){let{calendarSystem:r}=this;return fr(t)===fr(n)&&r.getMarkerDay(t)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(t)+(r.getMarkerYear(n)-r.getMarkerYear(t))*12:null}greatestWholeUnit(t,n){let r=this.diffWholeYears(t,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(t,n),r!==null?{unit:"month",value:r}:(r=WU(t,n),r!==null?{unit:"week",value:r}:(r=iu(t,n),r!==null?{unit:"day",value:r}:(r=HU(t,n),ff(r)?{unit:"hour",value:r}:(r=$U(t,n),ff(r)?{unit:"minute",value:r}:(r=VU(t,n),ff(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-t.valueOf()}))))))}countDurationsBetween(t,n,r){let i;return r.years&&(i=this.diffWholeYears(t,n),i!==null)?i/zU(r):r.months&&(i=this.diffWholeMonths(t,n),i!==null)?i/jU(r):r.days&&(i=iu(t,n),i!==null)?i/Wi(r):(n.valueOf()-t.valueOf())/Rs(r)}startOf(t,n){return n==="year"?this.startOfYear(t):n==="month"?this.startOfMonth(t):n==="week"?this.startOfWeek(t):n==="day"?ze(t):n==="hour"?GU(t):n==="minute"?YU(t):n==="second"?QU(t):null}startOfYear(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t)])}startOfMonth(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t)])}startOfWeek(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t),t.getUTCDate()-(t.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(t){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(t)):qU(t,this.weekDow,this.weekDoy)}format(t,n,r={}){return n.format({marker:t,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(t)},this)}formatRange(t,n,r,i={}){return i.isEndExclusive&&(n=Sr(n,-1)),r.formatRange({marker:t,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(t)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(t,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(t)),ZU(t,r,n.omitTime)}timestampToMarker(t){return this.timeZone==="local"?Ct(v0(new Date(t))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(t):Ct(this.namedTimeZoneImpl.timestampToArray(t))}offsetForMarker(t){return this.timeZone==="local"?-w0(cr(t)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(cr(t)):null}toDate(t,n){return this.timeZone==="local"?w0(cr(t)):this.timeZone==="UTC"?new Date(t.valueOf()):this.namedTimeZoneImpl?new Date(t.valueOf()-this.namedTimeZoneImpl.offsetForArray(cr(t))*1e3*60):new Date(t.valueOf()-(n||0))}}class qs{constructor(t){this.iconOverrideOption&&this.setIconOverride(t[this.iconOverrideOption])}setIconOverride(t){let n,r;if(typeof t=="object"&&t){n=Object.assign({},this.iconClasses);for(r in t)n[r]=this.applyIconOverridePrefix(t[r]);this.iconClasses=n}else t===!1&&(this.iconClasses={})}applyIconOverridePrefix(t){let n=this.iconOverridePrefix;return n&&t.indexOf(n)!==0&&(t=n+t),t}getClass(t){return this.classes[t]||""}getIconClass(t,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[t]||this.iconClasses[t]:r=this.iconClasses[t],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(t){let n;return this.iconOverrideCustomButtonOption&&(n=t[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}qs.prototype.classes={};qs.prototype.iconClasses={};qs.prototype.baseIconClass="";qs.prototype.iconOverridePrefix="";function au(e){e();let t=de.debounceRendering,n=[];function r(i){n.push(i)}for(de.debounceRendering=r,Ts($(C6,{}),document.createElement("div"));n.length;)n.shift()();de.debounceRendering=t}class C6 extends Ft{render(){return $("div",{})}componentDidMount(){this.setState({})}}function C_(e){let t=eU(e),n=t.Provider;return t.Provider=function(){let r=!this.getChildContext,i=n.apply(this,arguments);if(r){let o=[];this.shouldComponentUpdate=s=>{this.props.value!==s.value&&o.forEach(l=>{l.context=s.value,l.forceUpdate()})},this.sub=s=>{o.push(s);let l=s.componentWillUnmount;s.componentWillUnmount=()=>{o.splice(o.indexOf(s),1),l&&l.call(s)}}}return i},t}class A6{constructor(t,n,r,i){this.execFunc=t,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=o=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},o),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(t){t&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const gi=C_({});function N6(e,t,n,r,i,o,s,l,a,u,c,f,h,d){return{dateEnv:i,nowManager:o,options:n,pluginHooks:l,emitter:c,dispatch:a,getCurrentData:u,calendarApi:f,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:n.direction==="rtl",addResizeHandler(p){c.on("_resize",p)},removeResizeHandler(p){c.off("_resize",p)},createScrollResponder(p){return new A6(p,c,Se(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:h,unregisterInteractiveComponent:d}}class mi extends Ft{shouldComponentUpdate(t,n){return!gf(this.props,t,this.propEquality)||!gf(this.state,n,this.stateEquality)}safeSetState(t){gf(this.state,Object.assign(Object.assign({},this.state),t),this.stateEquality)||this.setState(t)}}mi.addPropsEquality=D6;mi.addStateEquality=T6;mi.contextType=gi;mi.prototype.propEquality={};mi.prototype.stateEquality={};class He extends mi{}He.contextType=gi;function D6(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function T6(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function Dn(e,t){typeof e=="function"?e(t):e&&(e.current=t)}class Xp extends He{constructor(){super(...arguments),this.id=pi(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=t=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Qd(r,n))&&this.updateElRef(t)},this.updateElRef=t=>{this.props.elRef&&Dn(this.props.elRef,t)}}render(){const{props:t,context:n}=this,{options:r}=n,{customGenerator:i,defaultGenerator:o,renderProps:s}=t,l=A_(t,[],this.handleEl);let a=!1,u,c=[],f;if(i!=null){const h=typeof i=="function"?i(s,$):i;if(h===!0)a=!0;else{const d=h&&typeof h=="object";d&&"html"in h?l.dangerouslySetInnerHTML={__html:h.html}:d&&"domNodes"in h?c=Array.prototype.slice.call(h.domNodes):(d?K1(h):typeof h!="function")?u=h:f=h}}else a=!Qd(t.generatorName,r);return a&&o&&(u=o(s)),this.queuedDomNodes=c,this.currentGeneratorMeta=f,$(t.elTag,l,u)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(t){var n;const{props:r,context:i}=this,{handleCustomRendering:o,customRenderingMetaMap:s}=i.options;if(o){const l=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:s==null?void 0:s[r.generatorName];l&&o(Object.assign(Object.assign({id:this.id,isActive:t,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:l},r),{elClasses:(r.elClasses||[]).filter(R6)}))}}applyQueueudDomNodes(){const{queuedDomNodes:t,currentDomNodes:n}=this,r=this.base;if(!_r(t,n)){n.forEach(xU);for(let i of t)r.appendChild(i);this.currentDomNodes=t}}}Xp.addPropsEquality({elClasses:_r,elStyle:yn,elAttrs:m6,renderProps:yn});function Qd(e,t){var n;return!!(t.handleCustomRendering&&e&&(!((n=t.customRenderingMetaMap)===null||n===void 0)&&n[e]))}function A_(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function R6(e){return!!e}const N_=C_(0);class Zn extends Ft{constructor(){super(...arguments),this.InnerContent=I6.bind(void 0,this),this.handleEl=t=>{this.el=t,this.props.elRef&&(Dn(this.props.elRef,t),t&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:t}=this,n=M6(t.classNameGenerator,t.renderProps);if(t.children){const r=A_(t,n,this.handleEl),i=t.children(this.InnerContent,t.renderProps,r);return t.elTag?$(t.elTag,r,i):i}else return $(Xp,Object.assign(Object.assign({},t),{elRef:this.handleEl,elTag:t.elTag||"div",elClasses:(t.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var t,n;this.el?(n=(t=this.props).didMount)===null||n===void 0||n.call(t,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var t,n;(n=(t=this.props).willUnmount)===null||n===void 0||n.call(t,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}Zn.contextType=N_;function I6(e,t){const n=e.props;return $(Xp,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function M6(e,t){const n=typeof e=="function"?e(t):e||[];return typeof n=="string"?[n]:n}class S0 extends He{render(){let{props:t,context:n}=this,{options:r}=n,i={view:n.viewApi};return $(Zn,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:[...D_(t.viewSpec),...t.elClasses||[]],elStyle:t.elStyle,renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>t.children)}}function D_(e){return[`fc-${e.type}-view`,"fc-view"]}function O6(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function C0(e,t){let n=[],{start:r}=t,i,o;for(e.sort(P6),i=0;i<e.length;i+=1)o=e[i],o.start>r&&n.push({start:r,end:o.start}),o.end>r&&(r=o.end);return r<t.end&&n.push({start:r,end:t.end}),n}function P6(e,t){return e.start.valueOf()-t.start.valueOf()}function co(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n===null?n=t.start:n=new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r===null?r=t.end:r=new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function L6(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function br(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function z6(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function T_(e){let t=Math.floor(yo(e.start,e.end))||1,n=ze(e.start),r=rt(n,t);return{start:n,end:r}}function R_(e,t=Se(0)){let n=null,r=null;if(e.end){r=ze(e.end);let i=e.end.valueOf()-r.valueOf();i&&i>=Rs(t)&&(r=rt(r,1))}return e.start&&(n=ze(e.start),r&&r<=n&&(r=rt(n,1))),{start:n,end:r}}function Il(e,t,n,r){return r==="year"?Se(n.diffWholeYears(e,t),"year"):r==="month"?Se(n.diffWholeMonths(e,t),"month"):UU(e,t)}class I_{constructor(t){this.props=t,this.initHiddenDays()}buildPrev(t,n,r){let{dateEnv:i}=this.props,o=i.subtract(i.startOf(n,t.currentRangeUnit),t.dateIncrement);return this.build(o,-1,r)}buildNext(t,n,r){let{dateEnv:i}=this.props,o=i.add(i.startOf(n,t.currentRangeUnit),t.dateIncrement);return this.build(o,1,r)}build(t,n,r=!0){let{props:i}=this,o,s,l,a,u,c;return o=this.buildValidRange(),o=this.trimHiddenDays(o),r&&(t=z6(t,o)),s=this.buildCurrentRangeInfo(t,n),l=/^(year|month|week|day)$/.test(s.unit),a=this.buildRenderRange(this.trimHiddenDays(s.range),s.unit,l),a=this.trimHiddenDays(a),u=a,i.showNonCurrentDates||(u=co(u,s.range)),u=this.adjustActiveRange(u),u=co(u,o),c=L6(s.range,o),br(a,t)||(t=a.start),{currentDate:t,validRange:o,currentRange:s.range,currentRangeUnit:s.unit,isRangeAllDay:l,activeRange:u,renderRange:a,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:c,dateIncrement:this.buildDateIncrement(s.duration)}}buildValidRange(){let t=this.props.validRangeInput,n=typeof t=="function"?t.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):t;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(t,n){let{props:r}=this,i=null,o=null,s=null,l;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(t,n,i,o)):(l=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(t,n,l)):(s=this.buildCustomVisibleRange(t))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(i=this.getFallbackDuration(),o=Yd(i).unit,s=this.buildRangeFromDuration(t,n,i,o)),{duration:i,unit:o,range:s}}getFallbackDuration(){return Se({day:1})}adjustActiveRange(t){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:o}=this.props,{start:s,end:l}=t;return r&&(Wi(i)<0&&(s=ze(s),s=n.add(s,i)),Wi(o)>1&&(l=ze(l),l=rt(l,-1),l=n.add(l,o))),{start:s,end:l}}buildRangeFromDuration(t,n,r,i){let{dateEnv:o,dateAlignment:s}=this.props,l,a,u;if(!s){let{dateIncrement:f}=this.props;f&&Rs(f)<Rs(r)?s=Yd(f).unit:s=i}Wi(r)<=1&&this.isHiddenDay(l)&&(l=this.skipHiddenDays(l,n),l=ze(l));function c(){l=o.startOf(t,s),a=o.add(l,r),u={start:l,end:a}}return c(),this.trimHiddenDays(u)||(t=this.skipHiddenDays(t,n),c()),u}buildRangeFromDayCount(t,n,r){let{dateEnv:i,dateAlignment:o}=this.props,s=0,l=t,a;o&&(l=i.startOf(l,o)),l=ze(l),l=this.skipHiddenDays(l,n),a=l;do a=rt(a,1),this.isHiddenDay(a)||(s+=1);while(s<r);return{start:l,end:a}}buildCustomVisibleRange(t){let{props:n}=this,r=n.visibleRangeInput,i=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(t)):r,o=this.refineRange(i);return o&&(o.start==null||o.end==null)?null:o}buildRenderRange(t,n,r){return t}buildDateIncrement(t){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?Se(1,r):t||Se({days:1}))}refineRange(t){if(t){let n=O6(t,this.props.dateEnv);return n&&(n=R_(n)),n}return null}initHiddenDays(){let t=this.props.hiddenDays||[],n=[],r=0,i;for(this.props.weekends===!1&&t.push(0,6),i=0;i<7;i+=1)(n[i]=t.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(t){let{start:n,end:r}=t;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(t){return t instanceof Date&&(t=t.getUTCDay()),this.isHiddenDayHash[t]}skipHiddenDays(t,n=1,r=!1){for(;this.isHiddenDayHash[(t.getUTCDay()+(r?n:0)+7)%7];)t=rt(t,n);return t}}function Zp(e,t,n,r){return{instanceId:pi(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function j6(e,t,n,r){for(let i=0;i<r.length;i+=1){let o=r[i].parse(e,n);if(o){let{allDay:s}=e;return s==null&&(s=t,s==null&&(s=o.allDayGuess,s==null&&(s=!1))),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}function Xs(e,t,n){let{dateEnv:r,pluginHooks:i,options:o}=n,{defs:s,instances:l}=e;l=uo(l,a=>!s[a.defId].recurringDef);for(let a in s){let u=s[a];if(u.recurringDef){let{duration:c}=u.recurringDef;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);let f=F6(u,c,t,r,i.recurringTypes);for(let h of f){let d=Zp(a,{start:h,end:r.add(h,c)});l[d.instanceId]=d}}}return{defs:s,instances:l}}function F6(e,t,n,r,i){let s=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(s=s.map(ze)),s}const aa={id:String,groupId:String,title:String,url:String,interactive:Boolean},M_={start:U,end:U,date:U,allDay:Boolean},B6=Object.assign(Object.assign(Object.assign({},aa),M_),{extendedProps:U});function O_(e,t,n,r,i=Kp(n),o,s){let{refined:l,extra:a}=P_(e,n,i),u=$6(t,n),c=j6(l,u,n.dateEnv,n.pluginHooks.recurringTypes);if(c){let h=qd(l,a,t?t.sourceId:"",c.allDay,!!c.duration,n,o);return h.recurringDef={typeId:c.typeId,typeData:c.typeData,duration:c.duration},{def:h,instance:null}}let f=H6(l,u,n,r);if(f){let h=qd(l,a,t?t.sourceId:"",f.allDay,f.hasEnd,n,o),d=Zp(h.defId,f.range,f.forcedStartTzo,f.forcedEndTzo);return s&&h.publicId&&s[h.publicId]&&(d.instanceId=s[h.publicId]),{def:h,instance:d}}return null}function P_(e,t,n=Kp(t)){return Yp(e,n)}function Kp(e){return Object.assign(Object.assign(Object.assign({},uu),B6),e.pluginHooks.eventRefiners)}function qd(e,t,n,r,i,o,s){let l={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(s&&e.id?s[e.id]:"")||pi(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:cu(e,o),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let a of o.pluginHooks.eventDefMemberAdders)Object.assign(l,a(e));return Object.freeze(l.ui.classNames),Object.freeze(l.extendedProps),l}function H6(e,t,n,r){let{allDay:i}=e,o,s=null,l=!1,a,u=null,c=e.start!=null?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(c),o)s=o.marker;else if(!r)return null;return e.end!=null&&(a=n.dateEnv.createMarkerMeta(e.end)),i==null&&(t!=null?i=t:i=(!o||o.isTimeUnspecified)&&(!a||a.isTimeUnspecified)),i&&s&&(s=ze(s)),a&&(u=a.marker,i&&(u=ze(u)),s&&u<=s&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(s,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:l,range:{start:s,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:a?a.forcedTzo:null}}function $6(e,t){let n=null;return e&&(n=e.defaultAllDay),n==null&&(n=t.options.defaultAllDay),n}function Is(e,t,n,r,i,o){let s=ui(),l=Kp(n);for(let a of e){let u=O_(a,t,n,r,l,i,o);u&&Xd(u,s)}return s}function Xd(e,t=ui()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function V6(e,t){let n=e.instances[t];if(n){let r=e.defs[n.defId],i=eg(e,o=>U6(r,o));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return ui()}function U6(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function ui(){return{defs:{},instances:{}}}function Jp(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function eg(e,t){let n=uo(e.defs,t),r=uo(e.instances,i=>n[i.defId]);return{defs:n,instances:r}}function W6(e,t){let{defs:n,instances:r}=e,i={},o={};for(let s in n)t.defs[s]||(i[s]=n[s]);for(let s in r)!t.instances[s]&&i[r[s].defId]&&(o[s]=r[s]);return{defs:i,instances:o}}function G6(e,t){return Array.isArray(e)?Is(e,null,t,!0):typeof e=="object"&&e?Is([e],null,t,!0):e!=null?String(e):null}function A0(e){return Array.isArray(e)?e:typeof e=="string"?e.split(/\s+/):[]}const uu={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:U,overlap:U,allow:U,className:A0,classNames:A0,color:String,backgroundColor:String,borderColor:String,textColor:String},Y6={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function cu(e,t){let n=G6(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable!=null?e.startEditable:e.editable,durationEditable:e.durationEditable!=null?e.durationEditable:e.editable,constraints:n!=null?[n]:[],overlap:e.overlap!=null?e.overlap:null,allows:e.allow!=null?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Q6(e){return e.reduce(q6,Y6)}function q6(e,t){return{display:t.display!=null?t.display:e.display,startEditable:t.startEditable!=null?t.startEditable:e.startEditable,durationEditable:t.durationEditable!=null?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap=="boolean"?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const X6={id:String,defaultAllDay:Boolean,url:String,format:String,events:U,eventDataTransform:U,success:U,failure:U};function L_(e,t,n=z_(t)){let r;if(typeof e=="string"?r={url:e}:typeof e=="function"||Array.isArray(e)?r={events:e}:typeof e=="object"&&e&&(r=e),r){let{refined:i,extra:o}=Yp(r,n),s=Z6(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:pi(),sourceDefId:s.sourceDefId,meta:s.meta,ui:cu(i,t),extendedProps:o}}return null}function z_(e){return Object.assign(Object.assign(Object.assign({},uu),X6),e.pluginHooks.eventSourceRefiners)}function Z6(e,t){let n=t.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}function K6(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return J6(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return eW(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return tW(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Jp(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Xs(e,r.activeRange,i):e;case"REMOVE_EVENTS":return W6(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return F_(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return eg(e,o=>!o.sourceId);case"REMOVE_ALL_EVENTS":return ui();default:return e}}function J6(e,t,n,r,i,o){if(t&&n===t.latestFetchId){let s=Is(j_(i,t,o),t,o);return r&&(s=Xs(s,r,o)),Jp(F_(e,t.sourceId),s)}return e}function eW(e,t,n,r,i){const{defIdMap:o,instanceIdMap:s}=nW(e);let l=Is(j_(n,t,i),t,i,!1,o,s);return Xs(l,r,i)}function j_(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=N0(e,i)),r&&(e=N0(e,r)),e}function N0(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let i=t(r);i?n.push(i):i==null&&n.push(r)}}return n}function tW(e,t,n,r){return n&&(t=Xs(t,n,r)),Jp(e,t)}function D0(e,t,n){let{defs:r}=e,i=Qs(e.instances,o=>r[o.defId].allDay?o:Object.assign(Object.assign({},o),{range:{start:n.createMarker(t.toDate(o.range.start,o.forcedStartTzo)),end:n.createMarker(t.toDate(o.range.end,o.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:o.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:o.forcedEndTzo}));return{defs:r,instances:i}}function F_(e,t){return eg(e,n=>n.sourceId!==t)}function nW(e){const{defs:t,instances:n}=e,r={},i={};for(let o in t){const s=t[o],{publicId:l}=s;l&&(r[l]=o)}for(let o in n){const s=n[o],l=t[s.defId],{publicId:a}=l;a&&(i[a]=o)}return{defIdMap:r,instanceIdMap:i}}class rW{constructor(){this.handlers={},this.thisContext=null}setThisContext(t){this.thisContext=t}setOptions(t){this.options=t}on(t,n){iW(this.handlers,t,n)}off(t,n){oW(this.handlers,t,n)}trigger(t,...n){let r=this.handlers[t]||[],i=this.options&&this.options[t],o=[].concat(i||[],r);for(let s of o)s.apply(this.thisContext,n)}hasHandlers(t){return!!(this.handlers[t]&&this.handlers[t].length||this.options&&this.options[t])}}function iW(e,t,n){(e[t]||(e[t]=[])).push(n)}function oW(e,t,n){n?e[t]&&(e[t]=e[t].filter(r=>r!==n)):delete e[t]}const sW={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function lW(e,t){return Is(aW(e),null,t)}function aW(e){let t;return e===!0?t=[{}]:Array.isArray(e)?t=e.filter(n=>n.daysOfWeek):typeof e=="object"&&e?t=[e]:t=[],t=t.map(n=>Object.assign(Object.assign({},sW),n)),t}function uW(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},fW(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}function cW(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function fW(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,SW(e,t.dateEnv)),n}function T0(e,t,n){let{dateEnv:r,options:i}=n,o=t;return e?(o=ze(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function dW(e,t,n,r){let i=H_(e.defs,t),o=ui();for(let s in e.defs){let l=e.defs[s];o.defs[s]=hW(l,i[s],n,r)}for(let s in e.instances){let l=e.instances[s],a=o.defs[l.defId];o.instances[s]=pW(l,a,i[l.defId],n,r)}return o}function hW(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let o=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(o.extendedProps=Object.assign(Object.assign({},o.extendedProps),n.extendedProps));for(let s of r.pluginHooks.eventDefMutationAppliers)s(o,n,r);return!o.hasEnd&&r.options.forceEventDuration&&(o.hasEnd=!0),o}function pW(e,t,n,r,i){let{dateEnv:o}=i,s=r.standardProps&&r.standardProps.allDay===!0,l=r.standardProps&&r.standardProps.hasEnd===!1,a=Object.assign({},e);return s&&(a.range=T_(a.range)),r.datesDelta&&n.startEditable&&(a.range={start:o.add(a.range.start,r.datesDelta),end:o.add(a.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(a.range={start:o.add(a.range.start,r.startDelta),end:a.range.end}),r.endDelta&&n.durationEditable&&(a.range={start:a.range.start,end:o.add(a.range.end,r.endDelta)}),l&&(a.range={start:a.range.start,end:T0(t.allDay,a.range.start,i)}),t.allDay&&(a.range={start:ze(a.range.start),end:ze(a.range.end)}),a.range.end<a.range.start&&(a.range.end=T0(t.allDay,a.range.start,i)),a}class Ei{constructor(t,n){this.context=t,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Qt{constructor(t,n,r){this._context=t,this._def=n,this._instance=r||null}setProp(t,n){if(t in M_)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(t==="id")n=aa[t](n),this.mutate({standardProps:{publicId:n}});else if(t in aa)n=aa[t](n),this.mutate({standardProps:{[t]:n}});else if(t in uu){let r=uu[t](n);t==="color"?r={backgroundColor:n,borderColor:n}:t==="editable"?r={startEditable:n,durationEditable:n}:r={[t]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${t}'. Use setExtendedProp instead.`)}setExtendedProp(t,n){this.mutate({extendedProps:{[t]:n}})}setStart(t,n={}){let{dateEnv:r}=this._context,i=r.createMarker(t);if(i&&this._instance){let o=this._instance.range,s=Il(o.start,i,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:s}):this.mutate({startDelta:s})}}setEnd(t,n={}){let{dateEnv:r}=this._context,i;if(!(t!=null&&(i=r.createMarker(t),!i))&&this._instance)if(i){let o=Il(this._instance.range.end,i,r,n.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(t,n,r={}){let{dateEnv:i}=this._context,o={allDay:r.allDay},s=i.createMarker(t),l;if(s&&!(n!=null&&(l=i.createMarker(n),!l))&&this._instance){let a=this._instance.range;r.allDay===!0&&(a=T_(a));let u=Il(a.start,s,i,r.granularity);if(l){let c=Il(a.end,l,i,r.granularity);PU(u,c)?this.mutate({datesDelta:u,standardProps:o}):this.mutate({startDelta:u,endDelta:c,standardProps:o})}else o.hasEnd=!1,this.mutate({datesDelta:u,standardProps:o})}}moveStart(t){let n=Se(t);n&&this.mutate({startDelta:n})}moveEnd(t){let n=Se(t);n&&this.mutate({endDelta:n})}moveDates(t){let n=Se(t);n&&this.mutate({datesDelta:n})}setAllDay(t,n={}){let r={allDay:t},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==t&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(t){let{dateEnv:n}=this._context,r=this._instance,i=tt(t);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:o}=i.getCurrentData(),s=V6(o,n.instanceId);s=dW(s,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);let a=new Qt(i,r,n);this._def=s.defs[r.defId],this._instance=s.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:s}),i.emitter.trigger("eventChange",{oldEvent:a,event:this,relatedEvents:tg(s,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:o})}})}}remove(){let t=this._context,n=B_(this);t.dispatch({type:"REMOVE_EVENTS",eventStore:n}),t.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:t}=this._def;return t?new Ei(this._context,this._context.getCurrentData().eventSources[t]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let t=this._instance;return t?this._context.dateEnv.formatIso(t.range.start,{omitTime:this._def.allDay,forcedTzo:t.forcedStartTzo}):""}get endStr(){let t=this._instance;return t&&this._def.hasEnd?this._context.dateEnv.formatIso(t.range.end,{omitTime:this._def.allDay,forcedTzo:t.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(t={}){let n=this._def,{ui:r}=n,{startStr:i,endStr:o}=this,s={allDay:n.allDay};return n.title&&(s.title=n.title),i&&(s.start=i),o&&(s.end=o),n.publicId&&(s.id=n.publicId),n.groupId&&(s.groupId=n.groupId),n.url&&(s.url=n.url),r.display&&r.display!=="auto"&&(s.display=r.display),t.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?s.color=r.backgroundColor:(r.backgroundColor&&(s.backgroundColor=r.backgroundColor),r.borderColor&&(s.borderColor=r.borderColor)),r.textColor&&(s.textColor=r.textColor),r.classNames.length&&(s.classNames=r.classNames),Object.keys(n.extendedProps).length&&(t.collapseExtendedProps?Object.assign(s,n.extendedProps):s.extendedProps=n.extendedProps),s}toJSON(){return this.toPlainObject()}}function B_(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function tg(e,t,n){let{defs:r,instances:i}=e,o=[],s=n?n.instanceId:"";for(let l in i){let a=i[l],u=r[a.defId];a.instanceId!==s&&o.push(new Qt(t,u,a))}return o}function R0(e,t,n,r){let i={},o={},s={},l=[],a=[],u=H_(e.defs,t);for(let c in e.defs){let f=e.defs[c];u[f.defId].display==="inverse-background"&&(f.groupId?(i[f.groupId]=[],s[f.groupId]||(s[f.groupId]=f)):o[c]=[])}for(let c in e.instances){let f=e.instances[c],h=e.defs[f.defId],d=u[h.defId],p=f.range,v=!h.allDay&&r?R_(p,r):p,w=co(v,n);w&&(d.display==="inverse-background"?h.groupId?i[h.groupId].push(w):o[f.defId].push(w):d.display!=="none"&&(d.display==="background"?l:a).push({def:h,ui:d,instance:f,range:w,isStart:v.start&&v.start.valueOf()===w.start.valueOf(),isEnd:v.end&&v.end.valueOf()===w.end.valueOf()}))}for(let c in i){let f=i[c],h=C0(f,n);for(let d of h){let p=s[c],v=u[p.defId];l.push({def:p,ui:v,instance:null,range:d,isStart:!1,isEnd:!1})}}for(let c in o){let f=o[c],h=C0(f,n);for(let d of h)l.push({def:e.defs[c],ui:u[c],instance:null,range:d,isStart:!1,isEnd:!1})}return{bg:l,fg:a}}function I0(e,t){e.fcSeg=t}function Zd(e){return e.fcSeg||e.parentNode.fcSeg||null}function H_(e,t){return Qs(e,n=>$_(n,t))}function $_(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Q6(n)}function gW(e,t){let n=e.map(mW);return n.sort((r,i)=>DU(r,i,t)),n.map(r=>r._seg)}function mW(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,o=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:o,duration:o-i,allDay:Number(n.allDay),_seg:e})}function yW(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:o}=e.eventRange,s=o.startEditable;for(let l of r)s=l(s,i,o,t);return s}function vW(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function wW(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function V_(e,t,n,r,i,o,s){let{dateEnv:l,options:a}=n,{displayEventTime:u,displayEventEnd:c}=a,f=e.eventRange.def,h=e.eventRange.instance;u==null&&(u=r!==!1),c==null&&(c=i!==!1);let d=h.range.start,p=h.range.end,v=e.start||e.eventRange.range.start,w=e.end||e.eventRange.range.end,g=ze(d).valueOf()===ze(v).valueOf(),y=ze(Sr(p,-1)).valueOf()===ze(Sr(w,-1)).valueOf();return u&&!f.allDay&&(g||y)?(v=g?d:v,w=y?p:w,c&&f.hasEnd?l.formatRange(v,w,t,{forcedStartTzo:h.forcedStartTzo,forcedEndTzo:h.forcedEndTzo}):l.format(v,t,{forcedTzo:h.forcedStartTzo})):""}function Jo(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=t.start,isFuture:r.start>=t.end,isToday:t&&br(t,r.start)}}function xW(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function bW(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function U_(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:o,options:s}=t,{eventInteractive:l}=s;return l==null&&(l=n.interactive,l==null&&(l=!!o.hasHandlers("eventClick"))),l?E_(a=>{o.trigger("eventClick",{el:a.target,event:new Qt(t,n,r),jsEvent:a,view:t.viewApi})}):{}}const EW={start:U,end:U,allDay:Boolean};function kW(e,t,n){let r=_W(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function _W(e,t){let{refined:n,extra:r}=Yp(e,EW),i=n.start?t.createMarkerMeta(n.start):null,o=n.end?t.createMarkerMeta(n.end):null,{allDay:s}=n;return s==null&&(s=i&&i.isTimeUnspecified&&(!o||o.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:o?o.marker:null},allDay:s},r)}function SW(e,t){return Object.assign(Object.assign({},G_(e.range,t,e.allDay)),{allDay:e.allDay})}function W_(e,t,n){return Object.assign(Object.assign({},G_(e,t,n)),{timeZone:t.timeZone})}function G_(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function CW(e,t,n){let r=P_({editable:!1},n),i=qd(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:$_(i,t),instance:Zp(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function AW(e,t,n){let r=!1,i=function(l){r||(r=!0,t(l))},o=function(l){r||(r=!0,n(l))},s=e(i,o);s&&typeof s.then=="function"&&s.then(i,o)}class M0 extends Error{constructor(t,n){super(t),this.response=n}}function NW(e,t,n){e=e.toUpperCase();const r={method:e};return e==="GET"?t+=(t.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then(i=>{if(i.ok)return i.json().then(o=>[o,i],()=>{throw new M0("Failure parsing JSON",i)});throw new M0("Request failed",i)})}let mf;function Y_(){return mf==null&&(mf=DW()),mf}function DW(){if(typeof document>"u")return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let n=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),n}class TW extends He{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{au(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{au(()=>{this.setState({forPrint:!1})})}}render(){let{props:t}=this,{options:n}=t,{forPrint:r}=this.state,i=r||n.height==="auto"||n.contentHeight==="auto",o=!i&&n.height!=null?n.height:"",s=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,t.theme.getClass("root")];return Y_()||s.push("fc-liquid-hack"),t.children(s,o,i,r)}componentDidMount(){let{emitter:t}=this.props;t.on("_beforeprint",this.handleBeforePrint),t.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:t}=this.props;t.off("_beforeprint",this.handleBeforePrint),t.off("_afterprint",this.handleAfterPrint)}}class Q_{constructor(t){this.component=t.component,this.isHitComboAllowed=t.isHitComboAllowed||null}destroy(){}}function RW(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter!=null?t.useEventCenter:!0,isHitComboAllowed:t.isHitComboAllowed||null}}const O0={};class Zu extends Ft{constructor(t,n){super(t,n),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:t,state:n}=this;return t.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(t){t.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:t,context:n}=this,r=n.nowManager.getDateMarker(),{nowIndicatorSnap:i}=n.options;i==="auto"&&(i=/year|month|week|day/.test(t.unit)||(t.unitValue||1)===1);let o,s;return i?(o=n.dateEnv.startOf(r,t.unit),s=n.dateEnv.add(o,Se(1,t.unit)).valueOf()-r.valueOf()):(o=r,s=1e3*60),s=Math.min(1e3*60*60*24,s),{state:{nowDate:o,todayRange:IW(o)},waitMs:s}}setTimeout(t=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.setState(n.state,()=>{this.setTimeout(n.waitMs)})},t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}Zu.contextType=gi;function IW(e){let t=ze(e),n=rt(t,1);return{start:t,end:n}}class MW{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(t){this.currentDataManager.dispatch(t)}get view(){return this.getCurrentData().viewApi}batchRendering(t){t()}updateSize(){this.trigger("_resize",!0)}setOption(t,n){this.dispatch({type:"SET_OPTION",optionName:t,rawOptionValue:n})}getOption(t){return this.currentDataManager.currentCalendarOptionsInput[t]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(t,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[t]?r.emitter.on(t,n):console.warn(`Unknown listener name '${t}'`)}off(t,n){this.currentDataManager.emitter.off(t,n)}trigger(t,...n){this.currentDataManager.emitter.trigger(t,...n)}changeView(t,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t})})}zoomTo(t,n){let r=this.getCurrentData(),i;n=n||"day",i=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:t}):this.dispatch({type:"CHANGE_DATE",dateMarker:t})}getUnitViewSpec(t){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),o,s;for(let l in n)i.push(l);for(o=0;o<i.length;o+=1)if(s=n[i[o]],s&&s.singleUnit===t)return s;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.addYears(t.currentDate,-1)})}nextYear(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.addYears(t.currentDate,1)})}today(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.nowManager.getDateMarker()})}gotoDate(t){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(t)})}incrementDate(t){let n=this.getCurrentData(),r=Se(t);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let t=this.getCurrentData();return t.dateEnv.toDate(t.currentDate)}formatDate(t,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(t),tt(n))}formatRange(t,n,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(t),i.createMarker(n),tt(r),r)}formatIso(t,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(t),{omitTime:n})}select(t,n){let r;n==null?t.start!=null?r=t:r={start:t,end:null}:r={start:t,end:n};let i=this.getCurrentData(),o=kW(r,i.dateEnv,Se({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),uW(o,null,i))}unselect(t){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),cW(t,n))}addEvent(t,n){if(t instanceof Qt){let s=t._def,l=t._instance;return this.getCurrentData().eventStore.defs[s.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Xd({def:s,instance:l})}),this.triggerEventAdd(t)),t}let r=this.getCurrentData(),i;if(n instanceof Ei)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=qp(r.eventSources));else if(n!=null){let s=this.getEventSourceById(n);if(!s)return console.warn(`Could not find an event source with ID "${n}"`),null;i=s.internalEventSource}let o=O_(t,i,r,!1);if(o){let s=new Qt(r,o.def,o.def.recurringDef?null:o.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Xd(o)}),this.triggerEventAdd(s),s}return null}triggerEventAdd(t){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:t,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:B_(t)})}})}getEventById(t){let n=this.getCurrentData(),{defs:r,instances:i}=n.eventStore;t=String(t);for(let o in r){let s=r[o];if(s.publicId===t){if(s.recurringDef)return new Qt(n,s,null);for(let l in i){let a=i[l];if(a.defId===s.defId)return new Qt(n,s,a)}}}return null}getEvents(){let t=this.getCurrentData();return tg(t.eventStore,t)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let t=this.getCurrentData(),n=t.eventSources,r=[];for(let i in n)r.push(new Ei(t,n[i]));return r}getEventSourceById(t){let n=this.getCurrentData(),r=n.eventSources;t=String(t);for(let i in r)if(r[i].publicId===t)return new Ei(n,r[i]);return null}addEventSource(t){let n=this.getCurrentData();if(t instanceof Ei)return n.eventSources[t.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[t.internalEventSource]}),t;let r=L_(t,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new Ei(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(t){let n=Se(t);n&&this.trigger("_scrollRequest",{time:n})}}function OW(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function q_(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!br(r.activeRange,e))),isOther:!!(r&&!br(r.currentRange,e)),isToday:!!(t&&br(t,e)),isPast:!!(t&&e<t.start),isFuture:!!(t&&e>=t.end)}}function ng(e,t){let n=["fc-day",`fc-day-${FU[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const PW=tt({year:"numeric",month:"long",day:"numeric"}),LW=tt({week:"long"});function Kd(e,t,n="day",r=!0){const{dateEnv:i,options:o,calendarApi:s}=e;let l=i.format(t,n==="week"?LW:PW);if(o.navLinks){let a=i.toDate(t);const u=c=>{let f=n==="day"?o.navLinkDayClick:n==="week"?o.navLinkWeekClick:null;typeof f=="function"?f.call(s,i.toDate(t),c):(typeof f=="string"&&(n=f),s.zoomTo(t,n))};return Object.assign({title:Zo(o.navLinkHint,[l,a],l),"data-navlink":""},r?b_(u):{onClick:u})}return{"aria-label":l}}let yf;function zW(){return yf||(yf=jW()),yf}function jW(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=FW(e);return document.body.removeChild(e),t}function FW(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function BW(e){let t=HW(e),n=e.getBoundingClientRect();for(let r of t){let i=OW(n,r.getBoundingClientRect());if(i)n=i;else return null}return n}function HW(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}class fu{constructor(t,n,r,i){this.els=n;let o=this.originClientRect=t.getBoundingClientRect();r&&this.buildElHorizontals(o.left),i&&this.buildElVerticals(o.top)}buildElHorizontals(t){let n=[],r=[];for(let i of this.els){let o=i.getBoundingClientRect();n.push(o.left-t),r.push(o.right-t)}this.lefts=n,this.rights=r}buildElVerticals(t){let n=[],r=[];for(let i of this.els){let o=i.getBoundingClientRect();n.push(o.top-t),r.push(o.bottom-t)}this.tops=n,this.bottoms=r}leftToIndex(t){let{lefts:n,rights:r}=this,i=n.length,o;for(o=0;o<i;o+=1)if(t>=n[o]&&t<r[o])return o}topToIndex(t){let{tops:n,bottoms:r}=this,i=n.length,o;for(o=0;o<i;o+=1)if(t>=n[o]&&t<r[o])return o}getWidth(t){return this.rights[t]-this.lefts[t]}getHeight(t){return this.bottoms[t]-this.tops[t]}similarTo(t){return Ml(this.tops||[],t.tops||[])&&Ml(this.bottoms||[],t.bottoms||[])&&Ml(this.lefts||[],t.lefts||[])&&Ml(this.rights||[],t.rights||[])}}function Ml(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class yi extends He{constructor(){super(...arguments),this.uid=pi()}prepareHits(){}queryHit(t,n,r,i){return null}isValidSegDownEl(t){return!this.props.eventDrag&&!this.props.eventResize&&!zn(t,".fc-event-mirror")}isValidDateDownEl(t){return!zn(t,".fc-event:not(.fc-bg-event)")&&!zn(t,".fc-more-link")&&!zn(t,"a[data-navlink]")&&!zn(t,".fc-popover")}}class $W{constructor(t=n=>n.thickness||1){this.getEntryThickness=t,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(t){let n=[];for(let r of t)this.insertEntry(r,n);return n}insertEntry(t,n){let r=this.findInsertion(t);this.isInsertionValid(r,t)?this.insertEntryAt(t,r):this.handleInvalidInsertion(r,t,n)}isInsertionValid(t,n){return(this.maxCoord===-1||t.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||t.stackCnt<this.maxStackCnt)}handleInvalidInsertion(t,n,r){if(this.allowReslicing&&t.touchingEntry){const i=Object.assign(Object.assign({},n),{span:X_(n.span,t.touchingEntry.span)});r.push(i),this.splitEntry(n,t.touchingEntry,r)}else r.push(n)}splitEntry(t,n,r){let i=t.span,o=n.span;i.start<o.start&&this.insertEntry({index:t.index,thickness:t.thickness,span:{start:i.start,end:o.start}},r),i.end>o.end&&this.insertEntry({index:t.index,thickness:t.thickness,span:{start:o.end,end:i.end}},r)}insertEntryAt(t,n){let{entriesByLevel:r,levelCoords:i}=this;n.lateral===-1?(vf(i,n.level,n.levelCoord),vf(r,n.level,[t])):vf(r[n.level],n.lateral,t),this.stackCnts[es(t)]=n.stackCnt}findInsertion(t){let{levelCoords:n,entriesByLevel:r,strictOrder:i,stackCnts:o}=this,s=n.length,l=0,a=-1,u=-1,c=null,f=0;for(let p=0;p<s;p+=1){const v=n[p];if(!i&&v>=l+this.getEntryThickness(t))break;let w=r[p],g,y=L0(w,t.span.start,P0),m=y[0]+y[1];for(;(g=w[m])&&g.span.start<t.span.end;){let x=v+this.getEntryThickness(g);x>l&&(l=x,c=g,a=p,u=m),x===l&&(f=Math.max(f,o[es(g)]+1)),m+=1}}let h=0;if(c)for(h=a+1;h<s&&n[h]<l;)h+=1;let d=-1;return h<s&&n[h]===l&&(d=L0(r[h],t.span.end,P0)[0]),{touchingLevel:a,touchingLateral:u,touchingEntry:c,stackCnt:f,levelCoord:l,level:h,lateral:d}}toRects(){let{entriesByLevel:t,levelCoords:n}=this,r=t.length,i=[];for(let o=0;o<r;o+=1){let s=t[o],l=n[o];for(let a of s)i.push(Object.assign(Object.assign({},a),{thickness:this.getEntryThickness(a),levelCoord:l}))}return i}}function P0(e){return e.span.end}function es(e){return e.index+":"+e.span.start}function X_(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function vf(e,t,n){e.splice(t,0,n)}function L0(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let o=Math.floor(r+(i-r)/2),s=n(e[o]);if(t<s)i=o;else if(t>s)r=o+1;else return[o,1]}return[r,0]}function VW(e,t){return!e||t>10?tt({weekday:"short"}):t>1?tt({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):tt({weekday:"long"})}const Z_="fc-col-header-cell";function K_(e){return e.text}class UW extends He{render(){let{dateEnv:t,options:n,theme:r,viewApi:i}=this.context,{props:o}=this,{date:s,dateProfile:l}=o,a=q_(s,o.todayRange,null,l),u=[Z_].concat(ng(a,r)),c=t.format(s,o.dayHeaderFormat),f=!a.isDisabled&&o.colCnt>1?Kd(this.context,s):{},h=t.toDate(s);t.namedTimeZoneImpl&&(h=Sr(h,36e5));let d=Object.assign(Object.assign(Object.assign({date:h,view:i},o.extraRenderProps),{text:c}),a);return $(Zn,{elTag:"th",elClasses:u,elAttrs:Object.assign({role:"columnheader",colSpan:o.colSpan,"data-date":a.isDisabled?void 0:Wp(s)},o.extraDataAttrs),renderProps:d,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:K_,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},p=>$("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&$(p,{elTag:"a",elAttrs:f,elClasses:["fc-col-header-cell-cushion",o.isSticky&&"fc-sticky"]})))}}const WW=tt({weekday:"long"});class GW extends He{render(){let{props:t}=this,{dateEnv:n,theme:r,viewApi:i,options:o}=this.context,s=rt(new Date(2592e5),t.dow),l={dow:t.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=n.format(s,t.dayHeaderFormat),u=Object.assign(Object.assign(Object.assign(Object.assign({date:s},l),{view:i}),t.extraRenderProps),{text:a});return $(Zn,{elTag:"th",elClasses:[Z_,...ng(l,r),...t.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:t.colSpan},t.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:o.dayHeaderContent,defaultGenerator:K_,classNameGenerator:o.dayHeaderClassNames,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},c=>$("div",{className:"fc-scrollgrid-sync-inner"},$(c,{elTag:"a",elClasses:["fc-col-header-cell-cushion",t.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(s,WW)}})))}}class YW extends He{constructor(){super(...arguments),this.createDayHeaderFormatter=ke(QW)}render(){let{context:t}=this,{dates:n,dateProfile:r,datesRepDistinctDays:i,renderIntro:o}=this.props,s=this.createDayHeaderFormatter(t.options.dayHeaderFormat,i,n.length);return $(Zu,{unit:"day"},(l,a)=>$("tr",{role:"row"},o&&o("day"),n.map(u=>i?$(UW,{key:u.toISOString(),date:u,dateProfile:r,todayRange:a,colCnt:n.length,dayHeaderFormat:s}):$(GW,{key:u.getUTCDay(),dow:u.getUTCDay(),dayHeaderFormat:s}))))}}function QW(e,t,n){return e||VW(t,n)}class qW{constructor(t,n){let r=t.start,{end:i}=t,o=[],s=[],l=-1;for(;r<i;)n.isHiddenDay(r)?o.push(l+.5):(l+=1,o.push(l),s.push(r)),r=rt(r,1);this.dates=s,this.indices=o,this.cnt=s.length}sliceRange(t){let n=this.getDateDayIndex(t.start),r=this.getDateDayIndex(rt(t.end,-1)),i=Math.max(0,n),o=Math.min(this.cnt-1,r);return i=Math.ceil(i),o=Math.floor(o),i<=o?{firstIndex:i,lastIndex:o,isStart:n===i,isEnd:r===o}:null}getDateDayIndex(t){let{indices:n}=this,r=Math.floor(yo(this.dates[0],t));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class XW{constructor(t,n){let{dates:r}=t,i,o,s;if(n){for(o=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==o;i+=1);s=Math.ceil(r.length/i)}else s=1,i=r.length;this.rowCnt=s,this.colCnt=i,this.daySeries=t,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let t=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(n,i));t.push(r)}return t}buildCell(t,n){let r=this.daySeries.dates[t*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let t=[];for(let n=0;n<this.colCnt;n+=1)t.push(this.cells[0][n].date);return t}sliceRange(t){let{colCnt:n}=this,r=this.daySeries.sliceRange(t),i=[];if(r){let{firstIndex:o,lastIndex:s}=r,l=o;for(;l<=s;){let a=Math.floor(l/n),u=Math.min((a+1)*n,s+1);i.push({row:a,firstCol:l%n,lastCol:(u-1)%n,isStart:r.isStart&&l===o,isEnd:r.isEnd&&u-1===s}),l=u}}return i}}class ZW{constructor(){this.sliceBusinessHours=ke(this._sliceBusinessHours),this.sliceDateSelection=ke(this._sliceDateSpan),this.sliceEventStore=ke(this._sliceEventStore),this.sliceEventDrag=ke(this._sliceInteraction),this.sliceEventResize=ke(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(t,n,r,i,...o){let{eventUiBases:s}=t,l=this.sliceEventStore(t.eventStore,s,n,r,...o);return{dateSelectionSegs:this.sliceDateSelection(t.dateSelection,n,r,s,i,...o),businessHourSegs:this.sliceBusinessHours(t.businessHours,n,r,i,...o),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag(t.eventDrag,s,n,r,...o),eventResize:this.sliceEventResize(t.eventResize,s,n,r,...o),eventSelection:t.eventSelection}}sliceNowDate(t,n,r,i,...o){return this._sliceDateSpan({range:{start:t,end:Sr(t,1)},allDay:!1},n,r,{},i,...o)}_sliceBusinessHours(t,n,r,i,...o){return t?this._sliceEventStore(Xs(t,Ol(n,!!r),i),{},n,r,...o).bg:[]}_sliceEventStore(t,n,r,i,...o){if(t){let s=R0(t,n,Ol(r,!!i),i);return{bg:this.sliceEventRanges(s.bg,o),fg:this.sliceEventRanges(s.fg,o)}}return{bg:[],fg:[]}}_sliceInteraction(t,n,r,i,...o){if(!t)return null;let s=R0(t.mutatedEvents,n,Ol(r,!!i),i);return{segs:this.sliceEventRanges(s.fg,o),affectedInstances:t.affectedEvents.instances,isEvent:t.isEvent}}_sliceDateSpan(t,n,r,i,o,...s){if(!t)return[];let l=Ol(n,!!r),a=co(t.range,l);if(a){t=Object.assign(Object.assign({},t),{range:a});let u=CW(t,i,o),c=this.sliceRange(t.range,...s);for(let f of c)f.eventRange=u;return c}return[]}sliceEventRanges(t,n){let r=[];for(let i of t)r.push(...this.sliceEventRange(i,n));return r}sliceEventRange(t,n){let r=t.range;this.forceDayIfListItem&&t.ui.display==="list-item"&&(r={start:r.start,end:rt(r.start,1)});let i=this.sliceRange(r,...n);for(let o of i)o.eventRange=t,o.isStart=t.isStart&&o.isStart,o.isEnd=t.isEnd&&o.isEnd;return i}}function Ol(e,t){let n=e.activeRange;return t?n:{start:Sr(n.start,e.slotMinTime.milliseconds),end:Sr(n.end,e.slotMaxTime.milliseconds-864e5)}}const Pl=/^(visible|hidden)$/;class KW extends He{constructor(){super(...arguments),this.handleEl=t=>{this.el=t,Dn(this.props.elRef,t)}}render(){let{props:t}=this,{liquid:n,liquidIsAbsolute:r}=t,i=n&&r,o=["fc-scroller"];return n&&(r?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),$("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:t.overflowX,overflowY:t.overflowY,left:i&&-(t.overcomeLeft||0)||"",right:i&&-(t.overcomeRight||0)||"",bottom:i&&-(t.overcomeBottom||0)||"",marginLeft:!i&&-(t.overcomeLeft||0)||"",marginRight:!i&&-(t.overcomeRight||0)||"",marginBottom:!i&&-(t.overcomeBottom||0)||"",maxHeight:t.maxHeight||""}},t.children)}needsXScrolling(){if(Pl.test(this.props.overflowX))return!1;let{el:t}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=t;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Pl.test(this.props.overflowY))return!1;let{el:t}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=t;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Pl.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Pl.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Wr{constructor(t){this.masterCallback=t,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:i,currentMap:o}=this,s=!1,l=!1;n!==null?(s=r in o,o[r]=n,i[r]=(i[r]||0)+1,l=!0):(i[r]-=1,i[r]||(delete o[r],delete this.callbackMap[r],s=!0)),this.masterCallback&&(s&&this.masterCallback(null,String(r)),l&&this.masterCallback(n,String(r)))}}createRef(t){let n=this.callbackMap[t];return n||(n=this.callbackMap[t]=r=>{this.handleValue(r,String(t))}),n}collect(t,n,r){return w6(this.currentMap,t,n,r)}getAll(){return qp(this.currentMap)}}function JW(e){let t=EU(e,".fc-scrollgrid-shrink"),n=0;for(let r of t)n=Math.max(n,IU(r));return Math.ceil(n)}function J_(e,t){return e.liquid&&t.liquid}function e8(e,t){return t.maxHeight!=null||J_(e,t)}function t8(e,t,n,r){let{expandRows:i}=n;return typeof t.content=="function"?t.content(n):$("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,$(r?"thead":"tbody",{role:"presentation"},typeof t.rowContent=="function"?t.rowContent(n):t.rowContent))}function n8(e,t){return _r(e,t,yn)}function r8(e,t){let n=[];for(let r of e){let i=r.span||1;for(let o=0;o<i;o+=1)n.push($("col",{style:{width:r.width==="shrink"?i8(t):r.width||"",minWidth:r.minWidth||""}}))}return $("colgroup",{},...n)}function i8(e){return e??4}function o8(e){for(let t of e)if(t.width==="shrink")return!0;return!1}function s8(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function l8(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function a8(e){return $("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function z0(e){let{stickyHeaderDates:t}=e;return(t==null||t==="auto")&&(t=e.height==="auto"||e.viewHeight==="auto"),t}function u8(e){let{stickyFooterScrollbar:t}=e;return(t==null||t==="auto")&&(t=e.height==="auto"||e.viewHeight==="auto"),t}class eS extends He{constructor(){super(...arguments),this.processCols=ke(t=>t,n8),this.renderMicroColGroup=ke(r8),this.scrollerRefs=new Wr,this.scrollerElRefs=new Wr(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:t,state:n,context:r}=this,i=t.sections||[],o=this.processCols(t.cols),s=this.renderMicroColGroup(o,n.shrinkWidth),l=s8(t.liquid,r);t.collapsibleWidth&&l.push("fc-scrollgrid-collapsible");let a=i.length,u=0,c,f=[],h=[],d=[];for(;u<a&&(c=i[u]).type==="header";)f.push(this.renderSection(c,s,!0)),u+=1;for(;u<a&&(c=i[u]).type==="body";)h.push(this.renderSection(c,s,!1)),u+=1;for(;u<a&&(c=i[u]).type==="footer";)d.push(this.renderSection(c,s,!0)),u+=1;let p=!Y_();const v={role:"rowgroup"};return $("table",{role:"grid",className:l.join(" "),style:{height:t.height}},!!(!p&&f.length)&&$("thead",v,...f),!!(!p&&h.length)&&$("tbody",v,...h),!!(!p&&d.length)&&$("tfoot",v,...d),p&&$("tbody",v,...f,...h,...d))}renderSection(t,n,r){return"outerContent"in t?$(Ve,{key:t.key},t.outerContent):$("tr",{key:t.key,role:"presentation",className:l8(t,this.props.liquid).join(" ")},this.renderChunkTd(t,n,t.chunk,r))}renderChunkTd(t,n,r,i){if("outerContent"in r)return r.outerContent;let{props:o}=this,{forceYScrollbars:s,scrollerClientWidths:l,scrollerClientHeights:a}=this.state,u=e8(o,t),c=J_(o,t),f=o.liquid?s?"scroll":u?"auto":"hidden":"visible",h=t.key,d=t8(t,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!o.collapsibleWidth&&l[h]!==void 0?l[h]:null,clientHeight:a[h]!==void 0?a[h]:null,expandRows:t.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return $(i?"th":"td",{ref:r.elRef,role:"presentation"},$("div",{className:`fc-scroller-harness${c?" fc-scroller-harness-liquid":""}`},$(KW,{ref:this.scrollerRefs.createRef(h),elRef:this.scrollerElRefs.createRef(h),overflowY:f,overflowX:o.liquid?"hidden":"visible",maxHeight:t.maxHeight,liquid:c,liquidIsAbsolute:!0},d)))}_handleScrollerEl(t,n){let r=c8(this.props.sections,n);r&&Dn(r.chunk.scrollerElRef,t)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return o8(this.props.cols)?JW(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let t=zW(),{scrollerRefs:n,scrollerElRefs:r}=this,i=!1,o={},s={};for(let l in n.currentMap){let a=n.currentMap[l];if(a&&a.needsYScrolling()){i=!0;break}}for(let l of this.props.sections){let a=l.key,u=r.currentMap[a];if(u){let c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?t.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}}}eS.addStateEquality({scrollerClientWidths:yn,scrollerClientHeights:yn});function c8(e,t){for(let n of e)if(n.key===t)return n;return null}class rg extends He{constructor(){super(...arguments),this.buildPublicEvent=ke((t,n,r)=>new Qt(t,n,r)),this.handleEl=t=>{this.el=t,Dn(this.props.elRef,t),t&&I0(t,this.props.seg)}}render(){const{props:t,context:n}=this,{options:r}=n,{seg:i}=t,{eventRange:o}=i,{ui:s}=o,l={event:this.buildPublicEvent(n,o.def,o.instance),view:n.viewApi,timeText:t.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!t.disableDragging&&yW(i,n),isStartResizable:!t.disableResizing&&vW(i,n),isEndResizable:!t.disableResizing&&wW(i),isMirror:!!(t.isDragging||t.isResizing||t.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!t.isPast,isFuture:!!t.isFuture,isToday:!!t.isToday,isSelected:!!t.isSelected,isDragging:!!t.isDragging,isResizing:!!t.isResizing};return $(Zn,{elRef:this.handleEl,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:[...xW(l),...i.eventRange.ui.classNames,...t.elClasses||[]],elStyle:t.elStyle,renderProps:l,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:t.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},t.children)}componentDidUpdate(t){this.el&&this.props.seg!==t.seg&&I0(this.el,this.props.seg)}}class tS extends He{render(){let{props:t,context:n}=this,{options:r}=n,{seg:i}=t,{ui:o}=i.eventRange,s=r.eventTimeFormat||t.defaultTimeFormat,l=V_(i,s,n,t.defaultDisplayEventTime,t.defaultDisplayEventEnd);return $(rg,Object.assign({},t,{elTag:"a",elStyle:{borderColor:o.borderColor,backgroundColor:o.backgroundColor},elAttrs:U_(i,n),defaultGenerator:f8,timeText:l}),(a,u)=>$(Ve,null,$(a,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:u.textColor}}),!!u.isStartResizable&&$("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!u.isEndResizable&&$("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}tS.addPropsEquality({seg:yn});function f8(e){return $("div",{className:"fc-event-main-frame"},e.timeText&&$("div",{className:"fc-event-time"},e.timeText),$("div",{className:"fc-event-title-container"},$("div",{className:"fc-event-title fc-sticky"},e.event.title||$(Ve,null," "))))}const d8=tt({day:"numeric"});class nS extends He{constructor(){super(...arguments),this.refineRenderProps=la(h8)}render(){let{props:t,context:n}=this,{options:r}=n,i=this.refineRenderProps({date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,isMonthStart:t.isMonthStart||!1,showDayNumber:t.showDayNumber,extraRenderProps:t.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return $(Zn,{elRef:t.elRef,elTag:t.elTag,elAttrs:Object.assign(Object.assign({},t.elAttrs),i.isDisabled?{}:{"data-date":Wp(t.date)}),elClasses:[...ng(i,n.theme),...t.elClasses||[]],elStyle:t.elStyle,renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:t.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},t.children)}}function rS(e){return!!(e.dayCellContent||Qd("dayCellContent",e))}function h8(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,o=q_(t,e.todayRange,null,r),s=e.showDayNumber?n.format(t,i?e.monthStartFormat:d8):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},o),{isMonthStart:i,dayNumberText:s}),e.extraRenderProps)}class p8 extends He{render(){let{props:t}=this,{seg:n}=t;return $(rg,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:g8,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:t.isPast,isFuture:t.isFuture,isToday:t.isToday,disableDragging:!0,disableResizing:!0})}}function g8(e){let{title:t}=e.event;return t&&$("div",{className:"fc-event-title"},e.event.title)}function m8(e){return $("div",{className:`fc-${e}`})}const y8=e=>$(gi.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),l=n.format(i,o),a={num:s,text:l,date:i};return $(Zn,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:a,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:v8,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function v8(e){return e.text}const wf=10;class w8 extends He{constructor(){super(...arguments),this.state={titleId:Xu()},this.handleRootEl=t=>{this.rootEl=t,this.props.elRef&&Dn(this.props.elRef,t)},this.handleDocumentMouseDown=t=>{const n=SU(t);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=t=>{t.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:t}=this.props;t&&t()}}render(){let{theme:t,options:n}=this.context,{props:r,state:i}=this,o=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return lU($("div",Object.assign({},r.extraAttrs,{id:r.id,className:o.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),$("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},$("span",{className:"fc-popover-title",id:i.titleId},r.title),$("span",{className:"fc-popover-close "+t.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),$("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:t}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:i}=this,o=BW(n);if(o){let s=i.getBoundingClientRect(),l=r?zn(n,".fc-scrollgrid").getBoundingClientRect().top:o.top,a=t?o.right-s.width:o.left;l=Math.max(l,wf),a=Math.min(a,document.documentElement.clientWidth-wf-s.width),a=Math.max(a,wf);let u=i.offsetParent.getBoundingClientRect();_U(i,{top:l-u.top,left:a-u.left})}}}class x8 extends yi{constructor(){super(...arguments),this.handleRootEl=t=>{this.rootEl=t,t?this.context.registerInteractiveComponent(this,{el:t,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:t,dateEnv:n}=this.context,{props:r}=this,{startDate:i,todayRange:o,dateProfile:s}=r,l=n.format(i,t.dayPopoverFormat);return $(nS,{elRef:this.handleRootEl,date:i,dateProfile:s,todayRange:o},(a,u,c)=>$(w8,{elRef:c.ref,id:r.id,title:l,extraClassNames:["fc-more-popover"].concat(c.className||[]),extraAttrs:c,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},rS(t)&&$(a,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(t,n,r,i){let{rootEl:o,props:s}=this;return t>=0&&t<r&&n>=0&&n<i?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}}class b8 extends He{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Xu()},this.handleLinkEl=t=>{this.linkEl=t,this.props.elRef&&Dn(this.props.elRef,t)},this.handleClick=t=>{let{props:n,context:r}=this,{moreLinkClick:i}=r.options,o=j0(n).start;function s(l){let{def:a,instance:u,range:c}=l.eventRange;return{event:new Qt(r,a,u),start:r.dateEnv.toDate(c.start),end:r.dateEnv.toDate(c.end),isStart:l.isStart,isEnd:l.isEnd}}typeof i=="function"&&(i=i({date:o,allDay:!!n.allDayDate,allSegs:n.allSegs.map(s),hiddenSegs:n.hiddenSegs.map(s),jsEvent:t,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(o,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:t,state:n}=this;return $(gi.Consumer,null,r=>{let{viewApi:i,options:o,calendarApi:s}=r,{moreLinkText:l}=o,{moreCnt:a}=t,u=j0(t),c=typeof l=="function"?l.call(s,a):`+${a} ${l}`,f=Zo(o.moreLinkHint,[a],c),h={num:a,shortText:`+${a}`,text:c,view:i};return $(Ve,null,!!t.moreCnt&&$(Zn,{elTag:t.elTag||"a",elRef:this.handleLinkEl,elClasses:[...t.elClasses||[],"fc-more-link"],elStyle:t.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},t.elAttrs),b_(this.handleClick)),{title:f,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:h,generatorName:"moreLinkContent",customGenerator:o.moreLinkContent,defaultGenerator:t.defaultGenerator||E8,classNameGenerator:o.moreLinkClassNames,didMount:o.moreLinkDidMount,willUnmount:o.moreLinkWillUnmount},t.children),n.isPopoverOpen&&$(x8,{id:n.popoverId,startDate:u.start,endDate:u.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:this.parentEl,alignmentEl:t.alignmentElRef?t.alignmentElRef.current:this.linkEl,alignGridTop:t.alignGridTop,forceTimed:t.forceTimed,onClose:this.handlePopoverClose},t.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=zn(this.linkEl,".fc-view-harness"))}}function E8(e){return e.text}function j0(e){if(e.allDayDate)return{start:e.allDayDate,end:rt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:k8(t),end:S8(t)}}function k8(e){return e.reduce(_8).eventRange.range.start}function _8(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function S8(e){return e.reduce(C8).eventRange.range.end}function C8(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class A8{constructor(){this.handlers=[]}set(t){this.currentValue=t;for(let n of this.handlers)n(t)}subscribe(t){this.handlers.push(t),this.currentValue!==void 0&&t(this.currentValue)}}class N8 extends A8{constructor(){super(...arguments),this.map=new Map}handle(t){const{map:n}=this;let r=!1;t.isActive?(n.set(t.id,t),r=!0):n.has(t.id)&&(n.delete(t.id),r=!0),r&&this.set(n)}}const D8=[],iS={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},oS=Object.assign(Object.assign({},iS),{buttonHints:{prev:"Previous $0",next:"Next $0",today(e,t){return t==="day"?"Today":`This ${e}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(e){return`Show ${e} more event${e===1?"":"s"}`}});function T8(e){let t=e.length>0?e[0].code:"en",n=D8.concat(e),r={en:oS};for(let i of n)r[i.code]=i;return{map:r,defaultCode:t}}function sS(e,t){return typeof e=="object"&&!Array.isArray(e)?lS(e.code,[e.code],e):R8(e,t)}function R8(e,t){let n=[].concat(e||[]),r=I8(n,t)||oS;return lS(e,n,r)}function I8(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let o=r.slice(0,i).join("-");if(t[o])return t[o]}}return null}function lS(e,t,n){let r=Qp([iS,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function vi(e){return{id:pi(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function M8(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(o){for(let s of o){const l=s.name,a=n[l];a===void 0?(n[l]=s.id,i(s.deps),r=P8(r,s)):a!==s.id&&console.warn(`Duplicate plugin '${l}'`)}}return e&&i(e),i(t),r}function O8(){let e=[],t=[],n;return(r,i)=>((!n||!_r(r,e)||!_r(i,t))&&(n=M8(r,i)),e=r,t=i,n)}function P8(e,t){return{premiumReleaseDate:L8(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function L8(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}class Tr extends qs{}Tr.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Tr.prototype.baseIconClass="fc-icon";Tr.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};Tr.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Tr.prototype.iconOverrideOption="buttonIcons";Tr.prototype.iconOverrideCustomButtonOption="icon";Tr.prototype.iconOverridePrefix="fc-icon-";function z8(e,t){let n={},r;for(r in e)Jd(r,n,e,t);for(r in t)Jd(r,n,e,t);return n}function Jd(e,t,n,r){if(t[e])return t[e];let i=j8(e,t,n,r);return i&&(t[e]=i),i}function j8(e,t,n,r){let i=n[e],o=r[e],s=c=>i&&i[c]!==null?i[c]:o&&o[c]!==null?o[c]:null,l=s("component"),a=s("superType"),u=null;if(a){if(a===e)throw new Error("Can't have a custom view type that references itself");u=Jd(a,t,n,r)}return!l&&u&&(l=u.component),l?{type:e,component:l,defaults:Object.assign(Object.assign({},u?u.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},u?u.overrides:{}),o?o.rawOptions:{})}:null}function F0(e){return Qs(e,F8)}function F8(e){let t=typeof e=="function"?{component:e}:e,{component:n}=t;return t.content?n=B0(t):n&&!(n.prototype instanceof He)&&(n=B0(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function B0(e){return t=>$(gi.Consumer,null,n=>$(Zn,{elTag:"div",elClasses:D_(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function B8(e,t,n,r){let i=F0(e),o=F0(t.views),s=z8(i,o);return Qs(s,l=>H8(l,o,t,n,r))}function H8(e,t,n,r,i){let o=e.overrides.duration||e.defaults.duration||r.duration||n.duration,s=null,l="",a="",u={};if(o&&(s=$8(o),s)){let h=Yd(s);l=h.unit,h.value===1&&(a=l,u=t[l]?t[l].rawOptions:{})}let c=h=>{let d=h.buttonText||{},p=e.defaults.buttonTextKey;return p!=null&&d[p]!=null?d[p]:d[e.type]!=null?d[e.type]:d[a]!=null?d[a]:null},f=h=>{let d=h.buttonHints||{},p=e.defaults.buttonTextKey;return p!=null&&d[p]!=null?d[p]:d[e.type]!=null?d[e.type]:d[a]!=null?d[a]:null};return{type:e.type,component:e.component,duration:s,durationUnit:l,singleUnit:a,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},u),e.overrides),buttonTextOverride:c(r)||c(n)||e.overrides.buttonText,buttonTextDefault:c(i)||e.defaults.buttonText||c(Ko)||e.type,buttonTitleOverride:f(r)||f(n)||e.overrides.buttonHint,buttonTitleDefault:f(i)||e.defaults.buttonHint||f(Ko)}}let H0={};function $8(e){let t=JSON.stringify(e),n=H0[t];return n===void 0&&(n=Se(e),H0[t]=n),n}function V8(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":e=t.viewType}return e}function U8(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}function W8(e,t,n){let r=e.initialDate;return r!=null?t.createMarker(r):n.getDateMarker()}function G8(e,t){switch(t.type){case"SET_OPTION":return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function Y8(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i;break}return e}function Q8(e,t,n){let r=t?t.activeRange:null;return uS({},t9(e,n),r,n)}function q8(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return uS(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return Z8(e,t.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?cS(e,i,r):e;case"FETCH_EVENT_SOURCES":return ig(e,t.sourceIds?__(t.sourceIds):fS(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return e9(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function X8(e,t,n){let r=t?t.activeRange:null;return ig(e,fS(e,n),r,!0,n)}function aS(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function uS(e,t,n,r){let i={};for(let o of t)i[o.sourceId]=o;return n&&(i=cS(i,n,r)),Object.assign(Object.assign({},e),i)}function Z8(e,t){return uo(e,n=>n.sourceId!==t)}function cS(e,t,n){return ig(e,uo(e,r=>K8(r,t,n)),t,!1,n)}function K8(e,t,n){return dS(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function ig(e,t,n,r,i){let o={};for(let s in e){let l=e[s];t[s]?o[s]=J8(l,n,r,i):o[s]=l}return o}function J8(e,t,n,r){let{options:i,calendarApi:o}=r,s=r.pluginHooks.eventSourceDefs[e.sourceDefId],l=pi();return s.fetch({eventSource:e,range:t,isRefetch:n,context:r},a=>{let{rawEvents:u}=a;i.eventSourceSuccess&&(u=i.eventSourceSuccess.call(o,u,a.response)||u),e.success&&(u=e.success.call(o,u,a.response)||u),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:l,fetchRange:t,rawEvents:u})},a=>{let u=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(o,a),u=!0),e.failure&&(e.failure(a),u=!0),u||console.warn(a.message,a),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:l,fetchRange:t,error:a})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:l})}function e9(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function fS(e,t){return uo(e,n=>dS(n,t))}function t9(e,t){let n=z_(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let o of r){let s=L_(o,t,n);s&&i.push(s)}return i}function dS(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function n9(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function r9(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function i9(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function o9(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function s9(e,t,n,r,i){let o=e.headerToolbar?$0(e.headerToolbar,e,t,n,r,i):null,s=e.footerToolbar?$0(e.footerToolbar,e,t,n,r,i):null;return{header:o,footer:s}}function $0(e,t,n,r,i,o){let s={},l=[],a=!1;for(let u in e){let c=e[u],f=l9(c,t,n,r,i,o);s[u]=f.widgets,l.push(...f.viewsWithButtons),a=a||f.hasTitle}return{sectionWidgets:s,viewsWithButtons:l,hasTitle:a}}function l9(e,t,n,r,i,o){let s=t.direction==="rtl",l=t.customButtons||{},a=n.buttonText||{},u=t.buttonText||{},c=n.buttonHints||{},f=t.buttonHints||{},h=e?e.split(" "):[],d=[],p=!1;return{widgets:h.map(w=>w.split(",").map(g=>{if(g==="title")return p=!0,{buttonName:g};let y,m,x,_,b,k;if(y=l[g])x=A=>{y.click&&y.click.call(A.target,A,A.target)},(_=r.getCustomButtonIconClass(y))||(_=r.getIconClass(g,s))||(b=y.text),k=y.hint||y.text;else if(m=i[g]){d.push(g),x=()=>{o.changeView(g)},(b=m.buttonTextOverride)||(_=r.getIconClass(g,s))||(b=m.buttonTextDefault);let A=m.buttonTextOverride||m.buttonTextDefault;k=Zo(m.buttonTitleOverride||m.buttonTitleDefault||t.viewHint,[A,g],A)}else if(o[g])if(x=()=>{o[g]()},(b=a[g])||(_=r.getIconClass(g,s))||(b=u[g]),g==="prevYear"||g==="nextYear"){let A=g==="prevYear"?"prev":"next";k=Zo(c[A]||f[A],[u.year||"year","year"],u[g])}else k=A=>Zo(c[g]||f[g],[u[A]||A,A],u[g]);return{buttonName:g,buttonClick:x,buttonIcon:_,buttonText:b,buttonHint:k}})),viewsWithButtons:d,hasTitle:p}}class a9{constructor(t,n,r){this.type=t,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(t){return this.getCurrentData().options[t]}}let u9={ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}};const c9=vi({name:"array-event-source",eventSourceDefs:[u9]});let f9={parseMeta(e){return typeof e.events=="function"?e.events:null},fetch(e,t,n){const{dateEnv:r}=e.context,i=e.eventSource.meta;AW(i.bind(null,W_(e.range,r)),o=>t({rawEvents:o}),n)}};const d9=vi({name:"func-event-source",eventSourceDefs:[f9]}),h9={method:String,extraParams:U,startParam:String,endParam:String,timeZoneParam:String};let p9={parseMeta(e){return e.url&&(e.format==="json"||!e.format)?{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){const{meta:r}=e.eventSource,i=m9(r,e.range,e.context);NW(r.method,r.url,i).then(([o,s])=>{t({rawEvents:o,response:s})},n)}};const g9=vi({name:"json-event-source",eventSourceRefiners:h9,eventSourceDefs:[p9]});function m9(e,t,n){let{dateEnv:r,options:i}=n,o,s,l,a,u={};return o=e.startParam,o==null&&(o=i.startParam),s=e.endParam,s==null&&(s=i.endParam),l=e.timeZoneParam,l==null&&(l=i.timeZoneParam),typeof e.extraParams=="function"?a=e.extraParams():a=e.extraParams||{},Object.assign(u,a),u[o]=r.formatIso(t.start),u[s]=r.formatIso(t.end),r.timeZone!=="local"&&(u[l]=r.timeZone),u}const y9={daysOfWeek:U,startTime:Se,endTime:Se,duration:Se,startRecur:U,endRecur:U};let v9={parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=LU(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=co(t,{start:e.startRecur,end:e.endRecur});return r?x9(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}};const w9=vi({name:"simple-recurring-event",recurringTypes:[v9],eventRefiners:y9});function x9(e,t,n,r,i){let o=e?__(e):null,s=ze(i.start),l=i.end,a=[];for(t&&(t.milliseconds<0?l=rt(l,1):t.milliseconds>=1e3*60*60*24&&(s=rt(s,-1)));s<l;){let u;(!o||o[s.getUTCDay()])&&(t?u=r.add(s,t):u=s,a.push(r.createMarker(n.toDate(u)))),s=rt(s,1)}return a}const b9=vi({name:"change-handler",optionChangeHandlers:{events(e,t){V0([e],t)},eventSources:V0}});function V0(e,t){let n=qp(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let i of e){let o=!1;for(let s=0;s<n.length;s+=1)if(n[s]._raw===i){n.splice(s,1),o=!0;break}o||r.push(i)}for(let i of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)t.calendarApi.addEventSource(i)}function E9(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},W_(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function k9(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",tg(e,t))}const _9=[c9,d9,g9,w9,b9,vi({name:"misc",isLoadingFuncs:[e=>aS(e.eventSources)],propSetHandlers:{dateProfile:E9,eventStore:k9}})];class S9{constructor(t,n){this.runTaskOption=t,this.drainedOption=n,this.queue=[],this.delayedRunner=new Up(this.drain.bind(this))}request(t,n){this.queue.push(t),this.delayedRunner.request(n)}pause(t){this.delayedRunner.pause(t)}resume(t,n){this.delayedRunner.resume(t,n)}drain(){let{queue:t}=this;for(;t.length;){let n=[],r;for(;r=t.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(t){this.runTaskOption&&this.runTaskOption(t)}drained(t){this.drainedOption&&this.drainedOption(t)}}function C9(e,t,n){let r;return/^(year|month)$/.test(e.currentRangeUnit)?r=e.currentRange:r=e.activeRange,n.formatRange(r.start,r.end,tt(t.titleFormat||A9(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function A9(e){let{currentRangeUnit:t}=e;if(t==="year")return{year:"numeric"};if(t==="month")return{year:"numeric",month:"long"};let n=iu(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class U0{constructor(){this.resetListeners=new Set}handleInput(t,n){const r=this.dateEnv;if(t!==r&&(typeof n=="function"?this.nowFn=n:r||(this.nowAnchorDate=t.toDate(n?t.createMarker(n):t.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=t,r))for(const i of this.resetListeners.values())i()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(t){this.resetListeners.add(t)}removeResetListener(t){this.resetListeners.delete(t)}}class N9{constructor(t){this.computeCurrentViewData=ke(this._computeCurrentViewData),this.organizeRawLocales=ke(T8),this.buildLocale=ke(sS),this.buildPluginHooks=O8(),this.buildDateEnv=ke(D9),this.buildTheme=ke(T9),this.parseToolbars=ke(s9),this.buildViewSpecs=ke(B8),this.buildDateProfileGenerator=la(R9),this.buildViewApi=ke(I9),this.buildViewUiProps=la(P9),this.buildEventUiBySource=ke(M9,yn),this.buildEventUiBases=ke(O9),this.parseContextBusinessHours=la(L9),this.buildTitle=ke(C9),this.nowManager=new U0,this.emitter=new rW,this.actionRunner=new S9(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=h=>{this.actionRunner.request(h)},this.props=t,this.actionRunner.pause(),this.nowManager=new U0;let n={},r=this.computeOptionsData(t.optionOverrides,n,t.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,o=this.computeCurrentViewData(i,r,t.optionOverrides,n);t.calendarApi.currentDataManager=this,this.emitter.setThisContext(t.calendarApi),this.emitter.setOptions(o.options);let s={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},l=W8(r.calendarOptions,r.dateEnv,this.nowManager),a=o.dateProfileGenerator.build(l);br(a.activeRange,l)||(l=a.currentRange.start);for(let h of r.pluginHooks.contextInit)h(s);let u=Q8(r.calendarOptions,a,s),c={dynamicOptionOverrides:n,currentViewType:i,currentDate:l,dateProfile:a,businessHours:this.parseContextBusinessHours(s),eventSources:u,eventUiBases:{},eventStore:ui(),renderableEventStore:ui(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},f=Object.assign(Object.assign({},s),c);for(let h of r.pluginHooks.reducers)Object.assign(c,h(null,null,f));xf(c,s)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(t,n){let{props:r}=this;n===void 0?r.optionOverrides=t:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),t),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(t){let{props:n,state:r,emitter:i}=this,o=G8(r.dynamicOptionOverrides,t),s=this.computeOptionsData(n.optionOverrides,o,n.calendarApi),l=V8(r.currentViewType,t),a=this.computeCurrentViewData(l,s,n.optionOverrides,o);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(a.options);let u={nowManager:this.nowManager,dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:f}=r;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(f=a.dateProfileGenerator.build(c)),c=U8(c,t),f=Y8(f,t,c,a.dateProfileGenerator),(t.type==="PREV"||t.type==="NEXT"||!br(f.currentRange,c))&&(c=f.currentRange.start);let h=q8(r.eventSources,t,f,u),d=K6(r.eventStore,t,h,f,u),v=aS(h)&&!a.options.progressiveEventRendering&&r.renderableEventStore||d,{eventUiSingleBase:w,selectionConfig:g}=this.buildViewUiProps(u),y=this.buildEventUiBySource(h),m=this.buildEventUiBases(v.defs,w,y),x={dynamicOptionOverrides:o,currentViewType:l,currentDate:c,dateProfile:f,eventSources:h,eventStore:d,renderableEventStore:v,selectionConfig:g,eventUiBases:m,businessHours:this.parseContextBusinessHours(u),dateSelection:n9(r.dateSelection,t),eventSelection:r9(r.eventSelection,t),eventDrag:i9(r.eventDrag,t),eventResize:o9(r.eventResize,t)},_=Object.assign(Object.assign({},u),x);for(let A of s.pluginHooks.reducers)Object.assign(x,A(r,t,_));let b=xf(r,u),k=xf(x,u);!b&&k?i.trigger("loading",!0):b&&!k&&i.trigger("loading",!1),this.state=x,n.onAction&&n.onAction(t)}updateData(){let{props:t,state:n}=this,r=this.data,i=this.computeOptionsData(t.optionOverrides,n.dynamicOptionOverrides,t.calendarApi),o=this.computeCurrentViewData(n.currentViewType,i,t.optionOverrides,n.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,o.options,i.dateEnv),calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),o),n),l=i.pluginHooks.optionChangeHandlers,a=r&&r.calendarOptions,u=i.calendarOptions;if(a&&a!==u){a.timeZone!==u.timeZone&&(n.eventSources=s.eventSources=X8(s.eventSources,n.dateProfile,s),n.eventStore=s.eventStore=D0(s.eventStore,r.dateEnv,s.dateEnv),n.renderableEventStore=s.renderableEventStore=D0(s.renderableEventStore,r.dateEnv,s.dateEnv));for(let c in l)(this.optionsForHandling.indexOf(c)!==-1||a[c]!==u[c])&&l[c](u[c],s)}this.optionsForHandling=[],t.onData&&t.onData(s)}computeOptionsData(t,n,r){if(!this.optionsForRefining.length&&t===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:o,localeDefaults:s,availableLocaleData:l,extra:a}=this.processRawCalendarOptions(t,n);W0(a);let u=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,l,i.defaultRangeSeparator),c=this.buildViewSpecs(o.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),f=this.buildTheme(i,o),h=this.parseToolbars(i,this.stableOptionOverrides,f,c,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:o,dateEnv:u,viewSpecs:c,theme:f,toolbarConfig:h,localeDefaults:s,availableRawLocales:l.map}}processRawCalendarOptions(t,n){let{locales:r,locale:i}=pf([Ko,t,n]),o=this.organizeRawLocales(r),s=o.map,l=this.buildLocale(i||o.defaultCode,s).options,a=this.buildPluginHooks(t.plugins||[],_9),u=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E0),k0),_0),a.listenerRefiners),a.optionRefiners),c={},f=pf([Ko,l,t,n]),h={},d=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,v=!1;for(let w in f)this.optionsForRefining.indexOf(w)===-1&&(f[w]===d[w]||zr[w]&&w in d&&zr[w](d[w],f[w]))?h[w]=p[w]:u[w]?(h[w]=u[w](f[w]),v=!0):c[w]=d[w];return v&&(this.currentCalendarOptionsInput=f,this.currentCalendarOptionsRefined=h,this.stableOptionOverrides=t,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:o,localeDefaults:l,extra:c}}_computeCurrentViewData(t,n,r,i){let o=n.viewSpecs[t];if(!o)throw new Error(`viewType "${t}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:l}=this.processRawViewOptions(o,n.pluginHooks,n.localeDefaults,r,i);W0(l),this.nowManager.handleInput(n.dateEnv,s.now);let a=this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),u=this.buildViewApi(t,this.getCurrentData,n.dateEnv);return{viewSpec:o,options:s,dateProfileGenerator:a,viewApi:u}}processRawViewOptions(t,n,r,i,o){let s=pf([Ko,t.optionDefaults,r,i,t.optionOverrides,o]),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E0),k0),_0),p6),n.listenerRefiners),n.optionRefiners),a={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,f=!1,h={};for(let d in s)s[d]===u[d]||zr[d]&&zr[d](s[d],u[d])?a[d]=c[d]:(s[d]===this.currentCalendarOptionsInput[d]||zr[d]&&zr[d](s[d],this.currentCalendarOptionsInput[d])?d in this.currentCalendarOptionsRefined&&(a[d]=this.currentCalendarOptionsRefined[d]):l[d]?a[d]=l[d](s[d]):h[d]=s[d],f=!0);return f&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}}}function D9(e,t,n,r,i,o,s,l){let a=sS(t||s.defaultCode,s.map);return new S6({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:a,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:l})}function T9(e,t){let n=t.themeClasses[e.themeSystem]||Tr;return new n(e)}function R9(e){let t=e.dateProfileGeneratorClass||I_;return new t(e)}function I9(e,t,n){return new a9(e,t,n)}function M9(e){return Qs(e,t=>t.ui)}function O9(e,t,n){let r={"":t};for(let i in e){let o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function P9(e){let{options:t}=e;return{eventUiSingleBase:cu({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap=="boolean"?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:cu({constraint:t.selectConstraint,overlap:typeof t.selectOverlap=="boolean"?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function xf(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function L9(e){return lW(e.options.businessHours,e)}function W0(e,t){for(let n in e)console.warn(`Unknown option '${n}'`)}class z9 extends He{render(){let t=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return $("div",{className:"fc-toolbar-chunk"},...t)}renderWidgetGroup(t){let{props:n}=this,{theme:r}=this.context,i=[],o=!0;for(let s of t){let{buttonName:l,buttonClick:a,buttonText:u,buttonIcon:c,buttonHint:f}=s;if(l==="title")o=!1,i.push($("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let h=l===n.activeButton,d=!n.isTodayEnabled&&l==="today"||!n.isPrevEnabled&&l==="prev"||!n.isNextEnabled&&l==="next",p=[`fc-${l}-button`,r.getClass("button")];h&&p.push(r.getClass("buttonActive")),i.push($("button",{type:"button",title:typeof f=="function"?f(n.navUnit):f,disabled:d,"aria-pressed":h,className:p.join(" "),onClick:a},u||(c?$("span",{className:c,role:"img"}):"")))}}if(i.length>1){let s=o&&r.getClass("buttonGroup")||"";return $("div",{className:s},...i)}return i[0]}}class G0 extends He{render(){let{model:t,extraClassName:n}=this.props,r=!1,i,o,s=t.sectionWidgets,l=s.center;return s.left?(r=!0,i=s.left):i=s.start,s.right?(r=!0,o=s.right):o=s.end,$("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",l||[]),this.renderSection("end",o||[]))}renderSection(t,n){let{props:r}=this;return $(z9,{key:t,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class j9 extends He{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=t=>{this.el=t,Dn(this.props.elRef,t),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:t,state:n}=this,{aspectRatio:r}=t,i=["fc-view-harness",r||t.liquid||t.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",s="";return r?n.availableWidth!==null?o=n.availableWidth/r:s=`${1/r*100}%`:o=t.height||"",$("div",{"aria-labelledby":t.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:o,paddingBottom:s}},t.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class F9 extends Q_{constructor(t){super(t),this.handleSegClick=(n,r)=>{let{component:i}=this,{context:o}=i,s=Zd(r);if(s&&i.isValidSegDownEl(n.target)){let l=zn(n.target,".fc-event-forced-url"),a=l?l.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:r,event:new Qt(i.context,s.eventRange.def,s.eventRange.instance),jsEvent:n,view:o.viewApi}),a&&!n.defaultPrevented&&(window.location.href=a)}},this.destroy=x_(t.el,"click",".fc-event",this.handleSegClick)}}class B9 extends Q_{constructor(t){super(t),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{Zd(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=AU(t.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(t,n,r){let{component:i}=this,{context:o}=i,s=Zd(r);(!n||i.isValidSegDownEl(n.target))&&o.emitter.trigger(t,{el:r,event:new Qt(o,s.eventRange.def,s.eventRange.instance),jsEvent:n,view:o.viewApi})}}class H9 extends mi{constructor(){super(...arguments),this.buildViewContext=ke(N6),this.buildViewPropTransformers=ke(V9),this.buildToolbarProps=ke($9),this.headerRef=Qn(),this.footerRef=Qn(),this.interactionsStore={},this.state={viewLabelId:Xu()},this.registerInteractiveComponent=(t,n)=>{let r=RW(t,n),s=[F9,B9].concat(this.props.pluginHooks.componentInteractions).map(l=>new l(r));this.interactionsStore[t.uid]=s,O0[t.uid]=r},this.unregisterInteractiveComponent=t=>{let n=this.interactionsStore[t.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[t.uid]}delete O0[t.uid]},this.resizeRunner=new Up(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=t=>{let{options:n}=this.props;n.handleWindowResize&&t.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:t}=this,{toolbarConfig:n,options:r}=t,i=!1,o="",s;t.isHeightAuto||t.forPrint?o="":r.height!=null?i=!0:r.contentHeight!=null?o=r.contentHeight:s=Math.max(r.aspectRatio,.5);let l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.nowManager,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),a=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return $(gi.Provider,{value:l},$(Zu,{unit:"day"},u=>{let c=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,u,t.viewTitle);return $(Ve,null,n.header&&$(G0,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:a},c)),$(j9,{liquid:i,height:o,aspectRatio:s,labeledById:a},this.renderView(t),this.buildAppendContent()),n.footer&&$(G0,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},c)))}))}componentDidMount(){let{props:t}=this;this.calendarInteractions=t.pluginHooks.calendarInteractions.map(r=>new r(t)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=t.pluginHooks;for(let r in n)n[r](t[r],t)}componentDidUpdate(t){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let i in r)n[i]!==t[i]&&r[i](n[i],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let t of this.calendarInteractions)t.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:t}=this,n=t.pluginHooks.viewContainerAppends.map(r=>r(t));return $(Ve,{},...n)}renderView(t){let{pluginHooks:n}=t,{viewSpec:r}=t,i={dateProfile:t.dateProfile,businessHours:t.businessHours,eventStore:t.renderableEventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isHeightAuto:t.isHeightAuto,forPrint:t.forPrint},o=this.buildViewPropTransformers(n.viewPropsTransformers);for(let l of o)Object.assign(i,l.transform(i,t));let s=r.component;return $(s,Object.assign({},i))}}function $9(e,t,n,r,i,o){let s=n.build(i,void 0,!1),l=n.buildPrev(t,r,!1),a=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:s.isValid&&!br(t.currentRange,i),isPrevEnabled:l.isValid,isNextEnabled:a.isValid}}function V9(e){return e.map(t=>new t)}let U9=class extends MW{constructor(t,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;au(()=>{Ts($(TW,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,o,s,l)=>(this.setClassNames(i),this.setHeight(o),$(N_.Provider,{value:this.customContentRenderId},$(H9,Object.assign({isHeightAuto:s,forPrint:l},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Ts(null,this.el),this.setClassNames([]),this.setHeight(""))},gU(t),this.el=t,this.renderRunner=new Up(this.handleRenderRequest),new N9({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let t=this.isRendering;t?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),t&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){au(()=>{super.updateSize()})}batchRendering(t){this.renderRunner.pause("batchRendering"),t(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(t,n){this.currentDataManager.resetOptions(t,n)}setClassNames(t){if(!_r(t,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of t)n.add(r);this.currentClassNames=t}}setHeight(t){w_(this.el,"height",t)}};const W9=parseInt(String(fa.version).split(".")[0]),G9=W9<18;class hS extends L.Component{constructor(){super(...arguments),this.elRef=L.createRef(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){const t=[];for(const n of this.state.customRenderingMap.values())t.push(fa.createElement(Y9,{key:n.id,customRendering:n}));return fa.createElement("div",{ref:this.elRef},t)}componentDidMount(){this.isUnmounting=!1;const t=new N8;this.handleCustomRendering=t.handle.bind(t),this.calendar=new U9(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",()=>{La.flushSync(()=>{})});let n;t.subscribe(r=>{const i=Date.now(),o=!n;(G9||o||this.isUpdating||this.isUnmounting||i-n<100?pS:La.flushSync)(()=>{this.setState({customRenderingMap:r},()=>{n=i,o?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}hS.act=pS;class Y9 extends L.PureComponent{render(){const{customRendering:t}=this.props,{generatorMeta:n}=t,r=typeof n=="function"?n(t.renderProps):n;return La.createPortal(r,t.containerEl)}}function pS(e){e()}class Q9 extends yi{constructor(){super(...arguments),this.headerElRef=Qn()}renderSimpleLayout(t,n){let{props:r,context:i}=this,o=[],s=z0(i.options);return t&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),$(S0,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},$(eS,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:o}))}renderHScrollLayout(t,n,r,i){let o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");let{props:s,context:l}=this,a=!s.forPrint&&z0(l.options),u=!s.forPrint&&u8(l.options),c=[];return t&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:t}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),u&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:a8}]}),$(S0,{elClasses:["fc-daygrid"],viewSpec:l.viewSpec},$(o,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:c}))}}function ua(e,t){let n=[];for(let r=0;r<t;r+=1)n[r]=[];for(let r of e)n[r.row].push(r);return n}function Ll(e,t){let n=[];for(let r=0;r<t;r+=1)n[r]=[];for(let r of e)n[r.firstCol].push(r);return n}function Y0(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let r of e.segs)n[r.row].segs.push(r)}else for(let r=0;r<t;r+=1)n[r]=null;return n}const gS=tt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function mS(e){let{display:t}=e.eventRange.ui;return t==="list-item"||t==="auto"&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class yS extends He{render(){let{props:t}=this;return $(tS,Object.assign({},t,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:gS,defaultDisplayEventEnd:t.defaultDisplayEventEnd,disableResizing:!t.seg.eventRange.def.allDay}))}}class vS extends He{render(){let{props:t,context:n}=this,{options:r}=n,{seg:i}=t,o=r.eventTimeFormat||gS,s=V_(i,o,n,!0,t.defaultDisplayEventEnd);return $(rg,Object.assign({},t,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:U_(t.seg,n),defaultGenerator:q9,timeText:s,isResizing:!1,isDateSelecting:!1}))}}function q9(e){return $(Ve,null,$("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&$("div",{className:"fc-event-time"},e.timeText),$("div",{className:"fc-event-title"},e.event.title||$(Ve,null," ")))}class X9 extends He{constructor(){super(...arguments),this.compileSegs=ke(Z9)}render(){let{props:t}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(t.singlePlacements);return $(b8,{elClasses:["fc-daygrid-more-link"],dateProfile:t.dateProfile,todayRange:t.todayRange,allDayDate:t.allDayDate,moreCnt:t.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:t.alignmentElRef,alignGridTop:t.alignGridTop,extraDateSpan:t.extraDateSpan,popoverContent:()=>{let i=(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{};return $(Ve,null,n.map(o=>{let s=o.eventRange.instance.instanceId;return $("div",{className:"fc-daygrid-event-harness",key:s,style:{visibility:i[s]?"hidden":""}},mS(o)?$(vS,Object.assign({seg:o,isDragging:!1,isSelected:s===t.eventSelection,defaultDisplayEventEnd:!1},Jo(o,t.todayRange))):$(yS,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:s===t.eventSelection,defaultDisplayEventEnd:!1},Jo(o,t.todayRange))))}))}})}}function Z9(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const K9=tt({week:"narrow"});class J9 extends yi{constructor(){super(...arguments),this.rootElRef=Qn(),this.state={dayNumberId:Xu()},this.handleRootEl=t=>{Dn(this.rootElRef,t),Dn(this.props.elRef,t)}}render(){let{context:t,props:n,state:r,rootElRef:i}=this,{options:o,dateEnv:s}=t,{date:l,dateProfile:a}=n;const u=n.showDayNumber&&tG(l,a.currentRange,s);return $(nS,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:eG,date:l,dateProfile:a,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:u,extraRenderProps:n.extraRenderProps},(c,f)=>$("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&$(y8,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Kd(t,l,"week"),date:l,defaultFormat:K9}),!f.isDisabled&&(n.showDayNumber||rS(o)||n.forceDayTop)?$("div",{className:"fc-daygrid-day-top"},$(c,{elTag:"a",elClasses:["fc-daygrid-day-number",u&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Kd(t,l)),{id:r.dayNumberId})})):n.showDayNumber?$("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},$("a",{className:"fc-daygrid-day-number"}," ")):void 0,$("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,$("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},$(X9,{allDayDate:l,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),$("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function eG(e){return e.dayNumberText||$(Ve,null," ")}function tG(e,t,n){const{start:r,end:i}=t,o=Sr(i,-1),s=n.getYear(r),l=n.getMonth(r),a=n.getYear(o),u=n.getMonth(o);return!(s===a&&l===u)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function wS(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function xS(e){return wS(e)+":"+e.lastCol}function nG(e,t,n,r,i,o,s){let l=new oG(g=>{let y=e[g.index].eventRange.instance.instanceId+":"+g.span.start+":"+(g.span.end-1);return i[y]||1});l.allowReslicing=!0,l.strictOrder=r,t===!0||n===!0?(l.maxCoord=o,l.hiddenConsumes=!0):typeof t=="number"?l.maxStackCnt=t:typeof n=="number"&&(l.maxStackCnt=n,l.hiddenConsumes=!0);let a=[],u=[];for(let g=0;g<e.length;g+=1){let y=e[g],m=xS(y);i[m]!=null?a.push({index:g,span:{start:y.firstCol,end:y.lastCol+1}}):u.push(y)}let c=l.addSegs(a),f=l.toRects(),{singleColPlacements:h,multiColPlacements:d,leftoverMargins:p}=rG(f,e,s),v=[],w=[];for(let g of u){d[g.firstCol].push({seg:g,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let y=g.firstCol;y<=g.lastCol;y+=1)h[y].push({seg:Gi(g,y,y+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let g=0;g<s.length;g+=1)v.push(0);for(let g of c){let y=e[g.index],m=g.span;d[m.start].push({seg:Gi(y,m.start,m.end,s),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let x=m.start;x<m.end;x+=1)v[x]+=1,h[x].push({seg:Gi(y,x,x+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let g=0;g<s.length;g+=1)w.push(p[g]);return{singleColPlacements:h,multiColPlacements:d,moreCnts:v,moreMarginTops:w}}function rG(e,t,n){let r=iG(e,n.length),i=[],o=[],s=[];for(let l=0;l<n.length;l+=1){let a=r[l],u=[],c=0,f=0;for(let d of a){let p=t[d.index];u.push({seg:Gi(p,l,l+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:d.levelCoord,marginTop:d.levelCoord-c}),c=d.levelCoord+d.thickness}let h=[];c=0,f=0;for(let d of a){let p=t[d.index],v=d.span.end-d.span.start>1,w=d.span.start===l;f+=d.levelCoord-c,c=d.levelCoord+d.thickness,v?(f+=d.thickness,w&&h.push({seg:Gi(p,d.span.start,d.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:d.levelCoord,marginTop:0})):w&&(h.push({seg:Gi(p,d.span.start,d.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:d.levelCoord,marginTop:f}),f=0)}i.push(u),o.push(h),s.push(f)}return{singleColPlacements:i,multiColPlacements:o,leftoverMargins:s}}function iG(e,t){let n=[];for(let r=0;r<t;r+=1)n.push([]);for(let r of e)for(let i=r.span.start;i<r.span.end;i+=1)n[i].push(r);return n}function Gi(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,o=i.range,s=co(o,{start:r[t].date,end:rt(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:s},isStart:e.isStart&&s.start.valueOf()===o.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===o.end.valueOf()})}class oG extends $W{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(t){const n=super.addSegs(t),{entriesByLevel:r}=this,i=o=>!this.forceHidden[es(o)];for(let o=0;o<r.length;o+=1)r[o]=r[o].filter(i);return n}handleInvalidInsertion(t,n,r){const{entriesByLevel:i,forceHidden:o}=this,{touchingEntry:s,touchingLevel:l,touchingLateral:a}=t;if(this.hiddenConsumes&&s){const u=es(s);if(!o[u])if(this.allowReslicing){const c=Object.assign(Object.assign({},s),{span:X_(s.span,n.span)}),f=es(c);o[f]=!0,i[l][a]=c,r.push(c),this.splitEntry(s,n,r)}else o[u]=!0,r.push(s)}super.handleInvalidInsertion(t,n,r)}}class bS extends yi{constructor(){super(...arguments),this.cellElRefs=new Wr,this.frameElRefs=new Wr,this.fgElRefs=new Wr,this.segHarnessRefs=new Wr,this.rootElRef=Qn(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=t=>{t&&this.updateSizing(!0)}}render(){let{props:t,state:n,context:r}=this,{options:i}=r,o=t.cells.length,s=Ll(t.businessHourSegs,o),l=Ll(t.bgEventSegs,o),a=Ll(this.getHighlightSegs(),o),u=Ll(this.getMirrorSegs(),o),{singleColPlacements:c,multiColPlacements:f,moreCnts:h,moreMarginTops:d}=nG(gW(t.fgEventSegs,i.eventOrder),t.dayMaxEvents,t.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,t.cells),p=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return $("tr",{ref:this.rootElRef,role:"row"},t.renderIntro&&t.renderIntro(),t.cells.map((v,w)=>{let g=this.renderFgSegs(w,t.forPrint?c[w]:f[w],t.todayRange,p),y=this.renderFgSegs(w,sG(u[w],f),t.todayRange,{},!!t.eventDrag,!!t.eventResize,!1);return $(J9,{key:v.key,elRef:this.cellElRefs.createRef(v.key),innerElRef:this.frameElRefs.createRef(v.key),dateProfile:t.dateProfile,date:v.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&w===0,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,extraRenderProps:v.extraRenderProps,extraDataAttrs:v.extraDataAttrs,extraClassNames:v.extraClassNames,extraDateSpan:v.extraDateSpan,moreCnt:h[w],moreMarginTop:d[w],singlePlacements:c[w],fgContentElRef:this.fgElRefs.createRef(v.key),fgContent:$(Ve,null,$(Ve,null,g),$(Ve,null,y)),bgContent:$(Ve,null,this.renderFillSegs(a[w],"highlight"),this.renderFillSegs(s[w],"non-business"),this.renderFillSegs(l[w],"bg-event")),minHeight:t.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(t,n){let r=this.props;this.updateSizing(!yn(t,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:t}=this;return t.eventDrag&&t.eventDrag.segs.length?t.eventDrag.segs:t.eventResize&&t.eventResize.segs.length?t.eventResize.segs:t.dateSelectionSegs}getMirrorSegs(){let{props:t}=this;return t.eventResize&&t.eventResize.segs.length?t.eventResize.segs:[]}renderFgSegs(t,n,r,i,o,s,l){let{context:a}=this,{eventSelection:u}=this.props,{framePositions:c}=this.state,f=this.props.cells.length===1,h=o||s||l,d=[];if(c)for(let p of n){let{seg:v}=p,{instanceId:w}=v.eventRange.instance,g=p.isVisible&&!i[w],y=p.isAbsolute,m="",x="";y&&(a.isRtl?(x=0,m=c.lefts[v.lastCol]-c.lefts[v.firstCol]):(m=0,x=c.rights[v.firstCol]-c.rights[v.lastCol])),d.push($("div",{className:"fc-daygrid-event-harness"+(y?" fc-daygrid-event-harness-abs":""),key:wS(v),ref:h?null:this.segHarnessRefs.createRef(xS(v)),style:{visibility:g?"":"hidden",marginTop:y?"":p.marginTop,top:y?p.absoluteTop:"",left:m,right:x}},mS(v)?$(vS,Object.assign({seg:v,isDragging:o,isSelected:w===u,defaultDisplayEventEnd:f},Jo(v,r))):$(yS,Object.assign({seg:v,isDragging:o,isResizing:s,isDateSelecting:l,isSelected:w===u,defaultDisplayEventEnd:f},Jo(v,r)))))}return d}renderFillSegs(t,n){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:o}=this.state,s=[];if(o)for(let l of t){let a=r?{right:0,left:o.lefts[l.lastCol]-o.lefts[l.firstCol]}:{left:0,right:o.rights[l.firstCol]-o.rights[l.lastCol]};s.push($("div",{key:bW(l.eventRange),className:"fc-daygrid-bg-harness",style:a},n==="bg-event"?$(p8,Object.assign({seg:l},Jo(l,i))):m8(n)))}return $(Ve,{},...s)}updateSizing(t){let{props:n,state:r,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(t){let a=n.cells.map(u=>i.currentMap[u.key]);if(a.length){let u=this.rootElRef.current,c=new fu(u,a,!0,!1);(!r.framePositions||!r.framePositions.similarTo(c))&&this.setState({framePositions:new fu(u,a,!0,!1)})}}const o=this.state.segHeights,s=this.querySegHeights(),l=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},o),s),maxContentHeight:l?this.computeMaxContentHeight():null})}}querySegHeights(){let t=this.segHarnessRefs.currentMap,n={};for(let r in t){let i=Math.round(t[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,i)}return n}computeMaxContentHeight(){let t=this.props.cells[0].key,n=this.cellElRefs.currentMap[t],r=this.fgElRefs.currentMap[t];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let t=this.cellElRefs.currentMap;return this.props.cells.map(n=>t[n.key])}}bS.addStateEquality({segHeights:yn});function sG(e,t){if(!e.length)return[];let n=lG(t);return e.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function lG(e){let t={};for(let n of e)for(let r of n)t[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return t}class aG extends yi{constructor(){super(...arguments),this.splitBusinessHourSegs=ke(ua),this.splitBgEventSegs=ke(uG),this.splitFgEventSegs=ke(ua),this.splitDateSelectionSegs=ke(ua),this.splitEventDrag=ke(Y0),this.splitEventResize=ke(Y0),this.rowRefs=new Wr}render(){let{props:t,context:n}=this,r=t.cells.length,i=this.splitBusinessHourSegs(t.businessHourSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitFgEventSegs(t.fgEventSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),a=this.splitEventDrag(t.eventDrag,r),u=this.splitEventResize(t.eventResize,r),c=r>=7&&t.clientWidth?t.clientWidth/n.options.aspectRatio/6:null;return $(Zu,{unit:"day"},(f,h)=>$(Ve,null,t.cells.map((d,p)=>$(bS,{ref:this.rowRefs.createRef(p),key:d.length?d[0].date.toISOString():p,showDayNumbers:r>1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:t.dateProfile,cells:d,renderIntro:t.renderRowIntro,businessHourSegs:i[p],eventSelection:t.eventSelection,bgEventSegs:o[p],fgEventSegs:s[p],dateSelectionSegs:l[p],eventDrag:a[p],eventResize:u[p],dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,clientWidth:t.clientWidth,clientHeight:t.clientHeight,cellMinHeight:c,forPrint:t.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const t=this.rowRefs.currentMap[0].getCellEls()[0],n=t?t.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new fu(this.rootEl,this.rowRefs.collect().map(t=>t.getCellEls()[0]),!1,!0),this.colPositions=new fu(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(t,n){let{colPositions:r,rowPositions:i}=this,o=r.leftToIndex(t),s=i.topToIndex(n);if(s!=null&&o!=null){let l=this.props.cells[s][o];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,o),allDay:!0},l.extraDateSpan),dayEl:this.getCellEl(s,o),rect:{left:r.lefts[o],right:r.rights[o],top:i.tops[s],bottom:i.bottoms[s]},layer:0}}return null}getCellEl(t,n){return this.rowRefs.currentMap[t].getCellEls()[n]}getCellRange(t,n){let r=this.props.cells[t][n].date,i=rt(r,1);return{start:r,end:i}}}function uG(e,t){return ua(e.filter(cG),t)}function cG(e){return e.eventRange.def.allDay}class fG extends yi{constructor(){super(...arguments),this.elRef=Qn(),this.needsScrollReset=!1}render(){let{props:t}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:i}=t,o=r===!0||n===!0;o&&!i&&(o=!1,n=null,r=null);let s=["fc-daygrid-body",o?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return $("div",{ref:this.elRef,className:s.join(" "),style:{width:t.clientWidth,minWidth:t.tableMinWidth}},$("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,$("tbody",{role:"presentation"},$(aG,{dateProfile:t.dateProfile,cells:t.cells,renderRowIntro:t.renderRowIntro,showWeekNumbers:t.showWeekNumbers,clientWidth:t.clientWidth,clientHeight:t.clientHeight,businessHourSegs:t.businessHourSegs,bgEventSegs:t.bgEventSegs,fgEventSegs:t.fgEventSegs,dateSelectionSegs:t.dateSelectionSegs,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:t.forPrint,isHitComboAllowed:t.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(t){t.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const t=dG(this.elRef.current,this.props.dateProfile);if(t){const n=t.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),i=t.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function dG(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${KU(t.currentDate)}-01"]`)),n||(n=e.querySelector(`[data-date="${Wp(t.currentDate)}"]`)),n}class hG extends ZW{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(t,n){return n.sliceRange(t)}}class pG extends yi{constructor(){super(...arguments),this.slicer=new hG,this.tableRef=Qn()}render(){let{props:t,context:n}=this;return $(fG,Object.assign({ref:this.tableRef},this.slicer.sliceProps(t,t.dateProfile,t.nextDayThreshold,n,t.dayTableModel),{dateProfile:t.dateProfile,cells:t.dayTableModel.cells,colGroupNode:t.colGroupNode,tableMinWidth:t.tableMinWidth,renderRowIntro:t.renderRowIntro,dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,showWeekNumbers:t.showWeekNumbers,expandRows:t.expandRows,headerAlignElRef:t.headerAlignElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint}))}}class gG extends Q9{constructor(){super(...arguments),this.buildDayTableModel=ke(mG),this.headerRef=Qn(),this.tableRef=Qn()}render(){let{options:t,dateProfileGenerator:n}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,n),o=t.dayHeaders&&$(YW,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),s=l=>$(pG,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:t.nextDayThreshold,colGroupNode:l.tableColGroupNode,tableMinWidth:l.tableMinWidth,dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,showWeekNumbers:t.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:l.clientWidth,clientHeight:l.clientHeight,forPrint:r.forPrint});return t.dayMinWidth?this.renderHScrollLayout(o,s,i.colCnt,t.dayMinWidth):this.renderSimpleLayout(o,s)}}function mG(e,t){let n=new qW(e.renderRange,t);return new XW(n,/year|month|week/.test(e.currentRangeUnit))}class yG extends I_{buildRenderRange(t,n,r){let i=super.buildRenderRange(t,n,r),{props:o}=this;return vG({currentRange:i,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:o.fixedWeekCount,dateEnv:o.dateEnv})}}function vG(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,o;if(e.snapToWeek&&(r=t.startOfWeek(r),o=t.startOfWeek(i),o.valueOf()!==i.valueOf()&&(i=y0(o,1))),e.fixedWeekCount){let s=t.startOfWeek(t.startOfMonth(rt(n.end,-1))),l=Math.ceil(BU(s,i));i=y0(i,6-l)}return{start:r,end:i}}var wG=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';m_(wG);var xG=vi({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:gG,dateProfileGeneratorClass:yG},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});function Q0(e){const t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function bG(e){const t=new Date(e),n=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function ES(e){const t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:Q0(n)};if(e.closed===void 0)return null;const r=bG(e.closed);return{start:r,end:Q0(r)}}const EG=e=>e.filter(t=>ES(t)!==null).length;function kG({entries:e,multiProject:t,selected:n,onSelect:r}){const i=e.flatMap(({project:a,item:u,colour:c})=>{const f=ES(u);return f===null?[]:[{id:`${a}:${u.id}`,title:u.title,start:f.start,end:f.end,allDay:!0,backgroundColor:c,borderColor:c,extendedProps:{project:a,item:u}}]}),o=(a,u)=>(n==null?void 0:n.project)===a&&n.ref===u,s=({event:a})=>{const{project:u,item:c}=a.extendedProps,f=jt[c.status];return C.jsxs("div",{className:"cal__event","data-strike":f.strike,"data-on":o(u,c.id),title:`${c.id} [${f.label}] ${c.title}`,children:[C.jsx("span",{className:"cal__icon",children:f.icon}),C.jsx("span",{className:"cal__ref",children:t?`${u}:${c.id}`:c.id}),C.jsx("span",{className:"cal__title",children:c.title})]})},l=({event:a,jsEvent:u})=>{u.preventDefault();const{project:c,item:f}=a.extendedProps;r(c,f.id)};return C.jsx("div",{className:"cal",children:C.jsx(hS,{plugins:[xG],initialView:"dayGridMonth",headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,dayGridWeek"},buttonText:{today:"today",month:"month",week:"week"},timeZone:"UTC",firstDay:1,height:"100%",events:i,eventContent:s,eventClick:l,dayMaxEvents:!0})})}const _G={item:F5,area:B5,ticket:H5,ghost:$5},SG=Object.keys(jt),CG=["status","area"],bf=20,q0=[],AG=[],NG=[],X0=["graph","calendar"];function Z0(e,t,n){const[r,i]=L.useState(()=>{try{const s=localStorage.getItem(e);return n.includes(s)?s:t}catch{return t}}),o=L.useCallback(s=>{i(s);try{localStorage.setItem(e,s)}catch{}},[e]);return[r,o]}const K0=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:"short",day:"numeric",month:"short",year:"numeric",timeZone:"UTC"});function DG({plan:e,selection:t,focus:n,reload:r}){var pe;const i=t.project,{ToolbarActions:o,EmptyPlan:s}=b3(),l=(i==null?void 0:i.key)??"",a=(i==null?void 0:i.items)??AG,u=L.useMemo(()=>_3(a),[a]),c=L.useMemo(()=>Uv(u),[u]),[f,h]=L.useState(new Set),[d,p]=L.useState(new Set),[v,w]=L.useState("area"),[g,y]=L.useState(!1),[m,x]=L.useState(n);L.useEffect(()=>x(n),[n]);const[_,b]=Z0("attraverso.view","graph",X0),[k,A]=Z0("attraverso.calendar.span","all",["project","all"]),T=k==="all"&&e.projects.length>1,[N,R]=L.useState(null),[j,F]=L.useState(null),[S,O]=L.useState(0),[P,z]=L.useState(!0),[I,M]=L.useState(new Set),E=V=>({open:!I.has(V),onToggle:()=>M(K=>Jt(K,V))}),B=L.useMemo(()=>((i==null?void 0:i.next)??NG).flatMap(V=>a.find(K=>K.id===V)??[]),[i,a]),H=L.useMemo(()=>{const V=new Set;for(const K of a)for(const ye of K.deps)V.add(ye).add(K.id);return V},[a]),D=L.useMemo(()=>a.filter(V=>!f.has(V.area)&&!d.has(V.status)),[a,f,d]),Y=L.useMemo(()=>{const V=new Map;for(const _e of a){if(!_e.parent)continue;const Ue=V.get(_e.parent);Ue?Ue.push(_e):V.set(_e.parent,[_e])}const K=_e=>f.has(_e.area)||d.has(_e.status),ye=new Map,ue=_e=>{const Ue=ye.get(_e.id);if(Ue!==void 0)return Ue;const nn=V.get(_e.id),bt=nn?nn.every(ue):K(_e);return ye.set(_e.id,bt),bt},Ne=new Set;for(const _e of a)ue(_e)&&Ne.add(_e.id);return Ne},[a,f,d]),ne=L.useMemo(()=>{const V=(ue,Ne)=>ue===Ne||ue.startsWith(`${Ne}.`)||Ne.startsWith(`${ue}.`),K=new Map,ye=(ue,Ne)=>{const _e=K.get(ue)??new Set;_e.add(Ne),K.set(ue,_e)};for(const ue of a)for(const Ne of ue.deps)V(Ne,ue.id)||(Y.has(ue.id)&&!Y.has(Ne)&&ye(Ne,ue.id),Y.has(Ne)&&!Y.has(ue.id)&&ye(ue.id,Ne));return K},[a,Y]),[J,ee]=BP([]),[G,Z,le]=HP([]),oe=L.useRef(V5(l)),re=L.useRef(W5(l)),ie=L.useCallback(V=>{let K=!1,ye=!1;for(const ue of V)ue.type==="position"&&ue.position?(oe.current[ue.id]=ue.position,ue.dragging===!1&&(K=!0)):ue.type==="dimensions"&&ue.dimensions&&(re.current[ue.id]=ue.dimensions,ue.resizing===!1&&(ye=!0));K&&U5(l,oe.current),ye&&G5(l,re.current),ee(ue=>fp(V,ue))},[l,ee]),ge=L.useCallback(()=>{(Object.keys(oe.current).length>0||Object.keys(re.current).length>0)&&!window.confirm("Reset the layout? This discards your saved node positions and sizes.")||(Y5(l),oe.current={},re.current={},O(K=>K+1))},[l]);L.useEffect(()=>{const V=z5(a,u,c,v,m,Y);ee(V.map(K=>{const ye=oe.current[K.id],ue=re.current[K.id],Ne=ye??K.position,_e=ue?{...K.style,width:ue.width,height:ue.height}:K.style;return{...K,position:Ne,style:_e}}))},[a,u,c,v,m,Y,S,ee]),L.useEffect(()=>{Z(j5(a,c,v,m,N,j,Y))},[a,c,v,m,N,j,Y,Z]);const me=L.useRef(new Set);L.useEffect(()=>{const V=(N?ne.get(N):void 0)??new Set,K=me.current;V.size===0&&K.size===0||(ee(ye=>ye.map(ue=>{if(V.has(ue.id))return{...ue,hidden:!1,style:{...ue.style,opacity:.42}};if(K.has(ue.id)){const Ne={...ue.style};return delete Ne.opacity,{...ue,hidden:Y.has(ue.id),style:Ne}}return ue})),me.current=V)},[N,ne,Y,ee]);const ce=m?a.find(V=>V.id===m)??null:null,Ae=L.useMemo(()=>Uv(e.projects.map(V=>V.key)),[e.projects]),Je=L.useMemo(()=>T?e.projects.flatMap(V=>V.items.filter(K=>!d.has(K.status)).map(K=>({project:V.key,item:K,colour:Ae[V.key]}))):i?D.map(V=>({project:i.key,item:V,colour:v==="status"?jt[V.status].colour:c[V.area]})):[],[T,e.projects,d,Ae,i,D,v,c]),ht=L.useMemo(()=>EG(Je.map(V=>V.item)),[Je]),pt=(V,K)=>{V===(i==null?void 0:i.key)?x(K):window.location.hash=`${encodeURIComponent(V)}/${encodeURIComponent(K)}`},Rt=ce?(i==null?void 0:i.bodies.get(ce.id))??"":"",Jt=(V,K)=>{const ye=new Set(V);return ye.has(K)?ye.delete(K):ye.add(K),ye},en=(V,K)=>{(K.type==="item"||K.type==="ticket")&&x(K.data.item.id)},tn=(V,K)=>{H.has(K.id)&&R(K.id)},gt=()=>R(null),W=(V,K)=>F(K.id),X=()=>F(null),ae=L.useMemo(()=>{const V=new Map,K=new Map;for(const ye of a)V.set(ye.area,(V.get(ye.area)??0)+1),K.set(ye.status,(K.get(ye.status)??0)+1);return{byArea:V,byStatus:K}},[a]);return C.jsxs("div",{className:"app",children:[C.jsxs("header",{className:"topbar",children:[C.jsxs("div",{className:"topbar__title",children:[e.projects.length>1?C.jsxs("select",{className:"picker","aria-label":"Project",value:(i==null?void 0:i.key)??"",onChange:V=>{window.location.hash=V.target.value},children:[i===null&&C.jsx("option",{value:"",children:"choose a project"}),e.projects.map(V=>C.jsx("option",{value:V.key,children:V.name},V.key))]}):C.jsx("strong",{children:(i==null?void 0:i.name)??"no project"}),C.jsxs("span",{className:"topbar__sub",title:e.storePath??"a database is the source of truth here - there is no plan file",children:[D.length," of ",a.length," items - ",((pe=e.storePath)==null?void 0:pe.split("/").pop())??"database"]})]}),C.jsxs("div",{className:"filters",children:[!(_==="calendar"&&T)&&C.jsx("div",{className:"filters__group",children:u.map(V=>C.jsxs("button",{className:"chip","data-off":f.has(V),style:{"--area":c[V]},onClick:()=>h(K=>Jt(K,V)),children:[C.jsx("span",{className:"chip__dot"}),V,C.jsx("span",{className:"chip__count",children:ae.byArea.get(V)})]},V))}),C.jsx("div",{className:"filters__group",children:SG.map(V=>C.jsxs("button",{className:"chip","data-off":d.has(V),style:{"--area":jt[V].colour},onClick:()=>p(K=>Jt(K,V)),children:[C.jsx("span",{className:"chip__dot"}),jt[V].label,C.jsx("span",{className:"chip__count",children:ae.byStatus.get(V)??0})]},V))}),C.jsx("div",{className:"segmented",role:"group","aria-label":"View",children:X0.map(V=>C.jsx("button",{className:"segmented__btn","data-on":_===V,onClick:()=>b(V),children:V},V))}),_==="calendar"&&e.projects.length>1&&C.jsx("button",{className:"chip","data-on":T,onClick:()=>A(T?"project":"all"),title:"Show every project's dated items on one calendar, coloured by project",children:"all projects"}),!(_==="calendar"&&T)&&C.jsxs("div",{className:"segmented",role:"group","aria-label":"Colour by",children:[C.jsx("span",{className:"segmented__label",children:"colour"}),CG.map(V=>C.jsx("button",{className:"segmented__btn","data-on":v===V,onClick:()=>w(V),children:V},V))]}),_==="graph"&&C.jsx("button",{className:"chip","data-on":g,onClick:()=>y(V=>!V),title:g?"Unlock to drag / resize nodes":"Lock the layout: pan without moving nodes",children:g?"🔒 locked":"🔓 lock"}),_==="graph"&&C.jsx("button",{className:"chip",onClick:ge,title:"Clear saved positions and re-run auto-layout",children:"reset layout"}),B.length>0&&C.jsxs("button",{className:"chip","data-off":!P,onClick:()=>z(V=>!V),title:"The order agreed with set_next",children:["next",C.jsx("span",{className:"chip__count",children:B.length})]}),o!==void 0&&C.jsx(o,{plan:e,project:i,reload:r})]})]}),C.jsxs("div",{className:"body",children:[C.jsxs("div",{className:"graph",children:[e.projects.length===0&&s!==void 0?C.jsx("div",{className:"graph__notice",children:C.jsx(s,{reload:r})}):t.notice!==null&&!(_==="calendar"&&T)?C.jsx("div",{className:"graph__notice",children:t.notice}):_==="calendar"&&ht===0&&C.jsxs("div",{className:"graph__notice",children:["Nothing here has a date yet. Give an item a ",C.jsx("code",{children:"due"})," (or a ",C.jsx("code",{children:"start"}),") with"," ",C.jsx("code",{children:"edit_item"})," and it appears on the calendar."]}),_==="graph"&&P&&B.length>0&&C.jsxs("aside",{className:"next",children:[C.jsxs("div",{className:"next__head",children:[C.jsx("span",{className:"next__label",children:"Next"}),C.jsx("button",{className:"next__close",onClick:()=>z(!1),"aria-label":"Close",children:"✕"})]}),C.jsx("ol",{className:"next__list",children:B.map((V,K)=>C.jsx("li",{children:C.jsxs("button",{className:"next__item","data-on":m===V.id,"data-hidden":Y.has(V.id),onClick:()=>x(V.id),children:[C.jsx("span",{className:"next__pos",children:K+1}),C.jsx("span",{className:"next__id",style:{color:c[V.area]},children:V.id}),C.jsx("span",{className:"next__title",children:V.title})]})},V.id))})]}),_==="calendar"?C.jsx(kG,{entries:Je,multiProject:T,selected:i&&m?{project:i.key,ref:m}:null,onSelect:pt}):C.jsx(Bp.Provider,{value:g,children:C.jsxs(FP,{nodes:J,edges:G,nodeTypes:_G,onNodesChange:ie,onEdgesChange:le,onNodeClick:en,onNodeMouseEnter:tn,onNodeMouseLeave:gt,onEdgeMouseEnter:W,onEdgeMouseLeave:X,onPaneClick:()=>x(null),nodesDraggable:!g,fitView:!0,snapToGrid:!0,snapGrid:[bf,bf],minZoom:.2,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[C.jsx(GP,{gap:bf,color:"#232a33"}),C.jsx(h2,{pannable:!0,zoomable:!0,nodeColor:V=>V.data.colour??"#2b3644",nodeStrokeColor:"#0b0f14",nodeBorderRadius:4,maskColor:"rgba(11,15,20,0.6)"}),C.jsx(JP,{})]})})]}),ce&&C.jsxs("aside",{className:"detail",children:[C.jsxs("div",{className:"detail__head",children:[C.jsxs("div",{children:[C.jsx("span",{className:"detail__id",style:{color:c[ce.area]},children:ce.id}),i&&C.jsx(Q5,{projectKey:i.key,ref_:ce.id,status:ce.status,reload:r})]}),C.jsx("button",{className:"detail__close",onClick:()=>x(null),"aria-label":"Close",children:"×"})]}),(ce.start!==void 0||ce.due!==void 0)&&C.jsx("div",{className:"detail__deps",children:[ce.start&&`starts ${K0(ce.start)}`,ce.due&&`due ${K0(ce.due)}`].filter(Boolean).join(", ")}),ce.deps.length>0&&C.jsxs("div",{className:"detail__deps",children:["depends on:"," ",ce.deps.map((V,K)=>{const ye=Pp(V);return C.jsxs("span",{children:[K>0&&", ",ye===null?C.jsx("button",{className:"detail__dep",onClick:()=>x(V),children:V}):C.jsx("span",{className:"detail__dep detail__dep--elsewhere",title:`${ye.ref} in the ${ye.project} project, which is not open here`,children:V})]},V)})]}),C.jsx("div",{className:"detail__doc",children:C.jsx(QF,{remarkPlugins:[x3],children:Rt})}),i&&C.jsx(fB,{metrics:i.metrics.get(ce.id)??q0,...E("metrics")}),i&&C.jsx(aB,{...E("images"),projectKey:i.key,ref_:ce.id,images:i.attachments.get(ce.id)??q0,uploadsDisabled:e.uploadsDisabled,reload:r})]})]})]})}function TG({extensions:e}){var c;const[t,n]=L.useState(null),[r,i]=L.useState(null),[o,s]=L.useState(null),l=RG();L.useEffect(()=>{JF(e.session,s).then(s,()=>s({mode:"local"}))},[e.session]);const a=L.useCallback(()=>{iB().then(n,f=>i(f instanceof Error?f.message:String(f)))},[]);if(L.useEffect(()=>{o!==null&&o.mode!=="anonymous"&&a()},[o,a]),o===null)return C.jsx("div",{className:"boot",children:"Starting..."});if(o.mode==="anonymous")return C.jsxs("div",{className:"boot",children:[C.jsx("strong",{children:"Sign in to see your projects"}),C.jsx("span",{className:"boot__hint",children:"This viewer is hosted, so it shows the projects belonging to your account."}),C.jsx("button",{className:"boot__action",onClick:o.signIn,children:o.signInLabel})]});if(r)return C.jsxs("div",{className:"boot boot--error",children:[C.jsx("strong",{children:"Could not load the plan."}),C.jsx("span",{children:r}),C.jsxs("span",{className:"boot__hint",children:["Nothing is serving ",C.jsx("code",{children:Fd}),". Run ",C.jsx("code",{children:"yarn viewer"}),", or open the viewer from the MCP server so it serves the store it already has loaded."]})]});if(!t)return C.jsx("div",{className:"boot",children:"Loading the plan..."});const u=sB(t.projects,l.project);return C.jsx(p1.Provider,{value:e,children:C.jsx(DG,{plan:t,selection:u,focus:l.item,reload:a},((c=u.project)==null?void 0:c.key)??"none")})}function RG(){const e=()=>oB(window.location.hash),[t,n]=L.useState(e);return L.useEffect(()=>{const r=()=>n(e());return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[]),t}function IG(e={}){fb(document.getElementById("root")).render(C.jsx(L.StrictMode,{children:C.jsx(TG,{extensions:e})}))}IG();