@amodalai/runtime-app 0.1.10 → 0.1.11
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.
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
var fx=Object.defineProperty;var Mm=e=>{throw TypeError(e)};var hx=(e,n,i)=>n in e?fx(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var wl=(e,n,i)=>hx(e,typeof n!="symbol"?n+"":n,i),ff=(e,n,i)=>n.has(e)||Mm("Cannot "+i);var _=(e,n,i)=>(ff(e,n,"read from private field"),i?i.call(e):n.get(e)),Re=(e,n,i)=>n.has(e)?Mm("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i),pe=(e,n,i,s)=>(ff(e,n,"write to private field"),s?s.call(e,i):n.set(e,i),i),Ce=(e,n,i)=>(ff(e,n,"access private method"),i);var cc=(e,n,i,s)=>({set _(a){pe(e,n,a,i)},get _(){return _(e,n,s)}});function _y(e,n){for(var i=0;i<n.length;i++){const s=n[i];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(a){if(a.ep)return;a.ep=!0;const l=i(a);fetch(a.href,l)}})();function Kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function px(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=function s(){return this instanceof s?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(i,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}),i}var hf={exports:{}},kl={},pf={exports:{}},ft={};/**
|
|
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 Dm;function mx(){if(Dm)return ft;Dm=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=S&&B[S]||B["@@iterator"],typeof B=="function"?B:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,b={};function O(B,le,L){this.props=B,this.context=le,this.refs=b,this.updater=L||g}O.prototype.isReactComponent={},O.prototype.setState=function(B,le){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,le,"setState")},O.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function D(){}D.prototype=O.prototype;function P(B,le,L){this.props=B,this.context=le,this.refs=b,this.updater=L||g}var R=P.prototype=new D;R.constructor=P,T(R,O.prototype),R.isPureReactComponent=!0;var V=Array.isArray,ne=Object.prototype.hasOwnProperty,q={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function Q(B,le,L){var ze,Ae={},Te=null,tt=null;if(le!=null)for(ze in le.ref!==void 0&&(tt=le.ref),le.key!==void 0&&(Te=""+le.key),le)ne.call(le,ze)&&!I.hasOwnProperty(ze)&&(Ae[ze]=le[ze]);var Qe=arguments.length-2;if(Qe===1)Ae.children=L;else if(1<Qe){for(var st=Array(Qe),Ct=0;Ct<Qe;Ct++)st[Ct]=arguments[Ct+2];Ae.children=st}if(B&&B.defaultProps)for(ze in Qe=B.defaultProps,Qe)Ae[ze]===void 0&&(Ae[ze]=Qe[ze]);return{$$typeof:e,type:B,key:Te,ref:tt,props:Ae,_owner:q.current}}function J(B,le){return{$$typeof:e,type:B.type,key:le,ref:B.ref,props:B.props,_owner:B._owner}}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function U(B){var le={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(L){return le[L]})}var $=/\/+/g;function ue(B,le){return typeof B=="object"&&B!==null&&B.key!=null?U(""+B.key):le.toString(36)}function ae(B,le,L,ze,Ae){var Te=typeof B;(Te==="undefined"||Te==="boolean")&&(B=null);var tt=!1;if(B===null)tt=!0;else switch(Te){case"string":case"number":tt=!0;break;case"object":switch(B.$$typeof){case e:case n:tt=!0}}if(tt)return tt=B,Ae=Ae(tt),B=ze===""?"."+ue(tt,0):ze,V(Ae)?(L="",B!=null&&(L=B.replace($,"$&/")+"/"),ae(Ae,le,L,"",function(Ct){return Ct})):Ae!=null&&(H(Ae)&&(Ae=J(Ae,L+(!Ae.key||tt&&tt.key===Ae.key?"":(""+Ae.key).replace($,"$&/")+"/")+B)),le.push(Ae)),1;if(tt=0,ze=ze===""?".":ze+":",V(B))for(var Qe=0;Qe<B.length;Qe++){Te=B[Qe];var st=ze+ue(Te,Qe);tt+=ae(Te,le,L,st,Ae)}else if(st=w(B),typeof st=="function")for(B=st.call(B),Qe=0;!(Te=B.next()).done;)Te=Te.value,st=ze+ue(Te,Qe++),tt+=ae(Te,le,L,st,Ae);else if(Te==="object")throw le=String(B),Error("Objects are not valid as a React child (found: "+(le==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":le)+"). If you meant to render a collection of children, use an array instead.");return tt}function ie(B,le,L){if(B==null)return B;var ze=[],Ae=0;return ae(B,ze,"","",function(Te){return le.call(L,Te,Ae++)}),ze}function xe(B){if(B._status===-1){var le=B._result;le=le(),le.then(function(L){(B._status===0||B._status===-1)&&(B._status=1,B._result=L)},function(L){(B._status===0||B._status===-1)&&(B._status=2,B._result=L)}),B._status===-1&&(B._status=0,B._result=le)}if(B._status===1)return B._result.default;throw B._result}var Ee={current:null},ce={transition:null},ve={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:ce,ReactCurrentOwner:q};function j(){throw Error("act(...) is not supported in production builds of React.")}return ft.Children={map:ie,forEach:function(B,le,L){ie(B,function(){le.apply(this,arguments)},L)},count:function(B){var le=0;return ie(B,function(){le++}),le},toArray:function(B){return ie(B,function(le){return le})||[]},only:function(B){if(!H(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},ft.Component=O,ft.Fragment=i,ft.Profiler=a,ft.PureComponent=P,ft.StrictMode=s,ft.Suspense=m,ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ve,ft.act=j,ft.cloneElement=function(B,le,L){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var ze=T({},B.props),Ae=B.key,Te=B.ref,tt=B._owner;if(le!=null){if(le.ref!==void 0&&(Te=le.ref,tt=q.current),le.key!==void 0&&(Ae=""+le.key),B.type&&B.type.defaultProps)var Qe=B.type.defaultProps;for(st in le)ne.call(le,st)&&!I.hasOwnProperty(st)&&(ze[st]=le[st]===void 0&&Qe!==void 0?Qe[st]:le[st])}var st=arguments.length-2;if(st===1)ze.children=L;else if(1<st){Qe=Array(st);for(var Ct=0;Ct<st;Ct++)Qe[Ct]=arguments[Ct+2];ze.children=Qe}return{$$typeof:e,type:B.type,key:Ae,ref:Te,props:ze,_owner:tt}},ft.createContext=function(B){return B={$$typeof:d,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:l,_context:B},B.Consumer=B},ft.createElement=Q,ft.createFactory=function(B){var le=Q.bind(null,B);return le.type=B,le},ft.createRef=function(){return{current:null}},ft.forwardRef=function(B){return{$$typeof:f,render:B}},ft.isValidElement=H,ft.lazy=function(B){return{$$typeof:y,_payload:{_status:-1,_result:B},_init:xe}},ft.memo=function(B,le){return{$$typeof:h,type:B,compare:le===void 0?null:le}},ft.startTransition=function(B){var le=ce.transition;ce.transition={};try{B()}finally{ce.transition=le}},ft.unstable_act=j,ft.useCallback=function(B,le){return Ee.current.useCallback(B,le)},ft.useContext=function(B){return Ee.current.useContext(B)},ft.useDebugValue=function(){},ft.useDeferredValue=function(B){return Ee.current.useDeferredValue(B)},ft.useEffect=function(B,le){return Ee.current.useEffect(B,le)},ft.useId=function(){return Ee.current.useId()},ft.useImperativeHandle=function(B,le,L){return Ee.current.useImperativeHandle(B,le,L)},ft.useInsertionEffect=function(B,le){return Ee.current.useInsertionEffect(B,le)},ft.useLayoutEffect=function(B,le){return Ee.current.useLayoutEffect(B,le)},ft.useMemo=function(B,le){return Ee.current.useMemo(B,le)},ft.useReducer=function(B,le,L){return Ee.current.useReducer(B,le,L)},ft.useRef=function(B){return Ee.current.useRef(B)},ft.useState=function(B){return Ee.current.useState(B)},ft.useSyncExternalStore=function(B,le,L){return Ee.current.useSyncExternalStore(B,le,L)},ft.useTransition=function(){return Ee.current.useTransition()},ft.version="18.3.1",ft}var Im;function xh(){return Im||(Im=1,pf.exports=mx()),pf.exports}/**
|
|
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 jm;function gx(){if(jm)return kl;jm=1;var e=xh(),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(f,m,h){var y,S={},w=null,g=null;h!==void 0&&(w=""+h),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(g=m.ref);for(y in m)s.call(m,y)&&!l.hasOwnProperty(y)&&(S[y]=m[y]);if(f&&f.defaultProps)for(y in m=f.defaultProps,m)S[y]===void 0&&(S[y]=m[y]);return{$$typeof:n,type:f,key:w,ref:g,props:S,_owner:a.current}}return kl.Fragment=i,kl.jsx=d,kl.jsxs=d,kl}var Rm;function yx(){return Rm||(Rm=1,hf.exports=gx()),hf.exports}var E=yx(),Y=xh();const Py=Kl(Y),vx=_y({__proto__:null,default:Py},[Y]);var mf={exports:{}},Ln={},gf={exports:{}},yf={};/**
|
|
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
|
-
*/var _m;function xx(){return _m||(_m=1,function(e){function n(ce,ve){var j=ce.length;ce.push(ve);e:for(;0<j;){var B=j-1>>>1,le=ce[B];if(0<a(le,ve))ce[B]=ve,ce[j]=le,j=B;else break e}}function i(ce){return ce.length===0?null:ce[0]}function s(ce){if(ce.length===0)return null;var ve=ce[0],j=ce.pop();if(j!==ve){ce[0]=j;e:for(var B=0,le=ce.length,L=le>>>1;B<L;){var ze=2*(B+1)-1,Ae=ce[ze],Te=ze+1,tt=ce[Te];if(0>a(Ae,j))Te<le&&0>a(tt,Ae)?(ce[B]=tt,ce[Te]=j,B=Te):(ce[B]=Ae,ce[ze]=j,B=ze);else if(Te<le&&0>a(tt,j))ce[B]=tt,ce[Te]=j,B=Te;else break e}}return ve}function a(ce,ve){var j=ce.sortIndex-ve.sortIndex;return j!==0?j:ce.id-ve.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],h=[],y=1,S=null,w=3,g=!1,T=!1,b=!1,O=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(ce){for(var ve=i(h);ve!==null;){if(ve.callback===null)s(h);else if(ve.startTime<=ce)s(h),ve.sortIndex=ve.expirationTime,n(m,ve);else break;ve=i(h)}}function V(ce){if(b=!1,R(ce),!T)if(i(m)!==null)T=!0,xe(ne);else{var ve=i(h);ve!==null&&Ee(V,ve.startTime-ce)}}function ne(ce,ve){T=!1,b&&(b=!1,D(Q),Q=-1),g=!0;var j=w;try{for(R(ve),S=i(m);S!==null&&(!(S.expirationTime>ve)||ce&&!U());){var B=S.callback;if(typeof B=="function"){S.callback=null,w=S.priorityLevel;var le=B(S.expirationTime<=ve);ve=e.unstable_now(),typeof le=="function"?S.callback=le:S===i(m)&&s(m),R(ve)}else s(m);S=i(m)}if(S!==null)var L=!0;else{var ze=i(h);ze!==null&&Ee(V,ze.startTime-ve),L=!1}return L}finally{S=null,w=j,g=!1}}var q=!1,I=null,Q=-1,J=5,H=-1;function U(){return!(e.unstable_now()-H<J)}function $(){if(I!==null){var ce=e.unstable_now();H=ce;var ve=!0;try{ve=I(!0,ce)}finally{ve?ue():(q=!1,I=null)}}else q=!1}var ue;if(typeof P=="function")ue=function(){P($)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,ie=ae.port2;ae.port1.onmessage=$,ue=function(){ie.postMessage(null)}}else ue=function(){O($,0)};function xe(ce){I=ce,q||(q=!0,ue())}function Ee(ce,ve){Q=O(function(){ce(e.unstable_now())},ve)}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(ce){ce.callback=null},e.unstable_continueExecution=function(){T||g||(T=!0,xe(ne))},e.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<ce?Math.floor(1e3/ce):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return i(m)},e.unstable_next=function(ce){switch(w){case 1:case 2:case 3:var ve=3;break;default:ve=w}var j=w;w=ve;try{return ce()}finally{w=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ce,ve){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var j=w;w=ce;try{return ve()}finally{w=j}},e.unstable_scheduleCallback=function(ce,ve,j){var B=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?B+j:B):j=B,ce){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=j+le,ce={id:y++,callback:ve,priorityLevel:ce,startTime:j,expirationTime:le,sortIndex:-1},j>B?(ce.sortIndex=j,n(h,ce),i(m)===null&&ce===i(h)&&(b?(D(Q),Q=-1):b=!0,Ee(V,j-B))):(ce.sortIndex=le,n(m,ce),T||g||(T=!0,xe(ne))),ce},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(ce){var ve=w;return function(){var j=w;w=ve;try{return ce.apply(this,arguments)}finally{w=j}}}}(yf)),yf}var Pm;function wx(){return Pm||(Pm=1,gf.exports=xx()),gf.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 Lm;function kx(){if(Lm)return Ln;Lm=1;var e=xh(),n=wx();function i(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,o=1;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(t,r){d(t,r),d(t+"Capture",r)}function d(t,r){for(a[t]=r,t=0;t<r.length;t++)s.add(r[t])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},S={};function w(t){return m.call(S,t)?!0:m.call(y,t)?!1:h.test(t)?S[t]=!0:(y[t]=!0,!1)}function g(t,r,o,c){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function T(t,r,o,c){if(r===null||typeof r>"u"||g(t,r,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function b(t,r,o,c,p,x,N){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=o,this.propertyName=t,this.type=r,this.sanitizeURL=x,this.removeEmptyString=N}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){O[t]=new b(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];O[r]=new b(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){O[t]=new b(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){O[t]=new b(t,2,!1,t,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(t){O[t]=new b(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){O[t]=new b(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){O[t]=new b(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){O[t]=new b(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){O[t]=new b(t,5,!1,t.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function P(t){return t[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(t){var r=t.replace(D,P);O[r]=new b(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(D,P);O[r]=new b(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(D,P);O[r]=new b(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){O[t]=new b(t,1,!1,t.toLowerCase(),null,!1,!1)}),O.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){O[t]=new b(t,1,!1,t.toLowerCase(),null,!0,!0)});function R(t,r,o,c){var p=O.hasOwnProperty(r)?O[r]:null;(p!==null?p.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(T(r,o,p,c)&&(o=null),c||p===null?w(r)&&(o===null?t.removeAttribute(r):t.setAttribute(r,""+o)):p.mustUseProperty?t[p.propertyName]=o===null?p.type===3?!1:"":o:(r=p.attributeName,c=p.attributeNamespace,o===null?t.removeAttribute(r):(p=p.type,o=p===3||p===4&&o===!0?"":""+o,c?t.setAttributeNS(c,r,o):t.setAttribute(r,o))))}var V=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),q=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),U=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),ce=Symbol.iterator;function ve(t){return t===null||typeof t!="object"?null:(t=ce&&t[ce]||t["@@iterator"],typeof t=="function"?t:null)}var j=Object.assign,B;function le(t){if(B===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);B=r&&r[1]||""}return`
|
|
34
|
-
`+B+t}var L=!1;function ze(t,r){if(!t||L)return"";L=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(se){var c=se}Reflect.construct(t,[],r)}else{try{r.call()}catch(se){c=se}t.call(r.prototype)}else{try{throw Error()}catch(se){c=se}t()}}catch(se){if(se&&c&&typeof se.stack=="string"){for(var p=se.stack.split(`
|
|
35
|
-
`),x=c.stack.split(`
|
|
36
|
-
`),N=p.length-1,z=x.length-1;1<=N&&0<=z&&p[N]!==x[z];)z--;for(;1<=N&&0<=z;N--,z--)if(p[N]!==x[z]){if(N!==1||z!==1)do if(N--,z--,0>z||p[N]!==x[z]){var W=`
|
|
37
|
-
`+p[N].replace(" at new "," at ");return t.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",t.displayName)),W}while(1<=N&&0<=z);break}}}finally{L=!1,Error.prepareStackTrace=o}return(t=t?t.displayName||t.name:"")?le(t):""}function Ae(t){switch(t.tag){case 5:return le(t.type);case 16:return le("Lazy");case 13:return le("Suspense");case 19:return le("SuspenseList");case 0:case 2:case 15:return t=ze(t.type,!1),t;case 11:return t=ze(t.type.render,!1),t;case 1:return t=ze(t.type,!0),t;default:return""}}function Te(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case I:return"Fragment";case q:return"Portal";case J:return"Profiler";case Q:return"StrictMode";case ue:return"Suspense";case ae:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case U:return(t.displayName||"Context")+".Consumer";case H:return(t._context.displayName||"Context")+".Provider";case $:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ie:return r=t.displayName||null,r!==null?r:Te(t.type)||"Memo";case xe:r=t._payload,t=t._init;try{return Te(t(r))}catch{}}return null}function tt(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Te(r);case 8:return r===Q?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Qe(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function st(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Ct(t){var r=st(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var p=o.get,x=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(N){c=""+N,x.call(this,N)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(N){c=""+N},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function vn(t){t._valueTracker||(t._valueTracker=Ct(t))}function $t(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),c="";return t&&(c=st(t)?t.checked?"true":"false":t.value),t=c,t!==o?(r.setValue(t),!0):!1}function un(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zr(t,r){var o=r.checked;return j({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??t._wrapperState.initialChecked})}function Hn(t,r){var o=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;o=Qe(r.value!=null?r.value:o),t._wrapperState={initialChecked:c,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function xn(t,r){r=r.checked,r!=null&&R(t,"checked",r,!1)}function tr(t,r){xn(t,r);var o=Qe(r.value),c=r.type;if(o!=null)c==="number"?(o===0&&t.value===""||t.value!=o)&&(t.value=""+o):t.value!==""+o&&(t.value=""+o);else if(c==="submit"||c==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?$n(t,r.type,o):r.hasOwnProperty("defaultValue")&&$n(t,r.type,Qe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function oi(t,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,o||r===t.value||(t.value=r),t.defaultValue=r}o=t.name,o!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,o!==""&&(t.name=o)}function $n(t,r,o){(r!=="number"||un(t.ownerDocument)!==t)&&(o==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+o&&(t.defaultValue=""+o))}var nr=Array.isArray;function rr(t,r,o,c){if(t=t.options,r){r={};for(var p=0;p<o.length;p++)r["$"+o[p]]=!0;for(o=0;o<t.length;o++)p=r.hasOwnProperty("$"+t[o].value),t[o].selected!==p&&(t[o].selected=p),p&&c&&(t[o].defaultSelected=!0)}else{for(o=""+Qe(o),r=null,p=0;p<t.length;p++){if(t[p].value===o){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function ai(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(i(91));return j({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ri(t,r){var o=r.value;if(o==null){if(o=r.children,r=r.defaultValue,o!=null){if(r!=null)throw Error(i(92));if(nr(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),o=r}t._wrapperState={initialValue:Qe(o)}}function Mn(t,r){var o=Qe(r.value),c=Qe(r.defaultValue);o!=null&&(o=""+o,o!==t.value&&(t.value=o),r.defaultValue==null&&t.defaultValue!==o&&(t.defaultValue=o)),c!=null&&(t.defaultValue=""+c)}function wn(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function de(t){switch(t){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 Se(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?de(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ue,Xe=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,o,c,p){MSApp.execUnsafeLocalFunction(function(){return t(r,o,c,p)})}:t}(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(Ue=Ue||document.createElement("div"),Ue.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Ue.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function lt(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var We={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},kn=["Webkit","ms","Moz","O"];Object.keys(We).forEach(function(t){kn.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),We[r]=We[t]})});function ut(t,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||We.hasOwnProperty(t)&&We[t]?(""+r).trim():r+"px"}function Dn(t,r){t=t.style;for(var o in r)if(r.hasOwnProperty(o)){var c=o.indexOf("--")===0,p=ut(o,r[o],c);o==="float"&&(o="cssFloat"),c?t.setProperty(o,p):t[o]=p}}var en=j({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 Pt(t,r){if(r){if(en[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(i(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(i(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(i(61))}if(r.style!=null&&typeof r.style!="object")throw Error(i(62))}}function Sn(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 rn=null;function Fr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ar=null,ir=null,Wt=null;function Ps(t){if(t=is(t)){if(typeof Ar!="function")throw Error(i(280));var r=t.stateNode;r&&(r=no(r),Ar(t.stateNode,t.type,r))}}function _i(t){ir?Wt?Wt.push(t):Wt=[t]:ir=t}function Ls(){if(ir){var t=ir,r=Wt;if(Wt=ir=null,Ps(t),r)for(t=0;t<r.length;t++)Ps(r[t])}}function Pi(t,r){return t(r)}function Ur(){}var xr=!1;function zs(t,r,o){if(xr)return t(r,o);xr=!0;try{return Pi(t,r,o)}finally{xr=!1,(ir!==null||Wt!==null)&&(Ur(),Ls())}}function Vr(t,r){var o=t.stateNode;if(o===null)return null;var c=no(o);if(c===null)return null;o=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,r,typeof o));return o}var A=!1;if(f)try{var G={};Object.defineProperty(G,"passive",{get:function(){A=!0}}),window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch{A=!1}function oe(t,r,o,c,p,x,N,z,W){var se=Array.prototype.slice.call(arguments,3);try{r.apply(o,se)}catch(ge){this.onError(ge)}}var fe=!1,we=null,Pe=!1,Be=null,De={onError:function(t){fe=!0,we=t}};function Ie(t,r,o,c,p,x,N,z,W){fe=!1,we=null,oe.apply(De,arguments)}function Ne(t,r,o,c,p,x,N,z,W){if(Ie.apply(this,arguments),fe){if(fe){var se=we;fe=!1,we=null}else throw Error(i(198));Pe||(Pe=!0,Be=se)}}function Me(t){var r=t,o=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(o=r.return),t=r.return;while(t)}return r.tag===3?o:null}function Ge(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function ot(t){if(Me(t)!==t)throw Error(i(188))}function Bt(t){var r=t.alternate;if(!r){if(r=Me(t),r===null)throw Error(i(188));return r!==t?null:t}for(var o=t,c=r;;){var p=o.return;if(p===null)break;var x=p.alternate;if(x===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===o)return ot(p),t;if(x===c)return ot(p),r;x=x.sibling}throw Error(i(188))}if(o.return!==c.return)o=p,c=x;else{for(var N=!1,z=p.child;z;){if(z===o){N=!0,o=p,c=x;break}if(z===c){N=!0,c=p,o=x;break}z=z.sibling}if(!N){for(z=x.child;z;){if(z===o){N=!0,o=x,c=p;break}if(z===c){N=!0,c=x,o=p;break}z=z.sibling}if(!N)throw Error(i(189))}}if(o.alternate!==c)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:r}function kt(t){return t=Bt(t),t!==null?mt(t):null}function mt(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=mt(t);if(r!==null)return r;t=t.sibling}return null}var Ot=n.unstable_scheduleCallback,sr=n.unstable_cancelCallback,Ve=n.unstable_shouldYield,Qt=n.unstable_requestPaint,pt=n.unstable_now,Fs=n.unstable_getCurrentPriorityLevel,wr=n.unstable_ImmediatePriority,Wn=n.unstable_UserBlockingPriority,or=n.unstable_NormalPriority,Li=n.unstable_LowPriority,ct=n.unstable_IdlePriority,Tt=null,Lt=null;function kr(t){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Tt,t,void 0,(t.current.flags&128)===128)}catch{}}var nt=Math.clz32?Math.clz32:ar,Hr=Math.log,jt=Math.LN2;function ar(t){return t>>>=0,t===0?32:31-(Hr(t)/jt|0)|0}var lr=64,zi=4194304;function li(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $r(t,r){var o=t.pendingLanes;if(o===0)return 0;var c=0,p=t.suspendedLanes,x=t.pingedLanes,N=o&268435455;if(N!==0){var z=N&~p;z!==0?c=li(z):(x&=N,x!==0&&(c=li(x)))}else N=o&~p,N!==0?c=li(N):x!==0&&(c=li(x));if(c===0)return 0;if(r!==0&&r!==c&&(r&p)===0&&(p=c&-c,x=r&-r,p>=x||p===16&&(x&4194240)!==0))return r;if((c&4)!==0&&(c|=o&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=c;0<r;)o=31-nt(r),p=1<<o,c|=t[o],r&=~p;return c}function Fi(t,r){switch(t){case 1:case 2:case 4:return r+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 r+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 _o(t,r){for(var o=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,x=t.pendingLanes;0<x;){var N=31-nt(x),z=1<<N,W=p[N];W===-1?((z&o)===0||(z&c)!==0)&&(p[N]=Fi(z,r)):W<=r&&(t.expiredLanes|=z),x&=~z}}function Ai(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function _a(){var t=lr;return lr<<=1,(lr&4194240)===0&&(lr=64),t}function ui(t){for(var r=[],o=0;31>o;o++)r.push(t);return r}function ci(t,r,o){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-nt(r),t[r]=o}function iu(t,r){var o=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var c=t.eventTimes;for(t=t.expirationTimes;0<o;){var p=31-nt(o),x=1<<p;r[p]=0,c[p]=-1,t[p]=-1,o&=~x}}function Ui(t,r){var o=t.entangledLanes|=r;for(t=t.entanglements;o;){var c=31-nt(o),p=1<<c;p&r|t[c]&r&&(t[c]|=r),o&=~p}}var vt=0;function As(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Vi,Hi,su,Pa,ou,Po=!1,Us=[],Sr=null,Wr=null,br=null,$i=new Map,Vs=new Map,Br=[],Pc="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 La(t,r){switch(t){case"focusin":case"focusout":Sr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":br=null;break;case"pointerover":case"pointerout":$i.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(r.pointerId)}}function Hs(t,r,o,c,p,x){return t===null||t.nativeEvent!==x?(t={blockedOn:r,domEventName:o,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},r!==null&&(r=is(r),r!==null&&Hi(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function Lc(t,r,o,c,p){switch(r){case"focusin":return Sr=Hs(Sr,t,r,o,c,p),!0;case"dragenter":return Wr=Hs(Wr,t,r,o,c,p),!0;case"mouseover":return br=Hs(br,t,r,o,c,p),!0;case"pointerover":var x=p.pointerId;return $i.set(x,Hs($i.get(x)||null,t,r,o,c,p)),!0;case"gotpointercapture":return x=p.pointerId,Vs.set(x,Hs(Vs.get(x)||null,t,r,o,c,p)),!0}return!1}function au(t){var r=qn(t.target);if(r!==null){var o=Me(r);if(o!==null){if(r=o.tag,r===13){if(r=Ge(o),r!==null){t.blockedOn=r,ou(t.priority,function(){su(o)});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Lo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var o=za(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(o===null){o=t.nativeEvent;var c=new o.constructor(o.type,o);rn=c,o.target.dispatchEvent(c),rn=null}else return r=is(o),r!==null&&Hi(r),t.blockedOn=o,!1;r.shift()}return!0}function lu(t,r,o){Lo(t)&&o.delete(r)}function uu(){Po=!1,Sr!==null&&Lo(Sr)&&(Sr=null),Wr!==null&&Lo(Wr)&&(Wr=null),br!==null&&Lo(br)&&(br=null),$i.forEach(lu),Vs.forEach(lu)}function $s(t,r){t.blockedOn===r&&(t.blockedOn=null,Po||(Po=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,uu)))}function qt(t){function r(p){return $s(p,t)}if(0<Us.length){$s(Us[0],t);for(var o=1;o<Us.length;o++){var c=Us[o];c.blockedOn===t&&(c.blockedOn=null)}}for(Sr!==null&&$s(Sr,t),Wr!==null&&$s(Wr,t),br!==null&&$s(br,t),$i.forEach(r),Vs.forEach(r),o=0;o<Br.length;o++)c=Br[o],c.blockedOn===t&&(c.blockedOn=null);for(;0<Br.length&&(o=Br[0],o.blockedOn===null);)au(o),o.blockedOn===null&&Br.shift()}var di=V.ReactCurrentBatchConfig,Er=!0;function Wi(t,r,o,c){var p=vt,x=di.transition;di.transition=null;try{vt=1,zo(t,r,o,c)}finally{vt=p,di.transition=x}}function Bi(t,r,o,c){var p=vt,x=di.transition;di.transition=null;try{vt=4,zo(t,r,o,c)}finally{vt=p,di.transition=x}}function zo(t,r,o,c){if(Er){var p=za(t,r,o,c);if(p===null)Qo(t,r,c,Ws,o),La(t,c);else if(Lc(p,t,r,o,c))c.stopPropagation();else if(La(t,c),r&4&&-1<Pc.indexOf(t)){for(;p!==null;){var x=is(p);if(x!==null&&Vi(x),x=za(t,r,o,c),x===null&&Qo(t,r,c,Ws,o),x===p)break;p=x}p!==null&&c.stopPropagation()}else Qo(t,r,c,null,o)}}var Ws=null;function za(t,r,o,c){if(Ws=null,t=Fr(c),t=qn(t),t!==null)if(r=Me(t),r===null)t=null;else if(o=r.tag,o===13){if(t=Ge(r),t!==null)return t;t=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Ws=t,null}function Fo(t){switch(t){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(Fs()){case wr:return 1;case Wn:return 4;case or:case Li:return 16;case ct:return 536870912;default:return 16}default:return 16}}var Cr=null,Bs=null,Ao=null;function cu(){if(Ao)return Ao;var t,r=Bs,o=r.length,c,p="value"in Cr?Cr.value:Cr.textContent,x=p.length;for(t=0;t<o&&r[t]===p[t];t++);var N=o-t;for(c=1;c<=N&&r[o-c]===p[x-c];c++);return Ao=p.slice(t,1<c?1-c:void 0)}function Uo(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Vo(){return!0}function du(){return!1}function bn(t){function r(o,c,p,x,N){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=N,this.currentTarget=null;for(var z in t)t.hasOwnProperty(z)&&(o=t[z],this[z]=o?o(x):x[z]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Vo:du,this.isPropagationStopped=du,this}return j(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Vo)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Vo)},persist:function(){},isPersistent:Vo}),r}var fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fa=bn(fi),ur=j({},fi,{view:0,detail:0}),zc=bn(ur),qr,hi,Tr,Ho=j({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ha,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Tr&&(Tr&&t.type==="mousemove"?(qr=t.screenX-Tr.screenX,hi=t.screenY-Tr.screenY):hi=qr=0,Tr=t),qr)},movementY:function(t){return"movementY"in t?t.movementY:hi}}),fu=bn(Ho),Fc=j({},Ho,{dataTransfer:0}),Ac=bn(Fc),Aa=j({},ur,{relatedTarget:0}),Ua=bn(Aa),Uc=j({},fi,{animationName:0,elapsedTime:0,pseudoElement:0}),Vc=bn(Uc),Hc=j({},fi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$c=bn(Hc),Wc=j({},fi,{data:0}),Va=bn(Wc),Bc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qc={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"},Yc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xc(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=Yc[t])?!!r[t]:!1}function Ha(){return Xc}var hu=j({},ur,{key:function(t){if(t.key){var r=Bc[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Uo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qc[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ha,charCode:function(t){return t.type==="keypress"?Uo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Uo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Zc=bn(hu),Qc=j({},Ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pu=bn(Qc),Gc=j({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ha}),Kc=bn(Gc),Jc=j({},fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ed=bn(Jc),td=j({},Ho,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),nd=bn(td),rd=[9,13,27,32],$a=f&&"CompositionEvent"in window,qs=null;f&&"documentMode"in document&&(qs=document.documentMode);var id=f&&"TextEvent"in window&&!qs,Wa=f&&(!$a||qs&&8<qs&&11>=qs),Ba=" ",mu=!1;function En(t,r){switch(t){case"keyup":return rd.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pi(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var qi=!1;function mi(t,r){switch(t){case"compositionend":return pi(r);case"keypress":return r.which!==32?null:(mu=!0,Ba);case"textInput":return t=r.data,t===Ba&&mu?null:t;default:return null}}function sd(t,r){if(qi)return t==="compositionend"||!$a&&En(t,r)?(t=cu(),Ao=Bs=Cr=null,qi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Wa&&r.locale!=="ko"?null:r.data;default:return null}}var Nr={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 qa(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!Nr[t.type]:r==="textarea"}function Ya(t,r,o,c){_i(c),r=eo(r,"onChange"),0<r.length&&(o=new Fa("onChange","change",null,o,c),t.push({event:o,listeners:r}))}var Yi=null,at=null;function Xi(t){Cu(t,0)}function $o(t){var r=ss(t);if($t(r))return t}function Rt(t,r){if(t==="change")return r}var Zi=!1;if(f){var Wo;if(f){var Xa="oninput"in document;if(!Xa){var gu=document.createElement("div");gu.setAttribute("oninput","return;"),Xa=typeof gu.oninput=="function"}Wo=Xa}else Wo=!1;Zi=Wo&&(!document.documentMode||9<document.documentMode)}function yu(){Yi&&(Yi.detachEvent("onpropertychange",gt),at=Yi=null)}function gt(t){if(t.propertyName==="value"&&$o(at)){var r=[];Ya(r,at,t,Fr(t)),zs(Xi,r)}}function Qh(t,r,o){t==="focusin"?(yu(),Yi=r,at=o,Yi.attachEvent("onpropertychange",gt)):t==="focusout"&&yu()}function vu(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $o(at)}function xu(t,r){if(t==="click")return $o(r)}function od(t,r){if(t==="input"||t==="change")return $o(r)}function wu(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Ut=typeof Object.is=="function"?Object.is:wu;function Qi(t,r){if(Ut(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var o=Object.keys(t),c=Object.keys(r);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!m.call(r,p)||!Ut(t[p],r[p]))return!1}return!0}function Ys(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ku(t,r){var o=Ys(t);t=0;for(var c;o;){if(o.nodeType===3){if(c=t+o.textContent.length,t<=r&&c>=r)return{node:o,offset:r-t};t=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ys(o)}}function Su(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Su(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function bu(){for(var t=window,r=un();r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=un(t.document)}return r}function Za(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function ad(t){var r=bu(),o=t.focusedElem,c=t.selectionRange;if(r!==o&&o&&o.ownerDocument&&Su(o.ownerDocument.documentElement,o)){if(c!==null&&Za(o)){if(r=c.start,t=c.end,t===void 0&&(t=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(t,o.value.length);else if(t=(r=o.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=o.textContent.length,x=Math.min(c.start,p);c=c.end===void 0?x:Math.min(c.end,p),!t.extend&&x>c&&(p=c,c=x,x=p),p=ku(o,x);var N=ku(o,c);p&&N&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==N.node||t.focusOffset!==N.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),x>c?(t.addRange(r),t.extend(N.node,N.offset)):(r.setEnd(N.node,N.offset),t.addRange(r)))}}for(r=[],t=o;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<r.length;o++)t=r[o],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var ld=f&&"documentMode"in document&&11>=document.documentMode,Gi=null,Xs=null,Zs=null,Qa=!1;function Ga(t,r,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Qa||Gi==null||Gi!==un(c)||(c=Gi,"selectionStart"in c&&Za(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Zs&&Qi(Zs,c)||(Zs=c,c=eo(Xs,"onSelect"),0<c.length&&(r=new Fa("onSelect","select",null,r,o),t.push({event:r,listeners:c}),r.target=Gi)))}function Qs(t,r){var o={};return o[t.toLowerCase()]=r.toLowerCase(),o["Webkit"+t]="webkit"+r,o["Moz"+t]="moz"+r,o}var gi={animationend:Qs("Animation","AnimationEnd"),animationiteration:Qs("Animation","AnimationIteration"),animationstart:Qs("Animation","AnimationStart"),transitionend:Qs("Transition","TransitionEnd")},Ka={},Ja={};f&&(Ja=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function Ki(t){if(Ka[t])return Ka[t];if(!gi[t])return t;var r=gi[t],o;for(o in r)if(r.hasOwnProperty(o)&&o in Ja)return Ka[t]=r[o];return t}var el=Ki("animationend"),Ji=Ki("animationiteration"),Bo=Ki("animationstart"),qo=Ki("transitionend"),Yr=new Map,tl="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 Bn(t,r){Yr.set(t,r),l(r,[t])}for(var es=0;es<tl.length;es++){var Yo=tl[es],ts=Yo.toLowerCase(),Xo=Yo[0].toUpperCase()+Yo.slice(1);Bn(ts,"on"+Xo)}Bn(el,"onAnimationEnd"),Bn(Ji,"onAnimationIteration"),Bn(Bo,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(qo,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yi="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(" "),Eu=new Set("cancel close invalid load scroll toggle".split(" ").concat(yi));function nl(t,r,o){var c=t.type||"unknown-event";t.currentTarget=o,Ne(c,r,void 0,t),t.currentTarget=null}function Cu(t,r){r=(r&4)!==0;for(var o=0;o<t.length;o++){var c=t[o],p=c.event;c=c.listeners;e:{var x=void 0;if(r)for(var N=c.length-1;0<=N;N--){var z=c[N],W=z.instance,se=z.currentTarget;if(z=z.listener,W!==x&&p.isPropagationStopped())break e;nl(p,z,se),x=W}else for(N=0;N<c.length;N++){if(z=c[N],W=z.instance,se=z.currentTarget,z=z.listener,W!==x&&p.isPropagationStopped())break e;nl(p,z,se),x=W}}}if(Pe)throw t=Be,Pe=!1,Be=null,t}function Mt(t,r){var o=r[Cn];o===void 0&&(o=r[Cn]=new Set);var c=t+"__bubble";o.has(c)||(Ks(r,t,2,!1),o.add(c))}function ns(t,r,o){var c=0;r&&(c|=4),Ks(o,t,c,r)}var Zo="_reactListening"+Math.random().toString(36).slice(2);function Gs(t){if(!t[Zo]){t[Zo]=!0,s.forEach(function(o){o!=="selectionchange"&&(Eu.has(o)||ns(o,!1,t),ns(o,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Zo]||(r[Zo]=!0,ns("selectionchange",!1,r))}}function Ks(t,r,o,c){switch(Fo(r)){case 1:var p=Wi;break;case 4:p=Bi;break;default:p=zo}o=p.bind(null,r,o,t),p=void 0,!A||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(r,o,{capture:!0,passive:p}):t.addEventListener(r,o,!0):p!==void 0?t.addEventListener(r,o,{passive:p}):t.addEventListener(r,o,!1)}function Qo(t,r,o,c,p){var x=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var N=c.tag;if(N===3||N===4){var z=c.stateNode.containerInfo;if(z===p||z.nodeType===8&&z.parentNode===p)break;if(N===4)for(N=c.return;N!==null;){var W=N.tag;if((W===3||W===4)&&(W=N.stateNode.containerInfo,W===p||W.nodeType===8&&W.parentNode===p))return;N=N.return}for(;z!==null;){if(N=qn(z),N===null)return;if(W=N.tag,W===5||W===6){c=x=N;continue e}z=z.parentNode}}c=c.return}zs(function(){var se=x,ge=Fr(o),ye=[];e:{var he=Yr.get(t);if(he!==void 0){var Oe=Fa,_e=t;switch(t){case"keypress":if(Uo(o)===0)break e;case"keydown":case"keyup":Oe=Zc;break;case"focusin":_e="focus",Oe=Ua;break;case"focusout":_e="blur",Oe=Ua;break;case"beforeblur":case"afterblur":Oe=Ua;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=fu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=Ac;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=Kc;break;case el:case Ji:case Bo:Oe=Vc;break;case qo:Oe=ed;break;case"scroll":Oe=zc;break;case"wheel":Oe=nd;break;case"copy":case"cut":case"paste":Oe=$c;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=pu}var Le=(r&4)!==0,Zt=!Le&&t==="scroll",te=Le?he!==null?he+"Capture":null:he;Le=[];for(var Z=se,re;Z!==null;){re=Z;var be=re.stateNode;if(re.tag===5&&be!==null&&(re=be,te!==null&&(be=Vr(Z,te),be!=null&&Le.push(Js(Z,be,re)))),Zt)break;Z=Z.return}0<Le.length&&(he=new Oe(he,_e,null,o,ge),ye.push({event:he,listeners:Le}))}}if((r&7)===0){e:{if(he=t==="mouseover"||t==="pointerover",Oe=t==="mouseout"||t==="pointerout",he&&o!==rn&&(_e=o.relatedTarget||o.fromElement)&&(qn(_e)||_e[Et]))break e;if((Oe||he)&&(he=ge.window===ge?ge:(he=ge.ownerDocument)?he.defaultView||he.parentWindow:window,Oe?(_e=o.relatedTarget||o.toElement,Oe=se,_e=_e?qn(_e):null,_e!==null&&(Zt=Me(_e),_e!==Zt||_e.tag!==5&&_e.tag!==6)&&(_e=null)):(Oe=null,_e=se),Oe!==_e)){if(Le=fu,be="onMouseLeave",te="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(Le=pu,be="onPointerLeave",te="onPointerEnter",Z="pointer"),Zt=Oe==null?he:ss(Oe),re=_e==null?he:ss(_e),he=new Le(be,Z+"leave",Oe,o,ge),he.target=Zt,he.relatedTarget=re,be=null,qn(ge)===se&&(Le=new Le(te,Z+"enter",_e,o,ge),Le.target=re,Le.relatedTarget=Zt,be=Le),Zt=be,Oe&&_e)t:{for(Le=Oe,te=_e,Z=0,re=Le;re;re=vi(re))Z++;for(re=0,be=te;be;be=vi(be))re++;for(;0<Z-re;)Le=vi(Le),Z--;for(;0<re-Z;)te=vi(te),re--;for(;Z--;){if(Le===te||te!==null&&Le===te.alternate)break t;Le=vi(Le),te=vi(te)}Le=null}else Le=null;Oe!==null&&rl(ye,he,Oe,Le,!1),_e!==null&&Zt!==null&&rl(ye,Zt,_e,Le,!0)}}e:{if(he=se?ss(se):window,Oe=he.nodeName&&he.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&he.type==="file")var Fe=Rt;else if(qa(he))if(Zi)Fe=od;else{Fe=vu;var qe=Qh}else(Oe=he.nodeName)&&Oe.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(Fe=xu);if(Fe&&(Fe=Fe(t,se))){Ya(ye,Fe,o,ge);break e}qe&&qe(t,he,se),t==="focusout"&&(qe=he._wrapperState)&&qe.controlled&&he.type==="number"&&$n(he,"number",he.value)}switch(qe=se?ss(se):window,t){case"focusin":(qa(qe)||qe.contentEditable==="true")&&(Gi=qe,Xs=se,Zs=null);break;case"focusout":Zs=Xs=Gi=null;break;case"mousedown":Qa=!0;break;case"contextmenu":case"mouseup":case"dragend":Qa=!1,Ga(ye,o,ge);break;case"selectionchange":if(ld)break;case"keydown":case"keyup":Ga(ye,o,ge)}var Ye;if($a)e:{switch(t){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else qi?En(t,o)&&(Je="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Je="onCompositionStart");Je&&(Wa&&o.locale!=="ko"&&(qi||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&qi&&(Ye=cu()):(Cr=ge,Bs="value"in Cr?Cr.value:Cr.textContent,qi=!0)),qe=eo(se,Je),0<qe.length&&(Je=new Va(Je,t,null,o,ge),ye.push({event:Je,listeners:qe}),Ye?Je.data=Ye:(Ye=pi(o),Ye!==null&&(Je.data=Ye)))),(Ye=id?mi(t,o):sd(t,o))&&(se=eo(se,"onBeforeInput"),0<se.length&&(ge=new Va("onBeforeInput","beforeinput",null,o,ge),ye.push({event:ge,listeners:se}),ge.data=Ye))}Cu(ye,r)})}function Js(t,r,o){return{instance:t,listener:r,currentTarget:o}}function eo(t,r){for(var o=r+"Capture",c=[];t!==null;){var p=t,x=p.stateNode;p.tag===5&&x!==null&&(p=x,x=Vr(t,o),x!=null&&c.unshift(Js(t,x,p)),x=Vr(t,r),x!=null&&c.push(Js(t,x,p))),t=t.return}return c}function vi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function rl(t,r,o,c,p){for(var x=r._reactName,N=[];o!==null&&o!==c;){var z=o,W=z.alternate,se=z.stateNode;if(W!==null&&W===c)break;z.tag===5&&se!==null&&(z=se,p?(W=Vr(o,x),W!=null&&N.unshift(Js(o,W,z))):p||(W=Vr(o,x),W!=null&&N.push(Js(o,W,z)))),o=o.return}N.length!==0&&t.push({event:r,listeners:N})}var to=/\r\n?/g,il=/\u0000|\uFFFD/g;function Ze(t){return(typeof t=="string"?t:""+t).replace(to,`
|
|
38
|
-
`).replace(il,"")}function Xr(t,r,o){if(r=Ze(r),Ze(t)!==r&&o)throw Error(i(425))}function Go(){}var k=null,u=null;function v(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var C=typeof setTimeout=="function"?setTimeout:void 0,M=typeof clearTimeout=="function"?clearTimeout:void 0,F=typeof Promise=="function"?Promise:void 0,X=typeof queueMicrotask=="function"?queueMicrotask:typeof F<"u"?function(t){return F.resolve(null).then(t).catch(K)}:C;function K(t){setTimeout(function(){throw t})}function ee(t,r){var o=r,c=0;do{var p=o.nextSibling;if(t.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"){if(c===0){t.removeChild(p),qt(r);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=p}while(o);qt(r)}function me(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function He(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(r===0)return t;r--}else o==="/$"&&r++}t=t.previousSibling}return null}var Ke=Math.random().toString(36).slice(2),dt="__reactFiber$"+Ke,$e="__reactProps$"+Ke,Et="__reactContainer$"+Ke,Cn="__reactEvents$"+Ke,cr="__reactListeners$"+Ke,rs="__reactHandles$"+Ke;function qn(t){var r=t[dt];if(r)return r;for(var o=t.parentNode;o;){if(r=o[Et]||o[dt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(t=He(t);t!==null;){if(o=t[dt])return o;t=He(t)}return r}t=o,o=t.parentNode}return null}function is(t){return t=t[dt]||t[Et],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ss(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(i(33))}function no(t){return t[$e]||null}var sl=[],os=-1;function Zr(t){return{current:t}}function St(t){0>os||(t.current=sl[os],sl[os]=null,os--)}function xt(t,r){os++,sl[os]=t.current,t.current=r}var Qr={},fn=Zr(Qr),In=Zr(!1),ro=Qr;function Ko(t,r){var o=t.type.contextTypes;if(!o)return Qr;var c=t.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var p={},x;for(x in o)p[x]=r[x];return c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function jn(t){return t=t.childContextTypes,t!=null}function Tu(){St(In),St(fn)}function Gh(t,r,o){if(fn.current!==Qr)throw Error(i(168));xt(fn,r),xt(In,o)}function Kh(t,r,o){var c=t.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var p in c)if(!(p in r))throw Error(i(108,tt(t)||"Unknown",p));return j({},o,c)}function Nu(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Qr,ro=fn.current,xt(fn,t),xt(In,In.current),!0}function Jh(t,r,o){var c=t.stateNode;if(!c)throw Error(i(169));o?(t=Kh(t,r,ro),c.__reactInternalMemoizedMergedChildContext=t,St(In),St(fn),xt(fn,t)):St(In),xt(In,o)}var xi=null,Ou=!1,ud=!1;function ep(t){xi===null?xi=[t]:xi.push(t)}function Iv(t){Ou=!0,ep(t)}function as(){if(!ud&&xi!==null){ud=!0;var t=0,r=vt;try{var o=xi;for(vt=1;t<o.length;t++){var c=o[t];do c=c(!0);while(c!==null)}xi=null,Ou=!1}catch(p){throw xi!==null&&(xi=xi.slice(t+1)),Ot(wr,as),p}finally{vt=r,ud=!1}}return null}var Jo=[],ea=0,Mu=null,Du=0,dr=[],fr=0,io=null,wi=1,ki="";function so(t,r){Jo[ea++]=Du,Jo[ea++]=Mu,Mu=t,Du=r}function tp(t,r,o){dr[fr++]=wi,dr[fr++]=ki,dr[fr++]=io,io=t;var c=wi;t=ki;var p=32-nt(c)-1;c&=~(1<<p),o+=1;var x=32-nt(r)+p;if(30<x){var N=p-p%5;x=(c&(1<<N)-1).toString(32),c>>=N,p-=N,wi=1<<32-nt(r)+p|o<<p|c,ki=x+t}else wi=1<<x|o<<p|c,ki=t}function cd(t){t.return!==null&&(so(t,1),tp(t,1,0))}function dd(t){for(;t===Mu;)Mu=Jo[--ea],Jo[ea]=null,Du=Jo[--ea],Jo[ea]=null;for(;t===io;)io=dr[--fr],dr[fr]=null,ki=dr[--fr],dr[fr]=null,wi=dr[--fr],dr[fr]=null}var Yn=null,Xn=null,zt=!1,Or=null;function np(t,r){var o=gr(5,null,null,0);o.elementType="DELETED",o.stateNode=r,o.return=t,r=t.deletions,r===null?(t.deletions=[o],t.flags|=16):r.push(o)}function rp(t,r){switch(t.tag){case 5:var o=t.type;return r=r.nodeType!==1||o.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,Yn=t,Xn=me(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,Yn=t,Xn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(o=io!==null?{id:wi,overflow:ki}:null,t.memoizedState={dehydrated:r,treeContext:o,retryLane:1073741824},o=gr(18,null,null,0),o.stateNode=r,o.return=t,t.child=o,Yn=t,Xn=null,!0):!1;default:return!1}}function fd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function hd(t){if(zt){var r=Xn;if(r){var o=r;if(!rp(t,r)){if(fd(t))throw Error(i(418));r=me(o.nextSibling);var c=Yn;r&&rp(t,r)?np(c,o):(t.flags=t.flags&-4097|2,zt=!1,Yn=t)}}else{if(fd(t))throw Error(i(418));t.flags=t.flags&-4097|2,zt=!1,Yn=t}}}function ip(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Yn=t}function Iu(t){if(t!==Yn)return!1;if(!zt)return ip(t),zt=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!v(t.type,t.memoizedProps)),r&&(r=Xn)){if(fd(t))throw sp(),Error(i(418));for(;r;)np(t,r),r=me(r.nextSibling)}if(ip(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"){if(r===0){Xn=me(t.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++}t=t.nextSibling}Xn=null}}else Xn=Yn?me(t.stateNode.nextSibling):null;return!0}function sp(){for(var t=Xn;t;)t=me(t.nextSibling)}function ta(){Xn=Yn=null,zt=!1}function pd(t){Or===null?Or=[t]:Or.push(t)}var jv=V.ReactCurrentBatchConfig;function ol(t,r,o){if(t=o.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var c=o.stateNode}if(!c)throw Error(i(147,t));var p=c,x=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===x?r.ref:(r=function(N){var z=p.refs;N===null?delete z[x]:z[x]=N},r._stringRef=x,r)}if(typeof t!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,t))}return t}function ju(t,r){throw t=Object.prototype.toString.call(r),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function op(t){var r=t._init;return r(t._payload)}function ap(t){function r(te,Z){if(t){var re=te.deletions;re===null?(te.deletions=[Z],te.flags|=16):re.push(Z)}}function o(te,Z){if(!t)return null;for(;Z!==null;)r(te,Z),Z=Z.sibling;return null}function c(te,Z){for(te=new Map;Z!==null;)Z.key!==null?te.set(Z.key,Z):te.set(Z.index,Z),Z=Z.sibling;return te}function p(te,Z){return te=ms(te,Z),te.index=0,te.sibling=null,te}function x(te,Z,re){return te.index=re,t?(re=te.alternate,re!==null?(re=re.index,re<Z?(te.flags|=2,Z):re):(te.flags|=2,Z)):(te.flags|=1048576,Z)}function N(te){return t&&te.alternate===null&&(te.flags|=2),te}function z(te,Z,re,be){return Z===null||Z.tag!==6?(Z=of(re,te.mode,be),Z.return=te,Z):(Z=p(Z,re),Z.return=te,Z)}function W(te,Z,re,be){var Fe=re.type;return Fe===I?ge(te,Z,re.props.children,be,re.key):Z!==null&&(Z.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===xe&&op(Fe)===Z.type)?(be=p(Z,re.props),be.ref=ol(te,Z,re),be.return=te,be):(be=nc(re.type,re.key,re.props,null,te.mode,be),be.ref=ol(te,Z,re),be.return=te,be)}function se(te,Z,re,be){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==re.containerInfo||Z.stateNode.implementation!==re.implementation?(Z=af(re,te.mode,be),Z.return=te,Z):(Z=p(Z,re.children||[]),Z.return=te,Z)}function ge(te,Z,re,be,Fe){return Z===null||Z.tag!==7?(Z=po(re,te.mode,be,Fe),Z.return=te,Z):(Z=p(Z,re),Z.return=te,Z)}function ye(te,Z,re){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Z=of(""+Z,te.mode,re),Z.return=te,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case ne:return re=nc(Z.type,Z.key,Z.props,null,te.mode,re),re.ref=ol(te,null,Z),re.return=te,re;case q:return Z=af(Z,te.mode,re),Z.return=te,Z;case xe:var be=Z._init;return ye(te,be(Z._payload),re)}if(nr(Z)||ve(Z))return Z=po(Z,te.mode,re,null),Z.return=te,Z;ju(te,Z)}return null}function he(te,Z,re,be){var Fe=Z!==null?Z.key:null;if(typeof re=="string"&&re!==""||typeof re=="number")return Fe!==null?null:z(te,Z,""+re,be);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case ne:return re.key===Fe?W(te,Z,re,be):null;case q:return re.key===Fe?se(te,Z,re,be):null;case xe:return Fe=re._init,he(te,Z,Fe(re._payload),be)}if(nr(re)||ve(re))return Fe!==null?null:ge(te,Z,re,be,null);ju(te,re)}return null}function Oe(te,Z,re,be,Fe){if(typeof be=="string"&&be!==""||typeof be=="number")return te=te.get(re)||null,z(Z,te,""+be,Fe);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case ne:return te=te.get(be.key===null?re:be.key)||null,W(Z,te,be,Fe);case q:return te=te.get(be.key===null?re:be.key)||null,se(Z,te,be,Fe);case xe:var qe=be._init;return Oe(te,Z,re,qe(be._payload),Fe)}if(nr(be)||ve(be))return te=te.get(re)||null,ge(Z,te,be,Fe,null);ju(Z,be)}return null}function _e(te,Z,re,be){for(var Fe=null,qe=null,Ye=Z,Je=Z=0,an=null;Ye!==null&&Je<re.length;Je++){Ye.index>Je?(an=Ye,Ye=null):an=Ye.sibling;var wt=he(te,Ye,re[Je],be);if(wt===null){Ye===null&&(Ye=an);break}t&&Ye&&wt.alternate===null&&r(te,Ye),Z=x(wt,Z,Je),qe===null?Fe=wt:qe.sibling=wt,qe=wt,Ye=an}if(Je===re.length)return o(te,Ye),zt&&so(te,Je),Fe;if(Ye===null){for(;Je<re.length;Je++)Ye=ye(te,re[Je],be),Ye!==null&&(Z=x(Ye,Z,Je),qe===null?Fe=Ye:qe.sibling=Ye,qe=Ye);return zt&&so(te,Je),Fe}for(Ye=c(te,Ye);Je<re.length;Je++)an=Oe(Ye,te,Je,re[Je],be),an!==null&&(t&&an.alternate!==null&&Ye.delete(an.key===null?Je:an.key),Z=x(an,Z,Je),qe===null?Fe=an:qe.sibling=an,qe=an);return t&&Ye.forEach(function(gs){return r(te,gs)}),zt&&so(te,Je),Fe}function Le(te,Z,re,be){var Fe=ve(re);if(typeof Fe!="function")throw Error(i(150));if(re=Fe.call(re),re==null)throw Error(i(151));for(var qe=Fe=null,Ye=Z,Je=Z=0,an=null,wt=re.next();Ye!==null&&!wt.done;Je++,wt=re.next()){Ye.index>Je?(an=Ye,Ye=null):an=Ye.sibling;var gs=he(te,Ye,wt.value,be);if(gs===null){Ye===null&&(Ye=an);break}t&&Ye&&gs.alternate===null&&r(te,Ye),Z=x(gs,Z,Je),qe===null?Fe=gs:qe.sibling=gs,qe=gs,Ye=an}if(wt.done)return o(te,Ye),zt&&so(te,Je),Fe;if(Ye===null){for(;!wt.done;Je++,wt=re.next())wt=ye(te,wt.value,be),wt!==null&&(Z=x(wt,Z,Je),qe===null?Fe=wt:qe.sibling=wt,qe=wt);return zt&&so(te,Je),Fe}for(Ye=c(te,Ye);!wt.done;Je++,wt=re.next())wt=Oe(Ye,te,Je,wt.value,be),wt!==null&&(t&&wt.alternate!==null&&Ye.delete(wt.key===null?Je:wt.key),Z=x(wt,Z,Je),qe===null?Fe=wt:qe.sibling=wt,qe=wt);return t&&Ye.forEach(function(dx){return r(te,dx)}),zt&&so(te,Je),Fe}function Zt(te,Z,re,be){if(typeof re=="object"&&re!==null&&re.type===I&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case ne:e:{for(var Fe=re.key,qe=Z;qe!==null;){if(qe.key===Fe){if(Fe=re.type,Fe===I){if(qe.tag===7){o(te,qe.sibling),Z=p(qe,re.props.children),Z.return=te,te=Z;break e}}else if(qe.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===xe&&op(Fe)===qe.type){o(te,qe.sibling),Z=p(qe,re.props),Z.ref=ol(te,qe,re),Z.return=te,te=Z;break e}o(te,qe);break}else r(te,qe);qe=qe.sibling}re.type===I?(Z=po(re.props.children,te.mode,be,re.key),Z.return=te,te=Z):(be=nc(re.type,re.key,re.props,null,te.mode,be),be.ref=ol(te,Z,re),be.return=te,te=be)}return N(te);case q:e:{for(qe=re.key;Z!==null;){if(Z.key===qe)if(Z.tag===4&&Z.stateNode.containerInfo===re.containerInfo&&Z.stateNode.implementation===re.implementation){o(te,Z.sibling),Z=p(Z,re.children||[]),Z.return=te,te=Z;break e}else{o(te,Z);break}else r(te,Z);Z=Z.sibling}Z=af(re,te.mode,be),Z.return=te,te=Z}return N(te);case xe:return qe=re._init,Zt(te,Z,qe(re._payload),be)}if(nr(re))return _e(te,Z,re,be);if(ve(re))return Le(te,Z,re,be);ju(te,re)}return typeof re=="string"&&re!==""||typeof re=="number"?(re=""+re,Z!==null&&Z.tag===6?(o(te,Z.sibling),Z=p(Z,re),Z.return=te,te=Z):(o(te,Z),Z=of(re,te.mode,be),Z.return=te,te=Z),N(te)):o(te,Z)}return Zt}var na=ap(!0),lp=ap(!1),Ru=Zr(null),_u=null,ra=null,md=null;function gd(){md=ra=_u=null}function yd(t){var r=Ru.current;St(Ru),t._currentValue=r}function vd(t,r,o){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===o)break;t=t.return}}function ia(t,r){_u=t,md=ra=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Rn=!0),t.firstContext=null)}function hr(t){var r=t._currentValue;if(md!==t)if(t={context:t,memoizedValue:r,next:null},ra===null){if(_u===null)throw Error(i(308));ra=t,_u.dependencies={lanes:0,firstContext:t}}else ra=ra.next=t;return r}var oo=null;function xd(t){oo===null?oo=[t]:oo.push(t)}function up(t,r,o,c){var p=r.interleaved;return p===null?(o.next=o,xd(r)):(o.next=p.next,p.next=o),r.interleaved=o,Si(t,c)}function Si(t,r){t.lanes|=r;var o=t.alternate;for(o!==null&&(o.lanes|=r),o=t,t=t.return;t!==null;)t.childLanes|=r,o=t.alternate,o!==null&&(o.childLanes|=r),o=t,t=t.return;return o.tag===3?o.stateNode:null}var ls=!1;function wd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cp(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function bi(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function us(t,r,o){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(yt&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,Si(t,o)}return p=c.interleaved,p===null?(r.next=r,xd(c)):(r.next=p.next,p.next=r),c.interleaved=r,Si(t,o)}function Pu(t,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var c=r.lanes;c&=t.pendingLanes,o|=c,r.lanes=o,Ui(t,o)}}function dp(t,r){var o=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,x=null;if(o=o.firstBaseUpdate,o!==null){do{var N={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};x===null?p=x=N:x=x.next=N,o=o.next}while(o!==null);x===null?p=x=r:x=x.next=r}else p=x=r;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:c.shared,effects:c.effects},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=r:t.next=r,o.lastBaseUpdate=r}function Lu(t,r,o,c){var p=t.updateQueue;ls=!1;var x=p.firstBaseUpdate,N=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var W=z,se=W.next;W.next=null,N===null?x=se:N.next=se,N=W;var ge=t.alternate;ge!==null&&(ge=ge.updateQueue,z=ge.lastBaseUpdate,z!==N&&(z===null?ge.firstBaseUpdate=se:z.next=se,ge.lastBaseUpdate=W))}if(x!==null){var ye=p.baseState;N=0,ge=se=W=null,z=x;do{var he=z.lane,Oe=z.eventTime;if((c&he)===he){ge!==null&&(ge=ge.next={eventTime:Oe,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var _e=t,Le=z;switch(he=r,Oe=o,Le.tag){case 1:if(_e=Le.payload,typeof _e=="function"){ye=_e.call(Oe,ye,he);break e}ye=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Le.payload,he=typeof _e=="function"?_e.call(Oe,ye,he):_e,he==null)break e;ye=j({},ye,he);break e;case 2:ls=!0}}z.callback!==null&&z.lane!==0&&(t.flags|=64,he=p.effects,he===null?p.effects=[z]:he.push(z))}else Oe={eventTime:Oe,lane:he,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ge===null?(se=ge=Oe,W=ye):ge=ge.next=Oe,N|=he;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;he=z,z=he.next,he.next=null,p.lastBaseUpdate=he,p.shared.pending=null}}while(!0);if(ge===null&&(W=ye),p.baseState=W,p.firstBaseUpdate=se,p.lastBaseUpdate=ge,r=p.shared.interleaved,r!==null){p=r;do N|=p.lane,p=p.next;while(p!==r)}else x===null&&(p.shared.lanes=0);uo|=N,t.lanes=N,t.memoizedState=ye}}function fp(t,r,o){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var c=t[r],p=c.callback;if(p!==null){if(c.callback=null,c=o,typeof p!="function")throw Error(i(191,p));p.call(c)}}}var al={},Gr=Zr(al),ll=Zr(al),ul=Zr(al);function ao(t){if(t===al)throw Error(i(174));return t}function kd(t,r){switch(xt(ul,r),xt(ll,t),xt(Gr,al),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Se(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Se(r,t)}St(Gr),xt(Gr,r)}function sa(){St(Gr),St(ll),St(ul)}function hp(t){ao(ul.current);var r=ao(Gr.current),o=Se(r,t.type);r!==o&&(xt(ll,t),xt(Gr,o))}function Sd(t){ll.current===t&&(St(Gr),St(ll))}var Vt=Zr(0);function zu(t){for(var r=t;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var bd=[];function Ed(){for(var t=0;t<bd.length;t++)bd[t]._workInProgressVersionPrimary=null;bd.length=0}var Fu=V.ReactCurrentDispatcher,Cd=V.ReactCurrentBatchConfig,lo=0,Ht=null,tn=null,sn=null,Au=!1,cl=!1,dl=0,Rv=0;function hn(){throw Error(i(321))}function Td(t,r){if(r===null)return!1;for(var o=0;o<r.length&&o<t.length;o++)if(!Ut(t[o],r[o]))return!1;return!0}function Nd(t,r,o,c,p,x){if(lo=x,Ht=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Fu.current=t===null||t.memoizedState===null?zv:Fv,t=o(c,p),cl){x=0;do{if(cl=!1,dl=0,25<=x)throw Error(i(301));x+=1,sn=tn=null,r.updateQueue=null,Fu.current=Av,t=o(c,p)}while(cl)}if(Fu.current=Hu,r=tn!==null&&tn.next!==null,lo=0,sn=tn=Ht=null,Au=!1,r)throw Error(i(300));return t}function Od(){var t=dl!==0;return dl=0,t}function Kr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?Ht.memoizedState=sn=t:sn=sn.next=t,sn}function pr(){if(tn===null){var t=Ht.alternate;t=t!==null?t.memoizedState:null}else t=tn.next;var r=sn===null?Ht.memoizedState:sn.next;if(r!==null)sn=r,tn=t;else{if(t===null)throw Error(i(310));tn=t,t={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},sn===null?Ht.memoizedState=sn=t:sn=sn.next=t}return sn}function fl(t,r){return typeof r=="function"?r(t):r}function Md(t){var r=pr(),o=r.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var c=tn,p=c.baseQueue,x=o.pending;if(x!==null){if(p!==null){var N=p.next;p.next=x.next,x.next=N}c.baseQueue=p=x,o.pending=null}if(p!==null){x=p.next,c=c.baseState;var z=N=null,W=null,se=x;do{var ge=se.lane;if((lo&ge)===ge)W!==null&&(W=W.next={lane:0,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),c=se.hasEagerState?se.eagerState:t(c,se.action);else{var ye={lane:ge,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null};W===null?(z=W=ye,N=c):W=W.next=ye,Ht.lanes|=ge,uo|=ge}se=se.next}while(se!==null&&se!==x);W===null?N=c:W.next=z,Ut(c,r.memoizedState)||(Rn=!0),r.memoizedState=c,r.baseState=N,r.baseQueue=W,o.lastRenderedState=c}if(t=o.interleaved,t!==null){p=t;do x=p.lane,Ht.lanes|=x,uo|=x,p=p.next;while(p!==t)}else p===null&&(o.lanes=0);return[r.memoizedState,o.dispatch]}function Dd(t){var r=pr(),o=r.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var c=o.dispatch,p=o.pending,x=r.memoizedState;if(p!==null){o.pending=null;var N=p=p.next;do x=t(x,N.action),N=N.next;while(N!==p);Ut(x,r.memoizedState)||(Rn=!0),r.memoizedState=x,r.baseQueue===null&&(r.baseState=x),o.lastRenderedState=x}return[x,c]}function pp(){}function mp(t,r){var o=Ht,c=pr(),p=r(),x=!Ut(c.memoizedState,p);if(x&&(c.memoizedState=p,Rn=!0),c=c.queue,Id(vp.bind(null,o,c,t),[t]),c.getSnapshot!==r||x||sn!==null&&sn.memoizedState.tag&1){if(o.flags|=2048,hl(9,yp.bind(null,o,c,p,r),void 0,null),on===null)throw Error(i(349));(lo&30)!==0||gp(o,r,p)}return p}function gp(t,r,o){t.flags|=16384,t={getSnapshot:r,value:o},r=Ht.updateQueue,r===null?(r={lastEffect:null,stores:null},Ht.updateQueue=r,r.stores=[t]):(o=r.stores,o===null?r.stores=[t]:o.push(t))}function yp(t,r,o,c){r.value=o,r.getSnapshot=c,xp(r)&&wp(t)}function vp(t,r,o){return o(function(){xp(r)&&wp(t)})}function xp(t){var r=t.getSnapshot;t=t.value;try{var o=r();return!Ut(t,o)}catch{return!0}}function wp(t){var r=Si(t,1);r!==null&&jr(r,t,1,-1)}function kp(t){var r=Kr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:t},r.queue=t,t=t.dispatch=Lv.bind(null,Ht,t),[r.memoizedState,t]}function hl(t,r,o,c){return t={tag:t,create:r,destroy:o,deps:c,next:null},r=Ht.updateQueue,r===null?(r={lastEffect:null,stores:null},Ht.updateQueue=r,r.lastEffect=t.next=t):(o=r.lastEffect,o===null?r.lastEffect=t.next=t:(c=o.next,o.next=t,t.next=c,r.lastEffect=t)),t}function Sp(){return pr().memoizedState}function Uu(t,r,o,c){var p=Kr();Ht.flags|=t,p.memoizedState=hl(1|r,o,void 0,c===void 0?null:c)}function Vu(t,r,o,c){var p=pr();c=c===void 0?null:c;var x=void 0;if(tn!==null){var N=tn.memoizedState;if(x=N.destroy,c!==null&&Td(c,N.deps)){p.memoizedState=hl(r,o,x,c);return}}Ht.flags|=t,p.memoizedState=hl(1|r,o,x,c)}function bp(t,r){return Uu(8390656,8,t,r)}function Id(t,r){return Vu(2048,8,t,r)}function Ep(t,r){return Vu(4,2,t,r)}function Cp(t,r){return Vu(4,4,t,r)}function Tp(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Np(t,r,o){return o=o!=null?o.concat([t]):null,Vu(4,4,Tp.bind(null,r,t),o)}function jd(){}function Op(t,r){var o=pr();r=r===void 0?null:r;var c=o.memoizedState;return c!==null&&r!==null&&Td(r,c[1])?c[0]:(o.memoizedState=[t,r],t)}function Mp(t,r){var o=pr();r=r===void 0?null:r;var c=o.memoizedState;return c!==null&&r!==null&&Td(r,c[1])?c[0]:(t=t(),o.memoizedState=[t,r],t)}function Dp(t,r,o){return(lo&21)===0?(t.baseState&&(t.baseState=!1,Rn=!0),t.memoizedState=o):(Ut(o,r)||(o=_a(),Ht.lanes|=o,uo|=o,t.baseState=!0),r)}function _v(t,r){var o=vt;vt=o!==0&&4>o?o:4,t(!0);var c=Cd.transition;Cd.transition={};try{t(!1),r()}finally{vt=o,Cd.transition=c}}function Ip(){return pr().memoizedState}function Pv(t,r,o){var c=hs(t);if(o={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null},jp(t))Rp(r,o);else if(o=up(t,r,o,c),o!==null){var p=Nn();jr(o,t,c,p),_p(o,r,c)}}function Lv(t,r,o){var c=hs(t),p={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null};if(jp(t))Rp(r,p);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=r.lastRenderedReducer,x!==null))try{var N=r.lastRenderedState,z=x(N,o);if(p.hasEagerState=!0,p.eagerState=z,Ut(z,N)){var W=r.interleaved;W===null?(p.next=p,xd(r)):(p.next=W.next,W.next=p),r.interleaved=p;return}}catch{}finally{}o=up(t,r,p,c),o!==null&&(p=Nn(),jr(o,t,c,p),_p(o,r,c))}}function jp(t){var r=t.alternate;return t===Ht||r!==null&&r===Ht}function Rp(t,r){cl=Au=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function _p(t,r,o){if((o&4194240)!==0){var c=r.lanes;c&=t.pendingLanes,o|=c,r.lanes=o,Ui(t,o)}}var Hu={readContext:hr,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},zv={readContext:hr,useCallback:function(t,r){return Kr().memoizedState=[t,r===void 0?null:r],t},useContext:hr,useEffect:bp,useImperativeHandle:function(t,r,o){return o=o!=null?o.concat([t]):null,Uu(4194308,4,Tp.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Uu(4194308,4,t,r)},useInsertionEffect:function(t,r){return Uu(4,2,t,r)},useMemo:function(t,r){var o=Kr();return r=r===void 0?null:r,t=t(),o.memoizedState=[t,r],t},useReducer:function(t,r,o){var c=Kr();return r=o!==void 0?o(r):r,c.memoizedState=c.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},c.queue=t,t=t.dispatch=Pv.bind(null,Ht,t),[c.memoizedState,t]},useRef:function(t){var r=Kr();return t={current:t},r.memoizedState=t},useState:kp,useDebugValue:jd,useDeferredValue:function(t){return Kr().memoizedState=t},useTransition:function(){var t=kp(!1),r=t[0];return t=_v.bind(null,t[1]),Kr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,o){var c=Ht,p=Kr();if(zt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=r(),on===null)throw Error(i(349));(lo&30)!==0||gp(c,r,o)}p.memoizedState=o;var x={value:o,getSnapshot:r};return p.queue=x,bp(vp.bind(null,c,x,t),[t]),c.flags|=2048,hl(9,yp.bind(null,c,x,o,r),void 0,null),o},useId:function(){var t=Kr(),r=on.identifierPrefix;if(zt){var o=ki,c=wi;o=(c&~(1<<32-nt(c)-1)).toString(32)+o,r=":"+r+"R"+o,o=dl++,0<o&&(r+="H"+o.toString(32)),r+=":"}else o=Rv++,r=":"+r+"r"+o.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},Fv={readContext:hr,useCallback:Op,useContext:hr,useEffect:Id,useImperativeHandle:Np,useInsertionEffect:Ep,useLayoutEffect:Cp,useMemo:Mp,useReducer:Md,useRef:Sp,useState:function(){return Md(fl)},useDebugValue:jd,useDeferredValue:function(t){var r=pr();return Dp(r,tn.memoizedState,t)},useTransition:function(){var t=Md(fl)[0],r=pr().memoizedState;return[t,r]},useMutableSource:pp,useSyncExternalStore:mp,useId:Ip,unstable_isNewReconciler:!1},Av={readContext:hr,useCallback:Op,useContext:hr,useEffect:Id,useImperativeHandle:Np,useInsertionEffect:Ep,useLayoutEffect:Cp,useMemo:Mp,useReducer:Dd,useRef:Sp,useState:function(){return Dd(fl)},useDebugValue:jd,useDeferredValue:function(t){var r=pr();return tn===null?r.memoizedState=t:Dp(r,tn.memoizedState,t)},useTransition:function(){var t=Dd(fl)[0],r=pr().memoizedState;return[t,r]},useMutableSource:pp,useSyncExternalStore:mp,useId:Ip,unstable_isNewReconciler:!1};function Mr(t,r){if(t&&t.defaultProps){r=j({},r),t=t.defaultProps;for(var o in t)r[o]===void 0&&(r[o]=t[o]);return r}return r}function Rd(t,r,o,c){r=t.memoizedState,o=o(c,r),o=o==null?r:j({},r,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var $u={isMounted:function(t){return(t=t._reactInternals)?Me(t)===t:!1},enqueueSetState:function(t,r,o){t=t._reactInternals;var c=Nn(),p=hs(t),x=bi(c,p);x.payload=r,o!=null&&(x.callback=o),r=us(t,x,p),r!==null&&(jr(r,t,p,c),Pu(r,t,p))},enqueueReplaceState:function(t,r,o){t=t._reactInternals;var c=Nn(),p=hs(t),x=bi(c,p);x.tag=1,x.payload=r,o!=null&&(x.callback=o),r=us(t,x,p),r!==null&&(jr(r,t,p,c),Pu(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var o=Nn(),c=hs(t),p=bi(o,c);p.tag=2,r!=null&&(p.callback=r),r=us(t,p,c),r!==null&&(jr(r,t,c,o),Pu(r,t,c))}};function Pp(t,r,o,c,p,x,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,x,N):r.prototype&&r.prototype.isPureReactComponent?!Qi(o,c)||!Qi(p,x):!0}function Lp(t,r,o){var c=!1,p=Qr,x=r.contextType;return typeof x=="object"&&x!==null?x=hr(x):(p=jn(r)?ro:fn.current,c=r.contextTypes,x=(c=c!=null)?Ko(t,p):Qr),r=new r(o,x),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=$u,t.stateNode=r,r._reactInternals=t,c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=x),r}function zp(t,r,o,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,c),r.state!==t&&$u.enqueueReplaceState(r,r.state,null)}function _d(t,r,o,c){var p=t.stateNode;p.props=o,p.state=t.memoizedState,p.refs={},wd(t);var x=r.contextType;typeof x=="object"&&x!==null?p.context=hr(x):(x=jn(r)?ro:fn.current,p.context=Ko(t,x)),p.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Rd(t,r,x,o),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&$u.enqueueReplaceState(p,p.state,null),Lu(t,o,p,c),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function oa(t,r){try{var o="",c=r;do o+=Ae(c),c=c.return;while(c);var p=o}catch(x){p=`
|
|
39
|
-
Error generating stack: `+x.message+`
|
|
40
|
-
`+x.stack}return{value:t,source:r,stack:p,digest:null}}function Pd(t,r,o){return{value:t,source:null,stack:o??null,digest:r??null}}function Ld(t,r){try{console.error(r.value)}catch(o){setTimeout(function(){throw o})}}var Uv=typeof WeakMap=="function"?WeakMap:Map;function Fp(t,r,o){o=bi(-1,o),o.tag=3,o.payload={element:null};var c=r.value;return o.callback=function(){Qu||(Qu=!0,Gd=c),Ld(t,r)},o}function Ap(t,r,o){o=bi(-1,o),o.tag=3;var c=t.type.getDerivedStateFromError;if(typeof c=="function"){var p=r.value;o.payload=function(){return c(p)},o.callback=function(){Ld(t,r)}}var x=t.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(o.callback=function(){Ld(t,r),typeof c!="function"&&(ds===null?ds=new Set([this]):ds.add(this));var N=r.stack;this.componentDidCatch(r.value,{componentStack:N!==null?N:""})}),o}function Up(t,r,o){var c=t.pingCache;if(c===null){c=t.pingCache=new Uv;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(o)||(p.add(o),t=ex.bind(null,t,r,o),r.then(t,t))}function Vp(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function Hp(t,r,o,c,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(r=bi(-1,1),r.tag=2,us(o,r,1))),o.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var Vv=V.ReactCurrentOwner,Rn=!1;function Tn(t,r,o,c){r.child=t===null?lp(r,null,o,c):na(r,t.child,o,c)}function $p(t,r,o,c,p){o=o.render;var x=r.ref;return ia(r,p),c=Nd(t,r,o,c,x,p),o=Od(),t!==null&&!Rn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ei(t,r,p)):(zt&&o&&cd(r),r.flags|=1,Tn(t,r,c,p),r.child)}function Wp(t,r,o,c,p){if(t===null){var x=o.type;return typeof x=="function"&&!sf(x)&&x.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(r.tag=15,r.type=x,Bp(t,r,x,c,p)):(t=nc(o.type,null,c,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(x=t.child,(t.lanes&p)===0){var N=x.memoizedProps;if(o=o.compare,o=o!==null?o:Qi,o(N,c)&&t.ref===r.ref)return Ei(t,r,p)}return r.flags|=1,t=ms(x,c),t.ref=r.ref,t.return=r,r.child=t}function Bp(t,r,o,c,p){if(t!==null){var x=t.memoizedProps;if(Qi(x,c)&&t.ref===r.ref)if(Rn=!1,r.pendingProps=c=x,(t.lanes&p)!==0)(t.flags&131072)!==0&&(Rn=!0);else return r.lanes=t.lanes,Ei(t,r,p)}return zd(t,r,o,c,p)}function qp(t,r,o){var c=r.pendingProps,p=c.children,x=t!==null?t.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},xt(la,Zn),Zn|=o;else{if((o&1073741824)===0)return t=x!==null?x.baseLanes|o:o,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,xt(la,Zn),Zn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=x!==null?x.baseLanes:o,xt(la,Zn),Zn|=c}else x!==null?(c=x.baseLanes|o,r.memoizedState=null):c=o,xt(la,Zn),Zn|=c;return Tn(t,r,p,o),r.child}function Yp(t,r){var o=r.ref;(t===null&&o!==null||t!==null&&t.ref!==o)&&(r.flags|=512,r.flags|=2097152)}function zd(t,r,o,c,p){var x=jn(o)?ro:fn.current;return x=Ko(r,x),ia(r,p),o=Nd(t,r,o,c,x,p),c=Od(),t!==null&&!Rn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ei(t,r,p)):(zt&&c&&cd(r),r.flags|=1,Tn(t,r,o,p),r.child)}function Xp(t,r,o,c,p){if(jn(o)){var x=!0;Nu(r)}else x=!1;if(ia(r,p),r.stateNode===null)Bu(t,r),Lp(r,o,c),_d(r,o,c,p),c=!0;else if(t===null){var N=r.stateNode,z=r.memoizedProps;N.props=z;var W=N.context,se=o.contextType;typeof se=="object"&&se!==null?se=hr(se):(se=jn(o)?ro:fn.current,se=Ko(r,se));var ge=o.getDerivedStateFromProps,ye=typeof ge=="function"||typeof N.getSnapshotBeforeUpdate=="function";ye||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(z!==c||W!==se)&&zp(r,N,c,se),ls=!1;var he=r.memoizedState;N.state=he,Lu(r,c,N,p),W=r.memoizedState,z!==c||he!==W||In.current||ls?(typeof ge=="function"&&(Rd(r,o,ge,c),W=r.memoizedState),(z=ls||Pp(r,o,z,c,he,W,se))?(ye||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(r.flags|=4194308)):(typeof N.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=W),N.props=c,N.state=W,N.context=se,c=z):(typeof N.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{N=r.stateNode,cp(t,r),z=r.memoizedProps,se=r.type===r.elementType?z:Mr(r.type,z),N.props=se,ye=r.pendingProps,he=N.context,W=o.contextType,typeof W=="object"&&W!==null?W=hr(W):(W=jn(o)?ro:fn.current,W=Ko(r,W));var Oe=o.getDerivedStateFromProps;(ge=typeof Oe=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(z!==ye||he!==W)&&zp(r,N,c,W),ls=!1,he=r.memoizedState,N.state=he,Lu(r,c,N,p);var _e=r.memoizedState;z!==ye||he!==_e||In.current||ls?(typeof Oe=="function"&&(Rd(r,o,Oe,c),_e=r.memoizedState),(se=ls||Pp(r,o,se,c,he,_e,W)||!1)?(ge||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(c,_e,W),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(c,_e,W)),typeof N.componentDidUpdate=="function"&&(r.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof N.componentDidUpdate!="function"||z===t.memoizedProps&&he===t.memoizedState||(r.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||z===t.memoizedProps&&he===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=_e),N.props=c,N.state=_e,N.context=W,c=se):(typeof N.componentDidUpdate!="function"||z===t.memoizedProps&&he===t.memoizedState||(r.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||z===t.memoizedProps&&he===t.memoizedState||(r.flags|=1024),c=!1)}return Fd(t,r,o,c,x,p)}function Fd(t,r,o,c,p,x){Yp(t,r);var N=(r.flags&128)!==0;if(!c&&!N)return p&&Jh(r,o,!1),Ei(t,r,x);c=r.stateNode,Vv.current=r;var z=N&&typeof o.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,t!==null&&N?(r.child=na(r,t.child,null,x),r.child=na(r,null,z,x)):Tn(t,r,z,x),r.memoizedState=c.state,p&&Jh(r,o,!0),r.child}function Zp(t){var r=t.stateNode;r.pendingContext?Gh(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Gh(t,r.context,!1),kd(t,r.containerInfo)}function Qp(t,r,o,c,p){return ta(),pd(p),r.flags|=256,Tn(t,r,o,c),r.child}var Ad={dehydrated:null,treeContext:null,retryLane:0};function Ud(t){return{baseLanes:t,cachePool:null,transitions:null}}function Gp(t,r,o){var c=r.pendingProps,p=Vt.current,x=!1,N=(r.flags&128)!==0,z;if((z=N)||(z=t!==null&&t.memoizedState===null?!1:(p&2)!==0),z?(x=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),xt(Vt,p&1),t===null)return hd(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(N=c.children,t=c.fallback,x?(c=r.mode,x=r.child,N={mode:"hidden",children:N},(c&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=N):x=rc(N,c,0,null),t=po(t,c,o,null),x.return=r,t.return=r,x.sibling=t,r.child=x,r.child.memoizedState=Ud(o),r.memoizedState=Ad,t):Vd(r,N));if(p=t.memoizedState,p!==null&&(z=p.dehydrated,z!==null))return Hv(t,r,N,c,z,p,o);if(x){x=c.fallback,N=r.mode,p=t.child,z=p.sibling;var W={mode:"hidden",children:c.children};return(N&1)===0&&r.child!==p?(c=r.child,c.childLanes=0,c.pendingProps=W,r.deletions=null):(c=ms(p,W),c.subtreeFlags=p.subtreeFlags&14680064),z!==null?x=ms(z,x):(x=po(x,N,o,null),x.flags|=2),x.return=r,c.return=r,c.sibling=x,r.child=c,c=x,x=r.child,N=t.child.memoizedState,N=N===null?Ud(o):{baseLanes:N.baseLanes|o,cachePool:null,transitions:N.transitions},x.memoizedState=N,x.childLanes=t.childLanes&~o,r.memoizedState=Ad,c}return x=t.child,t=x.sibling,c=ms(x,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=o),c.return=r,c.sibling=null,t!==null&&(o=r.deletions,o===null?(r.deletions=[t],r.flags|=16):o.push(t)),r.child=c,r.memoizedState=null,c}function Vd(t,r){return r=rc({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function Wu(t,r,o,c){return c!==null&&pd(c),na(r,t.child,null,o),t=Vd(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Hv(t,r,o,c,p,x,N){if(o)return r.flags&256?(r.flags&=-257,c=Pd(Error(i(422))),Wu(t,r,N,c)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(x=c.fallback,p=r.mode,c=rc({mode:"visible",children:c.children},p,0,null),x=po(x,p,N,null),x.flags|=2,c.return=r,x.return=r,c.sibling=x,r.child=c,(r.mode&1)!==0&&na(r,t.child,null,N),r.child.memoizedState=Ud(N),r.memoizedState=Ad,x);if((r.mode&1)===0)return Wu(t,r,N,null);if(p.data==="$!"){if(c=p.nextSibling&&p.nextSibling.dataset,c)var z=c.dgst;return c=z,x=Error(i(419)),c=Pd(x,c,void 0),Wu(t,r,N,c)}if(z=(N&t.childLanes)!==0,Rn||z){if(c=on,c!==null){switch(N&-N){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(c.suspendedLanes|N))!==0?0:p,p!==0&&p!==x.retryLane&&(x.retryLane=p,Si(t,p),jr(c,t,p,-1))}return rf(),c=Pd(Error(i(421))),Wu(t,r,N,c)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=tx.bind(null,t),p._reactRetry=r,null):(t=x.treeContext,Xn=me(p.nextSibling),Yn=r,zt=!0,Or=null,t!==null&&(dr[fr++]=wi,dr[fr++]=ki,dr[fr++]=io,wi=t.id,ki=t.overflow,io=r),r=Vd(r,c.children),r.flags|=4096,r)}function Kp(t,r,o){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),vd(t.return,r,o)}function Hd(t,r,o,c,p){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p}:(x.isBackwards=r,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=o,x.tailMode=p)}function Jp(t,r,o){var c=r.pendingProps,p=c.revealOrder,x=c.tail;if(Tn(t,r,c.children,o),c=Vt.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Kp(t,o,r);else if(t.tag===19)Kp(t,o,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}if(xt(Vt,c),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(o=r.child,p=null;o!==null;)t=o.alternate,t!==null&&zu(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=r.child,r.child=null):(p=o.sibling,o.sibling=null),Hd(r,!1,p,o,x);break;case"backwards":for(o=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&zu(t)===null){r.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}Hd(r,!0,o,null,x);break;case"together":Hd(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Bu(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Ei(t,r,o){if(t!==null&&(r.dependencies=t.dependencies),uo|=r.lanes,(o&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,o=ms(t,t.pendingProps),r.child=o,o.return=r;t.sibling!==null;)t=t.sibling,o=o.sibling=ms(t,t.pendingProps),o.return=r;o.sibling=null}return r.child}function $v(t,r,o){switch(r.tag){case 3:Zp(r),ta();break;case 5:hp(r);break;case 1:jn(r.type)&&Nu(r);break;case 4:kd(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,p=r.memoizedProps.value;xt(Ru,c._currentValue),c._currentValue=p;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(xt(Vt,Vt.current&1),r.flags|=128,null):(o&r.child.childLanes)!==0?Gp(t,r,o):(xt(Vt,Vt.current&1),t=Ei(t,r,o),t!==null?t.sibling:null);xt(Vt,Vt.current&1);break;case 19:if(c=(o&r.childLanes)!==0,(t.flags&128)!==0){if(c)return Jp(t,r,o);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),xt(Vt,Vt.current),c)break;return null;case 22:case 23:return r.lanes=0,qp(t,r,o)}return Ei(t,r,o)}var em,$d,tm,nm;em=function(t,r){for(var o=r.child;o!==null;){if(o.tag===5||o.tag===6)t.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},$d=function(){},tm=function(t,r,o,c){var p=t.memoizedProps;if(p!==c){t=r.stateNode,ao(Gr.current);var x=null;switch(o){case"input":p=zr(t,p),c=zr(t,c),x=[];break;case"select":p=j({},p,{value:void 0}),c=j({},c,{value:void 0}),x=[];break;case"textarea":p=ai(t,p),c=ai(t,c),x=[];break;default:typeof p.onClick!="function"&&typeof c.onClick=="function"&&(t.onclick=Go)}Pt(o,c);var N;o=null;for(se in p)if(!c.hasOwnProperty(se)&&p.hasOwnProperty(se)&&p[se]!=null)if(se==="style"){var z=p[se];for(N in z)z.hasOwnProperty(N)&&(o||(o={}),o[N]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(a.hasOwnProperty(se)?x||(x=[]):(x=x||[]).push(se,null));for(se in c){var W=c[se];if(z=p!=null?p[se]:void 0,c.hasOwnProperty(se)&&W!==z&&(W!=null||z!=null))if(se==="style")if(z){for(N in z)!z.hasOwnProperty(N)||W&&W.hasOwnProperty(N)||(o||(o={}),o[N]="");for(N in W)W.hasOwnProperty(N)&&z[N]!==W[N]&&(o||(o={}),o[N]=W[N])}else o||(x||(x=[]),x.push(se,o)),o=W;else se==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,z=z?z.__html:void 0,W!=null&&z!==W&&(x=x||[]).push(se,W)):se==="children"?typeof W!="string"&&typeof W!="number"||(x=x||[]).push(se,""+W):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(a.hasOwnProperty(se)?(W!=null&&se==="onScroll"&&Mt("scroll",t),x||z===W||(x=[])):(x=x||[]).push(se,W))}o&&(x=x||[]).push("style",o);var se=x;(r.updateQueue=se)&&(r.flags|=4)}},nm=function(t,r,o,c){o!==c&&(r.flags|=4)};function pl(t,r){if(!zt)switch(t.tailMode){case"hidden":r=t.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function pn(t){var r=t.alternate!==null&&t.alternate.child===t.child,o=0,c=0;if(r)for(var p=t.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&14680064,c|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=o,r}function Wv(t,r,o){var c=r.pendingProps;switch(dd(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pn(r),null;case 1:return jn(r.type)&&Tu(),pn(r),null;case 3:return c=r.stateNode,sa(),St(In),St(fn),Ed(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(t===null||t.child===null)&&(Iu(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Or!==null&&(ef(Or),Or=null))),$d(t,r),pn(r),null;case 5:Sd(r);var p=ao(ul.current);if(o=r.type,t!==null&&r.stateNode!=null)tm(t,r,o,c,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(i(166));return pn(r),null}if(t=ao(Gr.current),Iu(r)){c=r.stateNode,o=r.type;var x=r.memoizedProps;switch(c[dt]=r,c[$e]=x,t=(r.mode&1)!==0,o){case"dialog":Mt("cancel",c),Mt("close",c);break;case"iframe":case"object":case"embed":Mt("load",c);break;case"video":case"audio":for(p=0;p<yi.length;p++)Mt(yi[p],c);break;case"source":Mt("error",c);break;case"img":case"image":case"link":Mt("error",c),Mt("load",c);break;case"details":Mt("toggle",c);break;case"input":Hn(c,x),Mt("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!x.multiple},Mt("invalid",c);break;case"textarea":Ri(c,x),Mt("invalid",c)}Pt(o,x),p=null;for(var N in x)if(x.hasOwnProperty(N)){var z=x[N];N==="children"?typeof z=="string"?c.textContent!==z&&(x.suppressHydrationWarning!==!0&&Xr(c.textContent,z,t),p=["children",z]):typeof z=="number"&&c.textContent!==""+z&&(x.suppressHydrationWarning!==!0&&Xr(c.textContent,z,t),p=["children",""+z]):a.hasOwnProperty(N)&&z!=null&&N==="onScroll"&&Mt("scroll",c)}switch(o){case"input":vn(c),oi(c,x,!0);break;case"textarea":vn(c),wn(c);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(c.onclick=Go)}c=p,r.updateQueue=c,c!==null&&(r.flags|=4)}else{N=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=de(o)),t==="http://www.w3.org/1999/xhtml"?o==="script"?(t=N.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof c.is=="string"?t=N.createElement(o,{is:c.is}):(t=N.createElement(o),o==="select"&&(N=t,c.multiple?N.multiple=!0:c.size&&(N.size=c.size))):t=N.createElementNS(t,o),t[dt]=r,t[$e]=c,em(t,r,!1,!1),r.stateNode=t;e:{switch(N=Sn(o,c),o){case"dialog":Mt("cancel",t),Mt("close",t),p=c;break;case"iframe":case"object":case"embed":Mt("load",t),p=c;break;case"video":case"audio":for(p=0;p<yi.length;p++)Mt(yi[p],t);p=c;break;case"source":Mt("error",t),p=c;break;case"img":case"image":case"link":Mt("error",t),Mt("load",t),p=c;break;case"details":Mt("toggle",t),p=c;break;case"input":Hn(t,c),p=zr(t,c),Mt("invalid",t);break;case"option":p=c;break;case"select":t._wrapperState={wasMultiple:!!c.multiple},p=j({},c,{value:void 0}),Mt("invalid",t);break;case"textarea":Ri(t,c),p=ai(t,c),Mt("invalid",t);break;default:p=c}Pt(o,p),z=p;for(x in z)if(z.hasOwnProperty(x)){var W=z[x];x==="style"?Dn(t,W):x==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,W!=null&&Xe(t,W)):x==="children"?typeof W=="string"?(o!=="textarea"||W!=="")&<(t,W):typeof W=="number"&<(t,""+W):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(a.hasOwnProperty(x)?W!=null&&x==="onScroll"&&Mt("scroll",t):W!=null&&R(t,x,W,N))}switch(o){case"input":vn(t),oi(t,c,!1);break;case"textarea":vn(t),wn(t);break;case"option":c.value!=null&&t.setAttribute("value",""+Qe(c.value));break;case"select":t.multiple=!!c.multiple,x=c.value,x!=null?rr(t,!!c.multiple,x,!1):c.defaultValue!=null&&rr(t,!!c.multiple,c.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Go)}switch(o){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return pn(r),null;case 6:if(t&&r.stateNode!=null)nm(t,r,t.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(i(166));if(o=ao(ul.current),ao(Gr.current),Iu(r)){if(c=r.stateNode,o=r.memoizedProps,c[dt]=r,(x=c.nodeValue!==o)&&(t=Yn,t!==null))switch(t.tag){case 3:Xr(c.nodeValue,o,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Xr(c.nodeValue,o,(t.mode&1)!==0)}x&&(r.flags|=4)}else c=(o.nodeType===9?o:o.ownerDocument).createTextNode(c),c[dt]=r,r.stateNode=c}return pn(r),null;case 13:if(St(Vt),c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(zt&&Xn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)sp(),ta(),r.flags|=98560,x=!1;else if(x=Iu(r),c!==null&&c.dehydrated!==null){if(t===null){if(!x)throw Error(i(318));if(x=r.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[dt]=r}else ta(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;pn(r),x=!1}else Or!==null&&(ef(Or),Or=null),x=!0;if(!x)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=o,r):(c=c!==null,c!==(t!==null&&t.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(Vt.current&1)!==0?nn===0&&(nn=3):rf())),r.updateQueue!==null&&(r.flags|=4),pn(r),null);case 4:return sa(),$d(t,r),t===null&&Gs(r.stateNode.containerInfo),pn(r),null;case 10:return yd(r.type._context),pn(r),null;case 17:return jn(r.type)&&Tu(),pn(r),null;case 19:if(St(Vt),x=r.memoizedState,x===null)return pn(r),null;if(c=(r.flags&128)!==0,N=x.rendering,N===null)if(c)pl(x,!1);else{if(nn!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(N=zu(t),N!==null){for(r.flags|=128,pl(x,!1),c=N.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=o,o=r.child;o!==null;)x=o,t=c,x.flags&=14680066,N=x.alternate,N===null?(x.childLanes=0,x.lanes=t,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=N.childLanes,x.lanes=N.lanes,x.child=N.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=N.memoizedProps,x.memoizedState=N.memoizedState,x.updateQueue=N.updateQueue,x.type=N.type,t=N.dependencies,x.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),o=o.sibling;return xt(Vt,Vt.current&1|2),r.child}t=t.sibling}x.tail!==null&&pt()>ua&&(r.flags|=128,c=!0,pl(x,!1),r.lanes=4194304)}else{if(!c)if(t=zu(N),t!==null){if(r.flags|=128,c=!0,o=t.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),pl(x,!0),x.tail===null&&x.tailMode==="hidden"&&!N.alternate&&!zt)return pn(r),null}else 2*pt()-x.renderingStartTime>ua&&o!==1073741824&&(r.flags|=128,c=!0,pl(x,!1),r.lanes=4194304);x.isBackwards?(N.sibling=r.child,r.child=N):(o=x.last,o!==null?o.sibling=N:r.child=N,x.last=N)}return x.tail!==null?(r=x.tail,x.rendering=r,x.tail=r.sibling,x.renderingStartTime=pt(),r.sibling=null,o=Vt.current,xt(Vt,c?o&1|2:o&1),r):(pn(r),null);case 22:case 23:return nf(),c=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(Zn&1073741824)!==0&&(pn(r),r.subtreeFlags&6&&(r.flags|=8192)):pn(r),null;case 24:return null;case 25:return null}throw Error(i(156,r.tag))}function Bv(t,r){switch(dd(r),r.tag){case 1:return jn(r.type)&&Tu(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return sa(),St(In),St(fn),Ed(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Sd(r),null;case 13:if(St(Vt),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));ta()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return St(Vt),null;case 4:return sa(),null;case 10:return yd(r.type._context),null;case 22:case 23:return nf(),null;case 24:return null;default:return null}}var qu=!1,mn=!1,qv=typeof WeakSet=="function"?WeakSet:Set,je=null;function aa(t,r){var o=t.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(c){Yt(t,r,c)}else o.current=null}function Wd(t,r,o){try{o()}catch(c){Yt(t,r,c)}}var rm=!1;function Yv(t,r){if(k=Er,t=bu(),Za(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{o.nodeType,x.nodeType}catch{o=null;break e}var N=0,z=-1,W=-1,se=0,ge=0,ye=t,he=null;t:for(;;){for(var Oe;ye!==o||p!==0&&ye.nodeType!==3||(z=N+p),ye!==x||c!==0&&ye.nodeType!==3||(W=N+c),ye.nodeType===3&&(N+=ye.nodeValue.length),(Oe=ye.firstChild)!==null;)he=ye,ye=Oe;for(;;){if(ye===t)break t;if(he===o&&++se===p&&(z=N),he===x&&++ge===c&&(W=N),(Oe=ye.nextSibling)!==null)break;ye=he,he=ye.parentNode}ye=Oe}o=z===-1||W===-1?null:{start:z,end:W}}else o=null}o=o||{start:0,end:0}}else o=null;for(u={focusedElem:t,selectionRange:o},Er=!1,je=r;je!==null;)if(r=je,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,je=t;else for(;je!==null;){r=je;try{var _e=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Le=_e.memoizedProps,Zt=_e.memoizedState,te=r.stateNode,Z=te.getSnapshotBeforeUpdate(r.elementType===r.type?Le:Mr(r.type,Le),Zt);te.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:var re=r.stateNode.containerInfo;re.nodeType===1?re.textContent="":re.nodeType===9&&re.documentElement&&re.removeChild(re.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(be){Yt(r,r.return,be)}if(t=r.sibling,t!==null){t.return=r.return,je=t;break}je=r.return}return _e=rm,rm=!1,_e}function ml(t,r,o){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&t)===t){var x=p.destroy;p.destroy=void 0,x!==void 0&&Wd(r,o,x)}p=p.next}while(p!==c)}}function Yu(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var c=o.create;o.destroy=c()}o=o.next}while(o!==r)}}function Bd(t){var r=t.ref;if(r!==null){var o=t.stateNode;switch(t.tag){case 5:t=o;break;default:t=o}typeof r=="function"?r(t):r.current=t}}function im(t){var r=t.alternate;r!==null&&(t.alternate=null,im(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[dt],delete r[$e],delete r[Cn],delete r[cr],delete r[rs])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function sm(t){return t.tag===5||t.tag===3||t.tag===4}function om(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||sm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qd(t,r,o){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(t,r):o.insertBefore(t,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(t,o)):(r=o,r.appendChild(t)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Go));else if(c!==4&&(t=t.child,t!==null))for(qd(t,r,o),t=t.sibling;t!==null;)qd(t,r,o),t=t.sibling}function Yd(t,r,o){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?o.insertBefore(t,r):o.appendChild(t);else if(c!==4&&(t=t.child,t!==null))for(Yd(t,r,o),t=t.sibling;t!==null;)Yd(t,r,o),t=t.sibling}var cn=null,Dr=!1;function cs(t,r,o){for(o=o.child;o!==null;)am(t,r,o),o=o.sibling}function am(t,r,o){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Tt,o)}catch{}switch(o.tag){case 5:mn||aa(o,r);case 6:var c=cn,p=Dr;cn=null,cs(t,r,o),cn=c,Dr=p,cn!==null&&(Dr?(t=cn,o=o.stateNode,t.nodeType===8?t.parentNode.removeChild(o):t.removeChild(o)):cn.removeChild(o.stateNode));break;case 18:cn!==null&&(Dr?(t=cn,o=o.stateNode,t.nodeType===8?ee(t.parentNode,o):t.nodeType===1&&ee(t,o),qt(t)):ee(cn,o.stateNode));break;case 4:c=cn,p=Dr,cn=o.stateNode.containerInfo,Dr=!0,cs(t,r,o),cn=c,Dr=p;break;case 0:case 11:case 14:case 15:if(!mn&&(c=o.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){p=c=c.next;do{var x=p,N=x.destroy;x=x.tag,N!==void 0&&((x&2)!==0||(x&4)!==0)&&Wd(o,r,N),p=p.next}while(p!==c)}cs(t,r,o);break;case 1:if(!mn&&(aa(o,r),c=o.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=o.memoizedProps,c.state=o.memoizedState,c.componentWillUnmount()}catch(z){Yt(o,r,z)}cs(t,r,o);break;case 21:cs(t,r,o);break;case 22:o.mode&1?(mn=(c=mn)||o.memoizedState!==null,cs(t,r,o),mn=c):cs(t,r,o);break;default:cs(t,r,o)}}function lm(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var o=t.stateNode;o===null&&(o=t.stateNode=new qv),r.forEach(function(c){var p=nx.bind(null,t,c);o.has(c)||(o.add(c),c.then(p,p))})}}function Ir(t,r){var o=r.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c];try{var x=t,N=r,z=N;e:for(;z!==null;){switch(z.tag){case 5:cn=z.stateNode,Dr=!1;break e;case 3:cn=z.stateNode.containerInfo,Dr=!0;break e;case 4:cn=z.stateNode.containerInfo,Dr=!0;break e}z=z.return}if(cn===null)throw Error(i(160));am(x,N,p),cn=null,Dr=!1;var W=p.alternate;W!==null&&(W.return=null),p.return=null}catch(se){Yt(p,r,se)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)um(r,t),r=r.sibling}function um(t,r){var o=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ir(r,t),Jr(t),c&4){try{ml(3,t,t.return),Yu(3,t)}catch(Le){Yt(t,t.return,Le)}try{ml(5,t,t.return)}catch(Le){Yt(t,t.return,Le)}}break;case 1:Ir(r,t),Jr(t),c&512&&o!==null&&aa(o,o.return);break;case 5:if(Ir(r,t),Jr(t),c&512&&o!==null&&aa(o,o.return),t.flags&32){var p=t.stateNode;try{lt(p,"")}catch(Le){Yt(t,t.return,Le)}}if(c&4&&(p=t.stateNode,p!=null)){var x=t.memoizedProps,N=o!==null?o.memoizedProps:x,z=t.type,W=t.updateQueue;if(t.updateQueue=null,W!==null)try{z==="input"&&x.type==="radio"&&x.name!=null&&xn(p,x),Sn(z,N);var se=Sn(z,x);for(N=0;N<W.length;N+=2){var ge=W[N],ye=W[N+1];ge==="style"?Dn(p,ye):ge==="dangerouslySetInnerHTML"?Xe(p,ye):ge==="children"?lt(p,ye):R(p,ge,ye,se)}switch(z){case"input":tr(p,x);break;case"textarea":Mn(p,x);break;case"select":var he=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!x.multiple;var Oe=x.value;Oe!=null?rr(p,!!x.multiple,Oe,!1):he!==!!x.multiple&&(x.defaultValue!=null?rr(p,!!x.multiple,x.defaultValue,!0):rr(p,!!x.multiple,x.multiple?[]:"",!1))}p[$e]=x}catch(Le){Yt(t,t.return,Le)}}break;case 6:if(Ir(r,t),Jr(t),c&4){if(t.stateNode===null)throw Error(i(162));p=t.stateNode,x=t.memoizedProps;try{p.nodeValue=x}catch(Le){Yt(t,t.return,Le)}}break;case 3:if(Ir(r,t),Jr(t),c&4&&o!==null&&o.memoizedState.isDehydrated)try{qt(r.containerInfo)}catch(Le){Yt(t,t.return,Le)}break;case 4:Ir(r,t),Jr(t);break;case 13:Ir(r,t),Jr(t),p=t.child,p.flags&8192&&(x=p.memoizedState!==null,p.stateNode.isHidden=x,!x||p.alternate!==null&&p.alternate.memoizedState!==null||(Qd=pt())),c&4&&lm(t);break;case 22:if(ge=o!==null&&o.memoizedState!==null,t.mode&1?(mn=(se=mn)||ge,Ir(r,t),mn=se):Ir(r,t),Jr(t),c&8192){if(se=t.memoizedState!==null,(t.stateNode.isHidden=se)&&!ge&&(t.mode&1)!==0)for(je=t,ge=t.child;ge!==null;){for(ye=je=ge;je!==null;){switch(he=je,Oe=he.child,he.tag){case 0:case 11:case 14:case 15:ml(4,he,he.return);break;case 1:aa(he,he.return);var _e=he.stateNode;if(typeof _e.componentWillUnmount=="function"){c=he,o=he.return;try{r=c,_e.props=r.memoizedProps,_e.state=r.memoizedState,_e.componentWillUnmount()}catch(Le){Yt(c,o,Le)}}break;case 5:aa(he,he.return);break;case 22:if(he.memoizedState!==null){fm(ye);continue}}Oe!==null?(Oe.return=he,je=Oe):fm(ye)}ge=ge.sibling}e:for(ge=null,ye=t;;){if(ye.tag===5){if(ge===null){ge=ye;try{p=ye.stateNode,se?(x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(z=ye.stateNode,W=ye.memoizedProps.style,N=W!=null&&W.hasOwnProperty("display")?W.display:null,z.style.display=ut("display",N))}catch(Le){Yt(t,t.return,Le)}}}else if(ye.tag===6){if(ge===null)try{ye.stateNode.nodeValue=se?"":ye.memoizedProps}catch(Le){Yt(t,t.return,Le)}}else if((ye.tag!==22&&ye.tag!==23||ye.memoizedState===null||ye===t)&&ye.child!==null){ye.child.return=ye,ye=ye.child;continue}if(ye===t)break e;for(;ye.sibling===null;){if(ye.return===null||ye.return===t)break e;ge===ye&&(ge=null),ye=ye.return}ge===ye&&(ge=null),ye.sibling.return=ye.return,ye=ye.sibling}}break;case 19:Ir(r,t),Jr(t),c&4&&lm(t);break;case 21:break;default:Ir(r,t),Jr(t)}}function Jr(t){var r=t.flags;if(r&2){try{e:{for(var o=t.return;o!==null;){if(sm(o)){var c=o;break e}o=o.return}throw Error(i(160))}switch(c.tag){case 5:var p=c.stateNode;c.flags&32&&(lt(p,""),c.flags&=-33);var x=om(t);Yd(t,x,p);break;case 3:case 4:var N=c.stateNode.containerInfo,z=om(t);qd(t,z,N);break;default:throw Error(i(161))}}catch(W){Yt(t,t.return,W)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Xv(t,r,o){je=t,cm(t)}function cm(t,r,o){for(var c=(t.mode&1)!==0;je!==null;){var p=je,x=p.child;if(p.tag===22&&c){var N=p.memoizedState!==null||qu;if(!N){var z=p.alternate,W=z!==null&&z.memoizedState!==null||mn;z=qu;var se=mn;if(qu=N,(mn=W)&&!se)for(je=p;je!==null;)N=je,W=N.child,N.tag===22&&N.memoizedState!==null?hm(p):W!==null?(W.return=N,je=W):hm(p);for(;x!==null;)je=x,cm(x),x=x.sibling;je=p,qu=z,mn=se}dm(t)}else(p.subtreeFlags&8772)!==0&&x!==null?(x.return=p,je=x):dm(t)}}function dm(t){for(;je!==null;){var r=je;if((r.flags&8772)!==0){var o=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:mn||Yu(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!mn)if(o===null)c.componentDidMount();else{var p=r.elementType===r.type?o.memoizedProps:Mr(r.type,o.memoizedProps);c.componentDidUpdate(p,o.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var x=r.updateQueue;x!==null&&fp(r,x,c);break;case 3:var N=r.updateQueue;if(N!==null){if(o=null,r.child!==null)switch(r.child.tag){case 5:o=r.child.stateNode;break;case 1:o=r.child.stateNode}fp(r,N,o)}break;case 5:var z=r.stateNode;if(o===null&&r.flags&4){o=z;var W=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":W.autoFocus&&o.focus();break;case"img":W.src&&(o.src=W.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var se=r.alternate;if(se!==null){var ge=se.memoizedState;if(ge!==null){var ye=ge.dehydrated;ye!==null&&qt(ye)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}mn||r.flags&512&&Bd(r)}catch(he){Yt(r,r.return,he)}}if(r===t){je=null;break}if(o=r.sibling,o!==null){o.return=r.return,je=o;break}je=r.return}}function fm(t){for(;je!==null;){var r=je;if(r===t){je=null;break}var o=r.sibling;if(o!==null){o.return=r.return,je=o;break}je=r.return}}function hm(t){for(;je!==null;){var r=je;try{switch(r.tag){case 0:case 11:case 15:var o=r.return;try{Yu(4,r)}catch(W){Yt(r,o,W)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var p=r.return;try{c.componentDidMount()}catch(W){Yt(r,p,W)}}var x=r.return;try{Bd(r)}catch(W){Yt(r,x,W)}break;case 5:var N=r.return;try{Bd(r)}catch(W){Yt(r,N,W)}}}catch(W){Yt(r,r.return,W)}if(r===t){je=null;break}var z=r.sibling;if(z!==null){z.return=r.return,je=z;break}je=r.return}}var Zv=Math.ceil,Xu=V.ReactCurrentDispatcher,Xd=V.ReactCurrentOwner,mr=V.ReactCurrentBatchConfig,yt=0,on=null,Gt=null,dn=0,Zn=0,la=Zr(0),nn=0,gl=null,uo=0,Zu=0,Zd=0,yl=null,_n=null,Qd=0,ua=1/0,Ci=null,Qu=!1,Gd=null,ds=null,Gu=!1,fs=null,Ku=0,vl=0,Kd=null,Ju=-1,ec=0;function Nn(){return(yt&6)!==0?pt():Ju!==-1?Ju:Ju=pt()}function hs(t){return(t.mode&1)===0?1:(yt&2)!==0&&dn!==0?dn&-dn:jv.transition!==null?(ec===0&&(ec=_a()),ec):(t=vt,t!==0||(t=window.event,t=t===void 0?16:Fo(t.type)),t)}function jr(t,r,o,c){if(50<vl)throw vl=0,Kd=null,Error(i(185));ci(t,o,c),((yt&2)===0||t!==on)&&(t===on&&((yt&2)===0&&(Zu|=o),nn===4&&ps(t,dn)),Pn(t,c),o===1&&yt===0&&(r.mode&1)===0&&(ua=pt()+500,Ou&&as()))}function Pn(t,r){var o=t.callbackNode;_o(t,r);var c=$r(t,t===on?dn:0);if(c===0)o!==null&&sr(o),t.callbackNode=null,t.callbackPriority=0;else if(r=c&-c,t.callbackPriority!==r){if(o!=null&&sr(o),r===1)t.tag===0?Iv(mm.bind(null,t)):ep(mm.bind(null,t)),X(function(){(yt&6)===0&&as()}),o=null;else{switch(As(c)){case 1:o=wr;break;case 4:o=Wn;break;case 16:o=or;break;case 536870912:o=ct;break;default:o=or}o=bm(o,pm.bind(null,t))}t.callbackPriority=r,t.callbackNode=o}}function pm(t,r){if(Ju=-1,ec=0,(yt&6)!==0)throw Error(i(327));var o=t.callbackNode;if(ca()&&t.callbackNode!==o)return null;var c=$r(t,t===on?dn:0);if(c===0)return null;if((c&30)!==0||(c&t.expiredLanes)!==0||r)r=tc(t,c);else{r=c;var p=yt;yt|=2;var x=ym();(on!==t||dn!==r)&&(Ci=null,ua=pt()+500,fo(t,r));do try{Kv();break}catch(z){gm(t,z)}while(!0);gd(),Xu.current=x,yt=p,Gt!==null?r=0:(on=null,dn=0,r=nn)}if(r!==0){if(r===2&&(p=Ai(t),p!==0&&(c=p,r=Jd(t,p))),r===1)throw o=gl,fo(t,0),ps(t,c),Pn(t,pt()),o;if(r===6)ps(t,c);else{if(p=t.current.alternate,(c&30)===0&&!Qv(p)&&(r=tc(t,c),r===2&&(x=Ai(t),x!==0&&(c=x,r=Jd(t,x))),r===1))throw o=gl,fo(t,0),ps(t,c),Pn(t,pt()),o;switch(t.finishedWork=p,t.finishedLanes=c,r){case 0:case 1:throw Error(i(345));case 2:ho(t,_n,Ci);break;case 3:if(ps(t,c),(c&130023424)===c&&(r=Qd+500-pt(),10<r)){if($r(t,0)!==0)break;if(p=t.suspendedLanes,(p&c)!==c){Nn(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=C(ho.bind(null,t,_n,Ci),r);break}ho(t,_n,Ci);break;case 4:if(ps(t,c),(c&4194240)===c)break;for(r=t.eventTimes,p=-1;0<c;){var N=31-nt(c);x=1<<N,N=r[N],N>p&&(p=N),c&=~x}if(c=p,c=pt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Zv(c/1960))-c,10<c){t.timeoutHandle=C(ho.bind(null,t,_n,Ci),c);break}ho(t,_n,Ci);break;case 5:ho(t,_n,Ci);break;default:throw Error(i(329))}}}return Pn(t,pt()),t.callbackNode===o?pm.bind(null,t):null}function Jd(t,r){var o=yl;return t.current.memoizedState.isDehydrated&&(fo(t,r).flags|=256),t=tc(t,r),t!==2&&(r=_n,_n=o,r!==null&&ef(r)),t}function ef(t){_n===null?_n=t:_n.push.apply(_n,t)}function Qv(t){for(var r=t;;){if(r.flags&16384){var o=r.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var c=0;c<o.length;c++){var p=o[c],x=p.getSnapshot;p=p.value;try{if(!Ut(x(),p))return!1}catch{return!1}}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ps(t,r){for(r&=~Zd,r&=~Zu,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var o=31-nt(r),c=1<<o;t[o]=-1,r&=~c}}function mm(t){if((yt&6)!==0)throw Error(i(327));ca();var r=$r(t,0);if((r&1)===0)return Pn(t,pt()),null;var o=tc(t,r);if(t.tag!==0&&o===2){var c=Ai(t);c!==0&&(r=c,o=Jd(t,c))}if(o===1)throw o=gl,fo(t,0),ps(t,r),Pn(t,pt()),o;if(o===6)throw Error(i(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,ho(t,_n,Ci),Pn(t,pt()),null}function tf(t,r){var o=yt;yt|=1;try{return t(r)}finally{yt=o,yt===0&&(ua=pt()+500,Ou&&as())}}function co(t){fs!==null&&fs.tag===0&&(yt&6)===0&&ca();var r=yt;yt|=1;var o=mr.transition,c=vt;try{if(mr.transition=null,vt=1,t)return t()}finally{vt=c,mr.transition=o,yt=r,(yt&6)===0&&as()}}function nf(){Zn=la.current,St(la)}function fo(t,r){t.finishedWork=null,t.finishedLanes=0;var o=t.timeoutHandle;if(o!==-1&&(t.timeoutHandle=-1,M(o)),Gt!==null)for(o=Gt.return;o!==null;){var c=o;switch(dd(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Tu();break;case 3:sa(),St(In),St(fn),Ed();break;case 5:Sd(c);break;case 4:sa();break;case 13:St(Vt);break;case 19:St(Vt);break;case 10:yd(c.type._context);break;case 22:case 23:nf()}o=o.return}if(on=t,Gt=t=ms(t.current,null),dn=Zn=r,nn=0,gl=null,Zd=Zu=uo=0,_n=yl=null,oo!==null){for(r=0;r<oo.length;r++)if(o=oo[r],c=o.interleaved,c!==null){o.interleaved=null;var p=c.next,x=o.pending;if(x!==null){var N=x.next;x.next=p,c.next=N}o.pending=c}oo=null}return t}function gm(t,r){do{var o=Gt;try{if(gd(),Fu.current=Hu,Au){for(var c=Ht.memoizedState;c!==null;){var p=c.queue;p!==null&&(p.pending=null),c=c.next}Au=!1}if(lo=0,sn=tn=Ht=null,cl=!1,dl=0,Xd.current=null,o===null||o.return===null){nn=1,gl=r,Gt=null;break}e:{var x=t,N=o.return,z=o,W=r;if(r=dn,z.flags|=32768,W!==null&&typeof W=="object"&&typeof W.then=="function"){var se=W,ge=z,ye=ge.tag;if((ge.mode&1)===0&&(ye===0||ye===11||ye===15)){var he=ge.alternate;he?(ge.updateQueue=he.updateQueue,ge.memoizedState=he.memoizedState,ge.lanes=he.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var Oe=Vp(N);if(Oe!==null){Oe.flags&=-257,Hp(Oe,N,z,x,r),Oe.mode&1&&Up(x,se,r),r=Oe,W=se;var _e=r.updateQueue;if(_e===null){var Le=new Set;Le.add(W),r.updateQueue=Le}else _e.add(W);break e}else{if((r&1)===0){Up(x,se,r),rf();break e}W=Error(i(426))}}else if(zt&&z.mode&1){var Zt=Vp(N);if(Zt!==null){(Zt.flags&65536)===0&&(Zt.flags|=256),Hp(Zt,N,z,x,r),pd(oa(W,z));break e}}x=W=oa(W,z),nn!==4&&(nn=2),yl===null?yl=[x]:yl.push(x),x=N;do{switch(x.tag){case 3:x.flags|=65536,r&=-r,x.lanes|=r;var te=Fp(x,W,r);dp(x,te);break e;case 1:z=W;var Z=x.type,re=x.stateNode;if((x.flags&128)===0&&(typeof Z.getDerivedStateFromError=="function"||re!==null&&typeof re.componentDidCatch=="function"&&(ds===null||!ds.has(re)))){x.flags|=65536,r&=-r,x.lanes|=r;var be=Ap(x,z,r);dp(x,be);break e}}x=x.return}while(x!==null)}xm(o)}catch(Fe){r=Fe,Gt===o&&o!==null&&(Gt=o=o.return);continue}break}while(!0)}function ym(){var t=Xu.current;return Xu.current=Hu,t===null?Hu:t}function rf(){(nn===0||nn===3||nn===2)&&(nn=4),on===null||(uo&268435455)===0&&(Zu&268435455)===0||ps(on,dn)}function tc(t,r){var o=yt;yt|=2;var c=ym();(on!==t||dn!==r)&&(Ci=null,fo(t,r));do try{Gv();break}catch(p){gm(t,p)}while(!0);if(gd(),yt=o,Xu.current=c,Gt!==null)throw Error(i(261));return on=null,dn=0,nn}function Gv(){for(;Gt!==null;)vm(Gt)}function Kv(){for(;Gt!==null&&!Ve();)vm(Gt)}function vm(t){var r=Sm(t.alternate,t,Zn);t.memoizedProps=t.pendingProps,r===null?xm(t):Gt=r,Xd.current=null}function xm(t){var r=t;do{var o=r.alternate;if(t=r.return,(r.flags&32768)===0){if(o=Wv(o,r,Zn),o!==null){Gt=o;return}}else{if(o=Bv(o,r),o!==null){o.flags&=32767,Gt=o;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{nn=6,Gt=null;return}}if(r=r.sibling,r!==null){Gt=r;return}Gt=r=t}while(r!==null);nn===0&&(nn=5)}function ho(t,r,o){var c=vt,p=mr.transition;try{mr.transition=null,vt=1,Jv(t,r,o,c)}finally{mr.transition=p,vt=c}return null}function Jv(t,r,o,c){do ca();while(fs!==null);if((yt&6)!==0)throw Error(i(327));o=t.finishedWork;var p=t.finishedLanes;if(o===null)return null;if(t.finishedWork=null,t.finishedLanes=0,o===t.current)throw Error(i(177));t.callbackNode=null,t.callbackPriority=0;var x=o.lanes|o.childLanes;if(iu(t,x),t===on&&(Gt=on=null,dn=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Gu||(Gu=!0,bm(or,function(){return ca(),null})),x=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||x){x=mr.transition,mr.transition=null;var N=vt;vt=1;var z=yt;yt|=4,Xd.current=null,Yv(t,o),um(o,t),ad(u),Er=!!k,u=k=null,t.current=o,Xv(o),Qt(),yt=z,vt=N,mr.transition=x}else t.current=o;if(Gu&&(Gu=!1,fs=t,Ku=p),x=t.pendingLanes,x===0&&(ds=null),kr(o.stateNode),Pn(t,pt()),r!==null)for(c=t.onRecoverableError,o=0;o<r.length;o++)p=r[o],c(p.value,{componentStack:p.stack,digest:p.digest});if(Qu)throw Qu=!1,t=Gd,Gd=null,t;return(Ku&1)!==0&&t.tag!==0&&ca(),x=t.pendingLanes,(x&1)!==0?t===Kd?vl++:(vl=0,Kd=t):vl=0,as(),null}function ca(){if(fs!==null){var t=As(Ku),r=mr.transition,o=vt;try{if(mr.transition=null,vt=16>t?16:t,fs===null)var c=!1;else{if(t=fs,fs=null,Ku=0,(yt&6)!==0)throw Error(i(331));var p=yt;for(yt|=4,je=t.current;je!==null;){var x=je,N=x.child;if((je.flags&16)!==0){var z=x.deletions;if(z!==null){for(var W=0;W<z.length;W++){var se=z[W];for(je=se;je!==null;){var ge=je;switch(ge.tag){case 0:case 11:case 15:ml(8,ge,x)}var ye=ge.child;if(ye!==null)ye.return=ge,je=ye;else for(;je!==null;){ge=je;var he=ge.sibling,Oe=ge.return;if(im(ge),ge===se){je=null;break}if(he!==null){he.return=Oe,je=he;break}je=Oe}}}var _e=x.alternate;if(_e!==null){var Le=_e.child;if(Le!==null){_e.child=null;do{var Zt=Le.sibling;Le.sibling=null,Le=Zt}while(Le!==null)}}je=x}}if((x.subtreeFlags&2064)!==0&&N!==null)N.return=x,je=N;else e:for(;je!==null;){if(x=je,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:ml(9,x,x.return)}var te=x.sibling;if(te!==null){te.return=x.return,je=te;break e}je=x.return}}var Z=t.current;for(je=Z;je!==null;){N=je;var re=N.child;if((N.subtreeFlags&2064)!==0&&re!==null)re.return=N,je=re;else e:for(N=Z;je!==null;){if(z=je,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Yu(9,z)}}catch(Fe){Yt(z,z.return,Fe)}if(z===N){je=null;break e}var be=z.sibling;if(be!==null){be.return=z.return,je=be;break e}je=z.return}}if(yt=p,as(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Tt,t)}catch{}c=!0}return c}finally{vt=o,mr.transition=r}}return!1}function wm(t,r,o){r=oa(o,r),r=Fp(t,r,1),t=us(t,r,1),r=Nn(),t!==null&&(ci(t,1,r),Pn(t,r))}function Yt(t,r,o){if(t.tag===3)wm(t,t,o);else for(;r!==null;){if(r.tag===3){wm(r,t,o);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ds===null||!ds.has(c))){t=oa(o,t),t=Ap(r,t,1),r=us(r,t,1),t=Nn(),r!==null&&(ci(r,1,t),Pn(r,t));break}}r=r.return}}function ex(t,r,o){var c=t.pingCache;c!==null&&c.delete(r),r=Nn(),t.pingedLanes|=t.suspendedLanes&o,on===t&&(dn&o)===o&&(nn===4||nn===3&&(dn&130023424)===dn&&500>pt()-Qd?fo(t,0):Zd|=o),Pn(t,r)}function km(t,r){r===0&&((t.mode&1)===0?r=1:(r=zi,zi<<=1,(zi&130023424)===0&&(zi=4194304)));var o=Nn();t=Si(t,r),t!==null&&(ci(t,r,o),Pn(t,o))}function tx(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),km(t,o)}function nx(t,r){var o=0;switch(t.tag){case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=t.stateNode;break;default:throw Error(i(314))}c!==null&&c.delete(r),km(t,o)}var Sm;Sm=function(t,r,o){if(t!==null)if(t.memoizedProps!==r.pendingProps||In.current)Rn=!0;else{if((t.lanes&o)===0&&(r.flags&128)===0)return Rn=!1,$v(t,r,o);Rn=(t.flags&131072)!==0}else Rn=!1,zt&&(r.flags&1048576)!==0&&tp(r,Du,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;Bu(t,r),t=r.pendingProps;var p=Ko(r,fn.current);ia(r,o),p=Nd(null,r,c,t,p,o);var x=Od();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,jn(c)?(x=!0,Nu(r)):x=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,wd(r),p.updater=$u,r.stateNode=p,p._reactInternals=r,_d(r,c,t,o),r=Fd(null,r,c,!0,x,o)):(r.tag=0,zt&&x&&cd(r),Tn(null,r,p,o),r=r.child),r;case 16:c=r.elementType;e:{switch(Bu(t,r),t=r.pendingProps,p=c._init,c=p(c._payload),r.type=c,p=r.tag=ix(c),t=Mr(c,t),p){case 0:r=zd(null,r,c,t,o);break e;case 1:r=Xp(null,r,c,t,o);break e;case 11:r=$p(null,r,c,t,o);break e;case 14:r=Wp(null,r,c,Mr(c.type,t),o);break e}throw Error(i(306,c,""))}return r;case 0:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Mr(c,p),zd(t,r,c,p,o);case 1:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Mr(c,p),Xp(t,r,c,p,o);case 3:e:{if(Zp(r),t===null)throw Error(i(387));c=r.pendingProps,x=r.memoizedState,p=x.element,cp(t,r),Lu(r,c,null,o);var N=r.memoizedState;if(c=N.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},r.updateQueue.baseState=x,r.memoizedState=x,r.flags&256){p=oa(Error(i(423)),r),r=Qp(t,r,c,o,p);break e}else if(c!==p){p=oa(Error(i(424)),r),r=Qp(t,r,c,o,p);break e}else for(Xn=me(r.stateNode.containerInfo.firstChild),Yn=r,zt=!0,Or=null,o=lp(r,null,c,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ta(),c===p){r=Ei(t,r,o);break e}Tn(t,r,c,o)}r=r.child}return r;case 5:return hp(r),t===null&&hd(r),c=r.type,p=r.pendingProps,x=t!==null?t.memoizedProps:null,N=p.children,v(c,p)?N=null:x!==null&&v(c,x)&&(r.flags|=32),Yp(t,r),Tn(t,r,N,o),r.child;case 6:return t===null&&hd(r),null;case 13:return Gp(t,r,o);case 4:return kd(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=na(r,null,c,o):Tn(t,r,c,o),r.child;case 11:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Mr(c,p),$p(t,r,c,p,o);case 7:return Tn(t,r,r.pendingProps,o),r.child;case 8:return Tn(t,r,r.pendingProps.children,o),r.child;case 12:return Tn(t,r,r.pendingProps.children,o),r.child;case 10:e:{if(c=r.type._context,p=r.pendingProps,x=r.memoizedProps,N=p.value,xt(Ru,c._currentValue),c._currentValue=N,x!==null)if(Ut(x.value,N)){if(x.children===p.children&&!In.current){r=Ei(t,r,o);break e}}else for(x=r.child,x!==null&&(x.return=r);x!==null;){var z=x.dependencies;if(z!==null){N=x.child;for(var W=z.firstContext;W!==null;){if(W.context===c){if(x.tag===1){W=bi(-1,o&-o),W.tag=2;var se=x.updateQueue;if(se!==null){se=se.shared;var ge=se.pending;ge===null?W.next=W:(W.next=ge.next,ge.next=W),se.pending=W}}x.lanes|=o,W=x.alternate,W!==null&&(W.lanes|=o),vd(x.return,o,r),z.lanes|=o;break}W=W.next}}else if(x.tag===10)N=x.type===r.type?null:x.child;else if(x.tag===18){if(N=x.return,N===null)throw Error(i(341));N.lanes|=o,z=N.alternate,z!==null&&(z.lanes|=o),vd(N,o,r),N=x.sibling}else N=x.child;if(N!==null)N.return=x;else for(N=x;N!==null;){if(N===r){N=null;break}if(x=N.sibling,x!==null){x.return=N.return,N=x;break}N=N.return}x=N}Tn(t,r,p.children,o),r=r.child}return r;case 9:return p=r.type,c=r.pendingProps.children,ia(r,o),p=hr(p),c=c(p),r.flags|=1,Tn(t,r,c,o),r.child;case 14:return c=r.type,p=Mr(c,r.pendingProps),p=Mr(c.type,p),Wp(t,r,c,p,o);case 15:return Bp(t,r,r.type,r.pendingProps,o);case 17:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:Mr(c,p),Bu(t,r),r.tag=1,jn(c)?(t=!0,Nu(r)):t=!1,ia(r,o),Lp(r,c,p),_d(r,c,p,o),Fd(null,r,c,!0,t,o);case 19:return Jp(t,r,o);case 22:return qp(t,r,o)}throw Error(i(156,r.tag))};function bm(t,r){return Ot(t,r)}function rx(t,r,o,c){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gr(t,r,o,c){return new rx(t,r,o,c)}function sf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ix(t){if(typeof t=="function")return sf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===$)return 11;if(t===ie)return 14}return 2}function ms(t,r){var o=t.alternate;return o===null?(o=gr(t.tag,r,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=r,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&14680064,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,r=t.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o}function nc(t,r,o,c,p,x){var N=2;if(c=t,typeof t=="function")sf(t)&&(N=1);else if(typeof t=="string")N=5;else e:switch(t){case I:return po(o.children,p,x,r);case Q:N=8,p|=8;break;case J:return t=gr(12,o,r,p|2),t.elementType=J,t.lanes=x,t;case ue:return t=gr(13,o,r,p),t.elementType=ue,t.lanes=x,t;case ae:return t=gr(19,o,r,p),t.elementType=ae,t.lanes=x,t;case Ee:return rc(o,p,x,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case H:N=10;break e;case U:N=9;break e;case $:N=11;break e;case ie:N=14;break e;case xe:N=16,c=null;break e}throw Error(i(130,t==null?t:typeof t,""))}return r=gr(N,o,r,p),r.elementType=t,r.type=c,r.lanes=x,r}function po(t,r,o,c){return t=gr(7,t,c,r),t.lanes=o,t}function rc(t,r,o,c){return t=gr(22,t,c,r),t.elementType=Ee,t.lanes=o,t.stateNode={isHidden:!1},t}function of(t,r,o){return t=gr(6,t,null,r),t.lanes=o,t}function af(t,r,o){return r=gr(4,t.children!==null?t.children:[],t.key,r),r.lanes=o,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function sx(t,r,o,c,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ui(0),this.expirationTimes=ui(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ui(0),this.identifierPrefix=c,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function lf(t,r,o,c,p,x,N,z,W){return t=new sx(t,r,o,z,W),r===1?(r=1,x===!0&&(r|=8)):r=0,x=gr(3,null,null,r),t.current=x,x.stateNode=t,x.memoizedState={element:c,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},wd(x),t}function ox(t,r,o){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:q,key:c==null?null:""+c,children:t,containerInfo:r,implementation:o}}function Em(t){if(!t)return Qr;t=t._reactInternals;e:{if(Me(t)!==t||t.tag!==1)throw Error(i(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(jn(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(i(171))}if(t.tag===1){var o=t.type;if(jn(o))return Kh(t,o,r)}return r}function Cm(t,r,o,c,p,x,N,z,W){return t=lf(o,c,!0,t,p,x,N,z,W),t.context=Em(null),o=t.current,c=Nn(),p=hs(o),x=bi(c,p),x.callback=r??null,us(o,x,p),t.current.lanes=p,ci(t,p,c),Pn(t,c),t}function ic(t,r,o,c){var p=r.current,x=Nn(),N=hs(p);return o=Em(o),r.context===null?r.context=o:r.pendingContext=o,r=bi(x,N),r.payload={element:t},c=c===void 0?null:c,c!==null&&(r.callback=c),t=us(p,r,N),t!==null&&(jr(t,p,N,x),Pu(t,p,N)),N}function sc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Tm(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<r?o:r}}function uf(t,r){Tm(t,r),(t=t.alternate)&&Tm(t,r)}function ax(){return null}var Nm=typeof reportError=="function"?reportError:function(t){console.error(t)};function cf(t){this._internalRoot=t}oc.prototype.render=cf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(i(409));ic(t,r,null,null)},oc.prototype.unmount=cf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;co(function(){ic(null,t,null,null)}),r[Et]=null}};function oc(t){this._internalRoot=t}oc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Pa();t={blockedOn:null,target:t,priority:r};for(var o=0;o<Br.length&&r!==0&&r<Br[o].priority;o++);Br.splice(o,0,t),o===0&&au(t)}};function df(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ac(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Om(){}function lx(t,r,o,c,p){if(p){if(typeof c=="function"){var x=c;c=function(){var se=sc(N);x.call(se)}}var N=Cm(r,c,t,0,null,!1,!1,"",Om);return t._reactRootContainer=N,t[Et]=N.current,Gs(t.nodeType===8?t.parentNode:t),co(),N}for(;p=t.lastChild;)t.removeChild(p);if(typeof c=="function"){var z=c;c=function(){var se=sc(W);z.call(se)}}var W=lf(t,0,!1,null,null,!1,!1,"",Om);return t._reactRootContainer=W,t[Et]=W.current,Gs(t.nodeType===8?t.parentNode:t),co(function(){ic(r,W,o,c)}),W}function lc(t,r,o,c,p){var x=o._reactRootContainer;if(x){var N=x;if(typeof p=="function"){var z=p;p=function(){var W=sc(N);z.call(W)}}ic(r,N,t,p)}else N=lx(o,r,t,p,c);return sc(N)}Vi=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var o=li(r.pendingLanes);o!==0&&(Ui(r,o|1),Pn(r,pt()),(yt&6)===0&&(ua=pt()+500,as()))}break;case 13:co(function(){var c=Si(t,1);if(c!==null){var p=Nn();jr(c,t,1,p)}}),uf(t,1)}},Hi=function(t){if(t.tag===13){var r=Si(t,134217728);if(r!==null){var o=Nn();jr(r,t,134217728,o)}uf(t,134217728)}},su=function(t){if(t.tag===13){var r=hs(t),o=Si(t,r);if(o!==null){var c=Nn();jr(o,t,r,c)}uf(t,r)}},Pa=function(){return vt},ou=function(t,r){var o=vt;try{return vt=t,r()}finally{vt=o}},Ar=function(t,r,o){switch(r){case"input":if(tr(t,o),r=o.name,o.type==="radio"&&r!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<o.length;r++){var c=o[r];if(c!==t&&c.form===t.form){var p=no(c);if(!p)throw Error(i(90));$t(c),tr(c,p)}}}break;case"textarea":Mn(t,o);break;case"select":r=o.value,r!=null&&rr(t,!!o.multiple,r,!1)}},Pi=tf,Ur=co;var ux={usingClientEntryPoint:!1,Events:[is,ss,no,_i,Ls,tf]},xl={findFiberByHostInstance:qn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cx={bundleType:xl.bundleType,version:xl.version,rendererPackageName:xl.rendererPackageName,rendererConfig:xl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:V.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=kt(t),t===null?null:t.stateNode},findFiberByHostInstance:xl.findFiberByHostInstance||ax,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 uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Tt=uc.inject(cx),Lt=uc}catch{}}return Ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ux,Ln.createPortal=function(t,r){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!df(r))throw Error(i(200));return ox(t,r,null,o)},Ln.createRoot=function(t,r){if(!df(t))throw Error(i(299));var o=!1,c="",p=Nm;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=lf(t,1,!1,null,null,o,!1,c,p),t[Et]=r.current,Gs(t.nodeType===8?t.parentNode:t),new cf(r)},Ln.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=kt(r),t=t===null?null:t.stateNode,t},Ln.flushSync=function(t){return co(t)},Ln.hydrate=function(t,r,o){if(!ac(r))throw Error(i(200));return lc(null,t,r,!0,o)},Ln.hydrateRoot=function(t,r,o){if(!df(t))throw Error(i(405));var c=o!=null&&o.hydratedSources||null,p=!1,x="",N=Nm;if(o!=null&&(o.unstable_strictMode===!0&&(p=!0),o.identifierPrefix!==void 0&&(x=o.identifierPrefix),o.onRecoverableError!==void 0&&(N=o.onRecoverableError)),r=Cm(r,null,t,1,o??null,p,!1,x,N),t[Et]=r.current,Gs(t),c)for(t=0;t<c.length;t++)o=c[t],p=o._getVersion,p=p(o._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[o,p]:r.mutableSourceEagerHydrationData.push(o,p);return new oc(r)},Ln.render=function(t,r,o){if(!ac(r))throw Error(i(200));return lc(null,t,r,!1,o)},Ln.unmountComponentAtNode=function(t){if(!ac(t))throw Error(i(40));return t._reactRootContainer?(co(function(){lc(null,null,t,!1,function(){t._reactRootContainer=null,t[Et]=null})}),!0):!1},Ln.unstable_batchedUpdates=tf,Ln.unstable_renderSubtreeIntoContainer=function(t,r,o,c){if(!ac(o))throw Error(i(200));if(t==null||t._reactInternals===void 0)throw Error(i(38));return lc(t,r,o,!1,c)},Ln.version="18.3.1-next-f1338f8080-20240426",Ln}var zm;function Ly(){if(zm)return mf.exports;zm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),mf.exports=kx(),mf.exports}var zy=Ly();const Fy=Kl(zy),Sx=_y({__proto__:null,default:Fy},[zy]);var dc={},Fm;function bx(){if(Fm)return dc;Fm=1;var e=Ly();return dc.createRoot=e.createRoot,dc.hydrateRoot=e.hydrateRoot,dc}var Ex=bx();/**
|
|
41
|
-
* @remix-run/router v1.23.2
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Ft.apply(this,arguments)}var Jt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Jt||(Jt={}));const Am="popstate";function Cx(e){e===void 0&&(e={});function n(s,a){let{pathname:l,search:d,hash:f}=s.location;return Wl("",{pathname:l,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function i(s,a){return typeof a=="string"?a:Do(a)}return Nx(n,i,null,e)}function ht(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Mo(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Tx(){return Math.random().toString(36).substr(2,8)}function Um(e,n){return{usr:e.state,key:e.key,idx:n}}function Wl(e,n,i,s){return i===void 0&&(i=null),Ft({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?js(n):n,{state:i,key:n&&n.key||s||Tx()})}function Do(e){let{pathname:n="/",search:i="",hash:s=""}=e;return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function js(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substr(i),e=e.substr(0,i));let s=e.indexOf("?");s>=0&&(n.search=e.substr(s),e=e.substr(0,s)),e&&(n.pathname=e)}return n}function Nx(e,n,i,s){s===void 0&&(s={});let{window:a=document.defaultView,v5Compat:l=!1}=s,d=a.history,f=Jt.Pop,m=null,h=y();h==null&&(h=0,d.replaceState(Ft({},d.state,{idx:h}),""));function y(){return(d.state||{idx:null}).idx}function S(){f=Jt.Pop;let O=y(),D=O==null?null:O-h;h=O,m&&m({action:f,location:b.location,delta:D})}function w(O,D){f=Jt.Push;let P=Wl(b.location,O,D);h=y()+1;let R=Um(P,h),V=b.createHref(P);try{d.pushState(R,"",V)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;a.location.assign(V)}l&&m&&m({action:f,location:b.location,delta:1})}function g(O,D){f=Jt.Replace;let P=Wl(b.location,O,D);h=y();let R=Um(P,h),V=b.createHref(P);d.replaceState(R,"",V),l&&m&&m({action:f,location:b.location,delta:0})}function T(O){let D=a.location.origin!=="null"?a.location.origin:a.location.href,P=typeof O=="string"?O:Do(O);return P=P.replace(/ $/,"%20"),ht(D,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,D)}let b={get action(){return f},get location(){return e(a,d)},listen(O){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(Am,S),m=O,()=>{a.removeEventListener(Am,S),m=null}},createHref(O){return n(a,O)},createURL:T,encodeLocation(O){let D=T(O);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:w,replace:g,go(O){return d.go(O)}};return b}var Nt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Nt||(Nt={}));const Ox=new Set(["lazy","caseSensitive","path","id","index","children"]);function Mx(e){return e.index===!0}function wc(e,n,i,s){return i===void 0&&(i=[]),s===void 0&&(s={}),e.map((a,l)=>{let d=[...i,String(l)],f=typeof a.id=="string"?a.id:d.join("-");if(ht(a.index!==!0||!a.children,"Cannot specify children on an index route"),ht(!s[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),Mx(a)){let m=Ft({},a,n(a),{id:f});return s[f]=m,m}else{let m=Ft({},a,n(a),{id:f,children:void 0});return s[f]=m,a.children&&(m.children=wc(a.children,n,d,s)),m}})}function xo(e,n,i){return i===void 0&&(i="/"),vc(e,n,i,!1)}function vc(e,n,i,s){let a=typeof n=="string"?js(n):n,l=Di(a.pathname||"/",i);if(l==null)return null;let d=Ay(e);Ix(d);let f=null;for(let m=0;f==null&&m<d.length;++m){let h=Hx(l);f=Ux(d[m],h,s)}return f}function Dx(e,n){let{route:i,pathname:s,params:a}=e;return{id:i.id,pathname:s,params:a,data:n[i.id],handle:i.handle}}function Ay(e,n,i,s){n===void 0&&(n=[]),i===void 0&&(i=[]),s===void 0&&(s="");let a=(l,d,f)=>{let m={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};m.relativePath.startsWith("/")&&(ht(m.relativePath.startsWith(s),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(s.length));let h=Mi([s,m.relativePath]),y=i.concat(m);l.children&&l.children.length>0&&(ht(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Ay(l.children,n,y,h)),!(l.path==null&&!l.index)&&n.push({path:h,score:Fx(h,l.index),routesMeta:y})};return e.forEach((l,d)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))a(l,d);else for(let m of Uy(l.path))a(l,d,m)}),n}function Uy(e){let n=e.split("/");if(n.length===0)return[];let[i,...s]=n,a=i.endsWith("?"),l=i.replace(/\?$/,"");if(s.length===0)return a?[l,""]:[l];let d=Uy(s.join("/")),f=[];return f.push(...d.map(m=>m===""?l:[l,m].join("/"))),a&&f.push(...d),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function Ix(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:Ax(n.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}const jx=/^:[\w-]+$/,Rx=3,_x=2,Px=1,Lx=10,zx=-2,Vm=e=>e==="*";function Fx(e,n){let i=e.split("/"),s=i.length;return i.some(Vm)&&(s+=zx),n&&(s+=_x),i.filter(a=>!Vm(a)).reduce((a,l)=>a+(jx.test(l)?Rx:l===""?Px:Lx),s)}function Ax(e,n){return e.length===n.length&&e.slice(0,-1).every((s,a)=>s===n[a])?e[e.length-1]-n[n.length-1]:0}function Ux(e,n,i){i===void 0&&(i=!1);let{routesMeta:s}=e,a={},l="/",d=[];for(let f=0;f<s.length;++f){let m=s[f],h=f===s.length-1,y=l==="/"?n:n.slice(l.length)||"/",S=kc({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},y),w=m.route;if(!S&&h&&i&&!s[s.length-1].route.index&&(S=kc({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!S)return null;Object.assign(a,S.params),d.push({params:a,pathname:Mi([l,S.pathname]),pathnameBase:qx(Mi([l,S.pathnameBase])),route:w}),S.pathnameBase!=="/"&&(l=Mi([l,S.pathnameBase]))}return d}function kc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=Vx(e.path,e.caseSensitive,e.end),a=n.match(i);if(!a)return null;let l=a[0],d=l.replace(/(.)\/+$/,"$1"),f=a.slice(1);return{params:s.reduce((h,y,S)=>{let{paramName:w,isOptional:g}=y;if(w==="*"){let b=f[S]||"";d=l.slice(0,l.length-b.length).replace(/(.)\/+$/,"$1")}const T=f[S];return g&&!T?h[w]=void 0:h[w]=(T||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:d,pattern:e}}function Vx(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!0),Mo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m)=>(s.push({paramName:f,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,n?void 0:"i"),s]}function Hx(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Mo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Di(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}const $x=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wx=e=>$x.test(e);function Bx(e,n){n===void 0&&(n="/");let{pathname:i,search:s="",hash:a=""}=typeof e=="string"?js(e):e,l;if(i)if(Wx(i))l=i;else{if(i.includes("//")){let d=i;i=i.replace(/\/\/+/g,"/"),Mo(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+i))}i.startsWith("/")?l=Hm(i.substring(1),"/"):l=Hm(i,n)}else l=n;return{pathname:l,search:Yx(s),hash:Xx(a)}}function Hm(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?i.length>1&&i.pop():a!=="."&&i.push(a)}),i.length>1?i.join("/"):"/"}function vf(e,n,i,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Vy(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function wh(e,n){let i=Vy(e);return n?i.map((s,a)=>a===i.length-1?s.pathname:s.pathnameBase):i.map(s=>s.pathnameBase)}function kh(e,n,i,s){s===void 0&&(s=!1);let a;typeof e=="string"?a=js(e):(a=Ft({},e),ht(!a.pathname||!a.pathname.includes("?"),vf("?","pathname","search",a)),ht(!a.pathname||!a.pathname.includes("#"),vf("#","pathname","hash",a)),ht(!a.search||!a.search.includes("#"),vf("#","search","hash",a)));let l=e===""||a.pathname==="",d=l?"/":a.pathname,f;if(d==null)f=i;else{let S=n.length-1;if(!s&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),S-=1;a.pathname=w.join("/")}f=S>=0?n[S]:"/"}let m=Bx(a,f),h=d&&d!=="/"&&d.endsWith("/"),y=(l||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(h||y)&&(m.pathname+="/"),m}const Mi=e=>e.join("/").replace(/\/\/+/g,"/"),qx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Yx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Xx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Sc{constructor(n,i,s,a){a===void 0&&(a=!1),this.status=n,this.statusText=i||"",this.internal=a,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}}function Bl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Hy=["post","put","patch","delete"],Zx=new Set(Hy),Qx=["get",...Hy],Gx=new Set(Qx),Kx=new Set([301,302,303,307,308]),Jx=new Set([307,308]),xf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},e1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Sh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t1=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$y="remix-router-transitions";function n1(e){const n=e.window?e.window:typeof window<"u"?window:void 0,i=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u",s=!i;ht(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;a=G=>({hasErrorBoundary:A(G)})}else a=t1;let l={},d=wc(e.routes,a,void 0,l),f,m=e.basename||"/",h=e.dataStrategy||o1,y=e.patchRoutesOnNavigation,S=Ft({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),w=null,g=new Set,T=null,b=null,O=null,D=e.hydrationData!=null,P=xo(d,e.history.location,m),R=!1,V=null;if(P==null&&!y){let A=An(404,{pathname:e.history.location.pathname}),{matches:G,route:oe}=Jm(d);P=G,V={[oe.id]:A}}P&&!e.hydrationData&&Ur(P,d,e.history.location.pathname).active&&(P=null);let ne;if(P)if(P.some(A=>A.route.lazy))ne=!1;else if(!P.some(A=>A.route.loader))ne=!0;else if(S.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null;if(G){let oe=P.findIndex(fe=>G[fe.route.id]!==void 0);ne=P.slice(0,oe+1).every(fe=>!Wf(fe.route,A,G))}else ne=P.every(oe=>!Wf(oe.route,A,G))}else ne=e.hydrationData!=null;else if(ne=!1,P=[],S.v7_partialHydration){let A=Ur(null,d,e.history.location.pathname);A.active&&A.matches&&(R=!0,P=A.matches)}let q,I={historyAction:e.history.action,location:e.history.location,matches:P,initialized:ne,navigation:xf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||V,fetchers:new Map,blockers:new Map},Q=Jt.Pop,J=!1,H,U=!1,$=new Map,ue=null,ae=!1,ie=!1,xe=[],Ee=new Set,ce=new Map,ve=0,j=-1,B=new Map,le=new Set,L=new Map,ze=new Map,Ae=new Set,Te=new Map,tt=new Map,Qe;function st(){if(w=e.history.listen(A=>{let{action:G,location:oe,delta:fe}=A;if(Qe){Qe(),Qe=void 0;return}Mo(tt.size===0||fe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let we=Ar({currentLocation:I.location,nextLocation:oe,historyAction:G});if(we&&fe!=null){let Pe=new Promise(Be=>{Qe=Be});e.history.go(fe*-1),Fr(we,{state:"blocked",location:oe,proceed(){Fr(we,{state:"proceeding",proceed:void 0,reset:void 0,location:oe}),Pe.then(()=>e.history.go(fe))},reset(){let Be=new Map(I.blockers);Be.set(we,Sl),$t({blockers:Be})}});return}return xn(G,oe)}),i){w1(n,$);let A=()=>k1(n,$);n.addEventListener("pagehide",A),ue=()=>n.removeEventListener("pagehide",A)}return I.initialized||xn(Jt.Pop,I.location,{initialHydration:!0}),q}function Ct(){w&&w(),ue&&ue(),g.clear(),H&&H.abort(),I.fetchers.forEach((A,G)=>We(G)),I.blockers.forEach((A,G)=>rn(G))}function vn(A){return g.add(A),()=>g.delete(A)}function $t(A,G){G===void 0&&(G={}),I=Ft({},I,A);let oe=[],fe=[];S.v7_fetcherPersist&&I.fetchers.forEach((we,Pe)=>{we.state==="idle"&&(Ae.has(Pe)?fe.push(Pe):oe.push(Pe))}),Ae.forEach(we=>{!I.fetchers.has(we)&&!ce.has(we)&&fe.push(we)}),[...g].forEach(we=>we(I,{deletedFetchers:fe,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),S.v7_fetcherPersist?(oe.forEach(we=>I.fetchers.delete(we)),fe.forEach(we=>We(we))):fe.forEach(we=>Ae.delete(we))}function un(A,G,oe){var fe,we;let{flushSync:Pe}=oe===void 0?{}:oe,Be=I.actionData!=null&&I.navigation.formMethod!=null&&Lr(I.navigation.formMethod)&&I.navigation.state==="loading"&&((fe=A.state)==null?void 0:fe._isRedirect)!==!0,De;G.actionData?Object.keys(G.actionData).length>0?De=G.actionData:De=null:Be?De=I.actionData:De=null;let Ie=G.loaderData?Gm(I.loaderData,G.loaderData,G.matches||[],G.errors):I.loaderData,Ne=I.blockers;Ne.size>0&&(Ne=new Map(Ne),Ne.forEach((ot,Bt)=>Ne.set(Bt,Sl)));let Me=J===!0||I.navigation.formMethod!=null&&Lr(I.navigation.formMethod)&&((we=A.state)==null?void 0:we._isRedirect)!==!0;f&&(d=f,f=void 0),ae||Q===Jt.Pop||(Q===Jt.Push?e.history.push(A,A.state):Q===Jt.Replace&&e.history.replace(A,A.state));let Ge;if(Q===Jt.Pop){let ot=$.get(I.location.pathname);ot&&ot.has(A.pathname)?Ge={currentLocation:I.location,nextLocation:A}:$.has(A.pathname)&&(Ge={currentLocation:A,nextLocation:I.location})}else if(U){let ot=$.get(I.location.pathname);ot?ot.add(A.pathname):(ot=new Set([A.pathname]),$.set(I.location.pathname,ot)),Ge={currentLocation:I.location,nextLocation:A}}$t(Ft({},G,{actionData:De,loaderData:Ie,historyAction:Q,location:A,initialized:!0,navigation:xf,revalidation:"idle",restoreScrollPosition:Pi(A,G.matches||I.matches),preventScrollReset:Me,blockers:Ne}),{viewTransitionOpts:Ge,flushSync:Pe===!0}),Q=Jt.Pop,J=!1,U=!1,ae=!1,ie=!1,xe=[]}async function zr(A,G){if(typeof A=="number"){e.history.go(A);return}let oe=$f(I.location,I.matches,m,S.v7_prependBasename,A,S.v7_relativeSplatPath,G==null?void 0:G.fromRouteId,G==null?void 0:G.relative),{path:fe,submission:we,error:Pe}=$m(S.v7_normalizeFormMethod,!1,oe,G),Be=I.location,De=Wl(I.location,fe,G&&G.state);De=Ft({},De,e.history.encodeLocation(De));let Ie=G&&G.replace!=null?G.replace:void 0,Ne=Jt.Push;Ie===!0?Ne=Jt.Replace:Ie===!1||we!=null&&Lr(we.formMethod)&&we.formAction===I.location.pathname+I.location.search&&(Ne=Jt.Replace);let Me=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,Ge=(G&&G.flushSync)===!0,ot=Ar({currentLocation:Be,nextLocation:De,historyAction:Ne});if(ot){Fr(ot,{state:"blocked",location:De,proceed(){Fr(ot,{state:"proceeding",proceed:void 0,reset:void 0,location:De}),zr(A,G)},reset(){let Bt=new Map(I.blockers);Bt.set(ot,Sl),$t({blockers:Bt})}});return}return await xn(Ne,De,{submission:we,pendingError:Pe,preventScrollReset:Me,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:Ge})}function Hn(){if(Se(),$t({revalidation:"loading"}),I.navigation.state!=="submitting"){if(I.navigation.state==="idle"){xn(I.historyAction,I.location,{startUninterruptedRevalidation:!0});return}xn(Q||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation,enableViewTransition:U===!0})}}async function xn(A,G,oe){H&&H.abort(),H=null,Q=A,ae=(oe&&oe.startUninterruptedRevalidation)===!0,Ls(I.location,I.matches),J=(oe&&oe.preventScrollReset)===!0,U=(oe&&oe.enableViewTransition)===!0;let fe=f||d,we=oe&&oe.overrideNavigation,Pe=oe!=null&&oe.initialHydration&&I.matches&&I.matches.length>0&&!R?I.matches:xo(fe,G,m),Be=(oe&&oe.flushSync)===!0;if(Pe&&I.initialized&&!ie&&f1(I.location,G)&&!(oe&&oe.submission&&Lr(oe.submission.formMethod))){un(G,{matches:Pe},{flushSync:Be});return}let De=Ur(Pe,fe,G.pathname);if(De.active&&De.matches&&(Pe=De.matches),!Pe){let{error:kt,notFoundMatches:mt,route:Ot}=ir(G.pathname);un(G,{matches:mt,loaderData:{},errors:{[Ot.id]:kt}},{flushSync:Be});return}H=new AbortController;let Ie=da(e.history,G,H.signal,oe&&oe.submission),Ne;if(oe&&oe.pendingError)Ne=[wo(Pe).route.id,{type:Nt.error,error:oe.pendingError}];else if(oe&&oe.submission&&Lr(oe.submission.formMethod)){let kt=await tr(Ie,G,oe.submission,Pe,De.active,{replace:oe.replace,flushSync:Be});if(kt.shortCircuited)return;if(kt.pendingActionResult){let[mt,Ot]=kt.pendingActionResult;if(Jn(Ot)&&Bl(Ot.error)&&Ot.error.status===404){H=null,un(G,{matches:kt.matches,loaderData:{},errors:{[mt]:Ot.error}});return}}Pe=kt.matches||Pe,Ne=kt.pendingActionResult,we=wf(G,oe.submission),Be=!1,De.active=!1,Ie=da(e.history,Ie.url,Ie.signal)}let{shortCircuited:Me,matches:Ge,loaderData:ot,errors:Bt}=await oi(Ie,G,Pe,De.active,we,oe&&oe.submission,oe&&oe.fetcherSubmission,oe&&oe.replace,oe&&oe.initialHydration===!0,Be,Ne);Me||(H=null,un(G,Ft({matches:Ge||Pe},Km(Ne),{loaderData:ot,errors:Bt})))}async function tr(A,G,oe,fe,we,Pe){Pe===void 0&&(Pe={}),Se();let Be=v1(G,oe);if($t({navigation:Be},{flushSync:Pe.flushSync===!0}),we){let Ne=await xr(fe,G.pathname,A.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let Me=wo(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,pendingActionResult:[Me,{type:Nt.error,error:Ne.error}]}}else if(Ne.matches)fe=Ne.matches;else{let{notFoundMatches:Me,error:Ge,route:ot}=ir(G.pathname);return{matches:Me,pendingActionResult:[ot.id,{type:Nt.error,error:Ge}]}}}let De,Ie=Ul(fe,G);if(!Ie.route.action&&!Ie.route.lazy)De={type:Nt.error,error:An(405,{method:A.method,pathname:G.pathname,routeId:Ie.route.id})};else if(De=(await wn("action",I,A,[Ie],fe,null))[Ie.route.id],A.signal.aborted)return{shortCircuited:!0};if(ko(De)){let Ne;return Pe&&Pe.replace!=null?Ne=Pe.replace:Ne=Xm(De.response.headers.get("Location"),new URL(A.url),m,e.history)===I.location.pathname+I.location.search,await Mn(A,De,!0,{submission:oe,replace:Ne}),{shortCircuited:!0}}if(Is(De))throw An(400,{type:"defer-action"});if(Jn(De)){let Ne=wo(fe,Ie.route.id);return(Pe&&Pe.replace)!==!0&&(Q=Jt.Push),{matches:fe,pendingActionResult:[Ne.route.id,De]}}return{matches:fe,pendingActionResult:[Ie.route.id,De]}}async function oi(A,G,oe,fe,we,Pe,Be,De,Ie,Ne,Me){let Ge=we||wf(G,Pe),ot=Pe||Be||tg(Ge),Bt=!ae&&(!S.v7_partialHydration||!Ie);if(fe){if(Bt){let Tt=$n(Me);$t(Ft({navigation:Ge},Tt!==void 0?{actionData:Tt}:{}),{flushSync:Ne})}let ct=await xr(oe,G.pathname,A.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){let Tt=wo(ct.partialMatches).route.id;return{matches:ct.partialMatches,loaderData:{},errors:{[Tt]:ct.error}}}else if(ct.matches)oe=ct.matches;else{let{error:Tt,notFoundMatches:Lt,route:kr}=ir(G.pathname);return{matches:Lt,loaderData:{},errors:{[kr.id]:Tt}}}}let kt=f||d,[mt,Ot]=Bm(e.history,I,oe,ot,G,S.v7_partialHydration&&Ie===!0,S.v7_skipActionErrorRevalidation,ie,xe,Ee,Ae,L,le,kt,m,Me);if(Wt(ct=>!(oe&&oe.some(Tt=>Tt.route.id===ct))||mt&&mt.some(Tt=>Tt.route.id===ct)),j=++ve,mt.length===0&&Ot.length===0){let ct=en();return un(G,Ft({matches:oe,loaderData:{},errors:Me&&Jn(Me[1])?{[Me[0]]:Me[1].error}:null},Km(Me),ct?{fetchers:new Map(I.fetchers)}:{}),{flushSync:Ne}),{shortCircuited:!0}}if(Bt){let ct={};if(!fe){ct.navigation=Ge;let Tt=$n(Me);Tt!==void 0&&(ct.actionData=Tt)}Ot.length>0&&(ct.fetchers=nr(Ot)),$t(ct,{flushSync:Ne})}Ot.forEach(ct=>{ut(ct.key),ct.controller&&ce.set(ct.key,ct.controller)});let sr=()=>Ot.forEach(ct=>ut(ct.key));H&&H.signal.addEventListener("abort",sr);let{loaderResults:Ve,fetcherResults:Qt}=await de(I,oe,mt,Ot,A);if(A.signal.aborted)return{shortCircuited:!0};H&&H.signal.removeEventListener("abort",sr),Ot.forEach(ct=>ce.delete(ct.key));let pt=fc(Ve);if(pt)return await Mn(A,pt.result,!0,{replace:De}),{shortCircuited:!0};if(pt=fc(Qt),pt)return le.add(pt.key),await Mn(A,pt.result,!0,{replace:De}),{shortCircuited:!0};let{loaderData:Fs,errors:wr}=Qm(I,oe,Ve,Me,Ot,Qt,Te);Te.forEach((ct,Tt)=>{ct.subscribe(Lt=>{(Lt||ct.done)&&Te.delete(Tt)})}),S.v7_partialHydration&&Ie&&I.errors&&(wr=Ft({},I.errors,wr));let Wn=en(),or=Pt(j),Li=Wn||or||Ot.length>0;return Ft({matches:oe,loaderData:Fs,errors:wr},Li?{fetchers:new Map(I.fetchers)}:{})}function $n(A){if(A&&!Jn(A[1]))return{[A[0]]:A[1].data};if(I.actionData)return Object.keys(I.actionData).length===0?null:I.actionData}function nr(A){return A.forEach(G=>{let oe=I.fetchers.get(G.key),fe=bl(void 0,oe?oe.data:void 0);I.fetchers.set(G.key,fe)}),new Map(I.fetchers)}function rr(A,G,oe,fe){if(s)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ut(A);let we=(fe&&fe.flushSync)===!0,Pe=f||d,Be=$f(I.location,I.matches,m,S.v7_prependBasename,oe,S.v7_relativeSplatPath,G,fe==null?void 0:fe.relative),De=xo(Pe,Be,m),Ie=Ur(De,Pe,Be);if(Ie.active&&Ie.matches&&(De=Ie.matches),!De){Xe(A,G,An(404,{pathname:Be}),{flushSync:we});return}let{path:Ne,submission:Me,error:Ge}=$m(S.v7_normalizeFormMethod,!0,Be,fe);if(Ge){Xe(A,G,Ge,{flushSync:we});return}let ot=Ul(De,Ne),Bt=(fe&&fe.preventScrollReset)===!0;if(Me&&Lr(Me.formMethod)){ai(A,G,Ne,ot,De,Ie.active,we,Bt,Me);return}L.set(A,{routeId:G,path:Ne}),Ri(A,G,Ne,ot,De,Ie.active,we,Bt,Me)}async function ai(A,G,oe,fe,we,Pe,Be,De,Ie){Se(),L.delete(A);function Ne(nt){if(!nt.route.action&&!nt.route.lazy){let Hr=An(405,{method:Ie.formMethod,pathname:oe,routeId:G});return Xe(A,G,Hr,{flushSync:Be}),!0}return!1}if(!Pe&&Ne(fe))return;let Me=I.fetchers.get(A);Ue(A,x1(Ie,Me),{flushSync:Be});let Ge=new AbortController,ot=da(e.history,oe,Ge.signal,Ie);if(Pe){let nt=await xr(we,new URL(ot.url).pathname,ot.signal,A);if(nt.type==="aborted")return;if(nt.type==="error"){Xe(A,G,nt.error,{flushSync:Be});return}else if(nt.matches){if(we=nt.matches,fe=Ul(we,oe),Ne(fe))return}else{Xe(A,G,An(404,{pathname:oe}),{flushSync:Be});return}}ce.set(A,Ge);let Bt=ve,mt=(await wn("action",I,ot,[fe],we,A))[fe.route.id];if(ot.signal.aborted){ce.get(A)===Ge&&ce.delete(A);return}if(S.v7_fetcherPersist&&Ae.has(A)){if(ko(mt)||Jn(mt)){Ue(A,ks(void 0));return}}else{if(ko(mt))if(ce.delete(A),j>Bt){Ue(A,ks(void 0));return}else return le.add(A),Ue(A,bl(Ie)),Mn(ot,mt,!1,{fetcherSubmission:Ie,preventScrollReset:De});if(Jn(mt)){Xe(A,G,mt.error);return}}if(Is(mt))throw An(400,{type:"defer-action"});let Ot=I.navigation.location||I.location,sr=da(e.history,Ot,Ge.signal),Ve=f||d,Qt=I.navigation.state!=="idle"?xo(Ve,I.navigation.location,m):I.matches;ht(Qt,"Didn't find any matches after fetcher action");let pt=++ve;B.set(A,pt);let Fs=bl(Ie,mt.data);I.fetchers.set(A,Fs);let[wr,Wn]=Bm(e.history,I,Qt,Ie,Ot,!1,S.v7_skipActionErrorRevalidation,ie,xe,Ee,Ae,L,le,Ve,m,[fe.route.id,mt]);Wn.filter(nt=>nt.key!==A).forEach(nt=>{let Hr=nt.key,jt=I.fetchers.get(Hr),ar=bl(void 0,jt?jt.data:void 0);I.fetchers.set(Hr,ar),ut(Hr),nt.controller&&ce.set(Hr,nt.controller)}),$t({fetchers:new Map(I.fetchers)});let or=()=>Wn.forEach(nt=>ut(nt.key));Ge.signal.addEventListener("abort",or);let{loaderResults:Li,fetcherResults:ct}=await de(I,Qt,wr,Wn,sr);if(Ge.signal.aborted)return;Ge.signal.removeEventListener("abort",or),B.delete(A),ce.delete(A),Wn.forEach(nt=>ce.delete(nt.key));let Tt=fc(Li);if(Tt)return Mn(sr,Tt.result,!1,{preventScrollReset:De});if(Tt=fc(ct),Tt)return le.add(Tt.key),Mn(sr,Tt.result,!1,{preventScrollReset:De});let{loaderData:Lt,errors:kr}=Qm(I,Qt,Li,void 0,Wn,ct,Te);if(I.fetchers.has(A)){let nt=ks(mt.data);I.fetchers.set(A,nt)}Pt(pt),I.navigation.state==="loading"&&pt>j?(ht(Q,"Expected pending action"),H&&H.abort(),un(I.navigation.location,{matches:Qt,loaderData:Lt,errors:kr,fetchers:new Map(I.fetchers)})):($t({errors:kr,loaderData:Gm(I.loaderData,Lt,Qt,kr),fetchers:new Map(I.fetchers)}),ie=!1)}async function Ri(A,G,oe,fe,we,Pe,Be,De,Ie){let Ne=I.fetchers.get(A);Ue(A,bl(Ie,Ne?Ne.data:void 0),{flushSync:Be});let Me=new AbortController,Ge=da(e.history,oe,Me.signal);if(Pe){let mt=await xr(we,new URL(Ge.url).pathname,Ge.signal,A);if(mt.type==="aborted")return;if(mt.type==="error"){Xe(A,G,mt.error,{flushSync:Be});return}else if(mt.matches)we=mt.matches,fe=Ul(we,oe);else{Xe(A,G,An(404,{pathname:oe}),{flushSync:Be});return}}ce.set(A,Me);let ot=ve,kt=(await wn("loader",I,Ge,[fe],we,A))[fe.route.id];if(Is(kt)&&(kt=await bh(kt,Ge.signal,!0)||kt),ce.get(A)===Me&&ce.delete(A),!Ge.signal.aborted){if(Ae.has(A)){Ue(A,ks(void 0));return}if(ko(kt))if(j>ot){Ue(A,ks(void 0));return}else{le.add(A),await Mn(Ge,kt,!1,{preventScrollReset:De});return}if(Jn(kt)){Xe(A,G,kt.error);return}ht(!Is(kt),"Unhandled fetcher deferred data"),Ue(A,ks(kt.data))}}async function Mn(A,G,oe,fe){let{submission:we,fetcherSubmission:Pe,preventScrollReset:Be,replace:De}=fe===void 0?{}:fe;G.response.headers.has("X-Remix-Revalidate")&&(ie=!0);let Ie=G.response.headers.get("Location");ht(Ie,"Expected a Location header on the redirect Response"),Ie=Xm(Ie,new URL(A.url),m,e.history);let Ne=Wl(I.location,Ie,{_isRedirect:!0});if(i){let mt=!1;if(G.response.headers.has("X-Remix-Reload-Document"))mt=!0;else if(Sh.test(Ie)){const Ot=e.history.createURL(Ie);mt=Ot.origin!==n.location.origin||Di(Ot.pathname,m)==null}if(mt){De?n.location.replace(Ie):n.location.assign(Ie);return}}H=null;let Me=De===!0||G.response.headers.has("X-Remix-Replace")?Jt.Replace:Jt.Push,{formMethod:Ge,formAction:ot,formEncType:Bt}=I.navigation;!we&&!Pe&&Ge&&ot&&Bt&&(we=tg(I.navigation));let kt=we||Pe;if(Jx.has(G.response.status)&&kt&&Lr(kt.formMethod))await xn(Me,Ne,{submission:Ft({},kt,{formAction:Ie}),preventScrollReset:Be||J,enableViewTransition:oe?U:void 0});else{let mt=wf(Ne,we);await xn(Me,Ne,{overrideNavigation:mt,fetcherSubmission:Pe,preventScrollReset:Be||J,enableViewTransition:oe?U:void 0})}}async function wn(A,G,oe,fe,we,Pe){let Be,De={};try{Be=await a1(h,A,G,oe,fe,we,Pe,l,a)}catch(Ie){return fe.forEach(Ne=>{De[Ne.route.id]={type:Nt.error,error:Ie}}),De}for(let[Ie,Ne]of Object.entries(Be))if(h1(Ne)){let Me=Ne.result;De[Ie]={type:Nt.redirect,response:c1(Me,oe,Ie,we,m,S.v7_relativeSplatPath)}}else De[Ie]=await u1(Ne);return De}async function de(A,G,oe,fe,we){let Pe=A.matches,Be=wn("loader",A,we,oe,G,null),De=Promise.all(fe.map(async Me=>{if(Me.matches&&Me.match&&Me.controller){let ot=(await wn("loader",A,da(e.history,Me.path,Me.controller.signal),[Me.match],Me.matches,Me.key))[Me.match.route.id];return{[Me.key]:ot}}else return Promise.resolve({[Me.key]:{type:Nt.error,error:An(404,{pathname:Me.path})}})})),Ie=await Be,Ne=(await De).reduce((Me,Ge)=>Object.assign(Me,Ge),{});return await Promise.all([g1(G,Ie,we.signal,Pe,A.loaderData),y1(G,Ne,fe)]),{loaderResults:Ie,fetcherResults:Ne}}function Se(){ie=!0,xe.push(...Wt()),L.forEach((A,G)=>{ce.has(G)&&Ee.add(G),ut(G)})}function Ue(A,G,oe){oe===void 0&&(oe={}),I.fetchers.set(A,G),$t({fetchers:new Map(I.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Xe(A,G,oe,fe){fe===void 0&&(fe={});let we=wo(I.matches,G);We(A),$t({errors:{[we.route.id]:oe},fetchers:new Map(I.fetchers)},{flushSync:(fe&&fe.flushSync)===!0})}function lt(A){return ze.set(A,(ze.get(A)||0)+1),Ae.has(A)&&Ae.delete(A),I.fetchers.get(A)||e1}function We(A){let G=I.fetchers.get(A);ce.has(A)&&!(G&&G.state==="loading"&&B.has(A))&&ut(A),L.delete(A),B.delete(A),le.delete(A),S.v7_fetcherPersist&&Ae.delete(A),Ee.delete(A),I.fetchers.delete(A)}function kn(A){let G=(ze.get(A)||0)-1;G<=0?(ze.delete(A),Ae.add(A),S.v7_fetcherPersist||We(A)):ze.set(A,G),$t({fetchers:new Map(I.fetchers)})}function ut(A){let G=ce.get(A);G&&(G.abort(),ce.delete(A))}function Dn(A){for(let G of A){let oe=lt(G),fe=ks(oe.data);I.fetchers.set(G,fe)}}function en(){let A=[],G=!1;for(let oe of le){let fe=I.fetchers.get(oe);ht(fe,"Expected fetcher: "+oe),fe.state==="loading"&&(le.delete(oe),A.push(oe),G=!0)}return Dn(A),G}function Pt(A){let G=[];for(let[oe,fe]of B)if(fe<A){let we=I.fetchers.get(oe);ht(we,"Expected fetcher: "+oe),we.state==="loading"&&(ut(oe),B.delete(oe),G.push(oe))}return Dn(G),G.length>0}function Sn(A,G){let oe=I.blockers.get(A)||Sl;return tt.get(A)!==G&&tt.set(A,G),oe}function rn(A){I.blockers.delete(A),tt.delete(A)}function Fr(A,G){let oe=I.blockers.get(A)||Sl;ht(oe.state==="unblocked"&&G.state==="blocked"||oe.state==="blocked"&&G.state==="blocked"||oe.state==="blocked"&&G.state==="proceeding"||oe.state==="blocked"&&G.state==="unblocked"||oe.state==="proceeding"&&G.state==="unblocked","Invalid blocker state transition: "+oe.state+" -> "+G.state);let fe=new Map(I.blockers);fe.set(A,G),$t({blockers:fe})}function Ar(A){let{currentLocation:G,nextLocation:oe,historyAction:fe}=A;if(tt.size===0)return;tt.size>1&&Mo(!1,"A router only supports one blocker at a time");let we=Array.from(tt.entries()),[Pe,Be]=we[we.length-1],De=I.blockers.get(Pe);if(!(De&&De.state==="proceeding")&&Be({currentLocation:G,nextLocation:oe,historyAction:fe}))return Pe}function ir(A){let G=An(404,{pathname:A}),oe=f||d,{matches:fe,route:we}=Jm(oe);return Wt(),{notFoundMatches:fe,route:we,error:G}}function Wt(A){let G=[];return Te.forEach((oe,fe)=>{(!A||A(fe))&&(oe.cancel(),G.push(fe),Te.delete(fe))}),G}function Ps(A,G,oe){if(T=A,O=G,b=oe||null,!D&&I.navigation===xf){D=!0;let fe=Pi(I.location,I.matches);fe!=null&&$t({restoreScrollPosition:fe})}return()=>{T=null,O=null,b=null}}function _i(A,G){return b&&b(A,G.map(fe=>Dx(fe,I.loaderData)))||A.key}function Ls(A,G){if(T&&O){let oe=_i(A,G);T[oe]=O()}}function Pi(A,G){if(T){let oe=_i(A,G),fe=T[oe];if(typeof fe=="number")return fe}return null}function Ur(A,G,oe){if(y)if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:vc(G,oe,m,!0)}}else return{active:!0,matches:vc(G,oe,m,!0)||[]};return{active:!1,matches:null}}async function xr(A,G,oe,fe){if(!y)return{type:"success",matches:A};let we=A;for(;;){let Pe=f==null,Be=f||d,De=l;try{await y({signal:oe,path:G,matches:we,fetcherKey:fe,patch:(Me,Ge)=>{oe.aborted||Ym(Me,Ge,Be,De,a)}})}catch(Me){return{type:"error",error:Me,partialMatches:we}}finally{Pe&&!oe.aborted&&(d=[...d])}if(oe.aborted)return{type:"aborted"};let Ie=xo(Be,G,m);if(Ie)return{type:"success",matches:Ie};let Ne=vc(Be,G,m,!0);if(!Ne||we.length===Ne.length&&we.every((Me,Ge)=>Me.route.id===Ne[Ge].route.id))return{type:"success",matches:null};we=Ne}}function zs(A){l={},f=wc(A,a,void 0,l)}function Vr(A,G){let oe=f==null;Ym(A,G,f||d,l,a),oe&&(d=[...d],$t({}))}return q={get basename(){return m},get future(){return S},get state(){return I},get routes(){return d},get window(){return n},initialize:st,subscribe:vn,enableScrollRestoration:Ps,navigate:zr,fetch:rr,revalidate:Hn,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:lt,deleteFetcher:kn,dispose:Ct,getBlocker:Sn,deleteBlocker:rn,patchRoutes:Vr,_internalFetchControllers:ce,_internalActiveDeferreds:Te,_internalSetRoutes:zs},q}function r1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function $f(e,n,i,s,a,l,d,f){let m,h;if(d){m=[];for(let S of n)if(m.push(S),S.route.id===d){h=S;break}}else m=n,h=n[n.length-1];let y=kh(a||".",wh(m,l),Di(e.pathname,i)||e.pathname,f==="path");if(a==null&&(y.search=e.search,y.hash=e.hash),(a==null||a===""||a===".")&&h){let S=Eh(y.search);if(h.route.index&&!S)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&S){let w=new URLSearchParams(y.search),g=w.getAll("index");w.delete("index"),g.filter(b=>b).forEach(b=>w.append("index",b));let T=w.toString();y.search=T?"?"+T:""}}return s&&i!=="/"&&(y.pathname=y.pathname==="/"?i:Mi([i,y.pathname])),Do(y)}function $m(e,n,i,s){if(!s||!r1(s))return{path:i};if(s.formMethod&&!m1(s.formMethod))return{path:i,error:An(405,{method:s.formMethod})};let a=()=>({path:i,error:An(400,{type:"invalid-body"})}),l=s.formMethod||"get",d=e?l.toUpperCase():l.toLowerCase(),f=qy(i);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Lr(d))return a();let w=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((g,T)=>{let[b,O]=T;return""+g+b+"="+O+`
|
|
50
|
-
`},""):String(s.body);return{path:i,submission:{formMethod:d,formAction:f,formEncType:s.formEncType,formData:void 0,json:void 0,text:w}}}else if(s.formEncType==="application/json"){if(!Lr(d))return a();try{let w=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:i,submission:{formMethod:d,formAction:f,formEncType:s.formEncType,formData:void 0,json:w,text:void 0}}}catch{return a()}}}ht(typeof FormData=="function","FormData is not available in this environment");let m,h;if(s.formData)m=Bf(s.formData),h=s.formData;else if(s.body instanceof FormData)m=Bf(s.body),h=s.body;else if(s.body instanceof URLSearchParams)m=s.body,h=Zm(m);else if(s.body==null)m=new URLSearchParams,h=new FormData;else try{m=new URLSearchParams(s.body),h=Zm(m)}catch{return a()}let y={formMethod:d,formAction:f,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Lr(y.formMethod))return{path:i,submission:y};let S=js(i);return n&&S.search&&Eh(S.search)&&m.append("index",""),S.search="?"+m,{path:Do(S),submission:y}}function Wm(e,n,i){i===void 0&&(i=!1);let s=e.findIndex(a=>a.route.id===n);return s>=0?e.slice(0,i?s+1:s):e}function Bm(e,n,i,s,a,l,d,f,m,h,y,S,w,g,T,b){let O=b?Jn(b[1])?b[1].error:b[1].data:void 0,D=e.createURL(n.location),P=e.createURL(a),R=i;l&&n.errors?R=Wm(i,Object.keys(n.errors)[0],!0):b&&Jn(b[1])&&(R=Wm(i,b[0]));let V=b?b[1].statusCode:void 0,ne=d&&V&&V>=400,q=R.filter((Q,J)=>{let{route:H}=Q;if(H.lazy)return!0;if(H.loader==null)return!1;if(l)return Wf(H,n.loaderData,n.errors);if(i1(n.loaderData,n.matches[J],Q)||m.some(ue=>ue===Q.route.id))return!0;let U=n.matches[J],$=Q;return qm(Q,Ft({currentUrl:D,currentParams:U.params,nextUrl:P,nextParams:$.params},s,{actionResult:O,actionStatus:V,defaultShouldRevalidate:ne?!1:f||D.pathname+D.search===P.pathname+P.search||D.search!==P.search||Wy(U,$)}))}),I=[];return S.forEach((Q,J)=>{if(l||!i.some(ae=>ae.route.id===Q.routeId)||y.has(J))return;let H=xo(g,Q.path,T);if(!H){I.push({key:J,routeId:Q.routeId,path:Q.path,matches:null,match:null,controller:null});return}let U=n.fetchers.get(J),$=Ul(H,Q.path),ue=!1;w.has(J)?ue=!1:h.has(J)?(h.delete(J),ue=!0):U&&U.state!=="idle"&&U.data===void 0?ue=f:ue=qm($,Ft({currentUrl:D,currentParams:n.matches[n.matches.length-1].params,nextUrl:P,nextParams:i[i.length-1].params},s,{actionResult:O,actionStatus:V,defaultShouldRevalidate:ne?!1:f})),ue&&I.push({key:J,routeId:Q.routeId,path:Q.path,matches:H,match:$,controller:new AbortController})}),[q,I]}function Wf(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let s=n!=null&&n[e.id]!==void 0,a=i!=null&&i[e.id]!==void 0;return!s&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!s&&!a}function i1(e,n,i){let s=!n||i.route.id!==n.route.id,a=e[i.route.id]===void 0;return s||a}function Wy(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function qm(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function Ym(e,n,i,s,a){var l;let d;if(e){let h=s[e];ht(h,"No route found to patch children into: routeId = "+e),h.children||(h.children=[]),d=h.children}else d=i;let f=n.filter(h=>!d.some(y=>By(h,y))),m=wc(f,a,[e||"_","patch",String(((l=d)==null?void 0:l.length)||"0")],s);d.push(...m)}function By(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,s)=>{var a;return(a=n.children)==null?void 0:a.some(l=>By(i,l))}):!1}async function s1(e,n,i){if(!e.lazy)return;let s=await e.lazy();if(!e.lazy)return;let a=i[e.id];ht(a,"No route found in manifest");let l={};for(let d in s){let m=a[d]!==void 0&&d!=="hasErrorBoundary";Mo(!m,'Route "'+a.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!m&&!Ox.has(d)&&(l[d]=s[d])}Object.assign(a,l),Object.assign(a,Ft({},n(a),{lazy:void 0}))}async function o1(e){let{matches:n}=e,i=n.filter(a=>a.shouldLoad);return(await Promise.all(i.map(a=>a.resolve()))).reduce((a,l,d)=>Object.assign(a,{[i[d].route.id]:l}),{})}async function a1(e,n,i,s,a,l,d,f,m,h){let y=l.map(g=>g.route.lazy?s1(g.route,m,f):void 0),S=l.map((g,T)=>{let b=y[T],O=a.some(P=>P.route.id===g.route.id);return Ft({},g,{shouldLoad:O,resolve:async P=>(P&&s.method==="GET"&&(g.route.lazy||g.route.loader)&&(O=!0),O?l1(n,s,g,b,P,h):Promise.resolve({type:Nt.data,result:void 0}))})}),w=await e({matches:S,request:s,params:l[0].params,fetcherKey:d,context:h});try{await Promise.all(y)}catch{}return w}async function l1(e,n,i,s,a,l){let d,f,m=h=>{let y,S=new Promise((T,b)=>y=b);f=()=>y(),n.signal.addEventListener("abort",f);let w=T=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):h({request:n,params:i.params,context:l},...T!==void 0?[T]:[]),g=(async()=>{try{return{type:"data",result:await(a?a(b=>w(b)):w())}}catch(T){return{type:"error",result:T}}})();return Promise.race([g,S])};try{let h=i.route[e];if(s)if(h){let y,[S]=await Promise.all([m(h).catch(w=>{y=w}),s]);if(y!==void 0)throw y;d=S}else if(await s,h=i.route[e],h)d=await m(h);else if(e==="action"){let y=new URL(n.url),S=y.pathname+y.search;throw An(405,{method:n.method,pathname:S,routeId:i.route.id})}else return{type:Nt.data,result:void 0};else if(h)d=await m(h);else{let y=new URL(n.url),S=y.pathname+y.search;throw An(404,{pathname:S})}ht(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Nt.error,result:h}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function u1(e){let{result:n,type:i}=e;if(Yy(n)){let S;try{let w=n.headers.get("Content-Type");w&&/\bapplication\/json\b/.test(w)?n.body==null?S=null:S=await n.json():S=await n.text()}catch(w){return{type:Nt.error,error:w}}return i===Nt.error?{type:Nt.error,error:new Sc(n.status,n.statusText,S),statusCode:n.status,headers:n.headers}:{type:Nt.data,data:S,statusCode:n.status,headers:n.headers}}if(i===Nt.error){if(eg(n)){var s,a;if(n.data instanceof Error){var l,d;return{type:Nt.error,error:n.data,statusCode:(l=n.init)==null?void 0:l.status,headers:(d=n.init)!=null&&d.headers?new Headers(n.init.headers):void 0}}return{type:Nt.error,error:new Sc(((s=n.init)==null?void 0:s.status)||500,void 0,n.data),statusCode:Bl(n)?n.status:void 0,headers:(a=n.init)!=null&&a.headers?new Headers(n.init.headers):void 0}}return{type:Nt.error,error:n,statusCode:Bl(n)?n.status:void 0}}if(p1(n)){var f,m;return{type:Nt.deferred,deferredData:n,statusCode:(f=n.init)==null?void 0:f.status,headers:((m=n.init)==null?void 0:m.headers)&&new Headers(n.init.headers)}}if(eg(n)){var h,y;return{type:Nt.data,data:n.data,statusCode:(h=n.init)==null?void 0:h.status,headers:(y=n.init)!=null&&y.headers?new Headers(n.init.headers):void 0}}return{type:Nt.data,data:n}}function c1(e,n,i,s,a,l){let d=e.headers.get("Location");if(ht(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Sh.test(d)){let f=s.slice(0,s.findIndex(m=>m.route.id===i)+1);d=$f(new URL(n.url),f,a,!0,d,l),e.headers.set("Location",d)}return e}function Xm(e,n,i,s){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Sh.test(e)){let l=e,d=l.startsWith("//")?new URL(n.protocol+l):new URL(l);if(a.includes(d.protocol))throw new Error("Invalid redirect location");let f=Di(d.pathname,i)!=null;if(d.origin===n.origin&&f)return d.pathname+d.search+d.hash}try{let l=s.createURL(e);if(a.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function da(e,n,i,s){let a=e.createURL(qy(n)).toString(),l={signal:i};if(s&&Lr(s.formMethod)){let{formMethod:d,formEncType:f}=s;l.method=d.toUpperCase(),f==="application/json"?(l.headers=new Headers({"Content-Type":f}),l.body=JSON.stringify(s.json)):f==="text/plain"?l.body=s.text:f==="application/x-www-form-urlencoded"&&s.formData?l.body=Bf(s.formData):l.body=s.formData}return new Request(a,l)}function Bf(e){let n=new URLSearchParams;for(let[i,s]of e.entries())n.append(i,typeof s=="string"?s:s.name);return n}function Zm(e){let n=new FormData;for(let[i,s]of e.entries())n.append(i,s);return n}function d1(e,n,i,s,a){let l={},d=null,f,m=!1,h={},y=i&&Jn(i[1])?i[1].error:void 0;return e.forEach(S=>{if(!(S.route.id in n))return;let w=S.route.id,g=n[w];if(ht(!ko(g),"Cannot handle redirect results in processLoaderData"),Jn(g)){let T=g.error;y!==void 0&&(T=y,y=void 0),d=d||{};{let b=wo(e,w);d[b.route.id]==null&&(d[b.route.id]=T)}l[w]=void 0,m||(m=!0,f=Bl(g.error)?g.error.status:500),g.headers&&(h[w]=g.headers)}else Is(g)?(s.set(w,g.deferredData),l[w]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!m&&(f=g.statusCode),g.headers&&(h[w]=g.headers)):(l[w]=g.data,g.statusCode&&g.statusCode!==200&&!m&&(f=g.statusCode),g.headers&&(h[w]=g.headers))}),y!==void 0&&i&&(d={[i[0]]:y},l[i[0]]=void 0),{loaderData:l,errors:d,statusCode:f||200,loaderHeaders:h}}function Qm(e,n,i,s,a,l,d){let{loaderData:f,errors:m}=d1(n,i,s,d);return a.forEach(h=>{let{key:y,match:S,controller:w}=h,g=l[y];if(ht(g,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(Jn(g)){let T=wo(e.matches,S==null?void 0:S.route.id);m&&m[T.route.id]||(m=Ft({},m,{[T.route.id]:g.error})),e.fetchers.delete(y)}else if(ko(g))ht(!1,"Unhandled fetcher revalidation redirect");else if(Is(g))ht(!1,"Unhandled fetcher deferred data");else{let T=ks(g.data);e.fetchers.set(y,T)}}),{loaderData:f,errors:m}}function Gm(e,n,i,s){let a=Ft({},n);for(let l of i){let d=l.route.id;if(n.hasOwnProperty(d)?n[d]!==void 0&&(a[d]=n[d]):e[d]!==void 0&&l.route.loader&&(a[d]=e[d]),s&&s.hasOwnProperty(d))break}return a}function Km(e){return e?Jn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wo(e,n){return(n?e.slice(0,e.findIndex(s=>s.route.id===n)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function Jm(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function An(e,n){let{pathname:i,routeId:s,method:a,type:l,message:d}=n===void 0?{}:n,f="Unknown Server Error",m="Unknown @remix-run/router error";return e===400?(f="Bad Request",a&&i&&s?m="You made a "+a+' request to "'+i+'" but '+('did not provide a `loader` for route "'+s+'", ')+"so there is no way to handle the request.":l==="defer-action"?m="defer() is not supported in actions":l==="invalid-body"&&(m="Unable to encode submission body")):e===403?(f="Forbidden",m='Route "'+s+'" does not match URL "'+i+'"'):e===404?(f="Not Found",m='No route matches URL "'+i+'"'):e===405&&(f="Method Not Allowed",a&&i&&s?m="You made a "+a.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+s+'", ')+"so there is no way to handle the request.":a&&(m='Invalid request method "'+a.toUpperCase()+'"')),new Sc(e||500,f,new Error(m),!0)}function fc(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[s,a]=n[i];if(ko(a))return{key:s,result:a}}}function qy(e){let n=typeof e=="string"?js(e):e;return Do(Ft({},n,{hash:""}))}function f1(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function h1(e){return Yy(e.result)&&Kx.has(e.result.status)}function Is(e){return e.type===Nt.deferred}function Jn(e){return e.type===Nt.error}function ko(e){return(e&&e.type)===Nt.redirect}function eg(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function p1(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function Yy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function m1(e){return Gx.has(e.toLowerCase())}function Lr(e){return Zx.has(e.toLowerCase())}async function g1(e,n,i,s,a){let l=Object.entries(n);for(let d=0;d<l.length;d++){let[f,m]=l[d],h=e.find(w=>(w==null?void 0:w.route.id)===f);if(!h)continue;let y=s.find(w=>w.route.id===h.route.id),S=y!=null&&!Wy(y,h)&&(a&&a[h.route.id])!==void 0;Is(m)&&S&&await bh(m,i,!1).then(w=>{w&&(n[f]=w)})}}async function y1(e,n,i){for(let s=0;s<i.length;s++){let{key:a,routeId:l,controller:d}=i[s],f=n[a];e.find(h=>(h==null?void 0:h.route.id)===l)&&Is(f)&&(ht(d,"Expected an AbortController for revalidating fetcher deferred result"),await bh(f,d.signal,!0).then(h=>{h&&(n[a]=h)}))}}async function bh(e,n,i){if(i===void 0&&(i=!1),!await e.deferredData.resolveData(n)){if(i)try{return{type:Nt.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Nt.error,error:a}}return{type:Nt.data,data:e.deferredData.data}}}function Eh(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Ul(e,n){let i=typeof n=="string"?js(n).search:n.search;if(e[e.length-1].route.index&&Eh(i||""))return e[e.length-1];let s=Vy(e);return s[s.length-1]}function tg(e){let{formMethod:n,formAction:i,formEncType:s,text:a,formData:l,json:d}=e;if(!(!n||!i||!s)){if(a!=null)return{formMethod:n,formAction:i,formEncType:s,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:n,formAction:i,formEncType:s,formData:l,json:void 0,text:void 0};if(d!==void 0)return{formMethod:n,formAction:i,formEncType:s,formData:void 0,json:d,text:void 0}}}function wf(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function v1(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function bl(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function x1(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function ks(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function w1(e,n){try{let i=e.sessionStorage.getItem($y);if(i){let s=JSON.parse(i);for(let[a,l]of Object.entries(s||{}))l&&Array.isArray(l)&&n.set(a,new Set(l||[]))}}catch{}}function k1(e,n){if(n.size>0){let i={};for(let[s,a]of n)i[s]=[...a];try{e.sessionStorage.setItem($y,JSON.stringify(i))}catch(s){Mo(!1,"Failed to save applied view transitions in sessionStorage ("+s+").")}}}/**
|
|
51
|
-
* React Router v6.30.3
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},bc.apply(this,arguments)}const Jl=Y.createContext(null),Ch=Y.createContext(null),Rs=Y.createContext(null),Th=Y.createContext(null),ji=Y.createContext({outlet:null,matches:[],isDataRoute:!1}),Xy=Y.createContext(null);function S1(e,n){let{relative:i}=n===void 0?{}:n;eu()||ht(!1);let{basename:s,navigator:a}=Y.useContext(Rs),{hash:l,pathname:d,search:f}=Oc(e,{relative:i}),m=d;return s!=="/"&&(m=d==="/"?s:Mi([s,d])),a.createHref({pathname:m,search:f,hash:l})}function eu(){return Y.useContext(Th)!=null}function Io(){return eu()||ht(!1),Y.useContext(Th).location}function Zy(e){Y.useContext(Rs).static||Y.useLayoutEffect(e)}function Ma(){let{isDataRoute:e}=Y.useContext(ji);return e?L1():b1()}function b1(){eu()||ht(!1);let e=Y.useContext(Jl),{basename:n,future:i,navigator:s}=Y.useContext(Rs),{matches:a}=Y.useContext(ji),{pathname:l}=Io(),d=JSON.stringify(wh(a,i.v7_relativeSplatPath)),f=Y.useRef(!1);return Zy(()=>{f.current=!0}),Y.useCallback(function(h,y){if(y===void 0&&(y={}),!f.current)return;if(typeof h=="number"){s.go(h);return}let S=kh(h,JSON.parse(d),l,y.relative==="path");e==null&&n!=="/"&&(S.pathname=S.pathname==="/"?n:Mi([n,S.pathname])),(y.replace?s.replace:s.push)(S,y.state,y)},[n,s,d,l,e])}const E1=Y.createContext(null);function C1(e){let n=Y.useContext(ji).outlet;return n&&Y.createElement(E1.Provider,{value:e},n)}function Da(){let{matches:e}=Y.useContext(ji),n=e[e.length-1];return n?n.params:{}}function Oc(e,n){let{relative:i}=n===void 0?{}:n,{future:s}=Y.useContext(Rs),{matches:a}=Y.useContext(ji),{pathname:l}=Io(),d=JSON.stringify(wh(a,s.v7_relativeSplatPath));return Y.useMemo(()=>kh(e,JSON.parse(d),l,i==="path"),[e,d,l,i])}function T1(e,n,i,s){eu()||ht(!1);let{navigator:a}=Y.useContext(Rs),{matches:l}=Y.useContext(ji),d=l[l.length-1],f=d?d.params:{};d&&d.pathname;let m=d?d.pathnameBase:"/";d&&d.route;let h=Io(),y;y=h;let S=y.pathname||"/",w=S;if(m!=="/"){let b=m.replace(/^\//,"").split("/");w="/"+S.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=xo(e,{pathname:w});return I1(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},f,b.params),pathname:Mi([m,a.encodeLocation?a.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?m:Mi([m,a.encodeLocation?a.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),l,i,s)}function N1(){let e=P1(),n=Bl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Y.createElement(Y.Fragment,null,Y.createElement("h2",null,"Unexpected Application Error!"),Y.createElement("h3",{style:{fontStyle:"italic"}},n),i?Y.createElement("pre",{style:a},i):null,null)}const O1=Y.createElement(N1,null);class M1 extends Y.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){console.error("React Router caught the following error during render",n,i)}render(){return this.state.error!==void 0?Y.createElement(ji.Provider,{value:this.props.routeContext},Y.createElement(Xy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function D1(e){let{routeContext:n,match:i,children:s}=e,a=Y.useContext(Jl);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),Y.createElement(ji.Provider,{value:n},s)}function I1(e,n,i,s){var a;if(n===void 0&&(n=[]),i===void 0&&(i=null),s===void 0&&(s=null),e==null){var l;if(!i)return null;if(i.errors)e=i.matches;else if((l=s)!=null&&l.v7_partialHydration&&n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let d=e,f=(a=i)==null?void 0:a.errors;if(f!=null){let y=d.findIndex(S=>S.route.id&&(f==null?void 0:f[S.route.id])!==void 0);y>=0||ht(!1),d=d.slice(0,Math.min(d.length,y+1))}let m=!1,h=-1;if(i&&s&&s.v7_partialHydration)for(let y=0;y<d.length;y++){let S=d[y];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(h=y),S.route.id){let{loaderData:w,errors:g}=i,T=S.route.loader&&w[S.route.id]===void 0&&(!g||g[S.route.id]===void 0);if(S.route.lazy||T){m=!0,h>=0?d=d.slice(0,h+1):d=[d[0]];break}}}return d.reduceRight((y,S,w)=>{let g,T=!1,b=null,O=null;i&&(g=f&&S.route.id?f[S.route.id]:void 0,b=S.route.errorElement||O1,m&&(h<0&&w===0?(z1("route-fallback"),T=!0,O=null):h===w&&(T=!0,O=S.route.hydrateFallbackElement||null)));let D=n.concat(d.slice(0,w+1)),P=()=>{let R;return g?R=b:T?R=O:S.route.Component?R=Y.createElement(S.route.Component,null):S.route.element?R=S.route.element:R=y,Y.createElement(D1,{match:S,routeContext:{outlet:y,matches:D,isDataRoute:i!=null},children:R})};return i&&(S.route.ErrorBoundary||S.route.errorElement||w===0)?Y.createElement(M1,{location:i.location,revalidation:i.revalidation,component:b,error:g,children:P(),routeContext:{outlet:null,matches:D,isDataRoute:!0}}):P()},null)}var Qy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Qy||{}),Gy=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Gy||{});function j1(e){let n=Y.useContext(Jl);return n||ht(!1),n}function R1(e){let n=Y.useContext(Ch);return n||ht(!1),n}function _1(e){let n=Y.useContext(ji);return n||ht(!1),n}function Ky(e){let n=_1(),i=n.matches[n.matches.length-1];return i.route.id||ht(!1),i.route.id}function P1(){var e;let n=Y.useContext(Xy),i=R1(Gy.UseRouteError),s=Ky();return n!==void 0?n:(e=i.errors)==null?void 0:e[s]}function L1(){let{router:e}=j1(Qy.UseNavigateStable),n=Ky(),i=Y.useRef(!1);return Zy(()=>{i.current=!0}),Y.useCallback(function(a,l){l===void 0&&(l={}),i.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,bc({fromRouteId:n},l)))},[e,n])}const ng={};function z1(e,n,i){ng[e]||(ng[e]=!0)}function F1(e,n){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!n||n.v7_relativeSplatPath),n&&(n.v7_fetcherPersist,n.v7_normalizeFormMethod,n.v7_partialHydration,n.v7_skipActionErrorRevalidation)}function A1(e){return C1(e.context)}function U1(e){let{basename:n="/",children:i=null,location:s,navigationType:a=Jt.Pop,navigator:l,static:d=!1,future:f}=e;eu()&&ht(!1);let m=n.replace(/^\/*/,"/"),h=Y.useMemo(()=>({basename:m,navigator:l,static:d,future:bc({v7_relativeSplatPath:!1},f)}),[m,f,l,d]);typeof s=="string"&&(s=js(s));let{pathname:y="/",search:S="",hash:w="",state:g=null,key:T="default"}=s,b=Y.useMemo(()=>{let O=Di(y,m);return O==null?null:{location:{pathname:O,search:S,hash:w,state:g,key:T},navigationType:a}},[m,y,S,w,g,T,a]);return b==null?null:Y.createElement(Rs.Provider,{value:h},Y.createElement(Th.Provider,{children:i,value:b}))}new Promise(()=>{});function V1(e){let n={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(n,{element:Y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:Y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(n,{errorElement:Y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),n}/**
|
|
60
|
-
* React Router DOM v6.30.3
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Remix Software Inc.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
-
*
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function Ta(){return Ta=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Ta.apply(this,arguments)}function Jy(e,n){if(e==null)return{};var i={},s=Object.keys(e),a,l;for(l=0;l<s.length;l++)a=s[l],!(n.indexOf(a)>=0)&&(i[a]=e[a]);return i}function H1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $1(e,n){return e.button===0&&(!n||n==="_self")&&!H1(e)}function qf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let s=e[i];return n.concat(Array.isArray(s)?s.map(a=>[i,a]):[[i,s]])},[]))}function W1(e,n){let i=qf(e);return n&&n.forEach((s,a)=>{i.has(a)||n.getAll(a).forEach(l=>{i.append(a,l)})}),i}const B1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],q1=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Y1="6";try{window.__reactRouterVersion=Y1}catch{}function X1(e,n){return n1({basename:void 0,future:Ta({},void 0,{v7_prependBasename:!0}),history:Cx({window:void 0}),hydrationData:Z1(),routes:e,mapRouteProperties:V1,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function Z1(){var e;let n=(e=window)==null?void 0:e.__staticRouterHydrationData;return n&&n.errors&&(n=Ta({},n,{errors:Q1(n.errors)})),n}function Q1(e){if(!e)return null;let n=Object.entries(e),i={};for(let[s,a]of n)if(a&&a.__type==="RouteErrorResponse")i[s]=new Sc(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let l=window[a.__subType];if(typeof l=="function")try{let d=new l(a.message);d.stack="",i[s]=d}catch{}}if(i[s]==null){let l=new Error(a.message);l.stack="",i[s]=l}}else i[s]=a;return i}const e0=Y.createContext({isTransitioning:!1}),G1=Y.createContext(new Map),K1="startTransition",rg=vx[K1],J1="flushSync",ig=Sx[J1];function ew(e){rg?rg(e):e()}function El(e){ig?ig(e):e()}class tw{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",n(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",i(s))}})}}function nw(e){let{fallbackElement:n,router:i,future:s}=e,[a,l]=Y.useState(i.state),[d,f]=Y.useState(),[m,h]=Y.useState({isTransitioning:!1}),[y,S]=Y.useState(),[w,g]=Y.useState(),[T,b]=Y.useState(),O=Y.useRef(new Map),{v7_startTransition:D}=s||{},P=Y.useCallback(Q=>{D?ew(Q):Q()},[D]),R=Y.useCallback((Q,J)=>{let{deletedFetchers:H,flushSync:U,viewTransitionOpts:$}=J;Q.fetchers.forEach((ae,ie)=>{ae.data!==void 0&&O.current.set(ie,ae.data)}),H.forEach(ae=>O.current.delete(ae));let ue=i.window==null||i.window.document==null||typeof i.window.document.startViewTransition!="function";if(!$||ue){U?El(()=>l(Q)):P(()=>l(Q));return}if(U){El(()=>{w&&(y&&y.resolve(),w.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let ae=i.window.document.startViewTransition(()=>{El(()=>l(Q))});ae.finished.finally(()=>{El(()=>{S(void 0),g(void 0),f(void 0),h({isTransitioning:!1})})}),El(()=>g(ae));return}w?(y&&y.resolve(),w.skipTransition(),b({state:Q,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(f(Q),h({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[i.window,w,y,O,P]);Y.useLayoutEffect(()=>i.subscribe(R),[i,R]),Y.useEffect(()=>{m.isTransitioning&&!m.flushSync&&S(new tw)},[m]),Y.useEffect(()=>{if(y&&d&&i.window){let Q=d,J=y.promise,H=i.window.document.startViewTransition(async()=>{P(()=>l(Q)),await J});H.finished.finally(()=>{S(void 0),g(void 0),f(void 0),h({isTransitioning:!1})}),g(H)}},[P,d,y,i.window]),Y.useEffect(()=>{y&&d&&a.location.key===d.location.key&&y.resolve()},[y,w,a.location,d]),Y.useEffect(()=>{!m.isTransitioning&&T&&(f(T.state),h({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),b(void 0))},[m.isTransitioning,T]),Y.useEffect(()=>{},[]);let V=Y.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:Q=>i.navigate(Q),push:(Q,J,H)=>i.navigate(Q,{state:J,preventScrollReset:H==null?void 0:H.preventScrollReset}),replace:(Q,J,H)=>i.navigate(Q,{replace:!0,state:J,preventScrollReset:H==null?void 0:H.preventScrollReset})}),[i]),ne=i.basename||"/",q=Y.useMemo(()=>({router:i,navigator:V,static:!1,basename:ne}),[i,V,ne]),I=Y.useMemo(()=>({v7_relativeSplatPath:i.future.v7_relativeSplatPath}),[i.future.v7_relativeSplatPath]);return Y.useEffect(()=>F1(s,i.future),[s,i.future]),Y.createElement(Y.Fragment,null,Y.createElement(Jl.Provider,{value:q},Y.createElement(Ch.Provider,{value:a},Y.createElement(G1.Provider,{value:O.current},Y.createElement(e0.Provider,{value:m},Y.createElement(U1,{basename:ne,location:a.location,navigationType:a.historyAction,navigator:V,future:I},a.initialized||i.future.v7_partialHydration?Y.createElement(rw,{routes:i.routes,future:i.future,state:a}):n))))),null)}const rw=Y.memo(iw);function iw(e){let{routes:n,future:i,state:s}=e;return T1(n,void 0,s,i)}const sw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ow=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mc=Y.forwardRef(function(n,i){let{onClick:s,relative:a,reloadDocument:l,replace:d,state:f,target:m,to:h,preventScrollReset:y,viewTransition:S}=n,w=Jy(n,B1),{basename:g}=Y.useContext(Rs),T,b=!1;if(typeof h=="string"&&ow.test(h)&&(T=h,sw))try{let R=new URL(window.location.href),V=h.startsWith("//")?new URL(R.protocol+h):new URL(h),ne=Di(V.pathname,g);V.origin===R.origin&&ne!=null?h=ne+V.search+V.hash:b=!0}catch{}let O=S1(h,{relative:a}),D=lw(h,{replace:d,state:f,target:m,preventScrollReset:y,relative:a,viewTransition:S});function P(R){s&&s(R),R.defaultPrevented||D(R)}return Y.createElement("a",Ta({},w,{href:T||O,onClick:b||l?s:P,ref:i,target:m}))}),Nh=Y.forwardRef(function(n,i){let{"aria-current":s="page",caseSensitive:a=!1,className:l="",end:d=!1,style:f,to:m,viewTransition:h,children:y}=n,S=Jy(n,q1),w=Oc(m,{relative:S.relative}),g=Io(),T=Y.useContext(Ch),{navigator:b,basename:O}=Y.useContext(Rs),D=T!=null&&cw(w)&&h===!0,P=b.encodeLocation?b.encodeLocation(w).pathname:w.pathname,R=g.pathname,V=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;a||(R=R.toLowerCase(),V=V?V.toLowerCase():null,P=P.toLowerCase()),V&&O&&(V=Di(V,O)||V);const ne=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let q=R===P||!d&&R.startsWith(P)&&R.charAt(ne)==="/",I=V!=null&&(V===P||!d&&V.startsWith(P)&&V.charAt(P.length)==="/"),Q={isActive:q,isPending:I,isTransitioning:D},J=q?s:void 0,H;typeof l=="function"?H=l(Q):H=[l,q?"active":null,I?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let U=typeof f=="function"?f(Q):f;return Y.createElement(Mc,Ta({},S,{"aria-current":J,className:H,ref:i,style:U,to:m,viewTransition:h}),typeof y=="function"?y(Q):y)});var Yf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yf||(Yf={}));var sg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sg||(sg={}));function aw(e){let n=Y.useContext(Jl);return n||ht(!1),n}function lw(e,n){let{target:i,replace:s,state:a,preventScrollReset:l,relative:d,viewTransition:f}=n===void 0?{}:n,m=Ma(),h=Io(),y=Oc(e,{relative:d});return Y.useCallback(S=>{if($1(S,i)){S.preventDefault();let w=s!==void 0?s:Do(h)===Do(y);m(e,{replace:w,state:a,preventScrollReset:l,relative:d,viewTransition:f})}},[h,m,y,s,a,i,e,l,d,f])}function uw(e){let n=Y.useRef(qf(e)),i=Y.useRef(!1),s=Io(),a=Y.useMemo(()=>W1(s.search,i.current?null:n.current),[s.search]),l=Ma(),d=Y.useCallback((f,m)=>{const h=qf(typeof f=="function"?f(a):f);i.current=!0,l("?"+h,m)},[l,a]);return[a,d]}function cw(e,n){n===void 0&&(n={});let i=Y.useContext(e0);i==null&&ht(!1);let{basename:s}=aw(Yf.useViewTransitionState),a=Oc(e,{relative:n.relative});if(!i.isTransitioning)return!1;let l=Di(i.currentLocation.pathname,s)||i.currentLocation.pathname,d=Di(i.nextLocation.pathname,s)||i.nextLocation.pathname;return kc(a.pathname,d)!=null||kc(a.pathname,l)!=null}var Dc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},So,Cs,va,Cy,dw=(Cy=class extends Dc{constructor(){super();Re(this,So);Re(this,Cs);Re(this,va);pe(this,va,n=>{if(typeof window<"u"&&window.addEventListener){const i=()=>n();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,Cs)||this.setEventListener(_(this,va))}onUnsubscribe(){var n;this.hasListeners()||((n=_(this,Cs))==null||n.call(this),pe(this,Cs,void 0))}setEventListener(n){var i;pe(this,va,n),(i=_(this,Cs))==null||i.call(this),pe(this,Cs,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){_(this,So)!==n&&(pe(this,So,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(i=>{i(n)})}isFocused(){var n;return typeof _(this,So)=="boolean"?_(this,So):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},So=new WeakMap,Cs=new WeakMap,va=new WeakMap,Cy),t0=new dw,fw={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},Ts,vh,Ty,hw=(Ty=class{constructor(){Re(this,Ts,fw);Re(this,vh,!1)}setTimeoutProvider(e){pe(this,Ts,e)}setTimeout(e,n){return _(this,Ts).setTimeout(e,n)}clearTimeout(e){_(this,Ts).clearTimeout(e)}setInterval(e,n){return _(this,Ts).setInterval(e,n)}clearInterval(e){_(this,Ts).clearInterval(e)}},Ts=new WeakMap,vh=new WeakMap,Ty),Xf=new hw;function pw(e){setTimeout(e,0)}var mw=typeof window>"u"||"Deno"in globalThis;function _r(){}function gw(e,n){return typeof e=="function"?e(n):e}function yw(e){return typeof e=="number"&&e>=0&&e!==1/0}function vw(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Zf(e,n){return typeof e=="function"?e(n):e}function xw(e,n){return typeof e=="function"?e(n):e}function og(e,n){const{type:i="all",exact:s,fetchStatus:a,predicate:l,queryKey:d,stale:f}=e;if(d){if(s){if(n.queryHash!==Oh(d,n.options))return!1}else if(!Yl(n.queryKey,d))return!1}if(i!=="all"){const m=n.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||a&&a!==n.state.fetchStatus||l&&!l(n))}function ag(e,n){const{exact:i,status:s,predicate:a,mutationKey:l}=e;if(l){if(!n.options.mutationKey)return!1;if(i){if(ql(n.options.mutationKey)!==ql(l))return!1}else if(!Yl(n.options.mutationKey,l))return!1}return!(s&&n.state.status!==s||a&&!a(n))}function Oh(e,n){return((n==null?void 0:n.queryKeyHashFn)||ql)(e)}function ql(e){return JSON.stringify(e,(n,i)=>Qf(i)?Object.keys(i).sort().reduce((s,a)=>(s[a]=i[a],s),{}):i)}function Yl(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(i=>Yl(e[i],n[i])):!1}var ww=Object.prototype.hasOwnProperty;function n0(e,n,i=0){if(e===n)return e;if(i>500)return n;const s=lg(e)&&lg(n);if(!s&&!(Qf(e)&&Qf(n)))return n;const l=(s?e:Object.keys(e)).length,d=s?n:Object.keys(n),f=d.length,m=s?new Array(f):{};let h=0;for(let y=0;y<f;y++){const S=s?y:d[y],w=e[S],g=n[S];if(w===g){m[S]=w,(s?y<l:ww.call(e,S))&&h++;continue}if(w===null||g===null||typeof w!="object"||typeof g!="object"){m[S]=g;continue}const T=n0(w,g,i+1);m[S]=T,T===w&&h++}return l===f&&h===l?e:m}function lg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qf(e){if(!ug(e))return!1;const n=e.constructor;if(n===void 0)return!0;const i=n.prototype;return!(!ug(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ug(e){return Object.prototype.toString.call(e)==="[object Object]"}function kw(e){return new Promise(n=>{Xf.setTimeout(n,e)})}function Sw(e,n,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,n):i.structuralSharing!==!1?n0(e,n):n}function bw(e,n,i=0){const s=[...e,n];return i&&s.length>i?s.slice(1):s}function Ew(e,n,i=0){const s=[n,...e];return i&&s.length>i?s.slice(0,-1):s}var Mh=Symbol();function r0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Mh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cw(e,n,i){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=n()),s||(s=!0,a.aborted?i():a.addEventListener("abort",i,{once:!0})),a)}),e}var i0=(()=>{let e=()=>mw;return{isServer(){return e()},setIsServer(n){e=n}}})();function Tw(){let e,n;const i=new Promise((a,l)=>{e=a,n=l});i.status="pending",i.catch(()=>{});function s(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},i.reject=a=>{s({status:"rejected",reason:a}),n(a)},i}var Nw=pw;function Ow(){let e=[],n=0,i=f=>{f()},s=f=>{f()},a=Nw;const l=f=>{n?e.push(f):a(()=>{i(f)})},d=()=>{const f=e;e=[],f.length&&a(()=>{s(()=>{f.forEach(m=>{i(m)})})})};return{batch:f=>{let m;n++;try{m=f()}finally{n--,n||d()}return m},batchCalls:f=>(...m)=>{l(()=>{f(...m)})},schedule:l,setNotifyFunction:f=>{i=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{a=f}}}var On=Ow(),xa,Ns,wa,Ny,Mw=(Ny=class extends Dc{constructor(){super();Re(this,xa,!0);Re(this,Ns);Re(this,wa);pe(this,wa,n=>{if(typeof window<"u"&&window.addEventListener){const i=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){_(this,Ns)||this.setEventListener(_(this,wa))}onUnsubscribe(){var n;this.hasListeners()||((n=_(this,Ns))==null||n.call(this),pe(this,Ns,void 0))}setEventListener(n){var i;pe(this,wa,n),(i=_(this,Ns))==null||i.call(this),pe(this,Ns,n(this.setOnline.bind(this)))}setOnline(n){_(this,xa)!==n&&(pe(this,xa,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return _(this,xa)}},xa=new WeakMap,Ns=new WeakMap,wa=new WeakMap,Ny),Ec=new Mw;function Dw(e){return Math.min(1e3*2**e,3e4)}function s0(e){return(e??"online")==="online"?Ec.isOnline():!0}var Gf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function o0(e){let n=!1,i=0,s;const a=Tw(),l=()=>a.status!=="pending",d=b=>{var O;if(!l()){const D=new Gf(b);w(D),(O=e.onCancel)==null||O.call(e,D)}},f=()=>{n=!0},m=()=>{n=!1},h=()=>t0.isFocused()&&(e.networkMode==="always"||Ec.isOnline())&&e.canRun(),y=()=>s0(e.networkMode)&&e.canRun(),S=b=>{l()||(s==null||s(),a.resolve(b))},w=b=>{l()||(s==null||s(),a.reject(b))},g=()=>new Promise(b=>{var O;s=D=>{(l()||h())&&b(D)},(O=e.onPause)==null||O.call(e)}).then(()=>{var b;s=void 0,l()||(b=e.onContinue)==null||b.call(e)}),T=()=>{if(l())return;let b;const O=i===0?e.initialPromise:void 0;try{b=O??e.fn()}catch(D){b=Promise.reject(D)}Promise.resolve(b).then(S).catch(D=>{var q;if(l())return;const P=e.retry??(i0.isServer()?0:3),R=e.retryDelay??Dw,V=typeof R=="function"?R(i,D):R,ne=P===!0||typeof P=="number"&&i<P||typeof P=="function"&&P(i,D);if(n||!ne){w(D);return}i++,(q=e.onFail)==null||q.call(e,i,D),kw(V).then(()=>h()?void 0:g()).then(()=>{n?w(D):T()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(s==null||s(),a),cancelRetry:f,continueRetry:m,canStart:y,start:()=>(y()?T():g().then(T),a)}}var bo,Oy,a0=(Oy=class{constructor(){Re(this,bo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yw(this.gcTime)&&pe(this,bo,Xf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i0.isServer()?1/0:5*60*1e3))}clearGcTimeout(){_(this,bo)&&(Xf.clearTimeout(_(this,bo)),pe(this,bo,void 0))}},bo=new WeakMap,Oy),Eo,ka,yr,Co,ln,Zl,To,Kn,l0,Ni,My,Iw=(My=class extends a0{constructor(n){super();Re(this,Kn);Re(this,Eo);Re(this,ka);Re(this,yr);Re(this,Co);Re(this,ln);Re(this,Zl);Re(this,To);pe(this,To,!1),pe(this,Zl,n.defaultOptions),this.setOptions(n.options),this.observers=[],pe(this,Co,n.client),pe(this,yr,_(this,Co).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,pe(this,Eo,dg(this.options)),this.state=n.state??_(this,Eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=_(this,ln))==null?void 0:n.promise}setOptions(n){if(this.options={..._(this,Zl),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=dg(this.options);i.data!==void 0&&(this.setState(cg(i.data,i.dataUpdatedAt)),pe(this,Eo,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,yr).remove(this)}setData(n,i){const s=Sw(this.state.data,n,this.options);return Ce(this,Kn,Ni).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(n,i){Ce(this,Kn,Ni).call(this,{type:"setState",state:n,setStateOptions:i})}cancel(n){var s,a;const i=(s=_(this,ln))==null?void 0:s.promise;return(a=_(this,ln))==null||a.cancel(n),i?i.then(_r).catch(_r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Eo)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>xw(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Zf(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!vw(this.state.dataUpdatedAt,n)}onFocus(){var i;const n=this.observers.find(s=>s.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(i=_(this,ln))==null||i.continue()}onOnline(){var i;const n=this.observers.find(s=>s.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(i=_(this,ln))==null||i.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),_(this,yr).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(i=>i!==n),this.observers.length||(_(this,ln)&&(_(this,To)||Ce(this,Kn,l0).call(this)?_(this,ln).cancel({revert:!0}):_(this,ln).cancelRetry()),this.scheduleGc()),_(this,yr).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ce(this,Kn,Ni).call(this,{type:"invalidate"})}async fetch(n,i){var m,h,y,S,w,g,T,b,O,D,P,R;if(this.state.fetchStatus!=="idle"&&((m=_(this,ln))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,ln))return _(this,ln).continueRetry(),_(this,ln).promise}if(n&&this.setOptions(n),!this.options.queryFn){const V=this.observers.find(ne=>ne.options.queryFn);V&&this.setOptions(V.options)}const s=new AbortController,a=V=>{Object.defineProperty(V,"signal",{enumerable:!0,get:()=>(pe(this,To,!0),s.signal)})},l=()=>{const V=r0(this.options,i),q=(()=>{const I={client:_(this,Co),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return pe(this,To,!1),this.options.persister?this.options.persister(V,q,this):V(q)},f=(()=>{const V={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,Co),state:this.state,fetchFn:l};return a(V),V})();(h=this.options.behavior)==null||h.onFetch(f,this),pe(this,ka,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ce(this,Kn,Ni).call(this,{type:"fetch",meta:(S=f.fetchOptions)==null?void 0:S.meta}),pe(this,ln,o0({initialPromise:i==null?void 0:i.initialPromise,fn:f.fetchFn,onCancel:V=>{V instanceof Gf&&V.revert&&this.setState({..._(this,ka),fetchStatus:"idle"}),s.abort()},onFail:(V,ne)=>{Ce(this,Kn,Ni).call(this,{type:"failed",failureCount:V,error:ne})},onPause:()=>{Ce(this,Kn,Ni).call(this,{type:"pause"})},onContinue:()=>{Ce(this,Kn,Ni).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const V=await _(this,ln).start();if(V===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(V),(g=(w=_(this,yr).config).onSuccess)==null||g.call(w,V,this),(b=(T=_(this,yr).config).onSettled)==null||b.call(T,V,this.state.error,this),V}catch(V){if(V instanceof Gf){if(V.silent)return _(this,ln).promise;if(V.revert){if(this.state.data===void 0)throw V;return this.state.data}}throw Ce(this,Kn,Ni).call(this,{type:"error",error:V}),(D=(O=_(this,yr).config).onError)==null||D.call(O,V,this),(R=(P=_(this,yr).config).onSettled)==null||R.call(P,this.state.data,V,this),V}finally{this.scheduleGc()}}},Eo=new WeakMap,ka=new WeakMap,yr=new WeakMap,Co=new WeakMap,ln=new WeakMap,Zl=new WeakMap,To=new WeakMap,Kn=new WeakSet,l0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ni=function(n){const i=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...jw(s.data,this.options),fetchMeta:n.meta??null};case"success":const a={...s,...cg(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,ka,n.manual?a:void 0),a;case"error":const l=n.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=i(this.state),On.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),_(this,yr).notify({query:this,type:"updated",action:n})})},My);function jw(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:s0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cg(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dg(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,i=n!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}function fg(e){return{onFetch:(n,i)=>{var y,S,w,g,T;const s=n.options,a=(w=(S=(y=n.fetchOptions)==null?void 0:y.meta)==null?void 0:S.fetchMore)==null?void 0:w.direction,l=((g=n.state.data)==null?void 0:g.pages)||[],d=((T=n.state.data)==null?void 0:T.pageParams)||[];let f={pages:[],pageParams:[]},m=0;const h=async()=>{let b=!1;const O=R=>{Cw(R,()=>n.signal,()=>b=!0)},D=r0(n.options,n.fetchOptions),P=async(R,V,ne)=>{if(b)return Promise.reject();if(V==null&&R.pages.length)return Promise.resolve(R);const I=(()=>{const U={client:n.client,queryKey:n.queryKey,pageParam:V,direction:ne?"backward":"forward",meta:n.options.meta};return O(U),U})(),Q=await D(I),{maxPages:J}=n.options,H=ne?Ew:bw;return{pages:H(R.pages,Q,J),pageParams:H(R.pageParams,V,J)}};if(a&&l.length){const R=a==="backward",V=R?Rw:hg,ne={pages:l,pageParams:d},q=V(s,ne);f=await P(ne,q,R)}else{const R=e??l.length;do{const V=m===0?d[0]??s.initialPageParam:hg(s,f);if(m>0&&V==null)break;f=await P(f,V),m++}while(m<R)}return f};n.options.persister?n.fetchFn=()=>{var b,O;return(O=(b=n.options).persister)==null?void 0:O.call(b,h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},i)}:n.fetchFn=h}}}function hg(e,{pages:n,pageParams:i}){const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,i[s],i):void 0}function Rw(e,{pages:n,pageParams:i}){var s;return n.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,n[0],n,i[0],i):void 0}var Ql,ti,gn,No,ni,Ss,Dy,_w=(Dy=class extends a0{constructor(n){super();Re(this,ni);Re(this,Ql);Re(this,ti);Re(this,gn);Re(this,No);pe(this,Ql,n.client),this.mutationId=n.mutationId,pe(this,gn,n.mutationCache),pe(this,ti,[]),this.state=n.state||Pw(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){_(this,ti).includes(n)||(_(this,ti).push(n),this.clearGcTimeout(),_(this,gn).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){pe(this,ti,_(this,ti).filter(i=>i!==n)),this.scheduleGc(),_(this,gn).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){_(this,ti).length||(this.state.status==="pending"?this.scheduleGc():_(this,gn).remove(this))}continue(){var n;return((n=_(this,No))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var d,f,m,h,y,S,w,g,T,b,O,D,P,R,V,ne,q,I;const i=()=>{Ce(this,ni,Ss).call(this,{type:"continue"})},s={client:_(this,Ql),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,No,o0({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(Q,J)=>{Ce(this,ni,Ss).call(this,{type:"failed",failureCount:Q,error:J})},onPause:()=>{Ce(this,ni,Ss).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,gn).canRun(this)}));const a=this.state.status==="pending",l=!_(this,No).canStart();try{if(a)i();else{Ce(this,ni,Ss).call(this,{type:"pending",variables:n,isPaused:l}),_(this,gn).config.onMutate&&await _(this,gn).config.onMutate(n,this,s);const J=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,n,s));J!==this.state.context&&Ce(this,ni,Ss).call(this,{type:"pending",context:J,variables:n,isPaused:l})}const Q=await _(this,No).start();return await((h=(m=_(this,gn).config).onSuccess)==null?void 0:h.call(m,Q,n,this.state.context,this,s)),await((S=(y=this.options).onSuccess)==null?void 0:S.call(y,Q,n,this.state.context,s)),await((g=(w=_(this,gn).config).onSettled)==null?void 0:g.call(w,Q,null,this.state.variables,this.state.context,this,s)),await((b=(T=this.options).onSettled)==null?void 0:b.call(T,Q,null,n,this.state.context,s)),Ce(this,ni,Ss).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((D=(O=_(this,gn).config).onError)==null?void 0:D.call(O,Q,n,this.state.context,this,s))}catch(J){Promise.reject(J)}try{await((R=(P=this.options).onError)==null?void 0:R.call(P,Q,n,this.state.context,s))}catch(J){Promise.reject(J)}try{await((ne=(V=_(this,gn).config).onSettled)==null?void 0:ne.call(V,void 0,Q,this.state.variables,this.state.context,this,s))}catch(J){Promise.reject(J)}try{await((I=(q=this.options).onSettled)==null?void 0:I.call(q,void 0,Q,n,this.state.context,s))}catch(J){Promise.reject(J)}throw Ce(this,ni,Ss).call(this,{type:"error",error:Q}),Q}finally{_(this,gn).runNext(this)}}},Ql=new WeakMap,ti=new WeakMap,gn=new WeakMap,No=new WeakMap,ni=new WeakSet,Ss=function(n){const i=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=i(this.state),On.batch(()=>{_(this,ti).forEach(s=>{s.onMutationUpdate(n)}),_(this,gn).notify({mutation:this,type:"updated",action:n})})},Dy);function Pw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Oi,Pr,Gl,Iy,Lw=(Iy=class extends Dc{constructor(n={}){super();Re(this,Oi);Re(this,Pr);Re(this,Gl);this.config=n,pe(this,Oi,new Set),pe(this,Pr,new Map),pe(this,Gl,0)}build(n,i,s){const a=new _w({client:n,mutationCache:this,mutationId:++cc(this,Gl)._,options:n.defaultMutationOptions(i),state:s});return this.add(a),a}add(n){_(this,Oi).add(n);const i=hc(n);if(typeof i=="string"){const s=_(this,Pr).get(i);s?s.push(n):_(this,Pr).set(i,[n])}this.notify({type:"added",mutation:n})}remove(n){if(_(this,Oi).delete(n)){const i=hc(n);if(typeof i=="string"){const s=_(this,Pr).get(i);if(s)if(s.length>1){const a=s.indexOf(n);a!==-1&&s.splice(a,1)}else s[0]===n&&_(this,Pr).delete(i)}}this.notify({type:"removed",mutation:n})}canRun(n){const i=hc(n);if(typeof i=="string"){const s=_(this,Pr).get(i),a=s==null?void 0:s.find(l=>l.state.status==="pending");return!a||a===n}else return!0}runNext(n){var s;const i=hc(n);if(typeof i=="string"){const a=(s=_(this,Pr).get(i))==null?void 0:s.find(l=>l!==n&&l.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){On.batch(()=>{_(this,Oi).forEach(n=>{this.notify({type:"removed",mutation:n})}),_(this,Oi).clear(),_(this,Pr).clear()})}getAll(){return Array.from(_(this,Oi))}find(n){const i={exact:!0,...n};return this.getAll().find(s=>ag(i,s))}findAll(n={}){return this.getAll().filter(i=>ag(n,i))}notify(n){On.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return On.batch(()=>Promise.all(n.map(i=>i.continue().catch(_r))))}},Oi=new WeakMap,Pr=new WeakMap,Gl=new WeakMap,Iy);function hc(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ri,jy,zw=(jy=class extends Dc{constructor(n={}){super();Re(this,ri);this.config=n,pe(this,ri,new Map)}build(n,i,s){const a=i.queryKey,l=i.queryHash??Oh(a,i);let d=this.get(l);return d||(d=new Iw({client:n,queryKey:a,queryHash:l,options:n.defaultQueryOptions(i),state:s,defaultOptions:n.getQueryDefaults(a)}),this.add(d)),d}add(n){_(this,ri).has(n.queryHash)||(_(this,ri).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=_(this,ri).get(n.queryHash);i&&(n.destroy(),i===n&&_(this,ri).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){On.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return _(this,ri).get(n)}getAll(){return[..._(this,ri).values()]}find(n){const i={exact:!0,...n};return this.getAll().find(s=>og(i,s))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(s=>og(n,s)):i}notify(n){On.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){On.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ri=new WeakMap,jy),Xt,Os,Ms,Sa,ba,Ds,Ea,Ca,Ry,Fw=(Ry=class{constructor(e={}){Re(this,Xt);Re(this,Os);Re(this,Ms);Re(this,Sa);Re(this,ba);Re(this,Ds);Re(this,Ea);Re(this,Ca);pe(this,Xt,e.queryCache||new zw),pe(this,Os,e.mutationCache||new Lw),pe(this,Ms,e.defaultOptions||{}),pe(this,Sa,new Map),pe(this,ba,new Map),pe(this,Ds,0)}mount(){cc(this,Ds)._++,_(this,Ds)===1&&(pe(this,Ea,t0.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Xt).onFocus())})),pe(this,Ca,Ec.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Xt).onOnline())})))}unmount(){var e,n;cc(this,Ds)._--,_(this,Ds)===0&&((e=_(this,Ea))==null||e.call(this),pe(this,Ea,void 0),(n=_(this,Ca))==null||n.call(this),pe(this,Ca,void 0))}isFetching(e){return _(this,Xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,Os).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=_(this,Xt).get(n.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),i=_(this,Xt).build(this,n),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Zf(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(e){return _(this,Xt).findAll(e).map(({queryKey:n,state:i})=>{const s=i.data;return[n,s]})}setQueryData(e,n,i){const s=this.defaultQueryOptions({queryKey:e}),a=_(this,Xt).get(s.queryHash),l=a==null?void 0:a.state.data,d=gw(n,l);if(d!==void 0)return _(this,Xt).build(this,s).setData(d,{...i,manual:!0})}setQueriesData(e,n,i){return On.batch(()=>_(this,Xt).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,n,i)]))}getQueryState(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=_(this,Xt).get(n.queryHash))==null?void 0:i.state}removeQueries(e){const n=_(this,Xt);On.batch(()=>{n.findAll(e).forEach(i=>{n.remove(i)})})}resetQueries(e,n){const i=_(this,Xt);return On.batch(()=>(i.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const i={revert:!0,...n},s=On.batch(()=>_(this,Xt).findAll(e).map(a=>a.cancel(i)));return Promise.all(s).then(_r).catch(_r)}invalidateQueries(e,n={}){return On.batch(()=>(_(this,Xt).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const i={...n,cancelRefetch:n.cancelRefetch??!0},s=On.batch(()=>_(this,Xt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,i);return i.throwOnError||(l=l.catch(_r)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(_r)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const i=_(this,Xt).build(this,n);return i.isStaleByTime(Zf(n.staleTime,i))?i.fetch(n):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_r).catch(_r)}fetchInfiniteQuery(e){return e.behavior=fg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_r).catch(_r)}ensureInfiniteQueryData(e){return e.behavior=fg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ec.isOnline()?_(this,Os).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,Xt)}getMutationCache(){return _(this,Os)}getDefaultOptions(){return _(this,Ms)}setDefaultOptions(e){pe(this,Ms,e)}setQueryDefaults(e,n){_(this,Sa).set(ql(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[..._(this,Sa).values()],i={};return n.forEach(s=>{Yl(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,n){_(this,ba).set(ql(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[..._(this,ba).values()],i={};return n.forEach(s=>{Yl(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const n={..._(this,Ms).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Oh(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Mh&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,Ms).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,Xt).clear(),_(this,Os).clear()}},Xt=new WeakMap,Os=new WeakMap,Ms=new WeakMap,Sa=new WeakMap,ba=new WeakMap,Ds=new WeakMap,Ea=new WeakMap,Ca=new WeakMap,Ry),Aw=Y.createContext(void 0),Uw=({client:e,children:n})=>(Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(Aw.Provider,{value:e,children:n}));/**
|
|
69
|
-
* @license
|
|
70
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
71
|
-
* SPDX-License-Identifier: MIT
|
|
72
|
-
*/function pg(e){if(!e.startsWith("data: "))return null;const n=e.slice(6).trim();return n.length===0?null:JSON.parse(n)}async function*Vw(e,n,i){const s={"Content-Type":"application/json",...i==null?void 0:i.headers},a=await fetch(e,{method:"POST",headers:s,body:JSON.stringify(n),signal:i==null?void 0:i.signal});if(!a.ok)throw new Error(`SSE request failed: ${String(a.status)} ${a.statusText}`);yield*u0(a)}async function*Hw(e,n){const i=await fetch(e,{method:"GET",headers:n==null?void 0:n.headers,signal:n==null?void 0:n.signal});if(!i.ok)throw new Error(`SSE request failed: ${String(i.status)} ${i.statusText}`);yield*u0(i)}async function*u0(e){const n=e.body;if(!n)throw new Error("Response body is null");const i=n.getReader(),s=new TextDecoder;let a="";try{for(;;){const{done:l,value:d}=await i.read();if(l)break;a+=s.decode(d,{stream:!0});const f=a.split(`
|
|
73
|
-
`);a=f.pop()??"";for(const m of f){const h=m.trim();if(h.length===0)continue;const y=pg(h);y&&(yield y)}}if(a.trim().length>0){const l=pg(a.trim());l&&(yield l)}}finally{i.releaseLock()}}/**
|
|
74
|
-
* @license
|
|
75
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
76
|
-
* SPDX-License-Identifier: MIT
|
|
77
|
-
*/class $w{constructor(n){wl(this,"runtimeUrl");wl(this,"tenantId");wl(this,"getToken");this.runtimeUrl=n.runtimeUrl.replace(/\/$/,""),this.tenantId=n.tenantId,this.getToken=n.getToken}async authHeaders(){const n={};if(this.getToken){const i=await this.getToken();i&&(n.Authorization=`Bearer ${i}`)}return n}async*chatStream(n,i){const s=`${this.runtimeUrl}/chat`,a={message:n,tenant_id:this.tenantId};i!=null&&i.sessionId&&(a.session_id=i.sessionId),i!=null&&i.context&&(a.context=i.context);const l=await this.authHeaders();yield*Vw(s,a,{signal:i==null?void 0:i.signal,headers:l})}async startTask(n,i){const s=`${this.runtimeUrl}/task`,a=await this.authHeaders(),l={prompt:n,tenant_id:this.tenantId};i&&(l.tenant_token=i);const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...a},body:JSON.stringify(l)});if(!d.ok)throw new Error(`Start task failed: ${String(d.status)} ${d.statusText}`);return await d.json()}async getTaskStatus(n){const i=`${this.runtimeUrl}/task/${n}`,s=await this.authHeaders(),a=await fetch(i,{method:"GET",headers:s});if(!a.ok)throw new Error(`Get task status failed: ${String(a.status)} ${a.statusText}`);return await a.json()}async*streamTask(n,i){const s=`${this.runtimeUrl}/task/${n}/stream`,a=await this.authHeaders();yield*Hw(s,{signal:i,headers:a})}async getStores(n){const i=`${this.runtimeUrl}/api/stores`,s=await this.authHeaders(),a=await fetch(i,{headers:s,signal:n});if(!a.ok)throw new Error(`Failed to fetch stores: ${String(a.status)}`);return(await a.json()).stores}async getStoreDocuments(n,i){const s=new URLSearchParams;i!=null&&i.filter&&s.set("filter",JSON.stringify(i.filter)),i!=null&&i.sort&&s.set("sort",i.sort),(i==null?void 0:i.limit)!==void 0&&s.set("limit",String(i.limit)),(i==null?void 0:i.offset)!==void 0&&s.set("offset",String(i.offset));const a=s.toString(),l=`${this.runtimeUrl}/api/stores/${n}${a?`?${a}`:""}`,d=await this.authHeaders(),f=await fetch(l,{headers:d,signal:i==null?void 0:i.signal});if(!f.ok)throw new Error(`Failed to fetch store documents: ${String(f.status)}`);return await f.json()}async getStoreDocument(n,i,s){const a=`${this.runtimeUrl}/api/stores/${n}/${encodeURIComponent(i)}`,l=await this.authHeaders(),d=await fetch(a,{headers:l,signal:s});if(!d.ok){if(d.status===404)return{document:null,history:[]};throw new Error(`Failed to fetch store document: ${String(d.status)}`)}return await d.json()}}const c0=Y.createContext(null);function Ww({runtimeUrl:e,tenantId:n,getToken:i,children:s}){const a=Y.useMemo(()=>new $w({runtimeUrl:e,tenantId:n,getToken:i}),[e,n,i]),l=Y.useMemo(()=>({client:a,runtimeUrl:e,tenantId:n}),[a,e,n]);return E.jsx(c0.Provider,{value:l,children:s})}function Dh(){const e=Y.useContext(c0);if(!e)throw new Error("useAmodalContext must be used within an <AmodalProvider>");return e}/**
|
|
78
|
-
* @license
|
|
79
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
80
|
-
* SPDX-License-Identifier: MIT
|
|
81
|
-
*/const d0={messages:[],sessionId:null,isStreaming:!1,error:null,activeToolCalls:[],isHistorical:!1,usage:{inputTokens:0,outputTokens:0}};let mg=0;function gg(){return mg++,`msg-${Date.now()}-${String(mg)}`}function Bw(e,n){switch(n.type){case"SEND_MESSAGE":{const i={type:"user",id:gg(),text:n.text,timestamp:new Date().toISOString()},s={type:"assistant_text",id:gg(),text:"",toolCalls:[],confirmations:[],skillActivations:[],kbProposals:[],widgets:[],contentBlocks:[],timestamp:new Date().toISOString()};return{...e,messages:[...e.messages,i,s],isStreaming:!0,error:null,activeToolCalls:[]}}case"STREAM_INIT":return{...e,sessionId:n.sessionId};case"STREAM_TEXT_DELTA":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const a=[...s.contentBlocks],l=a[a.length-1];l&&l.type==="text"?a[a.length-1]={type:"text",text:l.text+n.content}:a.push({type:"text",text:n.content}),i[i.length-1]={...s,text:s.text+n.content,contentBlocks:a}}return{...e,messages:i}}case"STREAM_TOOL_CALL_START":{const i=[...e.messages],s=i[i.length-1],a={toolId:n.toolId,toolName:n.toolName,parameters:n.parameters,status:"running"};if(s&&s.type==="assistant_text"){const l=[...s.toolCalls,a],d=[...s.contentBlocks],f=d[d.length-1];f&&f.type==="tool_calls"?d[d.length-1]={type:"tool_calls",calls:[...f.calls,a]}:d.push({type:"tool_calls",calls:[a]}),i[i.length-1]={...s,toolCalls:l,contentBlocks:d}}return{...e,messages:i,activeToolCalls:[...e.activeToolCalls,a]}}case"STREAM_TOOL_CALL_RESULT":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const l=m=>m.toolId===n.toolId?{...m,status:n.status,result:n.result,duration_ms:n.duration_ms,error:n.error}:m,d=s.toolCalls.map(l),f=s.contentBlocks.map(m=>m.type==="tool_calls"?{...m,calls:m.calls.map(l)}:m);i[i.length-1]={...s,toolCalls:d,contentBlocks:f}}const a=e.activeToolCalls.filter(l=>l.toolId!==n.toolId);return{...e,messages:i,activeToolCalls:a}}case"STREAM_SUBAGENT_EVENT":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const a=f=>f.toolId===n.parentToolId?{...f,subagentEvents:[...f.subagentEvents??[],n.event]}:f,l=s.toolCalls.map(a),d=s.contentBlocks.map(f=>f.type==="tool_calls"?{...f,calls:f.calls.map(a)}:f);i[i.length-1]={...s,toolCalls:l,contentBlocks:d}}return{...e,messages:i}}case"STREAM_WIDGET":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const a={type:"widget",widgetType:n.widgetType,data:n.data};i[i.length-1]={...s,contentBlocks:[...s.contentBlocks,a]}}return{...e,messages:i}}case"STREAM_CONFIRMATION_REQUIRED":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const a={type:"confirmation",confirmation:n.confirmation};i[i.length-1]={...s,confirmations:[...s.confirmations,n.confirmation],contentBlocks:[...s.contentBlocks,a]}}return{...e,messages:i}}case"CONFIRMATION_RESPONDED":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const a=s.confirmations.map(d=>d.correlationId===n.correlationId?{...d,status:n.approved?"approved":"denied"}:d),l=s.contentBlocks.map(d=>d.type==="confirmation"&&d.confirmation.correlationId===n.correlationId?{...d,confirmation:{...d.confirmation,status:n.approved?"approved":"denied"}}:d);i[i.length-1]={...s,confirmations:a,contentBlocks:l}}return{...e,messages:i}}case"STREAM_ERROR":return{...e,isStreaming:!1,error:n.message,activeToolCalls:[]};case"STREAM_DONE":{const i=[...e.messages],s=i[i.length-1];if(s&&s.type==="assistant_text"){const l=m=>m.status==="running"?{...m,status:"error",error:"Stopped"}:m,d=s.toolCalls.map(l),f=s.contentBlocks.map(m=>m.type==="tool_calls"?{...m,calls:m.calls.map(l)}:m);i[i.length-1]={...s,toolCalls:d,contentBlocks:f}}const a=n.usage?{inputTokens:e.usage.inputTokens+n.usage.inputTokens,outputTokens:e.usage.outputTokens+n.usage.outputTokens}:e.usage;return{...e,messages:i,isStreaming:!1,activeToolCalls:[],usage:a}}case"RESET":return{...d0};default:return e}}function qw(e){const{client:n}=Dh(),[i,s]=Y.useReducer(Bw,d0),a=Y.useRef((e==null?void 0:e.initialSessionId)??null),l=Y.useRef(null),d=Y.useRef(e);d.current=e,a.current=i.sessionId??a.current;const f=Y.useCallback(S=>{if(i.isStreaming)return;s({type:"SEND_MESSAGE",text:S});const w=new AbortController;l.current=w,(async()=>{var b,O,D,P,R,V,ne,q,I,Q,J;let T=!1;try{const H=n.chatStream(S,{sessionId:a.current??void 0,context:(b=d.current)==null?void 0:b.context,signal:w.signal});for await(const U of H)switch(U.type){case"init":s({type:"STREAM_INIT",sessionId:U.session_id}),(D=(O=d.current)==null?void 0:O.onSessionCreated)==null||D.call(O,U.session_id);break;case"text_delta":s({type:"STREAM_TEXT_DELTA",content:U.content});break;case"tool_call_start":s({type:"STREAM_TOOL_CALL_START",toolId:U.tool_id,toolName:U.tool_name,parameters:U.parameters});break;case"tool_call_result":s({type:"STREAM_TOOL_CALL_RESULT",toolId:U.tool_id,status:U.status,result:U.result,duration_ms:U.duration_ms,error:U.error}),(R=(P=d.current)==null?void 0:P.onToolCall)==null||R.call(P,{toolId:U.tool_id,toolName:"",parameters:{},status:U.status,result:U.result,duration_ms:U.duration_ms,error:U.error});break;case"subagent_event":s({type:"STREAM_SUBAGENT_EVENT",parentToolId:U.parent_tool_id,event:{agentName:U.agent_name,eventType:U.event_type,toolName:U.tool_name,toolArgs:U.tool_args,result:U.result,text:U.text,error:U.error,timestamp:U.timestamp}});break;case"widget":s({type:"STREAM_WIDGET",widgetType:U.widget_type,data:U.data});break;case"confirmation_required":{const $={endpoint:U.endpoint,method:U.method,reason:U.reason,escalated:U.escalated,params:U.params,connectionName:U.connection_name,correlationId:U.correlation_id,status:"pending"};s({type:"STREAM_CONFIRMATION_REQUIRED",confirmation:$}),(ne=(V=d.current)==null?void 0:V.onConfirmation)==null||ne.call(V,$);break}case"error":s({type:"STREAM_ERROR",message:U.message});break;case"done":T=!0,s({type:"STREAM_DONE",usage:U.usage?{inputTokens:U.usage.input_tokens,outputTokens:U.usage.output_tokens}:void 0}),(I=(q=d.current)==null?void 0:q.onStreamEnd)==null||I.call(q);break;default:break}}catch(H){H instanceof DOMException&&H.name==="AbortError"||s({type:"STREAM_ERROR",message:H instanceof Error?H.message:"Unknown error"})}finally{l.current=null,!T&&!w.signal.aborted&&(s({type:"STREAM_DONE"}),(J=(Q=d.current)==null?void 0:Q.onStreamEnd)==null||J.call(Q))}})()},[n,i.isStreaming]),m=Y.useCallback(()=>{l.current&&(l.current.abort(),l.current=null),s({type:"STREAM_DONE"})},[]),h=Y.useCallback(()=>{l.current&&(l.current.abort(),l.current=null),s({type:"RESET"})},[]),y=Y.useCallback((S,w)=>{s({type:"CONFIRMATION_RESPONDED",correlationId:S,approved:w});const g=w?`I approve the action (correlation: ${S})`:`I deny the action (correlation: ${S})`;i.isStreaming||f(g)},[f,i.isStreaming]);return Y.useEffect(()=>()=>{l.current&&l.current.abort()},[]),{messages:i.messages,send:f,stop:m,isStreaming:i.isStreaming,activeToolCalls:i.activeToolCalls,sessionId:i.sessionId,error:i.error,usage:i.usage,reset:h,respondToConfirmation:y}}/**
|
|
82
|
-
* @license
|
|
83
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
84
|
-
* SPDX-License-Identifier: MIT
|
|
85
|
-
*/function Yw(e,n){const{key:i,refreshInterval:s=3e4}=n,{client:a}=Dh(),[l,d]=Y.useState(null),[f,m]=Y.useState([]),[h,y]=Y.useState(!0),[S,w]=Y.useState(null),g=Y.useRef(null),T=Y.useCallback(async()=>{g.current&&g.current.abort();const O=new AbortController;g.current=O;try{const D=await a.getStoreDocument(e,i,O.signal);d(D.document),m(D.history),w(null)}catch(D){D instanceof DOMException&&D.name==="AbortError"||w(D instanceof Error?D.message:"Failed to fetch document")}finally{y(!1),g.current=null}},[a,e,i]),b=Y.useCallback(()=>{T()},[T]);return Y.useEffect(()=>(y(!0),T(),()=>{g.current&&g.current.abort()}),[T]),Y.useEffect(()=>{if(s<=0)return;const O=setInterval(()=>{T()},s);return()=>clearInterval(O)},[T,s]),{data:(l==null?void 0:l.payload)??null,meta:(l==null?void 0:l.meta)??null,document:l,history:f,isLoading:h,error:S,refetch:b}}/**
|
|
86
|
-
* @license
|
|
87
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
88
|
-
* SPDX-License-Identifier: MIT
|
|
89
|
-
*/function Xw(e,n={}){const{filter:i,sort:s,limit:a=20,refreshInterval:l=3e4}=n,{client:d}=Dh(),[f,m]=Y.useState([]),[h,y]=Y.useState(0),[S,w]=Y.useState(!1),[g,T]=Y.useState(!0),[b,O]=Y.useState(null),D=Y.useRef(null),P=i?JSON.stringify(i):"",R=Y.useCallback(async()=>{D.current&&D.current.abort();const ne=new AbortController;D.current=ne;try{const q=await d.getStoreDocuments(e,{filter:P?JSON.parse(P):void 0,sort:s,limit:a,signal:ne.signal});m(q.documents),y(q.total),w(q.hasMore),O(null)}catch(q){q instanceof DOMException&&q.name==="AbortError"||O(q instanceof Error?q.message:"Failed to fetch store list")}finally{T(!1),D.current=null}},[d,e,P,s,a]),V=Y.useCallback(()=>{R()},[R]);return Y.useEffect(()=>(T(!0),R(),()=>{D.current&&D.current.abort()}),[R]),Y.useEffect(()=>{if(l<=0)return;const ne=setInterval(()=>{R()},l);return()=>clearInterval(ne)},[R,l]),{data:f.map(ne=>ne.payload),documents:f,total:h,hasMore:S,isLoading:g,error:b,refetch:V}}/**
|
|
90
|
-
* @license
|
|
91
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
92
|
-
* SPDX-License-Identifier: MIT
|
|
93
|
-
*/Y.createContext(null);const f0=Y.createContext({name:"",model:"",provider:"",stores:[],connections:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});function Zw({runtimeUrl:e,children:n}){const[i,s]=Y.useState({name:"",model:"",provider:"",stores:[],connections:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});return Y.useEffect(()=>{let a=!1;async function l(){try{const d=await fetch(`${e}/inspect/context`);let f="",m="",h="",y=[],S=[],w=[],g=[];if(d.ok){const O=await d.json();f=O.name??"",m=O.model??"",h=O.provider??"",y=O.connections??[],S=O.skills??[],w=O.automations??[],g=O.knowledge??[]}let T=[];try{const O=await fetch(`${e}/api/stores`);O.ok&&(T=(await O.json()).stores)}catch{}let b=null;try{const O=await fetch(`${e}/config`);O.ok&&(b=(await O.json()).resumeSessionId??null)}catch{}a||s({name:f,model:m,provider:h,stores:T,connections:y,skills:S,automations:w,knowledge:g,resumeSessionId:b,isLoading:!1,error:null})}catch(d){a||s(f=>({...f,isLoading:!1,error:d instanceof Error?d.message:"Failed to load manifest"}))}}return l(),()=>{a=!0}},[e]),E.jsx(f0.Provider,{value:i,children:n})}function tu(){return Y.useContext(f0)}/**
|
|
94
|
-
* @license lucide-react v0.469.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const Qw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),h0=(...e)=>e.filter((n,i,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===i).join(" ").trim();/**
|
|
99
|
-
* @license lucide-react v0.469.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/var Gw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
104
|
-
* @license lucide-react v0.469.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const Kw=Y.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:d,...f},m)=>Y.createElement("svg",{ref:m,...Gw,width:n,height:n,stroke:e,strokeWidth:s?Number(i)*24/Number(n):i,className:h0("lucide",a),...f},[...d.map(([h,y])=>Y.createElement(h,y)),...Array.isArray(l)?l:[l]]));/**
|
|
109
|
-
* @license lucide-react v0.469.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const At=(e,n)=>{const i=Y.forwardRef(({className:s,...a},l)=>Y.createElement(Kw,{ref:l,iconNode:n,className:h0(`lucide-${Qw(e)}`,s),...a}));return i.displayName=`${e}`,i};/**
|
|
114
|
-
* @license lucide-react v0.469.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const kf=At("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
119
|
-
* @license lucide-react v0.469.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const p0=At("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
124
|
-
* @license lucide-react v0.469.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const Kf=At("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
129
|
-
* @license lucide-react v0.469.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const Jw=At("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
134
|
-
* @license lucide-react v0.469.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const m0=At("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
139
|
-
* @license lucide-react v0.469.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const Cc=At("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
144
|
-
* @license lucide-react v0.469.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const g0=At("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
149
|
-
* @license lucide-react v0.469.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const Ic=At("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
154
|
-
* @license lucide-react v0.469.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const ek=At("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
159
|
-
* @license lucide-react v0.469.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const y0=At("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
164
|
-
* @license lucide-react v0.469.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const tk=At("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
169
|
-
* @license lucide-react v0.469.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const nk=At("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
174
|
-
* @license lucide-react v0.469.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const Na=At("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
179
|
-
* @license lucide-react v0.469.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const Jf=At("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
184
|
-
* @license lucide-react v0.469.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const rk=At("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
189
|
-
* @license lucide-react v0.469.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const Ih=At("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
194
|
-
* @license lucide-react v0.469.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const eh=At("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
199
|
-
* @license lucide-react v0.469.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const ik=At("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
204
|
-
* @license lucide-react v0.469.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const th=At("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
209
|
-
* @license lucide-react v0.469.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const sk=At("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
214
|
-
* @license lucide-react v0.469.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const ok=At("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
219
|
-
* @license lucide-react v0.469.0 - ISC
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the ISC license.
|
|
222
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/const ak=At("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
224
|
-
* @license lucide-react v0.469.0 - ISC
|
|
225
|
-
*
|
|
226
|
-
* This source code is licensed under the ISC license.
|
|
227
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/const lk=At("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
229
|
-
* @license lucide-react v0.469.0 - ISC
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the ISC license.
|
|
232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/const Oa=At("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),uk="modulepreload",ck=function(e){return"/"+e},yg={},dk=function(n,i,s){let a=Promise.resolve();if(i&&i.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=d(i.map(h=>{if(h=ck(h),h in yg)return;yg[h]=!0;const y=h.endsWith(".css"),S=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${S}`))return;const w=document.createElement("link");if(w.rel=y?"stylesheet":uk,y||(w.as="script"),w.crossOrigin="",w.href=h,m&&w.setAttribute("nonce",m),document.head.appendChild(w),y)return new Promise((g,T)=>{w.addEventListener("load",g),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&l(f.reason);return n().catch(l)})};function v0(e){var n,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(i=v0(e[n]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function fk(){for(var e,n,i=0,s="",a=arguments.length;i<a;i++)(e=arguments[i])&&(n=v0(e))&&(s&&(s+=" "),s+=n);return s}const jh="-",hk=e=>{const n=mk(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:d=>{const f=d.split(jh);return f[0]===""&&f.length!==1&&f.shift(),x0(f,n)||pk(d)},getConflictingClassGroupIds:(d,f)=>{const m=i[d]||[];return f&&s[d]?[...m,...s[d]]:m}}},x0=(e,n)=>{var d;if(e.length===0)return n.classGroupId;const i=e[0],s=n.nextPart.get(i),a=s?x0(e.slice(1),s):void 0;if(a)return a;if(n.validators.length===0)return;const l=e.join(jh);return(d=n.validators.find(({validator:f})=>f(l)))==null?void 0:d.classGroupId},vg=/^\[(.+)\]$/,pk=e=>{if(vg.test(e)){const n=vg.exec(e)[1],i=n==null?void 0:n.substring(0,n.indexOf(":"));if(i)return"arbitrary.."+i}},mk=e=>{const{theme:n,prefix:i}=e,s={nextPart:new Map,validators:[]};return yk(Object.entries(e.classGroups),i).forEach(([l,d])=>{nh(d,s,l,n)}),s},nh=(e,n,i,s)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?n:xg(n,a);l.classGroupId=i;return}if(typeof a=="function"){if(gk(a)){nh(a(s),n,i,s);return}n.validators.push({validator:a,classGroupId:i});return}Object.entries(a).forEach(([l,d])=>{nh(d,xg(n,l),i,s)})})},xg=(e,n)=>{let i=e;return n.split(jh).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},gk=e=>e.isThemeGetter,yk=(e,n)=>n?e.map(([i,s])=>{const a=s.map(l=>typeof l=="string"?n+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([d,f])=>[n+d,f])):l);return[i,a]}):e,vk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=new Map,s=new Map;const a=(l,d)=>{i.set(l,d),n++,n>e&&(n=0,s=i,i=new Map)};return{get(l){let d=i.get(l);if(d!==void 0)return d;if((d=s.get(l))!==void 0)return a(l,d),d},set(l,d){i.has(l)?i.set(l,d):a(l,d)}}},w0="!",xk=e=>{const{separator:n,experimentalParseClassName:i}=e,s=n.length===1,a=n[0],l=n.length,d=f=>{const m=[];let h=0,y=0,S;for(let O=0;O<f.length;O++){let D=f[O];if(h===0){if(D===a&&(s||f.slice(O,O+l)===n)){m.push(f.slice(y,O)),y=O+l;continue}if(D==="/"){S=O;continue}}D==="["?h++:D==="]"&&h--}const w=m.length===0?f:f.substring(y),g=w.startsWith(w0),T=g?w.substring(1):w,b=S&&S>y?S-y:void 0;return{modifiers:m,hasImportantModifier:g,baseClassName:T,maybePostfixModifierPosition:b}};return i?f=>i({className:f,parseClassName:d}):d},wk=e=>{if(e.length<=1)return e;const n=[];let i=[];return e.forEach(s=>{s[0]==="["?(n.push(...i.sort(),s),i=[]):i.push(s)}),n.push(...i.sort()),n},kk=e=>({cache:vk(e.cacheSize),parseClassName:xk(e),...hk(e)}),Sk=/\s+/,bk=(e,n)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:a}=n,l=[],d=e.trim().split(Sk);let f="";for(let m=d.length-1;m>=0;m-=1){const h=d[m],{modifiers:y,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:g}=i(h);let T=!!g,b=s(T?w.substring(0,g):w);if(!b){if(!T){f=h+(f.length>0?" "+f:f);continue}if(b=s(w),!b){f=h+(f.length>0?" "+f:f);continue}T=!1}const O=wk(y).join(":"),D=S?O+w0:O,P=D+b;if(l.includes(P))continue;l.push(P);const R=a(b,T);for(let V=0;V<R.length;++V){const ne=R[V];l.push(D+ne)}f=h+(f.length>0?" "+f:f)}return f};function Ek(){let e=0,n,i,s="";for(;e<arguments.length;)(n=arguments[e++])&&(i=k0(n))&&(s&&(s+=" "),s+=i);return s}const k0=e=>{if(typeof e=="string")return e;let n,i="";for(let s=0;s<e.length;s++)e[s]&&(n=k0(e[s]))&&(i&&(i+=" "),i+=n);return i};function Ck(e,...n){let i,s,a,l=d;function d(m){const h=n.reduce((y,S)=>S(y),e());return i=kk(h),s=i.cache.get,a=i.cache.set,l=f,f(m)}function f(m){const h=s(m);if(h)return h;const y=bk(m,i);return a(m,y),y}return function(){return l(Ek.apply(null,arguments))}}const _t=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},S0=/^\[(?:([a-z-]+):)?(.+)\]$/i,Tk=/^\d+\/\d+$/,Nk=new Set(["px","full","screen"]),Ok=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ik=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ti=e=>ma(e)||Nk.has(e)||Tk.test(e),ys=e=>Ia(e,"length",Uk),ma=e=>!!e&&!Number.isNaN(Number(e)),Sf=e=>Ia(e,"number",ma),Cl=e=>!!e&&Number.isInteger(Number(e)),Rk=e=>e.endsWith("%")&&ma(e.slice(0,-1)),rt=e=>S0.test(e),vs=e=>Ok.test(e),_k=new Set(["length","size","percentage"]),Pk=e=>Ia(e,_k,b0),Lk=e=>Ia(e,"position",b0),zk=new Set(["image","url"]),Fk=e=>Ia(e,zk,Hk),Ak=e=>Ia(e,"",Vk),Tl=()=>!0,Ia=(e,n,i)=>{const s=S0.exec(e);return s?s[1]?typeof n=="string"?s[1]===n:n.has(s[1]):i(s[2]):!1},Uk=e=>Mk.test(e)&&!Dk.test(e),b0=()=>!1,Vk=e=>Ik.test(e),Hk=e=>jk.test(e),$k=()=>{const e=_t("colors"),n=_t("spacing"),i=_t("blur"),s=_t("brightness"),a=_t("borderColor"),l=_t("borderRadius"),d=_t("borderSpacing"),f=_t("borderWidth"),m=_t("contrast"),h=_t("grayscale"),y=_t("hueRotate"),S=_t("invert"),w=_t("gap"),g=_t("gradientColorStops"),T=_t("gradientColorStopPositions"),b=_t("inset"),O=_t("margin"),D=_t("opacity"),P=_t("padding"),R=_t("saturate"),V=_t("scale"),ne=_t("sepia"),q=_t("skew"),I=_t("space"),Q=_t("translate"),J=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",rt,n],$=()=>[rt,n],ue=()=>["",Ti,ys],ae=()=>["auto",ma,rt],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],xe=()=>["solid","dashed","dotted","double","none"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>["start","end","center","between","around","evenly","stretch"],ve=()=>["","0",rt],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[ma,rt];return{cacheSize:500,separator:":",theme:{colors:[Tl],spacing:[Ti,ys],blur:["none","",vs,rt],brightness:B(),borderColor:[e],borderRadius:["none","","full",vs,rt],borderSpacing:$(),borderWidth:ue(),contrast:B(),grayscale:ve(),hueRotate:B(),invert:ve(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Rk,ys],inset:U(),margin:U(),opacity:B(),padding:$(),saturate:B(),scale:B(),sepia:ve(),skew:B(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",rt]}],container:["container"],columns:[{columns:[vs]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),rt]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cl,rt]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",rt]}],grow:[{grow:ve()}],shrink:[{shrink:ve()}],order:[{order:["first","last","none",Cl,rt]}],"grid-cols":[{"grid-cols":[Tl]}],"col-start-end":[{col:["auto",{span:["full",Cl,rt]},rt]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[Tl]}],"row-start-end":[{row:["auto",{span:[Cl,rt]},rt]}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",rt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",rt]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",rt,n]}],"min-w":[{"min-w":[rt,n,"min","max","fit"]}],"max-w":[{"max-w":[rt,n,"none","full","min","max","fit","prose",{screen:[vs]},vs]}],h:[{h:[rt,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[rt,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[rt,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[rt,n,"auto","min","max","fit"]}],"font-size":[{text:["base",vs,ys]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sf]}],"font-family":[{font:[Tl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",rt]}],"line-clamp":[{"line-clamp":["none",ma,Sf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ti,rt]}],"list-image":[{"list-image":["none",rt]}],"list-style-type":[{list:["none","disc","decimal",rt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ti,ys]}],"underline-offset":[{"underline-offset":["auto",Ti,rt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),Lk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Fk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...xe(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:xe()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...xe()]}],"outline-offset":[{"outline-offset":[Ti,rt]}],"outline-w":[{outline:[Ti,ys]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[Ti,ys]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vs,Ak]}],"shadow-color":[{shadow:[Tl]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ee()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",vs,rt]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[S]}],saturate:[{saturate:[R]}],sepia:[{sepia:[ne]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",rt]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",rt]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",rt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[V]}],"scale-x":[{"scale-x":[V]}],"scale-y":[{"scale-y":[V]}],rotate:[{rotate:[Cl,rt]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",rt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",rt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",rt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ti,ys,Sf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Wk=Ck($k);/**
|
|
234
|
-
* @license
|
|
235
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
236
|
-
* SPDX-License-Identifier: MIT
|
|
237
|
-
*/function Oo(...e){return Wk(fk(e))}function bf({to:e,children:n,end:i}){return E.jsx(Nh,{to:e,end:i,className:({isActive:s})=>Oo("flex items-center gap-2.5 px-3 py-[7px] rounded-md text-[13px] transition-colors duration-150",s?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 font-medium":"text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04]"),children:n})}function Nl({children:e,action:n}){return E.jsxs("div",{className:"px-3 pt-5 pb-1.5 flex items-center justify-between",children:[E.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:e}),n]})}function Ef({label:e,icon:n,children:i,count:s}){const[a,l]=Y.useState(!1);return E.jsxs("div",{children:[E.jsxs("button",{onClick:()=>l(!a),className:"flex items-center gap-2 w-full px-3 py-[7px] rounded-md text-[13px] text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[E.jsx(m0,{className:Oo("h-3 w-3 shrink-0 transition-transform",a&&"rotate-90")}),n,E.jsx("span",{className:"flex-1 text-left",children:e}),E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25",children:String(s)})]}),a&&E.jsx("div",{className:"ml-3 space-y-0.5",children:i})]})}function Cf({icon:e,label:n,to:i}){return E.jsxs(Nh,{to:i,className:({isActive:s})=>Oo("flex items-center gap-2.5 px-3 py-[6px] text-[13px] rounded-md transition-colors duration-150",s?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[e,E.jsx("span",{className:"truncate",children:n})]})}function Bk(){const{stores:e,connections:n,skills:i,automations:s,knowledge:a}=tu(),[l,d]=Y.useState([]),[f,m]=Y.useState([]),[h,y]=Y.useState(new Set),[S,w]=Y.useState(new Set),g=Ma(),T=Io();return Y.useEffect(()=>{fetch("/api/pages").then(b=>b.ok?b.json():null).then(b=>{if(b&&typeof b=="object"&&"pages"in b&&Array.isArray(b.pages)){const O=b.pages;d(O.map(D=>({name:D.name,filePath:""})))}}).catch(()=>{dk(()=>import("./_virtual_amodal-manifest-DIezHQq3.js"),[]).then(b=>{d(b.pages.filter(O=>!O.hidden))}).catch(()=>{})})},[]),Y.useEffect(()=>{const b=()=>{fetch("/automations").then(D=>D.ok?D.json():{automations:[]}).then(D=>{if(D&&typeof D=="object"&&"automations"in D){const P=D.automations,R=new Set(P.filter(V=>V.lastRun&&Date.now()-new Date(V.lastRun).getTime()<5e3).map(V=>V.name));y(R),w(new Set(P.filter(V=>V.running).map(V=>V.name)))}}).catch(()=>{})};b();const O=setInterval(b,3e3);return()=>clearInterval(O)},[]),Y.useEffect(()=>{fetch("/sessions").then(b=>b.ok?b.json():{sessions:[]}).then(b=>{if(b&&typeof b=="object"&&"sessions"in b&&Array.isArray(b.sessions)){const O=b.sessions;m(O.filter(D=>!D.automationName).slice(0,10))}}).catch(()=>{})},[T.pathname]),E.jsx("aside",{className:"w-[260px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex flex-col shrink-0 overflow-hidden",children:E.jsxs("nav",{className:"flex-1 overflow-y-auto scrollbar-thin px-2 py-2",children:[E.jsxs("button",{onClick:()=>{g("/")},className:"flex items-center gap-2.5 w-full px-3 py-2 mb-1 rounded-md text-[13px] text-gray-500 dark:text-white/60 hover:text-gray-800 dark:hover:text-white/90 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[E.jsx(sk,{className:"h-4 w-4 shrink-0"}),"New chat"]}),f.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(Nl,{action:E.jsx(Nh,{to:"/sessions",className:"text-[10px] text-gray-400 dark:text-white/20 hover:text-gray-600 dark:hover:text-white/40 transition-colors",children:"View all"}),children:"Recent"}),E.jsx("div",{className:"space-y-0.5",children:f.map(b=>{const O=T.search.includes(b.id);return E.jsxs("button",{onClick:()=>{g(`/?resume=${b.id}`)},className:Oo("flex items-center gap-2 w-full px-3 py-[6px] rounded-md text-[12px] text-left transition-colors duration-150 truncate",O?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[E.jsx(Jf,{className:"h-3 w-3 shrink-0 opacity-40"}),E.jsx("span",{className:"truncate",children:b.summary})]},b.id)})})]}),l.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(Nl,{children:"Pages"}),E.jsx("div",{className:"space-y-0.5",children:l.map(b=>E.jsxs(bf,{to:`/pages/${b.name}`,children:[E.jsx(nk,{className:"h-4 w-4 shrink-0"}),E.jsx("span",{className:"truncate",children:qk(b.name)})]},b.name))})]}),s.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(Nl,{children:"Automations"}),[...s].sort().map(b=>{const O=S.has(b),D=h.has(b);return E.jsxs(bf,{to:`/automations/${encodeURIComponent(b)}`,children:[D?E.jsx(Na,{className:"h-3.5 w-3.5 shrink-0 text-purple-400 animate-spin"}):E.jsx(Oa,{className:Oo("h-3.5 w-3.5 shrink-0",O?"text-purple-500":"text-purple-500/30")}),E.jsx("span",{className:Oo("truncate",!O&&!D&&"opacity-40"),children:b.replace(/[-_]/g," ").replace(/\b\w/g,P=>P.toUpperCase())}),O&&E.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 shrink-0 ml-auto"})]},b)})]}),(n.length>0||i.length>0||a.length>0)&&E.jsx(Nl,{children:"Agent"}),n.length>0&&E.jsx(Ef,{label:"Connections",icon:E.jsx(eh,{className:"h-3.5 w-3.5 shrink-0 text-emerald-500/60"}),count:n.length,children:n.map(b=>E.jsx(Cf,{icon:E.jsx(eh,{className:"h-3 w-3 shrink-0 text-emerald-500/40"}),label:b,to:`/inspect/connections/${encodeURIComponent(b)}`},b))}),i.length>0&&E.jsx(Ef,{label:"Skills",icon:E.jsx(th,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),count:i.length,children:i.map(b=>E.jsx(Cf,{icon:E.jsx(th,{className:"h-3 w-3 shrink-0 text-amber-500/40"}),label:b,to:`/inspect/skills/${encodeURIComponent(b)}`},b))}),a.length>0&&E.jsx(Ef,{label:"Knowledge",icon:E.jsx(Kf,{className:"h-3.5 w-3.5 shrink-0 text-blue-500/60"}),count:a.length,children:a.map(b=>E.jsx(Cf,{icon:E.jsx(Kf,{className:"h-3 w-3 shrink-0 text-blue-500/40"}),label:b,to:`/inspect/knowledge/${encodeURIComponent(b)}`},b))}),e.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(Nl,{children:"Entities"}),E.jsx("div",{className:"space-y-0.5",children:e.map(b=>E.jsxs(bf,{to:`/entities/${b.name}`,children:[E.jsx(y0,{className:"h-4 w-4 shrink-0"}),E.jsx("span",{className:"flex-1 truncate",children:b.entity.name}),b.documentCount>0&&E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/30 tabular-nums bg-gray-200 dark:bg-white/[0.06] px-1.5 py-0.5 rounded-full",children:b.documentCount.toLocaleString()})]},b.name))})]})]})})}function qk(e){return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function Yk(){const[e,n]=Y.useState("checking"),i=Y.useRef();return Y.useEffect(()=>{const s=()=>{fetch("/inspect/health",{signal:AbortSignal.timeout(3e3)}).then(a=>{n(a.ok?"connected":"disconnected")}).catch(()=>{n("disconnected")})};return s(),i.current=setInterval(s,1e4),()=>clearInterval(i.current)},[]),e}function Xk(){const[e,n]=Y.useState(()=>document.documentElement.classList.contains("dark")),i=Y.useCallback(()=>{const s=!e;n(s),document.documentElement.classList.toggle("dark",s);try{localStorage.setItem("amodal-theme",s?"dark":"light")}catch{}},[e]);return Y.useEffect(()=>{try{localStorage.getItem("amodal-theme")==="light"&&(n(!1),document.documentElement.classList.remove("dark"))}catch{}},[]),{dark:e,toggle:i}}function Zk(){const{name:e,model:n}=tu(),{dark:i,toggle:s}=Xk(),a=Yk();return E.jsxs("div",{className:"flex flex-col h-screen overflow-hidden bg-white dark:bg-[#0a0a0f]",children:[E.jsxs("header",{className:"h-14 bg-gray-50 dark:bg-[#0f0f17] border-b border-gray-200 dark:border-white/[0.06] text-gray-900 dark:text-white flex items-center justify-between px-5 shrink-0 z-20",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[E.jsx("defs",{children:E.jsx("clipPath",{id:"logo-sq",children:E.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),E.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),E.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),E.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#logo-sq)"})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"font-semibold tracking-tight text-[15px] text-gray-900 dark:text-white/90",children:"amodal"}),e&&E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"text-gray-300 dark:text-white/20",children:"/"}),E.jsx("span",{className:"text-[13px] text-gray-500 dark:text-white/50 font-medium",children:e})]})]})]}),E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("button",{onClick:s,className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:i?"Switch to light mode":"Switch to dark mode",children:i?E.jsx(ok,{className:"h-4 w-4"}):E.jsx(rk,{className:"h-4 w-4"})}),n&&E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25 font-mono",children:n.replace(/-\d{8}$/,"")}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:`h-2 w-2 rounded-full ${a==="connected"?"bg-emerald-400 animate-pulse":a==="checking"?"bg-amber-400 animate-pulse":"bg-red-400"}`}),E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/40 font-medium tracking-wide uppercase",children:a==="connected"?"Connected":a==="checking"?"Connecting":"Disconnected"})]})]})]}),E.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[E.jsx(Bk,{}),E.jsx("main",{className:"flex-1 overflow-auto bg-white dark:bg-[#0a0a0f] scrollbar-thin",children:E.jsx(A1,{})})]})]})}function Qk(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Gk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jk={};function wg(e,n){return(Jk.jsx?Kk:Gk).test(e)}const eS=/[ \t\n\f\r]/g;function tS(e){return typeof e=="object"?e.type==="text"?kg(e.value):!1:kg(e)}function kg(e){return e.replace(eS,"")===""}class nu{constructor(n,i,s){this.normal=i,this.property=n,s&&(this.space=s)}}nu.prototype.normal={};nu.prototype.property={};nu.prototype.space=void 0;function E0(e,n){const i={},s={};for(const a of e)Object.assign(i,a.property),Object.assign(s,a.normal);return new nu(i,s,n)}function rh(e){return e.toLowerCase()}class Vn{constructor(n,i){this.attribute=i,this.property=n}}Vn.prototype.attribute="";Vn.prototype.booleanish=!1;Vn.prototype.boolean=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.defined=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.number=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.property="";Vn.prototype.spaceSeparated=!1;Vn.prototype.space=void 0;let nS=0;const it=jo(),Kt=jo(),ih=jo(),ke=jo(),Dt=jo(),ga=jo(),Gn=jo();function jo(){return 2**++nS}const sh=Object.freeze(Object.defineProperty({__proto__:null,boolean:it,booleanish:Kt,commaOrSpaceSeparated:Gn,commaSeparated:ga,number:ke,overloadedBoolean:ih,spaceSeparated:Dt},Symbol.toStringTag,{value:"Module"})),Tf=Object.keys(sh);class Rh extends Vn{constructor(n,i,s,a){let l=-1;if(super(n,i),Sg(this,"space",a),typeof s=="number")for(;++l<Tf.length;){const d=Tf[l];Sg(this,Tf[l],(s&sh[d])===sh[d])}}}Rh.prototype.defined=!0;function Sg(e,n,i){i&&(e[n]=i)}function ja(e){const n={},i={};for(const[s,a]of Object.entries(e.properties)){const l=new Rh(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(l.mustUseProperty=!0),n[s]=l,i[rh(s)]=s,i[rh(l.attribute)]=s}return new nu(n,i,e.space)}const C0=ja({properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Dt,ariaCurrent:null,ariaDescribedBy:Dt,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:Dt,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:Dt,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dt,ariaLevel:ke,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:Dt,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:Dt,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Kt,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function T0(e,n){return n in e?e[n]:n}function N0(e,n){return T0(e,n.toLowerCase())}const rS=ja({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ga,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:it,allowPaymentRequest:it,allowUserMedia:it,alt:null,as:null,async:it,autoCapitalize:null,autoComplete:Dt,autoFocus:it,autoPlay:it,blocking:Dt,capture:null,charSet:null,checked:it,cite:null,className:Dt,cols:ke,colSpan:null,content:null,contentEditable:Kt,controls:it,controlsList:Dt,coords:ke|ga,crossOrigin:null,data:null,dateTime:null,decoding:null,default:it,defer:it,dir:null,dirName:null,disabled:it,download:ih,draggable:Kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:it,formTarget:null,headers:Dt,height:ke,hidden:ih,high:ke,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:null,inert:it,inputMode:null,integrity:null,is:null,isMap:it,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:it,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:it,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:it,muted:it,name:null,nonce:null,noModule:it,noValidate:it,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:it,optimum:ke,pattern:null,ping:Dt,placeholder:null,playsInline:it,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:it,referrerPolicy:null,rel:Dt,required:it,reversed:it,rows:ke,rowSpan:ke,sandbox:Dt,scope:null,scoped:it,seamless:it,selected:it,shadowRootClonable:it,shadowRootDelegatesFocus:it,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:it,useMap:null,value:Kt,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:it,declare:it,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:it,noHref:it,noShade:it,noWrap:it,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Kt,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:it,disableRemotePlayback:it,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:N0}),iS=ja({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",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:Gn,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Dt,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:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:it,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,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:ga,g2:ga,glyphName:ga,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,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:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,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:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:Gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gn,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:T0}),O0=ja({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),M0=ja({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:N0}),D0=ja({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),sS={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"},oS=/[A-Z]/g,bg=/-[a-z]/g,aS=/^data[-\w.:]+$/i;function lS(e,n){const i=rh(n);let s=n,a=Vn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&aS.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(bg,cS);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!bg.test(l)){let d=l.replace(oS,uS);d.charAt(0)!=="-"&&(d="-"+d),n="data"+d}}a=Rh}return new a(s,n)}function uS(e){return"-"+e.toLowerCase()}function cS(e){return e.charAt(1).toUpperCase()}const dS=E0([C0,rS,O0,M0,D0],"html"),_h=E0([C0,iS,O0,M0,D0],"svg");function fS(e){return e.join(" ").trim()}var fa={},Nf,Eg;function hS(){if(Eg)return Nf;Eg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
238
|
-
`,h="/",y="*",S="",w="comment",g="declaration";function T(O,D){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];D=D||{};var P=1,R=1;function V(ae){var ie=ae.match(n);ie&&(P+=ie.length);var xe=ae.lastIndexOf(m);R=~xe?ae.length-xe:R+ae.length}function ne(){var ae={line:P,column:R};return function(ie){return ie.position=new q(ae),J(),ie}}function q(ae){this.start=ae,this.end={line:P,column:R},this.source=D.source}q.prototype.content=O;function I(ae){var ie=new Error(D.source+":"+P+":"+R+": "+ae);if(ie.reason=ae,ie.filename=D.source,ie.line=P,ie.column=R,ie.source=O,!D.silent)throw ie}function Q(ae){var ie=ae.exec(O);if(ie){var xe=ie[0];return V(xe),O=O.slice(xe.length),ie}}function J(){Q(i)}function H(ae){var ie;for(ae=ae||[];ie=U();)ie!==!1&&ae.push(ie);return ae}function U(){var ae=ne();if(!(h!=O.charAt(0)||y!=O.charAt(1))){for(var ie=2;S!=O.charAt(ie)&&(y!=O.charAt(ie)||h!=O.charAt(ie+1));)++ie;if(ie+=2,S===O.charAt(ie-1))return I("End of comment missing");var xe=O.slice(2,ie-2);return R+=2,V(xe),O=O.slice(ie),R+=2,ae({type:w,comment:xe})}}function $(){var ae=ne(),ie=Q(s);if(ie){if(U(),!Q(a))return I("property missing ':'");var xe=Q(l),Ee=ae({type:g,property:b(ie[0].replace(e,S)),value:xe?b(xe[0].replace(e,S)):S});return Q(d),Ee}}function ue(){var ae=[];H(ae);for(var ie;ie=$();)ie!==!1&&(ae.push(ie),H(ae));return ae}return J(),ue()}function b(O){return O?O.replace(f,S):S}return Nf=T,Nf}var Cg;function pS(){if(Cg)return fa;Cg=1;var e=fa&&fa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=i;const n=e(hS());function i(s,a){let l=null;if(!s||typeof s!="string")return l;const d=(0,n.default)(s),f=typeof a=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:y}=m;f?a(h,y,m):y&&(l=l||{},l[h]=y)}),l}return fa}var Ol={},Tg;function mS(){if(Tg)return Ol;Tg=1,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,l=function(h){return!h||i.test(h)||e.test(h)},d=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},m=function(h,y){return y===void 0&&(y={}),l(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(a,f):h=h.replace(s,f),h.replace(n,d))};return Ol.camelCase=m,Ol}var Ml,Ng;function gS(){if(Ng)return Ml;Ng=1;var e=Ml&&Ml.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},n=e(pS()),i=mS();function s(a,l){var d={};return!a||typeof a!="string"||(0,n.default)(a,function(f,m){f&&m&&(d[(0,i.camelCase)(f,l)]=m)}),d}return s.default=s,Ml=s,Ml}var yS=gS();const vS=Kl(yS),I0=j0("end"),Ph=j0("start");function j0(e){return n;function n(i){const s=i&&i.position&&i.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function xS(e){const n=Ph(e),i=I0(e);if(n&&i)return{start:n,end:i}}function Vl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Og(e.position):"start"in e||"end"in e?Og(e):"line"in e||"column"in e?oh(e):""}function oh(e){return Mg(e&&e.line)+":"+Mg(e&&e.column)}function Og(e){return oh(e&&e.start)+"-"+oh(e&&e.end)}function Mg(e){return e&&typeof e=="number"?e:1}class yn extends Error{constructor(n,i,s){super(),typeof i=="string"&&(s=i,i=void 0);let a="",l={},d=!1;if(i&&("line"in i&&"column"in i?l={place:i}:"start"in i&&"end"in i?l={place:i}:"type"in i?l={ancestors:[i],place:i.position}:l={...i}),typeof n=="string"?a=n:!l.cause&&n&&(d=!0,a=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof s=="string"){const m=s.indexOf(":");m===-1?l.ruleId=s:(l.source=s.slice(0,m),l.ruleId=s.slice(m+1))}if(!l.place&&l.ancestors&&l.ancestors){const m=l.ancestors[l.ancestors.length-1];m&&(l.place=m.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=f?f.line:void 0,this.name=Vl(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=d&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}yn.prototype.file="";yn.prototype.name="";yn.prototype.reason="";yn.prototype.message="";yn.prototype.stack="";yn.prototype.column=void 0;yn.prototype.line=void 0;yn.prototype.ancestors=void 0;yn.prototype.cause=void 0;yn.prototype.fatal=void 0;yn.prototype.place=void 0;yn.prototype.ruleId=void 0;yn.prototype.source=void 0;const Lh={}.hasOwnProperty,wS=new Map,kS=/[A-Z]/g,SS=new Set(["table","tbody","thead","tfoot","tr"]),bS=new Set(["td","th"]),R0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ES(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let s;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=jS(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=IS(i,n.jsx,n.jsxs)}const a={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:s,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?_h:dS,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=_0(a,e,void 0);return l&&typeof l!="string"?l:a.create(e,a.Fragment,{children:l||void 0},void 0)}function _0(e,n,i){if(n.type==="element")return CS(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return TS(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return OS(e,n,i);if(n.type==="mdxjsEsm")return NS(e,n);if(n.type==="root")return MS(e,n,i);if(n.type==="text")return DS(e,n)}function CS(e,n,i){const s=e.schema;let a=s;n.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=_h,e.schema=a),e.ancestors.push(n);const l=L0(e,n.tagName,!1),d=RS(e,n);let f=Fh(e,n);return SS.has(n.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!tS(m):!0})),P0(e,d,l,n),zh(d,f),e.ancestors.pop(),e.schema=s,e.create(n,l,d,i)}function TS(e,n){if(n.data&&n.data.estree&&e.evaluater){const s=n.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Xl(e,n.position)}function NS(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Xl(e,n.position)}function OS(e,n,i){const s=e.schema;let a=s;n.name==="svg"&&s.space==="html"&&(a=_h,e.schema=a),e.ancestors.push(n);const l=n.name===null?e.Fragment:L0(e,n.name,!0),d=_S(e,n),f=Fh(e,n);return P0(e,d,l,n),zh(d,f),e.ancestors.pop(),e.schema=s,e.create(n,l,d,i)}function MS(e,n,i){const s={};return zh(s,Fh(e,n)),e.create(n,e.Fragment,s,i)}function DS(e,n){return n.value}function P0(e,n,i,s){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=s)}function zh(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function IS(e,n,i){return s;function s(a,l,d,f){const h=Array.isArray(d.children)?i:n;return f?h(l,d,f):h(l,d)}}function jS(e,n){return i;function i(s,a,l,d){const f=Array.isArray(l.children),m=Ph(s);return n(a,l,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function RS(e,n){const i={};let s,a;for(a in n.properties)if(a!=="children"&&Lh.call(n.properties,a)){const l=PS(e,a,n.properties[a]);if(l){const[d,f]=l;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&bS.has(n.tagName)?s=f:i[d]=f}}if(s){const l=i.style||(i.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return i}function _S(e,n){const i={};for(const s of n.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const l=s.data.estree.body[0];l.type;const d=l.expression;d.type;const f=d.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Xl(e,n.position);else{const a=s.name;let l;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else Xl(e,n.position);else l=s.value===null?!0:s.value;i[a]=l}return i}function Fh(e,n){const i=[];let s=-1;const a=e.passKeys?new Map:wS;for(;++s<n.children.length;){const l=n.children[s];let d;if(e.passKeys){const m=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(m){const h=a.get(m)||0;d=m+"-"+h,a.set(m,h+1)}}const f=_0(e,l,d);f!==void 0&&i.push(f)}return i}function PS(e,n,i){const s=lS(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=s.commaSeparated?Qk(i):fS(i)),s.property==="style"){let a=typeof i=="object"?i:LS(e,String(i));return e.stylePropertyNameCase==="css"&&(a=zS(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?sS[s.property]||s.property:s.attribute,i]}}function LS(e,n){try{return vS(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const s=i,a=new yn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=R0+"#cannot-parse-style-attribute",a}}function L0(e,n,i){let s;if(!i)s={type:"Literal",value:n};else if(n.includes(".")){const a=n.split(".");let l=-1,d;for(;++l<a.length;){const f=wg(a[l])?{type:"Identifier",name:a[l]}:{type:"Literal",value:a[l]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}s=d}else s=wg(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(s.type==="Literal"){const a=s.value;return Lh.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);Xl(e)}function Xl(e,n){const i=new yn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=R0+"#cannot-handle-mdx-estrees-without-createevaluater",i}function zS(e){const n={};let i;for(i in e)Lh.call(e,i)&&(n[FS(i)]=e[i]);return n}function FS(e){let n=e.replace(kS,AS);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function AS(e){return"-"+e.toLowerCase()}const Of={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"]},US={};function VS(e,n){const i=US,s=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,a=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return z0(e,s,a)}function z0(e,n,i){if(HS(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Dg(e.children,n,i)}return Array.isArray(e)?Dg(e,n,i):""}function Dg(e,n,i){const s=[];let a=-1;for(;++a<e.length;)s[a]=z0(e[a],n,i);return s.join("")}function HS(e){return!!(e&&typeof e=="object")}const Ig=document.createElement("i");function Ah(e){const n="&"+e+";";Ig.innerHTML=n;const i=Ig.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function si(e,n,i,s){const a=e.length;let l=0,d;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,i=i>0?i:0,s.length<1e4)d=Array.from(s),d.unshift(n,i),e.splice(...d);else for(i&&e.splice(n,i);l<s.length;)d=s.slice(l,l+1e4),d.unshift(n,0),e.splice(...d),l+=1e4,n+=1e4}function vr(e,n){return e.length>0?(si(e,e.length,0,n),e):n}const jg={}.hasOwnProperty;function $S(e){const n={};let i=-1;for(;++i<e.length;)WS(n,e[i]);return n}function WS(e,n){let i;for(i in n){const a=(jg.call(e,i)?e[i]:void 0)||(e[i]={}),l=n[i];let d;if(l)for(d in l){jg.call(a,d)||(a[d]=[]);const f=l[d];BS(a[d],Array.isArray(f)?f:f?[f]:[])}}}function BS(e,n){let i=-1;const s=[];for(;++i<n.length;)(n[i].add==="after"?e:s).push(n[i]);si(e,0,0,s)}function F0(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function ya(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ii=_s(/[A-Za-z]/),er=_s(/[\dA-Za-z]/),qS=_s(/[#-'*+\--9=?A-Z^-~]/);function ah(e){return e!==null&&(e<32||e===127)}const lh=_s(/\d/),YS=_s(/[\dA-Fa-f]/),XS=_s(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function Un(e){return e!==null&&(e<0||e===32)}function bt(e){return e===-2||e===-1||e===32}const ZS=_s(new RegExp("\\p{P}|\\p{S}","u")),QS=_s(/\s/);function _s(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ra(e){const n=[];let i=-1,s=0,a=0;for(;++i<e.length;){const l=e.charCodeAt(i);let d="";if(l===37&&er(e.charCodeAt(i+1))&&er(e.charCodeAt(i+2)))a=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(d=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(i+1);l<56320&&f>56319&&f<57344?(d=String.fromCharCode(l,f),a=1):d="�"}else d=String.fromCharCode(l);d&&(n.push(e.slice(s,i),encodeURIComponent(d)),s=i+a+1,d=""),a&&(i+=a,a=0)}return n.join("")+e.slice(s)}function It(e,n,i,s){const a=s?s-1:Number.POSITIVE_INFINITY;let l=0;return d;function d(m){return bt(m)?(e.enter(i),f(m)):n(m)}function f(m){return bt(m)&&l++<a?(e.consume(m),f):(e.exit(i),n(m))}}const GS={tokenize:KS};function KS(e){const n=e.attempt(this.parser.constructs.contentInitial,s,a);let i;return n;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),It(e,n,"linePrefix")}function a(f){return e.enter("paragraph"),l(f)}function l(f){const m=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return et(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),d)}}const JS={tokenize:eb},Rg={tokenize:tb};function eb(e){const n=this,i=[];let s=0,a,l,d;return f;function f(R){if(s<i.length){const V=i[s];return n.containerState=V[1],e.attempt(V[0].continuation,m,h)(R)}return h(R)}function m(R){if(s++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&P();const V=n.events.length;let ne=V,q;for(;ne--;)if(n.events[ne][0]==="exit"&&n.events[ne][1].type==="chunkFlow"){q=n.events[ne][1].end;break}D(s);let I=V;for(;I<n.events.length;)n.events[I][1].end={...q},I++;return si(n.events,ne+1,0,n.events.slice(V)),n.events.length=I,h(R)}return f(R)}function h(R){if(s===i.length){if(!a)return w(R);if(a.currentConstruct&&a.currentConstruct.concrete)return T(R);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Rg,y,S)(R)}function y(R){return a&&P(),D(s),w(R)}function S(R){return n.parser.lazy[n.now().line]=s!==i.length,d=n.now().offset,T(R)}function w(R){return n.containerState={},e.attempt(Rg,g,T)(R)}function g(R){return s++,i.push([n.currentConstruct,n.containerState]),w(R)}function T(R){if(R===null){a&&P(),D(0),e.consume(R);return}return a=a||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:l}),b(R)}function b(R){if(R===null){O(e.exit("chunkFlow"),!0),D(0),e.consume(R);return}return et(R)?(e.consume(R),O(e.exit("chunkFlow")),s=0,n.interrupt=void 0,f):(e.consume(R),b)}function O(R,V){const ne=n.sliceStream(R);if(V&&ne.push(null),R.previous=l,l&&(l.next=R),l=R,a.defineSkip(R.start),a.write(ne),n.parser.lazy[R.start.line]){let q=a.events.length;for(;q--;)if(a.events[q][1].start.offset<d&&(!a.events[q][1].end||a.events[q][1].end.offset>d))return;const I=n.events.length;let Q=I,J,H;for(;Q--;)if(n.events[Q][0]==="exit"&&n.events[Q][1].type==="chunkFlow"){if(J){H=n.events[Q][1].end;break}J=!0}for(D(s),q=I;q<n.events.length;)n.events[q][1].end={...H},q++;si(n.events,Q+1,0,n.events.slice(I)),n.events.length=q}}function D(R){let V=i.length;for(;V-- >R;){const ne=i[V];n.containerState=ne[1],ne[0].exit.call(n,e)}i.length=R}function P(){a.write([null]),l=void 0,a=void 0,n.containerState._closeFlow=void 0}}function tb(e,n,i){return It(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _g(e){if(e===null||Un(e)||QS(e))return 1;if(ZS(e))return 2}function Uh(e,n,i){const s=[];let a=-1;for(;++a<e.length;){const l=e[a].resolveAll;l&&!s.includes(l)&&(n=l(n,i),s.push(l))}return n}const uh={name:"attention",resolveAll:nb,tokenize:rb};function nb(e,n){let i=-1,s,a,l,d,f,m,h,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(s=i;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&n.sliceSerialize(e[s][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[s][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;m=e[s][1].end.offset-e[s][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const S={...e[s][1].end},w={...e[i][1].start};Pg(S,-m),Pg(w,m),d={type:m>1?"strongSequence":"emphasisSequence",start:S,end:{...e[s][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:w},l={type:m>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[i][1].start}},a={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[s][1].end={...d.start},e[i][1].start={...f.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=vr(h,[["enter",e[s][1],n],["exit",e[s][1],n]])),h=vr(h,[["enter",a,n],["enter",d,n],["exit",d,n],["enter",l,n]]),h=vr(h,Uh(n.parser.constructs.insideSpan.null,e.slice(s+1,i),n)),h=vr(h,[["exit",l,n],["enter",f,n],["exit",f,n],["exit",a,n]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=vr(h,[["enter",e[i][1],n],["exit",e[i][1],n]])):y=0,si(e,s-1,i-s+3,h),i=s+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function rb(e,n){const i=this.parser.constructs.attentionMarkers.null,s=this.previous,a=_g(s);let l;return d;function d(m){return l=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===l)return e.consume(m),f;const h=e.exit("attentionSequence"),y=_g(m),S=!y||y===2&&a||i.includes(m),w=!a||a===2&&y||i.includes(s);return h._open=!!(l===42?S:S&&(a||!w)),h._close=!!(l===42?w:w&&(y||!S)),n(m)}}function Pg(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const ib={name:"autolink",tokenize:sb};function sb(e,n,i){let s=0;return a;function a(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(g){return ii(g)?(e.consume(g),d):g===64?i(g):h(g)}function d(g){return g===43||g===45||g===46||er(g)?(s=1,f(g)):h(g)}function f(g){return g===58?(e.consume(g),s=0,m):(g===43||g===45||g===46||er(g))&&s++<32?(e.consume(g),f):(s=0,h(g))}function m(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):g===null||g===32||g===60||ah(g)?i(g):(e.consume(g),m)}function h(g){return g===64?(e.consume(g),y):qS(g)?(e.consume(g),h):i(g)}function y(g){return er(g)?S(g):i(g)}function S(g){return g===46?(e.consume(g),s=0,y):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),n):w(g)}function w(g){if((g===45||er(g))&&s++<63){const T=g===45?w:S;return e.consume(g),T}return i(g)}}const jc={partial:!0,tokenize:ob};function ob(e,n,i){return s;function s(l){return bt(l)?It(e,a,"linePrefix")(l):a(l)}function a(l){return l===null||et(l)?n(l):i(l)}}const A0={continuation:{tokenize:lb},exit:ub,name:"blockQuote",tokenize:ab};function ab(e,n,i){const s=this;return a;function a(d){if(d===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),l}return i(d)}function l(d){return bt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(d))}}function lb(e,n,i){const s=this;return a;function a(d){return bt(d)?It(e,l,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):l(d)}function l(d){return e.attempt(A0,n,i)(d)}}function ub(e){e.exit("blockQuote")}const U0={name:"characterEscape",tokenize:cb};function cb(e,n,i){return s;function s(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),a}function a(l){return XS(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(l)}}const V0={name:"characterReference",tokenize:db};function db(e,n,i){const s=this;let a=0,l,d;return f;function f(S){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(S),e.exit("characterReferenceMarker"),m}function m(S){return S===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(S),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,d=er,y(S))}function h(S){return S===88||S===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(S),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,d=YS,y):(e.enter("characterReferenceValue"),l=7,d=lh,y(S))}function y(S){if(S===59&&a){const w=e.exit("characterReferenceValue");return d===er&&!Ah(s.sliceSerialize(w))?i(S):(e.enter("characterReferenceMarker"),e.consume(S),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return d(S)&&a++<l?(e.consume(S),y):i(S)}}const Lg={partial:!0,tokenize:hb},zg={concrete:!0,name:"codeFenced",tokenize:fb};function fb(e,n,i){const s=this,a={partial:!0,tokenize:ne};let l=0,d=0,f;return m;function m(q){return h(q)}function h(q){const I=s.events[s.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=q,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(q)}function y(q){return q===f?(d++,e.consume(q),y):d<3?i(q):(e.exit("codeFencedFenceSequence"),bt(q)?It(e,S,"whitespace")(q):S(q))}function S(q){return q===null||et(q)?(e.exit("codeFencedFence"),s.interrupt?n(q):e.check(Lg,b,V)(q)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(q))}function w(q){return q===null||et(q)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),S(q)):bt(q)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),It(e,g,"whitespace")(q)):q===96&&q===f?i(q):(e.consume(q),w)}function g(q){return q===null||et(q)?S(q):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(q))}function T(q){return q===null||et(q)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),S(q)):q===96&&q===f?i(q):(e.consume(q),T)}function b(q){return e.attempt(a,V,O)(q)}function O(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),D}function D(q){return l>0&&bt(q)?It(e,P,"linePrefix",l+1)(q):P(q)}function P(q){return q===null||et(q)?e.check(Lg,b,V)(q):(e.enter("codeFlowValue"),R(q))}function R(q){return q===null||et(q)?(e.exit("codeFlowValue"),P(q)):(e.consume(q),R)}function V(q){return e.exit("codeFenced"),n(q)}function ne(q,I,Q){let J=0;return H;function H(ie){return q.enter("lineEnding"),q.consume(ie),q.exit("lineEnding"),U}function U(ie){return q.enter("codeFencedFence"),bt(ie)?It(q,$,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):$(ie)}function $(ie){return ie===f?(q.enter("codeFencedFenceSequence"),ue(ie)):Q(ie)}function ue(ie){return ie===f?(J++,q.consume(ie),ue):J>=d?(q.exit("codeFencedFenceSequence"),bt(ie)?It(q,ae,"whitespace")(ie):ae(ie)):Q(ie)}function ae(ie){return ie===null||et(ie)?(q.exit("codeFencedFence"),I(ie)):Q(ie)}}}function hb(e,n,i){const s=this;return a;function a(d){return d===null?i(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l)}function l(d){return s.parser.lazy[s.now().line]?i(d):n(d)}}const Mf={name:"codeIndented",tokenize:mb},pb={partial:!0,tokenize:gb};function mb(e,n,i){const s=this;return a;function a(h){return e.enter("codeIndented"),It(e,l,"linePrefix",5)(h)}function l(h){const y=s.events[s.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(h):i(h)}function d(h){return h===null?m(h):et(h)?e.attempt(pb,d,m)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||et(h)?(e.exit("codeFlowValue"),d(h)):(e.consume(h),f)}function m(h){return e.exit("codeIndented"),n(h)}}function gb(e,n,i){const s=this;return a;function a(d){return s.parser.lazy[s.now().line]?i(d):et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):It(e,l,"linePrefix",5)(d)}function l(d){const f=s.events[s.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(d):et(d)?a(d):i(d)}}const yb={name:"codeText",previous:xb,resolve:vb,tokenize:wb};function vb(e){let n=e.length-4,i=3,s,a;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(s=i;++s<n;)if(e[s][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(s=i-1,n++;++s<=n;)a===void 0?s!==n&&e[s][1].type!=="lineEnding"&&(a=s):(s===n||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),n-=s-a-2,s=a+2),a=void 0);return e}function xb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wb(e,n,i){let s=0,a,l;return d;function d(S){return e.enter("codeText"),e.enter("codeTextSequence"),f(S)}function f(S){return S===96?(e.consume(S),s++,f):(e.exit("codeTextSequence"),m(S))}function m(S){return S===null?i(S):S===32?(e.enter("space"),e.consume(S),e.exit("space"),m):S===96?(l=e.enter("codeTextSequence"),a=0,y(S)):et(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(S))}function h(S){return S===null||S===32||S===96||et(S)?(e.exit("codeTextData"),m(S)):(e.consume(S),h)}function y(S){return S===96?(e.consume(S),a++,y):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),n(S)):(l.type="codeTextData",h(S))}}class kb{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const s=i??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(n,s):n>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(n,i,s){const a=i||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&Dl(this.left,s),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Dl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Dl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);Dl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Dl(this.left,i.reverse())}}}function Dl(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function H0(e){const n={};let i=-1,s,a,l,d,f,m,h;const y=new kb(e);for(;++i<y.length;){for(;i in n;)i=n[i];if(s=y.get(i),i&&s[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=s[1]._tokenizer.events,l=0,l<m.length&&m[l][1].type==="lineEndingBlank"&&(l+=2),l<m.length&&m[l][1].type==="content"))for(;++l<m.length&&m[l][1].type!=="content";)m[l][1].type==="chunkText"&&(m[l][1]._isInFirstContentOfListItem=!0,l++);if(s[0]==="enter")s[1].contentType&&(Object.assign(n,Sb(y,i)),i=n[i],h=!0);else if(s[1]._container){for(l=i,a=void 0;l--;)if(d=y.get(l),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(a&&(y.get(a)[1].type="lineEndingBlank"),d[1].type="lineEnding",a=l);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;a&&(s[1].end={...y.get(a)[1].start},f=y.slice(a,i),f.unshift(s),y.splice(a,i-a+1,f))}}return si(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function Sb(e,n){const i=e.get(n)[1],s=e.get(n)[2];let a=n-1;const l=[];let d=i._tokenizer;d||(d=s.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],h={};let y,S,w=-1,g=i,T=0,b=0;const O=[b];for(;g;){for(;e.get(++a)[1]!==g;);l.push(a),g._tokenizer||(y=s.sliceStream(g),g.next||y.push(null),S&&d.defineSkip(g.start),g._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),g._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),S=g,g=g.next}for(g=i;++w<f.length;)f[w][0]==="exit"&&f[w-1][0]==="enter"&&f[w][1].type===f[w-1][1].type&&f[w][1].start.line!==f[w][1].end.line&&(b=w+1,O.push(b),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(d.events=[],g?(g._tokenizer=void 0,g.previous=void 0):O.pop(),w=O.length;w--;){const D=f.slice(O[w],O[w+1]),P=l.pop();m.push([P,P+D.length-1]),e.splice(P,2,D)}for(m.reverse(),w=-1;++w<m.length;)h[T+m[w][0]]=T+m[w][1],T+=m[w][1]-m[w][0]-1;return h}const bb={resolve:Cb,tokenize:Tb},Eb={partial:!0,tokenize:Nb};function Cb(e){return H0(e),e}function Tb(e,n){let i;return s;function s(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?l(f):et(f)?e.check(Eb,d,l)(f):(e.consume(f),a)}function l(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function d(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,a}}function Nb(e,n,i){const s=this;return a;function a(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),It(e,l,"linePrefix")}function l(d){if(d===null||et(d))return i(d);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(d):e.interrupt(s.parser.constructs.flow,i,n)(d)}}function $0(e,n,i,s,a,l,d,f,m){const h=m||Number.POSITIVE_INFINITY;let y=0;return S;function S(D){return D===60?(e.enter(s),e.enter(a),e.enter(l),e.consume(D),e.exit(l),w):D===null||D===32||D===41||ah(D)?i(D):(e.enter(s),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),b(D))}function w(D){return D===62?(e.enter(l),e.consume(D),e.exit(l),e.exit(a),e.exit(s),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===62?(e.exit("chunkString"),e.exit(f),w(D)):D===null||D===60||et(D)?i(D):(e.consume(D),D===92?T:g)}function T(D){return D===60||D===62||D===92?(e.consume(D),g):g(D)}function b(D){return!y&&(D===null||D===41||Un(D))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(s),n(D)):y<h&&D===40?(e.consume(D),y++,b):D===41?(e.consume(D),y--,b):D===null||D===32||D===40||ah(D)?i(D):(e.consume(D),D===92?O:b)}function O(D){return D===40||D===41||D===92?(e.consume(D),b):b(D)}}function W0(e,n,i,s,a,l){const d=this;let f=0,m;return h;function h(g){return e.enter(s),e.enter(a),e.consume(g),e.exit(a),e.enter(l),y}function y(g){return f>999||g===null||g===91||g===93&&!m||g===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?i(g):g===93?(e.exit(l),e.enter(a),e.consume(g),e.exit(a),e.exit(s),n):et(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),S(g))}function S(g){return g===null||g===91||g===93||et(g)||f++>999?(e.exit("chunkString"),y(g)):(e.consume(g),m||(m=!bt(g)),g===92?w:S)}function w(g){return g===91||g===92||g===93?(e.consume(g),f++,S):S(g)}}function B0(e,n,i,s,a,l){let d;return f;function f(w){return w===34||w===39||w===40?(e.enter(s),e.enter(a),e.consume(w),e.exit(a),d=w===40?41:w,m):i(w)}function m(w){return w===d?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),n):(e.enter(l),h(w))}function h(w){return w===d?(e.exit(l),m(d)):w===null?i(w):et(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),It(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===d||w===null||et(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?S:y)}function S(w){return w===d||w===92?(e.consume(w),y):y(w)}}function Hl(e,n){let i;return s;function s(a){return et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i=!0,s):bt(a)?It(e,s,i?"linePrefix":"lineSuffix")(a):n(a)}}const Ob={name:"definition",tokenize:Db},Mb={partial:!0,tokenize:Ib};function Db(e,n,i){const s=this;let a;return l;function l(g){return e.enter("definition"),d(g)}function d(g){return W0.call(s,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function f(g){return a=ya(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),m):i(g)}function m(g){return Un(g)?Hl(e,h)(g):h(g)}function h(g){return $0(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function y(g){return e.attempt(Mb,S,S)(g)}function S(g){return bt(g)?It(e,w,"whitespace")(g):w(g)}function w(g){return g===null||et(g)?(e.exit("definition"),s.parser.defined.push(a),n(g)):i(g)}}function Ib(e,n,i){return s;function s(f){return Un(f)?Hl(e,a)(f):i(f)}function a(f){return B0(e,l,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return bt(f)?It(e,d,"whitespace")(f):d(f)}function d(f){return f===null||et(f)?n(f):i(f)}}const jb={name:"hardBreakEscape",tokenize:Rb};function Rb(e,n,i){return s;function s(l){return e.enter("hardBreakEscape"),e.consume(l),a}function a(l){return et(l)?(e.exit("hardBreakEscape"),n(l)):i(l)}}const _b={name:"headingAtx",resolve:Pb,tokenize:Lb};function Pb(e,n){let i=e.length-2,s=3,a,l;return e[s][1].type==="whitespace"&&(s+=2),i-2>s&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(s===i-1||i-4>s&&e[i-2][1].type==="whitespace")&&(i-=s+1===i?2:4),i>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[i][1].end},l={type:"chunkText",start:e[s][1].start,end:e[i][1].end,contentType:"text"},si(e,s,i-s+1,[["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n]])),e}function Lb(e,n,i){let s=0;return a;function a(y){return e.enter("atxHeading"),l(y)}function l(y){return e.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&s++<6?(e.consume(y),d):y===null||Un(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||et(y)?(e.exit("atxHeading"),n(y)):bt(y)?It(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||Un(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const zb=["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"],Fg=["pre","script","style","textarea"],Fb={concrete:!0,name:"htmlFlow",resolveTo:Vb,tokenize:Hb},Ab={partial:!0,tokenize:Wb},Ub={partial:!0,tokenize:$b};function Vb(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Hb(e,n,i){const s=this;let a,l,d,f,m;return h;function h(L){return y(L)}function y(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),S}function S(L){return L===33?(e.consume(L),w):L===47?(e.consume(L),l=!0,b):L===63?(e.consume(L),a=3,s.interrupt?n:j):ii(L)?(e.consume(L),d=String.fromCharCode(L),O):i(L)}function w(L){return L===45?(e.consume(L),a=2,g):L===91?(e.consume(L),a=5,f=0,T):ii(L)?(e.consume(L),a=4,s.interrupt?n:j):i(L)}function g(L){return L===45?(e.consume(L),s.interrupt?n:j):i(L)}function T(L){const ze="CDATA[";return L===ze.charCodeAt(f++)?(e.consume(L),f===ze.length?s.interrupt?n:$:T):i(L)}function b(L){return ii(L)?(e.consume(L),d=String.fromCharCode(L),O):i(L)}function O(L){if(L===null||L===47||L===62||Un(L)){const ze=L===47,Ae=d.toLowerCase();return!ze&&!l&&Fg.includes(Ae)?(a=1,s.interrupt?n(L):$(L)):zb.includes(d.toLowerCase())?(a=6,ze?(e.consume(L),D):s.interrupt?n(L):$(L)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?i(L):l?P(L):R(L))}return L===45||er(L)?(e.consume(L),d+=String.fromCharCode(L),O):i(L)}function D(L){return L===62?(e.consume(L),s.interrupt?n:$):i(L)}function P(L){return bt(L)?(e.consume(L),P):H(L)}function R(L){return L===47?(e.consume(L),H):L===58||L===95||ii(L)?(e.consume(L),V):bt(L)?(e.consume(L),R):H(L)}function V(L){return L===45||L===46||L===58||L===95||er(L)?(e.consume(L),V):ne(L)}function ne(L){return L===61?(e.consume(L),q):bt(L)?(e.consume(L),ne):R(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),m=L,I):bt(L)?(e.consume(L),q):Q(L)}function I(L){return L===m?(e.consume(L),m=null,J):L===null||et(L)?i(L):(e.consume(L),I)}function Q(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Un(L)?ne(L):(e.consume(L),Q)}function J(L){return L===47||L===62||bt(L)?R(L):i(L)}function H(L){return L===62?(e.consume(L),U):i(L)}function U(L){return L===null||et(L)?$(L):bt(L)?(e.consume(L),U):i(L)}function $(L){return L===45&&a===2?(e.consume(L),xe):L===60&&a===1?(e.consume(L),Ee):L===62&&a===4?(e.consume(L),B):L===63&&a===3?(e.consume(L),j):L===93&&a===5?(e.consume(L),ve):et(L)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Ab,le,ue)(L)):L===null||et(L)?(e.exit("htmlFlowData"),ue(L)):(e.consume(L),$)}function ue(L){return e.check(Ub,ae,le)(L)}function ae(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ie}function ie(L){return L===null||et(L)?ue(L):(e.enter("htmlFlowData"),$(L))}function xe(L){return L===45?(e.consume(L),j):$(L)}function Ee(L){return L===47?(e.consume(L),d="",ce):$(L)}function ce(L){if(L===62){const ze=d.toLowerCase();return Fg.includes(ze)?(e.consume(L),B):$(L)}return ii(L)&&d.length<8?(e.consume(L),d+=String.fromCharCode(L),ce):$(L)}function ve(L){return L===93?(e.consume(L),j):$(L)}function j(L){return L===62?(e.consume(L),B):L===45&&a===2?(e.consume(L),j):$(L)}function B(L){return L===null||et(L)?(e.exit("htmlFlowData"),le(L)):(e.consume(L),B)}function le(L){return e.exit("htmlFlow"),n(L)}}function $b(e,n,i){const s=this;return a;function a(d){return et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):i(d)}function l(d){return s.parser.lazy[s.now().line]?i(d):n(d)}}function Wb(e,n,i){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(jc,n,i)}}const Bb={name:"htmlText",tokenize:qb};function qb(e,n,i){const s=this;let a,l,d;return f;function f(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),m}function m(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),ne):j===63?(e.consume(j),R):ii(j)?(e.consume(j),Q):i(j)}function h(j){return j===45?(e.consume(j),y):j===91?(e.consume(j),l=0,T):ii(j)?(e.consume(j),P):i(j)}function y(j){return j===45?(e.consume(j),g):i(j)}function S(j){return j===null?i(j):j===45?(e.consume(j),w):et(j)?(d=S,Ee(j)):(e.consume(j),S)}function w(j){return j===45?(e.consume(j),g):S(j)}function g(j){return j===62?xe(j):j===45?w(j):S(j)}function T(j){const B="CDATA[";return j===B.charCodeAt(l++)?(e.consume(j),l===B.length?b:T):i(j)}function b(j){return j===null?i(j):j===93?(e.consume(j),O):et(j)?(d=b,Ee(j)):(e.consume(j),b)}function O(j){return j===93?(e.consume(j),D):b(j)}function D(j){return j===62?xe(j):j===93?(e.consume(j),D):b(j)}function P(j){return j===null||j===62?xe(j):et(j)?(d=P,Ee(j)):(e.consume(j),P)}function R(j){return j===null?i(j):j===63?(e.consume(j),V):et(j)?(d=R,Ee(j)):(e.consume(j),R)}function V(j){return j===62?xe(j):R(j)}function ne(j){return ii(j)?(e.consume(j),q):i(j)}function q(j){return j===45||er(j)?(e.consume(j),q):I(j)}function I(j){return et(j)?(d=I,Ee(j)):bt(j)?(e.consume(j),I):xe(j)}function Q(j){return j===45||er(j)?(e.consume(j),Q):j===47||j===62||Un(j)?J(j):i(j)}function J(j){return j===47?(e.consume(j),xe):j===58||j===95||ii(j)?(e.consume(j),H):et(j)?(d=J,Ee(j)):bt(j)?(e.consume(j),J):xe(j)}function H(j){return j===45||j===46||j===58||j===95||er(j)?(e.consume(j),H):U(j)}function U(j){return j===61?(e.consume(j),$):et(j)?(d=U,Ee(j)):bt(j)?(e.consume(j),U):J(j)}function $(j){return j===null||j===60||j===61||j===62||j===96?i(j):j===34||j===39?(e.consume(j),a=j,ue):et(j)?(d=$,Ee(j)):bt(j)?(e.consume(j),$):(e.consume(j),ae)}function ue(j){return j===a?(e.consume(j),a=void 0,ie):j===null?i(j):et(j)?(d=ue,Ee(j)):(e.consume(j),ue)}function ae(j){return j===null||j===34||j===39||j===60||j===61||j===96?i(j):j===47||j===62||Un(j)?J(j):(e.consume(j),ae)}function ie(j){return j===47||j===62||Un(j)?J(j):i(j)}function xe(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),n):i(j)}function Ee(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),ce}function ce(j){return bt(j)?It(e,ve,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ve(j)}function ve(j){return e.enter("htmlTextData"),d(j)}}const Vh={name:"labelEnd",resolveAll:Qb,resolveTo:Gb,tokenize:Kb},Yb={tokenize:Jb},Xb={tokenize:eE},Zb={tokenize:tE};function Qb(e){let n=-1;const i=[];for(;++n<e.length;){const s=e[n][1];if(i.push(e[n]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",n+=a}}return e.length!==i.length&&si(e,0,e.length,i),e}function Gb(e,n){let i=e.length,s=0,a,l,d,f;for(;i--;)if(a=e[i][1],l){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[i][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(d){if(e[i][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(l=i,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(d=i);const m={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[d][1].end}},y={type:"labelText",start:{...e[l+s+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,n],["enter",h,n]],f=vr(f,e.slice(l+1,l+s+3)),f=vr(f,[["enter",y,n]]),f=vr(f,Uh(n.parser.constructs.insideSpan.null,e.slice(l+s+4,d-3),n)),f=vr(f,[["exit",y,n],e[d-2],e[d-1],["exit",h,n]]),f=vr(f,e.slice(d+1)),f=vr(f,[["exit",m,n]]),si(e,l,e.length,f),e}function Kb(e,n,i){const s=this;let a=s.events.length,l,d;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){l=s.events[a][1];break}return f;function f(w){return l?l._inactive?S(w):(d=s.parser.defined.includes(ya(s.sliceSerialize({start:l.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),m):i(w)}function m(w){return w===40?e.attempt(Yb,y,d?y:S)(w):w===91?e.attempt(Xb,y,d?h:S)(w):d?y(w):S(w)}function h(w){return e.attempt(Zb,y,S)(w)}function y(w){return n(w)}function S(w){return l._balanced=!0,i(w)}}function Jb(e,n,i){return s;function s(S){return e.enter("resource"),e.enter("resourceMarker"),e.consume(S),e.exit("resourceMarker"),a}function a(S){return Un(S)?Hl(e,l)(S):l(S)}function l(S){return S===41?y(S):$0(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(S)}function d(S){return Un(S)?Hl(e,m)(S):y(S)}function f(S){return i(S)}function m(S){return S===34||S===39||S===40?B0(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(S):y(S)}function h(S){return Un(S)?Hl(e,y)(S):y(S)}function y(S){return S===41?(e.enter("resourceMarker"),e.consume(S),e.exit("resourceMarker"),e.exit("resource"),n):i(S)}}function eE(e,n,i){const s=this;return a;function a(f){return W0.call(s,e,l,d,"reference","referenceMarker","referenceString")(f)}function l(f){return s.parser.defined.includes(ya(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function d(f){return i(f)}}function tE(e,n,i){return s;function s(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),a}function a(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):i(l)}}const nE={name:"labelStartImage",resolveAll:Vh.resolveAll,tokenize:rE};function rE(e,n,i){const s=this;return a;function a(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):i(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?i(f):n(f)}}const iE={name:"labelStartLink",resolveAll:Vh.resolveAll,tokenize:sE};function sE(e,n,i){const s=this;return a;function a(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),l}function l(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?i(d):n(d)}}const Df={name:"lineEnding",tokenize:oE};function oE(e,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),It(e,n,"linePrefix")}}const xc={name:"thematicBreak",tokenize:aE};function aE(e,n,i){let s=0,a;return l;function l(h){return e.enter("thematicBreak"),d(h)}function d(h){return a=h,f(h)}function f(h){return h===a?(e.enter("thematicBreakSequence"),m(h)):s>=3&&(h===null||et(h))?(e.exit("thematicBreak"),n(h)):i(h)}function m(h){return h===a?(e.consume(h),s++,m):(e.exit("thematicBreakSequence"),bt(h)?It(e,f,"whitespace")(h):f(h))}}const Fn={continuation:{tokenize:dE},exit:hE,name:"list",tokenize:cE},lE={partial:!0,tokenize:pE},uE={partial:!0,tokenize:fE};function cE(e,n,i){const s=this,a=s.events[s.events.length-1];let l=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,d=0;return f;function f(g){const T=s.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!s.containerState.marker||g===s.containerState.marker:lh(g)){if(s.containerState.type||(s.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(xc,i,h)(g):h(g);if(!s.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(g)}return i(g)}function m(g){return lh(g)&&++d<10?(e.consume(g),m):(!s.interrupt||d<2)&&(s.containerState.marker?g===s.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),h(g)):i(g)}function h(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||g,e.check(jc,s.interrupt?i:y,e.attempt(lE,w,S))}function y(g){return s.containerState.initialBlankLine=!0,l++,w(g)}function S(g){return bt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),w):i(g)}function w(g){return s.containerState.size=l+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function dE(e,n,i){const s=this;return s.containerState._closeFlow=void 0,e.check(jc,a,l);function a(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,It(e,n,"listItemIndent",s.containerState.size+1)(f)}function l(f){return s.containerState.furtherBlankLines||!bt(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,d(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(uE,n,d)(f))}function d(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,It(e,e.attempt(Fn,n,i),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function fE(e,n,i){const s=this;return It(e,a,"listItemIndent",s.containerState.size+1);function a(l){const d=s.events[s.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===s.containerState.size?n(l):i(l)}}function hE(e){e.exit(this.containerState.type)}function pE(e,n,i){const s=this;return It(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(l){const d=s.events[s.events.length-1];return!bt(l)&&d&&d[1].type==="listItemPrefixWhitespace"?n(l):i(l)}}const Ag={name:"setextUnderline",resolveTo:mE,tokenize:gE};function mE(e,n){let i=e.length,s,a,l;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){s=i;break}e[i][1].type==="paragraph"&&(a=i)}else e[i][1].type==="content"&&e.splice(i,1),!l&&e[i][1].type==="definition"&&(l=i);const d={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",l?(e.splice(a,0,["enter",d,n]),e.splice(l+1,0,["exit",e[s][1],n]),e[s][1].end={...e[l][1].end}):e[s][1]=d,e.push(["exit",d,n]),e}function gE(e,n,i){const s=this;let a;return l;function l(h){let y=s.events.length,S;for(;y--;)if(s.events[y][1].type!=="lineEnding"&&s.events[y][1].type!=="linePrefix"&&s.events[y][1].type!=="content"){S=s.events[y][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||S)?(e.enter("setextHeadingLine"),a=h,d(h)):i(h)}function d(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===a?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),bt(h)?It(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||et(h)?(e.exit("setextHeadingLine"),n(h)):i(h)}}const yE={tokenize:vE};function vE(e){const n=this,i=e.attempt(jc,s,e.attempt(this.parser.constructs.flowInitial,a,It(e,e.attempt(this.parser.constructs.flow,a,e.attempt(bb,a)),"linePrefix")));return i;function s(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function a(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const xE={resolveAll:Y0()},wE=q0("string"),kE=q0("text");function q0(e){return{resolveAll:Y0(e==="text"?SE:void 0),tokenize:n};function n(i){const s=this,a=this.parser.constructs[e],l=i.attempt(a,d,f);return d;function d(y){return h(y)?l(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return h(y)?(i.exit("data"),l(y)):(i.consume(y),m)}function h(y){if(y===null)return!0;const S=a[y];let w=-1;if(S)for(;++w<S.length;){const g=S[w];if(!g.previous||g.previous.call(s,s.previous))return!0}return!1}}}function Y0(e){return n;function n(i,s){let a=-1,l;for(;++a<=i.length;)l===void 0?i[a]&&i[a][1].type==="data"&&(l=a,a++):(!i[a]||i[a][1].type!=="data")&&(a!==l+2&&(i[l][1].end=i[a-1][1].end,i.splice(l+2,a-l-2),a=l+2),l=void 0);return e?e(i,s):i}}function SE(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const s=e[i-1][1],a=n.sliceStream(s);let l=a.length,d=-1,f=0,m;for(;l--;){const h=a[l];if(typeof h=="string"){for(d=h.length;h.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(h===-2)m=!0,f++;else if(h!==-1){l++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?d:s.start._bufferIndex+d,_index:s.start._index+l,line:s.end.line,column:s.end.column-f,offset:s.end.offset-f},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(i,0,["enter",h,n],["exit",h,n]),i+=2)}i++}return e}const bE={42:Fn,43:Fn,45:Fn,48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,62:A0},EE={91:Ob},CE={[-2]:Mf,[-1]:Mf,32:Mf},TE={35:_b,42:xc,45:[Ag,xc],60:Fb,61:Ag,95:xc,96:zg,126:zg},NE={38:V0,92:U0},OE={[-5]:Df,[-4]:Df,[-3]:Df,33:nE,38:V0,42:uh,60:[ib,Bb],91:iE,92:[jb,U0],93:Vh,95:uh,96:yb},ME={null:[uh,xE]},DE={null:[42,95]},IE={null:[]},jE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:DE,contentInitial:EE,disable:IE,document:bE,flow:TE,flowInitial:CE,insideSpan:ME,string:NE,text:OE},Symbol.toStringTag,{value:"Module"}));function RE(e,n,i){let s={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const a={},l=[];let d=[],f=[];const m={attempt:I(ne),check:I(q),consume:P,enter:R,exit:V,interrupt:I(q,{interrupt:!0})},h={code:null,containerState:{},defineSkip:b,events:[],now:T,parser:e,previous:null,sliceSerialize:w,sliceStream:g,write:S};let y=n.tokenize.call(h,m);return n.resolveAll&&l.push(n),h;function S(U){return d=vr(d,U),O(),d[d.length-1]!==null?[]:(Q(n,0),h.events=Uh(l,h.events,h),h.events)}function w(U,$){return PE(g(U),$)}function g(U){return _E(d,U)}function T(){const{_bufferIndex:U,_index:$,line:ue,column:ae,offset:ie}=s;return{_bufferIndex:U,_index:$,line:ue,column:ae,offset:ie}}function b(U){a[U.line]=U.column,H()}function O(){let U;for(;s._index<d.length;){const $=d[s._index];if(typeof $=="string")for(U=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===U&&s._bufferIndex<$.length;)D($.charCodeAt(s._bufferIndex));else D($)}}function D(U){y=y(U)}function P(U){et(U)?(s.line++,s.column=1,s.offset+=U===-3?2:1,H()):U!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===d[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=U}function R(U,$){const ue=$||{};return ue.type=U,ue.start=T(),h.events.push(["enter",ue,h]),f.push(ue),ue}function V(U){const $=f.pop();return $.end=T(),h.events.push(["exit",$,h]),$}function ne(U,$){Q(U,$.from)}function q(U,$){$.restore()}function I(U,$){return ue;function ue(ae,ie,xe){let Ee,ce,ve,j;return Array.isArray(ae)?le(ae):"tokenize"in ae?le([ae]):B(ae);function B(Te){return tt;function tt(Qe){const st=Qe!==null&&Te[Qe],Ct=Qe!==null&&Te.null,vn=[...Array.isArray(st)?st:st?[st]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return le(vn)(Qe)}}function le(Te){return Ee=Te,ce=0,Te.length===0?xe:L(Te[ce])}function L(Te){return tt;function tt(Qe){return j=J(),ve=Te,Te.partial||(h.currentConstruct=Te),Te.name&&h.parser.constructs.disable.null.includes(Te.name)?Ae():Te.tokenize.call($?Object.assign(Object.create(h),$):h,m,ze,Ae)(Qe)}}function ze(Te){return U(ve,j),ie}function Ae(Te){return j.restore(),++ce<Ee.length?L(Ee[ce]):xe}}}function Q(U,$){U.resolveAll&&!l.includes(U)&&l.push(U),U.resolve&&si(h.events,$,h.events.length-$,U.resolve(h.events.slice($),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function J(){const U=T(),$=h.previous,ue=h.currentConstruct,ae=h.events.length,ie=Array.from(f);return{from:ae,restore:xe};function xe(){s=U,h.previous=$,h.currentConstruct=ue,h.events.length=ae,f=ie,H()}}function H(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function _E(e,n){const i=n.start._index,s=n.start._bufferIndex,a=n.end._index,l=n.end._bufferIndex;let d;if(i===a)d=[e[i].slice(s,l)];else{if(d=e.slice(i,a),s>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(s):d.shift()}l>0&&d.push(e[a].slice(0,l))}return d}function PE(e,n){let i=-1;const s=[];let a;for(;++i<e.length;){const l=e[i];let d;if(typeof l=="string")d=l;else switch(l){case-5:{d="\r";break}case-4:{d=`
|
|
239
|
-
`;break}case-3:{d=`\r
|
|
240
|
-
`;break}case-2:{d=n?" ":" ";break}case-1:{if(!n&&a)continue;d=" ";break}default:d=String.fromCharCode(l)}a=l===-2,s.push(d)}return s.join("")}function LE(e){const s={constructs:$S([jE,...(e||{}).extensions||[]]),content:a(GS),defined:[],document:a(JS),flow:a(yE),lazy:{},string:a(wE),text:a(kE)};return s;function a(l){return d;function d(f){return RE(s,l,f)}}}function zE(e){for(;!H0(e););return e}const Ug=/[\0\t\n\r]/g;function FE(){let e=1,n="",i=!0,s;return a;function a(l,d,f){const m=[];let h,y,S,w,g;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(d||void 0).decode(l)),S=0,n="",i&&(l.charCodeAt(0)===65279&&S++,i=void 0);S<l.length;){if(Ug.lastIndex=S,h=Ug.exec(l),w=h&&h.index!==void 0?h.index:l.length,g=l.charCodeAt(w),!h){n=l.slice(S);break}if(g===10&&S===w&&s)m.push(-3),s=void 0;else switch(s&&(m.push(-5),s=void 0),S<w&&(m.push(l.slice(S,w)),e+=w-S),g){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:s=!0,e=1}S=w+1}return f&&(s&&m.push(-5),n&&m.push(n),m.push(null)),m}}const AE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UE(e){return e.replace(AE,VE)}function VE(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const a=i.charCodeAt(1),l=a===120||a===88;return F0(i.slice(l?2:1),l?16:10)}return Ah(i)||e}const X0={}.hasOwnProperty;function HE(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),$E(i)(zE(LE(i).document().write(FE()(e,n,!0))))}function $E(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l($n),autolinkProtocol:J,autolinkEmail:J,atxHeading:l(Hn),blockQuote:l(Ct),characterEscape:J,characterReference:J,codeFenced:l(vn),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:l(vn,d),codeText:l($t,d),codeTextData:J,data:J,codeFlowValue:J,definition:l(un),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:l(zr),hardBreakEscape:l(xn),hardBreakTrailing:l(xn),htmlFlow:l(tr,d),htmlFlowData:J,htmlText:l(tr,d),htmlTextData:J,image:l(oi),label:d,link:l($n),listItem:l(rr),listItemValue:w,listOrdered:l(nr,S),listUnordered:l(nr),paragraph:l(ai),reference:L,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:l(Hn),strong:l(Ri),thematicBreak:l(wn)},exit:{atxHeading:m(),atxHeadingSequence:ne,autolink:m(),autolinkEmail:st,autolinkProtocol:Qe,blockQuote:m(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:Te,characterReference:tt,codeFenced:m(O),codeFencedFence:b,codeFencedFenceInfo:g,codeFencedFenceMeta:T,codeFlowValue:H,codeIndented:m(D),codeText:m(ie),codeTextData:H,data:H,definition:m(),definitionDestinationString:V,definitionLabelString:P,definitionTitleString:R,emphasis:m(),hardBreakEscape:m($),hardBreakTrailing:m($),htmlFlow:m(ue),htmlFlowData:H,htmlText:m(ae),htmlTextData:H,image:m(Ee),label:ve,labelText:ce,lineEnding:U,link:m(xe),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ze,resourceDestinationString:j,resourceTitleString:B,resource:le,setextHeading:m(Q),setextHeadingLineSequence:I,setextHeadingText:q,strong:m(),thematicBreak:m()}};Z0(n,(e||{}).mdastExtensions||[]);const i={};return s;function s(de){let Se={type:"root",children:[]};const Ue={stack:[Se],tokenStack:[],config:n,enter:f,exit:h,buffer:d,resume:y,data:i},Xe=[];let lt=-1;for(;++lt<de.length;)if(de[lt][1].type==="listOrdered"||de[lt][1].type==="listUnordered")if(de[lt][0]==="enter")Xe.push(lt);else{const We=Xe.pop();lt=a(de,We,lt)}for(lt=-1;++lt<de.length;){const We=n[de[lt][0]];X0.call(We,de[lt][1].type)&&We[de[lt][1].type].call(Object.assign({sliceSerialize:de[lt][2].sliceSerialize},Ue),de[lt][1])}if(Ue.tokenStack.length>0){const We=Ue.tokenStack[Ue.tokenStack.length-1];(We[1]||Vg).call(Ue,void 0,We[0])}for(Se.position={start:xs(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:xs(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},lt=-1;++lt<n.transforms.length;)Se=n.transforms[lt](Se)||Se;return Se}function a(de,Se,Ue){let Xe=Se-1,lt=-1,We=!1,kn,ut,Dn,en;for(;++Xe<=Ue;){const Pt=de[Xe];switch(Pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pt[0]==="enter"?lt++:lt--,en=void 0;break}case"lineEndingBlank":{Pt[0]==="enter"&&(kn&&!en&&!lt&&!Dn&&(Dn=Xe),en=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:en=void 0}if(!lt&&Pt[0]==="enter"&&Pt[1].type==="listItemPrefix"||lt===-1&&Pt[0]==="exit"&&(Pt[1].type==="listUnordered"||Pt[1].type==="listOrdered")){if(kn){let Sn=Xe;for(ut=void 0;Sn--;){const rn=de[Sn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;ut&&(de[ut][1].type="lineEndingBlank",We=!0),rn[1].type="lineEnding",ut=Sn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}Dn&&(!ut||Dn<ut)&&(kn._spread=!0),kn.end=Object.assign({},ut?de[ut][1].start:Pt[1].end),de.splice(ut||Xe,0,["exit",kn,Pt[2]]),Xe++,Ue++}if(Pt[1].type==="listItemPrefix"){const Sn={type:"listItem",_spread:!1,start:Object.assign({},Pt[1].start),end:void 0};kn=Sn,de.splice(Xe,0,["enter",Sn,Pt[2]]),Xe++,Ue++,Dn=void 0,en=!0}}}return de[Se][1]._spread=We,Ue}function l(de,Se){return Ue;function Ue(Xe){f.call(this,de(Xe),Xe),Se&&Se.call(this,Xe)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(de,Se,Ue){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([Se,Ue||void 0]),de.position={start:xs(Se.start),end:void 0}}function m(de){return Se;function Se(Ue){de&&de.call(this,Ue),h.call(this,Ue)}}function h(de,Se){const Ue=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==de.type&&(Se?Se.call(this,de,Xe[0]):(Xe[1]||Vg).call(this,de,Xe[0]));else throw new Error("Cannot close `"+de.type+"` ("+Vl({start:de.start,end:de.end})+"): it’s not open");Ue.position.end=xs(de.end)}function y(){return VS(this.stack.pop())}function S(){this.data.expectingFirstListItemValue=!0}function w(de){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function g(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=de}function T(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=de}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function D(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.value=de.replace(/(\r?\n|\r)$/g,"")}function P(de){const Se=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Se,Ue.identifier=ya(this.sliceSerialize(de)).toLowerCase()}function R(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.title=de}function V(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.url=de}function ne(de){const Se=this.stack[this.stack.length-1];if(!Se.depth){const Ue=this.sliceSerialize(de).length;Se.depth=Ue}}function q(){this.data.setextHeadingSlurpLineEnding=!0}function I(de){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function J(de){const Ue=this.stack[this.stack.length-1].children;let Xe=Ue[Ue.length-1];(!Xe||Xe.type!=="text")&&(Xe=Mn(),Xe.position={start:xs(de.start),end:void 0},Ue.push(Xe)),this.stack.push(Xe)}function H(de){const Se=this.stack.pop();Se.value+=this.sliceSerialize(de),Se.position.end=xs(de.end)}function U(de){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=Se.children[Se.children.length-1];Ue.position.end=xs(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(Se.type)&&(J.call(this,de),H.call(this,de))}function $(){this.data.atHardBreak=!0}function ue(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.value=de}function ae(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.value=de}function ie(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.value=de}function xe(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Se,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Ee(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Se,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function ce(de){const Se=this.sliceSerialize(de),Ue=this.stack[this.stack.length-2];Ue.label=UE(Se),Ue.identifier=ya(Se).toLowerCase()}function ve(){const de=this.stack[this.stack.length-1],Se=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Xe=de.children;Ue.children=Xe}else Ue.alt=Se}function j(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.url=de}function B(){const de=this.resume(),Se=this.stack[this.stack.length-1];Se.title=de}function le(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function ze(de){const Se=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Se,Ue.identifier=ya(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function Ae(de){this.data.characterReferenceType=de.type}function Te(de){const Se=this.sliceSerialize(de),Ue=this.data.characterReferenceType;let Xe;Ue?(Xe=F0(Se,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=Ah(Se);const lt=this.stack[this.stack.length-1];lt.value+=Xe}function tt(de){const Se=this.stack.pop();Se.position.end=xs(de.end)}function Qe(de){H.call(this,de);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(de)}function st(de){H.call(this,de);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(de)}function Ct(){return{type:"blockquote",children:[]}}function vn(){return{type:"code",lang:null,meta:null,value:""}}function $t(){return{type:"inlineCode",value:""}}function un(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function zr(){return{type:"emphasis",children:[]}}function Hn(){return{type:"heading",depth:0,children:[]}}function xn(){return{type:"break"}}function tr(){return{type:"html",value:""}}function oi(){return{type:"image",title:null,url:"",alt:null}}function $n(){return{type:"link",title:null,url:"",children:[]}}function nr(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function rr(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function ai(){return{type:"paragraph",children:[]}}function Ri(){return{type:"strong",children:[]}}function Mn(){return{type:"text",value:""}}function wn(){return{type:"thematicBreak"}}}function xs(e){return{line:e.line,column:e.column,offset:e.offset}}function Z0(e,n){let i=-1;for(;++i<n.length;){const s=n[i];Array.isArray(s)?Z0(e,s):WE(e,s)}}function WE(e,n){let i;for(i in n)if(X0.call(n,i))switch(i){case"canContainEols":{const s=n[i];s&&e[i].push(...s);break}case"transforms":{const s=n[i];s&&e[i].push(...s);break}case"enter":case"exit":{const s=n[i];s&&Object.assign(e[i],s);break}}}function Vg(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Vl({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Vl({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Vl({start:n.start,end:n.end})+") is still open")}function BE(e){const n=this;n.parser=i;function i(s){return HE(s,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function qE(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function YE(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
241
|
-
`}]}function XE(e,n){const i=n.value?n.value+`
|
|
242
|
-
`:"",s={},a=n.lang?n.lang.split(/\s+/):[];a.length>0&&(s.className=["language-"+a[0]]);let l={type:"element",tagName:"code",properties:s,children:[{type:"text",value:i}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function ZE(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function QE(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function GE(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(n.identifier).toUpperCase(),a=Ra(s.toLowerCase()),l=e.footnoteOrder.indexOf(s);let d,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),d=e.footnoteOrder.length):d=l+1,f+=1,e.footnoteCounts.set(s,f);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+a,id:i+"fnref-"+a+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(n,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(n,h),e.applyData(n,h)}function KE(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function JE(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function Q0(e,n){const i=n.referenceType;let s="]";if(i==="collapsed"?s+="[]":i==="full"&&(s+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+s}];const a=e.all(n),l=a[0];l&&l.type==="text"?l.value="["+l.value:a.unshift({type:"text",value:"["});const d=a[a.length-1];return d&&d.type==="text"?d.value+=s:a.push({type:"text",value:s}),a}function eC(e,n){const i=String(n.identifier).toUpperCase(),s=e.definitionById.get(i);if(!s)return Q0(e,n);const a={src:Ra(s.url||""),alt:n.alt};s.title!==null&&s.title!==void 0&&(a.title=s.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,l),e.applyData(n,l)}function tC(e,n){const i={src:Ra(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,s),e.applyData(n,s)}function nC(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const s={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,s),e.applyData(n,s)}function rC(e,n){const i=String(n.identifier).toUpperCase(),s=e.definitionById.get(i);if(!s)return Q0(e,n);const a={href:Ra(s.url||"")};s.title!==null&&s.title!==void 0&&(a.title=s.title);const l={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function iC(e,n){const i={href:Ra(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function sC(e,n,i){const s=e.all(n),a=i?oC(i):G0(n),l={},d=[];if(typeof n.checked=="boolean"){const y=s[0];let S;y&&y.type==="element"&&y.tagName==="p"?S=y:(S={type:"element",tagName:"p",properties:{},children:[]},s.unshift(S)),S.children.length>0&&S.children.unshift({type:"text",value:" "}),S.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<s.length;){const y=s[f];(a||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
|
|
243
|
-
`}),y.type==="element"&&y.tagName==="p"&&!a?d.push(...y.children):d.push(y)}const m=s[s.length-1];m&&(a||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
|
|
244
|
-
`});const h={type:"element",tagName:"li",properties:l,children:d};return e.patch(n,h),e.applyData(n,h)}function oC(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let s=-1;for(;!n&&++s<i.length;)n=G0(i[s])}return n}function G0(e){const n=e.spread;return n??e.children.length>1}function aC(e,n){const i={},s=e.all(n);let a=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++a<s.length;){const d=s[a];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(s,!0)};return e.patch(n,l),e.applyData(n,l)}function lC(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function uC(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function cC(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function dC(e,n){const i=e.all(n),s=i.shift(),a=[];if(s){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(n.children[0],d),a.push(d)}if(i.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Ph(n.children[1]),m=I0(n.children[n.children.length-1]);f&&m&&(d.position={start:f,end:m}),a.push(d)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(n,l),e.applyData(n,l)}function fC(e,n,i){const s=i?i.children:void 0,l=(s?s.indexOf(n):1)===0?"th":"td",d=i&&i.type==="table"?i.align:void 0,f=d?d.length:n.children.length;let m=-1;const h=[];for(;++m<f;){const S=n.children[m],w={},g=d?d[m]:void 0;g&&(w.align=g);let T={type:"element",tagName:l,properties:w,children:[]};S&&(T.children=e.all(S),e.patch(S,T),T=e.applyData(S,T)),h.push(T)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,y),e.applyData(n,y)}function hC(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const Hg=9,$g=32;function pC(e){const n=String(e),i=/\r?\n|\r/g;let s=i.exec(n),a=0;const l=[];for(;s;)l.push(Wg(n.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=i.exec(n);return l.push(Wg(n.slice(a),a>0,!1)),l.join("")}function Wg(e,n,i){let s=0,a=e.length;if(n){let l=e.codePointAt(s);for(;l===Hg||l===$g;)s++,l=e.codePointAt(s)}if(i){let l=e.codePointAt(a-1);for(;l===Hg||l===$g;)a--,l=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function mC(e,n){const i={type:"text",value:pC(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function gC(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const yC={blockquote:qE,break:YE,code:XE,delete:ZE,emphasis:QE,footnoteReference:GE,heading:KE,html:JE,imageReference:eC,image:tC,inlineCode:nC,linkReference:rC,link:iC,listItem:sC,list:aC,paragraph:lC,root:uC,strong:cC,table:dC,tableCell:hC,tableRow:fC,text:mC,thematicBreak:gC,toml:pc,yaml:pc,definition:pc,footnoteDefinition:pc};function pc(){}const K0=-1,Rc=0,$l=1,Tc=2,Hh=3,$h=4,Wh=5,Bh=6,J0=7,ev=8,Bg=typeof self=="object"?self:globalThis,vC=(e,n)=>{const i=(a,l)=>(e.set(l,a),a),s=a=>{if(e.has(a))return e.get(a);const[l,d]=n[a];switch(l){case Rc:case K0:return i(d,a);case $l:{const f=i([],a);for(const m of d)f.push(s(m));return f}case Tc:{const f=i({},a);for(const[m,h]of d)f[s(m)]=s(h);return f}case Hh:return i(new Date(d),a);case $h:{const{source:f,flags:m}=d;return i(new RegExp(f,m),a)}case Wh:{const f=i(new Map,a);for(const[m,h]of d)f.set(s(m),s(h));return f}case Bh:{const f=i(new Set,a);for(const m of d)f.add(s(m));return f}case J0:{const{name:f,message:m}=d;return i(new Bg[f](m),a)}case ev:return i(BigInt(d),a);case"BigInt":return i(Object(BigInt(d)),a);case"ArrayBuffer":return i(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return i(new DataView(f),d)}}return i(new Bg[l](d),a)};return s},qg=e=>vC(new Map,e)(0),ha="",{toString:xC}={},{keys:wC}=Object,Il=e=>{const n=typeof e;if(n!=="object"||!e)return[Rc,n];const i=xC.call(e).slice(8,-1);switch(i){case"Array":return[$l,ha];case"Object":return[Tc,ha];case"Date":return[Hh,ha];case"RegExp":return[$h,ha];case"Map":return[Wh,ha];case"Set":return[Bh,ha];case"DataView":return[$l,i]}return i.includes("Array")?[$l,i]:i.includes("Error")?[J0,i]:[Tc,i]},mc=([e,n])=>e===Rc&&(n==="function"||n==="symbol"),kC=(e,n,i,s)=>{const a=(d,f)=>{const m=s.push(d)-1;return i.set(f,m),m},l=d=>{if(i.has(d))return i.get(d);let[f,m]=Il(d);switch(f){case Rc:{let y=d;switch(m){case"bigint":f=ev,y=d.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return a([K0],d)}return a([f,y],d)}case $l:{if(m){let w=d;return m==="DataView"?w=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(w=new Uint8Array(d)),a([m,[...w]],d)}const y=[],S=a([f,y],d);for(const w of d)y.push(l(w));return S}case Tc:{if(m)switch(m){case"BigInt":return a([m,d.toString()],d);case"Boolean":case"Number":case"String":return a([m,d.valueOf()],d)}if(n&&"toJSON"in d)return l(d.toJSON());const y=[],S=a([f,y],d);for(const w of wC(d))(e||!mc(Il(d[w])))&&y.push([l(w),l(d[w])]);return S}case Hh:return a([f,d.toISOString()],d);case $h:{const{source:y,flags:S}=d;return a([f,{source:y,flags:S}],d)}case Wh:{const y=[],S=a([f,y],d);for(const[w,g]of d)(e||!(mc(Il(w))||mc(Il(g))))&&y.push([l(w),l(g)]);return S}case Bh:{const y=[],S=a([f,y],d);for(const w of d)(e||!mc(Il(w)))&&y.push(l(w));return S}}const{message:h}=d;return a([f,{name:m,message:h}],d)};return l},Yg=(e,{json:n,lossy:i}={})=>{const s=[];return kC(!(n||i),!!n,new Map,s)(e),s},Nc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?qg(Yg(e,n)):structuredClone(e):(e,n)=>qg(Yg(e,n));function SC(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function bC(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function EC(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||SC,s=e.options.footnoteBackLabel||bC,a=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const y=e.all(h),S=String(h.identifier).toUpperCase(),w=Ra(S.toLowerCase());let g=0;const T=[],b=e.footnoteCounts.get(S);for(;b!==void 0&&++g<=b;){T.length>0&&T.push({type:"text",value:" "});let P=typeof i=="string"?i:i(m,g);typeof P=="string"&&(P={type:"text",value:P}),T.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+w+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(m,g),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const O=y[y.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const P=O.children[O.children.length-1];P&&P.type==="text"?P.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...T)}else y.push(...T);const D={type:"element",tagName:"li",properties:{id:n+"fn-"+w},children:e.wrap(y,!0)};e.patch(h,D),f.push(D)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Nc(d),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
245
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
246
|
-
`}]}}const tv=function(e){if(e==null)return OC;if(typeof e=="function")return _c(e);if(typeof e=="object")return Array.isArray(e)?CC(e):TC(e);if(typeof e=="string")return NC(e);throw new Error("Expected function, string, or object as test")};function CC(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=tv(e[i]);return _c(s);function s(...a){let l=-1;for(;++l<n.length;)if(n[l].apply(this,a))return!0;return!1}}function TC(e){const n=e;return _c(i);function i(s){const a=s;let l;for(l in e)if(a[l]!==n[l])return!1;return!0}}function NC(e){return _c(n);function n(i){return i&&i.type===e}}function _c(e){return n;function n(i,s,a){return!!(MC(i)&&e.call(this,i,typeof s=="number"?s:void 0,a||void 0))}}function OC(){return!0}function MC(e){return e!==null&&typeof e=="object"&&"type"in e}const nv=[],DC=!0,Xg=!1,IC="skip";function jC(e,n,i,s){let a;typeof n=="function"&&typeof i!="function"?(s=i,i=n):a=n;const l=tv(a),d=s?-1:1;f(e,void 0,[])();function f(m,h,y){const S=m&&typeof m=="object"?m:{};if(typeof S.type=="string"){const g=typeof S.tagName=="string"?S.tagName:typeof S.name=="string"?S.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(m.type+(g?"<"+g+">":""))+")"})}return w;function w(){let g=nv,T,b,O;if((!n||l(m,h,y[y.length-1]||void 0))&&(g=RC(i(m,y)),g[0]===Xg))return g;if("children"in m&&m.children){const D=m;if(D.children&&g[0]!==IC)for(b=(s?D.children.length:-1)+d,O=y.concat(D);b>-1&&b<D.children.length;){const P=D.children[b];if(T=f(P,b,O)(),T[0]===Xg)return T;b=typeof T[1]=="number"?T[1]:b+d}}return g}}}function RC(e){return Array.isArray(e)?e:typeof e=="number"?[DC,e]:e==null?nv:[e]}function rv(e,n,i,s){let a,l,d;typeof n=="function"&&typeof i!="function"?(l=void 0,d=n,a=i):(l=n,d=i,a=s),jC(e,l,f,a);function f(m,h){const y=h[h.length-1],S=y?y.children.indexOf(m):void 0;return d(m,S,y)}}const ch={}.hasOwnProperty,_C={};function PC(e,n){const i=n||_C,s=new Map,a=new Map,l=new Map,d={...yC,...i.handlers},f={all:h,applyData:zC,definitionById:s,footnoteById:a,footnoteCounts:l,footnoteOrder:[],handlers:d,one:m,options:i,patch:LC,wrap:AC};return rv(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const S=y.type==="definition"?s:a,w=String(y.identifier).toUpperCase();S.has(w)||S.set(w,y)}}),f;function m(y,S){const w=y.type,g=f.handlers[w];if(ch.call(f.handlers,w)&&g)return g(f,y,S);if(f.options.passThrough&&f.options.passThrough.includes(w)){if("children"in y){const{children:b,...O}=y,D=Nc(O);return D.children=f.all(y),D}return Nc(y)}return(f.options.unknownHandler||FC)(f,y,S)}function h(y){const S=[];if("children"in y){const w=y.children;let g=-1;for(;++g<w.length;){const T=f.one(w[g],y);if(T){if(g&&w[g-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=Zg(T.value)),!Array.isArray(T)&&T.type==="element")){const b=T.children[0];b&&b.type==="text"&&(b.value=Zg(b.value))}Array.isArray(T)?S.push(...T):S.push(T)}}}return S}}function LC(e,n){e.position&&(n.position=xS(e))}function zC(e,n){let i=n;if(e&&e.data){const s=e.data.hName,a=e.data.hChildren,l=e.data.hProperties;if(typeof s=="string")if(i.type==="element")i.tagName=s;else{const d="children"in i?i.children:[i];i={type:"element",tagName:s,properties:{},children:d}}i.type==="element"&&l&&Object.assign(i.properties,Nc(l)),"children"in i&&i.children&&a!==null&&a!==void 0&&(i.children=a)}return i}function FC(e,n){const i=n.data||{},s="value"in n&&!(ch.call(i,"hProperties")||ch.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function AC(e,n){const i=[];let s=-1;for(n&&i.push({type:"text",value:`
|
|
247
|
-
`});++s<e.length;)s&&i.push({type:"text",value:`
|
|
248
|
-
`}),i.push(e[s]);return n&&e.length>0&&i.push({type:"text",value:`
|
|
249
|
-
`}),i}function Zg(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function Qg(e,n){const i=PC(e,n),s=i.one(e,void 0),a=EC(i),l=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&l.children.push({type:"text",value:`
|
|
250
|
-
`},a),l}function UC(e,n){return e&&"run"in e?async function(i,s){const a=Qg(i,{file:s,...n});await e.run(a,s)}:function(i,s){return Qg(i,{file:s,...e||n})}}function Gg(e){if(e)throw e}var If,Kg;function VC(){if(Kg)return If;Kg=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},l=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),S=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!S)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},d=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(s)return s(h,y).value}else return;return h[y]};return If=function m(){var h,y,S,w,g,T,b=arguments[0],O=1,D=arguments.length,P=!1;for(typeof b=="boolean"&&(P=b,b=arguments[1]||{},O=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});O<D;++O)if(h=arguments[O],h!=null)for(y in h)S=f(b,y),w=f(h,y),b!==w&&(P&&w&&(l(w)||(g=a(w)))?(g?(g=!1,T=S&&a(S)?S:[]):T=S&&l(S)?S:{},d(b,{name:y,newValue:m(P,T,w)})):typeof w<"u"&&d(b,{name:y,newValue:w}));return b},If}var HC=VC();const jf=Kl(HC);function dh(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $C(){const e=[],n={run:i,use:s};return n;function i(...a){let l=-1;const d=a.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...a);function f(m,...h){const y=e[++l];let S=-1;if(m){d(m);return}for(;++S<a.length;)(h[S]===null||h[S]===void 0)&&(h[S]=a[S]);a=h,y?WC(y,f)(...h):d(null,...h)}}function s(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),n}}function WC(e,n){let i;return s;function s(...d){const f=e.length>d.length;let m;f&&d.push(a);try{m=e.apply(this,d)}catch(h){const y=h;if(f&&i)throw y;return a(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(l,a):m instanceof Error?a(m):l(m))}function a(d,...f){i||(i=!0,n(d,...f))}function l(d){a(null,d)}}const ei={basename:BC,dirname:qC,extname:YC,join:XC,sep:"/"};function BC(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ru(e);let i=0,s=-1,a=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(l){i=a+1;break}}else s<0&&(l=!0,s=a+1);return s<0?"":e.slice(i,s)}if(n===e)return"";let d=-1,f=n.length-1;for(;a--;)if(e.codePointAt(a)===47){if(l){i=a+1;break}}else d<0&&(l=!0,d=a+1),f>-1&&(e.codePointAt(a)===n.codePointAt(f--)?f<0&&(s=a):(f=-1,s=d));return i===s?s=d:s<0&&(s=e.length),e.slice(i,s)}function qC(e){if(ru(e),e.length===0)return".";let n=-1,i=e.length,s;for(;--i;)if(e.codePointAt(i)===47){if(s){n=i;break}}else s||(s=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function YC(e){ru(e);let n=e.length,i=-1,s=0,a=-1,l=0,d;for(;n--;){const f=e.codePointAt(n);if(f===47){if(d){s=n+1;break}continue}i<0&&(d=!0,i=n+1),f===46?a<0?a=n:l!==1&&(l=1):a>-1&&(l=-1)}return a<0||i<0||l===0||l===1&&a===i-1&&a===s+1?"":e.slice(a,i)}function XC(...e){let n=-1,i;for(;++n<e.length;)ru(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":ZC(i)}function ZC(e){ru(e);const n=e.codePointAt(0)===47;let i=QC(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function QC(e,n){let i="",s=0,a=-1,l=0,d=-1,f,m;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(a===d-1||l===1))if(a!==d-1&&l===2){if(i.length<2||s!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",s=0):(i=i.slice(0,m),s=i.length-1-i.lastIndexOf("/")),a=d,l=0;continue}}else if(i.length>0){i="",s=0,a=d,l=0;continue}}n&&(i=i.length>0?i+"/..":"..",s=2)}else i.length>0?i+="/"+e.slice(a+1,d):i=e.slice(a+1,d),s=d-a-1;a=d,l=0}else f===46&&l>-1?l++:l=-1}return i}function ru(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GC={cwd:KC};function KC(){return"/"}function fh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function JC(e){if(typeof e=="string")e=new URL(e);else if(!fh(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return eT(e)}function eT(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const s=n.codePointAt(i+2);if(s===70||s===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(n)}const Rf=["history","path","basename","stem","extname","dirname"];class iv{constructor(n){let i;n?fh(n)?i={path:n}:typeof n=="string"||tT(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":GC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Rf.length;){const l=Rf[s];l in i&&i[l]!==void 0&&i[l]!==null&&(this[l]=l==="history"?[...i[l]]:i[l])}let a;for(a in i)Rf.includes(a)||(this[a]=i[a])}get basename(){return typeof this.path=="string"?ei.basename(this.path):void 0}set basename(n){Pf(n,"basename"),_f(n,"basename"),this.path=ei.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ei.dirname(this.path):void 0}set dirname(n){Jg(this.basename,"dirname"),this.path=ei.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ei.extname(this.path):void 0}set extname(n){if(_f(n,"extname"),Jg(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ei.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){fh(n)&&(n=JC(n)),Pf(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ei.basename(this.path,this.extname):void 0}set stem(n){Pf(n,"stem"),_f(n,"stem"),this.path=ei.join(this.dirname||"",n+(this.extname||""))}fail(n,i,s){const a=this.message(n,i,s);throw a.fatal=!0,a}info(n,i,s){const a=this.message(n,i,s);return a.fatal=void 0,a}message(n,i,s){const a=new yn(n,i,s);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function _f(e,n){if(e&&e.includes(ei.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ei.sep+"`")}function Pf(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Jg(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function tT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nT=function(e){const s=this.constructor.prototype,a=s[e],l=function(){return a.apply(l,arguments)};return Object.setPrototypeOf(l,s),l},rT={}.hasOwnProperty;class qh extends nT{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=$C()}copy(){const n=new qh;let i=-1;for(;++i<this.attachers.length;){const s=this.attachers[i];n.use(...s)}return n.data(jf(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(Ff("data",this.frozen),this.namespace[n]=i,this):rT.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ff("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const a=i.call(n,...s);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=gc(n),s=this.parser||this.Parser;return Lf("parse",s),s(String(i),i)}process(n,i){const s=this;return this.freeze(),Lf("process",this.parser||this.Parser),zf("process",this.compiler||this.Compiler),i?a(void 0,i):new Promise(a);function a(l,d){const f=gc(n),m=s.parse(f);s.run(m,f,function(y,S,w){if(y||!S||!w)return h(y);const g=S,T=s.stringify(g,w);oT(T)?w.value=T:w.result=T,h(y,w)});function h(y,S){y||!S?d(y):l?l(S):i(void 0,S)}}}processSync(n){let i=!1,s;return this.freeze(),Lf("processSync",this.parser||this.Parser),zf("processSync",this.compiler||this.Compiler),this.process(n,a),ty("processSync","process",i),s;function a(l,d){i=!0,Gg(l),s=d}}run(n,i,s){ey(n),this.freeze();const a=this.transformers;return!s&&typeof i=="function"&&(s=i,i=void 0),s?l(void 0,s):new Promise(l);function l(d,f){const m=gc(i);a.run(n,m,h);function h(y,S,w){const g=S||n;y?f(y):d?d(g):s(void 0,g,w)}}}runSync(n,i){let s=!1,a;return this.run(n,i,l),ty("runSync","run",s),a;function l(d,f){Gg(d),a=f,s=!0}}stringify(n,i){this.freeze();const s=gc(i),a=this.compiler||this.Compiler;return zf("stringify",a),ey(n),a(n,s)}use(n,...i){const s=this.attachers,a=this.namespace;if(Ff("use",this.frozen),n!=null)if(typeof n=="function")m(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):d(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...S]=h;m(y,S)}else d(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function d(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(a.settings=jf(!0,a.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const S=h[y];l(S)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,y){let S=-1,w=-1;for(;++S<s.length;)if(s[S][0]===h){w=S;break}if(w===-1)s.push([h,...y]);else if(y.length>0){let[g,...T]=y;const b=s[w][1];dh(b)&&dh(g)&&(g=jf(!0,b,g)),s[w]=[h,g,...T]}}}}const iT=new qh().freeze();function Lf(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zf(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ff(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ey(e){if(!dh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ty(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function gc(e){return sT(e)?e:new iv(e)}function sT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oT(e){return typeof e=="string"||aT(e)}function aT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ny=[],ry={allowDangerousHtml:!0},uT=/^(https?|ircs?|mailto|xmpp)$/i,cT=[{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:"className",id:"remove-classname"},{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 Ii(e){const n=dT(e),i=fT(e);return hT(n.runSync(n.parse(i),i),e)}function dT(e){const n=e.rehypePlugins||ny,i=e.remarkPlugins||ny,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ry}:ry;return iT().use(BE).use(i).use(UC,s).use(n)}function fT(e){const n=e.children||"",i=new iv;return typeof n=="string"&&(i.value=n),i}function hT(e,n){const i=n.allowedElements,s=n.allowElement,a=n.components,l=n.disallowedElements,d=n.skipHtml,f=n.unwrapDisallowed,m=n.urlTransform||pT;for(const y of cT)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+lT+y.id,void 0);return rv(e,h),ES(e,{Fragment:E.Fragment,components:a,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function h(y,S,w){if(y.type==="raw"&&w&&typeof S=="number")return d?w.children.splice(S,1):w.children[S]={type:"text",value:y.value},S;if(y.type==="element"){let g;for(g in Of)if(Object.hasOwn(Of,g)&&Object.hasOwn(y.properties,g)){const T=y.properties[g],b=Of[g];(b===null||b.includes(y.tagName))&&(y.properties[g]=m(String(T||""),g,y))}}if(y.type==="element"){let g=i?!i.includes(y.tagName):l?l.includes(y.tagName):!1;if(!g&&s&&typeof S=="number"&&(g=!s(y,S,w)),g&&w&&typeof S=="number")return f&&y.children?w.children.splice(S,1,...y.children):w.children.splice(S,1),S}}}function pT(e){const n=e.indexOf(":"),i=e.indexOf("?"),s=e.indexOf("#"),a=e.indexOf("/");return n===-1||a!==-1&&n>a||i!==-1&&n>i||s!==-1&&n>s||uT.test(e.slice(0,n))?e:""}function mT({call:e}){const n=e.status==="running",i=e.status==="error";return E.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 my-1.5 rounded-lg bg-gray-100 dark:bg-zinc-800/50 border border-gray-200 dark:border-zinc-700/50 text-xs font-mono",children:[n?E.jsx(Na,{className:"h-3.5 w-3.5 text-indigo-400 animate-spin shrink-0"}):i?E.jsx(g0,{className:"h-3.5 w-3.5 text-red-400 shrink-0"}):E.jsx(Cc,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0"}),E.jsx("span",{className:"text-indigo-600 dark:text-indigo-300 font-semibold",children:e.toolName}),e.duration_ms!=null&&E.jsxs("span",{className:"text-zinc-500 ml-auto",children:[String(e.duration_ms),"ms"]})]})}function gT({confirmation:e,onApprove:n,onDeny:i}){const s=e.status==="approved"||e.status==="denied";return E.jsxs("div",{className:"my-2 p-3 rounded-lg border border-amber-500/30 bg-amber-500/5",children:[E.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300 mb-1",children:[E.jsx(ak,{className:"h-4 w-4"}),E.jsx("span",{className:"uppercase text-[11px] font-bold bg-indigo-500 text-white px-1.5 py-0.5 rounded",children:e.method}),E.jsx("span",{className:"text-zinc-300",children:e.endpoint})]}),e.reason&&E.jsx("p",{className:"text-xs text-zinc-400 mb-2",children:e.reason}),s?E.jsx("span",{className:`text-xs font-semibold ${e.status==="approved"?"text-emerald-400":"text-red-400"}`,children:e.status==="approved"?"Approved":"Denied"}):E.jsxs("div",{className:"flex gap-2",children:[E.jsx("button",{onClick:n,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-emerald-600 text-white hover:bg-emerald-500 transition-colors",children:"Approve"}),E.jsx("button",{onClick:i,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-zinc-700 text-zinc-300 border border-zinc-600 hover:bg-zinc-600 transition-colors",children:"Deny"})]})]})}function yT({blocks:e,respondToConfirmation:n}){return E.jsx(E.Fragment,{children:e.map((i,s)=>{switch(i.type){case"text":return E.jsx("div",{className:"prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-gray-100 dark:prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-gray-200 dark:prose-pre:border-zinc-700/50 prose-a:text-indigo-700 dark:prose-a:text-indigo-400 prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:E.jsx(Ii,{children:i.text})},`t-${String(s)}`);case"tool_calls":return E.jsx("div",{children:i.calls.map(a=>E.jsx(mT,{call:a},a.toolId))},`tc-${String(s)}`);case"confirmation":{const a=i.confirmation;return E.jsx(gT,{confirmation:a,onApprove:()=>{a.correlationId&&n(a.correlationId,!0)},onDeny:()=>{a.correlationId&&n(a.correlationId,!1)}},`cf-${String(s)}`)}default:return null}})})}function vT(){const{resumeSessionId:e}=tu(),[n]=uw(),i=n.get("resume"),s=Y.useMemo(()=>i??e,[i,e]),{messages:a,send:l,isStreaming:d,activeToolCalls:f,respondToConfirmation:m,usage:h}=qw({initialSessionId:s}),[y,S]=Y.useState(""),[w,g]=Y.useState([]),T=Y.useRef(null),b=Y.useRef(null);Y.useEffect(()=>{if(!s){g([]);return}fetch(`/session/${encodeURIComponent(s)}`).then(R=>R.ok?R.json():null).then(R=>{if(R&&typeof R=="object"&&"messages"in R&&Array.isArray(R.messages)){const V=R.messages;g(V.filter(ne=>ne.role==="user"||ne.role==="assistant"))}}).catch(()=>{})},[s]),Y.useEffect(()=>{var R;(R=T.current)==null||R.scrollIntoView({behavior:"smooth"})},[a,w]),Y.useEffect(()=>{var R;d||(R=b.current)==null||R.focus()},[d]);const O=Y.useCallback(R=>{R.preventDefault();const V=y.trim();!V||d||(S(""),b.current&&(b.current.style.height="auto"),l(V))},[y,d,l]),D=Y.useCallback(R=>{if(R.key==="Enter"&&!R.shiftKey){R.preventDefault();const V=y.trim();V&&!d&&(S(""),b.current&&(b.current.style.height="auto"),l(V))}},[y,d,l]),P=a.length>0||w.length>0;return E.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[E.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:P?E.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[w.map((R,V)=>E.jsx("div",{className:R.role==="user"?"mb-6 flex justify-end":"mb-6",children:R.role==="user"?E.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/60 text-white/80 text-[14px] leading-relaxed",children:R.text}):E.jsx("div",{className:"text-[14px] text-gray-400 dark:text-zinc-400 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-400 dark:prose-headings:text-zinc-400 prose-p:text-gray-400 dark:prose-p:text-zinc-400 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-a:text-indigo-500/60 dark:prose-a:text-indigo-400/60",children:E.jsx(Ii,{children:R.text})})},`hist-${String(V)}`)),w.length>0&&a.length===0&&E.jsx("div",{className:"text-center text-xs text-gray-400 dark:text-zinc-600 mb-4 py-2 border-t border-gray-200 dark:border-zinc-800/50",children:"Session resumed"}),a.map(R=>{switch(R.type){case"user":return E.jsx("div",{className:"mb-6 flex justify-end",children:E.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600 text-white text-[14px] leading-relaxed",children:R.text})},R.id);case"assistant_text":return E.jsx("div",{className:"mb-6",children:E.jsx("div",{className:"text-[14px] text-gray-900 dark:text-zinc-200",children:E.jsx(yT,{blocks:R.contentBlocks,respondToConfirmation:m})})},R.id);case"error":return E.jsx("div",{className:"mb-6 px-4 py-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-300 text-sm",children:R.message},R.id);default:return null}}),d&&f.length===0&&E.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-sm mb-4",children:[E.jsx(Na,{className:"h-4 w-4 animate-spin"}),E.jsx("span",{children:"Thinking..."})]}),E.jsx("div",{ref:T})]}):E.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center px-4",children:[E.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",className:"mb-5 opacity-30",children:[E.jsx("defs",{children:E.jsx("clipPath",{id:"empty-sq",children:E.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),E.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),E.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),E.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#empty-sq)"})]}),E.jsx("h2",{className:"text-lg font-medium text-gray-400 dark:text-zinc-400 mb-1",children:"What can I help with?"}),E.jsx("p",{className:"text-sm text-gray-400 dark:text-zinc-600 max-w-sm",children:"Ask me anything. I can search, analyze, and connect to your tools."})]})}),E.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800/80 bg-gray-50 dark:bg-[#0f0f17] px-4 py-4",children:[E.jsxs("form",{onSubmit:O,className:"max-w-3xl mx-auto relative",children:[E.jsx("textarea",{ref:b,value:y,onChange:R=>{S(R.target.value);const V=R.target;V.style.height="auto",V.style.height=`${Math.min(V.scrollHeight,160)}px`},onKeyDown:D,placeholder:"Message...",disabled:d,rows:1,className:"w-full resize-none rounded-xl bg-white dark:bg-zinc-800/80 border border-gray-300 dark:border-zinc-700/60 px-4 py-3 pr-12 text-[14px] text-gray-900 dark:text-zinc-100 placeholder-gray-400 dark:placeholder-zinc-500 outline-none focus:border-indigo-500/60 focus:ring-1 focus:ring-indigo-500/20 transition-colors disabled:opacity-50 overflow-y-auto",style:{minHeight:"48px",maxHeight:"160px"}}),E.jsx("button",{type:"submit",disabled:d||y.trim().length===0,className:"absolute right-2 bottom-2 h-8 w-8 rounded-lg bg-indigo-600 text-white flex items-center justify-center hover:bg-indigo-500 transition-colors disabled:opacity-20 disabled:hover:bg-indigo-600",children:E.jsx(ik,{className:"h-4 w-4"})})]}),(h.inputTokens>0||h.outputTokens>0)&&E.jsxs("div",{className:"max-w-3xl mx-auto mt-1.5 text-[11px] text-gray-400 dark:text-zinc-600 font-mono text-right",children:[(h.inputTokens+h.outputTokens).toLocaleString()," tokens (",h.inputTokens.toLocaleString()," in / ",h.outputTokens.toLocaleString()," out)"]})]})]})}function xT(e){const n=Date.now()-e,i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${String(i)}m ago`;const s=Math.floor(i/60);if(s<24)return`${String(s)}h ago`;const a=Math.floor(s/24);return`${String(a)}d ago`}function wT(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function kT(){const[e,n]=Y.useState([]),[i,s]=Y.useState(!0);return Y.useEffect(()=>{fetch("/sessions").then(a=>a.ok?a.json():{sessions:[]}).then(a=>{a&&typeof a=="object"&&"sessions"in a&&Array.isArray(a.sessions)&&n(a.sessions)}).catch(()=>{}).finally(()=>s(!1))},[]),E.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[E.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4",children:[E.jsx("h1",{className:"text-lg font-semibold text-zinc-200",children:"Sessions"}),E.jsxs("p",{className:"text-sm text-zinc-500 mt-0.5",children:[e.length," conversation",e.length!==1?"s":""]})]}),E.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:i?E.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):e.length===0?E.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center px-4",children:[E.jsx(Jf,{className:"h-8 w-8 text-zinc-700 mb-3"}),E.jsx("p",{className:"text-sm text-zinc-500",children:"No sessions yet. Start a conversation from the Chat page."})]}):E.jsx("div",{className:"divide-y divide-zinc-800/50",children:e.map(a=>E.jsxs(Mc,{to:`/sessions/${a.id}`,className:"flex items-center gap-4 px-6 py-4 hover:bg-white/[0.02] transition-colors group",children:[E.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-500/10 flex items-center justify-center shrink-0",children:E.jsx(Jf,{className:"h-4 w-4 text-indigo-400"})}),E.jsxs("div",{className:"flex-1 min-w-0",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"text-sm font-medium text-zinc-300 truncate font-mono",children:a.id.slice(0,8)}),E.jsx("span",{className:"text-xs text-zinc-600",children:a.tenantId})]}),E.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[E.jsxs("span",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[E.jsx(Ic,{className:"h-3 w-3"}),wT(a.createdAt)]}),E.jsxs("span",{className:"text-xs text-zinc-600",children:["Last active ",xT(a.lastAccessedAt)]})]})]}),E.jsx(m0,{className:"h-4 w-4 text-zinc-700 group-hover:text-zinc-500 transition-colors shrink-0"})]},a.id))})})]})}function ST(){const{sessionId:e}=Da(),n=Ma(),[i,s]=Y.useState([]),[a,l]=Y.useState(!0),[d,f]=Y.useState(null);Y.useEffect(()=>{e&&fetch(`/session/${encodeURIComponent(e)}`).then(y=>{if(!y.ok)throw new Error("Session not found");return y.json()}).then(y=>{y&&typeof y=="object"&&"messages"in y&&Array.isArray(y.messages)&&s(y.messages)}).catch(y=>{f(y instanceof Error?y.message:"Failed to load session")}).finally(()=>l(!1))},[e]);const m=i.filter(y=>y.role==="user"),h=i.filter(y=>y.role==="assistant");return E.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[E.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4 flex items-center justify-between",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx(Mc,{to:"/sessions",className:"text-zinc-500 hover:text-zinc-300 transition-colors",children:E.jsx(p0,{className:"h-4 w-4"})}),E.jsxs("div",{children:[E.jsxs("h1",{className:"text-sm font-semibold text-zinc-200 font-mono",children:[e==null?void 0:e.slice(0,8),"..."]}),E.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[E.jsxs("span",{className:"text-xs text-zinc-500",children:[m.length," messages"]}),E.jsxs("span",{className:"text-xs text-zinc-500",children:[h.length," responses"]})]})]})]}),E.jsxs("button",{onClick:()=>{n(`/?resume=${e??""}`)},className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md bg-indigo-600 text-white hover:bg-indigo-500 transition-colors",children:[E.jsx(Ih,{className:"h-3 w-3"}),"Resume"]})]}),E.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:a?E.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):d?E.jsx("div",{className:"flex items-center justify-center h-32 text-red-400 text-sm",children:d}):E.jsx("div",{className:"max-w-3xl mx-auto px-4 py-6",children:i.map((y,S)=>E.jsx("div",{className:y.role==="user"?"mb-6 flex justify-end":"mb-6",children:y.role==="user"?E.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/70 text-white text-[14px] leading-relaxed",children:y.text}):E.jsx("div",{className:"text-[14px] text-zinc-300 prose prose-invert prose-sm max-w-none prose-headings:text-zinc-200 prose-p:text-zinc-300 prose-strong:text-zinc-200 prose-code:text-indigo-300 prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-zinc-700/50 prose-a:text-indigo-400 prose-li:text-zinc-300",children:E.jsx(Ii,{children:y.text})})},`msg-${String(S)}`))})})]})}const iy=["bg-blue-100 dark:bg-blue-500/10 text-blue-800 dark:text-blue-400","bg-green-100 dark:bg-green-500/10 text-green-800 dark:text-green-400","bg-yellow-100 dark:bg-yellow-500/10 text-yellow-800 dark:text-yellow-400","bg-red-100 dark:bg-red-500/10 text-red-800 dark:text-red-400","bg-purple-100 dark:bg-purple-500/10 text-purple-800 dark:text-purple-400","bg-pink-100 dark:bg-pink-500/10 text-pink-800 dark:text-pink-400","bg-indigo-100 dark:bg-indigo-500/10 text-indigo-800 dark:text-indigo-400","bg-orange-100 dark:bg-orange-500/10 text-orange-800 dark:text-orange-400","bg-teal-100 dark:bg-teal-500/10 text-teal-800 dark:text-teal-400","bg-cyan-100 dark:bg-cyan-500/10 text-cyan-800 dark:text-cyan-400"];function bT(e){let n=0;for(let i=0;i<e.length;i++)n=(n<<5)-n+e.charCodeAt(i)|0;return Math.abs(n)}const ET={P1:"bg-red-100 text-red-800",P2:"bg-orange-100 text-orange-800",P3:"bg-yellow-100 text-yellow-800",P4:"bg-blue-100 text-blue-800",critical:"bg-red-100 text-red-800",at_risk:"bg-orange-100 text-orange-800",attention:"bg-yellow-100 text-yellow-800",healthy:"bg-green-100 text-green-800",active:"bg-green-100 text-green-800",resolved:"bg-gray-100 text-gray-800",false_positive:"bg-gray-100 text-gray-600",immediate:"bg-red-100 text-red-800",soon:"bg-yellow-100 text-yellow-800",when_convenient:"bg-blue-100 text-blue-800"};function sv({value:e,className:n}){const i=ET[e]??iy[bT(e)%iy.length];return E.jsx("span",{className:Oo("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",i,n),children:e})}function CT(e){const n=new Date(String(e)),i=Date.now()-n.getTime(),s=Math.floor(i/6e4);if(s<1)return"just now";if(s<60)return`${String(s)}m ago`;const a=Math.floor(s/60);if(a<24)return`${String(a)}h ago`;const l=Math.floor(a/24);return l<30?`${String(l)}d ago`:n.toLocaleDateString()}function TT(e,n){const i=Object.entries(e);let s=null;const a=[],l=[];let d=null;for(const[f,m]of i)if(f!==n){if(m.type==="enum"){a.push(f);continue}if(m.type==="datetime"&&!d){d=f;continue}if(!s&&m.type==="string"&&["title","name","summary","subject"].includes(f)){s=f;continue}m.type==="string"&&l.push(f)}return!s&&l.length>0&&(s=l.shift()??null),{title:s,badges:a,textFields:l.slice(0,2),dateField:d}}function NT({storeName:e,schema:n,keyTemplate:i,documents:s,total:a}){const l=Ma(),d=i.replace(/[{}]/g,""),f=TT(n,d);return s.length===0?E.jsx("div",{className:"text-center py-16 text-gray-400 dark:text-zinc-600 text-sm",children:"No documents yet."}):E.jsxs("div",{children:[E.jsx("div",{className:"space-y-2",children:s.map(m=>{const h=m.payload,y=f.title?String(h[f.title]??m.key):m.key;return E.jsx("div",{onClick:()=>{l(`/entities/${e}/${m.key}`)},className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:E.jsxs("div",{className:"flex items-start justify-between gap-3",children:[E.jsxs("div",{className:"flex-1 min-w-0",children:[E.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-200 mb-1",children:y}),f.textFields.map(S=>{const w=h[S];if(!w)return null;const g=String(w);return E.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-400 mb-1.5 line-clamp-2",children:g.length>150?g.slice(0,150)+"...":g},S)}),f.badges.length>0&&E.jsx("div",{className:"flex items-center gap-1.5 flex-wrap mt-1",children:f.badges.map(S=>{const w=h[S];return w?E.jsx(sv,{value:String(w)},S):null})})]}),E.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[E.jsx("span",{className:"text-[11px] font-mono text-gray-400 dark:text-zinc-600",children:m.key}),f.dateField&&h[f.dateField]&&E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600",children:CT(h[f.dateField])})]})]})},m.key)})}),a>s.length&&E.jsxs("div",{className:"mt-4 text-center text-xs text-gray-400 dark:text-zinc-600",children:["Showing ",s.length," of ",a.toLocaleString()]})]})}function OT(){const{storeName:e}=Da(),{stores:n}=tu(),[i,s]=Y.useState(),[a,l]=Y.useState(),d=n.find(g=>g.name===e),{documents:f,total:m,isLoading:h,error:y}=Xw(e??"",{sort:i,filter:a,limit:50,refreshInterval:15e3}),S=Y.useCallback(g=>{s(g)},[]),w=Y.useCallback(g=>{l(Object.keys(g).length>0?g:void 0)},[]);return d?E.jsxs("div",{className:"max-w-[1200px] mx-auto px-6 pt-8 pb-12",children:[E.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[E.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-100 dark:bg-indigo-500/10 flex items-center justify-center",children:E.jsx(y0,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-400"})}),E.jsxs("div",{children:[E.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:d.entity.name}),E.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:[m.toLocaleString()," document",m!==1?"s":""," in ",E.jsx("span",{className:"font-mono text-xs",children:d.name})]})]})]}),y&&E.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:y}),h?E.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):E.jsx(NT,{storeName:e??"",schema:d.entity.schema,keyTemplate:d.entity.key,documents:f,total:m,onSortChange:S,onFilterChange:w})]}):E.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",e,"” not found."]})}function Yh({field:e,value:n,mode:i}){if(n==null)return E.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"—"});switch(e.type){case"string":return E.jsx(MT,{value:n,mode:i});case"number":return E.jsx(DT,{value:n,field:e,mode:i});case"boolean":return E.jsx(IT,{value:n});case"datetime":return E.jsx(jT,{value:n,mode:i});case"enum":return E.jsx(sv,{value:String(n)});case"array":return E.jsx(RT,{value:n,field:e,mode:i});case"object":return E.jsx(_T,{value:n,field:e,mode:i});case"ref":return E.jsx(PT,{value:n,field:e});default:return E.jsx("span",{children:String(n)})}}function MT({value:e,mode:n}){const i=String(e);return n==="table"&&i.length>50?E.jsxs("span",{title:i,children:[i.slice(0,50),"…"]}):E.jsx("span",{children:i})}function DT({value:e,field:n,mode:i}){const s=Number(e);if(n.min===0&&n.max===1){const a=Math.round(s*100);return i==="table"?E.jsxs("span",{className:"tabular-nums",children:[a,"%"]}):E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:"flex-1 h-2 bg-gray-100 dark:bg-zinc-800 rounded-full max-w-[200px]",children:E.jsx("div",{className:"h-2 bg-indigo-600 dark:bg-indigo-500 rounded-full",style:{width:`${a}%`}})}),E.jsxs("span",{className:"text-sm tabular-nums",children:[a,"%"]})]})}return E.jsx("span",{className:"tabular-nums",children:s.toLocaleString()})}function IT({value:e}){return e?E.jsx(Jw,{className:"h-4 w-4 text-green-600"}):E.jsx(lk,{className:"h-4 w-4 text-gray-400 dark:text-zinc-500"})}function jT({value:e,mode:n}){const i=new Date(String(e)),s=LT(i);return n==="table"?E.jsx("span",{className:"text-gray-400 dark:text-zinc-500",title:i.toISOString(),children:s}):E.jsxs("div",{children:[E.jsx("div",{children:i.toLocaleString()}),E.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-500",children:s})]})}function RT({value:e,field:n,mode:i}){return Array.isArray(e)?i==="table"?E.jsxs("span",{className:"inline-flex items-center rounded-full bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 text-xs",children:[e.length," item",e.length!==1?"s":""]}):e.length===0?E.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"Empty array"}):E.jsx("div",{className:"space-y-1",children:e.map((s,a)=>E.jsx("div",{className:"pl-3 border-l-2 border-gray-200 dark:border-zinc-700",children:n.item?E.jsx(Yh,{field:n.item,value:s,mode:"detail"}):E.jsx("span",{children:String(s)})},a))}):E.jsx("span",{children:String(e)})}function _T({value:e,field:n,mode:i}){if(typeof e!="object"||e===null)return E.jsx("span",{children:String(e)});if(i==="table")return E.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"{...}"});const s=e;return n.fields?E.jsx("div",{className:"border rounded-md divide-y",children:Object.entries(n.fields).map(([a,l])=>E.jsxs("div",{className:"px-3 py-2 flex",children:[E.jsx("div",{className:"w-32 text-xs font-medium text-gray-400 dark:text-zinc-500 shrink-0",children:a}),E.jsx("div",{className:"flex-1 min-w-0 text-sm",children:E.jsx(Yh,{field:l,value:s[a],mode:"detail"})})]},a))}):E.jsx("pre",{className:"text-xs whitespace-pre-wrap bg-gray-100 dark:bg-zinc-800/30 rounded p-2",children:JSON.stringify(e,null,2)})}function PT({value:e,field:n}){const i=n.store;return i?E.jsx(Mc,{to:`/entities/${i}/${String(e)}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:String(e)}):E.jsx("span",{children:String(e)})}function LT(e){const i=Date.now()-e.getTime();if(i<0)return"just now";const s=Math.floor(i/1e3);if(s<60)return`${s}s ago`;const a=Math.floor(s/60);if(a<60)return`${a} min ago`;const l=Math.floor(a/60);if(l<24)return`${l}h ago`;const d=Math.floor(l/24);return d<30?`${d}d ago`:e.toLocaleDateString()}/**
|
|
251
|
-
* @license
|
|
252
|
-
* Copyright 2025 Amodal Labs, Inc.
|
|
253
|
-
* SPDX-License-Identifier: MIT
|
|
254
|
-
*/function zT({history:e}){return e.length===0?null:E.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[E.jsx("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider",children:"Version History"}),E.jsx("div",{className:"space-y-3",children:e.map(n=>E.jsxs("div",{className:"relative pl-6 pb-3 border-l-2 border-muted last:pb-0",children:[E.jsx("div",{className:"absolute -left-[5px] top-1 h-2 w-2 rounded-full bg-muted-foreground"}),E.jsxs("div",{className:"flex items-center justify-between mb-1",children:[E.jsxs("span",{className:"text-sm font-medium",children:["v",n.version]}),E.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(n.meta.computedAt).toLocaleString()})]}),E.jsxs("details",{className:"text-xs",children:[E.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View payload"}),E.jsx("pre",{className:"mt-1 whitespace-pre-wrap bg-muted/30 rounded p-2 overflow-auto max-h-40",children:JSON.stringify(n.payload,null,2)})]})]},n.version))})]})}function FT({schema:e,document:n,meta:i,history:s,hasTrace:a}){return E.jsxs("div",{className:"space-y-5",children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:n.key}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-500 bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 rounded font-mono",children:["v",String(n.version)]}),i.stale&&E.jsx("span",{className:"px-2 py-0.5 rounded bg-amber-50 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-500/20 text-xs font-medium",children:"Stale"})]})]}),E.jsx("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl divide-y divide-gray-100 dark:divide-zinc-800/50",children:Object.entries(e).map(([l,d])=>E.jsxs("div",{className:"px-5 py-3.5 flex",children:[E.jsxs("div",{className:"w-44 text-sm font-medium text-gray-500 dark:text-zinc-400 shrink-0 pt-0.5",children:[l,d.nullable&&E.jsx("span",{className:"text-[10px] ml-1 text-gray-300 dark:text-zinc-600",children:"?"})]}),E.jsx("div",{className:"text-sm flex-1 min-w-0 text-gray-900 dark:text-zinc-200",children:E.jsx(Yh,{field:d,value:n.payload[l],mode:"detail"})})]},l))}),E.jsxs("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-5",children:[E.jsx("h2",{className:"text-xs font-semibold text-gray-400 dark:text-zinc-500 uppercase tracking-widest mb-3",children:"Metadata"}),E.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-3",children:[E.jsx(ws,{icon:E.jsx(Ic,{className:"h-3.5 w-3.5"}),label:"Computed",value:AT(i.computedAt)}),i.ttl!==void 0&&E.jsx(ws,{icon:E.jsx(kf,{className:"h-3.5 w-3.5"}),label:"TTL",value:`${String(i.ttl)}s`}),i.modelUsed&&E.jsx(ws,{icon:E.jsx(ek,{className:"h-3.5 w-3.5"}),label:"Model",value:i.modelUsed}),i.durationMs!==void 0&&E.jsx(ws,{icon:E.jsx(Oa,{className:"h-3.5 w-3.5"}),label:"Duration",value:`${String(i.durationMs)}ms`}),i.tokenCost!==void 0&&E.jsx(ws,{icon:E.jsx(kf,{className:"h-3.5 w-3.5"}),label:"Tokens",value:i.tokenCost.toLocaleString()}),i.estimatedCostUsd!==void 0&&E.jsx(ws,{icon:E.jsx(tk,{className:"h-3.5 w-3.5"}),label:"Cost",value:`$${i.estimatedCostUsd.toFixed(4)}`}),i.automationId&&E.jsx(ws,{icon:E.jsx(Oa,{className:"h-3.5 w-3.5"}),label:"Automation",value:i.automationId}),i.skillId&&E.jsx(ws,{icon:E.jsx(kf,{className:"h-3.5 w-3.5"}),label:"Skill",value:i.skillId})]})]}),a&&i.trace&&E.jsxs("details",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl group",children:[E.jsx("summary",{className:"px-5 py-3.5 cursor-pointer text-sm font-medium text-gray-500 dark:text-zinc-400 hover:text-gray-700 dark:hover:text-zinc-300 transition-colors",children:"Reasoning Trace"}),E.jsx("pre",{className:"px-5 py-4 border-t border-gray-100 dark:border-zinc-800 text-xs whitespace-pre-wrap text-gray-600 dark:text-zinc-400 bg-gray-50/50 dark:bg-zinc-900/30 overflow-auto max-h-96 scrollbar-thin font-mono",children:i.trace})]}),E.jsx(zT,{history:s})]})}function ws({icon:e,label:n,value:i}){return E.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[E.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:e}),E.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:[n,":"]}),E.jsx("span",{className:"text-gray-700 dark:text-zinc-300 font-mono text-xs truncate",children:i})]})}function AT(e){const n=new Date(e),s=Date.now()-n.getTime();return s<6e4?"just now":s<36e5?`${String(Math.floor(s/6e4))} min ago`:s<864e5?`${String(Math.floor(s/36e5))}h ago`:n.toLocaleString()}function UT(){const{storeName:e,key:n}=Da(),i=Ma(),{stores:s}=tu(),a=s.find(y=>y.name===e),{document:l,meta:d,history:f,isLoading:m,error:h}=Yw(e??"",{key:n??"",refreshInterval:15e3});return a?E.jsx("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:E.jsxs("div",{className:"max-w-[900px] mx-auto px-6 pt-8 pb-12",children:[E.jsxs("button",{onClick:()=>{i(`/entities/${e??""}`)},className:"flex items-center gap-1.5 text-sm text-gray-500 dark:text-zinc-400 hover:text-indigo-600 dark:hover:text-indigo-400 mb-5 transition-colors",children:[E.jsx(p0,{className:"h-4 w-4"}),"Back to ",a.entity.name]}),h&&E.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:h}),m?E.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):!l||!d?E.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Document not found."}):E.jsx(FT,{schema:a.entity.schema,document:l,meta:d,history:f,hasTrace:a.trace})]})}):E.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",e,"” not found."]})}var mo={},Qn={},jl={},go={},Af={},sy;function VT(){return sy||(sy=1,Object.defineProperty(Af,"__esModule",{value:!0})),Af}var Rl={},_l={},oy;function Ro(){var n,i,s,a,l,ov,f;if(oy)return _l;oy=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.CronField=void 0;let e=(f=class{constructor(h,y={rawValue:""}){Re(this,l);Re(this,n,!1);Re(this,i,!1);Re(this,s,!1);Re(this,a,[]);wl(this,"options",{rawValue:""});if(!Array.isArray(h))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(h.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...y,rawValue:y.rawValue??""},pe(this,a,h.sort(f.sorter)),pe(this,s,this.options.wildcard!==void 0?this.options.wildcard:Ce(this,l,ov).call(this)),pe(this,n,this.options.rawValue.includes("L")||h.includes("L")),pe(this,i,this.options.rawValue.includes("?")||h.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return _(this,n)}get hasQuestionMarkChar(){return _(this,i)}get isWildcard(){return _(this,s)}get values(){return _(this,a)}static sorter(h,y){const S=typeof h=="number",w=typeof y=="number";return S&&w?h-y:!S&&!w?h.localeCompare(y):S?-1:1}static findNearestValueInList(h,y,S=!1){if(S){for(let w=h.length-1;w>=0;w--)if(h[w]<y)return h[w];return null}for(let w=0;w<h.length;w++)if(h[w]>y)return h[w];return null}findNearestValue(h,y=!1){return this.constructor.findNearestValueInList(this.values,h,y)}serialize(){return{wildcard:_(this,s),values:_(this,a)}}validate(){let h;const y=this.chars.length>0?` or chars ${this.chars.join("")}`:"",S=b=>O=>new RegExp(`^\\d{0,2}${O}$`).test(b),w=b=>(h=b,typeof b=="number"?b>=this.min&&b<=this.max:this.chars.some(S(b)));if(!_(this,a).every(w))throw new Error(`${this.constructor.name} Validation error, got value ${h} expected range ${this.min}-${this.max}${y}`);const T=_(this,a).find((b,O)=>_(this,a).indexOf(b)!==O);if(T)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${T}`)}},n=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakSet,ov=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(h,y)=>y+this.min).every(h=>_(this,a).includes(h))},f);return _l.CronField=e,_l}var ay;function HT(){if(ay)return Rl;ay=1,Object.defineProperty(Rl,"__esModule",{value:!0}),Rl.CronDayOfMonth=void 0;const e=Ro(),n=1,i=31,s=Object.freeze(["L"]);let a=class extends e.CronField{static get min(){return n}static get max(){return i}static get chars(){return s}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(d,f){super(d,f),this.validate()}get values(){return super.values}};return Rl.CronDayOfMonth=a,Rl}var Pl={},ly;function $T(){if(ly)return Pl;ly=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.CronDayOfWeek=void 0;const e=Ro(),n=0,i=7,s=Object.freeze(["L"]);let a=class extends e.CronField{static get min(){return n}static get max(){return i}static get chars(){return s}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(d,f){super(d,f),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Pl.CronDayOfWeek=a,Pl}var Ll={},uy;function WT(){if(uy)return Ll;uy=1,Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.CronHour=void 0;const e=Ro(),n=0,i=23,s=Object.freeze([]);let a=class extends e.CronField{static get min(){return n}static get max(){return i}static get chars(){return s}constructor(d,f){super(d,f),this.validate()}get values(){return super.values}};return Ll.CronHour=a,Ll}var zl={},cy;function BT(){if(cy)return zl;cy=1,Object.defineProperty(zl,"__esModule",{value:!0}),zl.CronMinute=void 0;const e=Ro(),n=0,i=59,s=Object.freeze([]);let a=class extends e.CronField{static get min(){return n}static get max(){return i}static get chars(){return s}constructor(d,f){super(d,f),this.validate()}get values(){return super.values}};return zl.CronMinute=a,zl}var Fl={},Uf={},zn={},dy;function qT(){if(dy)return zn;dy=1,Object.defineProperty(zn,"__esModule",{value:!0});class e extends Error{}class n extends e{constructor(u){super(`Invalid DateTime: ${u.toMessage()}`)}}class i extends e{constructor(u){super(`Invalid Interval: ${u.toMessage()}`)}}class s extends e{constructor(u){super(`Invalid Duration: ${u.toMessage()}`)}}class a extends e{}class l extends e{constructor(u){super(`Invalid unit ${u}`)}}class d extends e{}class f extends e{constructor(){super("Zone is an abstract class")}}const m="numeric",h="short",y="long",S={year:m,month:m,day:m},w={year:m,month:h,day:m},g={year:m,month:h,day:m,weekday:h},T={year:m,month:y,day:m},b={year:m,month:y,day:m,weekday:y},O={hour:m,minute:m},D={hour:m,minute:m,second:m},P={hour:m,minute:m,second:m,timeZoneName:h},R={hour:m,minute:m,second:m,timeZoneName:y},V={hour:m,minute:m,hourCycle:"h23"},ne={hour:m,minute:m,second:m,hourCycle:"h23"},q={hour:m,minute:m,second:m,hourCycle:"h23",timeZoneName:h},I={hour:m,minute:m,second:m,hourCycle:"h23",timeZoneName:y},Q={year:m,month:m,day:m,hour:m,minute:m},J={year:m,month:m,day:m,hour:m,minute:m,second:m},H={year:m,month:h,day:m,hour:m,minute:m},U={year:m,month:h,day:m,hour:m,minute:m,second:m},$={year:m,month:h,day:m,weekday:h,hour:m,minute:m},ue={year:m,month:y,day:m,hour:m,minute:m,timeZoneName:h},ae={year:m,month:y,day:m,hour:m,minute:m,second:m,timeZoneName:h},ie={year:m,month:y,day:m,weekday:y,hour:m,minute:m,timeZoneName:y},xe={year:m,month:y,day:m,weekday:y,hour:m,minute:m,second:m,timeZoneName:y};class Ee{get type(){throw new f}get name(){throw new f}get ianaName(){return this.name}get isUniversal(){throw new f}offsetName(u,v){throw new f}formatOffset(u,v){throw new f}offset(u){throw new f}equals(u){throw new f}get isValid(){throw new f}}let ce=null;class ve extends Ee{static get instance(){return ce===null&&(ce=new ve),ce}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(u,{format:v,locale:C}){return iu(u,v,C)}formatOffset(u,v){return Vi(this.offset(u),v)}offset(u){return-new Date(u).getTimezoneOffset()}equals(u){return u.type==="system"}get isValid(){return!0}}const j=new Map;function B(k){let u=j.get(k);return u===void 0&&(u=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:k,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),j.set(k,u)),u}const le={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function L(k,u){const v=k.format(u).replace(/\u200E/g,""),C=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(v),[,M,F,X,K,ee,me,He]=C;return[X,M,F,K,ee,me,He]}function ze(k,u){const v=k.formatToParts(u),C=[];for(let M=0;M<v.length;M++){const{type:F,value:X}=v[M],K=le[F];F==="era"?C[K]=X:Ve(K)||(C[K]=parseInt(X,10))}return C}const Ae=new Map;class Te extends Ee{static create(u){let v=Ae.get(u);return v===void 0&&Ae.set(u,v=new Te(u)),v}static resetCache(){Ae.clear(),j.clear()}static isValidSpecifier(u){return this.isValidZone(u)}static isValidZone(u){if(!u)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:u}).format(),!0}catch{return!1}}constructor(u){super(),this.zoneName=u,this.valid=Te.isValidZone(u)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(u,{format:v,locale:C}){return iu(u,v,C,this.name)}formatOffset(u,v){return Vi(this.offset(u),v)}offset(u){if(!this.valid)return NaN;const v=new Date(u);if(isNaN(v))return NaN;const C=B(this.name);let[M,F,X,K,ee,me,He]=C.formatToParts?ze(C,v):L(C,v);K==="BC"&&(M=-Math.abs(M)+1);const dt=Ai({year:M,month:F,day:X,hour:ee===24?0:ee,minute:me,second:He,millisecond:0});let $e=+v;const Et=$e%1e3;return $e-=Et>=0?Et:1e3+Et,(dt-$e)/(60*1e3)}equals(u){return u.type==="iana"&&u.name===this.name}get isValid(){return this.valid}}let tt={};function Qe(k,u={}){const v=JSON.stringify([k,u]);let C=tt[v];return C||(C=new Intl.ListFormat(k,u),tt[v]=C),C}const st=new Map;function Ct(k,u={}){const v=JSON.stringify([k,u]);let C=st.get(v);return C===void 0&&(C=new Intl.DateTimeFormat(k,u),st.set(v,C)),C}const vn=new Map;function $t(k,u={}){const v=JSON.stringify([k,u]);let C=vn.get(v);return C===void 0&&(C=new Intl.NumberFormat(k,u),vn.set(v,C)),C}const un=new Map;function zr(k,u={}){const{base:v,...C}=u,M=JSON.stringify([k,C]);let F=un.get(M);return F===void 0&&(F=new Intl.RelativeTimeFormat(k,u),un.set(M,F)),F}let Hn=null;function xn(){return Hn||(Hn=new Intl.DateTimeFormat().resolvedOptions().locale,Hn)}const tr=new Map;function oi(k){let u=tr.get(k);return u===void 0&&(u=new Intl.DateTimeFormat(k).resolvedOptions(),tr.set(k,u)),u}const $n=new Map;function nr(k){let u=$n.get(k);if(!u){const v=new Intl.Locale(k);u="getWeekInfo"in v?v.getWeekInfo():v.weekInfo,"minimalDays"in u||(u={...lt,...u}),$n.set(k,u)}return u}function rr(k){const u=k.indexOf("-x-");u!==-1&&(k=k.substring(0,u));const v=k.indexOf("-u-");if(v===-1)return[k];{let C,M;try{C=Ct(k).resolvedOptions(),M=k}catch{const ee=k.substring(0,v);C=Ct(ee).resolvedOptions(),M=ee}const{numberingSystem:F,calendar:X}=C;return[M,F,X]}}function ai(k,u,v){return(v||u)&&(k.includes("-u-")||(k+="-u"),v&&(k+=`-ca-${v}`),u&&(k+=`-nu-${u}`)),k}function Ri(k){const u=[];for(let v=1;v<=12;v++){const C=Ze.utc(2009,v,1);u.push(k(C))}return u}function Mn(k){const u=[];for(let v=1;v<=7;v++){const C=Ze.utc(2016,11,13+v);u.push(k(C))}return u}function wn(k,u,v,C){const M=k.listingMode();return M==="error"?null:M==="en"?v(u):C(u)}function de(k){return k.numberingSystem&&k.numberingSystem!=="latn"?!1:k.numberingSystem==="latn"||!k.locale||k.locale.startsWith("en")||oi(k.locale).numberingSystem==="latn"}class Se{constructor(u,v,C){this.padTo=C.padTo||0,this.floor=C.floor||!1;const{padTo:M,floor:F,...X}=C;if(!v||Object.keys(X).length>0){const K={useGrouping:!1,...C};C.padTo>0&&(K.minimumIntegerDigits=C.padTo),this.inf=$t(u,K)}}format(u){if(this.inf){const v=this.floor?Math.floor(u):u;return this.inf.format(v)}else{const v=this.floor?Math.floor(u):li(u,3);return jt(v,this.padTo)}}}class Ue{constructor(u,v,C){this.opts=C,this.originalZone=void 0;let M;if(this.opts.timeZone)this.dt=u;else if(u.zone.type==="fixed"){const X=-1*(u.offset/60),K=X>=0?`Etc/GMT+${X}`:`Etc/GMT${X}`;u.offset!==0&&Te.create(K).valid?(M=K,this.dt=u):(M="UTC",this.dt=u.offset===0?u:u.setZone("UTC").plus({minutes:u.offset}),this.originalZone=u.zone)}else u.zone.type==="system"?this.dt=u:u.zone.type==="iana"?(this.dt=u,M=u.zone.name):(M="UTC",this.dt=u.setZone("UTC").plus({minutes:u.offset}),this.originalZone=u.zone);const F={...this.opts};F.timeZone=F.timeZone||M,this.dtf=Ct(v,F)}format(){return this.originalZone?this.formatToParts().map(({value:u})=>u).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const u=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?u.map(v=>{if(v.type==="timeZoneName"){const C=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...v,value:C}}else return v}):u}resolvedOptions(){return this.dtf.resolvedOptions()}}class Xe{constructor(u,v,C){this.opts={style:"long",...C},!v&&Wn()&&(this.rtf=zr(u,C))}format(u,v){return this.rtf?this.rtf.format(u,v):lu(v,u,this.opts.numeric,this.opts.style!=="long")}formatToParts(u,v){return this.rtf?this.rtf.formatToParts(u,v):[]}}const lt={firstDay:1,minimalDays:4,weekend:[6,7]};class We{static fromOpts(u){return We.create(u.locale,u.numberingSystem,u.outputCalendar,u.weekSettings,u.defaultToEN)}static create(u,v,C,M,F=!1){const X=u||A.defaultLocale,K=X||(F?"en-US":xn()),ee=v||A.defaultNumberingSystem,me=C||A.defaultOutputCalendar,He=kr(M)||A.defaultWeekSettings;return new We(K,ee,me,He,X)}static resetCache(){Hn=null,st.clear(),vn.clear(),un.clear(),tr.clear(),$n.clear()}static fromObject({locale:u,numberingSystem:v,outputCalendar:C,weekSettings:M}={}){return We.create(u,v,C,M)}constructor(u,v,C,M,F){const[X,K,ee]=rr(u);this.locale=X,this.numberingSystem=v||K||null,this.outputCalendar=C||ee||null,this.weekSettings=M,this.intl=ai(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=F,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=de(this)),this.fastNumbersCached}listingMode(){const u=this.isEnglish(),v=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return u&&v?"en":"intl"}clone(u){return!u||Object.getOwnPropertyNames(u).length===0?this:We.create(u.locale||this.specifiedLocale,u.numberingSystem||this.numberingSystem,u.outputCalendar||this.outputCalendar,kr(u.weekSettings)||this.weekSettings,u.defaultToEN||!1)}redefaultToEN(u={}){return this.clone({...u,defaultToEN:!0})}redefaultToSystem(u={}){return this.clone({...u,defaultToEN:!1})}months(u,v=!1){return wn(this,u,Po,()=>{const C=this.intl==="ja"||this.intl.startsWith("ja-");v&=!C;const M=v?{month:u,day:"numeric"}:{month:u},F=v?"format":"standalone";if(!this.monthsCache[F][u]){const X=C?K=>this.dtFormatter(K,M).format():K=>this.extract(K,M,"month");this.monthsCache[F][u]=Ri(X)}return this.monthsCache[F][u]})}weekdays(u,v=!1){return wn(this,u,br,()=>{const C=v?{weekday:u,year:"numeric",month:"long",day:"numeric"}:{weekday:u},M=v?"format":"standalone";return this.weekdaysCache[M][u]||(this.weekdaysCache[M][u]=Mn(F=>this.extract(F,C,"weekday"))),this.weekdaysCache[M][u]})}meridiems(){return wn(this,void 0,()=>$i,()=>{if(!this.meridiemCache){const u={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ze.utc(2016,11,13,9),Ze.utc(2016,11,13,19)].map(v=>this.extract(v,u,"dayperiod"))}return this.meridiemCache})}eras(u){return wn(this,u,La,()=>{const v={era:u};return this.eraCache[u]||(this.eraCache[u]=[Ze.utc(-40,1,1),Ze.utc(2017,1,1)].map(C=>this.extract(C,v,"era"))),this.eraCache[u]})}extract(u,v,C){const M=this.dtFormatter(u,v),F=M.formatToParts(),X=F.find(K=>K.type.toLowerCase()===C);return X?X.value:null}numberFormatter(u={}){return new Se(this.intl,u.forceSimple||this.fastNumbers,u)}dtFormatter(u,v={}){return new Ue(u,this.intl,v)}relFormatter(u={}){return new Xe(this.intl,this.isEnglish(),u)}listFormatter(u={}){return Qe(this.intl,u)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||oi(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:or()?nr(this.locale):lt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(u){return this.locale===u.locale&&this.numberingSystem===u.numberingSystem&&this.outputCalendar===u.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let kn=null;class ut extends Ee{static get utcInstance(){return kn===null&&(kn=new ut(0)),kn}static instance(u){return u===0?ut.utcInstance:new ut(u)}static parseSpecifier(u){if(u){const v=u.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(v)return new ut(Ui(v[1],v[2]))}return null}constructor(u){super(),this.fixed=u}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Vi(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Vi(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(u,v){return Vi(this.fixed,v)}get isUniversal(){return!0}offset(){return this.fixed}equals(u){return u.type==="fixed"&&u.fixed===this.fixed}get isValid(){return!0}}class Dn extends Ee{constructor(u){super(),this.zoneName=u}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function en(k,u){if(Ve(k)||k===null)return u;if(k instanceof Ee)return k;if(Fs(k)){const v=k.toLowerCase();return v==="default"?u:v==="local"||v==="system"?ve.instance:v==="utc"||v==="gmt"?ut.utcInstance:ut.parseSpecifier(v)||Te.create(k)}else return Qt(k)?ut.instance(k):typeof k=="object"&&"offset"in k&&typeof k.offset=="function"?k:new Dn(k)}const Pt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Sn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},rn=Pt.hanidec.replace(/[\[|\]]/g,"").split("");function Fr(k){let u=parseInt(k,10);if(isNaN(u)){u="";for(let v=0;v<k.length;v++){const C=k.charCodeAt(v);if(k[v].search(Pt.hanidec)!==-1)u+=rn.indexOf(k[v]);else for(const M in Sn){const[F,X]=Sn[M];C>=F&&C<=X&&(u+=C-F)}}return parseInt(u,10)}else return u}const Ar=new Map;function ir(){Ar.clear()}function Wt({numberingSystem:k},u=""){const v=k||"latn";let C=Ar.get(v);C===void 0&&(C=new Map,Ar.set(v,C));let M=C.get(u);return M===void 0&&(M=new RegExp(`${Pt[v]}${u}`),C.set(u,M)),M}let Ps=()=>Date.now(),_i="system",Ls=null,Pi=null,Ur=null,xr=60,zs,Vr=null;class A{static get now(){return Ps}static set now(u){Ps=u}static set defaultZone(u){_i=u}static get defaultZone(){return en(_i,ve.instance)}static get defaultLocale(){return Ls}static set defaultLocale(u){Ls=u}static get defaultNumberingSystem(){return Pi}static set defaultNumberingSystem(u){Pi=u}static get defaultOutputCalendar(){return Ur}static set defaultOutputCalendar(u){Ur=u}static get defaultWeekSettings(){return Vr}static set defaultWeekSettings(u){Vr=kr(u)}static get twoDigitCutoffYear(){return xr}static set twoDigitCutoffYear(u){xr=u%100}static get throwOnInvalid(){return zs}static set throwOnInvalid(u){zs=u}static resetCaches(){We.resetCache(),Te.resetCache(),Ze.resetCache(),ir()}}class G{constructor(u,v){this.reason=u,this.explanation=v}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const oe=[0,31,59,90,120,151,181,212,243,273,304,334],fe=[0,31,60,91,121,152,182,213,244,274,305,335];function we(k,u){return new G("unit out of range",`you specified ${u} (of type ${typeof u}) as a ${k}, which is invalid`)}function Pe(k,u,v){const C=new Date(Date.UTC(k,u-1,v));k<100&&k>=0&&C.setUTCFullYear(C.getUTCFullYear()-1900);const M=C.getUTCDay();return M===0?7:M}function Be(k,u,v){return v+($r(k)?fe:oe)[u-1]}function De(k,u){const v=$r(k)?fe:oe,C=v.findIndex(F=>F<u),M=u-v[C];return{month:C+1,day:M}}function Ie(k,u){return(k-u+7)%7+1}function Ne(k,u=4,v=1){const{year:C,month:M,day:F}=k,X=Be(C,M,F),K=Ie(Pe(C,M,F),v);let ee=Math.floor((X-K+14-u)/7),me;return ee<1?(me=C-1,ee=ui(me,u,v)):ee>ui(C,u,v)?(me=C+1,ee=1):me=C,{weekYear:me,weekNumber:ee,weekday:K,...Hi(k)}}function Me(k,u=4,v=1){const{weekYear:C,weekNumber:M,weekday:F}=k,X=Ie(Pe(C,1,u),v),K=Fi(C);let ee=M*7+F-X-7+u,me;ee<1?(me=C-1,ee+=Fi(me)):ee>K?(me=C+1,ee-=Fi(C)):me=C;const{month:He,day:Ke}=De(me,ee);return{year:me,month:He,day:Ke,...Hi(k)}}function Ge(k){const{year:u,month:v,day:C}=k,M=Be(u,v,C);return{year:u,ordinal:M,...Hi(k)}}function ot(k){const{year:u,ordinal:v}=k,{month:C,day:M}=De(u,v);return{year:u,month:C,day:M,...Hi(k)}}function Bt(k,u){if(!Ve(k.localWeekday)||!Ve(k.localWeekNumber)||!Ve(k.localWeekYear)){if(!Ve(k.weekday)||!Ve(k.weekNumber)||!Ve(k.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Ve(k.localWeekday)||(k.weekday=k.localWeekday),Ve(k.localWeekNumber)||(k.weekNumber=k.localWeekNumber),Ve(k.localWeekYear)||(k.weekYear=k.localWeekYear),delete k.localWeekday,delete k.localWeekNumber,delete k.localWeekYear,{minDaysInFirstWeek:u.getMinDaysInFirstWeek(),startOfWeek:u.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function kt(k,u=4,v=1){const C=pt(k.weekYear),M=nt(k.weekNumber,1,ui(k.weekYear,u,v)),F=nt(k.weekday,1,7);return C?M?F?!1:we("weekday",k.weekday):we("week",k.weekNumber):we("weekYear",k.weekYear)}function mt(k){const u=pt(k.year),v=nt(k.ordinal,1,Fi(k.year));return u?v?!1:we("ordinal",k.ordinal):we("year",k.year)}function Ot(k){const u=pt(k.year),v=nt(k.month,1,12),C=nt(k.day,1,_o(k.year,k.month));return u?v?C?!1:we("day",k.day):we("month",k.month):we("year",k.year)}function sr(k){const{hour:u,minute:v,second:C,millisecond:M}=k,F=nt(u,0,23)||u===24&&v===0&&C===0&&M===0,X=nt(v,0,59),K=nt(C,0,59),ee=nt(M,0,999);return F?X?K?ee?!1:we("millisecond",M):we("second",C):we("minute",v):we("hour",u)}function Ve(k){return typeof k>"u"}function Qt(k){return typeof k=="number"}function pt(k){return typeof k=="number"&&k%1===0}function Fs(k){return typeof k=="string"}function wr(k){return Object.prototype.toString.call(k)==="[object Date]"}function Wn(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function or(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Li(k){return Array.isArray(k)?k:[k]}function ct(k,u,v){if(k.length!==0)return k.reduce((C,M)=>{const F=[u(M),M];return C&&v(C[0],F[0])===C[0]?C:F},null)[1]}function Tt(k,u){return u.reduce((v,C)=>(v[C]=k[C],v),{})}function Lt(k,u){return Object.prototype.hasOwnProperty.call(k,u)}function kr(k){if(k==null)return null;if(typeof k!="object")throw new d("Week settings must be an object");if(!nt(k.firstDay,1,7)||!nt(k.minimalDays,1,7)||!Array.isArray(k.weekend)||k.weekend.some(u=>!nt(u,1,7)))throw new d("Invalid week settings");return{firstDay:k.firstDay,minimalDays:k.minimalDays,weekend:Array.from(k.weekend)}}function nt(k,u,v){return pt(k)&&k>=u&&k<=v}function Hr(k,u){return k-u*Math.floor(k/u)}function jt(k,u=2){const v=k<0;let C;return v?C="-"+(""+-k).padStart(u,"0"):C=(""+k).padStart(u,"0"),C}function ar(k){if(!(Ve(k)||k===null||k===""))return parseInt(k,10)}function lr(k){if(!(Ve(k)||k===null||k===""))return parseFloat(k)}function zi(k){if(!(Ve(k)||k===null||k==="")){const u=parseFloat("0."+k)*1e3;return Math.floor(u)}}function li(k,u,v="round"){const C=10**u;switch(v){case"expand":return k>0?Math.ceil(k*C)/C:Math.floor(k*C)/C;case"trunc":return Math.trunc(k*C)/C;case"round":return Math.round(k*C)/C;case"floor":return Math.floor(k*C)/C;case"ceil":return Math.ceil(k*C)/C;default:throw new RangeError(`Value rounding ${v} is out of range`)}}function $r(k){return k%4===0&&(k%100!==0||k%400===0)}function Fi(k){return $r(k)?366:365}function _o(k,u){const v=Hr(u-1,12)+1,C=k+(u-v)/12;return v===2?$r(C)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][v-1]}function Ai(k){let u=Date.UTC(k.year,k.month-1,k.day,k.hour,k.minute,k.second,k.millisecond);return k.year<100&&k.year>=0&&(u=new Date(u),u.setUTCFullYear(k.year,k.month-1,k.day)),+u}function _a(k,u,v){return-Ie(Pe(k,1,u),v)+u-1}function ui(k,u=4,v=1){const C=_a(k,u,v),M=_a(k+1,u,v);return(Fi(k)-C+M)/7}function ci(k){return k>99?k:k>A.twoDigitCutoffYear?1900+k:2e3+k}function iu(k,u,v,C=null){const M=new Date(k),F={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};C&&(F.timeZone=C);const X={timeZoneName:u,...F},K=new Intl.DateTimeFormat(v,X).formatToParts(M).find(ee=>ee.type.toLowerCase()==="timezonename");return K?K.value:null}function Ui(k,u){let v=parseInt(k,10);Number.isNaN(v)&&(v=0);const C=parseInt(u,10)||0,M=v<0||Object.is(v,-0)?-C:C;return v*60+M}function vt(k){const u=Number(k);if(typeof k=="boolean"||k===""||!Number.isFinite(u))throw new d(`Invalid unit value ${k}`);return u}function As(k,u){const v={};for(const C in k)if(Lt(k,C)){const M=k[C];if(M==null)continue;v[u(C)]=vt(M)}return v}function Vi(k,u){const v=Math.trunc(Math.abs(k/60)),C=Math.trunc(Math.abs(k%60)),M=k>=0?"+":"-";switch(u){case"short":return`${M}${jt(v,2)}:${jt(C,2)}`;case"narrow":return`${M}${v}${C>0?`:${C}`:""}`;case"techie":return`${M}${jt(v,2)}${jt(C,2)}`;default:throw new RangeError(`Value format ${u} is out of range for property format`)}}function Hi(k){return Tt(k,["hour","minute","second","millisecond"])}const su=["January","February","March","April","May","June","July","August","September","October","November","December"],Pa=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ou=["J","F","M","A","M","J","J","A","S","O","N","D"];function Po(k){switch(k){case"narrow":return[...ou];case"short":return[...Pa];case"long":return[...su];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Us=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Sr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Wr=["M","T","W","T","F","S","S"];function br(k){switch(k){case"narrow":return[...Wr];case"short":return[...Sr];case"long":return[...Us];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const $i=["AM","PM"],Vs=["Before Christ","Anno Domini"],Br=["BC","AD"],Pc=["B","A"];function La(k){switch(k){case"narrow":return[...Pc];case"short":return[...Br];case"long":return[...Vs];default:return null}}function Hs(k){return $i[k.hour<12?0:1]}function Lc(k,u){return br(u)[k.weekday-1]}function au(k,u){return Po(u)[k.month-1]}function Lo(k,u){return La(u)[k.year<0?0:1]}function lu(k,u,v="always",C=!1){const M={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},F=["hours","minutes","seconds"].indexOf(k)===-1;if(v==="auto"&&F){const Ke=k==="days";switch(u){case 1:return Ke?"tomorrow":`next ${M[k][0]}`;case-1:return Ke?"yesterday":`last ${M[k][0]}`;case 0:return Ke?"today":`this ${M[k][0]}`}}const X=Object.is(u,-0)||u<0,K=Math.abs(u),ee=K===1,me=M[k],He=C?ee?me[1]:me[2]||me[1]:ee?M[k][0]:k;return X?`${K} ${He} ago`:`in ${K} ${He}`}function uu(k,u){let v="";for(const C of k)C.literal?v+=C.val:v+=u(C.val);return v}const $s={D:S,DD:w,DDD:T,DDDD:b,t:O,tt:D,ttt:P,tttt:R,T:V,TT:ne,TTT:q,TTTT:I,f:Q,ff:H,fff:ue,ffff:ie,F:J,FF:U,FFF:ae,FFFF:xe};class qt{static create(u,v={}){return new qt(u,v)}static parseFormat(u){let v=null,C="",M=!1;const F=[];for(let X=0;X<u.length;X++){const K=u.charAt(X);K==="'"?((C.length>0||M)&&F.push({literal:M||/^\s+$/.test(C),val:C===""?"'":C}),v=null,C="",M=!M):M||K===v?C+=K:(C.length>0&&F.push({literal:/^\s+$/.test(C),val:C}),C=K,v=K)}return C.length>0&&F.push({literal:M||/^\s+$/.test(C),val:C}),F}static macroTokenToFormatOpts(u){return $s[u]}constructor(u,v){this.opts=v,this.loc=u,this.systemLoc=null}formatWithSystemDefault(u,v){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(u,{...this.opts,...v}).format()}dtFormatter(u,v={}){return this.loc.dtFormatter(u,{...this.opts,...v})}formatDateTime(u,v){return this.dtFormatter(u,v).format()}formatDateTimeParts(u,v){return this.dtFormatter(u,v).formatToParts()}formatInterval(u,v){return this.dtFormatter(u.start,v).dtf.formatRange(u.start.toJSDate(),u.end.toJSDate())}resolvedOptions(u,v){return this.dtFormatter(u,v).resolvedOptions()}num(u,v=0,C=void 0){if(this.opts.forceSimple)return jt(u,v);const M={...this.opts};return v>0&&(M.padTo=v),C&&(M.signDisplay=C),this.loc.numberFormatter(M).format(u)}formatDateTimeFromString(u,v){const C=this.loc.listingMode()==="en",M=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",F=($e,Et)=>this.loc.extract(u,$e,Et),X=$e=>u.isOffsetFixed&&u.offset===0&&$e.allowZ?"Z":u.isValid?u.zone.formatOffset(u.ts,$e.format):"",K=()=>C?Hs(u):F({hour:"numeric",hourCycle:"h12"},"dayperiod"),ee=($e,Et)=>C?au(u,$e):F(Et?{month:$e}:{month:$e,day:"numeric"},"month"),me=($e,Et)=>C?Lc(u,$e):F(Et?{weekday:$e}:{weekday:$e,month:"long",day:"numeric"},"weekday"),He=$e=>{const Et=qt.macroTokenToFormatOpts($e);return Et?this.formatWithSystemDefault(u,Et):$e},Ke=$e=>C?Lo(u,$e):F({era:$e},"era"),dt=$e=>{switch($e){case"S":return this.num(u.millisecond);case"u":case"SSS":return this.num(u.millisecond,3);case"s":return this.num(u.second);case"ss":return this.num(u.second,2);case"uu":return this.num(Math.floor(u.millisecond/10),2);case"uuu":return this.num(Math.floor(u.millisecond/100));case"m":return this.num(u.minute);case"mm":return this.num(u.minute,2);case"h":return this.num(u.hour%12===0?12:u.hour%12);case"hh":return this.num(u.hour%12===0?12:u.hour%12,2);case"H":return this.num(u.hour);case"HH":return this.num(u.hour,2);case"Z":return X({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return X({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return X({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return u.zone.offsetName(u.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return u.zone.offsetName(u.ts,{format:"long",locale:this.loc.locale});case"z":return u.zoneName;case"a":return K();case"d":return M?F({day:"numeric"},"day"):this.num(u.day);case"dd":return M?F({day:"2-digit"},"day"):this.num(u.day,2);case"c":return this.num(u.weekday);case"ccc":return me("short",!0);case"cccc":return me("long",!0);case"ccccc":return me("narrow",!0);case"E":return this.num(u.weekday);case"EEE":return me("short",!1);case"EEEE":return me("long",!1);case"EEEEE":return me("narrow",!1);case"L":return M?F({month:"numeric",day:"numeric"},"month"):this.num(u.month);case"LL":return M?F({month:"2-digit",day:"numeric"},"month"):this.num(u.month,2);case"LLL":return ee("short",!0);case"LLLL":return ee("long",!0);case"LLLLL":return ee("narrow",!0);case"M":return M?F({month:"numeric"},"month"):this.num(u.month);case"MM":return M?F({month:"2-digit"},"month"):this.num(u.month,2);case"MMM":return ee("short",!1);case"MMMM":return ee("long",!1);case"MMMMM":return ee("narrow",!1);case"y":return M?F({year:"numeric"},"year"):this.num(u.year);case"yy":return M?F({year:"2-digit"},"year"):this.num(u.year.toString().slice(-2),2);case"yyyy":return M?F({year:"numeric"},"year"):this.num(u.year,4);case"yyyyyy":return M?F({year:"numeric"},"year"):this.num(u.year,6);case"G":return Ke("short");case"GG":return Ke("long");case"GGGGG":return Ke("narrow");case"kk":return this.num(u.weekYear.toString().slice(-2),2);case"kkkk":return this.num(u.weekYear,4);case"W":return this.num(u.weekNumber);case"WW":return this.num(u.weekNumber,2);case"n":return this.num(u.localWeekNumber);case"nn":return this.num(u.localWeekNumber,2);case"ii":return this.num(u.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(u.localWeekYear,4);case"o":return this.num(u.ordinal);case"ooo":return this.num(u.ordinal,3);case"q":return this.num(u.quarter);case"qq":return this.num(u.quarter,2);case"X":return this.num(Math.floor(u.ts/1e3));case"x":return this.num(u.ts);default:return He($e)}};return uu(qt.parseFormat(v),dt)}formatDurationFromString(u,v){const C=this.opts.signMode==="negativeLargestOnly"?-1:1,M=He=>{switch(He[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},F=(He,Ke)=>dt=>{const $e=M(dt);if($e){const Et=Ke.isNegativeDuration&&$e!==Ke.largestUnit?C:1;let Cn;return this.opts.signMode==="negativeLargestOnly"&&$e!==Ke.largestUnit?Cn="never":this.opts.signMode==="all"?Cn="always":Cn="auto",this.num(He.get($e)*Et,dt.length,Cn)}else return dt},X=qt.parseFormat(v),K=X.reduce((He,{literal:Ke,val:dt})=>Ke?He:He.concat(dt),[]),ee=u.shiftTo(...K.map(M).filter(He=>He)),me={isNegativeDuration:ee<0,largestUnit:Object.keys(ee.values)[0]};return uu(X,F(ee,me))}}const di=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Er(...k){const u=k.reduce((v,C)=>v+C.source,"");return RegExp(`^${u}$`)}function Wi(...k){return u=>k.reduce(([v,C,M],F)=>{const[X,K,ee]=F(u,M);return[{...v,...X},K||C,ee]},[{},null,1]).slice(0,2)}function Bi(k,...u){if(k==null)return[null,null];for(const[v,C]of u){const M=v.exec(k);if(M)return C(M)}return[null,null]}function zo(...k){return(u,v)=>{const C={};let M;for(M=0;M<k.length;M++)C[k[M]]=ar(u[v+M]);return[C,null,v+M]}}const Ws=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,za=`(?:${Ws.source}?(?:\\[(${di.source})\\])?)?`,Fo=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Cr=RegExp(`${Fo.source}${za}`),Bs=RegExp(`(?:[Tt]${Cr.source})?`),Ao=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,cu=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Uo=/(\d{4})-?(\d{3})/,Vo=zo("weekYear","weekNumber","weekDay"),du=zo("year","ordinal"),bn=/(\d{4})-(\d\d)-(\d\d)/,fi=RegExp(`${Fo.source} ?(?:${Ws.source}|(${di.source}))?`),Fa=RegExp(`(?: ${fi.source})?`);function ur(k,u,v){const C=k[u];return Ve(C)?v:ar(C)}function zc(k,u){return[{year:ur(k,u),month:ur(k,u+1,1),day:ur(k,u+2,1)},null,u+3]}function qr(k,u){return[{hours:ur(k,u,0),minutes:ur(k,u+1,0),seconds:ur(k,u+2,0),milliseconds:zi(k[u+3])},null,u+4]}function hi(k,u){const v=!k[u]&&!k[u+1],C=Ui(k[u+1],k[u+2]),M=v?null:ut.instance(C);return[{},M,u+3]}function Tr(k,u){const v=k[u]?Te.create(k[u]):null;return[{},v,u+1]}const Ho=RegExp(`^T?${Fo.source}$`),fu=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Fc(k){const[u,v,C,M,F,X,K,ee,me]=k,He=u[0]==="-",Ke=ee&&ee[0]==="-",dt=($e,Et=!1)=>$e!==void 0&&(Et||$e&&He)?-$e:$e;return[{years:dt(lr(v)),months:dt(lr(C)),weeks:dt(lr(M)),days:dt(lr(F)),hours:dt(lr(X)),minutes:dt(lr(K)),seconds:dt(lr(ee),ee==="-0"),milliseconds:dt(zi(me),Ke)}]}const Ac={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Aa(k,u,v,C,M,F,X){const K={year:u.length===2?ci(ar(u)):ar(u),month:Pa.indexOf(v)+1,day:ar(C),hour:ar(M),minute:ar(F)};return X&&(K.second=ar(X)),k&&(K.weekday=k.length>3?Us.indexOf(k)+1:Sr.indexOf(k)+1),K}const Ua=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Uc(k){const[,u,v,C,M,F,X,K,ee,me,He,Ke]=k,dt=Aa(u,M,C,v,F,X,K);let $e;return ee?$e=Ac[ee]:me?$e=0:$e=Ui(He,Ke),[dt,new ut($e)]}function Vc(k){return k.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Hc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$c=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Wc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Va(k){const[,u,v,C,M,F,X,K]=k;return[Aa(u,M,C,v,F,X,K),ut.utcInstance]}function Bc(k){const[,u,v,C,M,F,X,K]=k;return[Aa(u,K,v,C,M,F,X),ut.utcInstance]}const qc=Er(Ao,Bs),Yc=Er(cu,Bs),Xc=Er(Uo,Bs),Ha=Er(Cr),hu=Wi(zc,qr,hi,Tr),Zc=Wi(Vo,qr,hi,Tr),Qc=Wi(du,qr,hi,Tr),pu=Wi(qr,hi,Tr);function Gc(k){return Bi(k,[qc,hu],[Yc,Zc],[Xc,Qc],[Ha,pu])}function Kc(k){return Bi(Vc(k),[Ua,Uc])}function Jc(k){return Bi(k,[Hc,Va],[$c,Va],[Wc,Bc])}function ed(k){return Bi(k,[fu,Fc])}const td=Wi(qr);function nd(k){return Bi(k,[Ho,td])}const rd=Er(bn,Fa),$a=Er(fi),qs=Wi(qr,hi,Tr);function id(k){return Bi(k,[rd,hu],[$a,qs])}const Wa="Invalid Duration",Ba={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},mu={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Ba},En=146097/400,pi=146097/4800,qi={years:{quarters:4,months:12,weeks:En/7,days:En,hours:En*24,minutes:En*24*60,seconds:En*24*60*60,milliseconds:En*24*60*60*1e3},quarters:{months:3,weeks:En/28,days:En/4,hours:En*24/4,minutes:En*24*60/4,seconds:En*24*60*60/4,milliseconds:En*24*60*60*1e3/4},months:{weeks:pi/7,days:pi,hours:pi*24,minutes:pi*24*60,seconds:pi*24*60*60,milliseconds:pi*24*60*60*1e3},...Ba},mi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],sd=mi.slice(0).reverse();function Nr(k,u,v=!1){const C={values:v?u.values:{...k.values,...u.values||{}},loc:k.loc.clone(u.loc),conversionAccuracy:u.conversionAccuracy||k.conversionAccuracy,matrix:u.matrix||k.matrix};return new at(C)}function qa(k,u){var v;let C=(v=u.milliseconds)!=null?v:0;for(const M of sd.slice(1))u[M]&&(C+=u[M]*k[M].milliseconds);return C}function Ya(k,u){const v=qa(k,u)<0?-1:1;mi.reduceRight((C,M)=>{if(Ve(u[M]))return C;if(C){const F=u[C]*v,X=k[M][C],K=Math.floor(F/X);u[M]+=K*v,u[C]-=K*X*v}return M},null),mi.reduce((C,M)=>{if(Ve(u[M]))return C;if(C){const F=u[C]%1;u[C]-=F,u[M]+=F*k[C][M]}return M},null)}function Yi(k){const u={};for(const[v,C]of Object.entries(k))C!==0&&(u[v]=C);return u}class at{constructor(u){const v=u.conversionAccuracy==="longterm"||!1;let C=v?qi:mu;u.matrix&&(C=u.matrix),this.values=u.values,this.loc=u.loc||We.create(),this.conversionAccuracy=v?"longterm":"casual",this.invalid=u.invalid||null,this.matrix=C,this.isLuxonDuration=!0}static fromMillis(u,v){return at.fromObject({milliseconds:u},v)}static fromObject(u,v={}){if(u==null||typeof u!="object")throw new d(`Duration.fromObject: argument expected to be an object, got ${u===null?"null":typeof u}`);return new at({values:As(u,at.normalizeUnit),loc:We.fromObject(v),conversionAccuracy:v.conversionAccuracy,matrix:v.matrix})}static fromDurationLike(u){if(Qt(u))return at.fromMillis(u);if(at.isDuration(u))return u;if(typeof u=="object")return at.fromObject(u);throw new d(`Unknown duration argument ${u} of type ${typeof u}`)}static fromISO(u,v){const[C]=ed(u);return C?at.fromObject(C,v):at.invalid("unparsable",`the input "${u}" can't be parsed as ISO 8601`)}static fromISOTime(u,v){const[C]=nd(u);return C?at.fromObject(C,v):at.invalid("unparsable",`the input "${u}" can't be parsed as ISO 8601`)}static invalid(u,v=null){if(!u)throw new d("need to specify a reason the Duration is invalid");const C=u instanceof G?u:new G(u,v);if(A.throwOnInvalid)throw new s(C);return new at({invalid:C})}static normalizeUnit(u){const v={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[u&&u.toLowerCase()];if(!v)throw new l(u);return v}static isDuration(u){return u&&u.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(u,v={}){const C={...v,floor:v.round!==!1&&v.floor!==!1};return this.isValid?qt.create(this.loc,C).formatDurationFromString(this,u):Wa}toHuman(u={}){if(!this.isValid)return Wa;const v=u.showZeros!==!1,C=mi.map(M=>{const F=this.values[M];return Ve(F)||F===0&&!v?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...u,unit:M.slice(0,-1)}).format(F)}).filter(M=>M);return this.loc.listFormatter({type:"conjunction",style:u.listStyle||"narrow",...u}).format(C)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let u="P";return this.years!==0&&(u+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(u+=this.months+this.quarters*3+"M"),this.weeks!==0&&(u+=this.weeks+"W"),this.days!==0&&(u+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(u+="T"),this.hours!==0&&(u+=this.hours+"H"),this.minutes!==0&&(u+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(u+=li(this.seconds+this.milliseconds/1e3,3)+"S"),u==="P"&&(u+="T0S"),u}toISOTime(u={}){if(!this.isValid)return null;const v=this.toMillis();return v<0||v>=864e5?null:(u={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...u,includeOffset:!1},Ze.fromMillis(v,{zone:"UTC"}).toISOTime(u))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?qa(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(u){if(!this.isValid)return this;const v=at.fromDurationLike(u),C={};for(const M of mi)(Lt(v.values,M)||Lt(this.values,M))&&(C[M]=v.get(M)+this.get(M));return Nr(this,{values:C},!0)}minus(u){if(!this.isValid)return this;const v=at.fromDurationLike(u);return this.plus(v.negate())}mapUnits(u){if(!this.isValid)return this;const v={};for(const C of Object.keys(this.values))v[C]=vt(u(this.values[C],C));return Nr(this,{values:v},!0)}get(u){return this[at.normalizeUnit(u)]}set(u){if(!this.isValid)return this;const v={...this.values,...As(u,at.normalizeUnit)};return Nr(this,{values:v})}reconfigure({locale:u,numberingSystem:v,conversionAccuracy:C,matrix:M}={}){const X={loc:this.loc.clone({locale:u,numberingSystem:v}),matrix:M,conversionAccuracy:C};return Nr(this,X)}as(u){return this.isValid?this.shiftTo(u).get(u):NaN}normalize(){if(!this.isValid)return this;const u=this.toObject();return Ya(this.matrix,u),Nr(this,{values:u},!0)}rescale(){if(!this.isValid)return this;const u=Yi(this.normalize().shiftToAll().toObject());return Nr(this,{values:u},!0)}shiftTo(...u){if(!this.isValid)return this;if(u.length===0)return this;u=u.map(X=>at.normalizeUnit(X));const v={},C={},M=this.toObject();let F;for(const X of mi)if(u.indexOf(X)>=0){F=X;let K=0;for(const me in C)K+=this.matrix[me][X]*C[me],C[me]=0;Qt(M[X])&&(K+=M[X]);const ee=Math.trunc(K);v[X]=ee,C[X]=(K*1e3-ee*1e3)/1e3}else Qt(M[X])&&(C[X]=M[X]);for(const X in C)C[X]!==0&&(v[F]+=X===F?C[X]:C[X]/this.matrix[F][X]);return Ya(this.matrix,v),Nr(this,{values:v},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const u={};for(const v of Object.keys(this.values))u[v]=this.values[v]===0?0:-this.values[v];return Nr(this,{values:u},!0)}removeZeros(){if(!this.isValid)return this;const u=Yi(this.values);return Nr(this,{values:u},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(u){if(!this.isValid||!u.isValid||!this.loc.equals(u.loc))return!1;function v(C,M){return C===void 0||C===0?M===void 0||M===0:C===M}for(const C of mi)if(!v(this.values[C],u.values[C]))return!1;return!0}}const Xi="Invalid Interval";function $o(k,u){return!k||!k.isValid?Rt.invalid("missing or invalid start"):!u||!u.isValid?Rt.invalid("missing or invalid end"):u<k?Rt.invalid("end before start",`The end of an interval must be after its start, but you had start=${k.toISO()} and end=${u.toISO()}`):null}class Rt{constructor(u){this.s=u.start,this.e=u.end,this.invalid=u.invalid||null,this.isLuxonInterval=!0}static invalid(u,v=null){if(!u)throw new d("need to specify a reason the Interval is invalid");const C=u instanceof G?u:new G(u,v);if(A.throwOnInvalid)throw new i(C);return new Rt({invalid:C})}static fromDateTimes(u,v){const C=Xr(u),M=Xr(v),F=$o(C,M);return F??new Rt({start:C,end:M})}static after(u,v){const C=at.fromDurationLike(v),M=Xr(u);return Rt.fromDateTimes(M,M.plus(C))}static before(u,v){const C=at.fromDurationLike(v),M=Xr(u);return Rt.fromDateTimes(M.minus(C),M)}static fromISO(u,v){const[C,M]=(u||"").split("/",2);if(C&&M){let F,X;try{F=Ze.fromISO(C,v),X=F.isValid}catch{X=!1}let K,ee;try{K=Ze.fromISO(M,v),ee=K.isValid}catch{ee=!1}if(X&&ee)return Rt.fromDateTimes(F,K);if(X){const me=at.fromISO(M,v);if(me.isValid)return Rt.after(F,me)}else if(ee){const me=at.fromISO(C,v);if(me.isValid)return Rt.before(K,me)}}return Rt.invalid("unparsable",`the input "${u}" can't be parsed as ISO 8601`)}static isInterval(u){return u&&u.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(u="milliseconds"){return this.isValid?this.toDuration(u).get(u):NaN}count(u="milliseconds",v){if(!this.isValid)return NaN;const C=this.start.startOf(u,v);let M;return v!=null&&v.useLocaleWeeks?M=this.end.reconfigure({locale:C.locale}):M=this.end,M=M.startOf(u,v),Math.floor(M.diff(C,u).get(u))+(M.valueOf()!==this.end.valueOf())}hasSame(u){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,u):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(u){return this.isValid?this.s>u:!1}isBefore(u){return this.isValid?this.e<=u:!1}contains(u){return this.isValid?this.s<=u&&this.e>u:!1}set({start:u,end:v}={}){return this.isValid?Rt.fromDateTimes(u||this.s,v||this.e):this}splitAt(...u){if(!this.isValid)return[];const v=u.map(Xr).filter(X=>this.contains(X)).sort((X,K)=>X.toMillis()-K.toMillis()),C=[];let{s:M}=this,F=0;for(;M<this.e;){const X=v[F]||this.e,K=+X>+this.e?this.e:X;C.push(Rt.fromDateTimes(M,K)),M=K,F+=1}return C}splitBy(u){const v=at.fromDurationLike(u);if(!this.isValid||!v.isValid||v.as("milliseconds")===0)return[];let{s:C}=this,M=1,F;const X=[];for(;C<this.e;){const K=this.start.plus(v.mapUnits(ee=>ee*M));F=+K>+this.e?this.e:K,X.push(Rt.fromDateTimes(C,F)),C=F,M+=1}return X}divideEqually(u){return this.isValid?this.splitBy(this.length()/u).slice(0,u):[]}overlaps(u){return this.e>u.s&&this.s<u.e}abutsStart(u){return this.isValid?+this.e==+u.s:!1}abutsEnd(u){return this.isValid?+u.e==+this.s:!1}engulfs(u){return this.isValid?this.s<=u.s&&this.e>=u.e:!1}equals(u){return!this.isValid||!u.isValid?!1:this.s.equals(u.s)&&this.e.equals(u.e)}intersection(u){if(!this.isValid)return this;const v=this.s>u.s?this.s:u.s,C=this.e<u.e?this.e:u.e;return v>=C?null:Rt.fromDateTimes(v,C)}union(u){if(!this.isValid)return this;const v=this.s<u.s?this.s:u.s,C=this.e>u.e?this.e:u.e;return Rt.fromDateTimes(v,C)}static merge(u){const[v,C]=u.sort((M,F)=>M.s-F.s).reduce(([M,F],X)=>F?F.overlaps(X)||F.abutsStart(X)?[M,F.union(X)]:[M.concat([F]),X]:[M,X],[[],null]);return C&&v.push(C),v}static xor(u){let v=null,C=0;const M=[],F=u.map(ee=>[{time:ee.s,type:"s"},{time:ee.e,type:"e"}]),X=Array.prototype.concat(...F),K=X.sort((ee,me)=>ee.time-me.time);for(const ee of K)C+=ee.type==="s"?1:-1,C===1?v=ee.time:(v&&+v!=+ee.time&&M.push(Rt.fromDateTimes(v,ee.time)),v=null);return Rt.merge(M)}difference(...u){return Rt.xor([this].concat(u)).map(v=>this.intersection(v)).filter(v=>v&&!v.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Xi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(u=S,v={}){return this.isValid?qt.create(this.s.loc.clone(v),u).formatInterval(this):Xi}toISO(u){return this.isValid?`${this.s.toISO(u)}/${this.e.toISO(u)}`:Xi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xi}toISOTime(u){return this.isValid?`${this.s.toISOTime(u)}/${this.e.toISOTime(u)}`:Xi}toFormat(u,{separator:v=" – "}={}){return this.isValid?`${this.s.toFormat(u)}${v}${this.e.toFormat(u)}`:Xi}toDuration(u,v){return this.isValid?this.e.diff(this.s,u,v):at.invalid(this.invalidReason)}mapEndpoints(u){return Rt.fromDateTimes(u(this.s),u(this.e))}}class Zi{static hasDST(u=A.defaultZone){const v=Ze.now().setZone(u).set({month:12});return!u.isUniversal&&v.offset!==v.set({month:6}).offset}static isValidIANAZone(u){return Te.isValidZone(u)}static normalizeZone(u){return en(u,A.defaultZone)}static getStartOfWeek({locale:u=null,locObj:v=null}={}){return(v||We.create(u)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:u=null,locObj:v=null}={}){return(v||We.create(u)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:u=null,locObj:v=null}={}){return(v||We.create(u)).getWeekendDays().slice()}static months(u="long",{locale:v=null,numberingSystem:C=null,locObj:M=null,outputCalendar:F="gregory"}={}){return(M||We.create(v,C,F)).months(u)}static monthsFormat(u="long",{locale:v=null,numberingSystem:C=null,locObj:M=null,outputCalendar:F="gregory"}={}){return(M||We.create(v,C,F)).months(u,!0)}static weekdays(u="long",{locale:v=null,numberingSystem:C=null,locObj:M=null}={}){return(M||We.create(v,C,null)).weekdays(u)}static weekdaysFormat(u="long",{locale:v=null,numberingSystem:C=null,locObj:M=null}={}){return(M||We.create(v,C,null)).weekdays(u,!0)}static meridiems({locale:u=null}={}){return We.create(u).meridiems()}static eras(u="short",{locale:v=null}={}){return We.create(v,null,"gregory").eras(u)}static features(){return{relative:Wn(),localeWeek:or()}}}function Wo(k,u){const v=M=>M.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),C=v(u)-v(k);return Math.floor(at.fromMillis(C).as("days"))}function Xa(k,u,v){const C=[["years",(ee,me)=>me.year-ee.year],["quarters",(ee,me)=>me.quarter-ee.quarter+(me.year-ee.year)*4],["months",(ee,me)=>me.month-ee.month+(me.year-ee.year)*12],["weeks",(ee,me)=>{const He=Wo(ee,me);return(He-He%7)/7}],["days",Wo]],M={},F=k;let X,K;for(const[ee,me]of C)v.indexOf(ee)>=0&&(X=ee,M[ee]=me(k,u),K=F.plus(M),K>u?(M[ee]--,k=F.plus(M),k>u&&(K=k,M[ee]--,k=F.plus(M))):k=K);return[k,M,K,X]}function gu(k,u,v,C){let[M,F,X,K]=Xa(k,u,v);const ee=u-M,me=v.filter(Ke=>["hours","minutes","seconds","milliseconds"].indexOf(Ke)>=0);me.length===0&&(X<u&&(X=M.plus({[K]:1})),X!==M&&(F[K]=(F[K]||0)+ee/(X-M)));const He=at.fromObject(F,C);return me.length>0?at.fromMillis(ee,C).shiftTo(...me).plus(He):He}const yu="missing Intl.DateTimeFormat.formatToParts support";function gt(k,u=v=>v){return{regex:k,deser:([v])=>u(Fr(v))}}const vu="[ ]",xu=new RegExp(vu,"g");function od(k){return k.replace(/\./g,"\\.?").replace(xu,vu)}function wu(k){return k.replace(/\./g,"").replace(xu," ").toLowerCase()}function Ut(k,u){return k===null?null:{regex:RegExp(k.map(od).join("|")),deser:([v])=>k.findIndex(C=>wu(v)===wu(C))+u}}function Qi(k,u){return{regex:k,deser:([,v,C])=>Ui(v,C),groups:u}}function Ys(k){return{regex:k,deser:([u])=>u}}function ku(k){return k.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Su(k,u){const v=Wt(u),C=Wt(u,"{2}"),M=Wt(u,"{3}"),F=Wt(u,"{4}"),X=Wt(u,"{6}"),K=Wt(u,"{1,2}"),ee=Wt(u,"{1,3}"),me=Wt(u,"{1,6}"),He=Wt(u,"{1,9}"),Ke=Wt(u,"{2,4}"),dt=Wt(u,"{4,6}"),$e=cr=>({regex:RegExp(ku(cr.val)),deser:([rs])=>rs,literal:!0}),Cn=(cr=>{if(k.literal)return $e(cr);switch(cr.val){case"G":return Ut(u.eras("short"),0);case"GG":return Ut(u.eras("long"),0);case"y":return gt(me);case"yy":return gt(Ke,ci);case"yyyy":return gt(F);case"yyyyy":return gt(dt);case"yyyyyy":return gt(X);case"M":return gt(K);case"MM":return gt(C);case"MMM":return Ut(u.months("short",!0),1);case"MMMM":return Ut(u.months("long",!0),1);case"L":return gt(K);case"LL":return gt(C);case"LLL":return Ut(u.months("short",!1),1);case"LLLL":return Ut(u.months("long",!1),1);case"d":return gt(K);case"dd":return gt(C);case"o":return gt(ee);case"ooo":return gt(M);case"HH":return gt(C);case"H":return gt(K);case"hh":return gt(C);case"h":return gt(K);case"mm":return gt(C);case"m":return gt(K);case"q":return gt(K);case"qq":return gt(C);case"s":return gt(K);case"ss":return gt(C);case"S":return gt(ee);case"SSS":return gt(M);case"u":return Ys(He);case"uu":return Ys(K);case"uuu":return gt(v);case"a":return Ut(u.meridiems(),0);case"kkkk":return gt(F);case"kk":return gt(Ke,ci);case"W":return gt(K);case"WW":return gt(C);case"E":case"c":return gt(v);case"EEE":return Ut(u.weekdays("short",!1),1);case"EEEE":return Ut(u.weekdays("long",!1),1);case"ccc":return Ut(u.weekdays("short",!0),1);case"cccc":return Ut(u.weekdays("long",!0),1);case"Z":case"ZZ":return Qi(new RegExp(`([+-]${K.source})(?::(${C.source}))?`),2);case"ZZZ":return Qi(new RegExp(`([+-]${K.source})(${C.source})?`),2);case"z":return Ys(/[a-z_+-/]{1,256}?/i);case" ":return Ys(/[^\S\n\r]/);default:return $e(cr)}})(k)||{invalidReason:yu};return Cn.token=k,Cn}const bu={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Za(k,u,v){const{type:C,value:M}=k;if(C==="literal"){const ee=/^\s+$/.test(M);return{literal:!ee,val:ee?" ":M}}const F=u[C];let X=C;C==="hour"&&(u.hour12!=null?X=u.hour12?"hour12":"hour24":u.hourCycle!=null?u.hourCycle==="h11"||u.hourCycle==="h12"?X="hour12":X="hour24":X=v.hour12?"hour12":"hour24");let K=bu[X];if(typeof K=="object"&&(K=K[F]),K)return{literal:!1,val:K}}function ad(k){return[`^${k.map(v=>v.regex).reduce((v,C)=>`${v}(${C.source})`,"")}$`,k]}function ld(k,u,v){const C=k.match(u);if(C){const M={};let F=1;for(const X in v)if(Lt(v,X)){const K=v[X],ee=K.groups?K.groups+1:1;!K.literal&&K.token&&(M[K.token.val[0]]=K.deser(C.slice(F,F+ee))),F+=ee}return[C,M]}else return[C,{}]}function Gi(k){const u=F=>{switch(F){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let v=null,C;return Ve(k.z)||(v=Te.create(k.z)),Ve(k.Z)||(v||(v=new ut(k.Z)),C=k.Z),Ve(k.q)||(k.M=(k.q-1)*3+1),Ve(k.h)||(k.h<12&&k.a===1?k.h+=12:k.h===12&&k.a===0&&(k.h=0)),k.G===0&&k.y&&(k.y=-k.y),Ve(k.u)||(k.S=zi(k.u)),[Object.keys(k).reduce((F,X)=>{const K=u(X);return K&&(F[K]=k[X]),F},{}),v,C]}let Xs=null;function Zs(){return Xs||(Xs=Ze.fromMillis(1555555555555)),Xs}function Qa(k,u){if(k.literal)return k;const v=qt.macroTokenToFormatOpts(k.val),C=Ja(v,u);return C==null||C.includes(void 0)?k:C}function Ga(k,u){return Array.prototype.concat(...k.map(v=>Qa(v,u)))}class Qs{constructor(u,v){if(this.locale=u,this.format=v,this.tokens=Ga(qt.parseFormat(v),u),this.units=this.tokens.map(C=>Su(C,u)),this.disqualifyingUnit=this.units.find(C=>C.invalidReason),!this.disqualifyingUnit){const[C,M]=ad(this.units);this.regex=RegExp(C,"i"),this.handlers=M}}explainFromTokens(u){if(this.isValid){const[v,C]=ld(u,this.regex,this.handlers),[M,F,X]=C?Gi(C):[null,null,void 0];if(Lt(C,"a")&&Lt(C,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:u,tokens:this.tokens,regex:this.regex,rawMatches:v,matches:C,result:M,zone:F,specificOffset:X}}else return{input:u,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function gi(k,u,v){return new Qs(k,v).explainFromTokens(u)}function Ka(k,u,v){const{result:C,zone:M,specificOffset:F,invalidReason:X}=gi(k,u,v);return[C,M,F,X]}function Ja(k,u){if(!k)return null;const C=qt.create(u,k).dtFormatter(Zs()),M=C.formatToParts(),F=C.resolvedOptions();return M.map(X=>Za(X,k,F))}const Ki="Invalid DateTime",el=864e13;function Ji(k){return new G("unsupported zone",`the zone "${k.name}" is not supported`)}function Bo(k){return k.weekData===null&&(k.weekData=Ne(k.c)),k.weekData}function qo(k){return k.localWeekData===null&&(k.localWeekData=Ne(k.c,k.loc.getMinDaysInFirstWeek(),k.loc.getStartOfWeek())),k.localWeekData}function Yr(k,u){const v={ts:k.ts,zone:k.zone,c:k.c,o:k.o,loc:k.loc,invalid:k.invalid};return new Ze({...v,...u,old:v})}function tl(k,u,v){let C=k-u*60*1e3;const M=v.offset(C);if(u===M)return[C,u];C-=(M-u)*60*1e3;const F=v.offset(C);return M===F?[C,M]:[k-Math.min(M,F)*60*1e3,Math.max(M,F)]}function Bn(k,u){k+=u*60*1e3;const v=new Date(k);return{year:v.getUTCFullYear(),month:v.getUTCMonth()+1,day:v.getUTCDate(),hour:v.getUTCHours(),minute:v.getUTCMinutes(),second:v.getUTCSeconds(),millisecond:v.getUTCMilliseconds()}}function es(k,u,v){return tl(Ai(k),u,v)}function Yo(k,u){const v=k.o,C=k.c.year+Math.trunc(u.years),M=k.c.month+Math.trunc(u.months)+Math.trunc(u.quarters)*3,F={...k.c,year:C,month:M,day:Math.min(k.c.day,_o(C,M))+Math.trunc(u.days)+Math.trunc(u.weeks)*7},X=at.fromObject({years:u.years-Math.trunc(u.years),quarters:u.quarters-Math.trunc(u.quarters),months:u.months-Math.trunc(u.months),weeks:u.weeks-Math.trunc(u.weeks),days:u.days-Math.trunc(u.days),hours:u.hours,minutes:u.minutes,seconds:u.seconds,milliseconds:u.milliseconds}).as("milliseconds"),K=Ai(F);let[ee,me]=tl(K,v,k.zone);return X!==0&&(ee+=X,me=k.zone.offset(ee)),{ts:ee,o:me}}function ts(k,u,v,C,M,F){const{setZone:X,zone:K}=v;if(k&&Object.keys(k).length!==0||u){const ee=u||K,me=Ze.fromObject(k,{...v,zone:ee,specificOffset:F});return X?me:me.setZone(K)}else return Ze.invalid(new G("unparsable",`the input "${M}" can't be parsed as ${C}`))}function Xo(k,u,v=!0){return k.isValid?qt.create(We.create("en-US"),{allowZ:v,forceSimple:!0}).formatDateTimeFromString(k,u):null}function yi(k,u,v){const C=k.c.year>9999||k.c.year<0;let M="";if(C&&k.c.year>=0&&(M+="+"),M+=jt(k.c.year,C?6:4),v==="year")return M;if(u){if(M+="-",M+=jt(k.c.month),v==="month")return M;M+="-"}else if(M+=jt(k.c.month),v==="month")return M;return M+=jt(k.c.day),M}function Eu(k,u,v,C,M,F,X){let K=!v||k.c.millisecond!==0||k.c.second!==0,ee="";switch(X){case"day":case"month":case"year":break;default:if(ee+=jt(k.c.hour),X==="hour")break;if(u){if(ee+=":",ee+=jt(k.c.minute),X==="minute")break;K&&(ee+=":",ee+=jt(k.c.second))}else{if(ee+=jt(k.c.minute),X==="minute")break;K&&(ee+=jt(k.c.second))}if(X==="second")break;K&&(!C||k.c.millisecond!==0)&&(ee+=".",ee+=jt(k.c.millisecond,3))}return M&&(k.isOffsetFixed&&k.offset===0&&!F?ee+="Z":k.o<0?(ee+="-",ee+=jt(Math.trunc(-k.o/60)),ee+=":",ee+=jt(Math.trunc(-k.o%60))):(ee+="+",ee+=jt(Math.trunc(k.o/60)),ee+=":",ee+=jt(Math.trunc(k.o%60)))),F&&(ee+="["+k.zone.ianaName+"]"),ee}const nl={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Cu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Mt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ns=["year","month","day","hour","minute","second","millisecond"],Zo=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Gs=["year","ordinal","hour","minute","second","millisecond"];function Ks(k){const u={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[k.toLowerCase()];if(!u)throw new l(k);return u}function Qo(k){switch(k.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ks(k)}}function Js(k){if(to===void 0&&(to=A.now()),k.type!=="iana")return k.offset(to);const u=k.name;let v=il.get(u);return v===void 0&&(v=k.offset(to),il.set(u,v)),v}function eo(k,u){const v=en(u.zone,A.defaultZone);if(!v.isValid)return Ze.invalid(Ji(v));const C=We.fromObject(u);let M,F;if(Ve(k.year))M=A.now();else{for(const ee of ns)Ve(k[ee])&&(k[ee]=nl[ee]);const X=Ot(k)||sr(k);if(X)return Ze.invalid(X);const K=Js(v);[M,F]=es(k,K,v)}return new Ze({ts:M,zone:v,loc:C,o:F})}function vi(k,u,v){const C=Ve(v.round)?!0:v.round,M=Ve(v.rounding)?"trunc":v.rounding,F=(K,ee)=>(K=li(K,C||v.calendary?0:2,v.calendary?"round":M),u.loc.clone(v).relFormatter(v).format(K,ee)),X=K=>v.calendary?u.hasSame(k,K)?0:u.startOf(K).diff(k.startOf(K),K).get(K):u.diff(k,K).get(K);if(v.unit)return F(X(v.unit),v.unit);for(const K of v.units){const ee=X(K);if(Math.abs(ee)>=1)return F(ee,K)}return F(k>u?-0:0,v.units[v.units.length-1])}function rl(k){let u={},v;return k.length>0&&typeof k[k.length-1]=="object"?(u=k[k.length-1],v=Array.from(k).slice(0,k.length-1)):v=Array.from(k),[u,v]}let to;const il=new Map;class Ze{constructor(u){const v=u.zone||A.defaultZone;let C=u.invalid||(Number.isNaN(u.ts)?new G("invalid input"):null)||(v.isValid?null:Ji(v));this.ts=Ve(u.ts)?A.now():u.ts;let M=null,F=null;if(!C)if(u.old&&u.old.ts===this.ts&&u.old.zone.equals(v))[M,F]=[u.old.c,u.old.o];else{const K=Qt(u.o)&&!u.old?u.o:v.offset(this.ts);M=Bn(this.ts,K),C=Number.isNaN(M.year)?new G("invalid input"):null,M=C?null:M,F=C?null:K}this._zone=v,this.loc=u.loc||We.create(),this.invalid=C,this.weekData=null,this.localWeekData=null,this.c=M,this.o=F,this.isLuxonDateTime=!0}static now(){return new Ze({})}static local(){const[u,v]=rl(arguments),[C,M,F,X,K,ee,me]=v;return eo({year:C,month:M,day:F,hour:X,minute:K,second:ee,millisecond:me},u)}static utc(){const[u,v]=rl(arguments),[C,M,F,X,K,ee,me]=v;return u.zone=ut.utcInstance,eo({year:C,month:M,day:F,hour:X,minute:K,second:ee,millisecond:me},u)}static fromJSDate(u,v={}){const C=wr(u)?u.valueOf():NaN;if(Number.isNaN(C))return Ze.invalid("invalid input");const M=en(v.zone,A.defaultZone);return M.isValid?new Ze({ts:C,zone:M,loc:We.fromObject(v)}):Ze.invalid(Ji(M))}static fromMillis(u,v={}){if(Qt(u))return u<-el||u>el?Ze.invalid("Timestamp out of range"):new Ze({ts:u,zone:en(v.zone,A.defaultZone),loc:We.fromObject(v)});throw new d(`fromMillis requires a numerical input, but received a ${typeof u} with value ${u}`)}static fromSeconds(u,v={}){if(Qt(u))return new Ze({ts:u*1e3,zone:en(v.zone,A.defaultZone),loc:We.fromObject(v)});throw new d("fromSeconds requires a numerical input")}static fromObject(u,v={}){u=u||{};const C=en(v.zone,A.defaultZone);if(!C.isValid)return Ze.invalid(Ji(C));const M=We.fromObject(v),F=As(u,Qo),{minDaysInFirstWeek:X,startOfWeek:K}=Bt(F,M),ee=A.now(),me=Ve(v.specificOffset)?C.offset(ee):v.specificOffset,He=!Ve(F.ordinal),Ke=!Ve(F.year),dt=!Ve(F.month)||!Ve(F.day),$e=Ke||dt,Et=F.weekYear||F.weekNumber;if(($e||He)&&Et)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(dt&&He)throw new a("Can't mix ordinal dates with month/day");const Cn=Et||F.weekday&&!$e;let cr,rs,qn=Bn(ee,me);Cn?(cr=Zo,rs=Cu,qn=Ne(qn,X,K)):He?(cr=Gs,rs=Mt,qn=Ge(qn)):(cr=ns,rs=nl);let is=!1;for(const xt of cr){const Qr=F[xt];Ve(Qr)?is?F[xt]=rs[xt]:F[xt]=qn[xt]:is=!0}const ss=Cn?kt(F,X,K):He?mt(F):Ot(F),no=ss||sr(F);if(no)return Ze.invalid(no);const sl=Cn?Me(F,X,K):He?ot(F):F,[os,Zr]=es(sl,me,C),St=new Ze({ts:os,zone:C,o:Zr,loc:M});return F.weekday&&$e&&u.weekday!==St.weekday?Ze.invalid("mismatched weekday",`you can't specify both a weekday of ${F.weekday} and a date of ${St.toISO()}`):St.isValid?St:Ze.invalid(St.invalid)}static fromISO(u,v={}){const[C,M]=Gc(u);return ts(C,M,v,"ISO 8601",u)}static fromRFC2822(u,v={}){const[C,M]=Kc(u);return ts(C,M,v,"RFC 2822",u)}static fromHTTP(u,v={}){const[C,M]=Jc(u);return ts(C,M,v,"HTTP",v)}static fromFormat(u,v,C={}){if(Ve(u)||Ve(v))throw new d("fromFormat requires an input string and a format");const{locale:M=null,numberingSystem:F=null}=C,X=We.fromOpts({locale:M,numberingSystem:F,defaultToEN:!0}),[K,ee,me,He]=Ka(X,u,v);return He?Ze.invalid(He):ts(K,ee,C,`format ${v}`,u,me)}static fromString(u,v,C={}){return Ze.fromFormat(u,v,C)}static fromSQL(u,v={}){const[C,M]=id(u);return ts(C,M,v,"SQL",u)}static invalid(u,v=null){if(!u)throw new d("need to specify a reason the DateTime is invalid");const C=u instanceof G?u:new G(u,v);if(A.throwOnInvalid)throw new n(C);return new Ze({invalid:C})}static isDateTime(u){return u&&u.isLuxonDateTime||!1}static parseFormatForOpts(u,v={}){const C=Ja(u,We.fromObject(v));return C?C.map(M=>M?M.val:null).join(""):null}static expandFormat(u,v={}){return Ga(qt.parseFormat(u),We.fromObject(v)).map(M=>M.val).join("")}static resetCache(){to=void 0,il.clear()}get(u){return this[u]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Bo(this).weekYear:NaN}get weekNumber(){return this.isValid?Bo(this).weekNumber:NaN}get weekday(){return this.isValid?Bo(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qo(this).weekday:NaN}get localWeekNumber(){return this.isValid?qo(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qo(this).weekYear:NaN}get ordinal(){return this.isValid?Ge(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const u=864e5,v=6e4,C=Ai(this.c),M=this.zone.offset(C-u),F=this.zone.offset(C+u),X=this.zone.offset(C-M*v),K=this.zone.offset(C-F*v);if(X===K)return[this];const ee=C-X*v,me=C-K*v,He=Bn(ee,X),Ke=Bn(me,K);return He.hour===Ke.hour&&He.minute===Ke.minute&&He.second===Ke.second&&He.millisecond===Ke.millisecond?[Yr(this,{ts:ee}),Yr(this,{ts:me})]:[this]}get isInLeapYear(){return $r(this.year)}get daysInMonth(){return _o(this.year,this.month)}get daysInYear(){return this.isValid?Fi(this.year):NaN}get weeksInWeekYear(){return this.isValid?ui(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ui(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(u={}){const{locale:v,numberingSystem:C,calendar:M}=qt.create(this.loc.clone(u),u).resolvedOptions(this);return{locale:v,numberingSystem:C,outputCalendar:M}}toUTC(u=0,v={}){return this.setZone(ut.instance(u),v)}toLocal(){return this.setZone(A.defaultZone)}setZone(u,{keepLocalTime:v=!1,keepCalendarTime:C=!1}={}){if(u=en(u,A.defaultZone),u.equals(this.zone))return this;if(u.isValid){let M=this.ts;if(v||C){const F=u.offset(this.ts),X=this.toObject();[M]=es(X,F,u)}return Yr(this,{ts:M,zone:u})}else return Ze.invalid(Ji(u))}reconfigure({locale:u,numberingSystem:v,outputCalendar:C}={}){const M=this.loc.clone({locale:u,numberingSystem:v,outputCalendar:C});return Yr(this,{loc:M})}setLocale(u){return this.reconfigure({locale:u})}set(u){if(!this.isValid)return this;const v=As(u,Qo),{minDaysInFirstWeek:C,startOfWeek:M}=Bt(v,this.loc),F=!Ve(v.weekYear)||!Ve(v.weekNumber)||!Ve(v.weekday),X=!Ve(v.ordinal),K=!Ve(v.year),ee=!Ve(v.month)||!Ve(v.day),me=K||ee,He=v.weekYear||v.weekNumber;if((me||X)&&He)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(ee&&X)throw new a("Can't mix ordinal dates with month/day");let Ke;F?Ke=Me({...Ne(this.c,C,M),...v},C,M):Ve(v.ordinal)?(Ke={...this.toObject(),...v},Ve(v.day)&&(Ke.day=Math.min(_o(Ke.year,Ke.month),Ke.day))):Ke=ot({...Ge(this.c),...v});const[dt,$e]=es(Ke,this.o,this.zone);return Yr(this,{ts:dt,o:$e})}plus(u){if(!this.isValid)return this;const v=at.fromDurationLike(u);return Yr(this,Yo(this,v))}minus(u){if(!this.isValid)return this;const v=at.fromDurationLike(u).negate();return Yr(this,Yo(this,v))}startOf(u,{useLocaleWeeks:v=!1}={}){if(!this.isValid)return this;const C={},M=at.normalizeUnit(u);switch(M){case"years":C.month=1;case"quarters":case"months":C.day=1;case"weeks":case"days":C.hour=0;case"hours":C.minute=0;case"minutes":C.second=0;case"seconds":C.millisecond=0;break}if(M==="weeks")if(v){const F=this.loc.getStartOfWeek(),{weekday:X}=this;X<F&&(C.weekNumber=this.weekNumber-1),C.weekday=F}else C.weekday=1;if(M==="quarters"){const F=Math.ceil(this.month/3);C.month=(F-1)*3+1}return this.set(C)}endOf(u,v){return this.isValid?this.plus({[u]:1}).startOf(u,v).minus(1):this}toFormat(u,v={}){return this.isValid?qt.create(this.loc.redefaultToEN(v)).formatDateTimeFromString(this,u):Ki}toLocaleString(u=S,v={}){return this.isValid?qt.create(this.loc.clone(v),u).formatDateTime(this):Ki}toLocaleParts(u={}){return this.isValid?qt.create(this.loc.clone(u),u).formatDateTimeParts(this):[]}toISO({format:u="extended",suppressSeconds:v=!1,suppressMilliseconds:C=!1,includeOffset:M=!0,extendedZone:F=!1,precision:X="milliseconds"}={}){if(!this.isValid)return null;X=Ks(X);const K=u==="extended";let ee=yi(this,K,X);return ns.indexOf(X)>=3&&(ee+="T"),ee+=Eu(this,K,v,C,M,F,X),ee}toISODate({format:u="extended",precision:v="day"}={}){return this.isValid?yi(this,u==="extended",Ks(v)):null}toISOWeekDate(){return Xo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:u=!1,suppressSeconds:v=!1,includeOffset:C=!0,includePrefix:M=!1,extendedZone:F=!1,format:X="extended",precision:K="milliseconds"}={}){return this.isValid?(K=Ks(K),(M&&ns.indexOf(K)>=3?"T":"")+Eu(this,X==="extended",v,u,C,F,K)):null}toRFC2822(){return Xo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?yi(this,!0):null}toSQLTime({includeOffset:u=!0,includeZone:v=!1,includeOffsetSpace:C=!0}={}){let M="HH:mm:ss.SSS";return(v||u)&&(C&&(M+=" "),v?M+="z":u&&(M+="ZZ")),Xo(this,M,!0)}toSQL(u={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(u)}`:null}toString(){return this.isValid?this.toISO():Ki}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(u={}){if(!this.isValid)return{};const v={...this.c};return u.includeConfig&&(v.outputCalendar=this.outputCalendar,v.numberingSystem=this.loc.numberingSystem,v.locale=this.loc.locale),v}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(u,v="milliseconds",C={}){if(!this.isValid||!u.isValid)return at.invalid("created by diffing an invalid DateTime");const M={locale:this.locale,numberingSystem:this.numberingSystem,...C},F=Li(v).map(at.normalizeUnit),X=u.valueOf()>this.valueOf(),K=X?this:u,ee=X?u:this,me=gu(K,ee,F,M);return X?me.negate():me}diffNow(u="milliseconds",v={}){return this.diff(Ze.now(),u,v)}until(u){return this.isValid?Rt.fromDateTimes(this,u):this}hasSame(u,v,C){if(!this.isValid)return!1;const M=u.valueOf(),F=this.setZone(u.zone,{keepLocalTime:!0});return F.startOf(v,C)<=M&&M<=F.endOf(v,C)}equals(u){return this.isValid&&u.isValid&&this.valueOf()===u.valueOf()&&this.zone.equals(u.zone)&&this.loc.equals(u.loc)}toRelative(u={}){if(!this.isValid)return null;const v=u.base||Ze.fromObject({},{zone:this.zone}),C=u.padding?this<v?-u.padding:u.padding:0;let M=["years","months","days","hours","minutes","seconds"],F=u.unit;return Array.isArray(u.unit)&&(M=u.unit,F=void 0),vi(v,this.plus(C),{...u,numeric:"always",units:M,unit:F})}toRelativeCalendar(u={}){return this.isValid?vi(u.base||Ze.fromObject({},{zone:this.zone}),this,{...u,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...u){if(!u.every(Ze.isDateTime))throw new d("min requires all arguments be DateTimes");return ct(u,v=>v.valueOf(),Math.min)}static max(...u){if(!u.every(Ze.isDateTime))throw new d("max requires all arguments be DateTimes");return ct(u,v=>v.valueOf(),Math.max)}static fromFormatExplain(u,v,C={}){const{locale:M=null,numberingSystem:F=null}=C,X=We.fromOpts({locale:M,numberingSystem:F,defaultToEN:!0});return gi(X,u,v)}static fromStringExplain(u,v,C={}){return Ze.fromFormatExplain(u,v,C)}static buildFormatParser(u,v={}){const{locale:C=null,numberingSystem:M=null}=v,F=We.fromOpts({locale:C,numberingSystem:M,defaultToEN:!0});return new Qs(F,u)}static fromFormatParser(u,v,C={}){if(Ve(u)||Ve(v))throw new d("fromFormatParser requires an input string and a format parser");const{locale:M=null,numberingSystem:F=null}=C,X=We.fromOpts({locale:M,numberingSystem:F,defaultToEN:!0});if(!X.equals(v.locale))throw new d(`fromFormatParser called with a locale of ${X}, but the format parser was created for ${v.locale}`);const{result:K,zone:ee,specificOffset:me,invalidReason:He}=v.explainFromTokens(u);return He?Ze.invalid(He):ts(K,ee,C,`format ${v.format}`,u,me)}static get DATE_SHORT(){return S}static get DATE_MED(){return w}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return T}static get DATE_HUGE(){return b}static get TIME_SIMPLE(){return O}static get TIME_WITH_SECONDS(){return D}static get TIME_WITH_SHORT_OFFSET(){return P}static get TIME_WITH_LONG_OFFSET(){return R}static get TIME_24_SIMPLE(){return V}static get TIME_24_WITH_SECONDS(){return ne}static get TIME_24_WITH_SHORT_OFFSET(){return q}static get TIME_24_WITH_LONG_OFFSET(){return I}static get DATETIME_SHORT(){return Q}static get DATETIME_SHORT_WITH_SECONDS(){return J}static get DATETIME_MED(){return H}static get DATETIME_MED_WITH_SECONDS(){return U}static get DATETIME_MED_WITH_WEEKDAY(){return $}static get DATETIME_FULL(){return ue}static get DATETIME_FULL_WITH_SECONDS(){return ae}static get DATETIME_HUGE(){return ie}static get DATETIME_HUGE_WITH_SECONDS(){return xe}}function Xr(k){if(Ze.isDateTime(k))return k;if(k&&k.valueOf&&Qt(k.valueOf()))return Ze.fromJSDate(k);if(k&&typeof k=="object")return Ze.fromObject(k);throw new d(`Unknown datetime argument: ${k}, of type ${typeof k}`)}const Go="3.7.2";return zn.DateTime=Ze,zn.Duration=at,zn.FixedOffsetZone=ut,zn.IANAZone=Te,zn.Info=Zi,zn.Interval=Rt,zn.InvalidZone=Dn,zn.Settings=A,zn.SystemZone=ve,zn.VERSION=Go,zn.Zone=Ee,zn}var fy;function Xh(){return fy||(fy=1,function(e){var l,d,f,m,h,hh,S,bs;Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;const n=qT();var i;(function(T){T.Second="Second",T.Minute="Minute",T.Hour="Hour",T.Day="Day",T.Month="Month",T.Year="Year"})(i||(e.TimeUnit=i={}));var s;(function(T){T.Add="Add",T.Subtract="Subtract"})(s||(e.DateMathOp=s={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const g=class g{constructor(b,O){Re(this,S);Re(this,l);Re(this,d,null);Re(this,f,null);Re(this,m,{add:{[i.Year]:this.addYear.bind(this),[i.Month]:this.addMonth.bind(this),[i.Day]:this.addDay.bind(this),[i.Hour]:this.addHour.bind(this),[i.Minute]:this.addMinute.bind(this),[i.Second]:this.addSecond.bind(this)},subtract:{[i.Year]:this.subtractYear.bind(this),[i.Month]:this.subtractMonth.bind(this),[i.Day]:this.subtractDay.bind(this),[i.Hour]:this.subtractHour.bind(this),[i.Minute]:this.subtractMinute.bind(this),[i.Second]:this.subtractSecond.bind(this)}});const D={zone:O};if(b?b instanceof g?(pe(this,l,_(b,l)),pe(this,d,_(b,d)),pe(this,f,_(b,f))):b instanceof Date?pe(this,l,n.DateTime.fromJSDate(b,D)):typeof b=="number"?pe(this,l,n.DateTime.fromMillis(b,D)):(pe(this,l,n.DateTime.fromISO(b,D)),_(this,l).isValid||pe(this,l,n.DateTime.fromRFC2822(b,D)),_(this,l).isValid||pe(this,l,n.DateTime.fromSQL(b,D)),_(this,l).isValid||pe(this,l,n.DateTime.fromFormat(b,"EEE, d MMM yyyy HH:mm:ss",D))):pe(this,l,n.DateTime.local()),!_(this,l).isValid)throw new Error(`CronDate: unhandled timestamp: ${b}`);O&&O!==_(this,l).zoneName&&pe(this,l,_(this,l).setZone(O))}get dstStart(){return _(this,d)}set dstStart(b){pe(this,d,b)}get dstEnd(){return _(this,f)}set dstEnd(b){pe(this,f,b)}addYear(){pe(this,l,_(this,l).plus({years:1}))}addMonth(){pe(this,l,_(this,l).plus({months:1}).startOf("month"))}addDay(){pe(this,l,_(this,l).plus({days:1}).startOf("day"))}addHour(){pe(this,l,_(this,l).plus({hours:1}).startOf("hour"))}addMinute(){pe(this,l,_(this,l).plus({minutes:1}).startOf("minute"))}addSecond(){pe(this,l,_(this,l).plus({seconds:1}))}subtractYear(){pe(this,l,_(this,l).minus({years:1}))}subtractMonth(){pe(this,l,_(this,l).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){pe(this,l,_(this,l).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){pe(this,l,_(this,l).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){pe(this,l,_(this,l).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){pe(this,l,_(this,l).minus({seconds:1}))}addUnit(b){_(this,m).add[b]()}subtractUnit(b){_(this,m).subtract[b]()}invokeDateOperation(b,O){if(b===s.Add){this.addUnit(O);return}if(b===s.Subtract){this.subtractUnit(O);return}throw new Error(`Invalid verb: ${b}`)}getDate(){return _(this,l).day}getFullYear(){return _(this,l).year}getDay(){const b=_(this,l).weekday;return b===7?0:b}getMonth(){return _(this,l).month-1}getHours(){return _(this,l).hour}getMinutes(){return _(this,l).minute}getSeconds(){return _(this,l).second}getMilliseconds(){return _(this,l).millisecond}getUTCOffset(){return _(this,l).offset}setStartOfDay(){pe(this,l,_(this,l).startOf("day"))}setEndOfDay(){pe(this,l,_(this,l).endOf("day"))}getTime(){return _(this,l).valueOf()}getUTCDate(){return Ce(this,S,bs).call(this).day}getUTCFullYear(){return Ce(this,S,bs).call(this).year}getUTCDay(){const b=Ce(this,S,bs).call(this).weekday;return b===7?0:b}getUTCMonth(){return Ce(this,S,bs).call(this).month-1}getUTCHours(){return Ce(this,S,bs).call(this).hour}getUTCMinutes(){return Ce(this,S,bs).call(this).minute}getUTCSeconds(){return Ce(this,S,bs).call(this).second}toISOString(){return _(this,l).toUTC().toISO()}toJSON(){return _(this,l).toJSON()}setDate(b){pe(this,l,_(this,l).set({day:b}))}setFullYear(b){pe(this,l,_(this,l).set({year:b}))}setDay(b){pe(this,l,_(this,l).set({weekday:b}))}setMonth(b){pe(this,l,_(this,l).set({month:b+1}))}setHours(b){pe(this,l,_(this,l).set({hour:b}))}setMinutes(b){pe(this,l,_(this,l).set({minute:b}))}setSeconds(b){pe(this,l,_(this,l).set({second:b}))}setMilliseconds(b){pe(this,l,_(this,l).set({millisecond:b}))}toString(){return this.toDate().toString()}toDate(){return _(this,l).toJSDate()}isLastDayOfMonth(){var D;const{day:b,month:O}=_(this,l);if(O===2){const P=Ce(D=g,h,hh).call(D,_(this,l).year);return b===e.DAYS_IN_MONTH[O-1]-(P?0:1)}return b===e.DAYS_IN_MONTH[O-1]}isLastWeekdayOfMonth(){var P;const{day:b,month:O}=_(this,l);let D;return O===2?D=e.DAYS_IN_MONTH[O-1]-(Ce(P=g,h,hh).call(P,_(this,l).year)?0:1):D=e.DAYS_IN_MONTH[O-1],b>D-7}applyDateOperation(b,O,D){if(O===i.Month||O===i.Day){this.invokeDateOperation(b,O);return}const P=this.getHours();this.invokeDateOperation(b,O);const R=this.getHours(),V=R-P;V===2?D!==24&&(this.dstStart=R):V===0&&this.getMinutes()===0&&this.getSeconds()===0&&D!==24&&(this.dstEnd=R)}};l=new WeakMap,d=new WeakMap,f=new WeakMap,m=new WeakMap,h=new WeakSet,hh=function(b){return b%4===0&&b%100!==0||b%400===0},S=new WeakSet,bs=function(){return _(this,l).toUTC()},Re(g,h);let a=g;e.CronDate=a,e.default=a}(Uf)),Uf}var hy;function YT(){if(hy)return Fl;hy=1,Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.CronMonth=void 0;const e=Xh(),n=Ro(),i=1,s=12,a=Object.freeze([]);let l=class extends n.CronField{static get min(){return i}static get max(){return s}static get chars(){return a}static get daysInMonth(){return e.DAYS_IN_MONTH}constructor(f,m){super(f,m),this.validate()}get values(){return super.values}};return Fl.CronMonth=l,Fl}var Al={},py;function XT(){if(py)return Al;py=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.CronSecond=void 0;const e=Ro(),n=0,i=59,s=Object.freeze([]);let a=class extends e.CronField{static get min(){return n}static get max(){return i}static get chars(){return s}constructor(d,f){super(d,f),this.validate()}get values(){return super.values}};return Al.CronSecond=a,Al}var my;function Zh(){return my||(my=1,function(e){var n=go&&go.__createBinding||(Object.create?function(s,a,l,d){d===void 0&&(d=l);var f=Object.getOwnPropertyDescriptor(a,l);(!f||("get"in f?!a.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return a[l]}}),Object.defineProperty(s,d,f)}:function(s,a,l,d){d===void 0&&(d=l),s[d]=a[l]}),i=go&&go.__exportStar||function(s,a){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(a,l)&&n(a,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),i(VT(),e),i(HT(),e),i($T(),e),i(Ro(),e),i(WT(),e),i(BT(),e),i(YT(),e),i(XT(),e)}(go)),go}var gy;function uv(){var i,s,a,l,d,f,m,h,av,lv;if(gy)return jl;gy=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.CronFieldCollection=void 0;const e=Zh();let n=(h=class{constructor({second:g,minute:T,hour:b,dayOfMonth:O,month:D,dayOfWeek:P}){Re(this,i);Re(this,s);Re(this,a);Re(this,l);Re(this,d);Re(this,f);if(!g)throw new Error("Validation error, Field second is missing");if(!T)throw new Error("Validation error, Field minute is missing");if(!b)throw new Error("Validation error, Field hour is missing");if(!O)throw new Error("Validation error, Field dayOfMonth is missing");if(!D)throw new Error("Validation error, Field month is missing");if(!P)throw new Error("Validation error, Field dayOfWeek is missing");if(D.values.length===1&&!O.hasLastChar&&!(parseInt(O.values[0],10)<=e.CronMonth.daysInMonth[D.values[0]-1]))throw new Error("Invalid explicit day of month definition");pe(this,i,g),pe(this,s,T),pe(this,a,b),pe(this,d,D),pe(this,f,P),pe(this,l,O)}static from(g,T){return new h({second:this.resolveField(e.CronSecond,g.second,T.second),minute:this.resolveField(e.CronMinute,g.minute,T.minute),hour:this.resolveField(e.CronHour,g.hour,T.hour),dayOfMonth:this.resolveField(e.CronDayOfMonth,g.dayOfMonth,T.dayOfMonth),month:this.resolveField(e.CronMonth,g.month,T.month),dayOfWeek:this.resolveField(e.CronDayOfWeek,g.dayOfWeek,T.dayOfWeek)})}static resolveField(g,T,b){return b?b instanceof e.CronField?b:new g(b):T}get second(){return _(this,i)}get minute(){return _(this,s)}get hour(){return _(this,a)}get dayOfMonth(){return _(this,l)}get month(){return _(this,d)}get dayOfWeek(){return _(this,f)}static compactField(g){if(g.length===0)return[];const T=[];let b;return g.forEach((O,D,P)=>{if(b===void 0){b={start:O,count:1};return}const R=P[D-1]||b.start,V=P[D+1];if(O==="L"||O==="W"){T.push(b),T.push({start:O,count:1}),b=void 0;return}if(b.step===void 0&&V!==void 0){const ne=O-R,q=V-O;if(ne<=q){b={...b,count:2,end:O,step:ne};return}b.step=1}O-(b.end??0)===b.step?(b.count++,b.end=O):(b.count===1?T.push({start:b.start,count:1}):b.count===2?(T.push({start:b.start,count:1}),T.push({start:b.end??R,count:1})):T.push(b),b={start:O,count:1})}),b&&T.push(b),T}stringifyField(g){var D;let T=g.max,b=g.values;if(g instanceof e.CronDayOfWeek){T=6;const P=_(this,f).values;b=P[P.length-1]===7?P.slice(0,-1):P}g instanceof e.CronDayOfMonth&&(T=_(this,d).values.length===1?e.CronMonth.daysInMonth[_(this,d).values[0]-1]:g.max);const O=h.compactField(b);if(O.length===1){const P=Ce(D=h,m,av).call(D,g,O[0],T);if(P)return P}return O.map(P=>{var V;const R=P.count===1?P.start.toString():Ce(V=h,m,lv).call(V,P,T);return g instanceof e.CronDayOfWeek&&g.nthDay>0?`${R}#${g.nthDay}`:R}).join(",")}stringify(g=!1){const T=[];return g&&T.push(this.stringifyField(_(this,i))),T.push(this.stringifyField(_(this,s)),this.stringifyField(_(this,a)),this.stringifyField(_(this,l)),this.stringifyField(_(this,d)),this.stringifyField(_(this,f))),T.join(" ")}serialize(){return{second:_(this,i).serialize(),minute:_(this,s).serialize(),hour:_(this,a).serialize(),dayOfMonth:_(this,l).serialize(),month:_(this,d).serialize(),dayOfWeek:_(this,f).serialize()}}},i=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,m=new WeakSet,av=function(g,T,b){const O=T.step;return O?O===1&&T.start===g.min&&T.end&&T.end>=b?g.hasQuestionMarkChar?"?":"*":O!==1&&T.start===g.min&&T.end&&T.end>=b-O+1?`*/${O}`:null:null},lv=function(g,T){const b=g.step;if(b===1)return`${g.start}-${g.end}`;const O=g.start===0?g.count-1:g.count;if(!b)throw new Error("Unexpected range step");if(!g.end)throw new Error("Unexpected range end");if(b*O>g.end){const D=(R,V)=>{if(typeof g.start!="number")throw new Error("Unexpected range start");return V%b===0?g.start+V:null};if(typeof g.start!="number")throw new Error("Unexpected range start");const P={length:g.end-g.start+1};return Array.from(P,D).filter(R=>R!==null).join(",")}return g.end===T-b+1?`${g.start}/${b}`:`${g.start}-${g.end}/${b}`},Re(h,m),h);return jl.CronFieldCollection=n,jl}var Vf={},yy;function gv(){return yy||(yy=1,function(e){var a,l,d,f,m,h,y,S,w,Es,T,yo,cv,dv,fv,hv,ph,pv,mv,pa;Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const n=Xh();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const i=1e4,Q=class Q{constructor(H,U){Re(this,T);Re(this,a);Re(this,l);Re(this,d);Re(this,f);Re(this,m);Re(this,h);Re(this,y,null);Re(this,S,!1);pe(this,a,U),pe(this,l,U.tz),pe(this,f,U.startDate?new n.CronDate(U.startDate,_(this,l)):null),pe(this,m,U.endDate?new n.CronDate(U.endDate,_(this,l)):null);let $=U.currentDate??U.startDate;if($){const ue=new n.CronDate($,_(this,l));_(this,f)&&ue.getTime()<_(this,f).getTime()?$=_(this,f):_(this,m)&&ue.getTime()>_(this,m).getTime()&&($=_(this,m))}pe(this,d,new n.CronDate($,_(this,l))),pe(this,h,H)}get fields(){return _(this,h)}static fieldsToExpression(H,U){return new Q(H,U||{})}next(){return Ce(this,T,pa).call(this)}prev(){return Ce(this,T,pa).call(this,!0)}hasNext(){const H=_(this,d);try{return Ce(this,T,pa).call(this),!0}catch{return!1}finally{pe(this,d,H)}}hasPrev(){const H=_(this,d);try{return Ce(this,T,pa).call(this,!0),!0}catch{return!1}finally{pe(this,d,H)}}take(H){const U=[];if(H>=0)for(let $=0;$<H;$++)try{U.push(this.next())}catch{return U}else for(let $=0;$>H;$--)try{U.push(this.prev())}catch{return U}return U}reset(H){pe(this,d,new n.CronDate(H||_(this,a).currentDate))}stringify(H=!1){return _(this,h).stringify(H)}includesDate(H){const{second:U,minute:$,hour:ue,month:ae}=_(this,h),ie=new n.CronDate(H,_(this,l));return!(!U.values.includes(ie.getSeconds())||!$.values.includes(ie.getMinutes())||!ue.values.includes(ie.getHours())||!ae.values.includes(ie.getMonth()+1)||!Ce(this,T,ph).call(this,ie)||_(this,h).dayOfWeek.nthDay>0&&Math.ceil(ie.getDate()/7)!==_(this,h).dayOfWeek.nthDay)}toString(){return _(this,a).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ce(this,T,pa).call(this),done:!this.hasNext()})}}};a=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,m=new WeakMap,h=new WeakMap,y=new WeakMap,S=new WeakMap,w=new WeakSet,Es=function(H,U){return U.some($=>$===H)},T=new WeakSet,yo=function(H,U){return H[U?H.length-1:0]},cv=function(H){const U=`${H.getFullYear()}-${H.getMonth()+1}-${H.getDate()}`;if(_(this,y)===U)return _(this,S);const $=new n.CronDate(H);$.setStartOfDay();const ue=new n.CronDate(H);return ue.setEndOfDay(),pe(this,y,U),pe(this,S,$.getUTCOffset()!==ue.getUTCOffset()),_(this,S)},dv=function(H,U,$){const ue=_(this,h).second.values,ae=H.getSeconds(),ie=_(this,h).second.findNearestValue(ae,$);if(ie!==null){H.setSeconds(ie);return}H.applyDateOperation(U,n.TimeUnit.Minute,_(this,h).hour.values.length),H.setSeconds(Ce(this,T,yo).call(this,ue,$))},fv=function(H,U,$){const ue=_(this,h).minute.values,ae=_(this,h).second.values,ie=H.getMinutes(),xe=_(this,h).minute.findNearestValue(ie,$);if(xe!==null){H.setMinutes(xe),H.setSeconds(Ce(this,T,yo).call(this,ae,$));return}H.applyDateOperation(U,n.TimeUnit.Hour,_(this,h).hour.values.length),H.setMinutes(Ce(this,T,yo).call(this,ue,$)),H.setSeconds(Ce(this,T,yo).call(this,ae,$))},hv=function(H,U){const $=U.isLastWeekdayOfMonth();return H.some(ue=>{const ae=parseInt(ue.toString().charAt(0),10)%7;if(Number.isNaN(ae))throw new Error(`Invalid last weekday of the month expression: ${ue}`);return U.getDay()===ae&&$})},ph=function(H){var Ee,ce,ve;const U=_(this,h).dayOfMonth.isWildcard,$=!U,ue=_(this,h).dayOfWeek.isWildcard,ae=!ue,ie=Ce(Ee=Q,w,Es).call(Ee,H.getDate(),_(this,h).dayOfMonth.values)||_(this,h).dayOfMonth.hasLastChar&&H.isLastDayOfMonth(),xe=Ce(ce=Q,w,Es).call(ce,H.getDay(),_(this,h).dayOfWeek.values)||_(this,h).dayOfWeek.hasLastChar&&Ce(ve=Q,w,hv).call(ve,_(this,h).dayOfWeek.values,H);return!!($&&ae&&(ie||xe)||ie&&!ae||U&&!ue&&xe)},pv=function(H,U,$){var j,B;const ue=_(this,h).hour.values,ae=ue,ie=H.getHours(),xe=Ce(j=Q,w,Es).call(j,ie,ue),Ee=H.dstStart===ie,ce=H.dstEnd===ie;if(Ee)return Ce(B=Q,w,Es).call(B,ie-1,ue)?!0:(H.invokeDateOperation(U,n.TimeUnit.Hour),!1);if(ce&&!$)return H.dstEnd=null,H.applyDateOperation(n.DateMathOp.Add,n.TimeUnit.Hour,ae.length),!1;if(xe)return!0;H.dstStart=null;const ve=_(this,h).hour.findNearestValue(ie,$);if(ve===null)return H.applyDateOperation(U,n.TimeUnit.Day,ae.length),!1;if(Ce(this,T,cv).call(this,H)){const le=$?ie-ve:ve-ie;for(let L=0;L<le;L++)H.applyDateOperation(U,n.TimeUnit.Hour,ae.length)}else H.setHours(ve);return H.setMinutes(Ce(this,T,yo).call(this,_(this,h).minute.values,$)),H.setSeconds(Ce(this,T,yo).call(this,_(this,h).second.values,$)),!1},mv=function(H){if(!_(this,f)&&!_(this,m))return;const U=H.getTime();if(_(this,f)&&U<_(this,f).getTime())throw new Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(_(this,m)&&U>_(this,m).getTime())throw new Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},pa=function(H=!1){var ie,xe,Ee;const U=H?n.DateMathOp.Subtract:n.DateMathOp.Add,$=new n.CronDate(_(this,d)),ue=$.getTime();let ae=0;for(;++ae<i;){if(Ce(this,T,mv).call(this,$),!Ce(this,T,ph).call(this,$)){$.applyDateOperation(U,n.TimeUnit.Day,_(this,h).hour.values.length);continue}if(!(_(this,h).dayOfWeek.nthDay<=0||Math.ceil($.getDate()/7)===_(this,h).dayOfWeek.nthDay)){$.applyDateOperation(U,n.TimeUnit.Day,_(this,h).hour.values.length);continue}if(!Ce(ie=Q,w,Es).call(ie,$.getMonth()+1,_(this,h).month.values)){$.applyDateOperation(U,n.TimeUnit.Month,_(this,h).hour.values.length);continue}if(Ce(this,T,pv).call(this,$,U,H)){if(!Ce(xe=Q,w,Es).call(xe,$.getMinutes(),_(this,h).minute.values)){Ce(this,T,fv).call(this,$,U,H);continue}if(!Ce(Ee=Q,w,Es).call(Ee,$.getSeconds(),_(this,h).second.values)){Ce(this,T,dv).call(this,$,U,H);continue}if(ue===$.getTime()){(U==="Add"||$.getMilliseconds()===0)&&$.applyDateOperation(U,n.TimeUnit.Second,_(this,h).hour.values.length);continue}break}}if(ae>i)throw new Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return $.getMilliseconds()!==0&&$.setMilliseconds(0),pe(this,d,$),$},Re(Q,w);let s=Q;e.CronExpression=s,e.default=s}(Vf)),Vf}var yc={},vy;function ZT(){if(vy)return yc;vy=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.seededRandom=i;function e(s){let a=2166136261;for(let l=0;l<s.length;l++)a^=s.charCodeAt(l),a=Math.imul(a,16777619);return()=>a>>>0}function n(s){return()=>{let a=s+=1831565813;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296}}function i(s){const a=s?e(s)():Math.floor(Math.random()*1e10);return n(a)}return yc}var xy;function gh(){var h,y,yv,vo,vv,xv,wv,kv,Sv,bv,Ev,mh,Cv,Tv;if(xy)return Qn;xy=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.CronExpressionParser=Qn.DayOfWeek=Qn.Months=Qn.CronUnit=Qn.PredefinedExpressions=void 0;const e=uv(),n=gv(),i=ZT(),s=Zh();var a;(function(I){I["@yearly"]="0 0 0 1 1 *",I["@annually"]="0 0 0 1 1 *",I["@monthly"]="0 0 0 1 * *",I["@weekly"]="0 0 0 * * 0",I["@daily"]="0 0 0 * * *",I["@hourly"]="0 0 * * * *",I["@minutely"]="0 * * * * *",I["@secondly"]="* * * * * *",I["@weekdays"]="0 0 0 * * 1-5",I["@weekends"]="0 0 0 * * 0,6"})(a||(Qn.PredefinedExpressions=a={}));var l;(function(I){I.Second="Second",I.Minute="Minute",I.Hour="Hour",I.DayOfMonth="DayOfMonth",I.Month="Month",I.DayOfWeek="DayOfWeek"})(l||(Qn.CronUnit=l={}));var d;(function(I){I[I.jan=1]="jan",I[I.feb=2]="feb",I[I.mar=3]="mar",I[I.apr=4]="apr",I[I.may=5]="may",I[I.jun=6]="jun",I[I.jul=7]="jul",I[I.aug=8]="aug",I[I.sep=9]="sep",I[I.oct=10]="oct",I[I.nov=11]="nov",I[I.dec=12]="dec"})(d||(Qn.Months=d={}));var f;(function(I){I[I.sun=0]="sun",I[I.mon=1]="mon",I[I.tue=2]="tue",I[I.wed=3]="wed",I[I.thu=4]="thu",I[I.fri=5]="fri",I[I.sat=6]="sat"})(f||(Qn.DayOfWeek=f={}));let m=(y=class{static parse(Q,J={}){var L,ze,Ae,Te,tt,Qe,st,Ct;const{strict:H=!1,hashSeed:U}=J,$=(0,i.seededRandom)(U);Q=a[Q]||Q;const ue=Ce(L=y,h,yv).call(L,Q,H);if(!(ue.dayOfMonth==="*"||ue.dayOfWeek==="*"||!H))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ae=Ce(ze=y,h,vo).call(ze,l.Second,ue.second,s.CronSecond.constraints,$),ie=Ce(Ae=y,h,vo).call(Ae,l.Minute,ue.minute,s.CronMinute.constraints,$),xe=Ce(Te=y,h,vo).call(Te,l.Hour,ue.hour,s.CronHour.constraints,$),Ee=Ce(tt=y,h,vo).call(tt,l.Month,ue.month,s.CronMonth.constraints,$),ce=Ce(Qe=y,h,vo).call(Qe,l.DayOfMonth,ue.dayOfMonth,s.CronDayOfMonth.constraints,$),{dayOfWeek:ve,nthDayOfWeek:j}=Ce(st=y,h,Cv).call(st,ue.dayOfWeek),B=Ce(Ct=y,h,vo).call(Ct,l.DayOfWeek,ve,s.CronDayOfWeek.constraints,$),le=new e.CronFieldCollection({second:new s.CronSecond(ae,{rawValue:ue.second}),minute:new s.CronMinute(ie,{rawValue:ue.minute}),hour:new s.CronHour(xe,{rawValue:ue.hour}),dayOfMonth:new s.CronDayOfMonth(ce,{rawValue:ue.dayOfMonth}),month:new s.CronMonth(Ee,{rawValue:ue.month}),dayOfWeek:new s.CronDayOfWeek(B,{rawValue:ue.dayOfWeek,nthDayOfWeek:j})});return new n.CronExpression(le,{...J,expression:Q})}},h=new WeakSet,yv=function(Q,J){if(J&&!Q.length)throw new Error("Invalid cron expression");Q=Q||"0 * * * * *";const H=Q.trim().split(/\s+/);if(J&&H.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(H.length>6)throw new Error("Invalid cron expression, too many fields");const U=["*","*","*","*","*","0"];H.length<U.length&&H.unshift(...U.slice(H.length));const[$,ue,ae,ie,xe,Ee]=H;return{second:$,minute:ue,hour:ae,dayOfMonth:ie,month:xe,dayOfWeek:Ee}},vo=function(Q,J,H,U){if((Q===l.Month||Q===l.DayOfWeek)&&(J=J.replace(/[a-z]{3}/gi,$=>{$=$.toLowerCase();const ue=d[$]||f[$];if(ue===void 0)throw new Error(`Validation error, cannot resolve alias "${$}"`);return ue.toString()})),!H.validChars.test(J))throw new Error(`Invalid characters, got value: ${J}`);return J=Ce(this,h,vv).call(this,J,H),J=Ce(this,h,xv).call(this,J,H,U),Ce(this,h,wv).call(this,Q,J,H)},vv=function(Q,J){return Q.replace(/[*?]/g,J.min+"-"+J.max)},xv=function(Q,J,H){const U=H();return Q.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,($,ue,ae,ie)=>{if(ue&&ae&&ie){const xe=parseInt(ue,10),Ee=parseInt(ae,10),ce=parseInt(ie,10);if(xe>Ee)throw new Error(`Invalid range: ${xe}-${Ee}, min > max`);if(ce<=0)throw new Error(`Invalid step: ${ce}, must be positive`);const ve=Math.max(xe,J.min),j=Math.floor(U*ce),B=[];for(let le=Math.floor(ve/ce)*ce+j;le<=Ee;le+=ce)le>=ve&&B.push(le);return B.join(",")}else if(ue&&ae){const xe=parseInt(ue,10),Ee=parseInt(ae,10);if(xe>Ee)throw new Error(`Invalid range: ${xe}-${Ee}, min > max`);return String(Math.floor(U*(Ee-xe+1))+xe)}else if(ie){const xe=parseInt(ie,10);if(xe<=0)throw new Error(`Invalid step: ${xe}, must be positive`);const Ee=Math.floor(U*xe),ce=[];for(let ve=Math.floor(J.min/xe)*xe+Ee;ve<=J.max;ve+=xe)ve>=J.min&&ce.push(ve);return ce.join(",")}else return String(Math.floor(U*(J.max-J.min+1)+J.min))})},wv=function(Q,J,H){const U=[];function $(ae,ie){var xe;if(Array.isArray(ae))U.push(...ae);else if(Ce(xe=y,h,Tv).call(xe,ie,ae))U.push(ae);else{const Ee=parseInt(ae.toString(),10);if(!(Ee>=ie.min&&Ee<=ie.max))throw new Error(`Constraint error, got value ${ae} expected range ${ie.min}-${ie.max}`);U.push(Q===l.DayOfWeek?Ee%7:ae)}}return J.split(",").forEach(ae=>{var ie;if(!(ae.length>0))throw new Error("Invalid list value format");$(Ce(ie=y,h,kv).call(ie,Q,ae,H),H)}),U},kv=function(Q,J,H){var $,ue;const U=J.split("/");if(U.length>2)throw new Error(`Invalid repeat: ${J}`);return U.length===2?(isNaN(parseInt(U[0],10))||(U[0]=`${U[0]}-${H.max}`),Ce($=y,h,mh).call($,Q,U[0],parseInt(U[1],10),H)):Ce(ue=y,h,mh).call(ue,Q,J,1,H)},Sv=function(Q,J,H){if(!(!isNaN(Q)&&!isNaN(J)&&Q>=H.min&&J<=H.max))throw new Error(`Constraint error, got range ${Q}-${J} expected range ${H.min}-${H.max}`);if(Q>J)throw new Error(`Invalid range: ${Q}-${J}, min(${Q}) > max(${J})`)},bv=function(Q){if(!(!isNaN(Q)&&Q>0))throw new Error(`Constraint error, cannot repeat at every ${Q} time.`)},Ev=function(Q,J,H,U){const $=[];Q===l.DayOfWeek&&H%7===0&&$.push(0);for(let ue=J;ue<=H;ue+=U)$.indexOf(ue)===-1&&$.push(ue);return $},mh=function(Q,J,H,U){const $=J.split("-");if($.length<=1)return isNaN(+J)?J:+J;const[ue,ae]=$.map(ie=>parseInt(ie,10));return Ce(this,h,Sv).call(this,ue,ae,U),Ce(this,h,bv).call(this,H),Ce(this,h,Ev).call(this,Q,ue,ae,H)},Cv=function(Q){const J=Q.split("#");if(J.length<=1)return{dayOfWeek:J[0]};const H=+J[J.length-1],U=Q.match(/([,-/])/);if(U!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${U==null?void 0:U[0]}\` special characters are incompatible`);if(!(J.length<=2&&!isNaN(H)&&H>=1&&H<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:J[0],nthDayOfWeek:H}},Tv=function(Q,J){return Q.chars.some(H=>J.toString().includes(H))},Re(y,h),y);return Qn.CronExpressionParser=m,Qn}var Rr={};const QT={},GT=Object.freeze(Object.defineProperty({__proto__:null,default:QT},Symbol.toStringTag,{value:"Module"})),wy=px(GT);var ky;function KT(){var l,d,yh,Nv;if(ky)return Rr;ky=1;var e=Rr&&Rr.__createBinding||(Object.create?function(h,y,S,w){w===void 0&&(w=S);var g=Object.getOwnPropertyDescriptor(y,S);(!g||("get"in g?!y.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return y[S]}}),Object.defineProperty(h,w,g)}:function(h,y,S,w){w===void 0&&(w=S),h[w]=y[S]}),n=Rr&&Rr.__setModuleDefault||(Object.create?function(h,y){Object.defineProperty(h,"default",{enumerable:!0,value:y})}:function(h,y){h.default=y}),i=Rr&&Rr.__importStar||function(){var h=function(y){return h=Object.getOwnPropertyNames||function(S){var w=[];for(var g in S)Object.prototype.hasOwnProperty.call(S,g)&&(w[w.length]=g);return w},h(y)};return function(y){if(y&&y.__esModule)return y;var S={};if(y!=null)for(var w=h(y),g=0;g<w.length;g++)w[g]!=="default"&&e(S,y,w[g]);return n(S,y),S}}();Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.CronFileParser=void 0;const s=gh();let a=(d=class{static async parseFile(y){var g;const{readFile:S}=await Promise.resolve().then(()=>i(wy)),w=await S(y,"utf8");return Ce(g=d,l,yh).call(g,w)}static parseFileSync(y){var g;const{readFileSync:S}=wy,w=S(y,"utf8");return Ce(g=d,l,yh).call(g,w)}},l=new WeakSet,yh=function(y){var g;const S=y.split(`
|
|
255
|
-
`),w={variables:{},expressions:[],errors:{}};for(const T of S){const b=T.trim();if(b.length===0||b.startsWith("#"))continue;const O=b.match(/^(.*)=(.*)$/);if(O){const[,D,P]=O;w.variables[D]=P.replace(/["']/g,"");continue}try{const D=Ce(g=d,l,Nv).call(g,b);w.expressions.push(D.interval)}catch(D){w.errors[b]=D}}return w},Nv=function(y){const S=y.split(" ");return{interval:s.CronExpressionParser.parse(S.slice(0,5).join(" ")),command:S.slice(5,S.length)}},Re(d,l),d);return Rr.CronFileParser=a,Rr}var Sy;function JT(){return Sy||(Sy=1,function(e){var n=mo&&mo.__createBinding||(Object.create?function(h,y,S,w){w===void 0&&(w=S);var g=Object.getOwnPropertyDescriptor(y,S);(!g||("get"in g?!y.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return y[S]}}),Object.defineProperty(h,w,g)}:function(h,y,S,w){w===void 0&&(w=S),h[w]=y[S]}),i=mo&&mo.__exportStar||function(h,y){for(var S in h)S!=="default"&&!Object.prototype.hasOwnProperty.call(y,S)&&n(y,h,S)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;const s=gh();var a=Xh();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return a.CronDate}});var l=uv();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return l.CronFieldCollection}});var d=gv();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return d.CronExpression}});var f=gh();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return f.CronExpressionParser}});var m=KT();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return m.CronFileParser}}),i(Zh(),e),e.default=s.CronExpressionParser}(mo)),mo}var Ov=JT(),Hf={exports:{}},by;function eN(){return by||(by=1,function(e,n){(function(s,a){e.exports=a()})(globalThis,()=>(()=>{var i={949(d,f,m){Object.defineProperty(f,"__esModule",{value:!0}),f.CronParser=void 0;var h=m(515),y=function(){function S(w,g,T){g===void 0&&(g=!0),T===void 0&&(T=!1),this.expression=w,this.dayOfWeekStartIndexZero=g,this.monthStartIndexZero=T}return S.prototype.parse=function(){var w,g,T=(w=this.expression)!==null&&w!==void 0?w:"";if(T==="@reboot")return g=["@reboot","","","","","",""],g;if(T.startsWith("@")){var b=this.parseSpecial(this.expression);g=this.extractParts(b)}else g=this.extractParts(this.expression);return this.normalize(g),this.validate(g),g},S.prototype.parseSpecial=function(w){var g={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},T=g[w];if(!T)throw new Error("Unknown special expression.");return T},S.prototype.extractParts=function(w){if(!this.expression)throw new Error("cron expression is empty");for(var g=w.trim().split(/[ ]+/),T=0;T<g.length;T++)if(g[T].includes(",")){var b=g[T].split(",").map(function(D){return D.trim()}).filter(function(D){return D!==""}).map(function(D){return isNaN(Number(D))?D:Number(D)}).filter(function(D){return D!==null&&D!==""});b.length===0&&b.push("*"),b.sort(function(D,P){return D!==null&&P!==null?D-P:0}),g[T]=b.map(function(D){return D!==null?D.toString():""}).join(",")}if(g.length<5)throw new Error("Expression has only ".concat(g.length," part").concat(g.length==1?"":"s",". At least 5 parts are required."));if(g.length==5)g.unshift(""),g.push("");else if(g.length==6){var O=/\d{4}$/.test(g[5])||g[4]=="?"||g[2]=="?";O?g.unshift(""):g.push("")}else if(g.length>7)throw new Error("Expression has ".concat(g.length," parts; too many!"));return g},S.prototype.normalize=function(w){var g=this;if(w[3]=w[3].replace("?","*"),w[5]=w[5].replace("?","*"),w[2]=w[2].replace("?","*"),w[0].indexOf("0/")==0&&(w[0]=w[0].replace("0/","*/")),w[1].indexOf("0/")==0&&(w[1]=w[1].replace("0/","*/")),w[2].indexOf("0/")==0&&(w[2]=w[2].replace("0/","*/")),w[3].indexOf("1/")==0&&(w[3]=w[3].replace("1/","*/")),w[4].indexOf("1/")==0&&(w[4]=w[4].replace("1/","*/")),w[6].indexOf("1/")==0&&(w[6]=w[6].replace("1/","*/")),w[5]=w[5].replace(/(^\d)|([^#/\s]\d)/g,function(ne){var q=ne.replace(/\D/,""),I=q;return g.dayOfWeekStartIndexZero?q=="7"&&(I="0"):I=(parseInt(q)-1).toString(),ne.replace(q,I)}),w[5]=="L"&&(w[5]="6"),w[3]=="?"&&(w[3]="*"),w[3].indexOf("W")>-1&&(w[3].indexOf(",")>-1||w[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var T={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var b in T)w[5]=w[5].replace(new RegExp(b,"gi"),T[b].toString());w[4]=w[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(ne){var q=ne.replace(/\D/,""),I=q;return g.monthStartIndexZero&&(I=(parseInt(q)+1).toString()),ne.replace(q,I)});var O={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var D in O)w[4]=w[4].replace(new RegExp(D,"gi"),O[D].toString());w[0]=="0"&&(w[0]=""),!/\*|\-|\,|\//.test(w[2])&&(/\*|\//.test(w[1])||/\*|\//.test(w[0]))&&(w[2]+="-".concat(w[2]));for(var P=0;P<w.length;P++)if(w[P].indexOf(",")!=-1&&(w[P]=w[P].split(",").filter(function(ne){return ne!==""}).join(",")||"*"),w[P]=="*/1"&&(w[P]="*"),w[P].indexOf("/")>-1&&!/^\*|\-|\,/.test(w[P])){var R=null;switch(P){case 4:R="12";break;case 5:R="6";break;case 6:R="9999";break;default:R=null;break}if(R!==null){var V=w[P].split("/");w[P]="".concat(V[0],"-").concat(R,"/").concat(V[1])}}},S.prototype.validate=function(w){var g="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(w[0],g),this.validateOnlyExpectedCharactersFound(w[1],g),this.validateOnlyExpectedCharactersFound(w[2],g),this.validateOnlyExpectedCharactersFound(w[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(w[4],g),this.validateOnlyExpectedCharactersFound(w[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(w[6],g),this.validateAnyRanges(w)},S.prototype.validateAnyRanges=function(w){h.default.secondRange(w[0]),h.default.minuteRange(w[1]),h.default.hourRange(w[2]),h.default.dayOfMonthRange(w[3]),h.default.monthRange(w[4],this.monthStartIndexZero),h.default.dayOfWeekRange(w[5],this.dayOfWeekStartIndexZero)},S.prototype.validateOnlyExpectedCharactersFound=function(w,g){var T=w.match(new RegExp("[^".concat(g,"]+"),"gi"));if(T&&T.length)throw new Error("Expression contains invalid values: '".concat(T.toString(),"'"))},S}();f.CronParser=y},333(d,f,m){Object.defineProperty(f,"__esModule",{value:!0}),f.ExpressionDescriptor=void 0;var h=m(823),y=m(949),S=function(){function w(g,T){if(this.expression=g,this.options=T,this.expressionParts=new Array(5),!this.options.locale&&w.defaultLocale&&(this.options.locale=w.defaultLocale),!w.locales[this.options.locale]){var b=Object.keys(w.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(b,"'.")),this.options.locale=b}this.i18n=w.locales[this.options.locale],T.use24HourTimeFormat===void 0&&(T.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return w.toString=function(g,T){var b=T===void 0?{}:T,O=b.throwExceptionOnParseError,D=O===void 0?!0:O,P=b.verbose,R=P===void 0?!1:P,V=b.dayOfWeekStartIndexZero,ne=V===void 0?!0:V,q=b.monthStartIndexZero,I=q===void 0?!1:q,Q=b.use24HourTimeFormat,J=b.trimHoursLeadingZero,H=J===void 0?!1:J,U=b.locale,$=U===void 0?null:U,ue=b.logicalAndDayFields,ae=ue===void 0?!1:ue,ie={throwExceptionOnParseError:D,verbose:R,dayOfWeekStartIndexZero:ne,monthStartIndexZero:I,use24HourTimeFormat:Q,trimHoursLeadingZero:H,locale:$,logicalAndDayFields:ae};ie.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var xe=new w(g,ie);return xe.getFullDescription()},w.initialize=function(g,T){T===void 0&&(T="en"),w.specialCharacters=["/","-",",","*"],w.defaultLocale=T,g.load(w.locales)},w.prototype.getFullDescription=function(){var g,T,b="";try{var O=new y.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=O.parse(),this.expressionParts[0]==="@reboot")return((T=(g=this.i18n).atReboot)===null||T===void 0?void 0:T.call(g))||"Run once, at startup";var D=this.getTimeOfDayDescription(),P=this.getDayOfMonthDescription(),R=this.getMonthDescription(),V=this.getDayOfWeekDescription(),ne=this.getYearDescription();b+=D+P+V+R+ne,b=this.transformVerbosity(b,!!this.options.verbose),b=b.charAt(0).toLocaleUpperCase()+b.substr(1)}catch(q){if(!this.options.throwExceptionOnParseError)b=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(q)}return b},w.prototype.getTimeOfDayDescription=function(){var g=this.expressionParts[0],T=this.expressionParts[1],b=this.expressionParts[2],O="";if(!h.StringUtilities.containsAny(T,w.specialCharacters)&&!h.StringUtilities.containsAny(b,w.specialCharacters)&&!h.StringUtilities.containsAny(g,w.specialCharacters))O+=this.i18n.atSpace()+this.formatTime(b,T,g);else if(!g&&T.indexOf("-")>-1&&!(T.indexOf(",")>-1)&&!(T.indexOf("/")>-1)&&!h.StringUtilities.containsAny(b,w.specialCharacters)){var D=T.split("-");O+=h.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(b,D[0],""),this.formatTime(b,D[1],""))}else if(!g&&b.indexOf(",")>-1&&b.indexOf("-")==-1&&b.indexOf("/")==-1&&!h.StringUtilities.containsAny(T,w.specialCharacters)){var P=b.split(",");O+=this.i18n.at();for(var R=0;R<P.length;R++)O+=" ",O+=this.formatTime(P[R],T,""),R<P.length-2&&(O+=","),R==P.length-2&&(O+=this.i18n.spaceAnd())}else{var V=this.getSecondsDescription(),ne=this.getMinutesDescription(),q=this.getHoursDescription();if(O+=V,O&&ne&&(O+=", "),O+=ne,ne===q)return O;O&&q&&(O+=", "),O+=q}return O},w.prototype.getSecondsDescription=function(){var g=this,T=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(b){return b},function(b){return h.StringUtilities.format(g.i18n.everyX0Seconds(b),b)},function(b){return g.i18n.secondsX0ThroughX1PastTheMinute()},function(b){return b=="0"?"":parseInt(b)<20?g.i18n.atX0SecondsPastTheMinute(b):g.i18n.atX0SecondsPastTheMinuteGt20()||g.i18n.atX0SecondsPastTheMinute(b)});return T},w.prototype.getMinutesDescription=function(){var g=this,T=this.expressionParts[0],b=this.expressionParts[2],O=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(D){return D},function(D){return h.StringUtilities.format(g.i18n.everyX0Minutes(D),D)},function(D){return g.i18n.minutesX0ThroughX1PastTheHour()},function(D){var P,R;try{return D=="0"&&b.indexOf("/")==-1&&T==""?g.i18n.everyHour():D=="0"?((R=(P=g.i18n).onTheHour)===null||R===void 0?void 0:R.call(P))||g.i18n.atX0MinutesPastTheHour(D):parseInt(D)<20?g.i18n.atX0MinutesPastTheHour(D):g.i18n.atX0MinutesPastTheHourGt20()||g.i18n.atX0MinutesPastTheHour(D)}catch{return g.i18n.atX0MinutesPastTheHour(D)}});return O},w.prototype.getHoursDescription=function(){var g=this,T=this.expressionParts[2],b=0,O=[];T.split("/")[0].split(",").forEach(function(R){var V=R.split("-");V.length===2&&O.push({value:V[1],index:b+1}),b+=V.length});var D=0,P=this.getSegmentDescription(T,this.i18n.everyHour(),function(R){var V=O.find(function(q){return q.value===R&&q.index===D}),ne=V&&g.expressionParts[1]!=="0";return D++,ne?g.formatTime(R,"59",""):g.formatTime(R,"0","")},function(R){return h.StringUtilities.format(g.i18n.everyX0Hours(R),R)},function(R){return g.i18n.betweenX0AndX1()},function(R){return g.i18n.atX0()});return P},w.prototype.getDayOfWeekDescription=function(){var g=this,T=this.i18n.daysOfTheWeek(),b=null;return this.expressionParts[5]=="*"?b="":b=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(O,D){var P=O;O.indexOf("#")>-1?P=O.substring(0,O.indexOf("#")):O.indexOf("L")>-1&&(P=P.replace("L",""));var R=parseInt(P),V=g.i18n.daysOfTheWeekInCase?g.i18n.daysOfTheWeekInCase(D)[R]:T[R];if(O.indexOf("#")>-1){var ne=null,q=O.substring(O.indexOf("#")+1),I=O.substring(0,O.indexOf("#"));switch(q){case"1":ne=g.i18n.first(I);break;case"2":ne=g.i18n.second(I);break;case"3":ne=g.i18n.third(I);break;case"4":ne=g.i18n.fourth(I);break;case"5":ne=g.i18n.fifth(I);break}V=ne+" "+V}return V},function(O){return parseInt(O)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0DaysOfTheWeek(O),O)},function(O){var D=O.substring(0,O.indexOf("-")),P=g.expressionParts[3]!="*";return P?g.i18n.commaAndX0ThroughX1(D):g.i18n.commaX0ThroughX1(D)},function(O){var D=null;if(O.indexOf("#")>-1){var P=O.substring(O.indexOf("#")+1),R=O.substring(0,O.indexOf("#"));D=g.i18n.commaOnThe(P,R).trim()+g.i18n.spaceX0OfTheMonth()}else if(O.indexOf("L")>-1)D=g.i18n.commaOnTheLastX0OfTheMonth(O.replace("L",""));else{var V=g.expressionParts[3]!="*";V?g.options.logicalAndDayFields?D=g.i18n.commaOnlyOnX0(O):D=g.i18n.commaAndOnX0():D=g.i18n.commaOnlyOnX0(O)}return D}),b},w.prototype.getMonthDescription=function(){var g=this,T=this.i18n.monthsOfTheYear(),b=this.getSegmentDescription(this.expressionParts[4],"",function(O,D){return D&&g.i18n.monthsOfTheYearInCase?g.i18n.monthsOfTheYearInCase(D)[parseInt(O)-1]:T[parseInt(O)-1]},function(O){return parseInt(O)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0Months(O),O)},function(O){return g.i18n.commaMonthX0ThroughMonthX1()||g.i18n.commaX0ThroughX1()},function(O){return g.i18n.commaOnlyInMonthX0?g.i18n.commaOnlyInMonthX0():g.i18n.commaOnlyInX0()});return b},w.prototype.getDayOfMonthDescription=function(){var g=this,T=null,b=this.expressionParts[3];switch(b){case"L":T=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":T=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var O=b.match(/(\d{1,2}W)|(W\d{1,2})/);if(O){var D=parseInt(O[0].replace("W","")),P=D==1?this.i18n.firstWeekday():h.StringUtilities.format(this.i18n.weekdayNearestDayX0(),D.toString());T=h.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),P);break}else{var R=b.match(/L-(\d{1,2})/);if(R){var V=R[1];T=h.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(V),V);break}else{if(b=="*"&&this.expressionParts[5]!="*")return"";T=this.getSegmentDescription(b,this.i18n.commaEveryDay(),function(ne){return ne=="L"?g.i18n.lastDay():g.i18n.dayX0?h.StringUtilities.format(g.i18n.dayX0(),ne):ne},function(ne){return ne=="1"?g.i18n.commaEveryDay():g.i18n.commaEveryX0Days(ne)},function(ne){return g.i18n.commaBetweenDayX0AndX1OfTheMonth(ne)},function(ne){return g.i18n.commaOnDayX0OfTheMonth(ne)})}break}}return T},w.prototype.getYearDescription=function(){var g=this,T=this.getSegmentDescription(this.expressionParts[6],"",function(b){return/^\d+$/.test(b)?new Date(parseInt(b),1).getFullYear().toString():b},function(b){return h.StringUtilities.format(g.i18n.commaEveryX0Years(b),b)},function(b){return g.i18n.commaYearX0ThroughYearX1()||g.i18n.commaX0ThroughX1()},function(b){return g.i18n.commaOnlyInYearX0?g.i18n.commaOnlyInYearX0():g.i18n.commaOnlyInX0()});return T},w.prototype.getSegmentDescription=function(g,T,b,O,D,P){var R=null,V=g.indexOf("/")>-1,ne=g.indexOf("-")>-1,q=g.indexOf(",")>-1;if(!g)R="";else if(g==="*")R=T;else if(!V&&!ne&&!q)R=h.StringUtilities.format(P(g),b(g));else if(q){for(var I=g.split(","),Q="",J=0;J<I.length;J++)if(J>0&&I.length>2&&(Q+=",",J<I.length-1&&(Q+=" ")),J>0&&I.length>1&&(J==I.length-1||I.length==2)&&(Q+="".concat(this.i18n.spaceAnd()," ")),I[J].indexOf("/")>-1||I[J].indexOf("-")>-1){var H=I[J].indexOf("-")>-1&&I[J].indexOf("/")==-1,U=this.getSegmentDescription(I[J],T,b,O,H?this.i18n.commaX0ThroughX1:D,P);H&&(U=U.replace(", ","")),Q+=U}else if(!V)Q+=b(I[J]);else{var $=this.getSegmentDescription(I[J],T,b,O,D,P);$&&$.startsWith(", ")&&($=$.substring(2)),Q+=$}V?R=Q:R=h.StringUtilities.format(P(g),Q)}else if(V){var I=g.split("/");if(R=h.StringUtilities.format(O(I[1]),I[1]),I[0].indexOf("-")>-1){var ue=this.generateRangeSegmentDescription(I[0],D,b);ue.indexOf(", ")!=0&&(R+=", "),R+=ue}else if(I[0].indexOf("*")==-1){var ae=h.StringUtilities.format(P(I[0]),b(I[0]));ae=ae.replace(", ",""),R+=h.StringUtilities.format(this.i18n.commaStartingX0(),ae)}}else ne&&(R=this.generateRangeSegmentDescription(g,D,b));return R},w.prototype.generateRangeSegmentDescription=function(g,T,b){var O="",D=g.split("-"),P=b(D[0],1),R=b(D[1],2),V=T(g);return O+=h.StringUtilities.format(V,P,R),O},w.prototype.formatTime=function(g,T,b){var O=0,D=0,P=parseInt(g)+O,R=parseInt(T)+D;R>=60?(R-=60,P+=1):R<0&&(R+=60,P-=1),P>=24?P=P-24:P<0&&(P=24+P);var V="",ne=!1;this.options.use24HourTimeFormat||(ne=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),V=ne?"".concat(this.getPeriod(P)," "):" ".concat(this.getPeriod(P)),P>12&&(P-=12),P===0&&(P=12));var q="";b&&(q=":".concat(("00"+b).substring(b.length)));var I=P.toString(),Q=("00"+I).substring(I.length),J=R.toString(),H=("00"+J).substring(J.length),U=this.options.trimHoursLeadingZero?I:Q;return"".concat(ne?V:"").concat(U,":").concat(H).concat(q).concat(ne?"":V)},w.prototype.transformVerbosity=function(g,T){if(!T&&(g=g.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),g=g.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),g=g.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),g=g.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var b=0,O=Object.entries(this.i18n.conciseVerbosityReplacements());b<O.length;b++){var D=O[b],P=D[0],R=D[1];g=g.replace(new RegExp(P,"g"),R)}return g},w.prototype.getPeriod=function(g){return g>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},w.locales={},w}();f.ExpressionDescriptor=S},747(d,f,m){Object.defineProperty(f,"__esModule",{value:!0}),f.enLocaleLoader=void 0;var h=m(486),y=function(){function S(){}return S.prototype.load=function(w){w.en=new h.en},S}();f.enLocaleLoader=y},486(d,f){Object.defineProperty(f,"__esModule",{value:!0}),f.en=void 0;var m=function(){function h(){}return h.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},h.prototype.atX0MinutesPastTheHourGt20=function(){return null},h.prototype.commaMonthX0ThroughMonthX1=function(){return null},h.prototype.commaYearX0ThroughYearX1=function(){return null},h.prototype.use24HourTimeFormatByDefault=function(){return!1},h.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},h.prototype.everyMinute=function(){return"every minute"},h.prototype.everyHour=function(){return"every hour"},h.prototype.atSpace=function(){return"At "},h.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},h.prototype.at=function(){return"At"},h.prototype.spaceAnd=function(){return" and"},h.prototype.everySecond=function(){return"every second"},h.prototype.everyX0Seconds=function(){return"every %s seconds"},h.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},h.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},h.prototype.everyX0Minutes=function(){return"every %s minutes"},h.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},h.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},h.prototype.everyX0Hours=function(){return"every %s hours"},h.prototype.betweenX0AndX1=function(){return"between %s and %s"},h.prototype.atX0=function(){return"at %s"},h.prototype.commaEveryDay=function(){return", every day"},h.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},h.prototype.commaX0ThroughX1=function(){return", %s through %s"},h.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},h.prototype.first=function(){return"first"},h.prototype.second=function(){return"second"},h.prototype.third=function(){return"third"},h.prototype.fourth=function(){return"fourth"},h.prototype.fifth=function(){return"fifth"},h.prototype.commaOnThe=function(){return", on the "},h.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},h.prototype.lastDay=function(){return"the last day"},h.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},h.prototype.commaOnlyOnX0=function(){return", only on %s"},h.prototype.commaAndOnX0=function(){return", and on %s"},h.prototype.commaEveryX0Months=function(){return", every %s months"},h.prototype.commaOnlyInX0=function(){return", only in %s"},h.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},h.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},h.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},h.prototype.firstWeekday=function(){return"first weekday"},h.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},h.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},h.prototype.commaEveryX0Days=function(){return", every %s days in a month"},h.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},h.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},h.prototype.commaEveryHour=function(){return", every hour"},h.prototype.commaEveryX0Years=function(){return", every %s years"},h.prototype.commaStartingX0=function(){return", starting %s"},h.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},h.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},h.prototype.atReboot=function(){return"Run once, at startup"},h.prototype.onTheHour=function(){return"on the hour"},h}();f.en=m},515(d,f){Object.defineProperty(f,"__esModule",{value:!0});function m(y,S){if(!y)throw new Error(S)}var h=function(){function y(){}return y.secondRange=function(S){for(var w=S.split(","),g=0;g<w.length;g++)if(!isNaN(parseInt(w[g],10))){var T=parseInt(w[g],10);m(T>=0&&T<=59,"seconds part must be >= 0 and <= 59")}},y.minuteRange=function(S){for(var w=S.split(","),g=0;g<w.length;g++)if(!isNaN(parseInt(w[g],10))){var T=parseInt(w[g],10);m(T>=0&&T<=59,"minutes part must be >= 0 and <= 59")}},y.hourRange=function(S){for(var w=S.split(","),g=0;g<w.length;g++)if(!isNaN(parseInt(w[g],10))){var T=parseInt(w[g],10);m(T>=0&&T<=23,"hours part must be >= 0 and <= 23")}},y.dayOfMonthRange=function(S){for(var w=S.split(","),g=0;g<w.length;g++)if(!isNaN(parseInt(w[g],10))){var T=parseInt(w[g],10);m(T>=1&&T<=31,"DOM part must be >= 1 and <= 31")}},y.monthRange=function(S,w){for(var g=S.split(","),T=0;T<g.length;T++)if(!isNaN(parseInt(g[T],10))){var b=parseInt(g[T],10);m(b>=1&&b<=12,w?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},y.dayOfWeekRange=function(S,w){for(var g=S.split(","),T=0;T<g.length;T++)if(!isNaN(parseInt(g[T],10))){var b=parseInt(g[T],10);m(b>=0&&b<=6,w?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},y}();f.default=h},823(d,f){Object.defineProperty(f,"__esModule",{value:!0}),f.StringUtilities=void 0;var m=function(){function h(){}return h.format=function(y){for(var S=[],w=1;w<arguments.length;w++)S[w-1]=arguments[w];return y.replace(/%s/g,function(g){return S.shift()})},h.containsAny=function(y,S){return S.some(function(w){return y.indexOf(w)>-1})},h}();f.StringUtilities=m}},s={};function a(d){var f=s[d];if(f!==void 0)return f.exports;var m=s[d]={exports:{}};return i[d](m,m.exports,a),m.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.toString=void 0;var f=a(333),m=a(747);f.ExpressionDescriptor.initialize(new m.enLocaleLoader),d.default=f.ExpressionDescriptor;var h=f.ExpressionDescriptor.toString;d.toString=h})(),l})())}(Hf)),Hf.exports}var tN=eN();const Mv=Kl(tN);function nN(e){const s=Ov.CronExpressionParser.parse(e).next().toDate().getTime()-Date.now(),a=Math.floor(s/6e4);if(a<1)return"less than 1m";if(a<60)return`${String(a)}m`;const l=Math.floor(a/60),d=a%60;if(l<24)return d>0?`${String(l)}h ${String(d)}m`:`${String(l)}h`;const f=Math.floor(l/24);return`${String(f)}d`}function rN(e){const n=Date.now()-new Date(e).getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${String(i)}m ago`;const s=Math.floor(i/60);if(s<24)return`${String(s)}h ago`;const a=Math.floor(s/24);return`${String(a)}d ago`}function iN(){const[e,n]=Y.useState([]),[i,s]=Y.useState(!0),[a,l]=Y.useState(new Set),d=Y.useCallback(async()=>{try{const m=await fetch("/automations");if(m.ok){const h=await m.json();n(h.automations)}}catch{}finally{s(!1)}},[]);Y.useEffect(()=>{d()},[d]);const f=Y.useCallback(async m=>{l(h=>new Set([...h,m]));try{await fetch(`/automations/${encodeURIComponent(m)}/run`,{method:"POST"})}catch{}finally{l(h=>{const y=new Set(h);return y.delete(m),y}),d()}},[d]);return E.jsxs("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:[E.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[E.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:"Automations"}),E.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mt-0.5",children:[e.length," automation",e.length!==1?"s":""," configured"]})]}),E.jsx("div",{className:"p-6 max-w-3xl",children:i?E.jsx("div",{className:"text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."}):e.length===0?E.jsxs("div",{className:"text-center py-12",children:[E.jsx(Oa,{className:"h-8 w-8 text-gray-300 dark:text-zinc-700 mx-auto mb-3"}),E.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:["No automations defined. Add ",E.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:".json"})," files to ",E.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"automations/"}),"."]})]}):E.jsx("div",{className:"space-y-3",children:e.map(m=>{const h=a.has(m.name);return E.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-5 bg-gray-50 dark:bg-zinc-900/50",children:E.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E.jsxs("div",{className:"flex-1 min-w-0",children:[E.jsxs("a",{href:`/automations/${encodeURIComponent(m.name)}`,className:"flex items-center gap-2 mb-1 hover:opacity-80 transition-opacity",children:[E.jsx(Oa,{className:"h-4 w-4 text-purple-500 shrink-0"}),E.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-zinc-200",children:m.title})]}),E.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[E.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:m.trigger}),m.schedule&&E.jsxs(E.Fragment,{children:[E.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[E.jsx(Ic,{className:"h-3 w-3"}),Mv.toString(m.schedule,{use24HourTimeFormat:!0})]}),(()=>{const y=nN(m.schedule);return y?E.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",y]}):null})()]})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed line-clamp-2",children:m.prompt}),m.lastRun&&E.jsxs("div",{className:"flex items-center gap-2 mt-3 text-xs",children:[m.lastRunStatus==="success"?E.jsx(Cc,{className:"h-3 w-3 text-emerald-500"}):E.jsx(g0,{className:"h-3 w-3 text-red-400"}),E.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:["Last run ",rN(m.lastRun),m.lastRunStatus==="error"&&m.lastRunError&&E.jsxs("span",{className:"text-red-400 ml-1",children:["— ",m.lastRunError]})]}),m.lastRunSessionId&&E.jsx("a",{href:`/sessions/${m.lastRunSessionId}`,className:"text-xs text-indigo-500 hover:text-indigo-400 ml-2",children:"View session"})]})]}),E.jsx("button",{onClick:()=>{f(m.name)},disabled:h,className:"flex items-center gap-1.5 px-3 py-2 text-xs font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50 disabled:cursor-not-allowed shrink-0",children:h?E.jsxs(E.Fragment,{children:[E.jsx(Na,{className:"h-3.5 w-3.5 animate-spin"}),"Running..."]}):E.jsxs(E.Fragment,{children:[E.jsx(Ih,{className:"h-3.5 w-3.5"}),"Run Now"]})})]})},m.name)})})})]})}function sN(e){const n=Date.now()-e,i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${String(i)}m ago`;const s=Math.floor(i/60);if(s<24)return`${String(s)}h ago`;const a=Math.floor(s/24);return`${String(a)}d ago`}function oN(e){const s=Ov.CronExpressionParser.parse(e).next().toDate().getTime()-Date.now(),a=Math.floor(s/6e4);if(a<1)return"less than 1m";if(a<60)return`${String(a)}m`;const l=Math.floor(a/60),d=a%60;return l<24?d>0?`${String(l)}h ${String(d)}m`:`${String(l)}h`:`${String(Math.floor(l/24))}d`}function aN(){const{automationName:e}=Da(),[n,i]=Y.useState(null),[s,a]=Y.useState([]),[l,d]=Y.useState(null),[f,m]=Y.useState({}),[h,y]=Y.useState(!1),[S,w]=Y.useState(""),[g,T]=Y.useState(!0);Y.useRef(null);const b=Y.useCallback(async()=>{if(e){try{const R=await fetch("/automations");if(R.ok){const q=(await R.json()).automations.find(I=>I.name===e);q&&i(q)}const V=await fetch(`/sessions?automation=${encodeURIComponent(e)}&_t=${Date.now()}`);if(V.ok){const ne=await V.json();a(ne.sessions)}}catch{}T(!1)}},[e]);Y.useEffect(()=>{b()},[b]);const O=Y.useCallback(async()=>{var R;if(e){y(!0),w("");try{const ne=(R=(await fetch(`/automations/${encodeURIComponent(e)}/stream`,{method:"POST"})).body)==null?void 0:R.getReader(),q=new TextDecoder;if(ne){let I="";for(;;){const{done:Q,value:J}=await ne.read();if(Q)break;I+=q.decode(J,{stream:!0});const H=I.split(`
|
|
256
|
-
`);I=H.pop()??"";for(const U of H)if(U.startsWith("data: "))try{const $=JSON.parse(U.substring(6));$.type==="text_delta"&&typeof $.content=="string"&&w(ue=>ue+String($.content))}catch{}}}}catch{}y(!1),b()}},[e,b]),D=Y.useCallback(async R=>{if(f[R]){d(l===R?null:R);return}try{const V=await fetch(`/session/${encodeURIComponent(R)}`);if(V.ok){const ne=await V.json();m(q=>({...q,[R]:ne.messages})),d(R)}}catch{}},[f,l]);if(g)return E.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(!n)return E.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Automation not found"});const P=n.schedule?oN(n.schedule):null;return E.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[E.jsx("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("div",{className:"flex items-center gap-3",children:E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Oa,{className:"h-4 w-4 text-purple-500"}),E.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:n.title})]}),E.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[E.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:n.trigger}),n.schedule&&E.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[E.jsx(Ic,{className:"h-3 w-3"}),Mv.toString(n.schedule,{use24HourTimeFormat:!0})]}),P&&E.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",P]})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed mt-2 max-w-2xl line-clamp-3",children:n.prompt})]})}),E.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[n.schedule&&E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-400",children:n.running?"Scheduled":"Paused"}),E.jsx("button",{onClick:()=>{const R=n.running?"stop":"start";fetch(`/automations/${encodeURIComponent(e??"")}/${R}`,{method:"POST"}).then(()=>b())},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${n.running?"bg-emerald-500":"bg-gray-300 dark:bg-zinc-700"}`,children:E.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${n.running?"translate-x-6":"translate-x-1"}`})})]}),E.jsx("button",{onClick:()=>{O()},disabled:h,className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50",children:h?E.jsxs(E.Fragment,{children:[E.jsx(Na,{className:"h-4 w-4 animate-spin"})," Running..."]}):E.jsxs(E.Fragment,{children:[E.jsx(Ih,{className:"h-4 w-4"})," Run Now"]})})]})]})}),E.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:E.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[(h||S)&&E.jsxs("div",{className:"mb-6 border border-purple-500/20 rounded-xl p-4 bg-purple-500/5",children:[E.jsx("div",{className:"flex items-center gap-2 mb-3 text-xs text-purple-400 font-medium",children:h?E.jsxs(E.Fragment,{children:[E.jsx(Na,{className:"h-3.5 w-3.5 animate-spin"})," Running now..."]}):E.jsxs(E.Fragment,{children:[E.jsx(Cc,{className:"h-3.5 w-3.5 text-emerald-500"})," Latest run"]})}),S?E.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:E.jsx(Ii,{children:S})}):E.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"Waiting for agent response..."})]}),s.length===0&&!h?E.jsx("div",{className:"text-center py-12 text-gray-400 dark:text-zinc-600 text-sm",children:"No runs yet. Click Run Now to trigger this automation."}):E.jsx("div",{className:"space-y-4",children:s.map(R=>{const V=l===R.id,ne=f[R.id];return E.jsxs("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl overflow-hidden",children:[E.jsxs("button",{onClick:()=>{D(R.id)},className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Cc,{className:"h-3.5 w-3.5 text-emerald-500 shrink-0"}),E.jsxs("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:["Run ",sN(R.createdAt)]})]}),E.jsx("span",{className:"text-xs text-gray-400 dark:text-zinc-600 font-mono",children:R.id.slice(0,8)})]}),V&&ne&&E.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800 px-4 py-4 bg-gray-50 dark:bg-zinc-900/30",children:[ne.filter(q=>q.role==="assistant"&&q.text).map((q,I)=>E.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-800 dark:prose-headings:text-zinc-200 prose-p:text-gray-700 dark:prose-p:text-zinc-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded",children:E.jsx(Ii,{children:q.text})},`msg-${String(I)}`)),ne.filter(q=>q.role==="assistant"&&q.text).length===0&&E.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"No response text captured"})]})]},R.id)})})]})})]})}function lN(){const{pageName:e}=Da(),[n,i]=Y.useState(null),[s,a]=Y.useState(!1);return Y.useEffect(()=>{if(!e)return;i(null),a(!1);const l=window.__AMODAL_PAGES__;if(l!=null&&l[e]){i(()=>l[e]);return}const d=document.createElement("script");d.src=`/pages-bundle/${e}.js`,d.onload=()=>{const f=window.__AMODAL_PAGES__;f!=null&&f[e]?i(()=>f[e]):a(!0)},d.onerror=()=>a(!0),document.head.appendChild(d)},[e]),s?E.jsx(uN,{name:e??""}):n?E.jsx(n,{}):E.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading page..."})}function uN({name:e}){return E.jsxs("div",{className:"p-6",children:[E.jsx("h1",{className:"text-xl font-bold mb-2 text-gray-900 dark:text-zinc-200",children:"Page Not Found"}),E.jsx("p",{className:"text-gray-500 dark:text-zinc-500",children:e?`No page named "${e}" found in pages/.`:"No page specified."})]})}const cN={connections:{icon:eh,color:"emerald",label:"Connection"},skills:{icon:th,color:"amber",label:"Skill"},knowledge:{icon:Kf,color:"blue",label:"Knowledge"}};function dN({data:e}){return E.jsxs("div",{className:"space-y-6",children:[E.jsxs("div",{className:"flex flex-wrap gap-2",children:[E.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 font-medium",children:e.spec.format}),E.jsxs("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-600 dark:text-zinc-400 font-medium",children:["auth: ",e.spec.authType]}),e.spec.baseUrl&&E.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:e.spec.baseUrl})]}),e.surface.length>0&&E.jsxs("section",{children:[E.jsxs("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:["API Surface (",String(e.surface.length)," endpoints)"]}),E.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:E.jsxs("table",{className:"w-full text-[13px]",children:[E.jsx("thead",{children:E.jsxs("tr",{className:"bg-gray-50 dark:bg-zinc-900/50",children:[E.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium w-20",children:"Method"}),E.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Path"}),E.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Description"})]})}),E.jsx("tbody",{children:e.surface.map((n,i)=>E.jsxs("tr",{className:"border-t border-gray-100 dark:border-zinc-800/50",children:[E.jsx("td",{className:"px-3 py-2",children:E.jsx("span",{className:`text-[10px] font-mono font-bold uppercase ${n.method==="GET"?"text-blue-500":n.method==="POST"?"text-emerald-500":n.method==="PUT"?"text-amber-500":n.method==="DELETE"?"text-red-500":"text-gray-500"}`,children:n.method})}),E.jsx("td",{className:"px-3 py-2 font-mono text-gray-700 dark:text-zinc-300",children:n.path}),E.jsx("td",{className:"px-3 py-2 text-gray-500 dark:text-zinc-500",children:n.description})]},`endpoint-${String(i)}`))})]})})]}),e.entities&&E.jsxs("section",{children:[E.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Entities"}),E.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:E.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:E.jsx(Ii,{children:e.entities})})})]}),e.rules&&E.jsxs("section",{children:[E.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Rules"}),E.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:E.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:E.jsx(Ii,{children:e.rules})})})]})]})}function fN({data:e}){return E.jsxs("div",{className:"space-y-6",children:[E.jsxs("div",{className:"space-y-2",children:[e.description&&E.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:e.description}),e.trigger&&E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-amber-100 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 font-medium",children:"trigger"}),E.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-500 font-mono",children:e.trigger})]})]}),E.jsxs("section",{children:[E.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Skill Definition"}),E.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:E.jsx(Ii,{children:e.body})})]})]})}function hN({data:e}){return E.jsxs("div",{className:"space-y-6",children:[e.title&&e.title!==e.name&&E.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:e.title}),E.jsx("section",{children:E.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto",children:E.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:E.jsx(Ii,{children:e.body})})})})]})}function pN(){const{kind:e,name:n}=Da(),[i,s]=Y.useState(null),[a,l]=Y.useState(!0),[d,f]=Y.useState(null),h=e&&new Set(["connections","skills","knowledge"]).has(e)?e:void 0,y=h?cN[h]:void 0;if(Y.useEffect(()=>{!h||!n||(l(!0),f(null),fetch(`/inspect/${h}/${encodeURIComponent(n)}`).then(g=>{if(!g.ok)throw new Error(`${String(g.status)} ${g.statusText}`);return g.json()}).then(g=>{s(g)}).catch(g=>{f(g instanceof Error?g.message:"Failed to load")}).finally(()=>{l(!1)}))},[h,n]),!y)return E.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Unknown inspect type"});if(a)return E.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(d||!i)return E.jsx("div",{className:"p-6 text-red-500 text-sm",children:d??"Not found"});const S=y.icon,w=(n==null?void 0:n.replace(/[-_]/g," ").replace(/\b\w/g,g=>g.toUpperCase()))??"";return E.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[E.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(S,{className:`h-4 w-4 text-${y.color}-500`}),E.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:w})]}),E.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[E.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full bg-${y.color}-100 dark:bg-${y.color}-500/10 text-${y.color}-700 dark:text-${y.color}-400 font-medium`,children:y.label}),"location"in i&&i.location&&E.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600 font-mono",children:i.location})]})]}),E.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:E.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[h==="connections"&&E.jsx(dN,{data:i}),h==="skills"&&E.jsx(fN,{data:i}),h==="knowledge"&&E.jsx(hN,{data:i})]})})]})}const mN=X1([{path:"/",element:E.jsx(Zk,{}),children:[{index:!0,element:E.jsx(vT,{})},{path:"sessions",element:E.jsx(kT,{})},{path:"sessions/:sessionId",element:E.jsx(ST,{})},{path:"entities/:storeName",element:E.jsx(OT,{})},{path:"entities/:storeName/:key",element:E.jsx(UT,{})},{path:"automations",element:E.jsx(iN,{})},{path:"automations/:automationName",element:E.jsx(aN,{})},{path:"inspect/:kind/:name",element:E.jsx(pN,{})},{path:"pages/:pageName",element:E.jsx(lN,{})}]}]),Ey=window.location.origin,gN="local",yN=new Fw({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1}}});function vN(){return E.jsx(Uw,{client:yN,children:E.jsx(Ww,{runtimeUrl:Ey,tenantId:gN,children:E.jsx(Zw,{runtimeUrl:Ey,children:E.jsx(nw,{router:mN})})})})}window.React=Py;window.ReactDOM=Fy;window.__AMODAL_PAGES__={};const Dv=document.getElementById("app");if(!Dv)throw new Error("Missing #app element");Ex.createRoot(Dv).render(E.jsx(Y.StrictMode,{children:E.jsx(vN,{})}));
|