@obsfx/trekker-dashboard 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,332 @@
1
+ var tx=e=>{throw TypeError(e)};var ph=(e,t,n)=>t.has(e)||tx("Cannot "+n);var H=(e,t,n)=>(ph(e,t,"read from private field"),n?n.call(e):t.get(e)),$e=(e,t,n)=>t.has(e)?tx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pe=(e,t,n,r)=>(ph(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(ph(e,t,"access private method"),n);var Zu=(e,t,n,r)=>({set _(o){Pe(e,t,o,n)},get _(){return H(e,t,r)}});function oP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mh={exports:{}},Ul={},gh={exports:{}},qe={};/**
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 nx;function sP(){if(nx)return qe;nx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=p&&L[p]||L["@@iterator"],typeof L=="function"?L:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function C(L,Y,j){this.props=L,this.context=Y,this.refs=k,this.updater=j||g}C.prototype.isReactComponent={},C.prototype.setState=function(L,Y){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Y,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=C.prototype;function _(L,Y,j){this.props=L,this.context=Y,this.refs=k,this.updater=j||g}var T=_.prototype=new E;T.constructor=_,S(T,C.prototype),T.isPureReactComponent=!0;var I=Array.isArray,O=Object.prototype.hasOwnProperty,R={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function Q(L,Y,j){var ue,ye={},we=null,ae=null;if(Y!=null)for(ue in Y.ref!==void 0&&(ae=Y.ref),Y.key!==void 0&&(we=""+Y.key),Y)O.call(Y,ue)&&!V.hasOwnProperty(ue)&&(ye[ue]=Y[ue]);var ve=arguments.length-2;if(ve===1)ye.children=j;else if(1<ve){for(var Ce=Array(ve),ke=0;ke<ve;ke++)Ce[ke]=arguments[ke+2];ye.children=Ce}if(L&&L.defaultProps)for(ue in ve=L.defaultProps,ve)ye[ue]===void 0&&(ye[ue]=ve[ue]);return{$$typeof:e,type:L,key:we,ref:ae,props:ye,_owner:R.current}}function oe(L,Y){return{$$typeof:e,type:L.type,key:Y,ref:L.ref,props:L.props,_owner:L._owner}}function A(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function K(L){var Y={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(j){return Y[j]})}var M=/\/+/g;function ne(L,Y){return typeof L=="object"&&L!==null&&L.key!=null?K(""+L.key):Y.toString(36)}function W(L,Y,j,ue,ye){var we=typeof L;(we==="undefined"||we==="boolean")&&(L=null);var ae=!1;if(L===null)ae=!0;else switch(we){case"string":case"number":ae=!0;break;case"object":switch(L.$$typeof){case e:case t:ae=!0}}if(ae)return ae=L,ye=ye(ae),L=ue===""?"."+ne(ae,0):ue,I(ye)?(j="",L!=null&&(j=L.replace(M,"$&/")+"/"),W(ye,Y,j,"",function(ke){return ke})):ye!=null&&(A(ye)&&(ye=oe(ye,j+(!ye.key||ae&&ae.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+L)),Y.push(ye)),1;if(ae=0,ue=ue===""?".":ue+":",I(L))for(var ve=0;ve<L.length;ve++){we=L[ve];var Ce=ue+ne(we,ve);ae+=W(we,Y,j,Ce,ye)}else if(Ce=x(L),typeof Ce=="function")for(L=Ce.call(L),ve=0;!(we=L.next()).done;)we=we.value,Ce=ue+ne(we,ve++),ae+=W(we,Y,j,Ce,ye);else if(we==="object")throw Y=String(L),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return ae}function B(L,Y,j){if(L==null)return L;var ue=[],ye=0;return W(L,ue,"","",function(we){return Y.call(j,we,ye++)}),ue}function q(L){if(L._status===-1){var Y=L._result;Y=Y(),Y.then(function(j){(L._status===0||L._status===-1)&&(L._status=1,L._result=j)},function(j){(L._status===0||L._status===-1)&&(L._status=2,L._result=j)}),L._status===-1&&(L._status=0,L._result=Y)}if(L._status===1)return L._result.default;throw L._result}var ee={current:null},D={transition:null},G={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:D,ReactCurrentOwner:R};function N(){throw Error("act(...) is not supported in production builds of React.")}return qe.Children={map:B,forEach:function(L,Y,j){B(L,function(){Y.apply(this,arguments)},j)},count:function(L){var Y=0;return B(L,function(){Y++}),Y},toArray:function(L){return B(L,function(Y){return Y})||[]},only:function(L){if(!A(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},qe.Component=C,qe.Fragment=n,qe.Profiler=o,qe.PureComponent=_,qe.StrictMode=r,qe.Suspense=d,qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,qe.act=N,qe.cloneElement=function(L,Y,j){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ue=S({},L.props),ye=L.key,we=L.ref,ae=L._owner;if(Y!=null){if(Y.ref!==void 0&&(we=Y.ref,ae=R.current),Y.key!==void 0&&(ye=""+Y.key),L.type&&L.type.defaultProps)var ve=L.type.defaultProps;for(Ce in Y)O.call(Y,Ce)&&!V.hasOwnProperty(Ce)&&(ue[Ce]=Y[Ce]===void 0&&ve!==void 0?ve[Ce]:Y[Ce])}var Ce=arguments.length-2;if(Ce===1)ue.children=j;else if(1<Ce){ve=Array(Ce);for(var ke=0;ke<Ce;ke++)ve[ke]=arguments[ke+2];ue.children=ve}return{$$typeof:e,type:L.type,key:ye,ref:we,props:ue,_owner:ae}},qe.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:l,_context:L},L.Consumer=L},qe.createElement=Q,qe.createFactory=function(L){var Y=Q.bind(null,L);return Y.type=L,Y},qe.createRef=function(){return{current:null}},qe.forwardRef=function(L){return{$$typeof:u,render:L}},qe.isValidElement=A,qe.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:q}},qe.memo=function(L,Y){return{$$typeof:f,type:L,compare:Y===void 0?null:Y}},qe.startTransition=function(L){var Y=D.transition;D.transition={};try{L()}finally{D.transition=Y}},qe.unstable_act=N,qe.useCallback=function(L,Y){return ee.current.useCallback(L,Y)},qe.useContext=function(L){return ee.current.useContext(L)},qe.useDebugValue=function(){},qe.useDeferredValue=function(L){return ee.current.useDeferredValue(L)},qe.useEffect=function(L,Y){return ee.current.useEffect(L,Y)},qe.useId=function(){return ee.current.useId()},qe.useImperativeHandle=function(L,Y,j){return ee.current.useImperativeHandle(L,Y,j)},qe.useInsertionEffect=function(L,Y){return ee.current.useInsertionEffect(L,Y)},qe.useLayoutEffect=function(L,Y){return ee.current.useLayoutEffect(L,Y)},qe.useMemo=function(L,Y){return ee.current.useMemo(L,Y)},qe.useReducer=function(L,Y,j){return ee.current.useReducer(L,Y,j)},qe.useRef=function(L){return ee.current.useRef(L)},qe.useState=function(L){return ee.current.useState(L)},qe.useSyncExternalStore=function(L,Y,j){return ee.current.useSyncExternalStore(L,Y,j)},qe.useTransition=function(){return ee.current.useTransition()},qe.version="18.3.1",qe}var rx;function Gp(){return rx||(rx=1,gh.exports=sP()),gh.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 ix;function lP(){if(ix)return Ul;ix=1;var e=Gp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(u,d,f){var h,p={},x=null,g=null;f!==void 0&&(x=""+f),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(g=d.ref);for(h in d)r.call(d,h)&&!l.hasOwnProperty(h)&&(p[h]=d[h]);if(u&&u.defaultProps)for(h in d=u.defaultProps,d)p[h]===void 0&&(p[h]=d[h]);return{$$typeof:t,type:u,key:x,ref:g,props:p,_owner:o.current}}return Ul.Fragment=n,Ul.jsx=a,Ul.jsxs=a,Ul}var ox;function aP(){return ox||(ox=1,mh.exports=lP()),mh.exports}var y=aP(),b=Gp();const le=Zo(b),Xp=oP({__proto__:null,default:le},[b]);var qu={},yh={exports:{}},Dn={},vh={exports:{}},xh={};/**
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 sx;function uP(){return sx||(sx=1,(function(e){function t(D,G){var N=D.length;D.push(G);e:for(;0<N;){var L=N-1>>>1,Y=D[L];if(0<o(Y,G))D[L]=G,D[N]=Y,N=L;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var G=D[0],N=D.pop();if(N!==G){D[0]=N;e:for(var L=0,Y=D.length,j=Y>>>1;L<j;){var ue=2*(L+1)-1,ye=D[ue],we=ue+1,ae=D[we];if(0>o(ye,N))we<Y&&0>o(ae,ye)?(D[L]=ae,D[we]=N,L=we):(D[L]=ye,D[ue]=N,L=ue);else if(we<Y&&0>o(ae,N))D[L]=ae,D[we]=N,L=we;else break e}}return G}function o(D,G){var N=D.sortIndex-G.sortIndex;return N!==0?N:D.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var d=[],f=[],h=1,p=null,x=3,g=!1,S=!1,k=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(D){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=D)r(f),G.sortIndex=G.expirationTime,t(d,G);else break;G=n(f)}}function I(D){if(k=!1,T(D),!S)if(n(d)!==null)S=!0,q(O);else{var G=n(f);G!==null&&ee(I,G.startTime-D)}}function O(D,G){S=!1,k&&(k=!1,E(Q),Q=-1),g=!0;var N=x;try{for(T(G),p=n(d);p!==null&&(!(p.expirationTime>G)||D&&!K());){var L=p.callback;if(typeof L=="function"){p.callback=null,x=p.priorityLevel;var Y=L(p.expirationTime<=G);G=e.unstable_now(),typeof Y=="function"?p.callback=Y:p===n(d)&&r(d),T(G)}else r(d);p=n(d)}if(p!==null)var j=!0;else{var ue=n(f);ue!==null&&ee(I,ue.startTime-G),j=!1}return j}finally{p=null,x=N,g=!1}}var R=!1,V=null,Q=-1,oe=5,A=-1;function K(){return!(e.unstable_now()-A<oe)}function M(){if(V!==null){var D=e.unstable_now();A=D;var G=!0;try{G=V(!0,D)}finally{G?ne():(R=!1,V=null)}}else R=!1}var ne;if(typeof _=="function")ne=function(){_(M)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,B=W.port2;W.port1.onmessage=M,ne=function(){B.postMessage(null)}}else ne=function(){C(M,0)};function q(D){V=D,R||(R=!0,ne())}function ee(D,G){Q=C(function(){D(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){S||g||(S=!0,q(O))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(D){switch(x){case 1:case 2:case 3:var G=3;break;default:G=x}var N=x;x=G;try{return D()}finally{x=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,G){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var N=x;x=D;try{return G()}finally{x=N}},e.unstable_scheduleCallback=function(D,G,N){var L=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?L+N:L):N=L,D){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=N+Y,D={id:h++,callback:G,priorityLevel:D,startTime:N,expirationTime:Y,sortIndex:-1},N>L?(D.sortIndex=N,t(f,D),n(d)===null&&D===n(f)&&(k?(E(Q),Q=-1):k=!0,ee(I,N-L))):(D.sortIndex=Y,t(d,D),S||g||(S=!0,q(O))),D},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(D){var G=x;return function(){var N=x;x=G;try{return D.apply(this,arguments)}finally{x=N}}}})(xh)),xh}var lx;function cP(){return lx||(lx=1,vh.exports=uP()),vh.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 ax;function dP(){if(ax)return Dn;ax=1;var e=Gp(),t=cP();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(i,s){a(i,s),a(i+"Capture",s)}function a(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},p={};function x(i){return d.call(p,i)?!0:d.call(h,i)?!1:f.test(i)?p[i]=!0:(h[i]=!0,!1)}function g(i,s,c,m){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function S(i,s,c,m){if(s===null||typeof s>"u"||g(i,s,c,m))return!0;if(m)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,c,m,v,w,P){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=v,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=P}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];C[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new k(i,2,!1,i,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(i){C[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(i){return i[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(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function T(i,s,c,m){var v=C.hasOwnProperty(s)?C[s]:null;(v!==null?v.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,c,v,m)&&(c=null),m||v===null?x(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):v.mustUseProperty?i[v.propertyName]=c===null?v.type===3?!1:"":c:(s=v.attributeName,m=v.attributeNamespace,c===null?i.removeAttribute(s):(v=v.type,c=v===3||v===4&&c===!0?"":""+c,m?i.setAttributeNS(m,s,c):i.setAttribute(s,c))))}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),R=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),K=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),D=Symbol.iterator;function G(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,L;function Y(i){if(L===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
34
+ `+L+i}var j=!1;function ue(i,s){if(!i||j)return"";j=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(re){var m=re}Reflect.construct(i,[],s)}else{try{s.call()}catch(re){m=re}i.call(s.prototype)}else{try{throw Error()}catch(re){m=re}i()}}catch(re){if(re&&m&&typeof re.stack=="string"){for(var v=re.stack.split(`
35
+ `),w=m.stack.split(`
36
+ `),P=v.length-1,z=w.length-1;1<=P&&0<=z&&v[P]!==w[z];)z--;for(;1<=P&&0<=z;P--,z--)if(v[P]!==w[z]){if(P!==1||z!==1)do if(P--,z--,0>z||v[P]!==w[z]){var U=`
37
+ `+v[P].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=P&&0<=z);break}}}finally{j=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Y(i):""}function ye(i){switch(i.tag){case 5:return Y(i.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return i=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function we(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case V:return"Fragment";case R:return"Portal";case oe:return"Profiler";case Q:return"StrictMode";case ne:return"Suspense";case W:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case K:return(i.displayName||"Context")+".Consumer";case A:return(i._context.displayName||"Context")+".Provider";case M:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case B:return s=i.displayName||null,s!==null?s:we(i.type)||"Memo";case q:s=i._payload,i=i._init;try{return we(i(s))}catch{}}return null}function ae(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(s);case 8:return s===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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ce(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ke(i){var s=Ce(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var v=c.get,w=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return v.call(this)},set:function(P){m=""+P,w.call(this,P)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return m},setValue:function(P){m=""+P},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ae(i){i._valueTracker||(i._valueTracker=ke(i))}function Ve(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return i&&(m=Ce(i)?i.checked?"true":"false":i.value),i=m,i!==c?(s.setValue(i),!0):!1}function nt(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function At(i,s){var c=s.checked;return N({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function sn(i,s){var c=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;c=ve(s.value!=null?s.value:c),i._wrapperState={initialChecked:m,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Gt(i,s){s=s.checked,s!=null&&T(i,"checked",s,!1)}function ln(i,s){Gt(i,s);var c=ve(s.value),m=s.type;if(c!=null)m==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?En(i,s.type,c):s.hasOwnProperty("defaultValue")&&En(i,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function ir(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function En(i,s,c){(s!=="number"||nt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var _n=Array.isArray;function F(i,s,c,m){if(i=i.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<i.length;c++)v=s.hasOwnProperty("$"+i[c].value),i[c].selected!==v&&(i[c].selected=v),v&&m&&(i[c].defaultSelected=!0)}else{for(c=""+ve(c),s=null,v=0;v<i.length;v++){if(i[v].value===c){i[v].selected=!0,m&&(i[v].defaultSelected=!0);return}s!==null||i[v].disabled||(s=i[v])}s!==null&&(s.selected=!0)}}function J(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function se(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(_n(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:ve(c)}}function be(i,s){var c=ve(s.value),m=ve(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),m!=null&&(i.defaultValue=""+m)}function ge(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function $(i){switch(i){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 ie(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?$(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var xe,Ee=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,m,v){MSApp.execUnsafeLocalFunction(function(){return i(s,c,m,v)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(xe=xe||document.createElement("div"),xe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=xe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function De(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={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},Rt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Rt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function Zt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function Vt(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var m=c.indexOf("--")===0,v=Zt(c,s[c],m);c==="float"&&(c="cssFloat"),m?i.setProperty(c,v):i[c]=v}}var Pn=N({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 ht(i,s){if(s){if(Pn[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function pn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 Xt=null;function ni(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ko=null,Si=null,Mr=null;function yr(i){if(i=Tl(i)){if(typeof Ko!="function")throw Error(n(280));var s=i.stateNode;s&&(s=lu(s),Ko(i.stateNode,i.type,s))}}function La(i){Si?Mr?Mr.push(i):Mr=[i]:Si=i}function Ue(){if(Si){var i=Si,s=Mr;if(Mr=Si=null,yr(i),s)for(i=0;i<s.length;i++)yr(s[i])}}function rt(i,s){return i(s)}function dt(){}var mn=!1;function Tn(i,s,c){if(mn)return i(s,c);mn=!0;try{return rt(i,s,c)}finally{mn=!1,(Si!==null||Mr!==null)&&(dt(),Ue())}}function Nn(i,s){var c=i.stateNode;if(c===null)return null;var m=lu(c);if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var vr=!1;if(u)try{var Jt={};Object.defineProperty(Jt,"passive",{get:function(){vr=!0}}),window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{vr=!1}function Lr(i,s,c,m,v,w,P,z,U){var re=Array.prototype.slice.call(arguments,3);try{s.apply(c,re)}catch(fe){this.onError(fe)}}var ul=!1,Fa=null,$a=!1,Id=null,fE={onError:function(i){ul=!0,Fa=i}};function hE(i,s,c,m,v,w,P,z,U){ul=!1,Fa=null,Lr.apply(fE,arguments)}function pE(i,s,c,m,v,w,P,z,U){if(hE.apply(this,arguments),ul){if(ul){var re=Fa;ul=!1,Fa=null}else throw Error(n(198));$a||($a=!0,Id=re)}}function co(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function Cg(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Eg(i){if(co(i)!==i)throw Error(n(188))}function mE(i){var s=i.alternate;if(!s){if(s=co(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,m=s;;){var v=c.return;if(v===null)break;var w=v.alternate;if(w===null){if(m=v.return,m!==null){c=m;continue}break}if(v.child===w.child){for(w=v.child;w;){if(w===c)return Eg(v),i;if(w===m)return Eg(v),s;w=w.sibling}throw Error(n(188))}if(c.return!==m.return)c=v,m=w;else{for(var P=!1,z=v.child;z;){if(z===c){P=!0,c=v,m=w;break}if(z===m){P=!0,m=v,c=w;break}z=z.sibling}if(!P){for(z=w.child;z;){if(z===c){P=!0,c=w,m=v;break}if(z===m){P=!0,m=w,c=v;break}z=z.sibling}if(!P)throw Error(n(189))}}if(c.alternate!==m)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function _g(i){return i=mE(i),i!==null?Pg(i):null}function Pg(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Pg(i);if(s!==null)return s;i=i.sibling}return null}var Tg=t.unstable_scheduleCallback,Ng=t.unstable_cancelCallback,gE=t.unstable_shouldYield,yE=t.unstable_requestPaint,jt=t.unstable_now,vE=t.unstable_getCurrentPriorityLevel,Ad=t.unstable_ImmediatePriority,Rg=t.unstable_UserBlockingPriority,Va=t.unstable_NormalPriority,xE=t.unstable_LowPriority,jg=t.unstable_IdlePriority,Ba=null,Fr=null;function wE(i){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(Ba,i,void 0,(i.current.flags&128)===128)}catch{}}var xr=Math.clz32?Math.clz32:SE,bE=Math.log,kE=Math.LN2;function SE(i){return i>>>=0,i===0?32:31-(bE(i)/kE|0)|0}var Ua=64,Ha=4194304;function cl(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Wa(i,s){var c=i.pendingLanes;if(c===0)return 0;var m=0,v=i.suspendedLanes,w=i.pingedLanes,P=c&268435455;if(P!==0){var z=P&~v;z!==0?m=cl(z):(w&=P,w!==0&&(m=cl(w)))}else P=c&~v,P!==0?m=cl(P):w!==0&&(m=cl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&v)===0&&(v=m&-m,w=s&-s,v>=w||v===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)c=31-xr(s),v=1<<c,m|=i[c],s&=~v;return m}function CE(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 EE(i,s){for(var c=i.suspendedLanes,m=i.pingedLanes,v=i.expirationTimes,w=i.pendingLanes;0<w;){var P=31-xr(w),z=1<<P,U=v[P];U===-1?((z&c)===0||(z&m)!==0)&&(v[P]=CE(z,s)):U<=s&&(i.expiredLanes|=z),w&=~z}}function Od(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Ig(){var i=Ua;return Ua<<=1,(Ua&4194240)===0&&(Ua=64),i}function Dd(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function dl(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-xr(s),i[s]=c}function _E(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<c;){var v=31-xr(c),w=1<<v;s[v]=0,m[v]=-1,i[v]=-1,c&=~w}}function zd(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var m=31-xr(c),v=1<<m;v&s|i[m]&s&&(i[m]|=s),c&=~v}}var ot=0;function Ag(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Og,Md,Dg,zg,Mg,Ld=!1,Za=[],Ci=null,Ei=null,_i=null,fl=new Map,hl=new Map,Pi=[],PE="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 Lg(i,s){switch(i){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":fl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(s.pointerId)}}function pl(i,s,c,m,v,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:w,targetContainers:[v]},s!==null&&(s=Tl(s),s!==null&&Md(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),i)}function TE(i,s,c,m,v){switch(s){case"focusin":return Ci=pl(Ci,i,s,c,m,v),!0;case"dragenter":return Ei=pl(Ei,i,s,c,m,v),!0;case"mouseover":return _i=pl(_i,i,s,c,m,v),!0;case"pointerover":var w=v.pointerId;return fl.set(w,pl(fl.get(w)||null,i,s,c,m,v)),!0;case"gotpointercapture":return w=v.pointerId,hl.set(w,pl(hl.get(w)||null,i,s,c,m,v)),!0}return!1}function Fg(i){var s=fo(i.target);if(s!==null){var c=co(s);if(c!==null){if(s=c.tag,s===13){if(s=Cg(c),s!==null){i.blockedOn=s,Mg(i.priority,function(){Dg(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function qa(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=$d(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var m=new c.constructor(c.type,c);Xt=m,c.target.dispatchEvent(m),Xt=null}else return s=Tl(c),s!==null&&Md(s),i.blockedOn=c,!1;s.shift()}return!0}function $g(i,s,c){qa(i)&&c.delete(s)}function NE(){Ld=!1,Ci!==null&&qa(Ci)&&(Ci=null),Ei!==null&&qa(Ei)&&(Ei=null),_i!==null&&qa(_i)&&(_i=null),fl.forEach($g),hl.forEach($g)}function ml(i,s){i.blockedOn===s&&(i.blockedOn=null,Ld||(Ld=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,NE)))}function gl(i){function s(v){return ml(v,i)}if(0<Za.length){ml(Za[0],i);for(var c=1;c<Za.length;c++){var m=Za[c];m.blockedOn===i&&(m.blockedOn=null)}}for(Ci!==null&&ml(Ci,i),Ei!==null&&ml(Ei,i),_i!==null&&ml(_i,i),fl.forEach(s),hl.forEach(s),c=0;c<Pi.length;c++)m=Pi[c],m.blockedOn===i&&(m.blockedOn=null);for(;0<Pi.length&&(c=Pi[0],c.blockedOn===null);)Fg(c),c.blockedOn===null&&Pi.shift()}var Go=I.ReactCurrentBatchConfig,Qa=!0;function RE(i,s,c,m){var v=ot,w=Go.transition;Go.transition=null;try{ot=1,Fd(i,s,c,m)}finally{ot=v,Go.transition=w}}function jE(i,s,c,m){var v=ot,w=Go.transition;Go.transition=null;try{ot=4,Fd(i,s,c,m)}finally{ot=v,Go.transition=w}}function Fd(i,s,c,m){if(Qa){var v=$d(i,s,c,m);if(v===null)rf(i,s,m,Ya,c),Lg(i,m);else if(TE(v,i,s,c,m))m.stopPropagation();else if(Lg(i,m),s&4&&-1<PE.indexOf(i)){for(;v!==null;){var w=Tl(v);if(w!==null&&Og(w),w=$d(i,s,c,m),w===null&&rf(i,s,m,Ya,c),w===v)break;v=w}v!==null&&m.stopPropagation()}else rf(i,s,m,null,c)}}var Ya=null;function $d(i,s,c,m){if(Ya=null,i=ni(m),i=fo(i),i!==null)if(s=co(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Cg(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ya=i,null}function Vg(i){switch(i){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(vE()){case Ad:return 1;case Rg:return 4;case Va:case xE:return 16;case jg:return 536870912;default:return 16}default:return 16}}var Ti=null,Vd=null,Ka=null;function Bg(){if(Ka)return Ka;var i,s=Vd,c=s.length,m,v="value"in Ti?Ti.value:Ti.textContent,w=v.length;for(i=0;i<c&&s[i]===v[i];i++);var P=c-i;for(m=1;m<=P&&s[c-m]===v[w-m];m++);return Ka=v.slice(i,1<m?1-m:void 0)}function Ga(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Xa(){return!0}function Ug(){return!1}function Qn(i){function s(c,m,v,w,P){this._reactName=c,this._targetInst=v,this.type=m,this.nativeEvent=w,this.target=P,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(c=i[z],this[z]=c?c(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Xa:Ug,this.isPropagationStopped=Ug,this}return N(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Xa)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Xa)},persist:function(){},isPersistent:Xa}),s}var Xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bd=Qn(Xo),yl=N({},Xo,{view:0,detail:0}),IE=Qn(yl),Ud,Hd,vl,Ja=N({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zd,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==vl&&(vl&&i.type==="mousemove"?(Ud=i.screenX-vl.screenX,Hd=i.screenY-vl.screenY):Hd=Ud=0,vl=i),Ud)},movementY:function(i){return"movementY"in i?i.movementY:Hd}}),Hg=Qn(Ja),AE=N({},Ja,{dataTransfer:0}),OE=Qn(AE),DE=N({},yl,{relatedTarget:0}),Wd=Qn(DE),zE=N({},Xo,{animationName:0,elapsedTime:0,pseudoElement:0}),ME=Qn(zE),LE=N({},Xo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),FE=Qn(LE),$E=N({},Xo,{data:0}),Wg=Qn($E),VE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BE={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"},UE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HE(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=UE[i])?!!s[i]:!1}function Zd(){return HE}var WE=N({},yl,{key:function(i){if(i.key){var s=VE[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ga(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?BE[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zd,charCode:function(i){return i.type==="keypress"?Ga(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ga(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),ZE=Qn(WE),qE=N({},Ja,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zg=Qn(qE),QE=N({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zd}),YE=Qn(QE),KE=N({},Xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),GE=Qn(KE),XE=N({},Ja,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),JE=Qn(XE),e_=[9,13,27,32],qd=u&&"CompositionEvent"in window,xl=null;u&&"documentMode"in document&&(xl=document.documentMode);var t_=u&&"TextEvent"in window&&!xl,qg=u&&(!qd||xl&&8<xl&&11>=xl),Qg=" ",Yg=!1;function Kg(i,s){switch(i){case"keyup":return e_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Jo=!1;function n_(i,s){switch(i){case"compositionend":return Gg(s);case"keypress":return s.which!==32?null:(Yg=!0,Qg);case"textInput":return i=s.data,i===Qg&&Yg?null:i;default:return null}}function r_(i,s){if(Jo)return i==="compositionend"||!qd&&Kg(i,s)?(i=Bg(),Ka=Vd=Ti=null,Jo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return qg&&s.locale!=="ko"?null:s.data;default:return null}}var i_={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 Xg(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!i_[i.type]:s==="textarea"}function Jg(i,s,c,m){La(m),s=iu(s,"onChange"),0<s.length&&(c=new Bd("onChange","change",null,c,m),i.push({event:c,listeners:s}))}var wl=null,bl=null;function o_(i){yy(i,0)}function eu(i){var s=is(i);if(Ve(s))return i}function s_(i,s){if(i==="change")return s}var ey=!1;if(u){var Qd;if(u){var Yd="oninput"in document;if(!Yd){var ty=document.createElement("div");ty.setAttribute("oninput","return;"),Yd=typeof ty.oninput=="function"}Qd=Yd}else Qd=!1;ey=Qd&&(!document.documentMode||9<document.documentMode)}function ny(){wl&&(wl.detachEvent("onpropertychange",ry),bl=wl=null)}function ry(i){if(i.propertyName==="value"&&eu(bl)){var s=[];Jg(s,bl,i,ni(i)),Tn(o_,s)}}function l_(i,s,c){i==="focusin"?(ny(),wl=s,bl=c,wl.attachEvent("onpropertychange",ry)):i==="focusout"&&ny()}function a_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return eu(bl)}function u_(i,s){if(i==="click")return eu(s)}function c_(i,s){if(i==="input"||i==="change")return eu(s)}function d_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var wr=typeof Object.is=="function"?Object.is:d_;function kl(i,s){if(wr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var v=c[m];if(!d.call(s,v)||!wr(i[v],s[v]))return!1}return!0}function iy(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function oy(i,s){var c=iy(i);i=0;for(var m;c;){if(c.nodeType===3){if(m=i+c.textContent.length,i<=s&&m>=s)return{node:c,offset:s-i};i=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=iy(c)}}function sy(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?sy(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function ly(){for(var i=window,s=nt();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=nt(i.document)}return s}function Kd(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function f_(i){var s=ly(),c=i.focusedElem,m=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&sy(c.ownerDocument.documentElement,c)){if(m!==null&&Kd(c)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var v=c.textContent.length,w=Math.min(m.start,v);m=m.end===void 0?w:Math.min(m.end,v),!i.extend&&w>m&&(v=m,m=w,w=v),v=oy(c,w);var P=oy(c,m);v&&P&&(i.rangeCount!==1||i.anchorNode!==v.node||i.anchorOffset!==v.offset||i.focusNode!==P.node||i.focusOffset!==P.offset)&&(s=s.createRange(),s.setStart(v.node,v.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(P.node,P.offset)):(s.setEnd(P.node,P.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var h_=u&&"documentMode"in document&&11>=document.documentMode,es=null,Gd=null,Sl=null,Xd=!1;function ay(i,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Xd||es==null||es!==nt(m)||(m=es,"selectionStart"in m&&Kd(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Sl&&kl(Sl,m)||(Sl=m,m=iu(Gd,"onSelect"),0<m.length&&(s=new Bd("onSelect","select",null,s,c),i.push({event:s,listeners:m}),s.target=es)))}function tu(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var ts={animationend:tu("Animation","AnimationEnd"),animationiteration:tu("Animation","AnimationIteration"),animationstart:tu("Animation","AnimationStart"),transitionend:tu("Transition","TransitionEnd")},Jd={},uy={};u&&(uy=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function nu(i){if(Jd[i])return Jd[i];if(!ts[i])return i;var s=ts[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in uy)return Jd[i]=s[c];return i}var cy=nu("animationend"),dy=nu("animationiteration"),fy=nu("animationstart"),hy=nu("transitionend"),py=new Map,my="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 Ni(i,s){py.set(i,s),l(s,[i])}for(var ef=0;ef<my.length;ef++){var tf=my[ef],p_=tf.toLowerCase(),m_=tf[0].toUpperCase()+tf.slice(1);Ni(p_,"on"+m_)}Ni(cy,"onAnimationEnd"),Ni(dy,"onAnimationIteration"),Ni(fy,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(hy,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("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 Cl="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(" "),g_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cl));function gy(i,s,c){var m=i.type||"unknown-event";i.currentTarget=c,pE(m,s,void 0,i),i.currentTarget=null}function yy(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var m=i[c],v=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var P=m.length-1;0<=P;P--){var z=m[P],U=z.instance,re=z.currentTarget;if(z=z.listener,U!==w&&v.isPropagationStopped())break e;gy(v,z,re),w=U}else for(P=0;P<m.length;P++){if(z=m[P],U=z.instance,re=z.currentTarget,z=z.listener,U!==w&&v.isPropagationStopped())break e;gy(v,z,re),w=U}}}if($a)throw i=Id,$a=!1,Id=null,i}function yt(i,s){var c=s[cf];c===void 0&&(c=s[cf]=new Set);var m=i+"__bubble";c.has(m)||(vy(s,i,2,!1),c.add(m))}function nf(i,s,c){var m=0;s&&(m|=4),vy(c,i,m,s)}var ru="_reactListening"+Math.random().toString(36).slice(2);function El(i){if(!i[ru]){i[ru]=!0,r.forEach(function(c){c!=="selectionchange"&&(g_.has(c)||nf(c,!1,i),nf(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[ru]||(s[ru]=!0,nf("selectionchange",!1,s))}}function vy(i,s,c,m){switch(Vg(s)){case 1:var v=RE;break;case 4:v=jE;break;default:v=Fd}c=v.bind(null,s,c,i),v=void 0,!vr||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?i.addEventListener(s,c,{capture:!0,passive:v}):i.addEventListener(s,c,!0):v!==void 0?i.addEventListener(s,c,{passive:v}):i.addEventListener(s,c,!1)}function rf(i,s,c,m,v){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var z=m.stateNode.containerInfo;if(z===v||z.nodeType===8&&z.parentNode===v)break;if(P===4)for(P=m.return;P!==null;){var U=P.tag;if((U===3||U===4)&&(U=P.stateNode.containerInfo,U===v||U.nodeType===8&&U.parentNode===v))return;P=P.return}for(;z!==null;){if(P=fo(z),P===null)return;if(U=P.tag,U===5||U===6){m=w=P;continue e}z=z.parentNode}}m=m.return}Tn(function(){var re=w,fe=ni(c),he=[];e:{var de=py.get(i);if(de!==void 0){var _e=Bd,Ne=i;switch(i){case"keypress":if(Ga(c)===0)break e;case"keydown":case"keyup":_e=ZE;break;case"focusin":Ne="focus",_e=Wd;break;case"focusout":Ne="blur",_e=Wd;break;case"beforeblur":case"afterblur":_e=Wd;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_e=Hg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=OE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=YE;break;case cy:case dy:case fy:_e=ME;break;case hy:_e=GE;break;case"scroll":_e=IE;break;case"wheel":_e=JE;break;case"copy":case"cut":case"paste":_e=FE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=Zg}var Ie=(s&4)!==0,It=!Ie&&i==="scroll",X=Ie?de!==null?de+"Capture":null:de;Ie=[];for(var Z=re,te;Z!==null;){te=Z;var me=te.stateNode;if(te.tag===5&&me!==null&&(te=me,X!==null&&(me=Nn(Z,X),me!=null&&Ie.push(_l(Z,me,te)))),It)break;Z=Z.return}0<Ie.length&&(de=new _e(de,Ne,null,c,fe),he.push({event:de,listeners:Ie}))}}if((s&7)===0){e:{if(de=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",de&&c!==Xt&&(Ne=c.relatedTarget||c.fromElement)&&(fo(Ne)||Ne[ri]))break e;if((_e||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,_e?(Ne=c.relatedTarget||c.toElement,_e=re,Ne=Ne?fo(Ne):null,Ne!==null&&(It=co(Ne),Ne!==It||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(_e=null,Ne=re),_e!==Ne)){if(Ie=Hg,me="onMouseLeave",X="onMouseEnter",Z="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=Zg,me="onPointerLeave",X="onPointerEnter",Z="pointer"),It=_e==null?de:is(_e),te=Ne==null?de:is(Ne),de=new Ie(me,Z+"leave",_e,c,fe),de.target=It,de.relatedTarget=te,me=null,fo(fe)===re&&(Ie=new Ie(X,Z+"enter",Ne,c,fe),Ie.target=te,Ie.relatedTarget=It,me=Ie),It=me,_e&&Ne)t:{for(Ie=_e,X=Ne,Z=0,te=Ie;te;te=ns(te))Z++;for(te=0,me=X;me;me=ns(me))te++;for(;0<Z-te;)Ie=ns(Ie),Z--;for(;0<te-Z;)X=ns(X),te--;for(;Z--;){if(Ie===X||X!==null&&Ie===X.alternate)break t;Ie=ns(Ie),X=ns(X)}Ie=null}else Ie=null;_e!==null&&xy(he,de,_e,Ie,!1),Ne!==null&&It!==null&&xy(he,It,Ne,Ie,!0)}}e:{if(de=re?is(re):window,_e=de.nodeName&&de.nodeName.toLowerCase(),_e==="select"||_e==="input"&&de.type==="file")var Oe=s_;else if(Xg(de))if(ey)Oe=c_;else{Oe=a_;var Me=l_}else(_e=de.nodeName)&&_e.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Oe=u_);if(Oe&&(Oe=Oe(i,re))){Jg(he,Oe,c,fe);break e}Me&&Me(i,de,re),i==="focusout"&&(Me=de._wrapperState)&&Me.controlled&&de.type==="number"&&En(de,"number",de.value)}switch(Me=re?is(re):window,i){case"focusin":(Xg(Me)||Me.contentEditable==="true")&&(es=Me,Gd=re,Sl=null);break;case"focusout":Sl=Gd=es=null;break;case"mousedown":Xd=!0;break;case"contextmenu":case"mouseup":case"dragend":Xd=!1,ay(he,c,fe);break;case"selectionchange":if(h_)break;case"keydown":case"keyup":ay(he,c,fe)}var Le;if(qd)e:{switch(i){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Jo?Kg(i,c)&&(Be="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Be="onCompositionStart");Be&&(qg&&c.locale!=="ko"&&(Jo||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Jo&&(Le=Bg()):(Ti=fe,Vd="value"in Ti?Ti.value:Ti.textContent,Jo=!0)),Me=iu(re,Be),0<Me.length&&(Be=new Wg(Be,i,null,c,fe),he.push({event:Be,listeners:Me}),Le?Be.data=Le:(Le=Gg(c),Le!==null&&(Be.data=Le)))),(Le=t_?n_(i,c):r_(i,c))&&(re=iu(re,"onBeforeInput"),0<re.length&&(fe=new Wg("onBeforeInput","beforeinput",null,c,fe),he.push({event:fe,listeners:re}),fe.data=Le))}yy(he,s)})}function _l(i,s,c){return{instance:i,listener:s,currentTarget:c}}function iu(i,s){for(var c=s+"Capture",m=[];i!==null;){var v=i,w=v.stateNode;v.tag===5&&w!==null&&(v=w,w=Nn(i,c),w!=null&&m.unshift(_l(i,w,v)),w=Nn(i,s),w!=null&&m.push(_l(i,w,v))),i=i.return}return m}function ns(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function xy(i,s,c,m,v){for(var w=s._reactName,P=[];c!==null&&c!==m;){var z=c,U=z.alternate,re=z.stateNode;if(U!==null&&U===m)break;z.tag===5&&re!==null&&(z=re,v?(U=Nn(c,w),U!=null&&P.unshift(_l(c,U,z))):v||(U=Nn(c,w),U!=null&&P.push(_l(c,U,z)))),c=c.return}P.length!==0&&i.push({event:s,listeners:P})}var y_=/\r\n?/g,v_=/\u0000|\uFFFD/g;function wy(i){return(typeof i=="string"?i:""+i).replace(y_,`
38
+ `).replace(v_,"")}function ou(i,s,c){if(s=wy(s),wy(i)!==s&&c)throw Error(n(425))}function su(){}var of=null,sf=null;function lf(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var af=typeof setTimeout=="function"?setTimeout:void 0,x_=typeof clearTimeout=="function"?clearTimeout:void 0,by=typeof Promise=="function"?Promise:void 0,w_=typeof queueMicrotask=="function"?queueMicrotask:typeof by<"u"?function(i){return by.resolve(null).then(i).catch(b_)}:af;function b_(i){setTimeout(function(){throw i})}function uf(i,s){var c=s,m=0;do{var v=c.nextSibling;if(i.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"){if(m===0){i.removeChild(v),gl(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=v}while(c);gl(s)}function Ri(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function ky(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var rs=Math.random().toString(36).slice(2),$r="__reactFiber$"+rs,Pl="__reactProps$"+rs,ri="__reactContainer$"+rs,cf="__reactEvents$"+rs,k_="__reactListeners$"+rs,S_="__reactHandles$"+rs;function fo(i){var s=i[$r];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ri]||c[$r]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=ky(i);i!==null;){if(c=i[$r])return c;i=ky(i)}return s}i=c,c=i.parentNode}return null}function Tl(i){return i=i[$r]||i[ri],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function is(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function lu(i){return i[Pl]||null}var df=[],os=-1;function ji(i){return{current:i}}function vt(i){0>os||(i.current=df[os],df[os]=null,os--)}function pt(i,s){os++,df[os]=i.current,i.current=s}var Ii={},an=ji(Ii),Rn=ji(!1),ho=Ii;function ss(i,s){var c=i.type.contextTypes;if(!c)return Ii;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var v={},w;for(w in c)v[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=v),v}function jn(i){return i=i.childContextTypes,i!=null}function au(){vt(Rn),vt(an)}function Sy(i,s,c){if(an.current!==Ii)throw Error(n(168));pt(an,s),pt(Rn,c)}function Cy(i,s,c){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return c;m=m.getChildContext();for(var v in m)if(!(v in s))throw Error(n(108,ae(i)||"Unknown",v));return N({},c,m)}function uu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ii,ho=an.current,pt(an,i),pt(Rn,Rn.current),!0}function Ey(i,s,c){var m=i.stateNode;if(!m)throw Error(n(169));c?(i=Cy(i,s,ho),m.__reactInternalMemoizedMergedChildContext=i,vt(Rn),vt(an),pt(an,i)):vt(Rn),pt(Rn,c)}var ii=null,cu=!1,ff=!1;function _y(i){ii===null?ii=[i]:ii.push(i)}function C_(i){cu=!0,_y(i)}function Ai(){if(!ff&&ii!==null){ff=!0;var i=0,s=ot;try{var c=ii;for(ot=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}ii=null,cu=!1}catch(v){throw ii!==null&&(ii=ii.slice(i+1)),Tg(Ad,Ai),v}finally{ot=s,ff=!1}}return null}var ls=[],as=0,du=null,fu=0,or=[],sr=0,po=null,oi=1,si="";function mo(i,s){ls[as++]=fu,ls[as++]=du,du=i,fu=s}function Py(i,s,c){or[sr++]=oi,or[sr++]=si,or[sr++]=po,po=i;var m=oi;i=si;var v=32-xr(m)-1;m&=~(1<<v),c+=1;var w=32-xr(s)+v;if(30<w){var P=v-v%5;w=(m&(1<<P)-1).toString(32),m>>=P,v-=P,oi=1<<32-xr(s)+v|c<<v|m,si=w+i}else oi=1<<w|c<<v|m,si=i}function hf(i){i.return!==null&&(mo(i,1),Py(i,1,0))}function pf(i){for(;i===du;)du=ls[--as],ls[as]=null,fu=ls[--as],ls[as]=null;for(;i===po;)po=or[--sr],or[sr]=null,si=or[--sr],or[sr]=null,oi=or[--sr],or[sr]=null}var Yn=null,Kn=null,xt=!1,br=null;function Ty(i,s){var c=cr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function Ny(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Yn=i,Kn=Ri(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Yn=i,Kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=po!==null?{id:oi,overflow:si}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=cr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Yn=i,Kn=null,!0):!1;default:return!1}}function mf(i){return(i.mode&1)!==0&&(i.flags&128)===0}function gf(i){if(xt){var s=Kn;if(s){var c=s;if(!Ny(i,s)){if(mf(i))throw Error(n(418));s=Ri(c.nextSibling);var m=Yn;s&&Ny(i,s)?Ty(m,c):(i.flags=i.flags&-4097|2,xt=!1,Yn=i)}}else{if(mf(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Yn=i}}}function Ry(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Yn=i}function hu(i){if(i!==Yn)return!1;if(!xt)return Ry(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!lf(i.type,i.memoizedProps)),s&&(s=Kn)){if(mf(i))throw jy(),Error(n(418));for(;s;)Ty(i,s),s=Ri(s.nextSibling)}if(Ry(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){Kn=Ri(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}Kn=null}}else Kn=Yn?Ri(i.stateNode.nextSibling):null;return!0}function jy(){for(var i=Kn;i;)i=Ri(i.nextSibling)}function us(){Kn=Yn=null,xt=!1}function yf(i){br===null?br=[i]:br.push(i)}var E_=I.ReactCurrentBatchConfig;function Nl(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var m=c.stateNode}if(!m)throw Error(n(147,i));var v=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(P){var z=v.refs;P===null?delete z[w]:z[w]=P},s._stringRef=w,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function pu(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Iy(i){var s=i._init;return s(i._payload)}function Ay(i){function s(X,Z){if(i){var te=X.deletions;te===null?(X.deletions=[Z],X.flags|=16):te.push(Z)}}function c(X,Z){if(!i)return null;for(;Z!==null;)s(X,Z),Z=Z.sibling;return null}function m(X,Z){for(X=new Map;Z!==null;)Z.key!==null?X.set(Z.key,Z):X.set(Z.index,Z),Z=Z.sibling;return X}function v(X,Z){return X=Vi(X,Z),X.index=0,X.sibling=null,X}function w(X,Z,te){return X.index=te,i?(te=X.alternate,te!==null?(te=te.index,te<Z?(X.flags|=2,Z):te):(X.flags|=2,Z)):(X.flags|=1048576,Z)}function P(X){return i&&X.alternate===null&&(X.flags|=2),X}function z(X,Z,te,me){return Z===null||Z.tag!==6?(Z=ah(te,X.mode,me),Z.return=X,Z):(Z=v(Z,te),Z.return=X,Z)}function U(X,Z,te,me){var Oe=te.type;return Oe===V?fe(X,Z,te.props.children,me,te.key):Z!==null&&(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Iy(Oe)===Z.type)?(me=v(Z,te.props),me.ref=Nl(X,Z,te),me.return=X,me):(me=Lu(te.type,te.key,te.props,null,X.mode,me),me.ref=Nl(X,Z,te),me.return=X,me)}function re(X,Z,te,me){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==te.containerInfo||Z.stateNode.implementation!==te.implementation?(Z=uh(te,X.mode,me),Z.return=X,Z):(Z=v(Z,te.children||[]),Z.return=X,Z)}function fe(X,Z,te,me,Oe){return Z===null||Z.tag!==7?(Z=So(te,X.mode,me,Oe),Z.return=X,Z):(Z=v(Z,te),Z.return=X,Z)}function he(X,Z,te){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Z=ah(""+Z,X.mode,te),Z.return=X,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case O:return te=Lu(Z.type,Z.key,Z.props,null,X.mode,te),te.ref=Nl(X,null,Z),te.return=X,te;case R:return Z=uh(Z,X.mode,te),Z.return=X,Z;case q:var me=Z._init;return he(X,me(Z._payload),te)}if(_n(Z)||G(Z))return Z=So(Z,X.mode,te,null),Z.return=X,Z;pu(X,Z)}return null}function de(X,Z,te,me){var Oe=Z!==null?Z.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Oe!==null?null:z(X,Z,""+te,me);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case O:return te.key===Oe?U(X,Z,te,me):null;case R:return te.key===Oe?re(X,Z,te,me):null;case q:return Oe=te._init,de(X,Z,Oe(te._payload),me)}if(_n(te)||G(te))return Oe!==null?null:fe(X,Z,te,me,null);pu(X,te)}return null}function _e(X,Z,te,me,Oe){if(typeof me=="string"&&me!==""||typeof me=="number")return X=X.get(te)||null,z(Z,X,""+me,Oe);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case O:return X=X.get(me.key===null?te:me.key)||null,U(Z,X,me,Oe);case R:return X=X.get(me.key===null?te:me.key)||null,re(Z,X,me,Oe);case q:var Me=me._init;return _e(X,Z,te,Me(me._payload),Oe)}if(_n(me)||G(me))return X=X.get(te)||null,fe(Z,X,me,Oe,null);pu(Z,me)}return null}function Ne(X,Z,te,me){for(var Oe=null,Me=null,Le=Z,Be=Z=0,Yt=null;Le!==null&&Be<te.length;Be++){Le.index>Be?(Yt=Le,Le=null):Yt=Le.sibling;var et=de(X,Le,te[Be],me);if(et===null){Le===null&&(Le=Yt);break}i&&Le&&et.alternate===null&&s(X,Le),Z=w(et,Z,Be),Me===null?Oe=et:Me.sibling=et,Me=et,Le=Yt}if(Be===te.length)return c(X,Le),xt&&mo(X,Be),Oe;if(Le===null){for(;Be<te.length;Be++)Le=he(X,te[Be],me),Le!==null&&(Z=w(Le,Z,Be),Me===null?Oe=Le:Me.sibling=Le,Me=Le);return xt&&mo(X,Be),Oe}for(Le=m(X,Le);Be<te.length;Be++)Yt=_e(Le,X,Be,te[Be],me),Yt!==null&&(i&&Yt.alternate!==null&&Le.delete(Yt.key===null?Be:Yt.key),Z=w(Yt,Z,Be),Me===null?Oe=Yt:Me.sibling=Yt,Me=Yt);return i&&Le.forEach(function(Bi){return s(X,Bi)}),xt&&mo(X,Be),Oe}function Ie(X,Z,te,me){var Oe=G(te);if(typeof Oe!="function")throw Error(n(150));if(te=Oe.call(te),te==null)throw Error(n(151));for(var Me=Oe=null,Le=Z,Be=Z=0,Yt=null,et=te.next();Le!==null&&!et.done;Be++,et=te.next()){Le.index>Be?(Yt=Le,Le=null):Yt=Le.sibling;var Bi=de(X,Le,et.value,me);if(Bi===null){Le===null&&(Le=Yt);break}i&&Le&&Bi.alternate===null&&s(X,Le),Z=w(Bi,Z,Be),Me===null?Oe=Bi:Me.sibling=Bi,Me=Bi,Le=Yt}if(et.done)return c(X,Le),xt&&mo(X,Be),Oe;if(Le===null){for(;!et.done;Be++,et=te.next())et=he(X,et.value,me),et!==null&&(Z=w(et,Z,Be),Me===null?Oe=et:Me.sibling=et,Me=et);return xt&&mo(X,Be),Oe}for(Le=m(X,Le);!et.done;Be++,et=te.next())et=_e(Le,X,Be,et.value,me),et!==null&&(i&&et.alternate!==null&&Le.delete(et.key===null?Be:et.key),Z=w(et,Z,Be),Me===null?Oe=et:Me.sibling=et,Me=et);return i&&Le.forEach(function(iP){return s(X,iP)}),xt&&mo(X,Be),Oe}function It(X,Z,te,me){if(typeof te=="object"&&te!==null&&te.type===V&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case O:e:{for(var Oe=te.key,Me=Z;Me!==null;){if(Me.key===Oe){if(Oe=te.type,Oe===V){if(Me.tag===7){c(X,Me.sibling),Z=v(Me,te.props.children),Z.return=X,X=Z;break e}}else if(Me.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Iy(Oe)===Me.type){c(X,Me.sibling),Z=v(Me,te.props),Z.ref=Nl(X,Me,te),Z.return=X,X=Z;break e}c(X,Me);break}else s(X,Me);Me=Me.sibling}te.type===V?(Z=So(te.props.children,X.mode,me,te.key),Z.return=X,X=Z):(me=Lu(te.type,te.key,te.props,null,X.mode,me),me.ref=Nl(X,Z,te),me.return=X,X=me)}return P(X);case R:e:{for(Me=te.key;Z!==null;){if(Z.key===Me)if(Z.tag===4&&Z.stateNode.containerInfo===te.containerInfo&&Z.stateNode.implementation===te.implementation){c(X,Z.sibling),Z=v(Z,te.children||[]),Z.return=X,X=Z;break e}else{c(X,Z);break}else s(X,Z);Z=Z.sibling}Z=uh(te,X.mode,me),Z.return=X,X=Z}return P(X);case q:return Me=te._init,It(X,Z,Me(te._payload),me)}if(_n(te))return Ne(X,Z,te,me);if(G(te))return Ie(X,Z,te,me);pu(X,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Z!==null&&Z.tag===6?(c(X,Z.sibling),Z=v(Z,te),Z.return=X,X=Z):(c(X,Z),Z=ah(te,X.mode,me),Z.return=X,X=Z),P(X)):c(X,Z)}return It}var cs=Ay(!0),Oy=Ay(!1),mu=ji(null),gu=null,ds=null,vf=null;function xf(){vf=ds=gu=null}function wf(i){var s=mu.current;vt(mu),i._currentValue=s}function bf(i,s,c){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===c)break;i=i.return}}function fs(i,s){gu=i,vf=ds=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(In=!0),i.firstContext=null)}function lr(i){var s=i._currentValue;if(vf!==i)if(i={context:i,memoizedValue:s,next:null},ds===null){if(gu===null)throw Error(n(308));ds=i,gu.dependencies={lanes:0,firstContext:i}}else ds=ds.next=i;return s}var go=null;function kf(i){go===null?go=[i]:go.push(i)}function Dy(i,s,c,m){var v=s.interleaved;return v===null?(c.next=c,kf(s)):(c.next=v.next,v.next=c),s.interleaved=c,li(i,m)}function li(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Oi=!1;function Sf(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zy(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ai(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,c){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Je&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,li(i,c)}return v=m.interleaved,v===null?(s.next=s,kf(m)):(s.next=v.next,v.next=s),m.interleaved=s,li(i,c)}function yu(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,zd(i,c)}}function My(i,s){var c=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var v=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var P={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?v=w=P:w=w.next=P,c=c.next}while(c!==null);w===null?v=w=s:w=w.next=s}else v=w=s;c={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function vu(i,s,c,m){var v=i.updateQueue;Oi=!1;var w=v.firstBaseUpdate,P=v.lastBaseUpdate,z=v.shared.pending;if(z!==null){v.shared.pending=null;var U=z,re=U.next;U.next=null,P===null?w=re:P.next=re,P=U;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,z=fe.lastBaseUpdate,z!==P&&(z===null?fe.firstBaseUpdate=re:z.next=re,fe.lastBaseUpdate=U))}if(w!==null){var he=v.baseState;P=0,fe=re=U=null,z=w;do{var de=z.lane,_e=z.eventTime;if((m&de)===de){fe!==null&&(fe=fe.next={eventTime:_e,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Ne=i,Ie=z;switch(de=s,_e=c,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(_e,he,de);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ie.payload,de=typeof Ne=="function"?Ne.call(_e,he,de):Ne,de==null)break e;he=N({},he,de);break e;case 2:Oi=!0}}z.callback!==null&&z.lane!==0&&(i.flags|=64,de=v.effects,de===null?v.effects=[z]:de.push(z))}else _e={eventTime:_e,lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},fe===null?(re=fe=_e,U=he):fe=fe.next=_e,P|=de;if(z=z.next,z===null){if(z=v.shared.pending,z===null)break;de=z,z=de.next,de.next=null,v.lastBaseUpdate=de,v.shared.pending=null}}while(!0);if(fe===null&&(U=he),v.baseState=U,v.firstBaseUpdate=re,v.lastBaseUpdate=fe,s=v.shared.interleaved,s!==null){v=s;do P|=v.lane,v=v.next;while(v!==s)}else w===null&&(v.shared.lanes=0);xo|=P,i.lanes=P,i.memoizedState=he}}function Ly(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],v=m.callback;if(v!==null){if(m.callback=null,m=c,typeof v!="function")throw Error(n(191,v));v.call(m)}}}var Rl={},Vr=ji(Rl),jl=ji(Rl),Il=ji(Rl);function yo(i){if(i===Rl)throw Error(n(174));return i}function Cf(i,s){switch(pt(Il,s),pt(jl,i),pt(Vr,Rl),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ie(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ie(s,i)}vt(Vr),pt(Vr,s)}function hs(){vt(Vr),vt(jl),vt(Il)}function Fy(i){yo(Il.current);var s=yo(Vr.current),c=ie(s,i.type);s!==c&&(pt(jl,i),pt(Vr,c))}function Ef(i){jl.current===i&&(vt(Vr),vt(jl))}var kt=ji(0);function xu(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var _f=[];function Pf(){for(var i=0;i<_f.length;i++)_f[i]._workInProgressVersionPrimary=null;_f.length=0}var wu=I.ReactCurrentDispatcher,Tf=I.ReactCurrentBatchConfig,vo=0,St=null,Bt=null,qt=null,bu=!1,Al=!1,Ol=0,__=0;function un(){throw Error(n(321))}function Nf(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!wr(i[c],s[c]))return!1;return!0}function Rf(i,s,c,m,v,w){if(vo=w,St=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,wu.current=i===null||i.memoizedState===null?R_:j_,i=c(m,v),Al){w=0;do{if(Al=!1,Ol=0,25<=w)throw Error(n(301));w+=1,qt=Bt=null,s.updateQueue=null,wu.current=I_,i=c(m,v)}while(Al)}if(wu.current=Cu,s=Bt!==null&&Bt.next!==null,vo=0,qt=Bt=St=null,bu=!1,s)throw Error(n(300));return i}function jf(){var i=Ol!==0;return Ol=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?St.memoizedState=qt=i:qt=qt.next=i,qt}function ar(){if(Bt===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Bt.next;var s=qt===null?St.memoizedState:qt.next;if(s!==null)qt=s,Bt=i;else{if(i===null)throw Error(n(310));Bt=i,i={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},qt===null?St.memoizedState=qt=i:qt=qt.next=i}return qt}function Dl(i,s){return typeof s=="function"?s(i):s}function If(i){var s=ar(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=Bt,v=m.baseQueue,w=c.pending;if(w!==null){if(v!==null){var P=v.next;v.next=w.next,w.next=P}m.baseQueue=v=w,c.pending=null}if(v!==null){w=v.next,m=m.baseState;var z=P=null,U=null,re=w;do{var fe=re.lane;if((vo&fe)===fe)U!==null&&(U=U.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),m=re.hasEagerState?re.eagerState:i(m,re.action);else{var he={lane:fe,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};U===null?(z=U=he,P=m):U=U.next=he,St.lanes|=fe,xo|=fe}re=re.next}while(re!==null&&re!==w);U===null?P=m:U.next=z,wr(m,s.memoizedState)||(In=!0),s.memoizedState=m,s.baseState=P,s.baseQueue=U,c.lastRenderedState=m}if(i=c.interleaved,i!==null){v=i;do w=v.lane,St.lanes|=w,xo|=w,v=v.next;while(v!==i)}else v===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Af(i){var s=ar(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=c.dispatch,v=c.pending,w=s.memoizedState;if(v!==null){c.pending=null;var P=v=v.next;do w=i(w,P.action),P=P.next;while(P!==v);wr(w,s.memoizedState)||(In=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,m]}function $y(){}function Vy(i,s){var c=St,m=ar(),v=s(),w=!wr(m.memoizedState,v);if(w&&(m.memoizedState=v,In=!0),m=m.queue,Of(Hy.bind(null,c,m,i),[i]),m.getSnapshot!==s||w||qt!==null&&qt.memoizedState.tag&1){if(c.flags|=2048,zl(9,Uy.bind(null,c,m,v,s),void 0,null),Qt===null)throw Error(n(349));(vo&30)!==0||By(c,s,v)}return v}function By(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Uy(i,s,c,m){s.value=c,s.getSnapshot=m,Wy(s)&&Zy(i)}function Hy(i,s,c){return c(function(){Wy(s)&&Zy(i)})}function Wy(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!wr(i,c)}catch{return!0}}function Zy(i){var s=li(i,1);s!==null&&Er(s,i,1,-1)}function qy(i){var s=Br();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:i},s.queue=i,i=i.dispatch=N_.bind(null,St,i),[s.memoizedState,i]}function zl(i,s,c,m){return i={tag:i,create:s,destroy:c,deps:m,next:null},s=St.updateQueue,s===null?(s={lastEffect:null,stores:null},St.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(m=c.next,c.next=i,i.next=m,s.lastEffect=i)),i}function Qy(){return ar().memoizedState}function ku(i,s,c,m){var v=Br();St.flags|=i,v.memoizedState=zl(1|s,c,void 0,m===void 0?null:m)}function Su(i,s,c,m){var v=ar();m=m===void 0?null:m;var w=void 0;if(Bt!==null){var P=Bt.memoizedState;if(w=P.destroy,m!==null&&Nf(m,P.deps)){v.memoizedState=zl(s,c,w,m);return}}St.flags|=i,v.memoizedState=zl(1|s,c,w,m)}function Yy(i,s){return ku(8390656,8,i,s)}function Of(i,s){return Su(2048,8,i,s)}function Ky(i,s){return Su(4,2,i,s)}function Gy(i,s){return Su(4,4,i,s)}function Xy(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Jy(i,s,c){return c=c!=null?c.concat([i]):null,Su(4,4,Xy.bind(null,s,i),c)}function Df(){}function ev(i,s){var c=ar();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Nf(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function tv(i,s){var c=ar();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Nf(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function nv(i,s,c){return(vo&21)===0?(i.baseState&&(i.baseState=!1,In=!0),i.memoizedState=c):(wr(c,s)||(c=Ig(),St.lanes|=c,xo|=c,i.baseState=!0),s)}function P_(i,s){var c=ot;ot=c!==0&&4>c?c:4,i(!0);var m=Tf.transition;Tf.transition={};try{i(!1),s()}finally{ot=c,Tf.transition=m}}function rv(){return ar().memoizedState}function T_(i,s,c){var m=Fi(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},iv(i))ov(s,c);else if(c=Dy(i,s,c,m),c!==null){var v=yn();Er(c,i,m,v),sv(c,s,m)}}function N_(i,s,c){var m=Fi(i),v={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(iv(i))ov(s,v);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var P=s.lastRenderedState,z=w(P,c);if(v.hasEagerState=!0,v.eagerState=z,wr(z,P)){var U=s.interleaved;U===null?(v.next=v,kf(s)):(v.next=U.next,U.next=v),s.interleaved=v;return}}catch{}finally{}c=Dy(i,s,v,m),c!==null&&(v=yn(),Er(c,i,m,v),sv(c,s,m))}}function iv(i){var s=i.alternate;return i===St||s!==null&&s===St}function ov(i,s){Al=bu=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function sv(i,s,c){if((c&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,zd(i,c)}}var Cu={readContext:lr,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},R_={readContext:lr,useCallback:function(i,s){return Br().memoizedState=[i,s===void 0?null:s],i},useContext:lr,useEffect:Yy,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,ku(4194308,4,Xy.bind(null,s,i),c)},useLayoutEffect:function(i,s){return ku(4194308,4,i,s)},useInsertionEffect:function(i,s){return ku(4,2,i,s)},useMemo:function(i,s){var c=Br();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Br();return s=c!==void 0?c(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=T_.bind(null,St,i),[m.memoizedState,i]},useRef:function(i){var s=Br();return i={current:i},s.memoizedState=i},useState:qy,useDebugValue:Df,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=qy(!1),s=i[0];return i=P_.bind(null,i[1]),Br().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=St,v=Br();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Qt===null)throw Error(n(349));(vo&30)!==0||By(m,s,c)}v.memoizedState=c;var w={value:c,getSnapshot:s};return v.queue=w,Yy(Hy.bind(null,m,w,i),[i]),m.flags|=2048,zl(9,Uy.bind(null,m,w,c,s),void 0,null),c},useId:function(){var i=Br(),s=Qt.identifierPrefix;if(xt){var c=si,m=oi;c=(m&~(1<<32-xr(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ol++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=__++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},j_={readContext:lr,useCallback:ev,useContext:lr,useEffect:Of,useImperativeHandle:Jy,useInsertionEffect:Ky,useLayoutEffect:Gy,useMemo:tv,useReducer:If,useRef:Qy,useState:function(){return If(Dl)},useDebugValue:Df,useDeferredValue:function(i){var s=ar();return nv(s,Bt.memoizedState,i)},useTransition:function(){var i=If(Dl)[0],s=ar().memoizedState;return[i,s]},useMutableSource:$y,useSyncExternalStore:Vy,useId:rv,unstable_isNewReconciler:!1},I_={readContext:lr,useCallback:ev,useContext:lr,useEffect:Of,useImperativeHandle:Jy,useInsertionEffect:Ky,useLayoutEffect:Gy,useMemo:tv,useReducer:Af,useRef:Qy,useState:function(){return Af(Dl)},useDebugValue:Df,useDeferredValue:function(i){var s=ar();return Bt===null?s.memoizedState=i:nv(s,Bt.memoizedState,i)},useTransition:function(){var i=Af(Dl)[0],s=ar().memoizedState;return[i,s]},useMutableSource:$y,useSyncExternalStore:Vy,useId:rv,unstable_isNewReconciler:!1};function kr(i,s){if(i&&i.defaultProps){s=N({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function zf(i,s,c,m){s=i.memoizedState,c=c(m,s),c=c==null?s:N({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Eu={isMounted:function(i){return(i=i._reactInternals)?co(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Fi(i),w=ai(m,v);w.payload=s,c!=null&&(w.callback=c),s=Di(i,w,v),s!==null&&(Er(s,i,v,m),yu(s,i,v))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Fi(i),w=ai(m,v);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=Di(i,w,v),s!==null&&(Er(s,i,v,m),yu(s,i,v))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),m=Fi(i),v=ai(c,m);v.tag=2,s!=null&&(v.callback=s),s=Di(i,v,m),s!==null&&(Er(s,i,m,c),yu(s,i,m))}};function lv(i,s,c,m,v,w,P){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,P):s.prototype&&s.prototype.isPureReactComponent?!kl(c,m)||!kl(v,w):!0}function av(i,s,c){var m=!1,v=Ii,w=s.contextType;return typeof w=="object"&&w!==null?w=lr(w):(v=jn(s)?ho:an.current,m=s.contextTypes,w=(m=m!=null)?ss(i,v):Ii),s=new s(c,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Eu,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=v,i.__reactInternalMemoizedMaskedChildContext=w),s}function uv(i,s,c,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==i&&Eu.enqueueReplaceState(s,s.state,null)}function Mf(i,s,c,m){var v=i.stateNode;v.props=c,v.state=i.memoizedState,v.refs={},Sf(i);var w=s.contextType;typeof w=="object"&&w!==null?v.context=lr(w):(w=jn(s)?ho:an.current,v.context=ss(i,w)),v.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(zf(i,s,w,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(s=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),s!==v.state&&Eu.enqueueReplaceState(v,v.state,null),vu(i,c,v,m),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308)}function ps(i,s){try{var c="",m=s;do c+=ye(m),m=m.return;while(m);var v=c}catch(w){v=`
39
+ Error generating stack: `+w.message+`
40
+ `+w.stack}return{value:i,source:s,stack:v,digest:null}}function Lf(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Ff(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var A_=typeof WeakMap=="function"?WeakMap:Map;function cv(i,s,c){c=ai(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){Iu||(Iu=!0,eh=m),Ff(i,s)},c}function dv(i,s,c){c=ai(-1,c),c.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var v=s.value;c.payload=function(){return m(v)},c.callback=function(){Ff(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Ff(i,s),typeof m!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var P=s.stack;this.componentDidCatch(s.value,{componentStack:P!==null?P:""})}),c}function fv(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new A_;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(c)||(v.add(c),i=q_.bind(null,i,s,c),s.then(i,i))}function hv(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function pv(i,s,c,m,v){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=ai(-1,1),s.tag=2,Di(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=v,i)}var O_=I.ReactCurrentOwner,In=!1;function gn(i,s,c,m){s.child=i===null?Oy(s,null,c,m):cs(s,i.child,c,m)}function mv(i,s,c,m,v){c=c.render;var w=s.ref;return fs(s,v),m=Rf(i,s,c,m,w,v),c=jf(),i!==null&&!In?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,ui(i,s,v)):(xt&&c&&hf(s),s.flags|=1,gn(i,s,m,v),s.child)}function gv(i,s,c,m,v){if(i===null){var w=c.type;return typeof w=="function"&&!lh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,yv(i,s,w,m,v)):(i=Lu(c.type,null,m,s,s.mode,v),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&v)===0){var P=w.memoizedProps;if(c=c.compare,c=c!==null?c:kl,c(P,m)&&i.ref===s.ref)return ui(i,s,v)}return s.flags|=1,i=Vi(w,m),i.ref=s.ref,i.return=s,s.child=i}function yv(i,s,c,m,v){if(i!==null){var w=i.memoizedProps;if(kl(w,m)&&i.ref===s.ref)if(In=!1,s.pendingProps=m=w,(i.lanes&v)!==0)(i.flags&131072)!==0&&(In=!0);else return s.lanes=i.lanes,ui(i,s,v)}return $f(i,s,c,m,v)}function vv(i,s,c){var m=s.pendingProps,v=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(gs,Gn),Gn|=c;else{if((c&1073741824)===0)return i=w!==null?w.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,pt(gs,Gn),Gn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:c,pt(gs,Gn),Gn|=m}else w!==null?(m=w.baseLanes|c,s.memoizedState=null):m=c,pt(gs,Gn),Gn|=m;return gn(i,s,v,c),s.child}function xv(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function $f(i,s,c,m,v){var w=jn(c)?ho:an.current;return w=ss(s,w),fs(s,v),c=Rf(i,s,c,m,w,v),m=jf(),i!==null&&!In?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,ui(i,s,v)):(xt&&m&&hf(s),s.flags|=1,gn(i,s,c,v),s.child)}function wv(i,s,c,m,v){if(jn(c)){var w=!0;uu(s)}else w=!1;if(fs(s,v),s.stateNode===null)Pu(i,s),av(s,c,m),Mf(s,c,m,v),m=!0;else if(i===null){var P=s.stateNode,z=s.memoizedProps;P.props=z;var U=P.context,re=c.contextType;typeof re=="object"&&re!==null?re=lr(re):(re=jn(c)?ho:an.current,re=ss(s,re));var fe=c.getDerivedStateFromProps,he=typeof fe=="function"||typeof P.getSnapshotBeforeUpdate=="function";he||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(z!==m||U!==re)&&uv(s,P,m,re),Oi=!1;var de=s.memoizedState;P.state=de,vu(s,m,P,v),U=s.memoizedState,z!==m||de!==U||Rn.current||Oi?(typeof fe=="function"&&(zf(s,c,fe,m),U=s.memoizedState),(z=Oi||lv(s,c,z,m,de,U,re))?(he||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(s.flags|=4194308)):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=U),P.props=m,P.state=U,P.context=re,m=z):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{P=s.stateNode,zy(i,s),z=s.memoizedProps,re=s.type===s.elementType?z:kr(s.type,z),P.props=re,he=s.pendingProps,de=P.context,U=c.contextType,typeof U=="object"&&U!==null?U=lr(U):(U=jn(c)?ho:an.current,U=ss(s,U));var _e=c.getDerivedStateFromProps;(fe=typeof _e=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(z!==he||de!==U)&&uv(s,P,m,U),Oi=!1,de=s.memoizedState,P.state=de,vu(s,m,P,v);var Ne=s.memoizedState;z!==he||de!==Ne||Rn.current||Oi?(typeof _e=="function"&&(zf(s,c,_e,m),Ne=s.memoizedState),(re=Oi||lv(s,c,re,m,de,Ne,U)||!1)?(fe||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(m,Ne,U),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(m,Ne,U)),typeof P.componentDidUpdate=="function"&&(s.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof P.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Ne),P.props=m,P.state=Ne,P.context=U,m=re):(typeof P.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),m=!1)}return Vf(i,s,c,m,w,v)}function Vf(i,s,c,m,v,w){xv(i,s);var P=(s.flags&128)!==0;if(!m&&!P)return v&&Ey(s,c,!1),ui(i,s,w);m=s.stateNode,O_.current=s;var z=P&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&P?(s.child=cs(s,i.child,null,w),s.child=cs(s,null,z,w)):gn(i,s,z,w),s.memoizedState=m.state,v&&Ey(s,c,!0),s.child}function bv(i){var s=i.stateNode;s.pendingContext?Sy(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Sy(i,s.context,!1),Cf(i,s.containerInfo)}function kv(i,s,c,m,v){return us(),yf(v),s.flags|=256,gn(i,s,c,m),s.child}var Bf={dehydrated:null,treeContext:null,retryLane:0};function Uf(i){return{baseLanes:i,cachePool:null,transitions:null}}function Sv(i,s,c){var m=s.pendingProps,v=kt.current,w=!1,P=(s.flags&128)!==0,z;if((z=P)||(z=i!==null&&i.memoizedState===null?!1:(v&2)!==0),z?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(v|=1),pt(kt,v&1),i===null)return gf(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(P=m.children,i=m.fallback,w?(m=s.mode,w=s.child,P={mode:"hidden",children:P},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=P):w=Fu(P,m,0,null),i=So(i,m,c,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=Uf(c),s.memoizedState=Bf,i):Hf(s,P));if(v=i.memoizedState,v!==null&&(z=v.dehydrated,z!==null))return D_(i,s,P,m,z,v,c);if(w){w=m.fallback,P=s.mode,v=i.child,z=v.sibling;var U={mode:"hidden",children:m.children};return(P&1)===0&&s.child!==v?(m=s.child,m.childLanes=0,m.pendingProps=U,s.deletions=null):(m=Vi(v,U),m.subtreeFlags=v.subtreeFlags&14680064),z!==null?w=Vi(z,w):(w=So(w,P,c,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,P=i.child.memoizedState,P=P===null?Uf(c):{baseLanes:P.baseLanes|c,cachePool:null,transitions:P.transitions},w.memoizedState=P,w.childLanes=i.childLanes&~c,s.memoizedState=Bf,m}return w=i.child,i=w.sibling,m=Vi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=c),m.return=s,m.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=m,s.memoizedState=null,m}function Hf(i,s){return s=Fu({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function _u(i,s,c,m){return m!==null&&yf(m),cs(s,i.child,null,c),i=Hf(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function D_(i,s,c,m,v,w,P){if(c)return s.flags&256?(s.flags&=-257,m=Lf(Error(n(422))),_u(i,s,P,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,v=s.mode,m=Fu({mode:"visible",children:m.children},v,0,null),w=So(w,v,P,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&cs(s,i.child,null,P),s.child.memoizedState=Uf(P),s.memoizedState=Bf,w);if((s.mode&1)===0)return _u(i,s,P,null);if(v.data==="$!"){if(m=v.nextSibling&&v.nextSibling.dataset,m)var z=m.dgst;return m=z,w=Error(n(419)),m=Lf(w,m,void 0),_u(i,s,P,m)}if(z=(P&i.childLanes)!==0,In||z){if(m=Qt,m!==null){switch(P&-P){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(m.suspendedLanes|P))!==0?0:v,v!==0&&v!==w.retryLane&&(w.retryLane=v,li(i,v),Er(m,i,v,-1))}return sh(),m=Lf(Error(n(421))),_u(i,s,P,m)}return v.data==="$?"?(s.flags|=128,s.child=i.child,s=Q_.bind(null,i),v._reactRetry=s,null):(i=w.treeContext,Kn=Ri(v.nextSibling),Yn=s,xt=!0,br=null,i!==null&&(or[sr++]=oi,or[sr++]=si,or[sr++]=po,oi=i.id,si=i.overflow,po=s),s=Hf(s,m.children),s.flags|=4096,s)}function Cv(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),bf(i.return,s,c)}function Wf(i,s,c,m,v){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:v}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=c,w.tailMode=v)}function Ev(i,s,c){var m=s.pendingProps,v=m.revealOrder,w=m.tail;if(gn(i,s,m.children,c),m=kt.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Cv(i,c,s);else if(i.tag===19)Cv(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(pt(kt,m),(s.mode&1)===0)s.memoizedState=null;else switch(v){case"forwards":for(c=s.child,v=null;c!==null;)i=c.alternate,i!==null&&xu(i)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Wf(s,!1,v,c,w);break;case"backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(i=v.alternate,i!==null&&xu(i)===null){s.child=v;break}i=v.sibling,v.sibling=c,c=v,v=i}Wf(s,!0,c,null,w);break;case"together":Wf(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Pu(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ui(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),xo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Vi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Vi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function z_(i,s,c){switch(s.tag){case 3:bv(s),us();break;case 5:Fy(s);break;case 1:jn(s.type)&&uu(s);break;case 4:Cf(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,v=s.memoizedProps.value;pt(mu,m._currentValue),m._currentValue=v;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(pt(kt,kt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?Sv(i,s,c):(pt(kt,kt.current&1),i=ui(i,s,c),i!==null?i.sibling:null);pt(kt,kt.current&1);break;case 19:if(m=(c&s.childLanes)!==0,(i.flags&128)!==0){if(m)return Ev(i,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),pt(kt,kt.current),m)break;return null;case 22:case 23:return s.lanes=0,vv(i,s,c)}return ui(i,s,c)}var _v,Zf,Pv,Tv;_v=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Zf=function(){},Pv=function(i,s,c,m){var v=i.memoizedProps;if(v!==m){i=s.stateNode,yo(Vr.current);var w=null;switch(c){case"input":v=At(i,v),m=At(i,m),w=[];break;case"select":v=N({},v,{value:void 0}),m=N({},m,{value:void 0}),w=[];break;case"textarea":v=J(i,v),m=J(i,m),w=[];break;default:typeof v.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=su)}ht(c,m);var P;c=null;for(re in v)if(!m.hasOwnProperty(re)&&v.hasOwnProperty(re)&&v[re]!=null)if(re==="style"){var z=v[re];for(P in z)z.hasOwnProperty(P)&&(c||(c={}),c[P]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(o.hasOwnProperty(re)?w||(w=[]):(w=w||[]).push(re,null));for(re in m){var U=m[re];if(z=v!=null?v[re]:void 0,m.hasOwnProperty(re)&&U!==z&&(U!=null||z!=null))if(re==="style")if(z){for(P in z)!z.hasOwnProperty(P)||U&&U.hasOwnProperty(P)||(c||(c={}),c[P]="");for(P in U)U.hasOwnProperty(P)&&z[P]!==U[P]&&(c||(c={}),c[P]=U[P])}else c||(w||(w=[]),w.push(re,c)),c=U;else re==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,z=z?z.__html:void 0,U!=null&&z!==U&&(w=w||[]).push(re,U)):re==="children"?typeof U!="string"&&typeof U!="number"||(w=w||[]).push(re,""+U):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(o.hasOwnProperty(re)?(U!=null&&re==="onScroll"&&yt("scroll",i),w||z===U||(w=[])):(w=w||[]).push(re,U))}c&&(w=w||[]).push("style",c);var re=w;(s.updateQueue=re)&&(s.flags|=4)}},Tv=function(i,s,c,m){c!==m&&(s.flags|=4)};function Ml(i,s){if(!xt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function cn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,m=0;if(s)for(var v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags&14680064,m|=v.flags&14680064,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)c|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=m,i.childLanes=c,s}function M_(i,s,c){var m=s.pendingProps;switch(pf(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(s),null;case 1:return jn(s.type)&&au(),cn(s),null;case 3:return m=s.stateNode,hs(),vt(Rn),vt(an),Pf(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(hu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,br!==null&&(rh(br),br=null))),Zf(i,s),cn(s),null;case 5:Ef(s);var v=yo(Il.current);if(c=s.type,i!==null&&s.stateNode!=null)Pv(i,s,c,m,v),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(n(166));return cn(s),null}if(i=yo(Vr.current),hu(s)){m=s.stateNode,c=s.type;var w=s.memoizedProps;switch(m[$r]=s,m[Pl]=w,i=(s.mode&1)!==0,c){case"dialog":yt("cancel",m),yt("close",m);break;case"iframe":case"object":case"embed":yt("load",m);break;case"video":case"audio":for(v=0;v<Cl.length;v++)yt(Cl[v],m);break;case"source":yt("error",m);break;case"img":case"image":case"link":yt("error",m),yt("load",m);break;case"details":yt("toggle",m);break;case"input":sn(m,w),yt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},yt("invalid",m);break;case"textarea":se(m,w),yt("invalid",m)}ht(c,w),v=null;for(var P in w)if(w.hasOwnProperty(P)){var z=w[P];P==="children"?typeof z=="string"?m.textContent!==z&&(w.suppressHydrationWarning!==!0&&ou(m.textContent,z,i),v=["children",z]):typeof z=="number"&&m.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&ou(m.textContent,z,i),v=["children",""+z]):o.hasOwnProperty(P)&&z!=null&&P==="onScroll"&&yt("scroll",m)}switch(c){case"input":Ae(m),ir(m,w,!0);break;case"textarea":Ae(m),ge(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=su)}m=v,s.updateQueue=m,m!==null&&(s.flags|=4)}else{P=v.nodeType===9?v:v.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=$(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=P.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=P.createElement(c,{is:m.is}):(i=P.createElement(c),c==="select"&&(P=i,m.multiple?P.multiple=!0:m.size&&(P.size=m.size))):i=P.createElementNS(i,c),i[$r]=s,i[Pl]=m,_v(i,s,!1,!1),s.stateNode=i;e:{switch(P=pn(c,m),c){case"dialog":yt("cancel",i),yt("close",i),v=m;break;case"iframe":case"object":case"embed":yt("load",i),v=m;break;case"video":case"audio":for(v=0;v<Cl.length;v++)yt(Cl[v],i);v=m;break;case"source":yt("error",i),v=m;break;case"img":case"image":case"link":yt("error",i),yt("load",i),v=m;break;case"details":yt("toggle",i),v=m;break;case"input":sn(i,m),v=At(i,m),yt("invalid",i);break;case"option":v=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},v=N({},m,{value:void 0}),yt("invalid",i);break;case"textarea":se(i,m),v=J(i,m),yt("invalid",i);break;default:v=m}ht(c,v),z=v;for(w in z)if(z.hasOwnProperty(w)){var U=z[w];w==="style"?Vt(i,U):w==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ee(i,U)):w==="children"?typeof U=="string"?(c!=="textarea"||U!=="")&&De(i,U):typeof U=="number"&&De(i,""+U):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?U!=null&&w==="onScroll"&&yt("scroll",i):U!=null&&T(i,w,U,P))}switch(c){case"input":Ae(i),ir(i,m,!1);break;case"textarea":Ae(i),ge(i);break;case"option":m.value!=null&&i.setAttribute("value",""+ve(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?F(i,!!m.multiple,w,!1):m.defaultValue!=null&&F(i,!!m.multiple,m.defaultValue,!0);break;default:typeof v.onClick=="function"&&(i.onclick=su)}switch(c){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return cn(s),null;case 6:if(i&&s.stateNode!=null)Tv(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(c=yo(Il.current),yo(Vr.current),hu(s)){if(m=s.stateNode,c=s.memoizedProps,m[$r]=s,(w=m.nodeValue!==c)&&(i=Yn,i!==null))switch(i.tag){case 3:ou(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ou(m.nodeValue,c,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[$r]=s,s.stateNode=m}return cn(s),null;case 13:if(vt(kt),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&Kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)jy(),us(),s.flags|=98560,w=!1;else if(w=hu(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[$r]=s}else us(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),w=!1}else br!==null&&(rh(br),br=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(kt.current&1)!==0?Ut===0&&(Ut=3):sh())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return hs(),Zf(i,s),i===null&&El(s.stateNode.containerInfo),cn(s),null;case 10:return wf(s.type._context),cn(s),null;case 17:return jn(s.type)&&au(),cn(s),null;case 19:if(vt(kt),w=s.memoizedState,w===null)return cn(s),null;if(m=(s.flags&128)!==0,P=w.rendering,P===null)if(m)Ml(w,!1);else{if(Ut!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(P=xu(i),P!==null){for(s.flags|=128,Ml(w,!1),m=P.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=c,c=s.child;c!==null;)w=c,i=m,w.flags&=14680066,P=w.alternate,P===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=P.childLanes,w.lanes=P.lanes,w.child=P.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=P.memoizedProps,w.memoizedState=P.memoizedState,w.updateQueue=P.updateQueue,w.type=P.type,i=P.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return pt(kt,kt.current&1|2),s.child}i=i.sibling}w.tail!==null&&jt()>ys&&(s.flags|=128,m=!0,Ml(w,!1),s.lanes=4194304)}else{if(!m)if(i=xu(P),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Ml(w,!0),w.tail===null&&w.tailMode==="hidden"&&!P.alternate&&!xt)return cn(s),null}else 2*jt()-w.renderingStartTime>ys&&c!==1073741824&&(s.flags|=128,m=!0,Ml(w,!1),s.lanes=4194304);w.isBackwards?(P.sibling=s.child,s.child=P):(c=w.last,c!==null?c.sibling=P:s.child=P,w.last=P)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=jt(),s.sibling=null,c=kt.current,pt(kt,m?c&1|2:c&1),s):(cn(s),null);case 22:case 23:return oh(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Gn&1073741824)!==0&&(cn(s),s.subtreeFlags&6&&(s.flags|=8192)):cn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function L_(i,s){switch(pf(s),s.tag){case 1:return jn(s.type)&&au(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return hs(),vt(Rn),vt(an),Pf(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Ef(s),null;case 13:if(vt(kt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));us()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(kt),null;case 4:return hs(),null;case 10:return wf(s.type._context),null;case 22:case 23:return oh(),null;case 24:return null;default:return null}}var Tu=!1,dn=!1,F_=typeof WeakSet=="function"?WeakSet:Set,Te=null;function ms(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Tt(i,s,m)}else c.current=null}function qf(i,s,c){try{c()}catch(m){Tt(i,s,m)}}var Nv=!1;function $_(i,s){if(of=Qa,i=ly(),Kd(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var v=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var P=0,z=-1,U=-1,re=0,fe=0,he=i,de=null;t:for(;;){for(var _e;he!==c||v!==0&&he.nodeType!==3||(z=P+v),he!==w||m!==0&&he.nodeType!==3||(U=P+m),he.nodeType===3&&(P+=he.nodeValue.length),(_e=he.firstChild)!==null;)de=he,he=_e;for(;;){if(he===i)break t;if(de===c&&++re===v&&(z=P),de===w&&++fe===m&&(U=P),(_e=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=_e}c=z===-1||U===-1?null:{start:z,end:U}}else c=null}c=c||{start:0,end:0}}else c=null;for(sf={focusedElem:i,selectionRange:c},Qa=!1,Te=s;Te!==null;)if(s=Te,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Te=i;else for(;Te!==null;){s=Te;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ie=Ne.memoizedProps,It=Ne.memoizedState,X=s.stateNode,Z=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:kr(s.type,Ie),It);X.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:var te=s.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){Tt(s,s.return,me)}if(i=s.sibling,i!==null){i.return=s.return,Te=i;break}Te=s.return}return Ne=Nv,Nv=!1,Ne}function Ll(i,s,c){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var v=m=m.next;do{if((v.tag&i)===i){var w=v.destroy;v.destroy=void 0,w!==void 0&&qf(s,c,w)}v=v.next}while(v!==m)}}function Nu(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var m=c.create;c.destroy=m()}c=c.next}while(c!==s)}}function Qf(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function Rv(i){var s=i.alternate;s!==null&&(i.alternate=null,Rv(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[$r],delete s[Pl],delete s[cf],delete s[k_],delete s[S_])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function jv(i){return i.tag===5||i.tag===3||i.tag===4}function Iv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||jv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Yf(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=su));else if(m!==4&&(i=i.child,i!==null))for(Yf(i,s,c),i=i.sibling;i!==null;)Yf(i,s,c),i=i.sibling}function Kf(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(Kf(i,s,c),i=i.sibling;i!==null;)Kf(i,s,c),i=i.sibling}var en=null,Sr=!1;function zi(i,s,c){for(c=c.child;c!==null;)Av(i,s,c),c=c.sibling}function Av(i,s,c){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Ba,c)}catch{}switch(c.tag){case 5:dn||ms(c,s);case 6:var m=en,v=Sr;en=null,zi(i,s,c),en=m,Sr=v,en!==null&&(Sr?(i=en,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(Sr?(i=en,c=c.stateNode,i.nodeType===8?uf(i.parentNode,c):i.nodeType===1&&uf(i,c),gl(i)):uf(en,c.stateNode));break;case 4:m=en,v=Sr,en=c.stateNode.containerInfo,Sr=!0,zi(i,s,c),en=m,Sr=v;break;case 0:case 11:case 14:case 15:if(!dn&&(m=c.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){v=m=m.next;do{var w=v,P=w.destroy;w=w.tag,P!==void 0&&((w&2)!==0||(w&4)!==0)&&qf(c,s,P),v=v.next}while(v!==m)}zi(i,s,c);break;case 1:if(!dn&&(ms(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(z){Tt(c,s,z)}zi(i,s,c);break;case 21:zi(i,s,c);break;case 22:c.mode&1?(dn=(m=dn)||c.memoizedState!==null,zi(i,s,c),dn=m):zi(i,s,c);break;default:zi(i,s,c)}}function Ov(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new F_),s.forEach(function(m){var v=Y_.bind(null,i,m);c.has(m)||(c.add(m),m.then(v,v))})}}function Cr(i,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var v=c[m];try{var w=i,P=s,z=P;e:for(;z!==null;){switch(z.tag){case 5:en=z.stateNode,Sr=!1;break e;case 3:en=z.stateNode.containerInfo,Sr=!0;break e;case 4:en=z.stateNode.containerInfo,Sr=!0;break e}z=z.return}if(en===null)throw Error(n(160));Av(w,P,v),en=null,Sr=!1;var U=v.alternate;U!==null&&(U.return=null),v.return=null}catch(re){Tt(v,s,re)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Dv(s,i),s=s.sibling}function Dv(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Cr(s,i),Ur(i),m&4){try{Ll(3,i,i.return),Nu(3,i)}catch(Ie){Tt(i,i.return,Ie)}try{Ll(5,i,i.return)}catch(Ie){Tt(i,i.return,Ie)}}break;case 1:Cr(s,i),Ur(i),m&512&&c!==null&&ms(c,c.return);break;case 5:if(Cr(s,i),Ur(i),m&512&&c!==null&&ms(c,c.return),i.flags&32){var v=i.stateNode;try{De(v,"")}catch(Ie){Tt(i,i.return,Ie)}}if(m&4&&(v=i.stateNode,v!=null)){var w=i.memoizedProps,P=c!==null?c.memoizedProps:w,z=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&Gt(v,w),pn(z,P);var re=pn(z,w);for(P=0;P<U.length;P+=2){var fe=U[P],he=U[P+1];fe==="style"?Vt(v,he):fe==="dangerouslySetInnerHTML"?Ee(v,he):fe==="children"?De(v,he):T(v,fe,he,re)}switch(z){case"input":ln(v,w);break;case"textarea":be(v,w);break;case"select":var de=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!w.multiple;var _e=w.value;_e!=null?F(v,!!w.multiple,_e,!1):de!==!!w.multiple&&(w.defaultValue!=null?F(v,!!w.multiple,w.defaultValue,!0):F(v,!!w.multiple,w.multiple?[]:"",!1))}v[Pl]=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 6:if(Cr(s,i),Ur(i),m&4){if(i.stateNode===null)throw Error(n(162));v=i.stateNode,w=i.memoizedProps;try{v.nodeValue=w}catch(Ie){Tt(i,i.return,Ie)}}break;case 3:if(Cr(s,i),Ur(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{gl(s.containerInfo)}catch(Ie){Tt(i,i.return,Ie)}break;case 4:Cr(s,i),Ur(i);break;case 13:Cr(s,i),Ur(i),v=i.child,v.flags&8192&&(w=v.memoizedState!==null,v.stateNode.isHidden=w,!w||v.alternate!==null&&v.alternate.memoizedState!==null||(Jf=jt())),m&4&&Ov(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(re=dn)||fe,Cr(s,i),dn=re):Cr(s,i),Ur(i),m&8192){if(re=i.memoizedState!==null,(i.stateNode.isHidden=re)&&!fe&&(i.mode&1)!==0)for(Te=i,fe=i.child;fe!==null;){for(he=Te=fe;Te!==null;){switch(de=Te,_e=de.child,de.tag){case 0:case 11:case 14:case 15:Ll(4,de,de.return);break;case 1:ms(de,de.return);var Ne=de.stateNode;if(typeof Ne.componentWillUnmount=="function"){m=de,c=de.return;try{s=m,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ie){Tt(m,c,Ie)}}break;case 5:ms(de,de.return);break;case 22:if(de.memoizedState!==null){Lv(he);continue}}_e!==null?(_e.return=de,Te=_e):Lv(he)}fe=fe.sibling}e:for(fe=null,he=i;;){if(he.tag===5){if(fe===null){fe=he;try{v=he.stateNode,re?(w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=he.stateNode,U=he.memoizedProps.style,P=U!=null&&U.hasOwnProperty("display")?U.display:null,z.style.display=Zt("display",P))}catch(Ie){Tt(i,i.return,Ie)}}}else if(he.tag===6){if(fe===null)try{he.stateNode.nodeValue=re?"":he.memoizedProps}catch(Ie){Tt(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;fe===he&&(fe=null),he=he.return}fe===he&&(fe=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Cr(s,i),Ur(i),m&4&&Ov(i);break;case 21:break;default:Cr(s,i),Ur(i)}}function Ur(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(jv(c)){var m=c;break e}c=c.return}throw Error(n(160))}switch(m.tag){case 5:var v=m.stateNode;m.flags&32&&(De(v,""),m.flags&=-33);var w=Iv(i);Kf(i,w,v);break;case 3:case 4:var P=m.stateNode.containerInfo,z=Iv(i);Yf(i,z,P);break;default:throw Error(n(161))}}catch(U){Tt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function V_(i,s,c){Te=i,zv(i)}function zv(i,s,c){for(var m=(i.mode&1)!==0;Te!==null;){var v=Te,w=v.child;if(v.tag===22&&m){var P=v.memoizedState!==null||Tu;if(!P){var z=v.alternate,U=z!==null&&z.memoizedState!==null||dn;z=Tu;var re=dn;if(Tu=P,(dn=U)&&!re)for(Te=v;Te!==null;)P=Te,U=P.child,P.tag===22&&P.memoizedState!==null?Fv(v):U!==null?(U.return=P,Te=U):Fv(v);for(;w!==null;)Te=w,zv(w),w=w.sibling;Te=v,Tu=z,dn=re}Mv(i)}else(v.subtreeFlags&8772)!==0&&w!==null?(w.return=v,Te=w):Mv(i)}}function Mv(i){for(;Te!==null;){var s=Te;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||Nu(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!dn)if(c===null)m.componentDidMount();else{var v=s.elementType===s.type?c.memoizedProps:kr(s.type,c.memoizedProps);m.componentDidUpdate(v,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Ly(s,w,m);break;case 3:var P=s.updateQueue;if(P!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Ly(s,P,c)}break;case 5:var z=s.stateNode;if(c===null&&s.flags&4){c=z;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&c.focus();break;case"img":U.src&&(c.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var re=s.alternate;if(re!==null){var fe=re.memoizedState;if(fe!==null){var he=fe.dehydrated;he!==null&&gl(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Qf(s)}catch(de){Tt(s,s.return,de)}}if(s===i){Te=null;break}if(c=s.sibling,c!==null){c.return=s.return,Te=c;break}Te=s.return}}function Lv(i){for(;Te!==null;){var s=Te;if(s===i){Te=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Te=c;break}Te=s.return}}function Fv(i){for(;Te!==null;){var s=Te;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Nu(4,s)}catch(U){Tt(s,c,U)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var v=s.return;try{m.componentDidMount()}catch(U){Tt(s,v,U)}}var w=s.return;try{Qf(s)}catch(U){Tt(s,w,U)}break;case 5:var P=s.return;try{Qf(s)}catch(U){Tt(s,P,U)}}}catch(U){Tt(s,s.return,U)}if(s===i){Te=null;break}var z=s.sibling;if(z!==null){z.return=s.return,Te=z;break}Te=s.return}}var B_=Math.ceil,Ru=I.ReactCurrentDispatcher,Gf=I.ReactCurrentOwner,ur=I.ReactCurrentBatchConfig,Je=0,Qt=null,Ot=null,tn=0,Gn=0,gs=ji(0),Ut=0,Fl=null,xo=0,ju=0,Xf=0,$l=null,An=null,Jf=0,ys=1/0,ci=null,Iu=!1,eh=null,Mi=null,Au=!1,Li=null,Ou=0,Vl=0,th=null,Du=-1,zu=0;function yn(){return(Je&6)!==0?jt():Du!==-1?Du:Du=jt()}function Fi(i){return(i.mode&1)===0?1:(Je&2)!==0&&tn!==0?tn&-tn:E_.transition!==null?(zu===0&&(zu=Ig()),zu):(i=ot,i!==0||(i=window.event,i=i===void 0?16:Vg(i.type)),i)}function Er(i,s,c,m){if(50<Vl)throw Vl=0,th=null,Error(n(185));dl(i,c,m),((Je&2)===0||i!==Qt)&&(i===Qt&&((Je&2)===0&&(ju|=c),Ut===4&&$i(i,tn)),On(i,m),c===1&&Je===0&&(s.mode&1)===0&&(ys=jt()+500,cu&&Ai()))}function On(i,s){var c=i.callbackNode;EE(i,s);var m=Wa(i,i===Qt?tn:0);if(m===0)c!==null&&Ng(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&Ng(c),s===1)i.tag===0?C_(Vv.bind(null,i)):_y(Vv.bind(null,i)),w_(function(){(Je&6)===0&&Ai()}),c=null;else{switch(Ag(m)){case 1:c=Ad;break;case 4:c=Rg;break;case 16:c=Va;break;case 536870912:c=jg;break;default:c=Va}c=Yv(c,$v.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function $v(i,s){if(Du=-1,zu=0,(Je&6)!==0)throw Error(n(327));var c=i.callbackNode;if(vs()&&i.callbackNode!==c)return null;var m=Wa(i,i===Qt?tn:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=Mu(i,m);else{s=m;var v=Je;Je|=2;var w=Uv();(Qt!==i||tn!==s)&&(ci=null,ys=jt()+500,bo(i,s));do try{W_();break}catch(z){Bv(i,z)}while(!0);xf(),Ru.current=w,Je=v,Ot!==null?s=0:(Qt=null,tn=0,s=Ut)}if(s!==0){if(s===2&&(v=Od(i),v!==0&&(m=v,s=nh(i,v))),s===1)throw c=Fl,bo(i,0),$i(i,m),On(i,jt()),c;if(s===6)$i(i,m);else{if(v=i.current.alternate,(m&30)===0&&!U_(v)&&(s=Mu(i,m),s===2&&(w=Od(i),w!==0&&(m=w,s=nh(i,w))),s===1))throw c=Fl,bo(i,0),$i(i,m),On(i,jt()),c;switch(i.finishedWork=v,i.finishedLanes=m,s){case 0:case 1:throw Error(n(345));case 2:ko(i,An,ci);break;case 3:if($i(i,m),(m&130023424)===m&&(s=Jf+500-jt(),10<s)){if(Wa(i,0)!==0)break;if(v=i.suspendedLanes,(v&m)!==m){yn(),i.pingedLanes|=i.suspendedLanes&v;break}i.timeoutHandle=af(ko.bind(null,i,An,ci),s);break}ko(i,An,ci);break;case 4:if($i(i,m),(m&4194240)===m)break;for(s=i.eventTimes,v=-1;0<m;){var P=31-xr(m);w=1<<P,P=s[P],P>v&&(v=P),m&=~w}if(m=v,m=jt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*B_(m/1960))-m,10<m){i.timeoutHandle=af(ko.bind(null,i,An,ci),m);break}ko(i,An,ci);break;case 5:ko(i,An,ci);break;default:throw Error(n(329))}}}return On(i,jt()),i.callbackNode===c?$v.bind(null,i):null}function nh(i,s){var c=$l;return i.current.memoizedState.isDehydrated&&(bo(i,s).flags|=256),i=Mu(i,s),i!==2&&(s=An,An=c,s!==null&&rh(s)),i}function rh(i){An===null?An=i:An.push.apply(An,i)}function U_(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var m=0;m<c.length;m++){var v=c[m],w=v.getSnapshot;v=v.value;try{if(!wr(w(),v))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function $i(i,s){for(s&=~Xf,s&=~ju,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-xr(s),m=1<<c;i[c]=-1,s&=~m}}function Vv(i){if((Je&6)!==0)throw Error(n(327));vs();var s=Wa(i,0);if((s&1)===0)return On(i,jt()),null;var c=Mu(i,s);if(i.tag!==0&&c===2){var m=Od(i);m!==0&&(s=m,c=nh(i,m))}if(c===1)throw c=Fl,bo(i,0),$i(i,s),On(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,ko(i,An,ci),On(i,jt()),null}function ih(i,s){var c=Je;Je|=1;try{return i(s)}finally{Je=c,Je===0&&(ys=jt()+500,cu&&Ai())}}function wo(i){Li!==null&&Li.tag===0&&(Je&6)===0&&vs();var s=Je;Je|=1;var c=ur.transition,m=ot;try{if(ur.transition=null,ot=1,i)return i()}finally{ot=m,ur.transition=c,Je=s,(Je&6)===0&&Ai()}}function oh(){Gn=gs.current,vt(gs)}function bo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,x_(c)),Ot!==null)for(c=Ot.return;c!==null;){var m=c;switch(pf(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&au();break;case 3:hs(),vt(Rn),vt(an),Pf();break;case 5:Ef(m);break;case 4:hs();break;case 13:vt(kt);break;case 19:vt(kt);break;case 10:wf(m.type._context);break;case 22:case 23:oh()}c=c.return}if(Qt=i,Ot=i=Vi(i.current,null),tn=Gn=s,Ut=0,Fl=null,Xf=ju=xo=0,An=$l=null,go!==null){for(s=0;s<go.length;s++)if(c=go[s],m=c.interleaved,m!==null){c.interleaved=null;var v=m.next,w=c.pending;if(w!==null){var P=w.next;w.next=v,m.next=P}c.pending=m}go=null}return i}function Bv(i,s){do{var c=Ot;try{if(xf(),wu.current=Cu,bu){for(var m=St.memoizedState;m!==null;){var v=m.queue;v!==null&&(v.pending=null),m=m.next}bu=!1}if(vo=0,qt=Bt=St=null,Al=!1,Ol=0,Gf.current=null,c===null||c.return===null){Ut=1,Fl=s,Ot=null;break}e:{var w=i,P=c.return,z=c,U=s;if(s=tn,z.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=U,fe=z,he=fe.tag;if((fe.mode&1)===0&&(he===0||he===11||he===15)){var de=fe.alternate;de?(fe.updateQueue=de.updateQueue,fe.memoizedState=de.memoizedState,fe.lanes=de.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var _e=hv(P);if(_e!==null){_e.flags&=-257,pv(_e,P,z,w,s),_e.mode&1&&fv(w,re,s),s=_e,U=re;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(U),s.updateQueue=Ie}else Ne.add(U);break e}else{if((s&1)===0){fv(w,re,s),sh();break e}U=Error(n(426))}}else if(xt&&z.mode&1){var It=hv(P);if(It!==null){(It.flags&65536)===0&&(It.flags|=256),pv(It,P,z,w,s),yf(ps(U,z));break e}}w=U=ps(U,z),Ut!==4&&(Ut=2),$l===null?$l=[w]:$l.push(w),w=P;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=cv(w,U,s);My(w,X);break e;case 1:z=U;var Z=w.type,te=w.stateNode;if((w.flags&128)===0&&(typeof Z.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Mi===null||!Mi.has(te)))){w.flags|=65536,s&=-s,w.lanes|=s;var me=dv(w,z,s);My(w,me);break e}}w=w.return}while(w!==null)}Wv(c)}catch(Oe){s=Oe,Ot===c&&c!==null&&(Ot=c=c.return);continue}break}while(!0)}function Uv(){var i=Ru.current;return Ru.current=Cu,i===null?Cu:i}function sh(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Qt===null||(xo&268435455)===0&&(ju&268435455)===0||$i(Qt,tn)}function Mu(i,s){var c=Je;Je|=2;var m=Uv();(Qt!==i||tn!==s)&&(ci=null,bo(i,s));do try{H_();break}catch(v){Bv(i,v)}while(!0);if(xf(),Je=c,Ru.current=m,Ot!==null)throw Error(n(261));return Qt=null,tn=0,Ut}function H_(){for(;Ot!==null;)Hv(Ot)}function W_(){for(;Ot!==null&&!gE();)Hv(Ot)}function Hv(i){var s=Qv(i.alternate,i,Gn);i.memoizedProps=i.pendingProps,s===null?Wv(i):Ot=s,Gf.current=null}function Wv(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=M_(c,s,Gn),c!==null){Ot=c;return}}else{if(c=L_(c,s),c!==null){c.flags&=32767,Ot=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ut=6,Ot=null;return}}if(s=s.sibling,s!==null){Ot=s;return}Ot=s=i}while(s!==null);Ut===0&&(Ut=5)}function ko(i,s,c){var m=ot,v=ur.transition;try{ur.transition=null,ot=1,Z_(i,s,c,m)}finally{ur.transition=v,ot=m}return null}function Z_(i,s,c,m){do vs();while(Li!==null);if((Je&6)!==0)throw Error(n(327));c=i.finishedWork;var v=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var w=c.lanes|c.childLanes;if(_E(i,w),i===Qt&&(Ot=Qt=null,tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Au||(Au=!0,Yv(Va,function(){return vs(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=ur.transition,ur.transition=null;var P=ot;ot=1;var z=Je;Je|=4,Gf.current=null,$_(i,c),Dv(c,i),f_(sf),Qa=!!of,sf=of=null,i.current=c,V_(c),yE(),Je=z,ot=P,ur.transition=w}else i.current=c;if(Au&&(Au=!1,Li=i,Ou=v),w=i.pendingLanes,w===0&&(Mi=null),wE(c.stateNode),On(i,jt()),s!==null)for(m=i.onRecoverableError,c=0;c<s.length;c++)v=s[c],m(v.value,{componentStack:v.stack,digest:v.digest});if(Iu)throw Iu=!1,i=eh,eh=null,i;return(Ou&1)!==0&&i.tag!==0&&vs(),w=i.pendingLanes,(w&1)!==0?i===th?Vl++:(Vl=0,th=i):Vl=0,Ai(),null}function vs(){if(Li!==null){var i=Ag(Ou),s=ur.transition,c=ot;try{if(ur.transition=null,ot=16>i?16:i,Li===null)var m=!1;else{if(i=Li,Li=null,Ou=0,(Je&6)!==0)throw Error(n(331));var v=Je;for(Je|=4,Te=i.current;Te!==null;){var w=Te,P=w.child;if((Te.flags&16)!==0){var z=w.deletions;if(z!==null){for(var U=0;U<z.length;U++){var re=z[U];for(Te=re;Te!==null;){var fe=Te;switch(fe.tag){case 0:case 11:case 15:Ll(8,fe,w)}var he=fe.child;if(he!==null)he.return=fe,Te=he;else for(;Te!==null;){fe=Te;var de=fe.sibling,_e=fe.return;if(Rv(fe),fe===re){Te=null;break}if(de!==null){de.return=_e,Te=de;break}Te=_e}}}var Ne=w.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var It=Ie.sibling;Ie.sibling=null,Ie=It}while(Ie!==null)}}Te=w}}if((w.subtreeFlags&2064)!==0&&P!==null)P.return=w,Te=P;else e:for(;Te!==null;){if(w=Te,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Ll(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,Te=X;break e}Te=w.return}}var Z=i.current;for(Te=Z;Te!==null;){P=Te;var te=P.child;if((P.subtreeFlags&2064)!==0&&te!==null)te.return=P,Te=te;else e:for(P=Z;Te!==null;){if(z=Te,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Nu(9,z)}}catch(Oe){Tt(z,z.return,Oe)}if(z===P){Te=null;break e}var me=z.sibling;if(me!==null){me.return=z.return,Te=me;break e}Te=z.return}}if(Je=v,Ai(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(Ba,i)}catch{}m=!0}return m}finally{ot=c,ur.transition=s}}return!1}function Zv(i,s,c){s=ps(c,s),s=cv(i,s,1),i=Di(i,s,1),s=yn(),i!==null&&(dl(i,1,s),On(i,s))}function Tt(i,s,c){if(i.tag===3)Zv(i,i,c);else for(;s!==null;){if(s.tag===3){Zv(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Mi===null||!Mi.has(m))){i=ps(c,i),i=dv(s,i,1),s=Di(s,i,1),i=yn(),s!==null&&(dl(s,1,i),On(s,i));break}}s=s.return}}function q_(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(tn&c)===c&&(Ut===4||Ut===3&&(tn&130023424)===tn&&500>jt()-Jf?bo(i,0):Xf|=c),On(i,s)}function qv(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ha,Ha<<=1,(Ha&130023424)===0&&(Ha=4194304)));var c=yn();i=li(i,s),i!==null&&(dl(i,s,c),On(i,c))}function Q_(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),qv(i,c)}function Y_(i,s){var c=0;switch(i.tag){case 13:var m=i.stateNode,v=i.memoizedState;v!==null&&(c=v.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(s),qv(i,c)}var Qv;Qv=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Rn.current)In=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return In=!1,z_(i,s,c);In=(i.flags&131072)!==0}else In=!1,xt&&(s.flags&1048576)!==0&&Py(s,fu,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Pu(i,s),i=s.pendingProps;var v=ss(s,an.current);fs(s,c),v=Rf(null,s,m,i,v,c);var w=jf();return s.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jn(m)?(w=!0,uu(s)):w=!1,s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,Sf(s),v.updater=Eu,s.stateNode=v,v._reactInternals=s,Mf(s,m,i,c),s=Vf(null,s,m,!0,w,c)):(s.tag=0,xt&&w&&hf(s),gn(null,s,v,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Pu(i,s),i=s.pendingProps,v=m._init,m=v(m._payload),s.type=m,v=s.tag=G_(m),i=kr(m,i),v){case 0:s=$f(null,s,m,i,c);break e;case 1:s=wv(null,s,m,i,c);break e;case 11:s=mv(null,s,m,i,c);break e;case 14:s=gv(null,s,m,kr(m.type,i),c);break e}throw Error(n(306,m,""))}return s;case 0:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:kr(m,v),$f(i,s,m,v,c);case 1:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:kr(m,v),wv(i,s,m,v,c);case 3:e:{if(bv(s),i===null)throw Error(n(387));m=s.pendingProps,w=s.memoizedState,v=w.element,zy(i,s),vu(s,m,null,c);var P=s.memoizedState;if(m=P.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){v=ps(Error(n(423)),s),s=kv(i,s,m,c,v);break e}else if(m!==v){v=ps(Error(n(424)),s),s=kv(i,s,m,c,v);break e}else for(Kn=Ri(s.stateNode.containerInfo.firstChild),Yn=s,xt=!0,br=null,c=Oy(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(us(),m===v){s=ui(i,s,c);break e}gn(i,s,m,c)}s=s.child}return s;case 5:return Fy(s),i===null&&gf(s),m=s.type,v=s.pendingProps,w=i!==null?i.memoizedProps:null,P=v.children,lf(m,v)?P=null:w!==null&&lf(m,w)&&(s.flags|=32),xv(i,s),gn(i,s,P,c),s.child;case 6:return i===null&&gf(s),null;case 13:return Sv(i,s,c);case 4:return Cf(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=cs(s,null,m,c):gn(i,s,m,c),s.child;case 11:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:kr(m,v),mv(i,s,m,v,c);case 7:return gn(i,s,s.pendingProps,c),s.child;case 8:return gn(i,s,s.pendingProps.children,c),s.child;case 12:return gn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(m=s.type._context,v=s.pendingProps,w=s.memoizedProps,P=v.value,pt(mu,m._currentValue),m._currentValue=P,w!==null)if(wr(w.value,P)){if(w.children===v.children&&!Rn.current){s=ui(i,s,c);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var z=w.dependencies;if(z!==null){P=w.child;for(var U=z.firstContext;U!==null;){if(U.context===m){if(w.tag===1){U=ai(-1,c&-c),U.tag=2;var re=w.updateQueue;if(re!==null){re=re.shared;var fe=re.pending;fe===null?U.next=U:(U.next=fe.next,fe.next=U),re.pending=U}}w.lanes|=c,U=w.alternate,U!==null&&(U.lanes|=c),bf(w.return,c,s),z.lanes|=c;break}U=U.next}}else if(w.tag===10)P=w.type===s.type?null:w.child;else if(w.tag===18){if(P=w.return,P===null)throw Error(n(341));P.lanes|=c,z=P.alternate,z!==null&&(z.lanes|=c),bf(P,c,s),P=w.sibling}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===s){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}gn(i,s,v.children,c),s=s.child}return s;case 9:return v=s.type,m=s.pendingProps.children,fs(s,c),v=lr(v),m=m(v),s.flags|=1,gn(i,s,m,c),s.child;case 14:return m=s.type,v=kr(m,s.pendingProps),v=kr(m.type,v),gv(i,s,m,v,c);case 15:return yv(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:kr(m,v),Pu(i,s),s.tag=1,jn(m)?(i=!0,uu(s)):i=!1,fs(s,c),av(s,m,v),Mf(s,m,v,c),Vf(null,s,m,!0,i,c);case 19:return Ev(i,s,c);case 22:return vv(i,s,c)}throw Error(n(156,s.tag))};function Yv(i,s){return Tg(i,s)}function K_(i,s,c,m){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cr(i,s,c,m){return new K_(i,s,c,m)}function lh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function G_(i){if(typeof i=="function")return lh(i)?1:0;if(i!=null){if(i=i.$$typeof,i===M)return 11;if(i===B)return 14}return 2}function Vi(i,s){var c=i.alternate;return c===null?(c=cr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Lu(i,s,c,m,v,w){var P=2;if(m=i,typeof i=="function")lh(i)&&(P=1);else if(typeof i=="string")P=5;else e:switch(i){case V:return So(c.children,v,w,s);case Q:P=8,v|=8;break;case oe:return i=cr(12,c,s,v|2),i.elementType=oe,i.lanes=w,i;case ne:return i=cr(13,c,s,v),i.elementType=ne,i.lanes=w,i;case W:return i=cr(19,c,s,v),i.elementType=W,i.lanes=w,i;case ee:return Fu(c,v,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:P=10;break e;case K:P=9;break e;case M:P=11;break e;case B:P=14;break e;case q:P=16,m=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=cr(P,c,s,v),s.elementType=i,s.type=m,s.lanes=w,s}function So(i,s,c,m){return i=cr(7,i,m,s),i.lanes=c,i}function Fu(i,s,c,m){return i=cr(22,i,m,s),i.elementType=ee,i.lanes=c,i.stateNode={isHidden:!1},i}function ah(i,s,c){return i=cr(6,i,null,s),i.lanes=c,i}function uh(i,s,c){return s=cr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function X_(i,s,c,m,v){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dd(0),this.expirationTimes=Dd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dd(0),this.identifierPrefix=m,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function ch(i,s,c,m,v,w,P,z,U){return i=new X_(i,s,c,z,U),s===1?(s=1,w===!0&&(s|=8)):s=0,w=cr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sf(w),i}function J_(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function Kv(i){if(!i)return Ii;i=i._reactInternals;e:{if(co(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(jn(c))return Cy(i,c,s)}return s}function Gv(i,s,c,m,v,w,P,z,U){return i=ch(c,m,!0,i,v,w,P,z,U),i.context=Kv(null),c=i.current,m=yn(),v=Fi(c),w=ai(m,v),w.callback=s??null,Di(c,w,v),i.current.lanes=v,dl(i,v,m),On(i,m),i}function $u(i,s,c,m){var v=s.current,w=yn(),P=Fi(v);return c=Kv(c),s.context===null?s.context=c:s.pendingContext=c,s=ai(w,P),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Di(v,s,P),i!==null&&(Er(i,v,P,w),yu(i,v,P)),P}function Vu(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Xv(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function dh(i,s){Xv(i,s),(i=i.alternate)&&Xv(i,s)}function eP(){return null}var Jv=typeof reportError=="function"?reportError:function(i){console.error(i)};function fh(i){this._internalRoot=i}Bu.prototype.render=fh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));$u(i,s,null,null)},Bu.prototype.unmount=fh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;wo(function(){$u(null,i,null,null)}),s[ri]=null}};function Bu(i){this._internalRoot=i}Bu.prototype.unstable_scheduleHydration=function(i){if(i){var s=zg();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Pi.length&&s!==0&&s<Pi[c].priority;c++);Pi.splice(c,0,i),c===0&&Fg(i)}};function hh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Uu(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ex(){}function tP(i,s,c,m,v){if(v){if(typeof m=="function"){var w=m;m=function(){var re=Vu(P);w.call(re)}}var P=Gv(s,m,i,0,null,!1,!1,"",ex);return i._reactRootContainer=P,i[ri]=P.current,El(i.nodeType===8?i.parentNode:i),wo(),P}for(;v=i.lastChild;)i.removeChild(v);if(typeof m=="function"){var z=m;m=function(){var re=Vu(U);z.call(re)}}var U=ch(i,0,!1,null,null,!1,!1,"",ex);return i._reactRootContainer=U,i[ri]=U.current,El(i.nodeType===8?i.parentNode:i),wo(function(){$u(s,U,c,m)}),U}function Hu(i,s,c,m,v){var w=c._reactRootContainer;if(w){var P=w;if(typeof v=="function"){var z=v;v=function(){var U=Vu(P);z.call(U)}}$u(s,P,i,v)}else P=tP(c,s,i,v,m);return Vu(P)}Og=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=cl(s.pendingLanes);c!==0&&(zd(s,c|1),On(s,jt()),(Je&6)===0&&(ys=jt()+500,Ai()))}break;case 13:wo(function(){var m=li(i,1);if(m!==null){var v=yn();Er(m,i,1,v)}}),dh(i,1)}},Md=function(i){if(i.tag===13){var s=li(i,134217728);if(s!==null){var c=yn();Er(s,i,134217728,c)}dh(i,134217728)}},Dg=function(i){if(i.tag===13){var s=Fi(i),c=li(i,s);if(c!==null){var m=yn();Er(c,i,s,m)}dh(i,s)}},zg=function(){return ot},Mg=function(i,s){var c=ot;try{return ot=i,s()}finally{ot=c}},Ko=function(i,s,c){switch(s){case"input":if(ln(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==i&&m.form===i.form){var v=lu(m);if(!v)throw Error(n(90));Ve(m),ln(m,v)}}}break;case"textarea":be(i,c);break;case"select":s=c.value,s!=null&&F(i,!!c.multiple,s,!1)}},rt=ih,dt=wo;var nP={usingClientEntryPoint:!1,Events:[Tl,is,lu,La,Ue,ih]},Bl={findFiberByHostInstance:fo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rP={bundleType:Bl.bundleType,version:Bl.version,rendererPackageName:Bl.rendererPackageName,rendererConfig:Bl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=_g(i),i===null?null:i.stateNode},findFiberByHostInstance:Bl.findFiberByHostInstance||eP,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 Wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wu.isDisabled&&Wu.supportsFiber)try{Ba=Wu.inject(rP),Fr=Wu}catch{}}return Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nP,Dn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hh(s))throw Error(n(200));return J_(i,s,null,c)},Dn.createRoot=function(i,s){if(!hh(i))throw Error(n(299));var c=!1,m="",v=Jv;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=ch(i,1,!1,null,null,c,!1,m,v),i[ri]=s.current,El(i.nodeType===8?i.parentNode:i),new fh(s)},Dn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=_g(s),i=i===null?null:i.stateNode,i},Dn.flushSync=function(i){return wo(i)},Dn.hydrate=function(i,s,c){if(!Uu(s))throw Error(n(200));return Hu(null,i,s,!0,c)},Dn.hydrateRoot=function(i,s,c){if(!hh(i))throw Error(n(405));var m=c!=null&&c.hydratedSources||null,v=!1,w="",P=Jv;if(c!=null&&(c.unstable_strictMode===!0&&(v=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(P=c.onRecoverableError)),s=Gv(s,null,i,1,c??null,v,!1,w,P),i[ri]=s.current,El(i),m)for(i=0;i<m.length;i++)c=m[i],v=c._getVersion,v=v(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,v]:s.mutableSourceEagerHydrationData.push(c,v);return new Bu(s)},Dn.render=function(i,s,c){if(!Uu(s))throw Error(n(200));return Hu(null,i,s,!1,c)},Dn.unmountComponentAtNode=function(i){if(!Uu(i))throw Error(n(40));return i._reactRootContainer?(wo(function(){Hu(null,null,i,!1,function(){i._reactRootContainer=null,i[ri]=null})}),!0):!1},Dn.unstable_batchedUpdates=ih,Dn.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!Uu(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Hu(i,s,c,!1,m)},Dn.version="18.3.1-next-f1338f8080-20240426",Dn}var ux;function rb(){if(ux)return yh.exports;ux=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yh.exports=dP(),yh.exports}var cx;function fP(){if(cx)return qu;cx=1;var e=rb();return qu.createRoot=e.createRoot,qu.hydrateRoot=e.hydrateRoot,qu}var hP=fP();const pP=Zo(hP);/**
41
+ * react-router v7.12.0
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
+ */var dx="popstate";function mP(e={}){function t(r,o){let{pathname:l,search:a,hash:u}=r.location;return ep("",{pathname:l,search:a,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:oa(o)}return yP(t,n,null,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ar(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gP(){return Math.random().toString(36).substring(2,10)}function fx(e,t){return{usr:e.state,key:e.key,idx:t}}function ep(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Gs(t):t,state:n,key:t&&t.key||r||gP()}}function oa({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Gs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function yP(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:l=!1}=r,a=o.history,u="POP",d=null,f=h();f==null&&(f=0,a.replaceState({...a.state,idx:f},""));function h(){return(a.state||{idx:null}).idx}function p(){u="POP";let C=h(),E=C==null?null:C-f;f=C,d&&d({action:u,location:k.location,delta:E})}function x(C,E){u="PUSH";let _=ep(k.location,C,E);f=h()+1;let T=fx(_,f),I=k.createHref(_);try{a.pushState(T,"",I)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(I)}l&&d&&d({action:u,location:k.location,delta:1})}function g(C,E){u="REPLACE";let _=ep(k.location,C,E);f=h();let T=fx(_,f),I=k.createHref(_);a.replaceState(T,"",I),l&&d&&d({action:u,location:k.location,delta:0})}function S(C){return vP(C)}let k={get action(){return u},get location(){return e(o,a)},listen(C){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(dx,p),d=C,()=>{o.removeEventListener(dx,p),d=null}},createHref(C){return t(o,C)},createURL:S,encodeLocation(C){let E=S(C);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:g,go(C){return a.go(C)}};return k}function vP(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),_t(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:oa(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function ib(e,t,n="/"){return xP(e,t,n,!1)}function xP(e,t,n,r){let o=typeof t=="string"?Gs(t):t,l=yi(o.pathname||"/",n);if(l==null)return null;let a=ob(e);wP(a);let u=null;for(let d=0;u==null&&d<a.length;++d){let f=jP(l);u=NP(a[d],f,r)}return u}function ob(e,t=[],n=[],r="",o=!1){let l=(a,u,d=o,f)=>{let h={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;_t(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let p=gi([r,h.relativePath]),x=n.concat(h);a.children&&a.children.length>0&&(_t(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),ob(a.children,t,x,p,d)),!(a.path==null&&!a.index)&&t.push({path:p,score:PP(p,a.index),routesMeta:x})};return e.forEach((a,u)=>{var d;if(a.path===""||!((d=a.path)!=null&&d.includes("?")))l(a,u);else for(let f of sb(a.path))l(a,u,!0,f)}),t}function sb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let a=sb(r.join("/")),u=[];return u.push(...a.map(d=>d===""?l:[l,d].join("/"))),o&&u.push(...a),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function wP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:TP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var bP=/^:[\w-]+$/,kP=3,SP=2,CP=1,EP=10,_P=-2,hx=e=>e==="*";function PP(e,t){let n=e.split("/"),r=n.length;return n.some(hx)&&(r+=_P),t&&(r+=SP),n.filter(o=>!hx(o)).reduce((o,l)=>o+(bP.test(l)?kP:l===""?CP:EP),r)}function TP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function NP(e,t,n=!1){let{routesMeta:r}=e,o={},l="/",a=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,h=l==="/"?t:t.slice(l.length)||"/",p=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},h),x=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},h)),!p)return null;Object.assign(o,p.params),a.push({params:o,pathname:gi([l,p.pathname]),pathnameBase:DP(gi([l,p.pathnameBase])),route:x}),p.pathnameBase!=="/"&&(l=gi([l,p.pathnameBase]))}return a}function bc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=RP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let l=o[0],a=l.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:p},x)=>{if(h==="*"){let S=u[x]||"";a=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const g=u[x];return p&&!g?f[h]=void 0:f[h]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:a,pattern:e}}function RP(e,t=!1,n=!0){Ar(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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function jP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ar(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function yi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var lb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,IP=e=>lb.test(e);function AP(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Gs(e):e,l;if(n)if(IP(n))l=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),Ar(!1,`Pathnames cannot have embedded double slashes - normalizing ${a} -> ${n}`)}n.startsWith("/")?l=px(n.substring(1),"/"):l=px(n,t)}else l=t;return{pathname:l,search:zP(r),hash:MP(o)}}function px(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function wh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function OP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ab(e){let t=OP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ub(e,t,n,r=!1){let o;typeof e=="string"?o=Gs(e):(o={...e},_t(!o.pathname||!o.pathname.includes("?"),wh("?","pathname","search",o)),_t(!o.pathname||!o.pathname.includes("#"),wh("#","pathname","hash",o)),_t(!o.search||!o.search.includes("#"),wh("#","search","hash",o)));let l=e===""||o.pathname==="",a=l?"/":o.pathname,u;if(a==null)u=n;else{let p=t.length-1;if(!r&&a.startsWith("..")){let x=a.split("/");for(;x[0]==="..";)x.shift(),p-=1;o.pathname=x.join("/")}u=p>=0?t[p]:"/"}let d=AP(o,u),f=a&&a!=="/"&&a.endsWith("/"),h=(l||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var gi=e=>e.join("/").replace(/\/\/+/g,"/"),DP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,LP=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function FP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function $P(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var cb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function db(e,t){let n=e;if(typeof n!="string"||!lb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(cb)try{let l=new URL(window.location.href),a=n.startsWith("//")?new URL(l.protocol+n):new URL(n),u=yi(a.pathname,t);a.origin===l.origin&&u!=null?n=u+a.search+a.hash:o=!0}catch{Ar(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fb=["POST","PUT","PATCH","DELETE"];new Set(fb);var VP=["GET",...fb];new Set(VP);var Xs=b.createContext(null);Xs.displayName="DataRouter";var Qc=b.createContext(null);Qc.displayName="DataRouterState";var BP=b.createContext(!1),hb=b.createContext({isTransitioning:!1});hb.displayName="ViewTransition";var UP=b.createContext(new Map);UP.displayName="Fetchers";var HP=b.createContext(null);HP.displayName="Await";var pr=b.createContext(null);pr.displayName="Navigation";var Sa=b.createContext(null);Sa.displayName="Location";var bi=b.createContext({outlet:null,matches:[],isDataRoute:!1});bi.displayName="Route";var Jp=b.createContext(null);Jp.displayName="RouteError";var pb="REACT_ROUTER_ERROR",WP="REDIRECT",ZP="ROUTE_ERROR_RESPONSE";function qP(e){if(e.startsWith(`${pb}:${WP}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function QP(e){if(e.startsWith(`${pb}:${ZP}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new LP(t.status,t.statusText,t.data)}catch{}}function YP(e,{relative:t}={}){_t(Ca(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(pr),{hash:o,pathname:l,search:a}=Ea(e,{relative:t}),u=l;return n!=="/"&&(u=l==="/"?n:gi([n,l])),r.createHref({pathname:u,search:a,hash:o})}function Ca(){return b.useContext(Sa)!=null}function qo(){return _t(Ca(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Sa).location}var mb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gb(e){b.useContext(pr).static||b.useLayoutEffect(e)}function KP(){let{isDataRoute:e}=b.useContext(bi);return e?uT():GP()}function GP(){_t(Ca(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Xs),{basename:t,navigator:n}=b.useContext(pr),{matches:r}=b.useContext(bi),{pathname:o}=qo(),l=JSON.stringify(ab(r)),a=b.useRef(!1);return gb(()=>{a.current=!0}),b.useCallback((d,f={})=>{if(Ar(a.current,mb),!a.current)return;if(typeof d=="number"){n.go(d);return}let h=ub(d,JSON.parse(l),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:gi([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,l,o,e])}b.createContext(null);function Ea(e,{relative:t}={}){let{matches:n}=b.useContext(bi),{pathname:r}=qo(),o=JSON.stringify(ab(n));return b.useMemo(()=>ub(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function XP(e,t){return yb(e,t)}function yb(e,t,n,r,o){var _;_t(Ca(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=b.useContext(pr),{matches:a}=b.useContext(bi),u=a[a.length-1],d=u?u.params:{},f=u?u.pathname:"/",h=u?u.pathnameBase:"/",p=u&&u.route;{let T=p&&p.path||"";xb(f,!p||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
+
51
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let x=qo(),g;if(t){let T=typeof t=="string"?Gs(t):t;_t(h==="/"||((_=T.pathname)==null?void 0:_.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${T.pathname}" was given in the \`location\` prop.`),g=T}else g=x;let S=g.pathname||"/",k=S;if(h!=="/"){let T=h.replace(/^\//,"").split("/");k="/"+S.replace(/^\//,"").split("/").slice(T.length).join("/")}let C=ib(e,{pathname:k});Ar(p||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ar(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=rT(C&&C.map(T=>Object.assign({},T,{params:Object.assign({},d,T.params),pathname:gi([h,l.encodeLocation?l.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:gi([h,l.encodeLocation?l.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),a,n,r,o);return t&&E?b.createElement(Sa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function JP(){let e=aT(),t=FP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:o},n):null,a)}var eT=b.createElement(JP,null),vb=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=QP(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(bi.Provider,{value:this.props.routeContext},b.createElement(Jp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(tT,{error:e},t):t}};vb.contextType=BP;var bh=new WeakMap;function tT({children:e,error:t}){let{basename:n}=b.useContext(pr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=qP(t.digest);if(r){let o=bh.get(t);if(o)throw o;let l=db(r.location,n);if(cb&&!bh.get(t))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw bh.set(t,a),a}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function nT({routeContext:e,match:t,children:n}){let r=b.useContext(Xs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(bi.Provider,{value:e},n)}function rT(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,a=n==null?void 0:n.errors;if(a!=null){let h=l.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id])!==void 0);_t(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),l=l.slice(0,Math.min(l.length,h+1))}let u=!1,d=-1;if(n)for(let h=0;h<l.length;h++){let p=l[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=h),p.route.id){let{loaderData:x,errors:g}=n,S=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||S){u=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}let f=n&&r?(h,p)=>{var x,g;r(h,{location:n.location,params:((g=(x=n.matches)==null?void 0:x[0])==null?void 0:g.params)??{},unstable_pattern:$P(n.matches),errorInfo:p})}:void 0;return l.reduceRight((h,p,x)=>{let g,S=!1,k=null,C=null;n&&(g=a&&p.route.id?a[p.route.id]:void 0,k=p.route.errorElement||eT,u&&(d<0&&x===0?(xb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):d===x&&(S=!0,C=p.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,x+1)),_=()=>{let T;return g?T=k:S?T=C:p.route.Component?T=b.createElement(p.route.Component,null):p.route.element?T=p.route.element:T=h,b.createElement(nT,{match:p,routeContext:{outlet:h,matches:E,isDataRoute:n!=null},children:T})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement(vb,{location:n.location,revalidation:n.revalidation,component:k,error:g,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function em(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iT(e){let t=b.useContext(Xs);return _t(t,em(e)),t}function oT(e){let t=b.useContext(Qc);return _t(t,em(e)),t}function sT(e){let t=b.useContext(bi);return _t(t,em(e)),t}function tm(e){let t=sT(e),n=t.matches[t.matches.length-1];return _t(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function lT(){return tm("useRouteId")}function aT(){var r;let e=b.useContext(Jp),t=oT("useRouteError"),n=tm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function uT(){let{router:e}=iT("useNavigate"),t=tm("useNavigate"),n=b.useRef(!1);return gb(()=>{n.current=!0}),b.useCallback(async(o,l={})=>{Ar(n.current,mb),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var mx={};function xb(e,t,n){!t&&!mx[e]&&(mx[e]=!0,Ar(!1,n))}b.memo(cT);function cT({routes:e,future:t,state:n,onError:r}){return yb(e,void 0,n,r,t)}function fc(e){_t(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function dT({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:l=!1,unstable_useTransitions:a}){_t(!Ca(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:u,navigator:o,static:l,unstable_useTransitions:a,future:{}}),[u,o,l,a]);typeof n=="string"&&(n=Gs(n));let{pathname:f="/",search:h="",hash:p="",state:x=null,key:g="default"}=n,S=b.useMemo(()=>{let k=yi(f,u);return k==null?null:{location:{pathname:k,search:h,hash:p,state:x,key:g},navigationType:r}},[u,f,h,p,x,g,r]);return Ar(S!=null,`<Router basename="${u}"> is not able to match the URL "${f}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:b.createElement(pr.Provider,{value:d},b.createElement(Sa.Provider,{children:t,value:S}))}function fT({children:e,location:t}){return XP(tp(e),t)}function tp(e,t=[]){let n=[];return b.Children.forEach(e,(r,o)=>{if(!b.isValidElement(r))return;let l=[...t,o];if(r.type===b.Fragment){n.push.apply(n,tp(r.props.children,l));return}_t(r.type===fc,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_t(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=tp(r.props.children,l)),n.push(a)}),n}var hc="get",pc="application/x-www-form-urlencoded";function Yc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function hT(e){return Yc(e)&&e.tagName.toLowerCase()==="button"}function pT(e){return Yc(e)&&e.tagName.toLowerCase()==="form"}function mT(e){return Yc(e)&&e.tagName.toLowerCase()==="input"}function gT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yT(e,t){return e.button===0&&(!t||t==="_self")&&!gT(e)}var Qu=null;function vT(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}var xT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kh(e){return e!=null&&!xT.has(e)?(Ar(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pc}"`),null):e}function wT(e,t){let n,r,o,l,a;if(pT(e)){let u=e.getAttribute("action");r=u?yi(u,t):null,n=e.getAttribute("method")||hc,o=kh(e.getAttribute("enctype"))||pc,l=new FormData(e)}else if(hT(e)||mT(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?yi(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||hc,o=kh(e.getAttribute("formenctype"))||kh(u.getAttribute("enctype"))||pc,l=new FormData(u,e),!vT()){let{name:f,type:h,value:p}=e;if(h==="image"){let x=f?`${f}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else f&&l.append(f,p)}}else{if(Yc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=hc,r=null,o=pc,a=e}return l&&o==="text/plain"&&(a=l,l=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:l,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bT(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&yi(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function kT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ST(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function CT(e,t,n){let r=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let a=await kT(l,n);return a.links?a.links():[]}return[]}));return TT(r.flat(1).filter(ST).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function gx(e,t,n,r,o,l){let a=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var h;return n[f].pathname!==d.pathname||((h=n[f].route.path)==null?void 0:h.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return l==="assets"?t.filter((d,f)=>a(d,f)||u(d,f)):l==="data"?t.filter((d,f)=>{var p;let h=r.routes[d.route.id];if(!h||!h.hasLoader)return!1;if(a(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function ET(e,t,{includeHydrateFallback:n}={}){return _T(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function _T(e){return[...new Set(e)]}function PT(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function TT(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let l=JSON.stringify(PT(o));return n.has(l)||(n.add(l),r.push({key:l,link:o})),r},[])}function wb(){let e=b.useContext(Xs);return nm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function NT(){let e=b.useContext(Qc);return nm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rm=b.createContext(void 0);rm.displayName="FrameworkContext";function bb(){let e=b.useContext(rm);return nm(e,"You must render this element inside a <HydratedRouter> element"),e}function RT(e,t){let n=b.useContext(rm),[r,o]=b.useState(!1),[l,a]=b.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let k=E=>{E.forEach(_=>{a(_.isIntersecting)})},C=new IntersectionObserver(k,{threshold:.5});return x.current&&C.observe(x.current),()=>{C.disconnect()}}},[e]),b.useEffect(()=>{if(r){let k=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(k)}}},[r]);let g=()=>{o(!0)},S=()=>{o(!1),a(!1)};return n?e!=="intent"?[l,x,{}]:[l,x,{onFocus:Hl(u,g),onBlur:Hl(d,S),onMouseEnter:Hl(f,g),onMouseLeave:Hl(h,S),onTouchStart:Hl(p,g)}]:[!1,x,{}]}function Hl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function jT({page:e,...t}){let{router:n}=wb(),r=b.useMemo(()=>ib(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(AT,{page:e,matches:r,...t}):null}function IT(e){let{manifest:t,routeModules:n}=bb(),[r,o]=b.useState([]);return b.useEffect(()=>{let l=!1;return CT(e,t,n).then(a=>{l||o(a)}),()=>{l=!0}},[e,t,n]),r}function AT({page:e,matches:t,...n}){let r=qo(),{future:o,manifest:l,routeModules:a}=bb(),{basename:u}=wb(),{loaderData:d,matches:f}=NT(),h=b.useMemo(()=>gx(e,t,f,l,r,"data"),[e,t,f,l,r]),p=b.useMemo(()=>gx(e,t,f,l,r,"assets"),[e,t,f,l,r]),x=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,C=!1;if(t.forEach(_=>{var I;let T=l.routes[_.route.id];!T||!T.hasLoader||(!h.some(O=>O.route.id===_.route.id)&&_.route.id in d&&((I=a[_.route.id])!=null&&I.shouldRevalidate)||T.hasClientLoader?C=!0:k.add(_.route.id))}),k.size===0)return[];let E=bT(e,u,o.unstable_trailingSlashAwareDataRequests,"data");return C&&k.size>0&&E.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[E.pathname+E.search]},[u,o.unstable_trailingSlashAwareDataRequests,d,r,l,h,t,e,a]),g=b.useMemo(()=>ET(p,l),[p,l]),S=IT(p);return b.createElement(b.Fragment,null,x.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),g.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),S.map(({key:k,link:C})=>b.createElement("link",{key:k,nonce:n.nonce,...C})))}function OT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var DT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{DT&&(window.__reactRouterVersion="7.12.0")}catch{}function zT({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=b.useRef();o.current==null&&(o.current=mP({window:r,v5Compat:!0}));let l=o.current,[a,u]=b.useState({action:l.action,location:l.location}),d=b.useCallback(f=>{n===!1?u(f):b.startTransition(()=>u(f))},[n]);return b.useLayoutEffect(()=>l.listen(d),[l,d]),b.createElement(dT,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:l,unstable_useTransitions:n})}var kb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sb=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:l,replace:a,state:u,target:d,to:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},S){let{basename:k,unstable_useTransitions:C}=b.useContext(pr),E=typeof f=="string"&&kb.test(f),_=db(f,k);f=_.to;let T=YP(f,{relative:o}),[I,O,R]=RT(r,g),V=FT(f,{replace:a,state:u,target:d,preventScrollReset:h,relative:o,viewTransition:p,unstable_defaultShouldRevalidate:x,unstable_useTransitions:C});function Q(A){t&&t(A),A.defaultPrevented||V(A)}let oe=b.createElement("a",{...g,...R,href:_.absoluteURL||T,onClick:_.isExternal||l?t:Q,ref:OT(S,O),target:d,"data-discover":!E&&n==="render"?"true":void 0});return I&&!E?b.createElement(b.Fragment,null,oe,b.createElement(jT,{page:T})):oe});Sb.displayName="Link";var Cb=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:l,to:a,viewTransition:u,children:d,...f},h){let p=Ea(a,{relative:f.relative}),x=qo(),g=b.useContext(Qc),{navigator:S,basename:k}=b.useContext(pr),C=g!=null&&HT(p)&&u===!0,E=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,_=x.pathname,T=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(_=_.toLowerCase(),T=T?T.toLowerCase():null,E=E.toLowerCase()),T&&k&&(T=yi(T,k)||T);const I=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let O=_===E||!o&&_.startsWith(E)&&_.charAt(I)==="/",R=T!=null&&(T===E||!o&&T.startsWith(E)&&T.charAt(E.length)==="/"),V={isActive:O,isPending:R,isTransitioning:C},Q=O?t:void 0,oe;typeof r=="function"?oe=r(V):oe=[r,O?"active":null,R?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let A=typeof l=="function"?l(V):l;return b.createElement(Sb,{...f,"aria-current":Q,className:oe,ref:h,style:A,to:a,viewTransition:u},typeof d=="function"?d(V):d)});Cb.displayName="NavLink";var MT=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:l,method:a=hc,action:u,onSubmit:d,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},S)=>{let{unstable_useTransitions:k}=b.useContext(pr),C=BT(),E=UT(u,{relative:f}),_=a.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&kb.test(u),I=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let R=O.nativeEvent.submitter,V=(R==null?void 0:R.getAttribute("formmethod"))||a,Q=()=>C(R||O.currentTarget,{fetcherKey:t,method:V,navigate:n,replace:o,state:l,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x});k&&n!==!1?b.startTransition(()=>Q()):Q()};return b.createElement("form",{ref:S,method:_,action:E,onSubmit:r?d:I,...g,"data-discover":!T&&e==="render"?"true":void 0})});MT.displayName="Form";function LT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Eb(e){let t=b.useContext(Xs);return _t(t,LT(e)),t}function FT(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:l,viewTransition:a,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let f=KP(),h=qo(),p=Ea(e,{relative:l});return b.useCallback(x=>{if(yT(x,t)){x.preventDefault();let g=n!==void 0?n:oa(h)===oa(p),S=()=>f(e,{replace:g,state:r,preventScrollReset:o,relative:l,viewTransition:a,unstable_defaultShouldRevalidate:u});d?b.startTransition(()=>S()):S()}},[h,f,p,n,r,t,e,o,l,a,u,d])}var $T=0,VT=()=>`__${String(++$T)}__`;function BT(){let{router:e}=Eb("useSubmit"),{basename:t}=b.useContext(pr),n=lT(),r=e.fetch,o=e.navigate;return b.useCallback(async(l,a={})=>{let{action:u,method:d,encType:f,formData:h,body:p}=wT(l,t);if(a.navigate===!1){let x=a.fetcherKey||VT();await r(x,n,a.action||u,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:h,body:p,formMethod:a.method||d,formEncType:a.encType||f,flushSync:a.flushSync})}else await o(a.action||u,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:h,body:p,formMethod:a.method||d,formEncType:a.encType||f,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,o,t,n])}function UT(e,{relative:t}={}){let{basename:n}=b.useContext(pr),r=b.useContext(bi);_t(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),l={...Ea(e||".",{relative:t})},a=qo();if(e==null){l.search=a.search;let u=new URLSearchParams(l.search),d=u.getAll("index");if(d.some(h=>h==="")){u.delete("index"),d.filter(p=>p).forEach(p=>u.append("index",p));let h=u.toString();l.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:gi([n,l.pathname])),oa(l)}function HT(e,{relative:t}={}){let n=b.useContext(hb);_t(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Eb("useViewTransitionState"),o=Ea(e,{relative:t});if(!n.isTransitioning)return!1;let l=yi(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=yi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return bc(o.pathname,a)!=null||bc(o.pathname,l)!=null}var _a=rb();const _b=Zo(_a);var Pa=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(){}},WT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qi,Kp,q0,ZT=(q0=class{constructor(){$e(this,qi,WT);$e(this,Kp,!1)}setTimeoutProvider(e){Pe(this,qi,e)}setTimeout(e,t){return H(this,qi).setTimeout(e,t)}clearTimeout(e){H(this,qi).clearTimeout(e)}setInterval(e,t){return H(this,qi).setInterval(e,t)}clearInterval(e){H(this,qi).clearInterval(e)}},qi=new WeakMap,Kp=new WeakMap,q0),_o=new ZT;function qT(e){setTimeout(e,0)}var Lo=typeof window>"u"||"Deno"in globalThis;function Fn(){}function QT(e,t){return typeof e=="function"?e(t):e}function np(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function to(e,t){return typeof e=="function"?e(t):e}function fr(e,t){return typeof e=="function"?e(t):e}function yx(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:l,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==im(a,t.options))return!1}else if(!la(t.queryKey,a))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||l&&!l(t))}function vx(e,t){const{exact:n,status:r,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(sa(t.options.mutationKey)!==sa(l))return!1}else if(!la(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function im(e,t){return((t==null?void 0:t.queryKeyHashFn)||sa)(e)}function sa(e){return JSON.stringify(e,(t,n)=>ip(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function la(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>la(e[n],t[n])):!1}var YT=Object.prototype.hasOwnProperty;function Tb(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=xx(e)&&xx(t);if(!r&&!(ip(e)&&ip(t)))return t;const l=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,d=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:a[h],x=e[p],g=t[p];if(x===g){d[p]=x,(r?h<l:YT.call(e,p))&&f++;continue}if(x===null||g===null||typeof x!="object"||typeof g!="object"){d[p]=g;continue}const S=Tb(x,g,n+1);d[p]=S,S===x&&f++}return l===u&&f===l?e:d}function rp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function xx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ip(e){if(!wx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!wx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function wx(e){return Object.prototype.toString.call(e)==="[object Object]"}function KT(e){return new Promise(t=>{_o.setTimeout(t,e)})}function op(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Tb(e,t):t}function GT(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function XT(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var om=Symbol();function Nb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===om?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rb(e,t){return typeof e=="function"?e(...t):!!e}function JT(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var To,Qi,As,Q0,eN=(Q0=class extends Pa{constructor(){super();$e(this,To);$e(this,Qi);$e(this,As);Pe(this,As,t=>{if(!Lo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){H(this,Qi)||this.setEventListener(H(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,Qi))==null||t.call(this),Pe(this,Qi,void 0))}setEventListener(t){var n;Pe(this,As,t),(n=H(this,Qi))==null||n.call(this),Pe(this,Qi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){H(this,To)!==t&&(Pe(this,To,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof H(this,To)=="boolean"?H(this,To):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},To=new WeakMap,Qi=new WeakMap,As=new WeakMap,Q0),sm=new eN;function sp(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var tN=qT;function nN(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=tN;const l=u=>{t?e.push(u):o(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||a()}return d},batchCalls:u=>(...d)=>{l(()=>{u(...d)})},schedule:l,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var nn=nN(),Os,Yi,Ds,Y0,rN=(Y0=class extends Pa{constructor(){super();$e(this,Os,!0);$e(this,Yi);$e(this,Ds);Pe(this,Ds,t=>{if(!Lo&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){H(this,Yi)||this.setEventListener(H(this,Ds))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,Yi))==null||t.call(this),Pe(this,Yi,void 0))}setEventListener(t){var n;Pe(this,Ds,t),(n=H(this,Yi))==null||n.call(this),Pe(this,Yi,t(this.setOnline.bind(this)))}setOnline(t){H(this,Os)!==t&&(Pe(this,Os,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return H(this,Os)}},Os=new WeakMap,Yi=new WeakMap,Ds=new WeakMap,Y0),kc=new rN;function iN(e){return Math.min(1e3*2**e,3e4)}function jb(e){return(e??"online")==="online"?kc.isOnline():!0}var lp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ib(e){let t=!1,n=0,r;const o=sp(),l=()=>o.status!=="pending",a=k=>{var C;if(!l()){const E=new lp(k);x(E),(C=e.onCancel)==null||C.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>sm.isFocused()&&(e.networkMode==="always"||kc.isOnline())&&e.canRun(),h=()=>jb(e.networkMode)&&e.canRun(),p=k=>{l()||(r==null||r(),o.resolve(k))},x=k=>{l()||(r==null||r(),o.reject(k))},g=()=>new Promise(k=>{var C;r=E=>{(l()||f())&&k(E)},(C=e.onPause)==null||C.call(e)}).then(()=>{var k;r=void 0,l()||(k=e.onContinue)==null||k.call(e)}),S=()=>{if(l())return;let k;const C=n===0?e.initialPromise:void 0;try{k=C??e.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(p).catch(E=>{var R;if(l())return;const _=e.retry??(Lo?0:3),T=e.retryDelay??iN,I=typeof T=="function"?T(n,E):T,O=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!O){x(E);return}n++,(R=e.onFail)==null||R.call(e,n,E),KT(I).then(()=>f()?void 0:g()).then(()=>{t?x(E):S()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r==null||r(),o),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?S():g().then(S),o)}}var No,K0,Ab=(K0=class{constructor(){$e(this,No)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),np(this.gcTime)&&Pe(this,No,_o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Lo?1/0:300*1e3))}clearGcTimeout(){H(this,No)&&(_o.clearTimeout(H(this,No)),Pe(this,No,void 0))}},No=new WeakMap,K0),Ro,zs,dr,jo,Kt,va,Io,Tr,hi,G0,oN=(G0=class extends Ab{constructor(t){super();$e(this,Tr);$e(this,Ro);$e(this,zs);$e(this,dr);$e(this,jo);$e(this,Kt);$e(this,va);$e(this,Io);Pe(this,Io,!1),Pe(this,va,t.defaultOptions),this.setOptions(t.options),this.observers=[],Pe(this,jo,t.client),Pe(this,dr,H(this,jo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Pe(this,Ro,kx(this.options)),this.state=t.state??H(this,Ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=H(this,Kt))==null?void 0:t.promise}setOptions(t){if(this.options={...H(this,va),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=kx(this.options);n.data!==void 0&&(this.setState(bx(n.data,n.dataUpdatedAt)),Pe(this,Ro,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&H(this,dr).remove(this)}setData(t,n){const r=op(this.state.data,t,this.options);return Ke(this,Tr,hi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ke(this,Tr,hi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=H(this,Kt))==null?void 0:r.promise;return(o=H(this,Kt))==null||o.cancel(t),n?n.then(Fn).catch(Fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(H(this,Ro))}isActive(){return this.observers.some(t=>fr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===om||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>to(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Pb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),H(this,dr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(H(this,Kt)&&(H(this,Io)?H(this,Kt).cancel({revert:!0}):H(this,Kt).cancelRetry()),this.scheduleGc()),H(this,dr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,Tr,hi).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,h,p,x,g,S,k,C,E,_,T;if(this.state.fetchStatus!=="idle"&&((d=H(this,Kt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(H(this,Kt))return H(this,Kt).continueRetry(),H(this,Kt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const I=this.observers.find(O=>O.options.queryFn);I&&this.setOptions(I.options)}const r=new AbortController,o=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(Pe(this,Io,!0),r.signal)})},l=()=>{const I=Nb(this.options,n),R=(()=>{const V={client:H(this,jo),queryKey:this.queryKey,meta:this.meta};return o(V),V})();return Pe(this,Io,!1),this.options.persister?this.options.persister(I,R,this):I(R)},u=(()=>{const I={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:H(this,jo),state:this.state,fetchFn:l};return o(I),I})();(f=this.options.behavior)==null||f.onFetch(u,this),Pe(this,zs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&Ke(this,Tr,hi).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Pe(this,Kt,Ib({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:I=>{I instanceof lp&&I.revert&&this.setState({...H(this,zs),fetchStatus:"idle"}),r.abort()},onFail:(I,O)=>{Ke(this,Tr,hi).call(this,{type:"failed",failureCount:I,error:O})},onPause:()=>{Ke(this,Tr,hi).call(this,{type:"pause"})},onContinue:()=>{Ke(this,Tr,hi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const I=await H(this,Kt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(g=(x=H(this,dr).config).onSuccess)==null||g.call(x,I,this),(k=(S=H(this,dr).config).onSettled)==null||k.call(S,I,this.state.error,this),I}catch(I){if(I instanceof lp){if(I.silent)return H(this,Kt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Ke(this,Tr,hi).call(this,{type:"error",error:I}),(E=(C=H(this,dr).config).onError)==null||E.call(C,I,this),(T=(_=H(this,dr).config).onSettled)==null||T.call(_,this.state.data,I,this),I}finally{this.scheduleGc()}}},Ro=new WeakMap,zs=new WeakMap,dr=new WeakMap,jo=new WeakMap,Kt=new WeakMap,va=new WeakMap,Io=new WeakMap,Tr=new WeakSet,hi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ob(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...bx(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Pe(this,zs,t.manual?o:void 0),o;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),H(this,dr).notify({query:this,type:"updated",action:t})})},G0);function Ob(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mn,Ge,xa,xn,Ao,Ms,pi,Ki,wa,Ls,Fs,Oo,Do,Gi,$s,it,Gl,ap,up,cp,dp,fp,hp,pp,Db,X0,sN=(X0=class extends Pa{constructor(t,n){super();$e(this,it);$e(this,Mn);$e(this,Ge);$e(this,xa);$e(this,xn);$e(this,Ao);$e(this,Ms);$e(this,pi);$e(this,Ki);$e(this,wa);$e(this,Ls);$e(this,Fs);$e(this,Oo);$e(this,Do);$e(this,Gi);$e(this,$s,new Set);this.options=n,Pe(this,Mn,t),Pe(this,Ki,null),Pe(this,pi,sp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(H(this,Ge).addObserver(this),Sx(H(this,Ge),this.options)?Ke(this,it,Gl).call(this):this.updateResult(),Ke(this,it,dp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mp(H(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mp(H(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,it,fp).call(this),Ke(this,it,hp).call(this),H(this,Ge).removeObserver(this)}setOptions(t){const n=this.options,r=H(this,Ge);if(this.options=H(this,Mn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fr(this.options.enabled,H(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,it,pp).call(this),H(this,Ge).setOptions(this.options),n._defaulted&&!rp(this.options,n)&&H(this,Mn).getQueryCache().notify({type:"observerOptionsUpdated",query:H(this,Ge),observer:this});const o=this.hasListeners();o&&Cx(H(this,Ge),r,this.options,n)&&Ke(this,it,Gl).call(this),this.updateResult(),o&&(H(this,Ge)!==r||fr(this.options.enabled,H(this,Ge))!==fr(n.enabled,H(this,Ge))||to(this.options.staleTime,H(this,Ge))!==to(n.staleTime,H(this,Ge)))&&Ke(this,it,ap).call(this);const l=Ke(this,it,up).call(this);o&&(H(this,Ge)!==r||fr(this.options.enabled,H(this,Ge))!==fr(n.enabled,H(this,Ge))||l!==H(this,Gi))&&Ke(this,it,cp).call(this,l)}getOptimisticResult(t){const n=H(this,Mn).getQueryCache().build(H(this,Mn),t),r=this.createResult(n,t);return aN(this,r)&&(Pe(this,xn,r),Pe(this,Ms,this.options),Pe(this,Ao,H(this,Ge).state)),r}getCurrentResult(){return H(this,xn)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&H(this,pi).status==="pending"&&H(this,pi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){H(this,$s).add(t)}getCurrentQuery(){return H(this,Ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=H(this,Mn).defaultQueryOptions(t),r=H(this,Mn).getQueryCache().build(H(this,Mn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ke(this,it,Gl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),H(this,xn)))}createResult(t,n){var oe;const r=H(this,Ge),o=this.options,l=H(this,xn),a=H(this,Ao),u=H(this,Ms),f=t!==r?t.state:H(this,xa),{state:h}=t;let p={...h},x=!1,g;if(n._optimisticResults){const A=this.hasListeners(),K=!A&&Sx(t,n),M=A&&Cx(t,r,n,o);(K||M)&&(p={...p,...Ob(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:k,status:C}=p;g=p.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&C==="pending"){let A;l!=null&&l.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(A=l.data,E=!0):A=typeof n.placeholderData=="function"?n.placeholderData((oe=H(this,Fs))==null?void 0:oe.state.data,H(this,Fs)):n.placeholderData,A!==void 0&&(C="success",g=op(l==null?void 0:l.data,A,n),x=!0)}if(n.select&&g!==void 0&&!E)if(l&&g===(a==null?void 0:a.data)&&n.select===H(this,wa))g=H(this,Ls);else try{Pe(this,wa,n.select),g=n.select(g),g=op(l==null?void 0:l.data,g,n),Pe(this,Ls,g),Pe(this,Ki,null)}catch(A){Pe(this,Ki,A)}H(this,Ki)&&(S=H(this,Ki),g=H(this,Ls),k=Date.now(),C="error");const _=p.fetchStatus==="fetching",T=C==="pending",I=C==="error",O=T&&_,R=g!==void 0,Q={status:C,fetchStatus:p.fetchStatus,isPending:T,isSuccess:C==="success",isError:I,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:k,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!T,isLoadingError:I&&!R,isPaused:p.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:I&&R,isStale:lm(t,n),refetch:this.refetch,promise:H(this,pi),isEnabled:fr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=Q.data!==void 0,K=Q.status==="error"&&!A,M=B=>{K?B.reject(Q.error):A&&B.resolve(Q.data)},ne=()=>{const B=Pe(this,pi,Q.promise=sp());M(B)},W=H(this,pi);switch(W.status){case"pending":t.queryHash===r.queryHash&&M(W);break;case"fulfilled":(K||Q.data!==W.value)&&ne();break;case"rejected":(!K||Q.error!==W.reason)&&ne();break}}return Q}updateResult(){const t=H(this,xn),n=this.createResult(H(this,Ge),this.options);if(Pe(this,Ao,H(this,Ge).state),Pe(this,Ms,this.options),H(this,Ao).data!==void 0&&Pe(this,Fs,H(this,Ge)),rp(n,t))return;Pe(this,xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!H(this,$s).size)return!0;const a=new Set(l??H(this,$s));return this.options.throwOnError&&a.add("error"),Object.keys(H(this,xn)).some(u=>{const d=u;return H(this,xn)[d]!==t[d]&&a.has(d)})};Ke(this,it,Db).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,it,dp).call(this)}},Mn=new WeakMap,Ge=new WeakMap,xa=new WeakMap,xn=new WeakMap,Ao=new WeakMap,Ms=new WeakMap,pi=new WeakMap,Ki=new WeakMap,wa=new WeakMap,Ls=new WeakMap,Fs=new WeakMap,Oo=new WeakMap,Do=new WeakMap,Gi=new WeakMap,$s=new WeakMap,it=new WeakSet,Gl=function(t){Ke(this,it,pp).call(this);let n=H(this,Ge).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Fn)),n},ap=function(){Ke(this,it,fp).call(this);const t=to(this.options.staleTime,H(this,Ge));if(Lo||H(this,xn).isStale||!np(t))return;const r=Pb(H(this,xn).dataUpdatedAt,t)+1;Pe(this,Oo,_o.setTimeout(()=>{H(this,xn).isStale||this.updateResult()},r))},up=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(H(this,Ge)):this.options.refetchInterval)??!1},cp=function(t){Ke(this,it,hp).call(this),Pe(this,Gi,t),!(Lo||fr(this.options.enabled,H(this,Ge))===!1||!np(H(this,Gi))||H(this,Gi)===0)&&Pe(this,Do,_o.setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&Ke(this,it,Gl).call(this)},H(this,Gi)))},dp=function(){Ke(this,it,ap).call(this),Ke(this,it,cp).call(this,Ke(this,it,up).call(this))},fp=function(){H(this,Oo)&&(_o.clearTimeout(H(this,Oo)),Pe(this,Oo,void 0))},hp=function(){H(this,Do)&&(_o.clearInterval(H(this,Do)),Pe(this,Do,void 0))},pp=function(){const t=H(this,Mn).getQueryCache().build(H(this,Mn),this.options);if(t===H(this,Ge))return;const n=H(this,Ge);Pe(this,Ge,t),Pe(this,xa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Db=function(t){nn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(H(this,xn))}),H(this,Mn).getQueryCache().notify({query:H(this,Ge),type:"observerResultsUpdated"})})},X0);function lN(e,t){return fr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Sx(e,t){return lN(e,t)||e.state.data!==void 0&&mp(e,t,t.refetchOnMount)}function mp(e,t,n){if(fr(t.enabled,e)!==!1&&to(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lm(e,t)}return!1}function Cx(e,t,n,r){return(e!==t||fr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lm(e,n)}function lm(e,t){return fr(t.enabled,e)!==!1&&e.isStaleByTime(to(t.staleTime,e))}function aN(e,t){return!rp(e.getCurrentResult(),t)}function Ex(e){return{onFetch:(t,n)=>{var h,p,x,g,S;const r=t.options,o=(x=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:x.direction,l=((g=t.state.data)==null?void 0:g.pages)||[],a=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const C=T=>{JT(T,()=>t.signal,()=>k=!0)},E=Nb(t.options,t.fetchOptions),_=async(T,I,O)=>{if(k)return Promise.reject();if(I==null&&T.pages.length)return Promise.resolve(T);const V=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:I,direction:O?"backward":"forward",meta:t.options.meta};return C(K),K})(),Q=await E(V),{maxPages:oe}=t.options,A=O?XT:GT;return{pages:A(T.pages,Q,oe),pageParams:A(T.pageParams,I,oe)}};if(o&&l.length){const T=o==="backward",I=T?uN:_x,O={pages:l,pageParams:a},R=I(r,O);u=await _(O,R,T)}else{const T=e??l.length;do{const I=d===0?a[0]??r.initialPageParam:_x(r,u);if(d>0&&I==null)break;u=await _(u,I),d++}while(d<T)}return u};t.options.persister?t.fetchFn=()=>{var k,C;return(C=(k=t.options).persister)==null?void 0:C.call(k,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function _x(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function uN(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ba,Wr,wn,zo,Zr,Wi,J0,cN=(J0=class extends Ab{constructor(t){super();$e(this,Zr);$e(this,ba);$e(this,Wr);$e(this,wn);$e(this,zo);Pe(this,ba,t.client),this.mutationId=t.mutationId,Pe(this,wn,t.mutationCache),Pe(this,Wr,[]),this.state=t.state||dN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){H(this,Wr).includes(t)||(H(this,Wr).push(t),this.clearGcTimeout(),H(this,wn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Pe(this,Wr,H(this,Wr).filter(n=>n!==t)),this.scheduleGc(),H(this,wn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){H(this,Wr).length||(this.state.status==="pending"?this.scheduleGc():H(this,wn).remove(this))}continue(){var t;return((t=H(this,zo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,d,f,h,p,x,g,S,k,C,E,_,T,I,O,R,V,Q,oe;const n=()=>{Ke(this,Zr,Wi).call(this,{type:"continue"})},r={client:H(this,ba),meta:this.options.meta,mutationKey:this.options.mutationKey};Pe(this,zo,Ib({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,K)=>{Ke(this,Zr,Wi).call(this,{type:"failed",failureCount:A,error:K})},onPause:()=>{Ke(this,Zr,Wi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>H(this,wn).canRun(this)}));const o=this.state.status==="pending",l=!H(this,zo).canStart();try{if(o)n();else{Ke(this,Zr,Wi).call(this,{type:"pending",variables:t,isPaused:l}),await((u=(a=H(this,wn).config).onMutate)==null?void 0:u.call(a,t,this,r));const K=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,t,r));K!==this.state.context&&Ke(this,Zr,Wi).call(this,{type:"pending",context:K,variables:t,isPaused:l})}const A=await H(this,zo).start();return await((p=(h=H(this,wn).config).onSuccess)==null?void 0:p.call(h,A,t,this.state.context,this,r)),await((g=(x=this.options).onSuccess)==null?void 0:g.call(x,A,t,this.state.context,r)),await((k=(S=H(this,wn).config).onSettled)==null?void 0:k.call(S,A,null,this.state.variables,this.state.context,this,r)),await((E=(C=this.options).onSettled)==null?void 0:E.call(C,A,null,t,this.state.context,r)),Ke(this,Zr,Wi).call(this,{type:"success",data:A}),A}catch(A){try{await((T=(_=H(this,wn).config).onError)==null?void 0:T.call(_,A,t,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((O=(I=this.options).onError)==null?void 0:O.call(I,A,t,this.state.context,r))}catch(K){Promise.reject(K)}try{await((V=(R=H(this,wn).config).onSettled)==null?void 0:V.call(R,void 0,A,this.state.variables,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((oe=(Q=this.options).onSettled)==null?void 0:oe.call(Q,void 0,A,t,this.state.context,r))}catch(K){Promise.reject(K)}throw Ke(this,Zr,Wi).call(this,{type:"error",error:A}),A}finally{H(this,wn).runNext(this)}}},ba=new WeakMap,Wr=new WeakMap,wn=new WeakMap,zo=new WeakMap,Zr=new WeakSet,Wi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),nn.batch(()=>{H(this,Wr).forEach(r=>{r.onMutationUpdate(t)}),H(this,wn).notify({mutation:this,type:"updated",action:t})})},J0);function dN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mi,Nr,ka,eb,fN=(eb=class extends Pa{constructor(t={}){super();$e(this,mi);$e(this,Nr);$e(this,ka);this.config=t,Pe(this,mi,new Set),Pe(this,Nr,new Map),Pe(this,ka,0)}build(t,n,r){const o=new cN({client:t,mutationCache:this,mutationId:++Zu(this,ka)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){H(this,mi).add(t);const n=Yu(t);if(typeof n=="string"){const r=H(this,Nr).get(n);r?r.push(t):H(this,Nr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(H(this,mi).delete(t)){const n=Yu(t);if(typeof n=="string"){const r=H(this,Nr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&H(this,Nr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yu(t);if(typeof n=="string"){const r=H(this,Nr).get(n),o=r==null?void 0:r.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Yu(t);if(typeof n=="string"){const o=(r=H(this,Nr).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nn.batch(()=>{H(this,mi).forEach(t=>{this.notify({type:"removed",mutation:t})}),H(this,mi).clear(),H(this,Nr).clear()})}getAll(){return Array.from(H(this,mi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vx(n,r))}findAll(t={}){return this.getAll().filter(n=>vx(t,n))}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return nn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Fn))))}},mi=new WeakMap,Nr=new WeakMap,ka=new WeakMap,eb);function Yu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var qr,tb,hN=(tb=class extends Pa{constructor(t={}){super();$e(this,qr);this.config=t,Pe(this,qr,new Map)}build(t,n,r){const o=n.queryKey,l=n.queryHash??im(o,n);let a=this.get(l);return a||(a=new oN({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){H(this,qr).has(t.queryHash)||(H(this,qr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=H(this,qr).get(t.queryHash);n&&(t.destroy(),n===t&&H(this,qr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return H(this,qr).get(t)}getAll(){return[...H(this,qr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yx(t,r)):n}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},qr=new WeakMap,tb),Nt,Xi,Ji,Vs,Bs,eo,Us,Hs,nb,pN=(nb=class{constructor(e={}){$e(this,Nt);$e(this,Xi);$e(this,Ji);$e(this,Vs);$e(this,Bs);$e(this,eo);$e(this,Us);$e(this,Hs);Pe(this,Nt,e.queryCache||new hN),Pe(this,Xi,e.mutationCache||new fN),Pe(this,Ji,e.defaultOptions||{}),Pe(this,Vs,new Map),Pe(this,Bs,new Map),Pe(this,eo,0)}mount(){Zu(this,eo)._++,H(this,eo)===1&&(Pe(this,Us,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,Nt).onFocus())})),Pe(this,Hs,kc.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,Nt).onOnline())})))}unmount(){var e,t;Zu(this,eo)._--,H(this,eo)===0&&((e=H(this,Us))==null||e.call(this),Pe(this,Us,void 0),(t=H(this,Hs))==null||t.call(this),Pe(this,Hs,void 0))}isFetching(e){return H(this,Nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return H(this,Xi).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,Nt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=H(this,Nt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(to(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return H(this,Nt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=H(this,Nt).get(r.queryHash),l=o==null?void 0:o.state.data,a=QT(t,l);if(a!==void 0)return H(this,Nt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return nn.batch(()=>H(this,Nt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,Nt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=H(this,Nt);nn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=H(this,Nt);return nn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=nn.batch(()=>H(this,Nt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Fn).catch(Fn)}invalidateQueries(e,t={}){return nn.batch(()=>(H(this,Nt).findAll(e).forEach(n=>{n.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"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=nn.batch(()=>H(this,Nt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Fn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Fn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=H(this,Nt).build(this,t);return n.isStaleByTime(to(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Fn).catch(Fn)}fetchInfiniteQuery(e){return e.behavior=Ex(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Fn).catch(Fn)}ensureInfiniteQueryData(e){return e.behavior=Ex(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return kc.isOnline()?H(this,Xi).resumePausedMutations():Promise.resolve()}getQueryCache(){return H(this,Nt)}getMutationCache(){return H(this,Xi)}getDefaultOptions(){return H(this,Ji)}setDefaultOptions(e){Pe(this,Ji,e)}setQueryDefaults(e,t){H(this,Vs).set(sa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...H(this,Vs).values()],n={};return t.forEach(r=>{la(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){H(this,Bs).set(sa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...H(this,Bs).values()],n={};return t.forEach(r=>{la(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...H(this,Ji).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=im(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===om&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...H(this,Ji).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){H(this,Nt).clear(),H(this,Xi).clear()}},Nt=new WeakMap,Xi=new WeakMap,Ji=new WeakMap,Vs=new WeakMap,Bs=new WeakMap,eo=new WeakMap,Us=new WeakMap,Hs=new WeakMap,nb),zb=b.createContext(void 0),Mb=e=>{const t=b.useContext(zb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mN=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(zb.Provider,{value:e,children:t})),Lb=b.createContext(!1),gN=()=>b.useContext(Lb);Lb.Provider;function yN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vN=b.createContext(yN()),xN=()=>b.useContext(vN),wN=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Rb(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},bN=e=>{b.useEffect(()=>{e.clearReset()},[e])},kN=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Rb(n,[e.error,r])),SN=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},CN=(e,t)=>e.isLoading&&e.isFetching&&!t,EN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Px=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _N(e,t,n){var x,g,S,k;const r=gN(),o=xN(),l=Mb(),a=l.defaultQueryOptions(e);(g=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||g.call(x,a);const u=l.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",SN(a),wN(a,o,u),bN(o);const d=!l.getQueryCache().get(a.queryHash),[f]=b.useState(()=>new t(l,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const E=p?f.subscribe(nn.batchCalls(C)):Fn;return f.updateResult(),E},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(a)},[a,f]),EN(a,h))throw Px(a,f,o);if(kN({result:h,errorResetBoundary:o,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;if((k=(S=l.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||k.call(S,a,h),a.experimental_prefetchInRender&&!Lo&&CN(h,r)){const C=d?Px(a,f,o):u==null?void 0:u.promise;C==null||C.catch(Fn).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function Ta(e,t){return _N(e,sN)}async function PN(){const e=await fetch("/api/tasks");if(!e.ok)throw new Error("Failed to fetch tasks");return e.json()}async function TN(){const e=await fetch("/api/epics");if(!e.ok)throw new Error("Failed to fetch epics");return e.json()}async function NN(){const e=await fetch("/api/project");return e.ok?e.json():null}function RN(){return Ta({queryKey:["tasks"],queryFn:PN})}function jN(){return Ta({queryKey:["epics"],queryFn:TN})}function IN(){return Ta({queryKey:["project"],queryFn:NN})}function Kc(){const e=RN(),t=jN(),n=IN();return{tasks:e.data??[],epics:t.data??[],project:n.data??null,isLoading:e.isLoading||t.isLoading,error:e.error||t.error,refetch:()=>{e.refetch(),t.refetch(),n.refetch()}}}const Tx=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const x=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,x))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,o,u);return u},AN=(e=>e?Tx(e):Tx),ON=e=>e;function DN(e,t=ON){const n=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>t(e.getState()),[e,t]),le.useCallback(()=>t(e.getInitialState()),[e,t]));return le.useDebugValue(n),n}const Nx=e=>{const t=AN(e),n=r=>DN(t,r);return Object.assign(n,t),n},zN=(e=>e?Nx(e):Nx),Ws=zN(e=>({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{},connectionStatus:"disconnected",openTaskDetail:t=>e({selectedTaskId:t,selectedEpicId:null}),openEpicDetail:t=>e({selectedEpicId:t,selectedTaskId:null}),openCreateModal:(t={})=>e({showCreateModal:!0,createModalDefaults:t}),closeTaskDetail:()=>e({selectedTaskId:null}),closeEpicDetail:()=>e({selectedEpicId:null}),closeCreateModal:()=>e({showCreateModal:!1,createModalDefaults:{}}),closeAllModals:()=>e({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{}}),setConnectionStatus:t=>e({connectionStatus:t})}));/**
52
+ * @license lucide-react v0.562.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const MN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),LN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Rx=e=>{const t=LN(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),FN=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
57
+ * @license lucide-react v0.562.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */var $N={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"};/**
62
+ * @license lucide-react v0.562.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const VN=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:l,iconNode:a,...u},d)=>b.createElement("svg",{ref:d,...$N,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fb("lucide",o),...!l&&!FN(u)&&{"aria-hidden":"true"},...u},[...a.map(([f,h])=>b.createElement(f,h)),...Array.isArray(l)?l:[l]]));/**
67
+ * @license lucide-react v0.562.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const ut=(e,t)=>{const n=b.forwardRef(({className:r,...o},l)=>b.createElement(VN,{ref:l,iconNode:t,className:Fb(`lucide-${MN(Rx(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Rx(e),n};/**
72
+ * @license lucide-react v0.562.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const BN=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],UN=ut("archive",BN);/**
77
+ * @license lucide-react v0.562.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const HN=[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]],$b=ut("arrow-left-to-line",HN);/**
82
+ * @license lucide-react v0.562.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const WN=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M21 12H7",key:"13ipq5"}],["path",{d:"m15 18 6-6-6-6",key:"6tx3qv"}]],Vb=ut("arrow-right-from-line",WN);/**
87
+ * @license lucide-react v0.562.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const ZN=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],qN=ut("bell-off",ZN);/**
92
+ * @license lucide-react v0.562.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const QN=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],YN=ut("bell-ring",QN);/**
97
+ * @license lucide-react v0.562.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const KN=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],jx=ut("bell",KN);/**
102
+ * @license lucide-react v0.562.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const GN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],XN=ut("check",GN);/**
107
+ * @license lucide-react v0.562.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const JN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bb=ut("chevron-down",JN);/**
112
+ * @license lucide-react v0.562.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const eR=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ub=ut("chevron-left",eR);/**
117
+ * @license lucide-react v0.562.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const tR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gc=ut("chevron-right",tR);/**
122
+ * @license lucide-react v0.562.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const nR=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rR=ut("chevron-up",nR);/**
127
+ * @license lucide-react v0.562.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const iR=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],oR=ut("git-branch-plus",iR);/**
132
+ * @license lucide-react v0.562.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const sR=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],am=ut("git-branch",sR);/**
137
+ * @license lucide-react v0.562.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const lR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Hb=ut("history",lR);/**
142
+ * @license lucide-react v0.562.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const aR=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],uR=ut("kanban",aR);/**
147
+ * @license lucide-react v0.562.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const cR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Na=ut("layers",cR);/**
152
+ * @license lucide-react v0.562.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const dR=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],fR=ut("list",dR);/**
157
+ * @license lucide-react v0.562.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const hR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],pR=ut("message-square",hR);/**
162
+ * @license lucide-react v0.562.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const mR=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],gR=ut("moon",mR);/**
167
+ * @license lucide-react v0.562.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const yR=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],vR=ut("package",yR);/**
172
+ * @license lucide-react v0.562.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const xR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],um=ut("pencil",xR);/**
177
+ * @license lucide-react v0.562.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const wR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xc=ut("plus",wR);/**
182
+ * @license lucide-react v0.562.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const bR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kR=ut("search",bR);/**
187
+ * @license lucide-react v0.562.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const SR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ra=ut("square-check",SR);/**
192
+ * @license lucide-react v0.562.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const CR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ER=ut("square-x",CR);/**
197
+ * @license lucide-react v0.562.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const _R=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],PR=ut("square",_R);/**
202
+ * @license lucide-react v0.562.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const TR=[["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"}]],NR=ut("sun",TR);/**
207
+ * @license lucide-react v0.562.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const RR=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cm=ut("trash-2",RR);/**
212
+ * @license lucide-react v0.562.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const jR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wb=ut("x",jR);function Ix(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Js(...e){return t=>{let n=!1;const r=e.map(o=>{const l=Ix(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<r.length;o++){const l=r[o];typeof l=="function"?l():Ix(e[o],null)}}}}function at(...e){return b.useCallback(Js(...e),e)}var IR=Symbol.for("react.lazy"),Sc=Xp[" use ".trim().toString()];function AR(e){return typeof e=="object"&&e!==null&&"then"in e}function Zb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===IR&&"_payload"in e&&AR(e._payload)}function dm(e){const t=OR(e),n=b.forwardRef((r,o)=>{let{children:l,...a}=r;Zb(l)&&typeof Sc=="function"&&(l=Sc(l._payload));const u=b.Children.toArray(l),d=u.find(zR);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var qb=dm("Slot");function OR(e){const t=b.forwardRef((n,r)=>{let{children:o,...l}=n;if(Zb(o)&&typeof Sc=="function"&&(o=Sc(o._payload)),b.isValidElement(o)){const a=LR(o),u=MR(l,o.props);return o.type!==b.Fragment&&(u.ref=r?Js(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DR=Symbol("radix.slottable");function zR(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DR}function MR(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function LR(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Qb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Qb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yb(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qb(e))&&(r&&(r+=" "),r+=t);return r}const Ax=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ox=Yb,Kb=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ox(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,a=Object.keys(o).map(f=>{const h=n==null?void 0:n[f],p=l==null?void 0:l[f];if(h===null)return null;const x=Ax(h)||Ax(p);return o[f][x]}),u=n&&Object.entries(n).reduce((f,h)=>{let[p,x]=h;return x===void 0||(f[p]=x),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:x,...g}=h;return Object.entries(g).every(S=>{let[k,C]=S;return Array.isArray(C)?C.includes({...l,...u}[k]):{...l,...u}[k]===C})?[...f,p,x]:f},[]);return Ox(e,a,d,n==null?void 0:n.class,n==null?void 0:n.className)},FR=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},$R=(e,t)=>({classGroupId:e,validator:t}),Gb=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cc="-",Dx=[],VR="arbitrary..",BR=e=>{const t=HR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return UR(a);const u=a.split(Cc),d=u[0]===""&&u.length>1?1:0;return Xb(u,d,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const d=r[a],f=n[a];return d?f?FR(f,d):d:f||Dx}return n[a]||Dx}}},Xb=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const f=Xb(e,t+1,l);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(Cc):e.slice(t).join(Cc),d=a.length;for(let f=0;f<d;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},UR=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?VR+r:void 0})(),HR=e=>{const{theme:t,classGroups:n}=e;return WR(n,t)},WR=(e,t)=>{const n=Gb();for(const r in e){const o=e[r];fm(o,n,r,t)}return n},fm=(e,t,n,r)=>{const o=e.length;for(let l=0;l<o;l++){const a=e[l];ZR(a,t,n,r)}},ZR=(e,t,n,r)=>{if(typeof e=="string"){qR(e,t,n);return}if(typeof e=="function"){QR(e,t,n,r);return}YR(e,t,n,r)},qR=(e,t,n)=>{const r=e===""?t:Jb(t,e);r.classGroupId=n},QR=(e,t,n,r)=>{if(KR(e)){fm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($R(n,e))},YR=(e,t,n,r)=>{const o=Object.entries(e),l=o.length;for(let a=0;a<l;a++){const[u,d]=o[a];fm(d,Jb(t,u),n,r)}},Jb=(e,t)=>{let n=e;const r=t.split(Cc),o=r.length;for(let l=0;l<o;l++){const a=r[l];let u=n.nextPart.get(a);u||(u=Gb(),n.nextPart.set(a,u)),n=u}return n},KR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(l,a)=>{n[l]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(l){let a=n[l];if(a!==void 0)return a;if((a=r[l])!==void 0)return o(l,a),a},set(l,a){l in n?n[l]=a:o(l,a)}}},gp="!",zx=":",XR=[],Mx=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),JR=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const l=[];let a=0,u=0,d=0,f;const h=o.length;for(let k=0;k<h;k++){const C=o[k];if(a===0&&u===0){if(C===zx){l.push(o.slice(d,k)),d=k+1;continue}if(C==="/"){f=k;continue}}C==="["?a++:C==="]"?a--:C==="("?u++:C===")"&&u--}const p=l.length===0?o:o.slice(d);let x=p,g=!1;p.endsWith(gp)?(x=p.slice(0,-1),g=!0):p.startsWith(gp)&&(x=p.slice(1),g=!0);const S=f&&f>d?f-d:void 0;return Mx(l,g,x,S)};if(t){const o=t+zx,l=r;r=a=>a.startsWith(o)?l(a.slice(o.length)):Mx(XR,!1,a,void 0,!0)}if(n){const o=r;r=l=>n({className:l,parseClassName:o})}return r},ej=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let l=0;l<n.length;l++){const a=n[l],u=a[0]==="[",d=t.has(a);u||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},tj=e=>({cache:GR(e.cacheSize),parseClassName:JR(e),sortModifiers:ej(e),...BR(e)}),nj=/\s+/,rj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:l}=t,a=[],u=e.trim().split(nj);let d="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:x,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:k}=n(h);if(p){d=h+(d.length>0?" "+d:d);continue}let C=!!k,E=r(C?S.substring(0,k):S);if(!E){if(!C){d=h+(d.length>0?" "+d:d);continue}if(E=r(S),!E){d=h+(d.length>0?" "+d:d);continue}C=!1}const _=x.length===0?"":x.length===1?x[0]:l(x).join(":"),T=g?_+gp:_,I=T+E;if(a.indexOf(I)>-1)continue;a.push(I);const O=o(E,C);for(let R=0;R<O.length;++R){const V=O[R];a.push(T+V)}d=h+(d.length>0?" "+d:d)}return d},ij=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ek(n))&&(o&&(o+=" "),o+=r);return o},ek=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ek(e[r]))&&(n&&(n+=" "),n+=t);return n},oj=(e,...t)=>{let n,r,o,l;const a=d=>{const f=t.reduce((h,p)=>p(h),e());return n=tj(f),r=n.cache.get,o=n.cache.set,l=u,u(d)},u=d=>{const f=r(d);if(f)return f;const h=rj(d,n);return o(d,h),h};return l=a,(...d)=>l(ij(...d))},sj=[],Ht=e=>{const t=n=>n[e]||sj;return t.isThemeGetter=!0,t},tk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lj=/^\d+\/\d+$/,aj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uj=/\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$/,cj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>lj.test(e),Ze=e=>!!e&&!Number.isNaN(Number(e)),Ui=e=>!!e&&Number.isInteger(Number(e)),Sh=e=>e.endsWith("%")&&Ze(e.slice(0,-1)),di=e=>aj.test(e),hj=()=>!0,pj=e=>uj.test(e)&&!cj.test(e),rk=()=>!1,mj=e=>dj.test(e),gj=e=>fj.test(e),yj=e=>!Re(e)&&!je(e),vj=e=>el(e,sk,rk),Re=e=>tk.test(e),Co=e=>el(e,lk,pj),Ch=e=>el(e,Sj,Ze),Lx=e=>el(e,ik,rk),xj=e=>el(e,ok,gj),Ku=e=>el(e,ak,mj),je=e=>nk.test(e),Wl=e=>tl(e,lk),wj=e=>tl(e,Cj),Fx=e=>tl(e,ik),bj=e=>tl(e,sk),kj=e=>tl(e,ok),Gu=e=>tl(e,ak,!0),el=(e,t,n)=>{const r=tk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tl=(e,t,n=!1)=>{const r=nk.exec(e);return r?r[1]?t(r[1]):n:!1},ik=e=>e==="position"||e==="percentage",ok=e=>e==="image"||e==="url",sk=e=>e==="length"||e==="size"||e==="bg-size",lk=e=>e==="length",Sj=e=>e==="number",Cj=e=>e==="family-name",ak=e=>e==="shadow",Ej=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),o=Ht("tracking"),l=Ht("leading"),a=Ht("breakpoint"),u=Ht("container"),d=Ht("spacing"),f=Ht("radius"),h=Ht("shadow"),p=Ht("inset-shadow"),x=Ht("text-shadow"),g=Ht("drop-shadow"),S=Ht("blur"),k=Ht("perspective"),C=Ht("aspect"),E=Ht("ease"),_=Ht("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...I(),je,Re],R=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],Q=()=>[je,Re,d],oe=()=>[xs,"full","auto",...Q()],A=()=>[Ui,"none","subgrid",je,Re],K=()=>["auto",{span:["full",Ui,je,Re]},Ui,je,Re],M=()=>[Ui,"auto",je,Re],ne=()=>["auto","min","max","fr",je,Re],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...Q()],ee=()=>[xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],D=()=>[e,je,Re],G=()=>[...I(),Fx,Lx,{position:[je,Re]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",bj,vj,{size:[je,Re]}],Y=()=>[Sh,Wl,Co],j=()=>["","none","full",f,je,Re],ue=()=>["",Ze,Wl,Co],ye=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ze,Sh,Fx,Lx],ve=()=>["","none",S,je,Re],Ce=()=>["none",Ze,je,Re],ke=()=>["none",Ze,je,Re],Ae=()=>[Ze,je,Re],Ve=()=>[xs,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[di],breakpoint:[di],color:[hj],container:[di],"drop-shadow":[di],ease:["in","out","in-out"],font:[yj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[di],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[di],shadow:[di],spacing:["px",Ze],text:[di],"text-shadow":[di],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xs,Re,je,C]}],container:["container"],columns:[{columns:[Ze,Re,je,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:O()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{start:oe()}],end:[{end:oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[Ui,"auto",je,Re]}],basis:[{basis:[xs,"full","auto",u,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ze,xs,"auto","initial","none",Re]}],grow:[{grow:["",Ze,je,Re]}],shrink:[{shrink:["",Ze,je,Re]}],order:[{order:[Ui,"first","last","none",je,Re]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[u,"screen",...ee()]}],"min-w":[{"min-w":[u,"screen","none",...ee()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,Wl,Co]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,Ch]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sh,Re]}],"font-family":[{font:[wj,Re,t]}],"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:[o,je,Re]}],"line-clamp":[{"line-clamp":[Ze,"none",je,Ch]}],leading:[{leading:[l,...Q()]}],"list-image":[{"list-image":["none",je,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ze,"from-font","auto",je,Co]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ze,"auto",je,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ui,je,Re],radial:["",je,Re],conic:[Ui,je,Re]},kj,xj]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ze,je,Re]}],"outline-w":[{outline:["",Ze,Wl,Co]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,Gu,Ku]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,Gu,Ku]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ze,Co]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",x,Gu,Ku]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Ze,je,Re]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[je,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[Ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Re]}],filter:[{filter:["","none",je,Re]}],blur:[{blur:ve()}],brightness:[{brightness:[Ze,je,Re]}],contrast:[{contrast:[Ze,je,Re]}],"drop-shadow":[{"drop-shadow":["","none",g,Gu,Ku]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Ze,je,Re]}],"hue-rotate":[{"hue-rotate":[Ze,je,Re]}],invert:[{invert:["",Ze,je,Re]}],saturate:[{saturate:[Ze,je,Re]}],sepia:[{sepia:["",Ze,je,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Re]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Ze,je,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ze,je,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ze,je,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ze,je,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ze,je,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ze,je,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ze,je,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ze,je,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ze,"initial",je,Re]}],ease:[{ease:["linear","initial",E,je,Re]}],delay:[{delay:[Ze,je,Re]}],animate:[{animate:["none",_,je,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,Re]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[je,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",je,Re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"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",je,Re]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Ze,Wl,Co,Ch]}],stroke:[{stroke:["none",...D()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_j=oj(Ej);function We(...e){return _j(Yb(e))}const Pj=Kb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),gt=b.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,...o},l)=>{const a=r?qb:"button";return y.jsx(a,{ref:l,"data-slot":"button","data-variant":t,"data-size":n,className:We(Pj({variant:t,size:n,className:e})),...o})});gt.displayName="Button";const uk=b.createContext(void 0),ck="theme";function dk(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Tj(){if(typeof window>"u")return"system";const e=localStorage.getItem(ck);return e==="light"||e==="dark"||e==="system"?e:"system"}function $x(e){return e==="system"?dk():e}function Nj({children:e,defaultTheme:t="system",disableTransitionOnChange:n=!1}){const[r,o]=b.useState(()=>typeof window>"u"?t:Tj()),[l,a]=b.useState(()=>$x(r)),u=d=>{o(d),localStorage.setItem(ck,d)};return b.useEffect(()=>{const d=$x(r);a(d);const f=document.documentElement;n&&f.style.setProperty("transition","none"),f.classList.remove("light","dark"),f.classList.add(d),n&&(f.offsetHeight,f.style.removeProperty("transition"))},[r,n]),b.useEffect(()=>{if(r!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>{a(dk())};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[r]),y.jsx(uk.Provider,{value:{theme:r,setTheme:u,resolvedTheme:l},children:e})}function Rj(){const e=b.useContext(uk);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function jj(){const{setTheme:e,resolvedTheme:t}=Rj(),n=()=>{e(t==="dark"?"light":"dark")};return y.jsxs(gt,{variant:"outline",size:"icon",onClick:n,children:[t==="dark"?y.jsx(gR,{className:"h-4 w-4"}):y.jsx(NR,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Qe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ij(e,t){const n=b.createContext(t),r=l=>{const{children:a,...u}=l,d=b.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:a})};r.displayName=e+"Provider";function o(l){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[r,o]}function nl(e,t=[]){let n=[];function r(l,a){const u=b.createContext(a),d=n.length;n=[...n,a];const f=p=>{var E;const{scope:x,children:g,...S}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,C=b.useMemo(()=>S,Object.values(S));return y.jsx(k.Provider,{value:C,children:g})};f.displayName=l+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,S=b.useContext(g);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[f,h]}const o=()=>{const l=n.map(a=>b.createContext(a));return function(u){const d=(u==null?void 0:u[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,Aj(o,...t)]}function Aj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const a=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(l)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Oj(e){const t=Dj(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(Mj);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function Dj(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=Fj(o),u=Lj(l,o.props);return o.type!==b.Fragment&&(u.ref=r?Js(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zj=Symbol("radix.slottable");function Mj(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zj}function Lj(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function Fj(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $j=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=$j.reduce((e,t)=>{const n=Oj(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vj(e,t){e&&_a.flushSync(()=>e.dispatchEvent(t))}function Vn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Bj(e,t=globalThis==null?void 0:globalThis.document){const n=Vn(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Uj="DismissableLayer",yp="dismissableLayer.update",Hj="dismissableLayer.pointerDownOutside",Wj="dismissableLayer.focusOutside",Vx,fk=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:a,onDismiss:u,...d}=e,f=b.useContext(fk),[h,p]=b.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=b.useState({}),S=at(t,V=>p(V)),k=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(C),_=h?k.indexOf(h):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,I=_>=E,O=Qj(V=>{const Q=V.target,oe=[...f.branches].some(A=>A.contains(Q));!I||oe||(o==null||o(V),a==null||a(V),V.defaultPrevented||u==null||u())},x),R=Yj(V=>{const Q=V.target;[...f.branches].some(A=>A.contains(Q))||(l==null||l(V),a==null||a(V),V.defaultPrevented||u==null||u())},x);return Bj(V=>{_===f.layers.size-1&&(r==null||r(V),!V.defaultPrevented&&u&&(V.preventDefault(),u()))},x),b.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Vx=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Bx(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Vx)}},[h,x,n,f]),b.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Bx())},[h,f]),b.useEffect(()=>{const V=()=>g({});return document.addEventListener(yp,V),()=>document.removeEventListener(yp,V)},[]),y.jsx(tt.div,{...d,ref:S,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Qe(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Qe(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Qe(e.onPointerDownCapture,O.onPointerDownCapture)})});Jc.displayName=Uj;var Zj="DismissableLayerBranch",qj=b.forwardRef((e,t)=>{const n=b.useContext(fk),r=b.useRef(null),o=at(t,r);return b.useEffect(()=>{const l=r.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),y.jsx(tt.div,{...e,ref:o})});qj.displayName=Zj;function Qj(e,t=globalThis==null?void 0:globalThis.document){const n=Vn(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const l=u=>{if(u.target&&!r.current){let d=function(){hk(Hj,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yj(e,t=globalThis==null?void 0:globalThis.document){const n=Vn(e),r=b.useRef(!1);return b.useEffect(()=>{const o=l=>{l.target&&!r.current&&hk(Wj,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bx(){const e=new CustomEvent(yp);document.dispatchEvent(e)}function hk(e,t,n,{discrete:r}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Vj(o,l):o.dispatchEvent(l)}var rn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Kj=Xp[" useId ".trim().toString()]||(()=>{}),Gj=0;function Mo(e){const[t,n]=b.useState(Kj());return rn(()=>{n(r=>r??String(Gj++))},[e]),e||(t?`radix-${t}`:"")}const Xj=["top","right","bottom","left"],ro=Math.min,er=Math.max,Ec=Math.round,Xu=Math.floor,Kr=e=>({x:e,y:e}),Jj={left:"right",right:"left",bottom:"top",top:"bottom"},e2={start:"end",end:"start"};function vp(e,t,n){return er(e,ro(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function xi(e){return e.split("-")[0]}function rl(e){return e.split("-")[1]}function hm(e){return e==="x"?"y":"x"}function pm(e){return e==="y"?"height":"width"}const t2=new Set(["top","bottom"]);function Yr(e){return t2.has(xi(e))?"y":"x"}function mm(e){return hm(Yr(e))}function n2(e,t,n){n===void 0&&(n=!1);const r=rl(e),o=mm(e),l=pm(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(a=_c(a)),[a,_c(a)]}function r2(e){const t=_c(e);return[xp(e),t,xp(t)]}function xp(e){return e.replace(/start|end/g,t=>e2[t])}const Ux=["left","right"],Hx=["right","left"],i2=["top","bottom"],o2=["bottom","top"];function s2(e,t,n){switch(e){case"top":case"bottom":return n?t?Hx:Ux:t?Ux:Hx;case"left":case"right":return t?i2:o2;default:return[]}}function l2(e,t,n,r){const o=rl(e);let l=s2(xi(e),n==="start",r);return o&&(l=l.map(a=>a+"-"+o),t&&(l=l.concat(l.map(xp)))),l}function _c(e){return e.replace(/left|right|bottom|top/g,t=>Jj[t])}function a2(e){return{top:0,right:0,bottom:0,left:0,...e}}function pk(e){return typeof e!="number"?a2(e):{top:e,right:e,bottom:e,left:e}}function Pc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Wx(e,t,n){let{reference:r,floating:o}=e;const l=Yr(t),a=mm(t),u=pm(a),d=xi(t),f=l==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,x=r[u]/2-o[u]/2;let g;switch(d){case"top":g={x:h,y:r.y-o.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(rl(t)){case"start":g[a]-=x*(n&&f?-1:1);break;case"end":g[a]+=x*(n&&f?-1:1);break}return g}const u2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:a}=n,u=l.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=Wx(f,r,d),x=r,g={},S=0;for(let k=0;k<u.length;k++){const{name:C,fn:E}=u[k],{x:_,y:T,data:I,reset:O}=await E({x:h,y:p,initialPlacement:r,placement:x,strategy:o,middlewareData:g,rects:f,platform:a,elements:{reference:e,floating:t}});h=_??h,p=T??p,g={...g,[C]:{...g[C],...I}},O&&S<=50&&(S++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(f=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:h,y:p}=Wx(f,x,d)),k=-1)}return{x:h,y:p,placement:x,strategy:o,middlewareData:g}};async function aa(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:a,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:x=!1,padding:g=0}=vi(t,e),S=pk(g),C=u[x?p==="floating"?"reference":"floating":p],E=Pc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:d})),_=p==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),I=await(l.isElement==null?void 0:l.isElement(T))?await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Pc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:T,strategy:d}):_);return{top:(E.top-O.top+S.top)/I.y,bottom:(O.bottom-E.bottom+S.bottom)/I.y,left:(E.left-O.left+S.left)/I.x,right:(O.right-E.right+S.right)/I.x}}const c2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:l,platform:a,elements:u,middlewareData:d}=t,{element:f,padding:h=0}=vi(e,t)||{};if(f==null)return{};const p=pk(h),x={x:n,y:r},g=mm(o),S=pm(g),k=await a.getDimensions(f),C=g==="y",E=C?"top":"left",_=C?"bottom":"right",T=C?"clientHeight":"clientWidth",I=l.reference[S]+l.reference[g]-x[g]-l.floating[S],O=x[g]-l.reference[g],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let V=R?R[T]:0;(!V||!await(a.isElement==null?void 0:a.isElement(R)))&&(V=u.floating[T]||l.floating[S]);const Q=I/2-O/2,oe=V/2-k[S]/2-1,A=ro(p[E],oe),K=ro(p[_],oe),M=A,ne=V-k[S]-K,W=V/2-k[S]/2+Q,B=vp(M,W,ne),q=!d.arrow&&rl(o)!=null&&W!==B&&l.reference[S]/2-(W<M?A:K)-k[S]/2<0,ee=q?W<M?W-M:W-ne:0;return{[g]:x[g]+ee,data:{[g]:B,centerOffset:W-B-ee,...q&&{alignmentOffset:ee}},reset:q}}}),d2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:a,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...C}=vi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const E=xi(o),_=Yr(u),T=xi(u)===u,I=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=x||(T||!k?[_c(u)]:r2(u)),R=S!=="none";!x&&R&&O.push(...l2(u,k,S,I));const V=[u,...O],Q=await aa(t,C),oe=[];let A=((r=l.flip)==null?void 0:r.overflows)||[];if(h&&oe.push(Q[E]),p){const W=n2(o,a,I);oe.push(Q[W[0]],Q[W[1]])}if(A=[...A,{placement:o,overflows:oe}],!oe.every(W=>W<=0)){var K,M;const W=(((K=l.flip)==null?void 0:K.index)||0)+1,B=V[W];if(B&&(!(p==="alignment"?_!==Yr(B):!1)||A.every(D=>Yr(D.placement)===_?D.overflows[0]>0:!0)))return{data:{index:W,overflows:A},reset:{placement:B}};let q=(M=A.filter(ee=>ee.overflows[0]<=0).sort((ee,D)=>ee.overflows[1]-D.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(g){case"bestFit":{var ne;const ee=(ne=A.filter(D=>{if(R){const G=Yr(D.placement);return G===_||G==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(G=>G>0).reduce((G,N)=>G+N,0)]).sort((D,G)=>D[1]-G[1])[0])==null?void 0:ne[0];ee&&(q=ee);break}case"initialPlacement":q=u;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function Zx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qx(e){return Xj.some(t=>e[t]>=0)}const f2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=vi(e,t);switch(r){case"referenceHidden":{const l=await aa(t,{...o,elementContext:"reference"}),a=Zx(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qx(a)}}}case"escaped":{const l=await aa(t,{...o,altBoundary:!0}),a=Zx(l,n.floating);return{data:{escapedOffsets:a,escaped:qx(a)}}}default:return{}}}}},mk=new Set(["left","top"]);async function h2(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=xi(n),u=rl(n),d=Yr(n)==="y",f=mk.has(a)?-1:1,h=l&&d?-1:1,p=vi(t,e);let{mainAxis:x,crossAxis:g,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof S=="number"&&(g=u==="end"?S*-1:S),d?{x:g*h,y:x*f}:{x:x*f,y:g*h}}const p2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:a,middlewareData:u}=t,d=await h2(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:l+d.y,data:{...d,placement:a}}}}},m2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:u={fn:C=>{let{x:E,y:_}=C;return{x:E,y:_}}},...d}=vi(e,t),f={x:n,y:r},h=await aa(t,d),p=Yr(xi(o)),x=hm(p);let g=f[x],S=f[p];if(l){const C=x==="y"?"top":"left",E=x==="y"?"bottom":"right",_=g+h[C],T=g-h[E];g=vp(_,g,T)}if(a){const C=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=S+h[C],T=S-h[E];S=vp(_,S,T)}const k=u.fn({...t,[x]:g,[p]:S});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[x]:l,[p]:a}}}}}},g2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:l,middlewareData:a}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=vi(e,t),h={x:n,y:r},p=Yr(o),x=hm(p);let g=h[x],S=h[p];const k=vi(u,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const T=x==="y"?"height":"width",I=l.reference[x]-l.floating[T]+C.mainAxis,O=l.reference[x]+l.reference[T]-C.mainAxis;g<I?g=I:g>O&&(g=O)}if(f){var E,_;const T=x==="y"?"width":"height",I=mk.has(xi(o)),O=l.reference[p]-l.floating[T]+(I&&((E=a.offset)==null?void 0:E[p])||0)+(I?0:C.crossAxis),R=l.reference[p]+l.reference[T]+(I?0:((_=a.offset)==null?void 0:_[p])||0)-(I?C.crossAxis:0);S<O?S=O:S>R&&(S=R)}return{[x]:g,[p]:S}}}},y2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:a,elements:u}=t,{apply:d=()=>{},...f}=vi(e,t),h=await aa(t,f),p=xi(o),x=rl(o),g=Yr(o)==="y",{width:S,height:k}=l.floating;let C,E;p==="top"||p==="bottom"?(C=p,E=x===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(E=p,C=x==="end"?"top":"bottom");const _=k-h.top-h.bottom,T=S-h.left-h.right,I=ro(k-h[C],_),O=ro(S-h[E],T),R=!t.middlewareData.shift;let V=I,Q=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(Q=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(V=_),R&&!x){const A=er(h.left,0),K=er(h.right,0),M=er(h.top,0),ne=er(h.bottom,0);g?Q=S-2*(A!==0||K!==0?A+K:er(h.left,h.right)):V=k-2*(M!==0||ne!==0?M+ne:er(h.top,h.bottom))}await d({...t,availableWidth:Q,availableHeight:V});const oe=await a.getDimensions(u.floating);return S!==oe.width||k!==oe.height?{reset:{rects:!0}}:{}}}};function ed(){return typeof window<"u"}function il(e){return gk(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(gk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gk(e){return ed()?e instanceof Node||e instanceof nr(e).Node:!1}function Or(e){return ed()?e instanceof Element||e instanceof nr(e).Element:!1}function Gr(e){return ed()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function Qx(e){return!ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}const v2=new Set(["inline","contents"]);function ja(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!v2.has(o)}const x2=new Set(["table","td","th"]);function w2(e){return x2.has(il(e))}const b2=[":popover-open",":modal"];function td(e){return b2.some(t=>{try{return e.matches(t)}catch{return!1}})}const k2=["transform","translate","scale","rotate","perspective"],S2=["transform","translate","scale","rotate","perspective","filter"],C2=["paint","layout","strict","content"];function gm(e){const t=ym(),n=Or(e)?Dr(e):e;return k2.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||S2.some(r=>(n.willChange||"").includes(r))||C2.some(r=>(n.contain||"").includes(r))}function E2(e){let t=io(e);for(;Gr(t)&&!Zs(t);){if(gm(t))return t;if(td(t))return null;t=io(t)}return null}function ym(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _2=new Set(["html","body","#document"]);function Zs(e){return _2.has(il(e))}function Dr(e){return nr(e).getComputedStyle(e)}function nd(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function io(e){if(il(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qx(e)&&e.host||Xr(e);return Qx(t)?t.host:t}function yk(e){const t=io(e);return Zs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&ja(t)?t:yk(t)}function ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yk(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),a=nr(o);if(l){const u=wp(a);return t.concat(a,a.visualViewport||[],ja(o)?o:[],u&&n?ua(u):[])}return t.concat(o,ua(o,[],n))}function wp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vk(e){const t=Dr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gr(e),l=o?e.offsetWidth:n,a=o?e.offsetHeight:r,u=Ec(n)!==l||Ec(r)!==a;return u&&(n=l,r=a),{width:n,height:r,$:u}}function vm(e){return Or(e)?e:e.contextElement}function Ns(e){const t=vm(e);if(!Gr(t))return Kr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=vk(t);let a=(l?Ec(n.width):n.width)/r,u=(l?Ec(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const P2=Kr(0);function xk(e){const t=nr(e);return!ym()||!t.visualViewport?P2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nr(e)?!1:t}function Fo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=vm(e);let a=Kr(1);t&&(r?Or(r)&&(a=Ns(r)):a=Ns(e));const u=T2(l,n,r)?xk(l):Kr(0);let d=(o.left+u.x)/a.x,f=(o.top+u.y)/a.y,h=o.width/a.x,p=o.height/a.y;if(l){const x=nr(l),g=r&&Or(r)?nr(r):r;let S=x,k=wp(S);for(;k&&r&&g!==S;){const C=Ns(k),E=k.getBoundingClientRect(),_=Dr(k),T=E.left+(k.clientLeft+parseFloat(_.paddingLeft))*C.x,I=E.top+(k.clientTop+parseFloat(_.paddingTop))*C.y;d*=C.x,f*=C.y,h*=C.x,p*=C.y,d+=T,f+=I,S=nr(k),k=wp(S)}}return Pc({width:h,height:p,x:d,y:f})}function rd(e,t){const n=nd(e).scrollLeft;return t?t.left+n:Fo(Xr(e)).left+n}function wk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rd(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function N2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",a=Xr(r),u=t?td(t.floating):!1;if(r===a||u&&l)return n;let d={scrollLeft:0,scrollTop:0},f=Kr(1);const h=Kr(0),p=Gr(r);if((p||!p&&!l)&&((il(r)!=="body"||ja(a))&&(d=nd(r)),Gr(r))){const g=Fo(r);f=Ns(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const x=a&&!p&&!l?wk(a,d):Kr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+x.x,y:n.y*f.y-d.scrollTop*f.y+h.y+x.y}}function R2(e){return Array.from(e.getClientRects())}function j2(e){const t=Xr(e),n=nd(e),r=e.ownerDocument.body,o=er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+rd(e);const u=-n.scrollTop;return Dr(r).direction==="rtl"&&(a+=er(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:a,y:u}}const Yx=25;function I2(e,t){const n=nr(e),r=Xr(e),o=n.visualViewport;let l=r.clientWidth,a=r.clientHeight,u=0,d=0;if(o){l=o.width,a=o.height;const h=ym();(!h||h&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}const f=rd(r);if(f<=0){const h=r.ownerDocument,p=h.body,x=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,S=Math.abs(r.clientWidth-p.clientWidth-g);S<=Yx&&(l-=S)}else f<=Yx&&(l+=f);return{width:l,height:a,x:u,y:d}}const A2=new Set(["absolute","fixed"]);function O2(e,t){const n=Fo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Gr(e)?Ns(e):Kr(1),a=e.clientWidth*l.x,u=e.clientHeight*l.y,d=o*l.x,f=r*l.y;return{width:a,height:u,x:d,y:f}}function Kx(e,t,n){let r;if(t==="viewport")r=I2(e,n);else if(t==="document")r=j2(Xr(e));else if(Or(t))r=O2(t,n);else{const o=xk(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pc(r)}function bk(e,t){const n=io(e);return n===t||!Or(n)||Zs(n)?!1:Dr(n).position==="fixed"||bk(n,t)}function D2(e,t){const n=t.get(e);if(n)return n;let r=ua(e,[],!1).filter(u=>Or(u)&&il(u)!=="body"),o=null;const l=Dr(e).position==="fixed";let a=l?io(e):e;for(;Or(a)&&!Zs(a);){const u=Dr(a),d=gm(a);!d&&u.position==="fixed"&&(o=null),(l?!d&&!o:!d&&u.position==="static"&&!!o&&A2.has(o.position)||ja(a)&&!d&&bk(e,a))?r=r.filter(h=>h!==a):o=u,a=io(a)}return t.set(e,r),r}function z2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?td(t)?[]:D2(t,this._c):[].concat(n),r],u=a[0],d=a.reduce((f,h)=>{const p=Kx(t,h,o);return f.top=er(p.top,f.top),f.right=ro(p.right,f.right),f.bottom=ro(p.bottom,f.bottom),f.left=er(p.left,f.left),f},Kx(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function M2(e){const{width:t,height:n}=vk(e);return{width:t,height:n}}function L2(e,t,n){const r=Gr(t),o=Xr(t),l=n==="fixed",a=Fo(e,!0,l,t);let u={scrollLeft:0,scrollTop:0};const d=Kr(0);function f(){d.x=rd(o)}if(r||!r&&!l)if((il(t)!=="body"||ja(o))&&(u=nd(t)),r){const g=Fo(t,!0,l,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&f();l&&!r&&o&&f();const h=o&&!r&&!l?wk(o,u):Kr(0),p=a.left+u.scrollLeft-d.x-h.x,x=a.top+u.scrollTop-d.y-h.y;return{x:p,y:x,width:a.width,height:a.height}}function Eh(e){return Dr(e).position==="static"}function Gx(e,t){if(!Gr(e)||Dr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xr(e)===n&&(n=n.ownerDocument.body),n}function kk(e,t){const n=nr(e);if(td(e))return n;if(!Gr(e)){let o=io(e);for(;o&&!Zs(o);){if(Or(o)&&!Eh(o))return o;o=io(o)}return n}let r=Gx(e,t);for(;r&&w2(r)&&Eh(r);)r=Gx(r,t);return r&&Zs(r)&&Eh(r)&&!gm(r)?n:r||E2(e)||n}const F2=async function(e){const t=this.getOffsetParent||kk,n=this.getDimensions,r=await n(e.floating);return{reference:L2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $2(e){return Dr(e).direction==="rtl"}const V2={convertOffsetParentRelativeRectToViewportRelativeRect:N2,getDocumentElement:Xr,getClippingRect:z2,getOffsetParent:kk,getElementRects:F2,getClientRects:R2,getDimensions:M2,getScale:Ns,isElement:Or,isRTL:$2};function Sk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function B2(e,t){let n=null,r;const o=Xr(e);function l(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),l();const f=e.getBoundingClientRect(),{left:h,top:p,width:x,height:g}=f;if(u||t(),!x||!g)return;const S=Xu(p),k=Xu(o.clientWidth-(h+x)),C=Xu(o.clientHeight-(p+g)),E=Xu(h),T={rootMargin:-S+"px "+-k+"px "+-C+"px "+-E+"px",threshold:er(0,ro(1,d))||1};let I=!0;function O(R){const V=R[0].intersectionRatio;if(V!==d){if(!I)return a();V?a(!1,V):r=setTimeout(()=>{a(!1,1e-7)},1e3)}V===1&&!Sk(f,e.getBoundingClientRect())&&a(),I=!1}try{n=new IntersectionObserver(O,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return a(!0),l}function U2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=vm(e),h=o||l?[...f?ua(f):[],...ua(t)]:[];h.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),l&&E.addEventListener("resize",n)});const p=f&&u?B2(f,n):null;let x=-1,g=null;a&&(g=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var T;(T=g)==null||T.observe(t)})),n()}),f&&!d&&g.observe(f),g.observe(t));let S,k=d?Fo(e):null;d&&C();function C(){const E=Fo(e);k&&!Sk(k,E)&&n(),k=E,S=requestAnimationFrame(C)}return n(),()=>{var E;h.forEach(_=>{o&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),p==null||p(),(E=g)==null||E.disconnect(),g=null,d&&cancelAnimationFrame(S)}}const H2=p2,W2=m2,Z2=d2,q2=y2,Q2=f2,Xx=c2,Y2=g2,K2=(e,t,n)=>{const r=new Map,o={platform:V2,...n},l={...o.platform,_c:r};return u2(e,t,{...o,platform:l})};var G2=typeof document<"u",X2=function(){},mc=G2?b.useLayoutEffect:X2;function Tc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!Tc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Ck(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jx(e,t){const n=Ck(e);return Math.round(t*n)/n}function _h(e){const t=b.useRef(e);return mc(()=>{t.current=e}),t}function J2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:a}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[h,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,g]=b.useState(r);Tc(x,r)||g(r);const[S,k]=b.useState(null),[C,E]=b.useState(null),_=b.useCallback(D=>{D!==R.current&&(R.current=D,k(D))},[]),T=b.useCallback(D=>{D!==V.current&&(V.current=D,E(D))},[]),I=l||S,O=a||C,R=b.useRef(null),V=b.useRef(null),Q=b.useRef(h),oe=d!=null,A=_h(d),K=_h(o),M=_h(f),ne=b.useCallback(()=>{if(!R.current||!V.current)return;const D={placement:t,strategy:n,middleware:x};K.current&&(D.platform=K.current),K2(R.current,V.current,D).then(G=>{const N={...G,isPositioned:M.current!==!1};W.current&&!Tc(Q.current,N)&&(Q.current=N,_a.flushSync(()=>{p(N)}))})},[x,t,n,K,M]);mc(()=>{f===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[f]);const W=b.useRef(!1);mc(()=>(W.current=!0,()=>{W.current=!1}),[]),mc(()=>{if(I&&(R.current=I),O&&(V.current=O),I&&O){if(A.current)return A.current(I,O,ne);ne()}},[I,O,ne,A,oe]);const B=b.useMemo(()=>({reference:R,floating:V,setReference:_,setFloating:T}),[_,T]),q=b.useMemo(()=>({reference:I,floating:O}),[I,O]),ee=b.useMemo(()=>{const D={position:n,left:0,top:0};if(!q.floating)return D;const G=Jx(q.floating,h.x),N=Jx(q.floating,h.y);return u?{...D,transform:"translate("+G+"px, "+N+"px)",...Ck(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:N}},[n,u,q.floating,h.x,h.y]);return b.useMemo(()=>({...h,update:ne,refs:B,elements:q,floatingStyles:ee}),[h,ne,B,q,ee])}const eI=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Xx({element:r.current,padding:o}).fn(n):{}:r?Xx({element:r,padding:o}).fn(n):{}}}},tI=(e,t)=>({...H2(e),options:[e,t]}),nI=(e,t)=>({...W2(e),options:[e,t]}),rI=(e,t)=>({...Y2(e),options:[e,t]}),iI=(e,t)=>({...Z2(e),options:[e,t]}),oI=(e,t)=>({...q2(e),options:[e,t]}),sI=(e,t)=>({...Q2(e),options:[e,t]}),lI=(e,t)=>({...eI(e),options:[e,t]});var aI="Arrow",Ek=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...l}=e;return y.jsx(tt.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ek.displayName=aI;var uI=Ek;function cI(e){const[t,n]=b.useState(void 0);return rn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let a,u;if("borderBoxSize"in l){const d=l.borderBoxSize,f=Array.isArray(d)?d[0]:d;a=f.inlineSize,u=f.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xm="Popper",[_k,id]=nl(xm),[dI,Pk]=_k(xm),Tk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return y.jsx(dI,{scope:t,anchor:r,onAnchorChange:o,children:n})};Tk.displayName=xm;var Nk="PopperAnchor",Rk=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,l=Pk(Nk,n),a=b.useRef(null),u=at(t,a),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||a.current,f!==d.current&&l.onAnchorChange(d.current)}),r?null:y.jsx(tt.div,{...o,ref:u})});Rk.displayName=Nk;var wm="PopperContent",[fI,hI]=_k(wm),jk=b.forwardRef((e,t)=>{var ae,ve,Ce,ke,Ae,Ve;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:l="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:g="optimized",onPlaced:S,...k}=e,C=Pk(wm,n),[E,_]=b.useState(null),T=at(t,nt=>_(nt)),[I,O]=b.useState(null),R=cI(I),V=(R==null?void 0:R.width)??0,Q=(R==null?void 0:R.height)??0,oe=r+(l!=="center"?"-"+l:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},K=Array.isArray(f)?f:[f],M=K.length>0,ne={padding:A,boundary:K.filter(mI),altBoundary:M},{refs:W,floatingStyles:B,placement:q,isPositioned:ee,middlewareData:D}=J2({strategy:"fixed",placement:oe,whileElementsMounted:(...nt)=>U2(...nt,{animationFrame:g==="always"}),elements:{reference:C.anchor},middleware:[tI({mainAxis:o+Q,alignmentAxis:a}),d&&nI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?rI():void 0,...ne}),d&&iI({...ne}),oI({...ne,apply:({elements:nt,rects:At,availableWidth:sn,availableHeight:Gt})=>{const{width:ln,height:ir}=At.reference,En=nt.floating.style;En.setProperty("--radix-popper-available-width",`${sn}px`),En.setProperty("--radix-popper-available-height",`${Gt}px`),En.setProperty("--radix-popper-anchor-width",`${ln}px`),En.setProperty("--radix-popper-anchor-height",`${ir}px`)}}),I&&lI({element:I,padding:u}),gI({arrowWidth:V,arrowHeight:Q}),x&&sI({strategy:"referenceHidden",...ne})]}),[G,N]=Ok(q),L=Vn(S);rn(()=>{ee&&(L==null||L())},[ee,L]);const Y=(ae=D.arrow)==null?void 0:ae.x,j=(ve=D.arrow)==null?void 0:ve.y,ue=((Ce=D.arrow)==null?void 0:Ce.centerOffset)!==0,[ye,we]=b.useState();return rn(()=>{E&&we(window.getComputedStyle(E).zIndex)},[E]),y.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:ee?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(ke=D.transformOrigin)==null?void 0:ke.x,(Ae=D.transformOrigin)==null?void 0:Ae.y].join(" "),...((Ve=D.hide)==null?void 0:Ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(fI,{scope:n,placedSide:G,onArrowChange:O,arrowX:Y,arrowY:j,shouldHideArrow:ue,children:y.jsx(tt.div,{"data-side":G,"data-align":N,...k,ref:T,style:{...k.style,animation:ee?void 0:"none"}})})})});jk.displayName=wm;var Ik="PopperArrow",pI={top:"bottom",right:"left",bottom:"top",left:"right"},Ak=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,l=hI(Ik,r),a=pI[l.placedSide];return y.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:y.jsx(uI,{...o,ref:n,style:{...o.style,display:"block"}})})});Ak.displayName=Ik;function mI(e){return e!==null}var gI=e=>({name:"transformOrigin",options:e,fn(t){var C,E,_;const{placement:n,rects:r,middlewareData:o}=t,a=((C=o.arrow)==null?void 0:C.centerOffset)!==0,u=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[f,h]=Ok(n),p={start:"0%",center:"50%",end:"100%"}[h],x=(((E=o.arrow)==null?void 0:E.x)??0)+u/2,g=(((_=o.arrow)==null?void 0:_.y)??0)+d/2;let S="",k="";return f==="bottom"?(S=a?p:`${x}px`,k=`${-d}px`):f==="top"?(S=a?p:`${x}px`,k=`${r.floating.height+d}px`):f==="right"?(S=`${-d}px`,k=a?p:`${g}px`):f==="left"&&(S=`${r.floating.width+d}px`,k=a?p:`${g}px`),{data:{x:S,y:k}}}});function Ok(e){const[t,n="center"]=e.split("-");return[t,n]}var Dk=Tk,zk=Rk,Mk=jk,Lk=Ak,yI="Portal",od=b.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,l]=b.useState(!1);rn(()=>l(!0),[]);const a=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?_b.createPortal(y.jsx(tt.div,{...r,ref:t}),a):null});od.displayName=yI;function vI(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Jr=e=>{const{present:t,children:n}=e,r=xI(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),l=at(r.ref,wI(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:l}):null};Jr.displayName="Presence";function xI(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),l=b.useRef("none"),a=e?"mounted":"unmounted",[u,d]=vI(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=Ju(r.current);l.current=u==="mounted"?f:"none"},[u]),rn(()=>{const f=r.current,h=o.current;if(h!==e){const x=l.current,g=Ju(f);e?d("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&x!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),rn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=g=>{const k=Ju(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&k&&(d("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=g=>{g.target===t&&(l.current=Ju(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ju(e){return(e==null?void 0:e.animationName)||"none"}function wI(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bI=Symbol("radix.slottable");function kI(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=bI,t}var SI=Xp[" useInsertionEffect ".trim().toString()]||rn;function Nc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,l,a]=CI({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:o;{const h=b.useRef(e!==void 0);b.useEffect(()=>{const p=h.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=u},[u,r])}const f=b.useCallback(h=>{var p;if(u){const x=EI(h)?h(e):h;x!==e&&((p=a.current)==null||p.call(a,x))}else l(h)},[u,e,l,a]);return[d,f]}function CI({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),l=b.useRef(t);return SI(()=>{l.current=t},[t]),b.useEffect(()=>{var a;o.current!==n&&((a=l.current)==null||a.call(l,n),o.current=n)},[n,o]),[n,r,l]}function EI(e){return typeof e=="function"}var Fk=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_I="VisuallyHidden",$k=b.forwardRef((e,t)=>y.jsx(tt.span,{...e,ref:t,style:{...Fk,...e.style}}));$k.displayName=_I;var PI=$k,[sd]=nl("Tooltip",[id]),ld=id(),Vk="TooltipProvider",TI=700,bp="tooltip.open",[NI,bm]=sd(Vk),Bk=e=>{const{__scopeTooltip:t,delayDuration:n=TI,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:l}=e,a=b.useRef(!0),u=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(NI,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:b.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:l})};Bk.displayName=Vk;var ca="Tooltip",[RI,Ia]=sd(ca),Uk=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:l,disableHoverableContent:a,delayDuration:u}=e,d=bm(ca,e.__scopeTooltip),f=ld(t),[h,p]=b.useState(null),x=Mo(),g=b.useRef(0),S=a??d.disableHoverableContent,k=u??d.delayDuration,C=b.useRef(!1),[E,_]=Nc({prop:r,defaultProp:o??!1,onChange:V=>{V?(d.onOpen(),document.dispatchEvent(new CustomEvent(bp))):d.onClose(),l==null||l(V)},caller:ca}),T=b.useMemo(()=>E?C.current?"delayed-open":"instant-open":"closed",[E]),I=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,C.current=!1,_(!0)},[_]),O=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),R=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{C.current=!0,_(!0),g.current=0},k)},[k,_]);return b.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),y.jsx(Dk,{...f,children:y.jsx(RI,{scope:t,contentId:x,open:E,stateAttribute:T,trigger:h,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?R():I()},[d.isOpenDelayedRef,R,I]),onTriggerLeave:b.useCallback(()=>{S?O():(window.clearTimeout(g.current),g.current=0)},[O,S]),onOpen:I,onClose:O,disableHoverableContent:S,children:n})})};Uk.displayName=ca;var kp="TooltipTrigger",Hk=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ia(kp,n),l=bm(kp,n),a=ld(n),u=b.useRef(null),d=at(t,u,o.onTriggerChange),f=b.useRef(!1),h=b.useRef(!1),p=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),y.jsx(zk,{asChild:!0,...a,children:y.jsx(tt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:Qe(e.onPointerMove,x=>{x.pointerType!=="touch"&&!h.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Qe(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Qe(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Qe(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:Qe(e.onBlur,o.onClose),onClick:Qe(e.onClick,o.onClose)})})});Hk.displayName=kp;var km="TooltipPortal",[jI,II]=sd(km,{forceMount:void 0}),Wk=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,l=Ia(km,t);return y.jsx(jI,{scope:t,forceMount:n,children:y.jsx(Jr,{present:n||l.open,children:y.jsx(od,{asChild:!0,container:o,children:r})})})};Wk.displayName=km;var qs="TooltipContent",Zk=b.forwardRef((e,t)=>{const n=II(qs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...l}=e,a=Ia(qs,e.__scopeTooltip);return y.jsx(Jr,{present:r||a.open,children:a.disableHoverableContent?y.jsx(qk,{side:o,...l,ref:t}):y.jsx(AI,{side:o,...l,ref:t})})}),AI=b.forwardRef((e,t)=>{const n=Ia(qs,e.__scopeTooltip),r=bm(qs,e.__scopeTooltip),o=b.useRef(null),l=at(t,o),[a,u]=b.useState(null),{trigger:d,onClose:f}=n,h=o.current,{onPointerInTransitChange:p}=r,x=b.useCallback(()=>{u(null),p(!1)},[p]),g=b.useCallback((S,k)=>{const C=S.currentTarget,E={x:S.clientX,y:S.clientY},_=MI(E,C.getBoundingClientRect()),T=LI(E,_),I=FI(k.getBoundingClientRect()),O=VI([...T,...I]);u(O),p(!0)},[p]);return b.useEffect(()=>()=>x(),[x]),b.useEffect(()=>{if(d&&h){const S=C=>g(C,h),k=C=>g(C,d);return d.addEventListener("pointerleave",S),h.addEventListener("pointerleave",k),()=>{d.removeEventListener("pointerleave",S),h.removeEventListener("pointerleave",k)}}},[d,h,g,x]),b.useEffect(()=>{if(a){const S=k=>{const C=k.target,E={x:k.clientX,y:k.clientY},_=(d==null?void 0:d.contains(C))||(h==null?void 0:h.contains(C)),T=!$I(E,a);_?x():T&&(x(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,h,a,f,x]),y.jsx(qk,{...e,ref:l})}),[OI,DI]=sd(ca,{isInside:!1}),zI=kI("TooltipContent"),qk=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:a,...u}=e,d=Ia(qs,n),f=ld(n),{onClose:h}=d;return b.useEffect(()=>(document.addEventListener(bp,h),()=>document.removeEventListener(bp,h)),[h]),b.useEffect(()=>{if(d.trigger){const p=x=>{const g=x.target;g!=null&&g.contains(d.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,h]),y.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:y.jsxs(Mk,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(zI,{children:r}),y.jsx(OI,{scope:n,isInside:!0,children:y.jsx(PI,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Zk.displayName=qs;var Qk="TooltipArrow",Yk=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ld(n);return DI(Qk,n).isInside?null:y.jsx(Lk,{...o,...r,ref:t})});Yk.displayName=Qk;function MI(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,o,l)){case l:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function LI(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function FI(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function $I(e,t){const{x:n,y:r}=e;let o=!1;for(let l=0,a=t.length-1;l<t.length;a=l++){const u=t[l],d=t[a],f=u.x,h=u.y,p=d.x,x=d.y;h>r!=x>r&&n<(p-f)*(r-h)/(x-h)+f&&(o=!o)}return o}function VI(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),BI(t)}function BI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const l=t[t.length-1],a=t[t.length-2];if((l.x-a.x)*(o.y-a.y)>=(l.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const l=n[n.length-1],a=n[n.length-2];if((l.x-a.x)*(o.y-a.y)>=(l.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var UI=Bk,HI=Uk,WI=Hk,ZI=Wk,qI=Zk,QI=Yk;function YI({delayDuration:e=0,...t}){return y.jsx(UI,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function KI({...e}){return y.jsx(HI,{"data-slot":"tooltip",...e})}function GI({...e}){return y.jsx(WI,{"data-slot":"tooltip-trigger",...e})}function XI({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(ZI,{children:y.jsxs(qI,{"data-slot":"tooltip-content",sideOffset:t,className:We("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,y.jsx(QI,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function da(){return typeof window<"u"&&"Notification"in window}function JI(){return da()?Notification.permission:"denied"}async function eA(){return da()?Notification.requestPermission():"denied"}function tA(e){if(!da()||Notification.permission!=="granted")return null;const t=new Notification(e.title,{body:e.body,icon:e.icon,tag:e.tag});return e.onClick&&(t.onclick=()=>{var n;window.focus(),(n=e.onClick)==null||n.call(e),t.close()}),t}function nA(){const[e,t]=b.useState(!1),[n,r]=b.useState("default");if(b.useEffect(()=>{t(!0),da()&&r(JI())},[]),!e)return y.jsx(gt,{variant:"outline",size:"icon",disabled:!0,children:y.jsx(jx,{className:"h-4 w-4"})});if(!da())return null;const o=async()=>{if(n==="granted")return;const u=await eA();r(u)},l=()=>{switch(n){case"granted":return y.jsx(YN,{className:"h-4 w-4"});case"denied":return y.jsx(qN,{className:"h-4 w-4"});default:return y.jsx(jx,{className:"h-4 w-4"})}},a=()=>{switch(n){case"granted":return"Browser notifications enabled. You'll be notified of task and epic changes.";case"denied":return"Notifications blocked. Enable in browser settings.";default:return"Click to enable browser notifications"}};return y.jsxs(KI,{children:[y.jsx(GI,{asChild:!0,children:y.jsxs(gt,{variant:"outline",size:"icon",onClick:o,disabled:n==="denied",children:[l(),y.jsx("span",{className:"sr-only",children:a()})]})}),y.jsx(XI,{sideOffset:8,children:y.jsx("p",{children:a()})})]})}const rA=[{to:"/",label:"Kanban",icon:uR},{to:"/list",label:"List",icon:fR},{to:"/history",label:"History",icon:Hb}];function iA({projectName:e,onNewClick:t}){return y.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(oR,{}),y.jsx("h1",{className:"text-lg font-bold",children:"trekker"})]}),y.jsx("nav",{className:"flex items-center gap-1",children:rA.map(({to:n,label:r,icon:o})=>y.jsxs(Cb,{to:n,end:n==="/",className:({isActive:l})=>We("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[y.jsx(o,{className:"h-4 w-4"}),r]},n))})]}),y.jsxs("div",{className:"flex gap-6",children:[e&&y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(vR,{className:"text-muted-foreground",width:16}),y.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[t&&y.jsxs(gt,{size:"sm",onClick:t,children:[y.jsx(Xc,{className:"mr-1 h-4 w-4"}),"New"]}),y.jsx(nA,{}),y.jsx(jj,{})]})]})]})}const oA={connected:{color:"bg-green-500",label:"Connected to live updates"},connecting:{color:"bg-yellow-500",label:"Connecting..."},disconnected:{color:"bg-red-500",label:"Disconnected"}};function sA({status:e}){const t=oA[e];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:We("h-2 w-2 rounded-full",t.color)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:t.label})]})}var lA=e=>{switch(e){case"success":return cA;case"info":return fA;case"warning":return dA;case"error":return hA;default:return null}},aA=Array(12).fill(0),uA=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},aA.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cA=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),dA=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),fA=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),hA=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),pA=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mA=()=>{let[e,t]=le.useState(document.hidden);return le.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Sp=1,gA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Sp++,l=this.toasts.find(u=>u.id===o),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,l,a=r.then(async d=>{if(l=["resolve",d],le.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(vA(d)&&!d.ok){o=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:f,description:h})}else if(t.success!==void 0){o=!1;let f=typeof t.success=="function"?await t.success(d):t.success,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:f,description:h})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){o=!1;let f=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:f,description:h})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>a.then(()=>l[0]==="reject"?f(l[1]):d(l[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Sp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ln=new gA,yA=(e,t)=>{let n=(t==null?void 0:t.id)||Sp++;return Ln.addToast({title:e,...t,id:n}),n},vA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xA=yA,wA=()=>Ln.toasts,bA=()=>Ln.getActiveToasts(),Ct=Object.assign(xA,{success:Ln.success,info:Ln.info,warning:Ln.warning,error:Ln.error,custom:Ln.custom,message:Ln.message,promise:Ln.promise,dismiss:Ln.dismiss,loading:Ln.loading},{getHistory:wA,getToasts:bA});function kA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}kA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
217
+ `);function ec(e){return e.label!==void 0}var SA=3,CA="32px",EA="16px",ew=4e3,_A=356,PA=14,TA=20,NA=200;function _r(...e){return e.filter(Boolean).join(" ")}function RA(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var jA=e=>{var t,n,r,o,l,a,u,d,f,h,p;let{invert:x,toast:g,unstyled:S,interacting:k,setHeights:C,visibleToasts:E,heights:_,index:T,toasts:I,expanded:O,removeToast:R,defaultRichColors:V,closeButton:Q,style:oe,cancelButtonStyle:A,actionButtonStyle:K,className:M="",descriptionClassName:ne="",duration:W,position:B,gap:q,loadingIcon:ee,expandByDefault:D,classNames:G,icons:N,closeButtonAriaLabel:L="Close toast",pauseWhenPageIsHidden:Y}=e,[j,ue]=le.useState(null),[ye,we]=le.useState(null),[ae,ve]=le.useState(!1),[Ce,ke]=le.useState(!1),[Ae,Ve]=le.useState(!1),[nt,At]=le.useState(!1),[sn,Gt]=le.useState(!1),[ln,ir]=le.useState(0),[En,_n]=le.useState(0),F=le.useRef(g.duration||W||ew),J=le.useRef(null),se=le.useRef(null),be=T===0,ge=T+1<=E,$=g.type,ie=g.dismissible!==!1,xe=g.className||"",Ee=g.descriptionClassName||"",De=le.useMemo(()=>_.findIndex(Ue=>Ue.toastId===g.id)||0,[_,g.id]),ct=le.useMemo(()=>{var Ue;return(Ue=g.closeButton)!=null?Ue:Q},[g.closeButton,Q]),Rt=le.useMemo(()=>g.duration||W||ew,[g.duration,W]),Zt=le.useRef(0),Vt=le.useRef(0),Pn=le.useRef(0),ht=le.useRef(null),[pn,Xt]=B.split("-"),ni=le.useMemo(()=>_.reduce((Ue,rt,dt)=>dt>=De?Ue:Ue+rt.height,0),[_,De]),Ko=mA(),Si=g.invert||x,Mr=$==="loading";Vt.current=le.useMemo(()=>De*q+ni,[De,ni]),le.useEffect(()=>{F.current=Rt},[Rt]),le.useEffect(()=>{ve(!0)},[]),le.useEffect(()=>{let Ue=se.current;if(Ue){let rt=Ue.getBoundingClientRect().height;return _n(rt),C(dt=>[{toastId:g.id,height:rt,position:g.position},...dt]),()=>C(dt=>dt.filter(mn=>mn.toastId!==g.id))}},[C,g.id]),le.useLayoutEffect(()=>{if(!ae)return;let Ue=se.current,rt=Ue.style.height;Ue.style.height="auto";let dt=Ue.getBoundingClientRect().height;Ue.style.height=rt,_n(dt),C(mn=>mn.find(Tn=>Tn.toastId===g.id)?mn.map(Tn=>Tn.toastId===g.id?{...Tn,height:dt}:Tn):[{toastId:g.id,height:dt,position:g.position},...mn])},[ae,g.title,g.description,C,g.id]);let yr=le.useCallback(()=>{ke(!0),ir(Vt.current),C(Ue=>Ue.filter(rt=>rt.toastId!==g.id)),setTimeout(()=>{R(g)},NA)},[g,R,C,Vt]);le.useEffect(()=>{if(g.promise&&$==="loading"||g.duration===1/0||g.type==="loading")return;let Ue;return O||k||Y&&Ko?(()=>{if(Pn.current<Zt.current){let rt=new Date().getTime()-Zt.current;F.current=F.current-rt}Pn.current=new Date().getTime()})():F.current!==1/0&&(Zt.current=new Date().getTime(),Ue=setTimeout(()=>{var rt;(rt=g.onAutoClose)==null||rt.call(g,g),yr()},F.current)),()=>clearTimeout(Ue)},[O,k,g,$,Y,Ko,yr]),le.useEffect(()=>{g.delete&&yr()},[yr,g.delete]);function La(){var Ue,rt,dt;return N!=null&&N.loading?le.createElement("div",{className:_r(G==null?void 0:G.loader,(Ue=g==null?void 0:g.classNames)==null?void 0:Ue.loader,"sonner-loader"),"data-visible":$==="loading"},N.loading):ee?le.createElement("div",{className:_r(G==null?void 0:G.loader,(rt=g==null?void 0:g.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":$==="loading"},ee):le.createElement(uA,{className:_r(G==null?void 0:G.loader,(dt=g==null?void 0:g.classNames)==null?void 0:dt.loader),visible:$==="loading"})}return le.createElement("li",{tabIndex:0,ref:se,className:_r(M,xe,G==null?void 0:G.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[$],(n=g==null?void 0:g.classNames)==null?void 0:n[$]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:V,"data-styled":!(g.jsx||g.unstyled||S),"data-mounted":ae,"data-promise":!!g.promise,"data-swiped":sn,"data-removed":Ce,"data-visible":ge,"data-y-position":pn,"data-x-position":Xt,"data-index":T,"data-front":be,"data-swiping":Ae,"data-dismissible":ie,"data-type":$,"data-invert":Si,"data-swipe-out":nt,"data-swipe-direction":ye,"data-expanded":!!(O||D&&ae),style:{"--index":T,"--toasts-before":T,"--z-index":I.length-T,"--offset":`${Ce?ln:Vt.current}px`,"--initial-height":D?"auto":`${En}px`,...oe,...g.style},onDragEnd:()=>{Ve(!1),ue(null),ht.current=null},onPointerDown:Ue=>{Mr||!ie||(J.current=new Date,ir(Vt.current),Ue.target.setPointerCapture(Ue.pointerId),Ue.target.tagName!=="BUTTON"&&(Ve(!0),ht.current={x:Ue.clientX,y:Ue.clientY}))},onPointerUp:()=>{var Ue,rt,dt,mn;if(nt||!ie)return;ht.current=null;let Tn=Number(((Ue=se.current)==null?void 0:Ue.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((rt=se.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vr=new Date().getTime()-((dt=J.current)==null?void 0:dt.getTime()),Jt=j==="x"?Tn:Nn,Lr=Math.abs(Jt)/vr;if(Math.abs(Jt)>=TA||Lr>.11){ir(Vt.current),(mn=g.onDismiss)==null||mn.call(g,g),we(j==="x"?Tn>0?"right":"left":Nn>0?"down":"up"),yr(),At(!0),Gt(!1);return}Ve(!1),ue(null)},onPointerMove:Ue=>{var rt,dt,mn,Tn;if(!ht.current||!ie||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;let Nn=Ue.clientY-ht.current.y,vr=Ue.clientX-ht.current.x,Jt=(dt=e.swipeDirections)!=null?dt:RA(B);!j&&(Math.abs(vr)>1||Math.abs(Nn)>1)&&ue(Math.abs(vr)>Math.abs(Nn)?"x":"y");let Lr={x:0,y:0};j==="y"?(Jt.includes("top")||Jt.includes("bottom"))&&(Jt.includes("top")&&Nn<0||Jt.includes("bottom")&&Nn>0)&&(Lr.y=Nn):j==="x"&&(Jt.includes("left")||Jt.includes("right"))&&(Jt.includes("left")&&vr<0||Jt.includes("right")&&vr>0)&&(Lr.x=vr),(Math.abs(Lr.x)>0||Math.abs(Lr.y)>0)&&Gt(!0),(mn=se.current)==null||mn.style.setProperty("--swipe-amount-x",`${Lr.x}px`),(Tn=se.current)==null||Tn.style.setProperty("--swipe-amount-y",`${Lr.y}px`)}},ct&&!g.jsx?le.createElement("button",{"aria-label":L,"data-disabled":Mr,"data-close-button":!0,onClick:Mr||!ie?()=>{}:()=>{var Ue;yr(),(Ue=g.onDismiss)==null||Ue.call(g,g)},className:_r(G==null?void 0:G.closeButton,(o=g==null?void 0:g.classNames)==null?void 0:o.closeButton)},(l=N==null?void 0:N.close)!=null?l:pA):null,g.jsx||b.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:le.createElement(le.Fragment,null,$||g.icon||g.promise?le.createElement("div",{"data-icon":"",className:_r(G==null?void 0:G.icon,(a=g==null?void 0:g.classNames)==null?void 0:a.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||La():null,g.type!=="loading"?g.icon||(N==null?void 0:N[$])||lA($):null):null,le.createElement("div",{"data-content":"",className:_r(G==null?void 0:G.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},le.createElement("div",{"data-title":"",className:_r(G==null?void 0:G.title,(d=g==null?void 0:g.classNames)==null?void 0:d.title)},typeof g.title=="function"?g.title():g.title),g.description?le.createElement("div",{"data-description":"",className:_r(ne,Ee,G==null?void 0:G.description,(f=g==null?void 0:g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),b.isValidElement(g.cancel)?g.cancel:g.cancel&&ec(g.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||A,onClick:Ue=>{var rt,dt;ec(g.cancel)&&ie&&((dt=(rt=g.cancel).onClick)==null||dt.call(rt,Ue),yr())},className:_r(G==null?void 0:G.cancelButton,(h=g==null?void 0:g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,b.isValidElement(g.action)?g.action:g.action&&ec(g.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||K,onClick:Ue=>{var rt,dt;ec(g.action)&&((dt=(rt=g.action).onClick)==null||dt.call(rt,Ue),!Ue.defaultPrevented&&yr())},className:_r(G==null?void 0:G.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function tw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function IA(e,t){let n={};return[e,t].forEach((r,o)=>{let l=o===1,a=l?"--mobile-offset":"--offset",u=l?EA:CA;function d(f){["top","right","bottom","left"].forEach(h=>{n[`${a}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${a}-${f}`]=u:n[`${a}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}var AA=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:a,className:u,offset:d,mobileOffset:f,theme:h="light",richColors:p,duration:x,style:g,visibleToasts:S=SA,toastOptions:k,dir:C=tw(),gap:E=PA,loadingIcon:_,icons:T,containerAriaLabel:I="Notifications",pauseWhenPageIsHidden:O}=e,[R,V]=le.useState([]),Q=le.useMemo(()=>Array.from(new Set([r].concat(R.filter(Y=>Y.position).map(Y=>Y.position)))),[R,r]),[oe,A]=le.useState([]),[K,M]=le.useState(!1),[ne,W]=le.useState(!1),[B,q]=le.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=le.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=le.useRef(null),N=le.useRef(!1),L=le.useCallback(Y=>{V(j=>{var ue;return(ue=j.find(ye=>ye.id===Y.id))!=null&&ue.delete||Ln.dismiss(Y.id),j.filter(({id:ye})=>ye!==Y.id)})},[]);return le.useEffect(()=>Ln.subscribe(Y=>{if(Y.dismiss){V(j=>j.map(ue=>ue.id===Y.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{_b.flushSync(()=>{V(j=>{let ue=j.findIndex(ye=>ye.id===Y.id);return ue!==-1?[...j.slice(0,ue),{...j[ue],...Y},...j.slice(ue+1)]:[Y,...j]})})})}),[]),le.useEffect(()=>{if(h!=="system"){q(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:j})=>{q(j?"dark":"light")})}catch{Y.addListener(({matches:ue})=>{try{q(ue?"dark":"light")}catch(ye){console.error(ye)}})}},[h]),le.useEffect(()=>{R.length<=1&&M(!1)},[R]),le.useEffect(()=>{let Y=j=>{var ue,ye;o.every(we=>j[we]||j.code===we)&&(M(!0),(ue=ee.current)==null||ue.focus()),j.code==="Escape"&&(document.activeElement===ee.current||(ye=ee.current)!=null&&ye.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[o]),le.useEffect(()=>{if(ee.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[ee.current]),le.createElement("section",{ref:t,"aria-label":`${I} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((Y,j)=>{var ue;let[ye,we]=Y.split("-");return R.length?le.createElement("ol",{key:Y,dir:C==="auto"?tw():C,tabIndex:-1,ref:ee,className:u,"data-sonner-toaster":!0,"data-theme":B,"data-y-position":ye,"data-lifted":K&&R.length>1&&!l,"data-x-position":we,style:{"--front-toast-height":`${((ue=oe[0])==null?void 0:ue.height)||0}px`,"--width":`${_A}px`,"--gap":`${E}px`,...g,...IA(d,f)},onBlur:ae=>{N.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=ae.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{ne||M(!1)},onDragEnd:()=>M(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},R.filter(ae=>!ae.position&&j===0||ae.position===Y).map((ae,ve)=>{var Ce,ke;return le.createElement(jA,{key:ae.id,icons:T,index:ve,toast:ae,defaultRichColors:p,duration:(Ce=k==null?void 0:k.duration)!=null?Ce:x,className:k==null?void 0:k.className,descriptionClassName:k==null?void 0:k.descriptionClassName,invert:n,visibleToasts:S,closeButton:(ke=k==null?void 0:k.closeButton)!=null?ke:a,interacting:ne,position:Y,style:k==null?void 0:k.style,unstyled:k==null?void 0:k.unstyled,classNames:k==null?void 0:k.classNames,cancelButtonStyle:k==null?void 0:k.cancelButtonStyle,actionButtonStyle:k==null?void 0:k.actionButtonStyle,removeToast:L,toasts:R.filter(Ae=>Ae.position==ae.position),heights:oe.filter(Ae=>Ae.position==ae.position),setHeights:A,expandByDefault:l,gap:E,loadingIcon:_,expanded:K,pauseWhenPageIsHidden:O,swipeDirections:e.swipeDirections})})):null}))});const ad=["todo","in_progress","completed","wont_fix","archived"],Sm=["todo","in_progress","completed","archived"],Qs={todo:"TODO",in_progress:"In Progress",completed:"Completed",wont_fix:"Won't Fix",archived:"Archived"},nw={todo:{bg:"#6b7280",text:"#ffffff"},in_progress:{bg:"#3b82f6",text:"#ffffff"},completed:{bg:"#22c55e",text:"#ffffff"},wont_fix:{bg:"#f59e0b",text:"#ffffff"},archived:{bg:"#9ca3af",text:"#ffffff"}},ud={0:"Critical",1:"High",2:"Medium",3:"Low",4:"Backlog",5:"Someday"},Rc={0:{bg:"#dc2626",text:"#ffffff"},1:{bg:"#ea580c",text:"#ffffff"},2:{bg:"#ca8a04",text:"#ffffff"},3:{bg:"#6b7280",text:"#ffffff"},4:{bg:"#6b7280",text:"#ffffff"},5:{bg:"#9ca3af",text:"#ffffff"}};function OA(e){return e.id.startsWith("EPIC-")?"epic":e.parentTaskId?"subtask":"task"}function DA(e){const t=Ws(r=>r.connectionStatus),n=b.useRef(e);return n.current=e,b.useEffect(()=>{const r=Ws.getState().setConnectionStatus;r("connecting");const o=new EventSource("/api/events");return o.onopen=()=>{r("connected")},o.onmessage=l=>{var a;try{const u=JSON.parse(l.data);if(u.type==="connected"){r("connected");return}let d="",f="";switch(u.type){case"task_created":d=`Task ${u.taskId} created`,f=`"${u.taskTitle}"`;break;case"task_updated":d=`Task ${u.taskId} updated`,f=`"${u.taskTitle}" → ${Qs[u.status]||u.status}`;break;case"task_deleted":d=`Task ${u.taskId} deleted`,f=`"${u.taskTitle}"`;break;case"epic_created":d=`Epic ${u.epicId} created`,f=`"${u.epicTitle}"`;break;case"epic_updated":d=`Epic ${u.epicId} updated`,f=`"${u.epicTitle}" → ${Qs[u.status]||u.status}`;break;case"epic_deleted":d=`Epic ${u.epicId} deleted`,f=`"${u.epicTitle}"`;break}Ct.info(d,{description:f}),tA({title:d,body:f,tag:u.type}),(a=n.current)==null||a.call(n)}catch{}},o.onerror=()=>{r("disconnected")},()=>{o.close(),r("disconnected")}},[]),{connectionStatus:t}}const zA=Kb("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function no({className:e,variant:t,asChild:n=!1,...r}){const o=n?qb:"span";return y.jsx(o,{"data-slot":"badge",className:We(zA({variant:t}),e),...r})}function Kk({priority:e}){const t=Rc[e]||Rc[2];return y.jsxs(no,{className:"font-mono text-xs",title:ud[e],style:{backgroundColor:t.bg,color:t.text},children:["P",e]})}function MA(e,t=[]){let n=[];function r(l,a){const u=b.createContext(a);u.displayName=l+"Context";const d=n.length;n=[...n,a];const f=p=>{var E;const{scope:x,children:g,...S}=p,k=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,C=b.useMemo(()=>S,Object.values(S));return y.jsx(k.Provider,{value:C,children:g})};f.displayName=l+"Provider";function h(p,x){var k;const g=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,S=b.useContext(g);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[f,h]}const o=()=>{const l=n.map(a=>b.createContext(a));return function(u){const d=(u==null?void 0:u[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,LA(o,...t)]}function LA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const a=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(l)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var FA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gk=FA.reduce((e,t)=>{const n=dm(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Cm="Progress",Em=100,[$A]=MA(Cm),[VA,BA]=$A(Cm),Xk=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:l=UA,...a}=e;(o||o===0)&&!rw(o)&&console.error(HA(`${o}`,"Progress"));const u=rw(o)?o:Em;r!==null&&!iw(r,u)&&console.error(WA(`${r}`,"Progress"));const d=iw(r,u)?r:null,f=jc(d)?l(d,u):void 0;return y.jsx(VA,{scope:n,value:d,max:u,children:y.jsx(Gk.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":jc(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":t1(d,u),"data-value":d??void 0,"data-max":u,...a,ref:t})})});Xk.displayName=Cm;var Jk="ProgressIndicator",e1=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=BA(Jk,n);return y.jsx(Gk.div,{"data-state":t1(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});e1.displayName=Jk;function UA(e,t){return`${Math.round(e/t*100)}%`}function t1(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function jc(e){return typeof e=="number"}function rw(e){return jc(e)&&!isNaN(e)&&e>0}function iw(e,t){return jc(e)&&!isNaN(e)&&e<=t&&e>=0}function HA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Em}\`.`}function WA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
218
+ - a positive number
219
+ - less than the value passed to \`max\` (or ${Em} if no \`max\` prop is set)
220
+ - \`null\` or \`undefined\` if the progress is indeterminate.
221
+
222
+ Defaulting to \`null\`.`}var ZA=Xk,qA=e1;function QA({className:e,value:t,...n}){return y.jsx(ZA,{"data-slot":"progress",className:We("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:y.jsx(qA,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function YA({completed:e,total:t}){if(t===0)return null;const n=Math.round(e/t*100),r=o=>o===100?"[&>div]:bg-green-500":o>=67?"[&>div]:bg-blue-500":o>=34?"[&>div]:bg-yellow-500":"[&>div]:bg-red-500";return y.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[y.jsx(QA,{value:n,className:We("flex-1 h-1.5",r(n))}),y.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e,"/",t]})]})}function KA({task:e,epicName:t,subtasks:n,onClick:r}){const[o,l]=b.useState(!1);OA(e);const a=n.filter(u=>u.status==="completed").length;return y.jsxs("div",{"data-task-id":e.id,className:"p-2 cursor-pointer hover:ring bg-accent w-full flex flex-col wrap-break-word",onClick:r,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(Ra,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(Kk,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-1",children:e.title}),e.description&&y.jsx("p",{className:"text-xs text-muted-foreground mb-2 line-clamp-2",children:e.description}),(t||e.tags)&&y.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[t&&y.jsxs("p",{className:"text-xs flex gap-2 items-center",children:[y.jsx(Na,{width:16}),t]}),e.tags&&e.tags.split(",").map(u=>y.jsx(no,{variant:"outline",className:"text-xs",children:u.trim()},u))]}),(e.dependsOn.length>0||e.blocks.length>0)&&y.jsxs("div",{className:"pt-2 border-t flex flex-wrap gap-1",children:[e.dependsOn.map(u=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-amber-500/10 text-amber-600 dark:text-amber-400",title:`Depends on ${u}`,children:[y.jsx($b,{className:"h-2.5 w-2.5"}),u]},u)),e.blocks.map(u=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-rose-500/10 text-rose-600 dark:text-rose-400",title:`Blocks ${u}`,children:[y.jsx(Vb,{className:"h-2.5 w-2.5"}),u]},u))]}),n.length>0&&y.jsx(YA,{completed:a,total:n.length})]})}function GA({epic:e,taskCount:t,onClick:n}){return y.jsxs("div",{className:"p-2 cursor-pointer bg-blue-50 dark:bg-blue-800 hover:ring wrap-break-word",onClick:n,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(Na,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(Kk,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-2",children:e.title}),y.jsx("div",{className:"border-t pt-1",children:y.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.total," tasks · ",t.completed," completed"]})})]})}function XA({label:e,tasks:t,epics:n,allTasks:r,allEpics:o,onAddClick:l,onTaskClick:a,onEpicClick:u}){const d=t.length+n.length,f=x=>{if(!x)return null;const g=o.find(S=>S.id===x);return(g==null?void 0:g.title)||x},h=x=>r.filter(g=>g.parentTaskId===x),p=x=>{const g=r.filter(k=>k.epicId===x&&!k.parentTaskId),S=g.filter(k=>k.status==="completed").length;return{total:g.length,completed:S}};return y.jsxs("div",{className:"w-[280px] min-w-[280px] max-w-[320px] flex flex-col overflow-hidden border rounded-md",children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-semibold text-sm",children:e}),y.jsx(no,{variant:"secondary",className:"text-xs",children:d})]}),y.jsx(gt,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l,title:`Add task to ${e}`,children:y.jsx(Xc,{className:"h-4 w-4"})})]}),y.jsx("div",{className:"flex-1 min-h-[100px]",children:y.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[n.map(x=>y.jsx(GA,{epic:x,taskCount:p(x.id),onClick:()=>u(x)},x.id)),t.map(x=>y.jsx(KA,{task:x,epicName:f(x.epicId),subtasks:h(x.id),onClick:()=>a(x)},x.id)),d===0&&y.jsx("div",{className:"flex items-center justify-center min-h-[80px] text-sm text-muted-foreground italic",children:"No items"})]})})]})}const JA=[{key:"todo",label:"TODO"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"wont_fix",label:"Won't Fix"}];function eO({tasks:e,epics:t,onAddClick:n,onTaskClick:r,onEpicClick:o}){const l=e.filter(d=>!d.parentTaskId),a=d=>l.filter(f=>f.status===d),u=d=>t.filter(f=>f.status===d);return y.jsx("div",{className:"flex gap-4 items-start flex-nowrap min-h-[calc(100vh-180px)]",children:JA.map(d=>y.jsx(XA,{label:d.label,tasks:a(d.key),epics:u(d.key),allTasks:e,allEpics:t,onAddClick:()=>n(d.key),onTaskClick:r,onEpicClick:o},d.key))})}function tO({isConfirming:e,entityName:t,onDelete:n,onConfirm:r,onCancel:o}){return e?y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm text-destructive",children:"Delete?"}),y.jsx(gt,{variant:"destructive",size:"sm",onClick:r,children:"Yes"}),y.jsx(gt,{variant:"outline",size:"sm",onClick:o,children:"No"})]}):y.jsxs(gt,{variant:"destructive",size:"sm",onClick:n,children:["Delete ",t]})}function fa({children:e,count:t}){return y.jsxs("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-3",children:[e,t&&` (${t.current}/${t.total})`]})}var gc={exports:{}},nO=gc.exports,ow;function rO(){return ow||(ow=1,(function(e,t){(function(n,r){e.exports=r()})(nO,(function(){var n=1e3,r=6e4,o=36e5,l="millisecond",a="second",u="minute",d="hour",f="day",h="week",p="month",x="quarter",g="year",S="date",k="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var B=["th","st","nd","rd"],q=W%100;return"["+W+(B[(q-20)%10]||B[q]||B[0])+"]"}},T=function(W,B,q){var ee=String(W);return!ee||ee.length>=B?W:""+Array(B+1-ee.length).join(q)+W},I={s:T,z:function(W){var B=-W.utcOffset(),q=Math.abs(B),ee=Math.floor(q/60),D=q%60;return(B<=0?"+":"-")+T(ee,2,"0")+":"+T(D,2,"0")},m:function W(B,q){if(B.date()<q.date())return-W(q,B);var ee=12*(q.year()-B.year())+(q.month()-B.month()),D=B.clone().add(ee,p),G=q-D<0,N=B.clone().add(ee+(G?-1:1),p);return+(-(ee+(q-D)/(G?D-N:N-D))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:p,y:g,w:h,d:f,D:S,h:d,m:u,s:a,ms:l,Q:x}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},O="en",R={};R[O]=_;var V="$isDayjsObject",Q=function(W){return W instanceof M||!(!W||!W[V])},oe=function W(B,q,ee){var D;if(!B)return O;if(typeof B=="string"){var G=B.toLowerCase();R[G]&&(D=G),q&&(R[G]=q,D=G);var N=B.split("-");if(!D&&N.length>1)return W(N[0])}else{var L=B.name;R[L]=B,D=L}return!ee&&D&&(O=D),D||!ee&&O},A=function(W,B){if(Q(W))return W.clone();var q=typeof B=="object"?B:{};return q.date=W,q.args=arguments,new M(q)},K=I;K.l=oe,K.i=Q,K.w=function(W,B){return A(W,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var M=(function(){function W(q){this.$L=oe(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[V]=!0}var B=W.prototype;return B.parse=function(q){this.$d=(function(ee){var D=ee.date,G=ee.utc;if(D===null)return new Date(NaN);if(K.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var N=D.match(C);if(N){var L=N[2]-1||0,Y=(N[7]||"0").substring(0,3);return G?new Date(Date.UTC(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)):new Date(N[1],L,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)}}return new Date(D)})(q),this.init()},B.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},B.$utils=function(){return K},B.isValid=function(){return this.$d.toString()!==k},B.isSame=function(q,ee){var D=A(q);return this.startOf(ee)<=D&&D<=this.endOf(ee)},B.isAfter=function(q,ee){return A(q)<this.startOf(ee)},B.isBefore=function(q,ee){return this.endOf(ee)<A(q)},B.$g=function(q,ee,D){return K.u(q)?this[ee]:this.set(D,q)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(q,ee){var D=this,G=!!K.u(ee)||ee,N=K.p(q),L=function(Ce,ke){var Ae=K.w(D.$u?Date.UTC(D.$y,ke,Ce):new Date(D.$y,ke,Ce),D);return G?Ae:Ae.endOf(f)},Y=function(Ce,ke){return K.w(D.toDate()[Ce].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ke)),D)},j=this.$W,ue=this.$M,ye=this.$D,we="set"+(this.$u?"UTC":"");switch(N){case g:return G?L(1,0):L(31,11);case p:return G?L(1,ue):L(0,ue+1);case h:var ae=this.$locale().weekStart||0,ve=(j<ae?j+7:j)-ae;return L(G?ye-ve:ye+(6-ve),ue);case f:case S:return Y(we+"Hours",0);case d:return Y(we+"Minutes",1);case u:return Y(we+"Seconds",2);case a:return Y(we+"Milliseconds",3);default:return this.clone()}},B.endOf=function(q){return this.startOf(q,!1)},B.$set=function(q,ee){var D,G=K.p(q),N="set"+(this.$u?"UTC":""),L=(D={},D[f]=N+"Date",D[S]=N+"Date",D[p]=N+"Month",D[g]=N+"FullYear",D[d]=N+"Hours",D[u]=N+"Minutes",D[a]=N+"Seconds",D[l]=N+"Milliseconds",D)[G],Y=G===f?this.$D+(ee-this.$W):ee;if(G===p||G===g){var j=this.clone().set(S,1);j.$d[L](Y),j.init(),this.$d=j.set(S,Math.min(this.$D,j.daysInMonth())).$d}else L&&this.$d[L](Y);return this.init(),this},B.set=function(q,ee){return this.clone().$set(q,ee)},B.get=function(q){return this[K.p(q)]()},B.add=function(q,ee){var D,G=this;q=Number(q);var N=K.p(ee),L=function(ue){var ye=A(G);return K.w(ye.date(ye.date()+Math.round(ue*q)),G)};if(N===p)return this.set(p,this.$M+q);if(N===g)return this.set(g,this.$y+q);if(N===f)return L(1);if(N===h)return L(7);var Y=(D={},D[u]=r,D[d]=o,D[a]=n,D)[N]||1,j=this.$d.getTime()+q*Y;return K.w(j,this)},B.subtract=function(q,ee){return this.add(-1*q,ee)},B.format=function(q){var ee=this,D=this.$locale();if(!this.isValid())return D.invalidDate||k;var G=q||"YYYY-MM-DDTHH:mm:ssZ",N=K.z(this),L=this.$H,Y=this.$m,j=this.$M,ue=D.weekdays,ye=D.months,we=D.meridiem,ae=function(ke,Ae,Ve,nt){return ke&&(ke[Ae]||ke(ee,G))||Ve[Ae].slice(0,nt)},ve=function(ke){return K.s(L%12||12,ke,"0")},Ce=we||function(ke,Ae,Ve){var nt=ke<12?"AM":"PM";return Ve?nt.toLowerCase():nt};return G.replace(E,(function(ke,Ae){return Ae||(function(Ve){switch(Ve){case"YY":return String(ee.$y).slice(-2);case"YYYY":return K.s(ee.$y,4,"0");case"M":return j+1;case"MM":return K.s(j+1,2,"0");case"MMM":return ae(D.monthsShort,j,ye,3);case"MMMM":return ae(ye,j);case"D":return ee.$D;case"DD":return K.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return ae(D.weekdaysMin,ee.$W,ue,2);case"ddd":return ae(D.weekdaysShort,ee.$W,ue,3);case"dddd":return ue[ee.$W];case"H":return String(L);case"HH":return K.s(L,2,"0");case"h":return ve(1);case"hh":return ve(2);case"a":return Ce(L,Y,!0);case"A":return Ce(L,Y,!1);case"m":return String(Y);case"mm":return K.s(Y,2,"0");case"s":return String(ee.$s);case"ss":return K.s(ee.$s,2,"0");case"SSS":return K.s(ee.$ms,3,"0");case"Z":return N}return null})(ke)||N.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(q,ee,D){var G,N=this,L=K.p(ee),Y=A(q),j=(Y.utcOffset()-this.utcOffset())*r,ue=this-Y,ye=function(){return K.m(N,Y)};switch(L){case g:G=ye()/12;break;case p:G=ye();break;case x:G=ye()/3;break;case h:G=(ue-j)/6048e5;break;case f:G=(ue-j)/864e5;break;case d:G=ue/o;break;case u:G=ue/r;break;case a:G=ue/n;break;default:G=ue}return D?G:K.a(G)},B.daysInMonth=function(){return this.endOf(p).$D},B.$locale=function(){return R[this.$L]},B.locale=function(q,ee){if(!q)return this.$L;var D=this.clone(),G=oe(q,ee,!0);return G&&(D.$L=G),D},B.clone=function(){return K.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},W})(),ne=M.prototype;return A.prototype=ne,[["$ms",l],["$s",a],["$m",u],["$H",d],["$W",f],["$M",p],["$y",g],["$D",S]].forEach((function(W){ne[W[1]]=function(B){return this.$g(B,W[0],W[1])}})),A.extend=function(W,B){return W.$i||(W(B,M,A),W.$i=!0),A},A.locale=oe,A.isDayjs=Q,A.unix=function(W){return A(1e3*W)},A.en=R[O],A.Ls=R,A.p={},A}))})(gc)),gc.exports}var iO=rO();const ha=Zo(iO);var yc={exports:{}},oO=yc.exports,sw;function sO(){return sw||(sw=1,(function(e,t){(function(n,r){e.exports=r()})(oO,(function(){return function(n,r,o){n=n||{};var l=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,h,p,x){return l.fromToBase(f,h,p,x)}o.en.relativeTime=a,l.fromToBase=function(f,h,p,x,g){for(var S,k,C,E=p.$locale().relativeTime||a,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=_.length,I=0;I<T;I+=1){var O=_[I];O.d&&(S=x?o(f).diff(p,O.d,!0):p.diff(f,O.d,!0));var R=(n.rounding||Math.round)(Math.abs(S));if(C=S>0,R<=O.r||!O.r){R<=1&&I>0&&(O=_[I-1]);var V=E[O.l];g&&(R=g(""+R)),k=typeof V=="string"?V.replace("%d",R):V(R,h,O.l,C);break}}if(h)return k;var Q=C?E.future:E.past;return typeof Q=="function"?Q(k):Q.replace("%s",k)},l.to=function(f,h){return u(f,h,this,!0)},l.from=function(f,h){return u(f,h,this)};var d=function(f){return f.$u?o.utc():o()};l.toNow=function(f){return this.to(d(this),f)},l.fromNow=function(f){return this.from(d(this),f)}}}))})(yc)),yc.exports}var lO=sO();const aO=Zo(lO);ha.extend(aO);function lw(e){return ha(e).fromNow()}function uO(e,t="MMM D, YYYY"){return ha(e).format(t)}function _m(e){const t=ha(),n=ha(e),r=t.diff(n,"minute"),o=t.diff(n,"hour"),l=t.diff(n,"day");return r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:l<7?`${l}d ago`:n.format("MMM D, YYYY")}function n1({createdAt:e,updatedAt:t}){return y.jsxs("div",{className:"flex gap-3 justify-end",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Created ",lw(e)]}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated ",lw(t)]})]})}function r1({status:e,className:t}){const n=We("h-4 w-4 shrink-0",t);switch(e){case"completed":return y.jsx(Ra,{className:We(n,"text-green-500")});case"archived":return y.jsx(UN,{className:We(n,"text-gray-400")});case"wont_fix":return y.jsx(ER,{className:We(n,"text-amber-500")});default:return y.jsx(PR,{className:We(n,"opacity-50")})}}const i1={create:{icon:Xc,color:"text-green-500"},update:{icon:um,color:"text-blue-500"},delete:{icon:cm,color:"text-red-500"}};function o1({action:e,className:t}){const n=i1[e],r=n.icon;return y.jsx(r,{className:We("h-4 w-4",n.color,t)})}function s1(e){return i1[e].color}function Cp(e,[t,n]){return Math.min(n,Math.max(t,e))}function aw(e){const t=cO(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(fO);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function cO(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=pO(o),u=hO(l,o.props);return o.type!==b.Fragment&&(u.ref=r?Js(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dO=Symbol("radix.slottable");function fO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dO}function hO(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function pO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mO(e){const t=e+"CollectionProvider",[n,r]=nl(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=k=>{const{scope:C,children:E}=k,_=le.useRef(null),T=le.useRef(new Map).current;return y.jsx(o,{scope:C,itemMap:T,collectionRef:_,children:E})};a.displayName=t;const u=e+"CollectionSlot",d=aw(u),f=le.forwardRef((k,C)=>{const{scope:E,children:_}=k,T=l(u,E),I=at(C,T.collectionRef);return y.jsx(d,{ref:I,children:_})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",x=aw(h),g=le.forwardRef((k,C)=>{const{scope:E,children:_,...T}=k,I=le.useRef(null),O=at(C,I),R=l(h,E);return le.useEffect(()=>(R.itemMap.set(I,{ref:I,...T}),()=>void R.itemMap.delete(I))),y.jsx(x,{[p]:"",ref:O,children:_})});g.displayName=h;function S(k){const C=l(e+"CollectionConsumer",k);return le.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const T=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((R,V)=>T.indexOf(R.ref.current)-T.indexOf(V.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:a,Slot:f,ItemSlot:g},S,r]}var gO=b.createContext(void 0);function l1(e){const t=b.useContext(gO);return e||t||"ltr"}var Ph=0;function a1(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uw()),document.body.insertAdjacentElement("beforeend",e[1]??uw()),Ph++,()=>{Ph===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ph--}},[])}function uw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Th="focusScope.autoFocusOnMount",Nh="focusScope.autoFocusOnUnmount",cw={bubbles:!1,cancelable:!0},yO="FocusScope",Pm=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...a}=e,[u,d]=b.useState(null),f=Vn(o),h=Vn(l),p=b.useRef(null),x=at(t,k=>d(k)),g=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let k=function(T){if(g.paused||!u)return;const I=T.target;u.contains(I)?p.current=I:Zi(p.current,{select:!0})},C=function(T){if(g.paused||!u)return;const I=T.relatedTarget;I!==null&&(u.contains(I)||Zi(p.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Zi(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",C);const _=new MutationObserver(E);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",C),_.disconnect()}}},[r,u,g.paused]),b.useEffect(()=>{if(u){fw.add(g);const k=document.activeElement;if(!u.contains(k)){const E=new CustomEvent(Th,cw);u.addEventListener(Th,f),u.dispatchEvent(E),E.defaultPrevented||(vO(SO(u1(u)),{select:!0}),document.activeElement===k&&Zi(u))}return()=>{u.removeEventListener(Th,f),setTimeout(()=>{const E=new CustomEvent(Nh,cw);u.addEventListener(Nh,h),u.dispatchEvent(E),E.defaultPrevented||Zi(k??document.body,{select:!0}),u.removeEventListener(Nh,h),fw.remove(g)},0)}}},[u,f,h,g]);const S=b.useCallback(k=>{if(!n&&!r||g.paused)return;const C=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if(C&&E){const _=k.currentTarget,[T,I]=xO(_);T&&I?!k.shiftKey&&E===I?(k.preventDefault(),n&&Zi(T,{select:!0})):k.shiftKey&&E===T&&(k.preventDefault(),n&&Zi(I,{select:!0})):E===_&&k.preventDefault()}},[n,r,g.paused]);return y.jsx(tt.div,{tabIndex:-1,...a,ref:x,onKeyDown:S})});Pm.displayName=yO;function vO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Zi(r,{select:t}),document.activeElement!==n)return}function xO(e){const t=u1(e),n=dw(t,e),r=dw(t.reverse(),e);return[n,r]}function u1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function dw(e,t){for(const n of e)if(!wO(n,{upTo:t}))return n}function wO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bO(e){return e instanceof HTMLInputElement&&"select"in e}function Zi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bO(e)&&t&&e.select()}}var fw=kO();function kO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hw(e,t),e.unshift(t)},remove(t){var n;e=hw(e,t),(n=e[0])==null||n.resume()}}}function hw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function SO(e){return e.filter(t=>t.tagName!=="A")}function CO(e){const t=EO(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(PO);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function EO(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=NO(o),u=TO(l,o.props);return o.type!==b.Fragment&&(u.ref=r?Js(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _O=Symbol("radix.slottable");function PO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_O}function TO(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function NO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function RO(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var jO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,tc=new WeakMap,nc={},Rh=0,c1=function(e){return e&&(e.host||c1(e.parentNode))},IO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=c1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},AO=function(e,t,n,r){var o=IO(t,Array.isArray(e)?e:[e]);nc[n]||(nc[n]=new WeakMap);var l=nc[n],a=[],u=new Set,d=new Set(o),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};o.forEach(f);var h=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(u.has(x))h(x);else try{var g=x.getAttribute(r),S=g!==null&&g!=="false",k=(ws.get(x)||0)+1,C=(l.get(x)||0)+1;ws.set(x,k),l.set(x,C),a.push(x),k===1&&S&&tc.set(x,!0),C===1&&x.setAttribute(n,"true"),S||x.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return h(t),u.clear(),Rh++,function(){a.forEach(function(p){var x=ws.get(p)-1,g=l.get(p)-1;ws.set(p,x),l.set(p,g),x||(tc.has(p)||p.removeAttribute(r),tc.delete(p)),g||p.removeAttribute(n)}),Rh--,Rh||(ws=new WeakMap,ws=new WeakMap,tc=new WeakMap,nc={})}},d1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=jO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),AO(r,o,n,"aria-hidden")):function(){return null}},Qr=function(){return Qr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Qr.apply(this,arguments)};function f1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function OO(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,l;r<o;r++)(l||!(r in t))&&(l||(l=Array.prototype.slice.call(t,0,r)),l[r]=t[r]);return e.concat(l||Array.prototype.slice.call(t))}var vc="right-scroll-bar-position",xc="width-before-scroll-bar",DO="with-scroll-bars-hidden",zO="--removed-body-scroll-bar-size";function jh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MO(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var LO=typeof window<"u"?b.useLayoutEffect:b.useEffect,pw=new WeakMap;function FO(e,t){var n=MO(null,function(r){return e.forEach(function(o){return jh(o,r)})});return LO(function(){var r=pw.get(n);if(r){var o=new Set(r),l=new Set(e),a=n.current;o.forEach(function(u){l.has(u)||jh(u,null)}),l.forEach(function(u){o.has(u)||jh(u,a)})}pw.set(n,e)},[e]),n}function $O(e){return e}function VO(e,t){t===void 0&&(t=$O);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,r);return n.push(a),function(){n=n.filter(function(u){return u!==a})}},assignSyncMedium:function(l){for(r=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(u){return l(u)},filter:function(){return n}}},assignMedium:function(l){r=!0;var a=[];if(n.length){var u=n;n=[],u.forEach(l),a=n}var d=function(){var h=a;a=[],h.forEach(l)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(h){a.push(h),f()},filter:function(h){return a=a.filter(h),n}}}};return o}function BO(e){e===void 0&&(e={});var t=VO(null);return t.options=Qr({async:!0,ssr:!1},e),t}var h1=function(e){var t=e.sideCar,n=f1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Qr({},n))};h1.isSideCarExport=!0;function UO(e,t){return e.useMedium(t),h1}var p1=BO(),Ih=function(){},cd=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Ih,onWheelCapture:Ih,onTouchMoveCapture:Ih}),o=r[0],l=r[1],a=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,x=e.sideCar,g=e.noRelative,S=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,T=e.gapMode,I=f1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=x,R=FO([n,t]),V=Qr(Qr({},I),o);return b.createElement(b.Fragment,null,h&&b.createElement(O,{sideCar:p1,removeScrollBar:f,shards:p,noRelative:g,noIsolation:S,inert:k,setCallbacks:l,allowPinchZoom:!!C,lockRef:n,gapMode:T}),a?b.cloneElement(b.Children.only(u),Qr(Qr({},V),{ref:R})):b.createElement(_,Qr({},V,{className:d,ref:R}),u))});cd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cd.classNames={fullWidth:xc,zeroRight:vc};var HO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=HO();return t&&e.setAttribute("nonce",t),e}function ZO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=WO())&&(ZO(t,n),qO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},YO=function(){var e=QO();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},m1=function(){var e=YO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},KO={left:0,top:0,right:0,gap:0},Ah=function(e){return parseInt(e||"",10)||0},GO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ah(n),Ah(r),Ah(o)]},XO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KO;var t=GO(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},JO=m1(),Rs="data-scroll-locked",eD=function(e,t,n,r){var o=e.left,l=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),`
223
+ .`.concat(DO,` {
224
+ overflow: hidden `).concat(r,`;
225
+ padding-right: `).concat(u,"px ").concat(r,`;
226
+ }
227
+ body[`).concat(Rs,`] {
228
+ overflow: hidden `).concat(r,`;
229
+ overscroll-behavior: contain;
230
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
231
+ padding-left: `.concat(o,`px;
232
+ padding-top: `).concat(l,`px;
233
+ padding-right: `).concat(a,`px;
234
+ margin-left:0;
235
+ margin-top:0;
236
+ margin-right: `).concat(u,"px ").concat(r,`;
237
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
238
+ }
239
+
240
+ .`).concat(vc,` {
241
+ right: `).concat(u,"px ").concat(r,`;
242
+ }
243
+
244
+ .`).concat(xc,` {
245
+ margin-right: `).concat(u,"px ").concat(r,`;
246
+ }
247
+
248
+ .`).concat(vc," .").concat(vc,` {
249
+ right: 0 `).concat(r,`;
250
+ }
251
+
252
+ .`).concat(xc," .").concat(xc,` {
253
+ margin-right: 0 `).concat(r,`;
254
+ }
255
+
256
+ body[`).concat(Rs,`] {
257
+ `).concat(zO,": ").concat(u,`px;
258
+ }
259
+ `)},mw=function(){var e=parseInt(document.body.getAttribute(Rs)||"0",10);return isFinite(e)?e:0},tD=function(){b.useEffect(function(){return document.body.setAttribute(Rs,(mw()+1).toString()),function(){var e=mw()-1;e<=0?document.body.removeAttribute(Rs):document.body.setAttribute(Rs,e.toString())}},[])},nD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;tD();var l=b.useMemo(function(){return XO(o)},[o]);return b.createElement(JO,{styles:eD(l,!t,o,n?"":"!important")})},Ep=!1;if(typeof window<"u")try{var rc=Object.defineProperty({},"passive",{get:function(){return Ep=!0,!0}});window.addEventListener("test",rc,rc),window.removeEventListener("test",rc,rc)}catch{Ep=!1}var bs=Ep?{passive:!1}:!1,rD=function(e){return e.tagName==="TEXTAREA"},g1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rD(e)&&n[t]==="visible")},iD=function(e){return g1(e,"overflowY")},oD=function(e){return g1(e,"overflowX")},gw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=y1(e,r);if(o){var l=v1(e,r),a=l[1],u=l[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},lD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},y1=function(e,t){return e==="v"?iD(t):oD(t)},v1=function(e,t){return e==="v"?sD(t):lD(t)},aD=function(e,t){return e==="h"&&t==="rtl"?-1:1},uD=function(e,t,n,r,o){var l=aD(e,window.getComputedStyle(t).direction),a=l*r,u=n.target,d=t.contains(u),f=!1,h=a>0,p=0,x=0;do{if(!u)break;var g=v1(e,u),S=g[0],k=g[1],C=g[2],E=k-C-l*S;(S||E)&&y1(e,u)&&(p+=E,x+=S);var _=u.parentNode;u=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&Math.abs(p)<1||!h&&Math.abs(x)<1)&&(f=!0),f},ic=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yw=function(e){return[e.deltaX,e.deltaY]},vw=function(e){return e&&"current"in e?e.current:e},cD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dD=function(e){return`
260
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
261
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
262
+ `)},fD=0,ks=[];function hD(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(fD++)[0],l=b.useState(m1)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var k=OO([e.lockRef.current],(e.shards||[]).map(vw),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!a.current.allowPinchZoom;var E=ic(k),_=n.current,T="deltaX"in k?k.deltaX:_[0]-E[0],I="deltaY"in k?k.deltaY:_[1]-E[1],O,R=k.target,V=Math.abs(T)>Math.abs(I)?"h":"v";if("touches"in k&&V==="h"&&R.type==="range")return!1;var Q=window.getSelection(),oe=Q&&Q.anchorNode,A=oe?oe===R||oe.contains(R):!1;if(A)return!1;var K=gw(V,R);if(!K)return!0;if(K?O=V:(O=V==="v"?"h":"v",K=gw(V,R)),!K)return!1;if(!r.current&&"changedTouches"in k&&(T||I)&&(r.current=O),!O)return!0;var M=r.current||O;return uD(M,C,k,M==="h"?T:I)},[]),d=b.useCallback(function(k){var C=k;if(!(!ks.length||ks[ks.length-1]!==l)){var E="deltaY"in C?yw(C):ic(C),_=t.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&cD(O.delta,E)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(vw).filter(Boolean).filter(function(O){return O.contains(C.target)}),I=T.length>0?u(C,T[0]):!a.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),f=b.useCallback(function(k,C,E,_){var T={name:k,delta:C,target:E,should:_,shadowParent:pD(E)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(I){return I!==T})},1)},[]),h=b.useCallback(function(k){n.current=ic(k),r.current=void 0},[]),p=b.useCallback(function(k){f(k.type,yw(k),k.target,u(k,e.lockRef.current))},[]),x=b.useCallback(function(k){f(k.type,ic(k),k.target,u(k,e.lockRef.current))},[]);b.useEffect(function(){return ks.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,bs),document.addEventListener("touchmove",d,bs),document.addEventListener("touchstart",h,bs),function(){ks=ks.filter(function(k){return k!==l}),document.removeEventListener("wheel",d,bs),document.removeEventListener("touchmove",d,bs),document.removeEventListener("touchstart",h,bs)}},[]);var g=e.removeScrollBar,S=e.inert;return b.createElement(b.Fragment,null,S?b.createElement(l,{styles:dD(o)}):null,g?b.createElement(nD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mD=UO(p1,hD);var Tm=b.forwardRef(function(e,t){return b.createElement(cd,Qr({},e,{ref:t,sideCar:mD}))});Tm.classNames=cd.classNames;var gD=[" ","Enter","ArrowUp","ArrowDown"],yD=[" ","Enter"],$o="Select",[dd,fd,vD]=mO($o),[ol]=nl($o,[vD,id]),hd=id(),[xD,oo]=ol($o),[wD,bD]=ol($o),x1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:a,defaultValue:u,onValueChange:d,dir:f,name:h,autoComplete:p,disabled:x,required:g,form:S}=e,k=hd(t),[C,E]=b.useState(null),[_,T]=b.useState(null),[I,O]=b.useState(!1),R=l1(f),[V,Q]=Nc({prop:r,defaultProp:o??!1,onChange:l,caller:$o}),[oe,A]=Nc({prop:a,defaultProp:u,onChange:d,caller:$o}),K=b.useRef(null),M=C?S||!!C.closest("form"):!0,[ne,W]=b.useState(new Set),B=Array.from(ne).map(q=>q.props.value).join(";");return y.jsx(Dk,{...k,children:y.jsxs(xD,{required:g,scope:t,trigger:C,onTriggerChange:E,valueNode:_,onValueNodeChange:T,valueNodeHasChildren:I,onValueNodeHasChildrenChange:O,contentId:Mo(),value:oe,onValueChange:A,open:V,onOpenChange:Q,dir:R,triggerPointerDownPosRef:K,disabled:x,children:[y.jsx(dd.Provider,{scope:t,children:y.jsx(wD,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(q=>{W(ee=>new Set(ee).add(q))},[]),onNativeOptionRemove:b.useCallback(q=>{W(ee=>{const D=new Set(ee);return D.delete(q),D})},[]),children:n})}),M?y.jsxs(V1,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:p,value:oe,onChange:q=>A(q.target.value),disabled:x,form:S,children:[oe===void 0?y.jsx("option",{value:""}):null,Array.from(ne)]},B):null]})})};x1.displayName=$o;var w1="SelectTrigger",b1=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,l=hd(n),a=oo(w1,n),u=a.disabled||r,d=at(t,a.onTriggerChange),f=fd(n),h=b.useRef("touch"),[p,x,g]=U1(k=>{const C=f().filter(T=>!T.disabled),E=C.find(T=>T.value===a.value),_=H1(C,k,E);_!==void 0&&a.onValueChange(_.value)}),S=k=>{u||(a.onOpenChange(!0),g()),k&&(a.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return y.jsx(zk,{asChild:!0,...l,children:y.jsx(tt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":B1(a.value)?"":void 0,...o,ref:d,onClick:Qe(o.onClick,k=>{k.currentTarget.focus(),h.current!=="mouse"&&S(k)}),onPointerDown:Qe(o.onPointerDown,k=>{h.current=k.pointerType;const C=k.target;C.hasPointerCapture(k.pointerId)&&C.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:Qe(o.onKeyDown,k=>{const C=p.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&x(k.key),!(C&&k.key===" ")&&gD.includes(k.key)&&(S(),k.preventDefault())})})})});b1.displayName=w1;var k1="SelectValue",S1=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:l,placeholder:a="",...u}=e,d=oo(k1,n),{onValueNodeHasChildrenChange:f}=d,h=l!==void 0,p=at(t,d.onValueNodeChange);return rn(()=>{f(h)},[f,h]),y.jsx(tt.span,{...u,ref:p,style:{pointerEvents:"none"},children:B1(d.value)?y.jsx(y.Fragment,{children:a}):l})});S1.displayName=k1;var kD="SelectIcon",C1=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(tt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});C1.displayName=kD;var SD="SelectPortal",E1=e=>y.jsx(od,{asChild:!0,...e});E1.displayName=SD;var Vo="SelectContent",_1=b.forwardRef((e,t)=>{const n=oo(Vo,e.__scopeSelect),[r,o]=b.useState();if(rn(()=>{o(new DocumentFragment)},[]),!n.open){const l=r;return l?_a.createPortal(y.jsx(P1,{scope:e.__scopeSelect,children:y.jsx(dd.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),l):null}return y.jsx(T1,{...e,ref:t})});_1.displayName=Vo;var Pr=10,[P1,so]=ol(Vo),CD="SelectContentImpl",ED=CO("SelectContent.RemoveScroll"),T1=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:a,side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C,...E}=e,_=oo(Vo,n),[T,I]=b.useState(null),[O,R]=b.useState(null),V=at(t,ae=>I(ae)),[Q,oe]=b.useState(null),[A,K]=b.useState(null),M=fd(n),[ne,W]=b.useState(!1),B=b.useRef(!1);b.useEffect(()=>{if(T)return d1(T)},[T]),a1();const q=b.useCallback(ae=>{const[ve,...Ce]=M().map(Ve=>Ve.ref.current),[ke]=Ce.slice(-1),Ae=document.activeElement;for(const Ve of ae)if(Ve===Ae||(Ve==null||Ve.scrollIntoView({block:"nearest"}),Ve===ve&&O&&(O.scrollTop=0),Ve===ke&&O&&(O.scrollTop=O.scrollHeight),Ve==null||Ve.focus(),document.activeElement!==Ae))return},[M,O]),ee=b.useCallback(()=>q([Q,T]),[q,Q,T]);b.useEffect(()=>{ne&&ee()},[ne,ee]);const{onOpenChange:D,triggerPointerDownPosRef:G}=_;b.useEffect(()=>{if(T){let ae={x:0,y:0};const ve=ke=>{var Ae,Ve;ae={x:Math.abs(Math.round(ke.pageX)-(((Ae=G.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((Ve=G.current)==null?void 0:Ve.y)??0))}},Ce=ke=>{ae.x<=10&&ae.y<=10?ke.preventDefault():T.contains(ke.target)||D(!1),document.removeEventListener("pointermove",ve),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[T,D,G]),b.useEffect(()=>{const ae=()=>D(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[D]);const[N,L]=U1(ae=>{const ve=M().filter(Ae=>!Ae.disabled),Ce=ve.find(Ae=>Ae.ref.current===document.activeElement),ke=H1(ve,ae,Ce);ke&&setTimeout(()=>ke.ref.current.focus())}),Y=b.useCallback((ae,ve,Ce)=>{const ke=!B.current&&!Ce;(_.value!==void 0&&_.value===ve||ke)&&(oe(ae),ke&&(B.current=!0))},[_.value]),j=b.useCallback(()=>T==null?void 0:T.focus(),[T]),ue=b.useCallback((ae,ve,Ce)=>{const ke=!B.current&&!Ce;(_.value!==void 0&&_.value===ve||ke)&&K(ae)},[_.value]),ye=r==="popper"?_p:N1,we=ye===_p?{side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C}:{};return y.jsx(P1,{scope:n,content:T,viewport:O,onViewportChange:R,itemRefCallback:Y,selectedItem:Q,onItemLeave:j,itemTextRefCallback:ue,focusSelectedItem:ee,selectedItemText:A,position:r,isPositioned:ne,searchRef:N,children:y.jsx(Tm,{as:ED,allowPinchZoom:!0,children:y.jsx(Pm,{asChild:!0,trapped:_.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Qe(o,ae=>{var ve;(ve=_.trigger)==null||ve.focus({preventScroll:!0}),ae.preventDefault()}),children:y.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:y.jsx(ye,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:ae=>ae.preventDefault(),...E,...we,onPlaced:()=>W(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Qe(E.onKeyDown,ae=>{const ve=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!ve&&ae.key.length===1&&L(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let ke=M().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ae=ae.target,Ve=ke.indexOf(Ae);ke=ke.slice(Ve+1)}setTimeout(()=>q(ke)),ae.preventDefault()}})})})})})})});T1.displayName=CD;var _D="SelectItemAlignedPosition",N1=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,l=oo(Vo,n),a=so(Vo,n),[u,d]=b.useState(null),[f,h]=b.useState(null),p=at(t,V=>h(V)),x=fd(n),g=b.useRef(!1),S=b.useRef(!0),{viewport:k,selectedItem:C,selectedItemText:E,focusSelectedItem:_}=a,T=b.useCallback(()=>{if(l.trigger&&l.valueNode&&u&&f&&k&&C&&E){const V=l.trigger.getBoundingClientRect(),Q=f.getBoundingClientRect(),oe=l.valueNode.getBoundingClientRect(),A=E.getBoundingClientRect();if(l.dir!=="rtl"){const Ae=A.left-Q.left,Ve=oe.left-Ae,nt=V.left-Ve,At=V.width+nt,sn=Math.max(At,Q.width),Gt=window.innerWidth-Pr,ln=Cp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=At+"px",u.style.left=ln+"px"}else{const Ae=Q.right-A.right,Ve=window.innerWidth-oe.right-Ae,nt=window.innerWidth-V.right-Ve,At=V.width+nt,sn=Math.max(At,Q.width),Gt=window.innerWidth-Pr,ln=Cp(Ve,[Pr,Math.max(Pr,Gt-sn)]);u.style.minWidth=At+"px",u.style.right=ln+"px"}const K=x(),M=window.innerHeight-Pr*2,ne=k.scrollHeight,W=window.getComputedStyle(f),B=parseInt(W.borderTopWidth,10),q=parseInt(W.paddingTop,10),ee=parseInt(W.borderBottomWidth,10),D=parseInt(W.paddingBottom,10),G=B+q+ne+D+ee,N=Math.min(C.offsetHeight*5,G),L=window.getComputedStyle(k),Y=parseInt(L.paddingTop,10),j=parseInt(L.paddingBottom,10),ue=V.top+V.height/2-Pr,ye=M-ue,we=C.offsetHeight/2,ae=C.offsetTop+we,ve=B+q+ae,Ce=G-ve;if(ve<=ue){const Ae=K.length>0&&C===K[K.length-1].ref.current;u.style.bottom="0px";const Ve=f.clientHeight-k.offsetTop-k.offsetHeight,nt=Math.max(ye,we+(Ae?j:0)+Ve+ee),At=ve+nt;u.style.height=At+"px"}else{const Ae=K.length>0&&C===K[0].ref.current;u.style.top="0px";const nt=Math.max(ue,B+k.offsetTop+(Ae?Y:0)+we)+Ce;u.style.height=nt+"px",k.scrollTop=ve-ue+k.offsetTop}u.style.margin=`${Pr}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[x,l.trigger,l.valueNode,u,f,k,C,E,l.dir,r]);rn(()=>T(),[T]);const[I,O]=b.useState();rn(()=>{f&&O(window.getComputedStyle(f).zIndex)},[f]);const R=b.useCallback(V=>{V&&S.current===!0&&(T(),_==null||_(),S.current=!1)},[T,_]);return y.jsx(TD,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:R,children:y.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:y.jsx(tt.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});N1.displayName=_D;var PD="SelectPopperPosition",_p=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Pr,...l}=e,a=hd(n);return y.jsx(Mk,{...a,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});_p.displayName=PD;var[TD,Nm]=ol(Vo,{}),Pp="SelectViewport",R1=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,l=so(Pp,n),a=Nm(Pp,n),u=at(t,l.onViewportChange),d=b.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsx(dd.Slot,{scope:n,children:y.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Qe(o.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=a;if(x!=null&&x.current&&p){const g=Math.abs(d.current-h.scrollTop);if(g>0){const S=window.innerHeight-Pr*2,k=parseFloat(p.style.minHeight),C=parseFloat(p.style.height),E=Math.max(k,C);if(E<S){const _=E+g,T=Math.min(S,_),I=_-T;p.style.height=T+"px",p.style.bottom==="0px"&&(h.scrollTop=I>0?I:0,p.style.justifyContent="flex-end")}}}d.current=h.scrollTop})})})]})});R1.displayName=Pp;var j1="SelectGroup",[ND,RD]=ol(j1),jD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Mo();return y.jsx(ND,{scope:n,id:o,children:y.jsx(tt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});jD.displayName=j1;var I1="SelectLabel",ID=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=RD(I1,n);return y.jsx(tt.div,{id:o.id,...r,ref:t})});ID.displayName=I1;var Ic="SelectItem",[AD,A1]=ol(Ic),O1=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...a}=e,u=oo(Ic,n),d=so(Ic,n),f=u.value===r,[h,p]=b.useState(l??""),[x,g]=b.useState(!1),S=at(t,_=>{var T;return(T=d.itemRefCallback)==null?void 0:T.call(d,_,r,o)}),k=Mo(),C=b.useRef("touch"),E=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(AD,{scope:n,value:r,disabled:o,textId:k,isSelected:f,onItemTextChange:b.useCallback(_=>{p(T=>T||((_==null?void 0:_.textContent)??"").trim())},[]),children:y.jsx(dd.ItemSlot,{scope:n,value:r,disabled:o,textValue:h,children:y.jsx(tt.div,{role:"option","aria-labelledby":k,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:S,onFocus:Qe(a.onFocus,()=>g(!0)),onBlur:Qe(a.onBlur,()=>g(!1)),onClick:Qe(a.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:Qe(a.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:Qe(a.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:Qe(a.onPointerMove,_=>{var T;C.current=_.pointerType,o?(T=d.onItemLeave)==null||T.call(d):C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Qe(a.onPointerLeave,_=>{var T;_.currentTarget===document.activeElement&&((T=d.onItemLeave)==null||T.call(d))}),onKeyDown:Qe(a.onKeyDown,_=>{var I;((I=d.searchRef)==null?void 0:I.current)!==""&&_.key===" "||(yD.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})})})})});O1.displayName=Ic;var Xl="SelectItemText",D1=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...l}=e,a=oo(Xl,n),u=so(Xl,n),d=A1(Xl,n),f=bD(Xl,n),[h,p]=b.useState(null),x=at(t,E=>p(E),d.onItemTextChange,E=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,E,d.value,d.disabled)}),g=h==null?void 0:h.textContent,S=b.useMemo(()=>y.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:k,onNativeOptionRemove:C}=f;return rn(()=>(k(S),()=>C(S)),[k,C,S]),y.jsxs(y.Fragment,{children:[y.jsx(tt.span,{id:d.textId,...l,ref:x}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren?_a.createPortal(l.children,a.valueNode):null]})});D1.displayName=Xl;var z1="SelectItemIndicator",M1=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return A1(z1,n).isSelected?y.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});M1.displayName=z1;var Tp="SelectScrollUpButton",L1=b.forwardRef((e,t)=>{const n=so(Tp,e.__scopeSelect),r=Nm(Tp,e.__scopeSelect),[o,l]=b.useState(!1),a=at(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;l(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx($1,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});L1.displayName=Tp;var Np="SelectScrollDownButton",F1=b.forwardRef((e,t)=>{const n=so(Np,e.__scopeSelect),r=Nm(Np,e.__scopeSelect),[o,l]=b.useState(!1),a=at(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,h=Math.ceil(d.scrollTop)<f;l(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx($1,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});F1.displayName=Np;var $1=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,l=so("SelectScrollButton",n),a=b.useRef(null),u=fd(n),d=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),rn(()=>{var h;const f=u().find(p=>p.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[u]),y.jsx(tt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Qe(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Qe(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Qe(o.onPointerLeave,()=>{d()})})}),OD="SelectSeparator",DD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});DD.displayName=OD;var Rp="SelectArrow",zD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hd(n),l=oo(Rp,n),a=so(Rp,n);return l.open&&a.position==="popper"?y.jsx(Lk,{...o,...r,ref:t}):null});zD.displayName=Rp;var MD="SelectBubbleInput",V1=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),l=at(r,o),a=RO(t);return b.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==t&&h){const p=new Event("change",{bubbles:!0});h.call(u,t),u.dispatchEvent(p)}},[a,t]),y.jsx(tt.select,{...n,style:{...Fk,...n.style},ref:l,defaultValue:t})});V1.displayName=MD;function B1(e){return e===""||e===void 0}function U1(e){const t=Vn(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(a=>{const u=n.current+a;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),l=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function H1(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let a=LD(e,Math.max(l,0));o.length===1&&(a=a.filter(f=>f!==n));const d=a.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function LD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var FD=x1,$D=b1,VD=S1,BD=C1,UD=E1,HD=_1,WD=R1,ZD=O1,qD=D1,QD=M1,YD=L1,KD=F1;function Bn({...e}){return y.jsx(FD,{"data-slot":"select",...e})}function Un({...e}){return y.jsx(VD,{"data-slot":"select-value",...e})}function Hn({className:e,size:t="default",children:n,...r}){return y.jsxs($D,{"data-slot":"select-trigger","data-size":t,className:We("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(BD,{asChild:!0,children:y.jsx(Bb,{className:"size-4 opacity-50"})})]})}function Wn({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return y.jsx(UD,{children:y.jsxs(HD,{"data-slot":"select-content",className:We("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...o,children:[y.jsx(GD,{}),y.jsx(WD,{className:We("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),y.jsx(XD,{})]})})}function Et({className:e,children:t,...n}){return y.jsxs(ZD,{"data-slot":"select-item",className:We("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(QD,{children:y.jsx(XN,{className:"size-4"})})}),y.jsx(qD,{children:t})]})}function GD({className:e,...t}){return y.jsx(YD,{"data-slot":"select-scroll-up-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(rR,{className:"size-4"})})}function XD({className:e,...t}){return y.jsx(KD,{"data-slot":"select-scroll-down-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(Bb,{className:"size-4"})})}function pd({value:e,onChange:t,statuses:n,triggerClassName:r}){return y.jsxs(Bn,{value:e,onValueChange:t,children:[y.jsx(Hn,{className:r,children:y.jsx(Un,{})}),y.jsx(Wn,{children:n.map(o=>y.jsx(Et,{value:o,children:Qs[o]},o))})]})}function md({value:e,onChange:t,triggerClassName:n}){return y.jsxs(Bn,{value:e.toString(),onValueChange:r=>t(parseInt(r,10)),children:[y.jsx(Hn,{className:n,children:y.jsx(Un,{})}),y.jsx(Wn,{children:Object.entries(ud).map(([r,o])=>y.jsxs(Et,{value:r,children:["P",r," - ",o]},r))})]})}function JD(e){const t=ez(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(nz);if(d){const f=d.props.children,h=u.map(p=>p===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:p);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function ez(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=iz(o),u=rz(l,o.props);return o.type!==b.Fragment&&(u.ref=r?Js(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tz=Symbol("radix.slottable");function nz(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tz}function rz(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function iz(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gd="Dialog",[W1]=nl(gd),[oz,zr]=W1(gd),Z1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:a=!0}=e,u=b.useRef(null),d=b.useRef(null),[f,h]=Nc({prop:r,defaultProp:o??!1,onChange:l,caller:gd});return y.jsx(oz,{scope:t,triggerRef:u,contentRef:d,contentId:Mo(),titleId:Mo(),descriptionId:Mo(),open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:a,children:n})};Z1.displayName=gd;var q1="DialogTrigger",sz=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(q1,n),l=at(t,o.triggerRef);return y.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Im(o.open),...r,ref:l,onClick:Qe(e.onClick,o.onOpenToggle)})});sz.displayName=q1;var Rm="DialogPortal",[lz,Q1]=W1(Rm,{forceMount:void 0}),Y1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,l=zr(Rm,t);return y.jsx(lz,{scope:t,forceMount:n,children:b.Children.map(r,a=>y.jsx(Jr,{present:n||l.open,children:y.jsx(od,{asChild:!0,container:o,children:a})}))})};Y1.displayName=Rm;var Ac="DialogOverlay",K1=b.forwardRef((e,t)=>{const n=Q1(Ac,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=zr(Ac,e.__scopeDialog);return l.modal?y.jsx(Jr,{present:r||l.open,children:y.jsx(uz,{...o,ref:t})}):null});K1.displayName=Ac;var az=JD("DialogOverlay.RemoveScroll"),uz=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Ac,n);return y.jsx(Tm,{as:az,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(tt.div,{"data-state":Im(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Bo="DialogContent",G1=b.forwardRef((e,t)=>{const n=Q1(Bo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=zr(Bo,e.__scopeDialog);return y.jsx(Jr,{present:r||l.open,children:l.modal?y.jsx(cz,{...o,ref:t}):y.jsx(dz,{...o,ref:t})})});G1.displayName=Bo;var cz=b.forwardRef((e,t)=>{const n=zr(Bo,e.__scopeDialog),r=b.useRef(null),o=at(t,n.contentRef,r);return b.useEffect(()=>{const l=r.current;if(l)return d1(l)},[]),y.jsx(X1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qe(e.onCloseAutoFocus,l=>{var a;l.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Qe(e.onPointerDownOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&l.preventDefault()}),onFocusOutside:Qe(e.onFocusOutside,l=>l.preventDefault())})}),dz=b.forwardRef((e,t)=>{const n=zr(Bo,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return y.jsx(X1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var a,u;(a=e.onCloseAutoFocus)==null||a.call(e,l),l.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),l.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:l=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,l),l.defaultPrevented||(r.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(a))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),X1=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:l,...a}=e,u=zr(Bo,n),d=b.useRef(null),f=at(t,d);return a1(),y.jsxs(y.Fragment,{children:[y.jsx(Pm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:l,children:y.jsx(Jc,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Im(u.open),...a,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(hz,{titleId:u.titleId}),y.jsx(mz,{contentRef:d,descriptionId:u.descriptionId})]})]})}),jm="DialogTitle",J1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(jm,n);return y.jsx(tt.h2,{id:o.titleId,...r,ref:t})});J1.displayName=jm;var eS="DialogDescription",fz=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(eS,n);return y.jsx(tt.p,{id:o.descriptionId,...r,ref:t})});fz.displayName=eS;var tS="DialogClose",nS=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(tS,n);return y.jsx(tt.button,{type:"button",...r,ref:t,onClick:Qe(e.onClick,()=>o.onOpenChange(!1))})});nS.displayName=tS;function Im(e){return e?"open":"closed"}var rS="DialogTitleWarning",[l8,iS]=Ij(rS,{contentName:Bo,titleName:jm,docsSlug:"dialog"}),hz=({titleId:e})=>{const t=iS(rS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
263
+
264
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
265
+
266
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},pz="DialogDescriptionWarning",mz=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${iS(pz).contentName}}.`;return b.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gz=Z1,yz=Y1,vz=K1,xz=G1,wz=J1,bz=nS;function Am({...e}){return y.jsx(gz,{"data-slot":"dialog",...e})}function kz({...e}){return y.jsx(yz,{"data-slot":"dialog-portal",...e})}function Sz({className:e,...t}){return y.jsx(vz,{"data-slot":"dialog-overlay",className:We("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Om({className:e,children:t,showCloseButton:n=!0,...r}){return y.jsxs(kz,{"data-slot":"dialog-portal",children:[y.jsx(Sz,{}),y.jsxs(xz,{"data-slot":"dialog-content",className:We("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&y.jsxs(bz,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[y.jsx(Wb,{}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Cz({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-header",className:We("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Ez({className:e,...t}){return y.jsx(wz,{"data-slot":"dialog-title",className:We("text-lg leading-none font-semibold",e),...t})}function _z(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Dm="ScrollArea",[oS]=nl(Dm),[Pz,mr]=oS(Dm),sS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:l=600,...a}=e,[u,d]=b.useState(null),[f,h]=b.useState(null),[p,x]=b.useState(null),[g,S]=b.useState(null),[k,C]=b.useState(null),[E,_]=b.useState(0),[T,I]=b.useState(0),[O,R]=b.useState(!1),[V,Q]=b.useState(!1),oe=at(t,K=>d(K)),A=l1(o);return y.jsx(Pz,{scope:n,type:r,dir:A,scrollHideDelay:l,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:x,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:O,onScrollbarXEnabledChange:R,scrollbarY:k,onScrollbarYChange:C,scrollbarYEnabled:V,onScrollbarYEnabledChange:Q,onCornerWidthChange:_,onCornerHeightChange:I,children:y.jsx(tt.div,{dir:A,...a,ref:oe,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});sS.displayName=Dm;var lS="ScrollAreaViewport",aS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...l}=e,a=mr(lS,n),u=b.useRef(null),d=at(t,u,a.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),y.jsx(tt.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});aS.displayName=lS;var ei="ScrollAreaScrollbar",uS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=mr(ei,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=o,u=e.orientation==="horizontal";return b.useEffect(()=>(u?l(!0):a(!0),()=>{u?l(!1):a(!1)}),[u,l,a]),o.type==="hover"?y.jsx(Tz,{...r,ref:t,forceMount:n}):o.type==="scroll"?y.jsx(Nz,{...r,ref:t,forceMount:n}):o.type==="auto"?y.jsx(cS,{...r,ref:t,forceMount:n}):o.type==="always"?y.jsx(zm,{...r,ref:t}):null});uS.displayName=ei;var Tz=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=mr(ei,e.__scopeScrollArea),[l,a]=b.useState(!1);return b.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),a(!0)},h=()=>{d=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),y.jsx(Jr,{present:n||l,children:y.jsx(cS,{"data-state":l?"visible":"hidden",...r,ref:t})})}),Nz=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=mr(ei,e.__scopeScrollArea),l=e.orientation==="horizontal",a=vd(()=>d("SCROLL_END"),100),[u,d]=_z("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),b.useEffect(()=>{const f=o.viewport,h=l?"scrollLeft":"scrollTop";if(f){let p=f[h];const x=()=>{const g=f[h];p!==g&&(d("SCROLL"),a()),p=g};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[o.viewport,l,d,a]),y.jsx(Jr,{present:n||u!=="hidden",children:y.jsx(zm,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Qe(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Qe(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cS=b.forwardRef((e,t)=>{const n=mr(ei,e.__scopeScrollArea),{forceMount:r,...o}=e,[l,a]=b.useState(!1),u=e.orientation==="horizontal",d=vd(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;a(u?f:h)}},10);return Ys(n.viewport,d),Ys(n.content,d),y.jsx(Jr,{present:r||l,children:y.jsx(zm,{"data-state":l?"visible":"hidden",...o,ref:t})})}),zm=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=mr(ei,e.__scopeScrollArea),l=b.useRef(null),a=b.useRef(0),[u,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=mS(u.viewport,u.content),h={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:x=>l.current=x,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:x=>a.current=x};function p(x,g){return Dz(x,a.current,u,g)}return n==="horizontal"?y.jsx(Rz,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const x=o.viewport.scrollLeft,g=xw(x,u,o.dir);l.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollLeft=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollLeft=p(x,o.dir))}}):n==="vertical"?y.jsx(jz,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const x=o.viewport.scrollTop,g=xw(x,u);l.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollTop=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollTop=p(x))}}):null}),Rz=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,l=mr(ei,e.__scopeScrollArea),[a,u]=b.useState(),d=b.useRef(null),f=at(t,d,l.onScrollbarXChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(fS,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(l.viewport){const x=l.viewport.scrollLeft+h.deltaX;e.onWheelScroll(x),yS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&l.viewport&&a&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Dc(a.paddingLeft),paddingEnd:Dc(a.paddingRight)}})}})}),jz=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,l=mr(ei,e.__scopeScrollArea),[a,u]=b.useState(),d=b.useRef(null),f=at(t,d,l.onScrollbarYChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(fS,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(l.viewport){const x=l.viewport.scrollTop+h.deltaY;e.onWheelScroll(x),yS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&l.viewport&&a&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Dc(a.paddingTop),paddingEnd:Dc(a.paddingBottom)}})}})}),[Iz,dS]=oS(ei),fS=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...x}=e,g=mr(ei,n),[S,k]=b.useState(null),C=at(t,oe=>k(oe)),E=b.useRef(null),_=b.useRef(""),T=g.viewport,I=r.content-r.viewport,O=Vn(h),R=Vn(d),V=vd(p,10);function Q(oe){if(E.current){const A=oe.clientX-E.current.left,K=oe.clientY-E.current.top;f({x:A,y:K})}}return b.useEffect(()=>{const oe=A=>{const K=A.target;(S==null?void 0:S.contains(K))&&O(A,I)};return document.addEventListener("wheel",oe,{passive:!1}),()=>document.removeEventListener("wheel",oe,{passive:!1})},[T,S,I,O]),b.useEffect(R,[r,R]),Ys(S,V),Ys(g.content,V),y.jsx(Iz,{scope:n,scrollbar:S,hasThumb:o,onThumbChange:Vn(l),onThumbPointerUp:Vn(a),onThumbPositionChange:R,onThumbPointerDown:Vn(u),children:y.jsx(tt.div,{...x,ref:C,style:{position:"absolute",...x.style},onPointerDown:Qe(e.onPointerDown,oe=>{oe.button===0&&(oe.target.setPointerCapture(oe.pointerId),E.current=S.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),Q(oe))}),onPointerMove:Qe(e.onPointerMove,Q),onPointerUp:Qe(e.onPointerUp,oe=>{const A=oe.target;A.hasPointerCapture(oe.pointerId)&&A.releasePointerCapture(oe.pointerId),document.body.style.webkitUserSelect=_.current,g.viewport&&(g.viewport.style.scrollBehavior=""),E.current=null})})})}),Oc="ScrollAreaThumb",hS=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=dS(Oc,e.__scopeScrollArea);return y.jsx(Jr,{present:n||o.hasThumb,children:y.jsx(Az,{ref:t,...r})})}),Az=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,l=mr(Oc,n),a=dS(Oc,n),{onThumbPositionChange:u}=a,d=at(t,p=>a.onThumbChange(p)),f=b.useRef(void 0),h=vd(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const p=l.viewport;if(p){const x=()=>{if(h(),!f.current){const g=zz(p,u);f.current=g,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[l.viewport,h,u]),y.jsx(tt.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Qe(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),S=p.clientX-g.left,k=p.clientY-g.top;a.onThumbPointerDown({x:S,y:k})}),onPointerUp:Qe(e.onPointerUp,a.onThumbPointerUp)})});hS.displayName=Oc;var Mm="ScrollAreaCorner",pS=b.forwardRef((e,t)=>{const n=mr(Mm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(Oz,{...e,ref:t}):null});pS.displayName=Mm;var Oz=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=mr(Mm,n),[l,a]=b.useState(0),[u,d]=b.useState(0),f=!!(l&&u);return Ys(o.scrollbarX,()=>{var p;const h=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(h),d(h)}),Ys(o.scrollbarY,()=>{var p;const h=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(h),a(h)}),f?y.jsx(tt.div,{...r,ref:t,style:{width:l,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Dc(e){return e?parseInt(e,10):0}function mS(e,t){const n=e/t;return isNaN(n)?0:n}function yd(e){const t=mS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dz(e,t,n,r="ltr"){const o=yd(n),l=o/2,a=t||l,u=o-a,d=n.scrollbar.paddingStart+a,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,h=n.content-n.viewport,p=r==="ltr"?[0,h]:[h*-1,0];return gS([d,f],p)(e)}function xw(e,t,n="ltr"){const r=yd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-o,a=t.content-t.viewport,u=l-r,d=n==="ltr"?[0,a]:[a*-1,0],f=Cp(e,d);return gS([0,a],[0,u])(f)}function gS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yS(e,t){return e>0&&e<t}var zz=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const l={left:e.scrollLeft,top:e.scrollTop},a=n.left!==l.left,u=n.top!==l.top;(a||u)&&t(),n=l,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function vd(e,t){const n=Vn(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ys(e,t){const n=Vn(t);rn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Mz=sS,Lz=aS,Fz=pS;function Lm({className:e,children:t,...n}){return y.jsxs(Mz,{"data-slot":"scroll-area",className:We("relative",e),...n,children:[y.jsx(Lz,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),y.jsx($z,{}),y.jsx(Fz,{})]})}function $z({className:e,orientation:t="vertical",...n}){return y.jsx(uS,{"data-slot":"scroll-area-scrollbar",orientation:t,className:We("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:y.jsx(hS,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Vz={epic:Na,task:Ra,subtask:am};function vS({items:e}){return y.jsx("nav",{className:"flex items-center gap-1.5",children:e.map((t,n)=>{const r=n===e.length-1,o=!r&&t.onClick,l=Vz[t.type];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("div",{className:We("flex items-center gap-1",o&&"cursor-pointer hover:text-foreground"),onClick:o?t.onClick:void 0,title:t.title,children:[y.jsx(l,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t.id})]}),!r&&y.jsx(Gc,{className:"h-3 w-3 opacity-50"})]},t.id)})})}function Bz(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uz=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wz={};function ww(e,t){return(Wz.jsx?Hz:Uz).test(e)}const Zz=/[ \t\n\f\r]/g;function qz(e){return typeof e=="object"?e.type==="text"?bw(e.value):!1:bw(e)}function bw(e){return e.replace(Zz,"")===""}class Aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Aa.prototype.normal={};Aa.prototype.property={};Aa.prototype.space=void 0;function xS(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Aa(n,r,t)}function jp(e){return e.toLowerCase()}class Zn{constructor(t,n){this.attribute=n,this.property=t}}Zn.prototype.attribute="";Zn.prototype.booleanish=!1;Zn.prototype.boolean=!1;Zn.prototype.commaOrSpaceSeparated=!1;Zn.prototype.commaSeparated=!1;Zn.prototype.defined=!1;Zn.prototype.mustUseProperty=!1;Zn.prototype.number=!1;Zn.prototype.overloadedBoolean=!1;Zn.prototype.property="";Zn.prototype.spaceSeparated=!1;Zn.prototype.space=void 0;let Qz=0;const He=Qo(),Mt=Qo(),Ip=Qo(),pe=Qo(),mt=Qo(),js=Qo(),Xn=Qo();function Qo(){return 2**++Qz}const Ap=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Mt,commaOrSpaceSeparated:Xn,commaSeparated:js,number:pe,overloadedBoolean:Ip,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Oh=Object.keys(Ap);class Fm extends Zn{constructor(t,n,r,o){let l=-1;if(super(t,n),kw(this,"space",o),typeof r=="number")for(;++l<Oh.length;){const a=Oh[l];kw(this,Oh[l],(r&Ap[a])===Ap[a])}}}Fm.prototype.defined=!0;function kw(e,t,n){n&&(e[t]=n)}function sl(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const l=new Fm(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[jp(r)]=r,n[jp(l.attribute)]=r}return new Aa(t,n,e.space)}const wS=sl({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:mt,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:pe,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:mt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Mt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function bS(e,t){return t in e?e[t]:t}function kS(e,t){return bS(e,t.toLowerCase())}const Yz=sl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:mt,autoFocus:He,autoPlay:He,blocking:mt,capture:null,charSet:null,checked:He,cite:null,className:mt,cols:pe,colSpan:null,content:null,contentEditable:Mt,controls:He,controlsList:mt,coords:pe|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Ip,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:mt,height:pe,hidden:Ip,high:pe,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:mt,itemRef:mt,itemScope:He,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:pe,pattern:null,ping:mt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:mt,required:He,reversed:He,rows:pe,rowSpan:pe,sandbox:mt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Mt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:kS}),Kz=sl({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:Xn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:mt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:js,g2:js,glyphName:js,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xn,rev:Xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xn,requiredFeatures:Xn,requiredFonts:Xn,requiredFormats:Xn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bS}),SS=sl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),CS=sl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kS}),ES=sl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Gz={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"},Xz=/[A-Z]/g,Sw=/-[a-z]/g,Jz=/^data[-\w.:]+$/i;function eM(e,t){const n=jp(t);let r=t,o=Zn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Jz.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Sw,nM);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Sw.test(l)){let a=l.replace(Xz,tM);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Fm}return new o(r,t)}function tM(e){return"-"+e.toLowerCase()}function nM(e){return e.charAt(1).toUpperCase()}const rM=xS([wS,Yz,SS,CS,ES],"html"),$m=xS([wS,Kz,SS,CS,ES],"svg");function iM(e){return e.join(" ").trim()}var Ss={},Dh,Cw;function oM(){if(Cw)return Dh;Cw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
267
+ `,f="/",h="*",p="",x="comment",g="declaration";function S(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var _=1,T=1;function I(W){var B=W.match(t);B&&(_+=B.length);var q=W.lastIndexOf(d);T=~q?W.length-q:T+W.length}function O(){var W={line:_,column:T};return function(B){return B.position=new R(W),oe(),B}}function R(W){this.start=W,this.end={line:_,column:T},this.source=E.source}R.prototype.content=C;function V(W){var B=new Error(E.source+":"+_+":"+T+": "+W);if(B.reason=W,B.filename=E.source,B.line=_,B.column=T,B.source=C,!E.silent)throw B}function Q(W){var B=W.exec(C);if(B){var q=B[0];return I(q),C=C.slice(q.length),B}}function oe(){Q(n)}function A(W){var B;for(W=W||[];B=K();)B!==!1&&W.push(B);return W}function K(){var W=O();if(!(f!=C.charAt(0)||h!=C.charAt(1))){for(var B=2;p!=C.charAt(B)&&(h!=C.charAt(B)||f!=C.charAt(B+1));)++B;if(B+=2,p===C.charAt(B-1))return V("End of comment missing");var q=C.slice(2,B-2);return T+=2,I(q),C=C.slice(B),T+=2,W({type:x,comment:q})}}function M(){var W=O(),B=Q(r);if(B){if(K(),!Q(o))return V("property missing ':'");var q=Q(l),ee=W({type:g,property:k(B[0].replace(e,p)),value:q?k(q[0].replace(e,p)):p});return Q(a),ee}}function ne(){var W=[];A(W);for(var B;B=M();)B!==!1&&(W.push(B),A(W));return W}return oe(),ne()}function k(C){return C?C.replace(u,p):p}return Dh=S,Dh}var Ew;function sM(){if(Ew)return Ss;Ew=1;var e=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=n;const t=e(oM());function n(r,o){let l=null;if(!r||typeof r!="string")return l;const a=(0,t.default)(r),u=typeof o=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:h}=d;u?o(f,h,d):h&&(l=l||{},l[f]=h)}),l}return Ss}var Zl={},_w;function lM(){if(_w)return Zl;_w=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(f){return!f||n.test(f)||e.test(f)},a=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),l(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(o,u):f=f.replace(r,u),f.replace(t,a))};return Zl.camelCase=d,Zl}var ql,Pw;function aM(){if(Pw)return ql;Pw=1;var e=ql&&ql.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(sM()),n=lM();function r(o,l){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(a[(0,n.camelCase)(u,l)]=d)}),a}return r.default=r,ql=r,ql}var uM=aM();const cM=Zo(uM),_S=PS("end"),Vm=PS("start");function PS(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dM(e){const t=Vm(e),n=_S(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tw(e.position):"start"in e||"end"in e?Tw(e):"line"in e||"column"in e?Op(e):""}function Op(e){return Nw(e&&e.line)+":"+Nw(e&&e.column)}function Tw(e){return Op(e&&e.start)+"-"+Op(e&&e.end)}function Nw(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(a=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?l.ruleId=r:(l.source=r.slice(0,d),l.ruleId=r.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ea(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=a&&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}}hn.prototype.file="";hn.prototype.name="";hn.prototype.reason="";hn.prototype.message="";hn.prototype.stack="";hn.prototype.column=void 0;hn.prototype.line=void 0;hn.prototype.ancestors=void 0;hn.prototype.cause=void 0;hn.prototype.fatal=void 0;hn.prototype.place=void 0;hn.prototype.ruleId=void 0;hn.prototype.source=void 0;const Bm={}.hasOwnProperty,fM=new Map,hM=/[A-Z]/g,pM=new Set(["table","tbody","thead","tfoot","tr"]),mM=new Set(["td","th"]),TS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=CM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=SM(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$m:rM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=NS(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function NS(e,t,n){if(t.type==="element")return yM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return vM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wM(e,t,n);if(t.type==="mdxjsEsm")return xM(e,t);if(t.type==="root")return bM(e,t,n);if(t.type==="text")return kM(e,t)}function yM(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=$m,e.schema=o),e.ancestors.push(t);const l=jS(e,t.tagName,!1),a=EM(e,t);let u=Hm(e,t);return pM.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!qz(d):!0})),RS(e,a,l,t),Um(a,u),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function vM(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}pa(e,t.position)}function xM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pa(e,t.position)}function wM(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=$m,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:jS(e,t.name,!0),a=_M(e,t),u=Hm(e,t);return RS(e,a,l,t),Um(a,u),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function bM(e,t,n){const r={};return Um(r,Hm(e,t)),e.create(t,e.Fragment,r,n)}function kM(e,t){return t.value}function RS(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Um(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function SM(e,t,n){return r;function r(o,l,a,u){const f=Array.isArray(a.children)?n:t;return u?f(l,a,u):f(l,a)}}function CM(e,t){return n;function n(r,o,l,a){const u=Array.isArray(l.children),d=Vm(r);return t(o,l,a,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function EM(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Bm.call(t.properties,o)){const l=PM(e,o,t.properties[o]);if(l){const[a,u]=l;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&mM.has(t.tagName)?r=u:n[a]=u}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _M(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const a=l.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else pa(e,t.position);else{const o=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else pa(e,t.position);else l=r.value===null?!0:r.value;n[o]=l}return n}function Hm(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:fM;for(;++r<t.children.length;){const l=t.children[r];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const f=o.get(d)||0;a=d+"-"+f,o.set(d,f+1)}}const u=NS(e,l,a);u!==void 0&&n.push(u)}return n}function PM(e,t,n){const r=eM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Bz(n):iM(n)),r.property==="style"){let o=typeof n=="object"?n:TM(e,String(n));return e.stylePropertyNameCase==="css"&&(o=NM(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Gz[r.property]||r.property:r.attribute,n]}}function TM(e,t){try{return cM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=TS+"#cannot-parse-style-attribute",o}}function jS(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,a;for(;++l<o.length;){const u=ww(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}r=a}else r=ww(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Bm.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);pa(e)}function pa(e,t){const n=new hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=TS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function NM(e){const t={};let n;for(n in e)Bm.call(e,n)&&(t[RM(n)]=e[n]);return t}function RM(e){let t=e.replace(hM,jM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jM(e){return"-"+e.toLowerCase()}const zh={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"]},IM={};function Wm(e,t){const n=IM,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return IS(e,r,o)}function IS(e,t,n){if(AM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Rw(e.children,t,n)}return Array.isArray(e)?Rw(e,t,n):""}function Rw(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=IS(e[o],t,n);return r.join("")}function AM(e){return!!(e&&typeof e=="object")}const jw=document.createElement("i");function Zm(e){const t="&"+e+";";jw.innerHTML=t;const n=jw.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function rr(e,t,n,r){const o=e.length;let l=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<r.length;)a=r.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function hr(e,t){return e.length>0?(rr(e,e.length,0,t),e):t}const Iw={}.hasOwnProperty;function AS(e){const t={};let n=-1;for(;++n<e.length;)OM(t,e[n]);return t}function OM(e,t){let n;for(n in t){const o=(Iw.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Iw.call(o,a)||(o[a]=[]);const u=l[a];DM(o[a],Array.isArray(u)?u:u?[u]:[])}}}function DM(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);rr(e,0,0,r)}function OS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ir(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=lo(/[A-Za-z]/),fn=lo(/[\dA-Za-z]/),zM=lo(/[#-'*+\--9=?A-Z^-~]/);function zc(e){return e!==null&&(e<32||e===127)}const Dp=lo(/\d/),MM=lo(/[\dA-Fa-f]/),LM=lo(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const xd=lo(new RegExp("\\p{P}|\\p{S}","u")),Uo=lo(/\s/);function lo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ll(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(n+1);l<56320&&u>56319&&u<57344?(a=String.fromCharCode(l,u),o=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return Ye(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ye(d)&&l++<o?(e.consume(d),u):(e.exit(n),t(d))}}const FM={tokenize:$M};function $M(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),l(u)}function l(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Fe(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),a)}}const VM={tokenize:BM},Aw={tokenize:UM};function BM(e){const t=this,n=[];let r=0,o,l,a;return u;function u(T){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,f)(T)}return f(T)}function d(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&_();const I=t.events.length;let O=I,R;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){R=t.events[O][1].end;break}E(r);let V=I;for(;V<t.events.length;)t.events[V][1].end={...R},V++;return rr(t.events,O+1,0,t.events.slice(I)),t.events.length=V,f(T)}return u(T)}function f(T){if(r===n.length){if(!o)return x(T);if(o.currentConstruct&&o.currentConstruct.concrete)return S(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Aw,h,p)(T)}function h(T){return o&&_(),E(r),x(T)}function p(T){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,S(T)}function x(T){return t.containerState={},e.attempt(Aw,g,S)(T)}function g(T){return r++,n.push([t.currentConstruct,t.containerState]),x(T)}function S(T){if(T===null){o&&_(),E(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return Fe(T)?(e.consume(T),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(T),k)}function C(T,I){const O=t.sliceStream(T);if(I&&O.push(null),T.previous=l,l&&(l.next=T),l=T,o.defineSkip(T.start),o.write(O),t.parser.lazy[T.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<a&&(!o.events[R][1].end||o.events[R][1].end.offset>a))return;const V=t.events.length;let Q=V,oe,A;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){if(oe){A=t.events[Q][1].end;break}oe=!0}for(E(r),R=V;R<t.events.length;)t.events[R][1].end={...A},R++;rr(t.events,Q+1,0,t.events.slice(V)),t.events.length=R}}function E(T){let I=n.length;for(;I-- >T;){const O=n[I];t.containerState=O[1],O[0].exit.call(t,e)}n.length=T}function _(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function UM(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ks(e){if(e===null||ft(e)||Uo(e))return 1;if(xd(e))return 2}function wd(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const zp={name:"attention",resolveAll:HM,tokenize:WM};function HM(e,t){let n=-1,r,o,l,a,u,d,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},x={...e[n][1].start};Ow(p,-d),Ow(x,d),a={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=hr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=hr(f,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",l,t]]),f=hr(f,wd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=hr(f,[["exit",l,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=hr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,rr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function WM(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ks(r);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===l)return e.consume(d),u;const f=e.exit("attentionSequence"),h=Ks(d),p=!h||h===2&&o||n.includes(d),x=!o||o===2&&h||n.includes(r);return f._open=!!(l===42?p:p&&(o||!x)),f._close=!!(l===42?x:x&&(h||!p)),t(d)}}function Ow(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ZM={name:"autolink",tokenize:qM};function qM(e,t,n){let r=0;return o;function o(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(g){return kn(g)?(e.consume(g),a):g===64?n(g):f(g)}function a(g){return g===43||g===45||g===46||fn(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,d):(g===43||g===45||g===46||fn(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function d(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||zc(g)?n(g):(e.consume(g),d)}function f(g){return g===64?(e.consume(g),h):zM(g)?(e.consume(g),f):n(g)}function h(g){return fn(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):x(g)}function x(g){if((g===45||fn(g))&&r++<63){const S=g===45?x:p;return e.consume(g),S}return n(g)}}const Oa={partial:!0,tokenize:QM};function QM(e,t,n){return r;function r(l){return Ye(l)?Xe(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||Fe(l)?t(l):n(l)}}const DS={continuation:{tokenize:KM},exit:GM,name:"blockQuote",tokenize:YM};function YM(e,t,n){const r=this;return o;function o(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Ye(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function KM(e,t,n){const r=this;return o;function o(a){return Ye(a)?Xe(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(DS,t,n)(a)}}function GM(e){e.exit("blockQuote")}const zS={name:"characterEscape",tokenize:XM};function XM(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return LM(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const MS={name:"characterReference",tokenize:JM};function JM(e,t,n){const r=this;let o=0,l,a;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),l=31,a=fn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=MM,h):(e.enter("characterReferenceValue"),l=7,a=Dp,h(p))}function h(p){if(p===59&&o){const x=e.exit("characterReferenceValue");return a===fn&&!Zm(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&o++<l?(e.consume(p),h):n(p)}}const Dw={partial:!0,tokenize:tL},zw={concrete:!0,name:"codeFenced",tokenize:eL};function eL(e,t,n){const r=this,o={partial:!0,tokenize:O};let l=0,a=0,u;return d;function d(R){return f(R)}function f(R){const V=r.events[r.events.length-1];return l=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,u=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(R)}function h(R){return R===u?(a++,e.consume(R),h):a<3?n(R):(e.exit("codeFencedFenceSequence"),Ye(R)?Xe(e,p,"whitespace")(R):p(R))}function p(R){return R===null||Fe(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(Dw,k,I)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(R)):Ye(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,g,"whitespace")(R)):R===96&&R===u?n(R):(e.consume(R),x)}function g(R){return R===null||Fe(R)?p(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(R)):R===96&&R===u?n(R):(e.consume(R),S)}function k(R){return e.attempt(o,I,C)(R)}function C(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),E}function E(R){return l>0&&Ye(R)?Xe(e,_,"linePrefix",l+1)(R):_(R)}function _(R){return R===null||Fe(R)?e.check(Dw,k,I)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Fe(R)?(e.exit("codeFlowValue"),_(R)):(e.consume(R),T)}function I(R){return e.exit("codeFenced"),t(R)}function O(R,V,Q){let oe=0;return A;function A(B){return R.enter("lineEnding"),R.consume(B),R.exit("lineEnding"),K}function K(B){return R.enter("codeFencedFence"),Ye(B)?Xe(R,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):M(B)}function M(B){return B===u?(R.enter("codeFencedFenceSequence"),ne(B)):Q(B)}function ne(B){return B===u?(oe++,R.consume(B),ne):oe>=a?(R.exit("codeFencedFenceSequence"),Ye(B)?Xe(R,W,"whitespace")(B):W(B)):Q(B)}function W(B){return B===null||Fe(B)?(R.exit("codeFencedFence"),V(B)):Q(B)}}}function tL(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Mh={name:"codeIndented",tokenize:rL},nL={partial:!0,tokenize:iL};function rL(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Xe(e,l,"linePrefix",5)(f)}function l(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?d(f):Fe(f)?e.attempt(nL,a,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Fe(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function iL(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Xe(e,l,"linePrefix",5)(a)}function l(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):Fe(a)?o(a):n(a)}}const oL={name:"codeText",previous:lL,resolve:sL,tokenize:aL};function sL(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function lL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aL(e,t,n){let r=0,o,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(l=e.enter("codeTextSequence"),o=0,h(p)):Fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Fe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),o++,h):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",f(p))}}class uL{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Ql(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ql(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ql(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ql(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ql(this.left,n.reverse())}}}function Ql(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function LS(e){const t={};let n=-1,r,o,l,a,u,d,f;const h=new uL(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,cL(h,n)),n=t[n],f=!0);else if(r[1]._container){for(l=n,o=void 0;l--;)if(a=h.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...h.get(o)[1].start},u=h.slice(o,n),u.unshift(r),h.splice(o,n-o+1,u))}}return rr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function cL(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const l=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,d=[],f={};let h,p,x=-1,g=n,S=0,k=0;const C=[k];for(;g;){for(;e.get(++o)[1]!==g;);l.push(o),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(k=x+1,C.push(k),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):C.pop(),x=C.length;x--;){const E=u.slice(C[x],C[x+1]),_=l.pop();d.push([_,_+E.length-1]),e.splice(_,2,E)}for(d.reverse(),x=-1;++x<d.length;)f[S+d[x][0]]=S+d[x][1],S+=d[x][1]-d[x][0]-1;return f}const dL={resolve:hL,tokenize:pL},fL={partial:!0,tokenize:mL};function hL(e){return LS(e),e}function pL(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?l(u):Fe(u)?e.check(fL,a,l)(u):(e.consume(u),o)}function l(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function mL(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Xe(e,l,"linePrefix")}function l(a){if(a===null||Fe(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function FS(e,t,n,r,o,l,a,u,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return p;function p(E){return E===60?(e.enter(r),e.enter(o),e.enter(l),e.consume(E),e.exit(l),x):E===null||E===32||E===41||zc(E)?n(E):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(l),e.consume(E),e.exit(l),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===62?(e.exit("chunkString"),e.exit(u),x(E)):E===null||E===60||Fe(E)?n(E):(e.consume(E),E===92?S:g)}function S(E){return E===60||E===62||E===92?(e.consume(E),g):g(E)}function k(E){return!h&&(E===null||E===41||ft(E))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(E)):h<f&&E===40?(e.consume(E),h++,k):E===41?(e.consume(E),h--,k):E===null||E===32||E===40||zc(E)?n(E):(e.consume(E),E===92?C:k)}function C(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function $S(e,t,n,r,o,l){const a=this;let u=0,d;return f;function f(g){return e.enter(r),e.enter(o),e.consume(g),e.exit(o),e.enter(l),h}function h(g){return u>999||g===null||g===91||g===93&&!d||g===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(l),e.enter(o),e.consume(g),e.exit(o),e.exit(r),t):Fe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||Fe(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),d||(d=!Ye(g)),g===92?x:p)}function x(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function VS(e,t,n,r,o,l){let a;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),a=x===40?41:x,d):n(x)}function d(x){return x===a?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),t):(e.enter(l),f(x))}function f(x){return x===a?(e.exit(l),d(a)):x===null?n(x):Fe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Xe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===a||x===null||Fe(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?p:h)}function p(x){return x===a||x===92?(e.consume(x),h):h(x)}}function ta(e,t){let n;return r;function r(o){return Fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ye(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const gL={name:"definition",tokenize:vL},yL={partial:!0,tokenize:xL};function vL(e,t,n){const r=this;let o;return l;function l(g){return e.enter("definition"),a(g)}function a(g){return $S.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return o=Ir(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),d):n(g)}function d(g){return ft(g)?ta(e,f)(g):f(g)}function f(g){return FS(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(yL,p,p)(g)}function p(g){return Ye(g)?Xe(e,x,"whitespace")(g):x(g)}function x(g){return g===null||Fe(g)?(e.exit("definition"),r.parser.defined.push(o),t(g)):n(g)}}function xL(e,t,n){return r;function r(u){return ft(u)?ta(e,o)(u):n(u)}function o(u){return VS(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return Ye(u)?Xe(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Fe(u)?t(u):n(u)}}const wL={name:"hardBreakEscape",tokenize:bL};function bL(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return Fe(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const kL={name:"headingAtx",resolve:SL,tokenize:CL};function SL(e,t){let n=e.length-2,r=3,o,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},rr(e,r,n-r+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function CL(e,t,n){let r=0;return o;function o(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||ft(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||Fe(h)?(e.exit("atxHeading"),t(h)):Ye(h)?Xe(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||ft(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const EL=["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"],Mw=["pre","script","style","textarea"],_L={concrete:!0,name:"htmlFlow",resolveTo:NL,tokenize:RL},PL={partial:!0,tokenize:IL},TL={partial:!0,tokenize:jL};function NL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function RL(e,t,n){const r=this;let o,l,a,u,d;return f;function f(j){return h(j)}function h(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),p}function p(j){return j===33?(e.consume(j),x):j===47?(e.consume(j),l=!0,k):j===63?(e.consume(j),o=3,r.interrupt?t:N):kn(j)?(e.consume(j),a=String.fromCharCode(j),C):n(j)}function x(j){return j===45?(e.consume(j),o=2,g):j===91?(e.consume(j),o=5,u=0,S):kn(j)?(e.consume(j),o=4,r.interrupt?t:N):n(j)}function g(j){return j===45?(e.consume(j),r.interrupt?t:N):n(j)}function S(j){const ue="CDATA[";return j===ue.charCodeAt(u++)?(e.consume(j),u===ue.length?r.interrupt?t:M:S):n(j)}function k(j){return kn(j)?(e.consume(j),a=String.fromCharCode(j),C):n(j)}function C(j){if(j===null||j===47||j===62||ft(j)){const ue=j===47,ye=a.toLowerCase();return!ue&&!l&&Mw.includes(ye)?(o=1,r.interrupt?t(j):M(j)):EL.includes(a.toLowerCase())?(o=6,ue?(e.consume(j),E):r.interrupt?t(j):M(j)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):l?_(j):T(j))}return j===45||fn(j)?(e.consume(j),a+=String.fromCharCode(j),C):n(j)}function E(j){return j===62?(e.consume(j),r.interrupt?t:M):n(j)}function _(j){return Ye(j)?(e.consume(j),_):A(j)}function T(j){return j===47?(e.consume(j),A):j===58||j===95||kn(j)?(e.consume(j),I):Ye(j)?(e.consume(j),T):A(j)}function I(j){return j===45||j===46||j===58||j===95||fn(j)?(e.consume(j),I):O(j)}function O(j){return j===61?(e.consume(j),R):Ye(j)?(e.consume(j),O):T(j)}function R(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,V):Ye(j)?(e.consume(j),R):Q(j)}function V(j){return j===d?(e.consume(j),d=null,oe):j===null||Fe(j)?n(j):(e.consume(j),V)}function Q(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ft(j)?O(j):(e.consume(j),Q)}function oe(j){return j===47||j===62||Ye(j)?T(j):n(j)}function A(j){return j===62?(e.consume(j),K):n(j)}function K(j){return j===null||Fe(j)?M(j):Ye(j)?(e.consume(j),K):n(j)}function M(j){return j===45&&o===2?(e.consume(j),q):j===60&&o===1?(e.consume(j),ee):j===62&&o===4?(e.consume(j),L):j===63&&o===3?(e.consume(j),N):j===93&&o===5?(e.consume(j),G):Fe(j)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(PL,Y,ne)(j)):j===null||Fe(j)?(e.exit("htmlFlowData"),ne(j)):(e.consume(j),M)}function ne(j){return e.check(TL,W,Y)(j)}function W(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),B}function B(j){return j===null||Fe(j)?ne(j):(e.enter("htmlFlowData"),M(j))}function q(j){return j===45?(e.consume(j),N):M(j)}function ee(j){return j===47?(e.consume(j),a="",D):M(j)}function D(j){if(j===62){const ue=a.toLowerCase();return Mw.includes(ue)?(e.consume(j),L):M(j)}return kn(j)&&a.length<8?(e.consume(j),a+=String.fromCharCode(j),D):M(j)}function G(j){return j===93?(e.consume(j),N):M(j)}function N(j){return j===62?(e.consume(j),L):j===45&&o===2?(e.consume(j),N):M(j)}function L(j){return j===null||Fe(j)?(e.exit("htmlFlowData"),Y(j)):(e.consume(j),L)}function Y(j){return e.exit("htmlFlow"),t(j)}}function jL(e,t,n){const r=this;return o;function o(a){return Fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function IL(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Oa,t,n)}}const AL={name:"htmlText",tokenize:OL};function OL(e,t,n){const r=this;let o,l,a;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),O):N===63?(e.consume(N),T):kn(N)?(e.consume(N),Q):n(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),l=0,S):kn(N)?(e.consume(N),_):n(N)}function h(N){return N===45?(e.consume(N),g):n(N)}function p(N){return N===null?n(N):N===45?(e.consume(N),x):Fe(N)?(a=p,ee(N)):(e.consume(N),p)}function x(N){return N===45?(e.consume(N),g):p(N)}function g(N){return N===62?q(N):N===45?x(N):p(N)}function S(N){const L="CDATA[";return N===L.charCodeAt(l++)?(e.consume(N),l===L.length?k:S):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),C):Fe(N)?(a=k,ee(N)):(e.consume(N),k)}function C(N){return N===93?(e.consume(N),E):k(N)}function E(N){return N===62?q(N):N===93?(e.consume(N),E):k(N)}function _(N){return N===null||N===62?q(N):Fe(N)?(a=_,ee(N)):(e.consume(N),_)}function T(N){return N===null?n(N):N===63?(e.consume(N),I):Fe(N)?(a=T,ee(N)):(e.consume(N),T)}function I(N){return N===62?q(N):T(N)}function O(N){return kn(N)?(e.consume(N),R):n(N)}function R(N){return N===45||fn(N)?(e.consume(N),R):V(N)}function V(N){return Fe(N)?(a=V,ee(N)):Ye(N)?(e.consume(N),V):q(N)}function Q(N){return N===45||fn(N)?(e.consume(N),Q):N===47||N===62||ft(N)?oe(N):n(N)}function oe(N){return N===47?(e.consume(N),q):N===58||N===95||kn(N)?(e.consume(N),A):Fe(N)?(a=oe,ee(N)):Ye(N)?(e.consume(N),oe):q(N)}function A(N){return N===45||N===46||N===58||N===95||fn(N)?(e.consume(N),A):K(N)}function K(N){return N===61?(e.consume(N),M):Fe(N)?(a=K,ee(N)):Ye(N)?(e.consume(N),K):oe(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ne):Fe(N)?(a=M,ee(N)):Ye(N)?(e.consume(N),M):(e.consume(N),W)}function ne(N){return N===o?(e.consume(N),o=void 0,B):N===null?n(N):Fe(N)?(a=ne,ee(N)):(e.consume(N),ne)}function W(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ft(N)?oe(N):(e.consume(N),W)}function B(N){return N===47||N===62||ft(N)?oe(N):n(N)}function q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ee(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),D}function D(N){return Ye(N)?Xe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):G(N)}function G(N){return e.enter("htmlTextData"),a(N)}}const qm={name:"labelEnd",resolveAll:LL,resolveTo:FL,tokenize:$L},DL={tokenize:VL},zL={tokenize:BL},ML={tokenize:UL};function LL(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&rr(e,0,e.length,n),e}function FL(e,t){let n=e.length,r=0,o,l,a,u;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=hr(u,e.slice(l+1,l+r+3)),u=hr(u,[["enter",h,t]]),u=hr(u,wd(t.parser.constructs.insideSpan.null,e.slice(l+r+4,a-3),t)),u=hr(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=hr(u,e.slice(a+1)),u=hr(u,[["exit",d,t]]),rr(e,l,e.length,u),e}function $L(e,t,n){const r=this;let o=r.events.length,l,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){l=r.events[o][1];break}return u;function u(x){return l?l._inactive?p(x):(a=r.parser.defined.includes(Ir(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(DL,h,a?h:p)(x):x===91?e.attempt(zL,h,a?f:p)(x):a?h(x):p(x)}function f(x){return e.attempt(ML,h,p)(x)}function h(x){return t(x)}function p(x){return l._balanced=!0,n(x)}}function VL(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return ft(p)?ta(e,l)(p):l(p)}function l(p){return p===41?h(p):FS(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return ft(p)?ta(e,d)(p):h(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?VS(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return ft(p)?ta(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function BL(e,t,n){const r=this;return o;function o(u){return $S.call(r,e,l,a,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(Ir(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function UL(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const HL={name:"labelStartImage",resolveAll:qm.resolveAll,tokenize:WL};function WL(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ZL={name:"labelStartLink",resolveAll:qm.resolveAll,tokenize:qL};function qL(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Lh={name:"lineEnding",tokenize:QL};function QL(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const wc={name:"thematicBreak",tokenize:YL};function YL(e,t,n){let r=0,o;return l;function l(f){return e.enter("thematicBreak"),a(f)}function a(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Fe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ye(f)?Xe(e,u,"whitespace")(f):u(f))}}const zn={continuation:{tokenize:JL},exit:tF,name:"list",tokenize:XL},KL={partial:!0,tokenize:nF},GL={partial:!0,tokenize:eF};function XL(e,t,n){const r=this,o=r.events[r.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return u;function u(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Dp(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(wc,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(g)}return n(g)}function d(g){return Dp(g)&&++a<10?(e.consume(g),d):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Oa,r.interrupt?n:h,e.attempt(KL,x,p))}function h(g){return r.containerState.initialBlankLine=!0,l++,x(g)}function p(g){return Ye(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),x):n(g)}function x(g){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function JL(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Oa,o,l);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!Ye(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(GL,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(zn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function eF(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(l):n(l)}}function tF(e){e.exit(this.containerState.type)}function nF(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const a=r.events[r.events.length-1];return!Ye(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Lw={name:"setextUnderline",resolveTo:rF,tokenize:iF};function rF(e,t){let n=e.length,r,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",a,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function iF(e,t,n){const r=this;let o;return l;function l(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Ye(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Fe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const oF={tokenize:sF};function sF(e){const t=this,n=e.attempt(Oa,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(dL,o)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lF={resolveAll:US()},aF=BS("string"),uF=BS("text");function BS(e){return{resolveAll:US(e==="text"?cF:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],l=n.attempt(o,a,u);return a;function a(h){return f(h)?l(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),l(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const p=o[h];let x=-1;if(p)for(;++x<p.length;){const g=p[x];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function US(e){return t;function t(n,r){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,r):n}}function cF(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let l=o.length,a=-1,u=0,d;for(;l--;){const f=o[l];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(f===-2)d=!0,u++;else if(f!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dF={42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:DS},fF={91:gL},hF={[-2]:Mh,[-1]:Mh,32:Mh},pF={35:kL,42:wc,45:[Lw,wc],60:_L,61:Lw,95:wc,96:zw,126:zw},mF={38:MS,92:zS},gF={[-5]:Lh,[-4]:Lh,[-3]:Lh,33:HL,38:MS,42:zp,60:[ZM,AL],91:ZL,92:[wL,zS],93:qm,95:zp,96:oL},yF={null:[zp,lF]},vF={null:[42,95]},xF={null:[]},wF=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vF,contentInitial:fF,disable:xF,document:dF,flow:pF,flowInitial:hF,insideSpan:yF,string:mF,text:gF},Symbol.toStringTag,{value:"Module"}));function bF(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let a=[],u=[];const d={attempt:V(O),check:V(R),consume:_,enter:T,exit:I,interrupt:V(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:g,write:p};let h=t.tokenize.call(f,d);return t.resolveAll&&l.push(t),f;function p(K){return a=hr(a,K),C(),a[a.length-1]!==null?[]:(Q(t,0),f.events=wd(l,f.events,f),f.events)}function x(K,M){return SF(g(K),M)}function g(K){return kF(a,K)}function S(){const{_bufferIndex:K,_index:M,line:ne,column:W,offset:B}=r;return{_bufferIndex:K,_index:M,line:ne,column:W,offset:B}}function k(K){o[K.line]=K.column,A()}function C(){let K;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<M.length;)E(M.charCodeAt(r._bufferIndex));else E(M)}}function E(K){h=h(K)}function _(K){Fe(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,A()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=K}function T(K,M){const ne=M||{};return ne.type=K,ne.start=S(),f.events.push(["enter",ne,f]),u.push(ne),ne}function I(K){const M=u.pop();return M.end=S(),f.events.push(["exit",M,f]),M}function O(K,M){Q(K,M.from)}function R(K,M){M.restore()}function V(K,M){return ne;function ne(W,B,q){let ee,D,G,N;return Array.isArray(W)?Y(W):"tokenize"in W?Y([W]):L(W);function L(we){return ae;function ae(ve){const Ce=ve!==null&&we[ve],ke=ve!==null&&we.null,Ae=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return Y(Ae)(ve)}}function Y(we){return ee=we,D=0,we.length===0?q:j(we[D])}function j(we){return ae;function ae(ve){return N=oe(),G=we,we.partial||(f.currentConstruct=we),we.name&&f.parser.constructs.disable.null.includes(we.name)?ye():we.tokenize.call(M?Object.assign(Object.create(f),M):f,d,ue,ye)(ve)}}function ue(we){return K(G,N),B}function ye(we){return N.restore(),++D<ee.length?j(ee[D]):q}}}function Q(K,M){K.resolveAll&&!l.includes(K)&&l.push(K),K.resolve&&rr(f.events,M,f.events.length-M,K.resolve(f.events.slice(M),f)),K.resolveTo&&(f.events=K.resolveTo(f.events,f))}function oe(){const K=S(),M=f.previous,ne=f.currentConstruct,W=f.events.length,B=Array.from(u);return{from:W,restore:q};function q(){r=K,f.previous=M,f.currentConstruct=ne,f.events.length=W,u=B,A()}}function A(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function kF(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,l)];else{if(a=e.slice(n,o),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}l>0&&a.push(e[o].slice(0,l))}return a}function SF(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
268
+ `;break}case-3:{a=`\r
269
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(l)}o=l===-2,r.push(a)}return r.join("")}function CF(e){const r={constructs:AS([wF,...(e||{}).extensions||[]]),content:o(FM),defined:[],document:o(VM),flow:o(oF),lazy:{},string:o(aF),text:o(uF)};return r;function o(l){return a;function a(u){return bF(r,l,u)}}}function EF(e){for(;!LS(e););return e}const Fw=/[\0\t\n\r]/g;function _F(){let e=1,t="",n=!0,r;return o;function o(l,a,u){const d=[];let f,h,p,x,g;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(Fw.lastIndex=p,f=Fw.exec(l),x=f&&f.index!==void 0?f.index:l.length,g=l.charCodeAt(x),!f){t=l.slice(p);break}if(g===10&&p===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<x&&(d.push(l.slice(p,x)),e+=x-p),g){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const PF=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TF(e){return e.replace(PF,NF)}function NF(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return OS(n.slice(l?2:1),l?16:10)}return Zm(n)||e}const HS={}.hasOwnProperty;function RF(e,t,n){return typeof t!="string"&&(n=t,t=void 0),jF(n)(EF(CF(n).document().write(_F()(e,t,!0))))}function jF(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(En),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:l(sn),blockQuote:l(ke),characterEscape:oe,characterReference:oe,codeFenced:l(Ae),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Ae,a),codeText:l(Ve,a),codeTextData:oe,data:oe,codeFlowValue:oe,definition:l(nt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(At),hardBreakEscape:l(Gt),hardBreakTrailing:l(Gt),htmlFlow:l(ln,a),htmlFlowData:oe,htmlText:l(ln,a),htmlTextData:oe,image:l(ir),label:a,link:l(En),listItem:l(F),listItemValue:x,listOrdered:l(_n,p),listUnordered:l(_n),paragraph:l(J),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(sn),strong:l(se),thematicBreak:l(ge)},exit:{atxHeading:d(),atxHeadingSequence:O,autolink:d(),autolinkEmail:Ce,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:we,characterReference:ae,codeFenced:d(C),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:S,codeFlowValue:A,codeIndented:d(E),codeText:d(B),codeTextData:A,data:A,definition:d(),definitionDestinationString:I,definitionLabelString:_,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(M),hardBreakTrailing:d(M),htmlFlow:d(ne),htmlFlowData:A,htmlText:d(W),htmlTextData:A,image:d(ee),label:G,labelText:D,lineEnding:K,link:d(q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:N,resourceTitleString:L,resource:Y,setextHeading:d(Q),setextHeadingLineSequence:V,setextHeadingText:R,strong:d(),thematicBreak:d()}};WS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let ie={type:"root",children:[]};const xe={stack:[ie],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:h,data:n},Ee=[];let De=-1;for(;++De<$.length;)if($[De][1].type==="listOrdered"||$[De][1].type==="listUnordered")if($[De][0]==="enter")Ee.push(De);else{const ct=Ee.pop();De=o($,ct,De)}for(De=-1;++De<$.length;){const ct=t[$[De][0]];HS.call(ct,$[De][1].type)&&ct[$[De][1].type].call(Object.assign({sliceSerialize:$[De][2].sliceSerialize},xe),$[De][1])}if(xe.tokenStack.length>0){const ct=xe.tokenStack[xe.tokenStack.length-1];(ct[1]||$w).call(xe,void 0,ct[0])}for(ie.position={start:Hi($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:Hi($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<t.transforms.length;)ie=t.transforms[De](ie)||ie;return ie}function o($,ie,xe){let Ee=ie-1,De=-1,ct=!1,Rt,Zt,Vt,Pn;for(;++Ee<=xe;){const ht=$[Ee];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?De++:De--,Pn=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(Rt&&!Pn&&!De&&!Vt&&(Vt=Ee),Pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pn=void 0}if(!De&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||De===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(Rt){let pn=Ee;for(Zt=void 0;pn--;){const Xt=$[pn];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;Zt&&($[Zt][1].type="lineEndingBlank",ct=!0),Xt[1].type="lineEnding",Zt=pn}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}Vt&&(!Zt||Vt<Zt)&&(Rt._spread=!0),Rt.end=Object.assign({},Zt?$[Zt][1].start:ht[1].end),$.splice(Zt||Ee,0,["exit",Rt,ht[2]]),Ee++,xe++}if(ht[1].type==="listItemPrefix"){const pn={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};Rt=pn,$.splice(Ee,0,["enter",pn,ht[2]]),Ee++,xe++,Vt=void 0,Pn=!0}}}return $[ie][1]._spread=ct,xe}function l($,ie){return xe;function xe(Ee){u.call(this,$(Ee),Ee),ie&&ie.call(this,Ee)}}function a(){this.stack.push({type:"fragment",children:[]})}function u($,ie,xe){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([ie,xe||void 0]),$.position={start:Hi(ie.start),end:void 0}}function d($){return ie;function ie(xe){$&&$.call(this,xe),f.call(this,xe)}}function f($,ie){const xe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==$.type&&(ie?ie.call(this,$,Ee[0]):(Ee[1]||$w).call(this,$,Ee[0]));else throw new Error("Cannot close `"+$.type+"` ("+ea({start:$.start,end:$.end})+"): it’s not open");xe.position.end=Hi($.end)}function h(){return Wm(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x($){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function g(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=$}function S(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=$}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$.replace(/(\r?\n|\r)$/g,"")}function _($){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Ir(this.sliceSerialize($)).toLowerCase()}function T(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.title=$}function I(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.url=$}function O($){const ie=this.stack[this.stack.length-1];if(!ie.depth){const xe=this.sliceSerialize($).length;ie.depth=xe}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function V($){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function oe($){const xe=this.stack[this.stack.length-1].children;let Ee=xe[xe.length-1];(!Ee||Ee.type!=="text")&&(Ee=be(),Ee.position={start:Hi($.start),end:void 0},xe.push(Ee)),this.stack.push(Ee)}function A($){const ie=this.stack.pop();ie.value+=this.sliceSerialize($),ie.position.end=Hi($.end)}function K($){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ie.children[ie.children.length-1];xe.position.end=Hi($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(oe.call(this,$),A.call(this,$))}function M(){this.data.atHardBreak=!0}function ne(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function W(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function B(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function q(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ie,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ee(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ie,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function D($){const ie=this.sliceSerialize($),xe=this.stack[this.stack.length-2];xe.label=TF(ie),xe.identifier=Ir(ie).toLowerCase()}function G(){const $=this.stack[this.stack.length-1],ie=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Ee=$.children;xe.children=Ee}else xe.alt=ie}function N(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.url=$}function L(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.title=$}function Y(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ue($){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Ir(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function ye($){this.data.characterReferenceType=$.type}function we($){const ie=this.sliceSerialize($),xe=this.data.characterReferenceType;let Ee;xe?(Ee=OS(ie,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Zm(ie);const De=this.stack[this.stack.length-1];De.value+=Ee}function ae($){const ie=this.stack.pop();ie.position.end=Hi($.end)}function ve($){A.call(this,$);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize($)}function Ce($){A.call(this,$);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize($)}function ke(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ve(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function At(){return{type:"emphasis",children:[]}}function sn(){return{type:"heading",depth:0,children:[]}}function Gt(){return{type:"break"}}function ln(){return{type:"html",value:""}}function ir(){return{type:"image",title:null,url:"",alt:null}}function En(){return{type:"link",title:null,url:"",children:[]}}function _n($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function F($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function J(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function be(){return{type:"text",value:""}}function ge(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function WS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?WS(e,r):IF(e,r)}}function IF(e,t){let n;for(n in t)if(HS.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $w(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function AF(e){const t=this;t.parser=n;function n(r){return RF(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function OF(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function DF(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
270
+ `}]}function zF(e,t){const n=t.value?t.value+`
271
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function MF(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LF(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FF(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ll(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=l+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function $F(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VF(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ZS(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function BF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZS(e,t);const o={src:ll(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function UF(e,t){const n={src:ll(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function HF(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function WF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZS(e,t);const o={href:ll(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function ZF(e,t){const n={href:ll(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qF(e,t,n){const r=e.all(t),o=n?QF(n):qS(t),l={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let p;h&&h.type==="element"&&h.tagName==="p"?p=h:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(o||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
272
+ `}),h.type==="element"&&h.tagName==="p"&&!o?a.push(...h.children):a.push(h)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
273
+ `});const f={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,f),e.applyData(t,f)}function QF(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=qS(n[r])}return t}function qS(e){const t=e.spread;return t??e.children.length>1}function YF(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function KF(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GF(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XF(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JF(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Vm(t.children[1]),d=_S(t.children[t.children.length-1]);u&&d&&(a.position={start:u,end:d}),o.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function e4(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const p=t.children[d],x={},g=a?a[d]:void 0;g&&(x.align=g);let S={type:"element",tagName:l,properties:x,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),f.push(S)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function t4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vw=9,Bw=32;function n4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const l=[];for(;r;)l.push(Uw(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return l.push(Uw(t.slice(o),o>0,!1)),l.join("")}function Uw(e,t,n){let r=0,o=e.length;if(t){let l=e.codePointAt(r);for(;l===Vw||l===Bw;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(o-1);for(;l===Vw||l===Bw;)o--,l=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function r4(e,t){const n={type:"text",value:n4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const o4={blockquote:OF,break:DF,code:zF,delete:MF,emphasis:LF,footnoteReference:FF,heading:$F,html:VF,imageReference:BF,image:UF,inlineCode:HF,linkReference:WF,link:ZF,listItem:qF,list:YF,paragraph:KF,root:GF,strong:XF,table:JF,tableCell:t4,tableRow:e4,text:r4,thematicBreak:i4,toml:oc,yaml:oc,definition:oc,footnoteDefinition:oc};function oc(){}const QS=-1,bd=0,na=1,Mc=2,Qm=3,Ym=4,Km=5,Gm=6,YS=7,KS=8,Hw=typeof self=="object"?self:globalThis,s4=(e,t)=>{const n=(o,l)=>(e.set(l,o),o),r=o=>{if(e.has(o))return e.get(o);const[l,a]=t[o];switch(l){case bd:case QS:return n(a,o);case na:{const u=n([],o);for(const d of a)u.push(r(d));return u}case Mc:{const u=n({},o);for(const[d,f]of a)u[r(d)]=r(f);return u}case Qm:return n(new Date(a),o);case Ym:{const{source:u,flags:d}=a;return n(new RegExp(u,d),o)}case Km:{const u=n(new Map,o);for(const[d,f]of a)u.set(r(d),r(f));return u}case Gm:{const u=n(new Set,o);for(const d of a)u.add(r(d));return u}case YS:{const{name:u,message:d}=a;return n(new Hw[u](d),o)}case KS:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Hw[l](a),o)};return r},Ww=e=>s4(new Map,e)(0),Cs="",{toString:l4}={},{keys:a4}=Object,Yl=e=>{const t=typeof e;if(t!=="object"||!e)return[bd,t];const n=l4.call(e).slice(8,-1);switch(n){case"Array":return[na,Cs];case"Object":return[Mc,Cs];case"Date":return[Qm,Cs];case"RegExp":return[Ym,Cs];case"Map":return[Km,Cs];case"Set":return[Gm,Cs];case"DataView":return[na,n]}return n.includes("Array")?[na,n]:n.includes("Error")?[YS,n]:[Mc,n]},sc=([e,t])=>e===bd&&(t==="function"||t==="symbol"),u4=(e,t,n,r)=>{const o=(a,u)=>{const d=r.push(a)-1;return n.set(u,d),d},l=a=>{if(n.has(a))return n.get(a);let[u,d]=Yl(a);switch(u){case bd:{let h=a;switch(d){case"bigint":u=KS,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return o([QS],a)}return o([u,h],a)}case na:{if(d){let x=a;return d==="DataView"?x=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(a)),o([d,[...x]],a)}const h=[],p=o([u,h],a);for(const x of a)h.push(l(x));return p}case Mc:{if(d)switch(d){case"BigInt":return o([d,a.toString()],a);case"Boolean":case"Number":case"String":return o([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const h=[],p=o([u,h],a);for(const x of a4(a))(e||!sc(Yl(a[x])))&&h.push([l(x),l(a[x])]);return p}case Qm:return o([u,a.toISOString()],a);case Ym:{const{source:h,flags:p}=a;return o([u,{source:h,flags:p}],a)}case Km:{const h=[],p=o([u,h],a);for(const[x,g]of a)(e||!(sc(Yl(x))||sc(Yl(g))))&&h.push([l(x),l(g)]);return p}case Gm:{const h=[],p=o([u,h],a);for(const x of a)(e||!sc(Yl(x)))&&h.push(l(x));return p}}const{message:f}=a;return o([u,{name:d,message:f}],a)};return l},Zw=(e,{json:t,lossy:n}={})=>{const r=[];return u4(!(t||n),!!t,new Map,r)(e),r},Lc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ww(Zw(e,t)):structuredClone(e):(e,t)=>Ww(Zw(e,t));function c4(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function d4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function f4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||c4,r=e.options.footnoteBackLabel||d4,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),p=String(f.identifier).toUpperCase(),x=ll(p.toLowerCase());let g=0;const S=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++g<=k;){S.length>0&&S.push({type:"text",value:" "});let _=typeof n=="string"?n:n(d,g);typeof _=="string"&&(_={type:"text",value:_}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,g),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const _=C.children[C.children.length-1];_&&_.type==="text"?_.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else h.push(...S);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(h,!0)};e.patch(f,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Lc(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
274
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
275
+ `}]}}const kd=(function(e){if(e==null)return g4;if(typeof e=="function")return Sd(e);if(typeof e=="object")return Array.isArray(e)?h4(e):p4(e);if(typeof e=="string")return m4(e);throw new Error("Expected function, string, or object as test")});function h4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kd(e[n]);return Sd(r);function r(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function p4(e){const t=e;return Sd(n);function n(r){const o=r;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function m4(e){return Sd(t);function t(n){return n&&n.type===e}}function Sd(e){return t;function t(n,r,o){return!!(y4(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function g4(){return!0}function y4(e){return e!==null&&typeof e=="object"&&"type"in e}const GS=[],v4=!0,Mp=!1,x4="skip";function XS(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const l=kd(o),a=r?-1:1;u(e,void 0,[])();function u(d,f,h){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(g?"<"+g+">":""))+")"})}return x;function x(){let g=GS,S,k,C;if((!t||l(d,f,h[h.length-1]||void 0))&&(g=w4(n(d,h)),g[0]===Mp))return g;if("children"in d&&d.children){const E=d;if(E.children&&g[0]!==x4)for(k=(r?E.children.length:-1)+a,C=h.concat(E);k>-1&&k<E.children.length;){const _=E.children[k];if(S=u(_,k,C)(),S[0]===Mp)return S;k=typeof S[1]=="number"?S[1]:k+a}}return g}}}function w4(e){return Array.isArray(e)?e:typeof e=="number"?[v4,e]:e==null?GS:[e]}function Xm(e,t,n,r){let o,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,o=n):(l=t,a=n,o=r),XS(e,l,u,o);function u(d,f){const h=f[f.length-1],p=h?h.children.indexOf(d):void 0;return a(d,p,h)}}const Lp={}.hasOwnProperty,b4={};function k4(e,t){const n=t||b4,r=new Map,o=new Map,l=new Map,a={...o4,...n.handlers},u={all:f,applyData:C4,definitionById:r,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:S4,wrap:_4};return Xm(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:o,x=String(h.identifier).toUpperCase();p.has(x)||p.set(x,h)}}),u;function d(h,p){const x=h.type,g=u.handlers[x];if(Lp.call(u.handlers,x)&&g)return g(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(x)){if("children"in h){const{children:k,...C}=h,E=Lc(C);return E.children=u.all(h),E}return Lc(h)}return(u.options.unknownHandler||E4)(u,h,p)}function f(h){const p=[];if("children"in h){const x=h.children;let g=-1;for(;++g<x.length;){const S=u.one(x[g],h);if(S){if(g&&x[g-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=qw(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=qw(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function S4(e,t){e.position&&(t.position=dM(e))}function C4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Lc(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function E4(e,t){const n=t.data||{},r="value"in t&&!(Lp.call(n,"hProperties")||Lp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _4(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
276
+ `});++r<e.length;)r&&n.push({type:"text",value:`
277
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
278
+ `}),n}function qw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qw(e,t){const n=k4(e,t),r=n.one(e,void 0),o=f4(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
279
+ `},o),l}function P4(e,t){return e&&"run"in e?async function(n,r){const o=Qw(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Qw(n,{file:r,...e||t})}}function Yw(e){if(e)throw e}var Fh,Kw;function T4(){if(Kw)return Fh;Kw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},l=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},a=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Fh=function d(){var f,h,p,x,g,S,k=arguments[0],C=1,E=arguments.length,_=!1;for(typeof k=="boolean"&&(_=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<E;++C)if(f=arguments[C],f!=null)for(h in f)p=u(k,h),x=u(f,h),k!==x&&(_&&x&&(l(x)||(g=o(x)))?(g?(g=!1,S=p&&o(p)?p:[]):S=p&&l(p)?p:{},a(k,{name:h,newValue:d(_,S,x)})):typeof x<"u"&&a(k,{name:h,newValue:x}));return k},Fh}var N4=T4();const $h=Zo(N4);function Fp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function R4(){const e=[],t={run:n,use:r};return t;function n(...o){let l=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...o);function u(d,...f){const h=e[++l];let p=-1;if(d){a(d);return}for(;++p<o.length;)(f[p]===null||f[p]===void 0)&&(f[p]=o[p]);o=f,h?j4(h,u)(...f):a(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function j4(e,t){let n;return r;function r(...a){const u=e.length>a.length;let d;u&&a.push(o);try{d=e.apply(this,a)}catch(f){const h=f;if(u&&n)throw h;return o(h)}u||(d&&d.then&&typeof d.then=="function"?d.then(l,o):d instanceof Error?o(d):l(d))}function o(a,...u){n||(n=!0,t(a,...u))}function l(a){o(null,a)}}const Hr={basename:I4,dirname:A4,extname:O4,join:D4,sep:"/"};function I4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Da(e);let n=0,r=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else r<0&&(l=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else a<0&&(l=!0,a=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function A4(e){if(Da(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function O4(e){Da(e);let t=e.length,n=-1,r=0,o=-1,l=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function D4(...e){let t=-1,n;for(;++t<e.length;)Da(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":z4(n)}function z4(e){Da(e);const t=e.codePointAt(0)===47;let n=M4(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M4(e,t){let n="",r=0,o=-1,l=0,a=-1,u,d;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(o===a-1||l===1))if(o!==a-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=a,l=0;continue}}else if(n.length>0){n="",r=0,o=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,l=0}else u===46&&l>-1?l++:l=-1}return n}function Da(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const L4={cwd:F4};function F4(){return"/"}function $p(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $4(e){if(typeof e=="string")e=new URL(e);else if(!$p(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return V4(e)}function V4(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Vh=["history","path","basename","stem","extname","dirname"];class JS{constructor(t){let n;t?$p(t)?n={path:t}:typeof t=="string"||B4(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":L4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vh.length;){const l=Vh[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)Vh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Hr.basename(this.path):void 0}set basename(t){Uh(t,"basename"),Bh(t,"basename"),this.path=Hr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Hr.dirname(this.path):void 0}set dirname(t){Gw(this.basename,"dirname"),this.path=Hr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Hr.extname(this.path):void 0}set extname(t){if(Bh(t,"extname"),Gw(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Hr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$p(t)&&(t=$4(t)),Uh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Hr.basename(this.path,this.extname):void 0}set stem(t){Uh(t,"stem"),Bh(t,"stem"),this.path=Hr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new hn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Bh(e,t){if(e&&e.includes(Hr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hr.sep+"`")}function Uh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function B4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U4=(function(e){const r=this.constructor.prototype,o=r[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),H4={}.hasOwnProperty;class Jm extends U4{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=R4()}copy(){const t=new Jm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($h(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zh("data",this.frozen),this.namespace[t]=n,this):H4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=lc(t),r=this.parser||this.Parser;return Hh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hh("process",this.parser||this.Parser),Wh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,a){const u=lc(t),d=r.parse(u);r.run(d,u,function(h,p,x){if(h||!p||!x)return f(h);const g=p,S=r.stringify(g,x);q4(S)?x.value=S:x.result=S,f(h,x)});function f(h,p){h||!p?a(h):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Hh("processSync",this.parser||this.Parser),Wh("processSync",this.compiler||this.Compiler),this.process(t,o),Jw("processSync","process",n),r;function o(l,a){n=!0,Yw(l),r=a}}run(t,n,r){Xw(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(a,u){const d=lc(n);o.run(t,d,f);function f(h,p,x){const g=p||t;h?u(h):a?a(g):r(void 0,g,x)}}}runSync(t,n){let r=!1,o;return this.run(t,n,l),Jw("runSync","run",r),o;function l(a,u){Yw(a),o=u,r=!0}}stringify(t,n){this.freeze();const r=lc(n),o=this.compiler||this.Compiler;return Wh("stringify",o),Xw(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Zh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;d(h,p)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))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");u(f.plugins),f.settings&&(o.settings=$h(!0,o.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];l(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===f){x=p;break}if(x===-1)r.push([f,...h]);else if(h.length>0){let[g,...S]=h;const k=r[x][1];Fp(k)&&Fp(g)&&(g=$h(!0,k,g)),r[x]=[f,g,...S]}}}}const W4=new Jm().freeze();function Hh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xw(e){if(!Fp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lc(e){return Z4(e)?e:new JS(e)}function Z4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function q4(e){return typeof e=="string"||Q4(e)}function Q4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Y4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",e0=[],t0={allowDangerousHtml:!0},K4=/^(https?|ircs?|mailto|xmpp)$/i,G4=[{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 X4(e){const t=J4(e),n=e$(e);return t$(t.runSync(t.parse(n),n),e)}function J4(e){const t=e.rehypePlugins||e0,n=e.remarkPlugins||e0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...t0}:t0;return W4().use(AF).use(n).use(P4,r).use(t)}function e$(e){const t=e.children||"",n=new JS;return typeof t=="string"&&(n.value=t),n}function t$(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,l=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||n$;for(const h of G4)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Y4+h.id,void 0);return Xm(e,f),gM(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(h,p,x){if(h.type==="raw"&&x&&typeof p=="number")return a?x.children.splice(p,1):x.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let g;for(g in zh)if(Object.hasOwn(zh,g)&&Object.hasOwn(h.properties,g)){const S=h.properties[g],k=zh[g];(k===null||k.includes(h.tagName))&&(h.properties[g]=d(String(S||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):l?l.includes(h.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(h,p,x)),g&&x&&typeof p=="number")return u&&h.children?x.children.splice(p,1,...h.children):x.children.splice(p,1),p}}}function n$(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||K4.test(e.slice(0,t))?e:""}function n0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function r$(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i$(e,t,n){const o=kd((n||{}).ignore||[]),l=o$(t);let a=-1;for(;++a<l.length;)XS(e,"text",u);function u(f,h){let p=-1,x;for(;++p<h.length;){const g=h[p],S=x?x.children:void 0;if(o(g,S?S.indexOf(g):void 0,x))return;x=g}if(x)return d(f,h)}function d(f,h){const p=h[h.length-1],x=l[a][0],g=l[a][1];let S=0;const C=p.children.indexOf(f);let E=!1,_=[];x.lastIndex=0;let T=x.exec(f.value);for(;T;){const I=T.index,O={index:T.index,input:T.input,stack:[...h,f]};let R=g(...T,O);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?x.lastIndex=I+1:(S!==I&&_.push({type:"text",value:f.value.slice(S,I)}),Array.isArray(R)?_.push(...R):R&&_.push(R),S=I+T[0].length,E=!0),!x.global)break;T=x.exec(f.value)}return E?(S<f.value.length&&_.push({type:"text",value:f.value.slice(S)}),p.children.splice(C,1,..._)):_=[f],C+_.length}}function o$(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([s$(o[0]),l$(o[1])])}return t}function s$(e){return typeof e=="string"?new RegExp(r$(e),"g"):e}function l$(e){return typeof e=="function"?e:function(){return e}}const qh="phrasing",Qh=["autolink","link","image","label"];function a$(){return{transforms:[m$],enter:{literalAutolink:c$,literalAutolinkEmail:Yh,literalAutolinkHttp:Yh,literalAutolinkWww:Yh},exit:{literalAutolink:p$,literalAutolinkEmail:h$,literalAutolinkHttp:d$,literalAutolinkWww:f$}}}function u$(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qh,notInConstruct:Qh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qh,notInConstruct:Qh},{character:":",before:"[ps]",after:"\\/",inConstruct:qh,notInConstruct:Qh}]}}function c$(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yh(e){this.config.enter.autolinkProtocol.call(this,e)}function d$(e){this.config.exit.autolinkProtocol.call(this,e)}function f$(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function h$(e){this.config.exit.autolinkEmail.call(this,e)}function p$(e){this.exit(e)}function m$(e){i$(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,g$],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),y$]],{ignore:["link","linkReference"]})}function g$(e,t,n,r,o){let l="";if(!eC(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!v$(n)))return!1;const a=x$(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function y$(e,t,n,r){return!eC(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function v$(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function x$(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=n0(e,"(");let l=n0(e,")");for(;r!==-1&&o>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function eC(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Uo(n)||xd(n))&&(!t||n!==47)}tC.peek=T$;function w$(){this.buffer()}function b$(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function k$(){this.buffer()}function S$(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function C$(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),n.label=t}function E$(e){this.exit(e)}function _$(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P$(e){this.exit(e)}function T$(){return"["}function tC(e,t,n,r){const o=n.createTracker(r);let l=o.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),u(),a(),l+=o.move("]"),l}function N$(){return{enter:{gfmFootnoteCallString:w$,gfmFootnoteCall:b$,gfmFootnoteDefinitionLabelString:k$,gfmFootnoteDefinition:S$},exit:{gfmFootnoteCallString:C$,gfmFootnoteCall:E$,gfmFootnoteDefinitionLabelString:_$,gfmFootnoteDefinition:P$}}}function R$(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,l,a){const u=l.createTracker(a);let d=u.move("[^");const f=l.enter("footnoteDefinition"),h=l.enter("label");return d+=u.move(l.safe(l.associationId(r),{before:d,after:"]"})),h(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
280
+ `:" ")+l.indentLines(l.containerFlow(r,u.current()),t?nC:j$))),f(),d}}function j$(e,t,n){return t===0?e:nC(e,t,n)}function nC(e,t,n){return(n?"":" ")+e}const I$=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rC.peek=M$;function A$(){return{canContainEols:["delete"],enter:{strikethrough:D$},exit:{strikethrough:z$}}}function O$(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:I$}],handlers:{delete:rC}}}function D$(e){this.enter({type:"delete",children:[]},e)}function z$(e){this.exit(e)}function rC(e,t,n,r){const o=n.createTracker(r),l=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),l(),a}function M$(){return"~"}function L$(e){return e.length}function F$(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||L$,l=[],a=[],u=[],d=[];let f=0,h=-1;for(;++h<e.length;){const k=[],C=[];let E=-1;for(e[h].length>f&&(f=e[h].length);++E<e[h].length;){const _=$$(e[h][E]);if(n.alignDelimiters!==!1){const T=o(_);C[E]=T,(d[E]===void 0||T>d[E])&&(d[E]=T)}k.push(_)}a[h]=k,u[h]=C}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)l[p]=r0(r[p]);else{const k=r0(r);for(;++p<f;)l[p]=k}p=-1;const x=[],g=[];for(;++p<f;){const k=l[p];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[p]-C.length-E.length);const T=C+"-".repeat(_)+E;n.alignDelimiters!==!1&&(_=C.length+_+E.length,_>d[p]&&(d[p]=_),g[p]=_),x[p]=T}a.splice(1,0,x),u.splice(1,0,g),h=-1;const S=[];for(;++h<a.length;){const k=a[h],C=u[h];p=-1;const E=[];for(;++p<f;){const _=k[p]||"";let T="",I="";if(n.alignDelimiters!==!1){const O=d[p]-(C[p]||0),R=l[p];R===114?T=" ".repeat(O):R===99?O%2?(T=" ".repeat(O/2+.5),I=" ".repeat(O/2-.5)):(T=" ".repeat(O/2),I=T):I=" ".repeat(O)}n.delimiterStart!==!1&&!p&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&E.push(" "),n.alignDelimiters!==!1&&E.push(T),E.push(_),n.alignDelimiters!==!1&&E.push(I),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&E.push("|")}S.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
281
+ `)}function $$(e){return e==null?"":String(e)}function r0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function V$(e,t,n,r){const o=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),B$);return o(),a}function B$(e,t,n){return">"+(n?"":" ")+e}function U$(e,t){return i0(e,t.inConstruct,!0)&&!i0(e,t.notInConstruct,!1)}function i0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function o0(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
282
+ `&&U$(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
283
+ `}function H$(e,t){const n=String(e);let r=n.indexOf(t),o=r,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++l>a&&(a=l):l=1,o=r+t.length,r=n.indexOf(t,o);return a}function W$(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Z$(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function q$(e,t,n,r){const o=Z$(n),l=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(W$(e,n)){const p=n.enter("codeIndented"),x=n.indentLines(l,Q$);return p(),x}const u=n.createTracker(r),d=o.repeat(Math.max(H$(l,o)+1,3)),f=n.enter("codeFenced");let h=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
284
+ `,encode:["`"],...u.current()})),p()}return h+=u.move(`
285
+ `),l&&(h+=u.move(l+`
286
+ `)),h+=u.move(d),f(),h}function Q$(e,t,n){return(n?"":" ")+e}function eg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Y$(e,t,n,r){const o=eg(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
287
+ `,...d.current()}))),u(),e.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),a(),f}function K$(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ma(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fc(e,t,n){const r=Ks(e),o=Ks(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}iC.peek=G$;function iC(e,t,n,r){const o=K$(n),l=n.enter("emphasis"),a=n.createTracker(r),u=a.move(o);let d=a.move(n.containerPhrasing(e,{after:o,before:u,...a.current()}));const f=d.charCodeAt(0),h=Fc(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=ma(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Fc(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+ma(p));const g=a.move(o);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function G$(e,t,n){return n.options.emphasis||"*"}function X$(e,t){let n=!1;return Xm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Mp}),!!((!e.depth||e.depth<3)&&Wm(e)&&(t.options.setext||n))}function J$(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(X$(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),x=n.containerPhrasing(e,{...l.current(),before:`
288
+ `,after:`
289
+ `});return p(),h(),x+`
290
+ `+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
291
+ `))+1))}const a="#".repeat(o),u=n.enter("headingAtx"),d=n.enter("phrasing");l.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
292
+ `,...l.current()});return/^[\t ]/.test(f)&&(f=ma(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),d(),u(),f}oC.peek=e3;function oC(e){return e.value||""}function e3(){return"<"}sC.peek=t3;function sC(e,t,n,r){const o=eg(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),f+=d.move(")"),a(),f}function t3(){return"!"}lC.peek=n3;function lC(e,t,n,r){const o=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const f=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=h,l(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function n3(){return"!"}aC.peek=r3;function aC(e,t,n){let r=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const a=n.unsafe[l],u=n.compilePattern(a);let d;if(a.atBreak)for(;d=u.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function r3(){return"`"}function uC(e,t){const n=Wm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}cC.peek=i3;function cC(e,t,n,r){const o=eg(n),l=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,d;if(uC(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),u(),n.stack=h,p}u=n.enter("link"),d=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(d=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=a.move(" "+o),f+=a.move(n.safe(e.title,{before:f,after:o,...a.current()})),f+=a.move(o),d()),f+=a.move(")"),u(),f}function i3(e,t,n){return uC(e,n)?"<":"["}dC.peek=o3;function dC(e,t,n,r){const o=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=h,l(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function o3(){return"["}function tg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function s3(e){const t=tg(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function l3(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fC(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function a3(e,t,n,r){const o=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?l3(n):tg(n);const u=e.ordered?a==="."?")":".":s3(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),fC(n)===a&&h){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=u),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=l,o(),f}function u3(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function c3(e,t,n,r){const o=u3(n);let l=n.bulletCurrent||tg(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(l+" ".repeat(a-l.length)),u.shift(a);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return d(),f;function h(p,x,g){return x?(g?"":" ".repeat(a))+p:(g?l:l+" ".repeat(a-l.length))+p}}function d3(e,t,n,r){const o=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,r);return l(),o(),a}const f3=kd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function h3(e,t,n,r){return(e.children.some(function(a){return f3(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function p3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hC.peek=m3;function hC(e,t,n,r){const o=p3(n),l=n.enter("strong"),a=n.createTracker(r),u=a.move(o+o);let d=a.move(n.containerPhrasing(e,{after:o,before:u,...a.current()}));const f=d.charCodeAt(0),h=Fc(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=ma(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Fc(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+ma(p));const g=a.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function m3(e,t,n){return n.options.strong||"*"}function g3(e,t,n,r){return n.safe(e.value,r)}function y3(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function v3(e,t,n){const r=(fC(n)+(n.options.ruleSpaces?" ":"")).repeat(y3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pC={blockquote:V$,break:o0,code:q$,definition:Y$,emphasis:iC,hardBreak:o0,heading:J$,html:oC,image:sC,imageReference:lC,inlineCode:aC,link:cC,linkReference:dC,list:a3,listItem:c3,paragraph:d3,root:h3,strong:hC,text:g3,thematicBreak:v3};function x3(){return{enter:{table:w3,tableData:s0,tableHeader:s0,tableRow:k3},exit:{codeText:S3,table:b3,tableData:Kh,tableHeader:Kh,tableRow:Kh}}}function w3(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function b3(e){this.exit(e),this.data.inTable=void 0}function k3(e){this.enter({type:"tableRow",children:[]},e)}function Kh(e){this.exit(e)}function s0(e){this.enter({type:"tableCell",children:[]},e)}function S3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,C3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function C3(e,t){return t==="|"?t:e}function E3(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
293
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:a,tableCell:d,tableRow:u}};function a(g,S,k,C){return f(h(g,k,C),g.align)}function u(g,S,k,C){const E=p(g,k,C),_=f([E]);return _.slice(0,_.indexOf(`
294
+ `))}function d(g,S,k,C){const E=k.enter("tableCell"),_=k.enter("phrasing"),T=k.containerPhrasing(g,{...C,before:l,after:l});return _(),E(),T}function f(g,S){return F$(g,{align:S,alignDelimiters:r,padding:n,stringLength:o})}function h(g,S,k){const C=g.children;let E=-1;const _=[],T=S.enter("table");for(;++E<C.length;)_[E]=p(C[E],S,k);return T(),_}function p(g,S,k){const C=g.children;let E=-1;const _=[],T=S.enter("tableRow");for(;++E<C.length;)_[E]=d(C[E],g,S,k);return T(),_}function x(g,S,k){let C=pC.inlineCode(g,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function _3(){return{exit:{taskListCheckValueChecked:l0,taskListCheckValueUnchecked:l0,paragraph:T3}}}function P3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:N3}}}function l0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function T3(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let l=-1,a;for(;++l<o.length;){const u=o[l];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function N3(e,t,n,r){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);l&&u.move(a);let d=pC.listItem(e,t,n,{...r,...u.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+a}}function R3(){return[a$(),N$(),A$(),x3(),_3()]}function j3(e){return{extensions:[u$(),R$(e),O$(),E3(e),P3()]}}const I3={tokenize:L3,partial:!0},mC={tokenize:F3,partial:!0},gC={tokenize:$3,partial:!0},yC={tokenize:V3,partial:!0},A3={tokenize:B3,partial:!0},vC={name:"wwwAutolink",tokenize:z3,previous:wC},xC={name:"protocolAutolink",tokenize:M3,previous:bC},ki={name:"emailAutolink",tokenize:D3,previous:kC},ti={};function O3(){return{text:ti}}let Eo=48;for(;Eo<123;)ti[Eo]=ki,Eo++,Eo===58?Eo=65:Eo===91&&(Eo=97);ti[43]=ki;ti[45]=ki;ti[46]=ki;ti[95]=ki;ti[72]=[ki,xC];ti[104]=[ki,xC];ti[87]=[ki,vC];ti[119]=[ki,vC];function D3(e,t,n){const r=this;let o,l;return a;function a(p){return!Vp(p)||!kC.call(r,r.previous)||ng(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Vp(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(A3,h,f)(p):p===45||p===95||fn(p)?(l=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),o=!0,d}function h(p){return l&&o&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function z3(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!wC.call(r,r.previous)||ng(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I3,e.attempt(mC,e.attempt(gC,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function M3(e,t,n){const r=this;let o="",l=!1;return a;function a(p){return(p===72||p===104)&&bC.call(r,r.previous)&&!ng(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(kn(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),l?f:(l=!0,d)):n(p)}function f(p){return p===null||zc(p)||ft(p)||Uo(p)||xd(p)?n(p):e.attempt(mC,e.attempt(gC,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function L3(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function F3(e,t,n){let r,o,l;return a;function a(f){return f===46||f===95?e.check(yC,d,u)(f):f===null||ft(f)||Uo(f)||f!==45&&xd(f)?d(f):(l=!0,e.consume(f),a)}function u(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),a}function d(f){return o||r||!l?n(f):t(f)}}function $3(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(yC,t,l)(a):a===null||ft(a)||Uo(a)?t(a):(e.consume(a),o)}function l(a){return a===41&&r++,e.consume(a),o}}function V3(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),l):u===93?(e.consume(u),o):u===60||u===null||ft(u)||Uo(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||ft(u)||Uo(u)?t(u):r(u)}function l(u){return kn(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):kn(u)?(e.consume(u),a):n(u)}}function B3(e,t,n){return r;function r(l){return e.consume(l),o}function o(l){return fn(l)?n(l):t(l)}}function wC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function bC(e){return!kn(e)}function kC(e){return!(e===47||Vp(e))}function Vp(e){return e===43||e===45||e===46||e===95||fn(e)}function ng(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const U3={tokenize:G3,partial:!0};function H3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Q3,continuation:{tokenize:Y3},exit:K3}},text:{91:{name:"gfmFootnoteCall",tokenize:q3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:W3,resolveTo:Z3}}}}function W3(e,t,n){const r=this;let o=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!a||!a._balanced)return n(d);const f=Ir(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Z3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function q3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,a;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(l>999||p===93&&!a||p===null||p===91||ft(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(Ir(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ft(p)||(a=!0),l++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function Q3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,a=0,u;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(S)}function h(S){if(a>999||S===93&&!u||S===null||S===91||ft(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=Ir(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return ft(S)||(u=!0),a++,e.consume(S),S===92?p:h}function p(S){return S===91||S===92||S===93?(e.consume(S),a++,h):h(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(l)||o.push(l),Xe(e,g,"gfmFootnoteDefinitionWhitespace")):n(S)}function g(S){return t(S)}}function Y3(e,t,n){return e.check(Oa,t,e.attempt(U3,t,n))}function K3(e){e.exit("gfmFootnoteDefinition")}function G3(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function X3(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,u){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let f=d;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[d][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[d][1].end)},p={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[d][1].start)},x=[["enter",h,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",p,u]],g=u.parser.constructs.insideSpan.null;g&&rr(x,x.length,0,wd(g,a.slice(f+1,d),u)),rr(x,x.length,0,[["exit",p,u],["enter",a[d][1],u],["exit",a[d][1],u],["exit",h,u]]),rr(a,f-1,d-f+3,x),d=f+x.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function l(a,u,d){const f=this.previous,h=this.events;let p=0;return x;function x(S){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(S):(a.enter("strikethroughSequenceTemporary"),g(S))}function g(S){const k=Ks(f);if(S===126)return p>1?d(S):(a.consume(S),p++,g);if(p<2&&!n)return d(S);const C=a.exit("strikethroughSequenceTemporary"),E=Ks(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,u(S)}}}class J3{constructor(){this.map=[]}add(t,n,r){e5(this,t,n,r)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const l of o)t.push(l);o=r.pop()}this.map.length=0}}function e5(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function t5(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function n5(){return{flow:{null:{name:"table",tokenize:r5,resolveAll:i5}}}}function r5(e,t,n){const r=this;let o=0,l=0,a;return u;function u(A){let K=r.events.length-1;for(;K>-1;){const W=r.events[K][1].type;if(W==="lineEnding"||W==="linePrefix")K--;else break}const M=K>-1?r.events[K][1].type:null,ne=M==="tableHead"||M==="tableRow"?R:d;return ne===R&&r.parser.lazy[r.now().line]?n(A):ne(A)}function d(A){return e.enter("tableHead"),e.enter("tableRow"),f(A)}function f(A){return A===124||(a=!0,l+=1),h(A)}function h(A){return A===null?n(A):Fe(A)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g):n(A):Ye(A)?Xe(e,h,"whitespace")(A):(l+=1,a&&(a=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(A)))}function p(A){return A===null||A===124||ft(A)?(e.exit("data"),h(A)):(e.consume(A),A===92?x:p)}function x(A){return A===92||A===124?(e.consume(A),p):p(A)}function g(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter("tableDelimiterRow"),a=!1,Ye(A)?Xe(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):S(A))}function S(A){return A===45||A===58?C(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):O(A)}function k(A){return Ye(A)?Xe(e,C,"whitespace")(A):C(A)}function C(A){return A===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),E):A===45?(l+=1,E(A)):A===null||Fe(A)?I(A):O(A)}function E(A){return A===45?(e.enter("tableDelimiterFiller"),_(A)):O(A)}function _(A){return A===45?(e.consume(A),_):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(A))}function T(A){return Ye(A)?Xe(e,I,"whitespace")(A):I(A)}function I(A){return A===124?S(A):A===null||Fe(A)?!a||o!==l?O(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):O(A)}function O(A){return n(A)}function R(A){return e.enter("tableRow"),V(A)}function V(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),V):A===null||Fe(A)?(e.exit("tableRow"),t(A)):Ye(A)?Xe(e,V,"whitespace")(A):(e.enter("data"),Q(A))}function Q(A){return A===null||A===124||ft(A)?(e.exit("data"),V(A)):(e.consume(A),A===92?oe:Q)}function oe(A){return A===92||A===124?(e.consume(A),Q):Q(A)}}function i5(e,t){let n=-1,r=!0,o=0,l=[0,0,0,0],a=[0,0,0,0],u=!1,d=0,f,h,p;const x=new J3;for(;++n<e.length;){const g=e[n],S=g[1];g[0]==="enter"?S.type==="tableHead"?(u=!1,d!==0&&(a0(x,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",f,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,l=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",h,t]])),o=S.type==="tableDelimiterRow"?2:h?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],p=ac(x,t,l,o,void 0,p),l=[0,0,0,0]),a[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(a[0]=a[1],p=ac(x,t,l,o,void 0,p)),l=a,a=[l[1],n,0,0])):S.type==="tableHead"?(u=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,l[1]!==0?(a[0]=a[1],p=ac(x,t,l,o,n,p)):a[1]!==0&&(p=ac(x,t,a,o,n,p)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&a0(x,t,d,f,h),x.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=t5(t.events,n))}return e}function ac(e,t,n,r,o,l){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},_s(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=_s(t.events,n[1]);if(l={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const f=_s(t.events,n[2]),h=_s(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const x=t.events[n[2]],g=t.events[n[3]];if(x[1].end=Object.assign({},g[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(l.end=Object.assign({},_s(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function a0(e,t,n,r,o){const l=[],a=_s(t.events,n);o&&(o.end=Object.assign({},a),l.push(["exit",o,t])),r.end=Object.assign({},a),l.push(["exit",r,t]),e.add(n+1,0,l)}function _s(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const o5={name:"tasklistCheck",tokenize:l5};function s5(){return{text:{91:o5}}}function l5(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return Fe(d)?t(d):Ye(d)?e.check({tokenize:a5},t,n)(d):n(d)}}function a5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function u5(e){return AS([O3(),H3(),X3(e),n5(),s5()])}const c5={};function d5(e){const t=this,n=e||c5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(u5(n)),l.push(R3()),a.push(j3(n))}function f5({content:e,className:t}){return y.jsx("div",{className:We("prose prose-sm dark:prose-invert max-w-none","prose-headings:font-semibold prose-headings:text-foreground","prose-p:text-muted-foreground prose-p:leading-relaxed","prose-a:text-primary prose-a:no-underline hover:prose-a:underline","prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm prose-code:before:content-none prose-code:after:content-none","prose-pre:bg-muted prose-pre:border","prose-ul:text-muted-foreground prose-ol:text-muted-foreground","prose-li:marker:text-muted-foreground","prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground","prose-table:text-sm","prose-th:text-left prose-th:font-semibold","prose-td:border prose-th:border",t),children:y.jsx(X4,{remarkPlugins:[d5],children:e})})}function SC({open:e,onClose:t,breadcrumbItems:n,title:r,description:o,onEdit:l,children:a}){return y.jsx(Am,{open:e,onOpenChange:u=>!u&&t(),children:y.jsxs(Om,{className:"max-w-4xl p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"p-4 border-b flex items-center justify-between",children:y.jsx(vS,{items:n})}),y.jsx(Lm,{className:"max-h-[calc(90vh-80px)]",children:y.jsxs("div",{className:"flex flex-col",children:[y.jsxs("div",{className:"px-4 pt-4 pb-2 flex justify-between items-start",children:[y.jsx("h2",{className:"text-xl font-semibold",children:r}),y.jsxs(gt,{variant:"ghost",size:"sm",onClick:l,children:[y.jsx(um,{className:"mr-1 h-4 w-4"}),"Edit"]})]}),y.jsxs("div",{className:"px-4 pb-4",children:[y.jsx("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-2",children:"Description"}),o?y.jsx(f5,{content:o}):y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"})]}),a]})})]})})}function CC({open:e,onClose:t,breadcrumbItems:n,formId:r,isSubmitting:o,isDeleting:l,entityName:a,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:p}){return y.jsx(Am,{open:e,onOpenChange:x=>!x&&t(),children:y.jsxs(Om,{className:"max-w-lg p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"flex items-center border-b p-4",children:y.jsx(vS,{items:n})}),y.jsx(Lm,{className:"max-h-[calc(90vh-140px)]",children:p}),y.jsxs("div",{className:"p-4 border-t flex items-center justify-between",children:[y.jsx(tO,{isConfirming:l,entityName:a,onDelete:d,onConfirm:f,onCancel:h}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(gt,{type:"button",variant:"outline",size:"sm",onClick:u,children:"Cancel"}),y.jsx(gt,{type:"submit",form:r,size:"sm",disabled:o,children:o?"Saving...":"Save"})]})]})]})})}function h5({task:e,onStatusChange:t,onPriorityChange:n,onEpicClick:r,getEpicById:o}){const l=e.epicId?o(e.epicId):null,a=e.tags?e.tags.split(",").map(d=>d.trim()):[],u=()=>{l&&r&&r(l)};return y.jsxs("div",{children:[y.jsx(fa,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(pd,{value:e.status,onChange:t,statuses:ad,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(md,{value:e.priority,onChange:n,triggerClassName:"w-auto h-8 text-right"})]}),l&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Epic"}),y.jsxs("button",{className:"flex items-center gap-0.5 text-sm text-purple-500 hover:text-purple-600",onClick:u,children:[l.id,y.jsx(Gc,{className:"h-3 w-3"})]})]}),a.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-sm text-muted-foreground mb-1 block",children:"Tags"}),y.jsx("div",{className:"flex flex-wrap gap-1",children:a.map(d=>y.jsx(no,{variant:"secondary",className:"text-xs",children:d},d))})]})]})]})}function u0({taskId:e,variant:t,onClick:n}){const r=t==="depends"?$b:Vb;return y.jsxs("button",{className:We("inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-mono","transition-colors hover:ring-1",t==="depends"&&"bg-amber-500/10 text-amber-600 dark:text-amber-400 hover:ring-amber-500/50",t==="blocks"&&"bg-rose-500/10 text-rose-600 dark:text-rose-400 hover:ring-rose-500/50"),onClick:n,title:t==="depends"?"Depends on this task":"Blocks this task",children:[y.jsx(r,{className:"h-3 w-3"}),e]})}function p5({dependsOn:e,blocks:t,onTaskClick:n,getTaskById:r}){if(!(e.length>0||t.length>0))return null;const l=a=>{const u=r(a);u&&n&&n(u)};return y.jsxs("div",{children:[y.jsx(fa,{children:"Dependencies"}),y.jsxs("div",{className:"space-y-2",children:[e.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Depends on"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map(a=>y.jsx(u0,{taskId:a,variant:"depends",onClick:()=>l(a)},a))})]}),t.length>0&&y.jsxs("div",{children:[y.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1.5 block",children:"Blocks"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(a=>y.jsx(u0,{taskId:a,variant:"blocks",onClick:()=>l(a)},a))})]})]})]})}const m5=["completed","archived","wont_fix"];function Bp(e){return m5.includes(e)}function g5({subtask:e,onClick:t}){const n=Bp(e.status);return y.jsxs(gt,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:t,children:[y.jsx(r1,{status:e.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),y.jsx("span",{className:We("text-sm flex-1 text-left truncate",n&&"line-through text-muted-foreground"),children:e.title})]})}function y5({subtasks:e,onTaskClick:t}){if(e.length===0)return null;const n=e.filter(r=>r.status==="completed").length;return y.jsxs("div",{children:[y.jsx(fa,{count:{current:n,total:e.length},children:"Subtasks"}),y.jsx("div",{className:"space-y-1",children:e.map(r=>y.jsx(g5,{subtask:r,onClick:()=>t==null?void 0:t(r)},r.id))})]})}const wi=b.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,"data-slot":"input",className:We("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),ref:r,...n}));wi.displayName="Input";const za=b.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{"data-slot":"textarea",className:We("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));za.displayName="Textarea";function v5({taskId:e}){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,a]=b.useState(""),[u,d]=b.useState(""),[f,h]=b.useState(!1);b.useEffect(()=>{const S=localStorage.getItem("trekker-comment-author");S&&a(S)},[]),b.useEffect(()=>{p()},[e]);const p=async()=>{try{const S=await fetch(`/api/tasks/${e}/comments`);if(S.ok){const k=await S.json();n(k)}}catch(S){console.error("Failed to fetch comments:",S)}finally{o(!1)}},x=async()=>{if(!l.trim()||!u.trim()){Ct.error("Author and content are required");return}h(!0);try{localStorage.setItem("trekker-comment-author",l);const S=await fetch(`/api/tasks/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:l,content:u})});if(!S.ok){const C=await S.json();throw new Error(C.error||"Failed to add comment")}const k=await S.json();n([...t,k]),d(""),Ct.success("Comment added")}catch(S){Ct.error(S instanceof Error?S.message:"Failed to add comment")}finally{h(!1)}},g=async S=>{try{if(!(await fetch(`/api/comments/${S}`,{method:"DELETE"})).ok)throw new Error("Failed to delete comment");n(t.filter(C=>C.id!==S)),Ct.success("Comment deleted")}catch{Ct.error("Failed to delete comment")}};return y.jsxs("div",{className:"p-4 mt-4 border-t",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["Comments ",t.length>0&&`(${t.length})`]}),r?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):y.jsxs(y.Fragment,{children:[t.length>0&&y.jsx("div",{className:"space-y-3 mb-4",children:t.map(S=>y.jsxs("div",{className:"p-3 bg-muted/50 group relative",children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm font-medium",children:S.author}),y.jsx("span",{className:"text-xs text-muted-foreground",children:_m(S.createdAt)})]}),y.jsx(gt,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>g(S.id),children:y.jsx(cm,{className:"h-3.5 w-3.5"})})]}),y.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:S.content})]},S.id))}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(wi,{placeholder:"Your name",value:l,onChange:S=>a(S.target.value)}),y.jsx(za,{placeholder:"Add a comment...",value:u,onChange:S=>d(S.target.value),rows:2}),y.jsx(gt,{size:"sm",onClick:x,disabled:f||!l.trim()||!u.trim(),children:f?"Adding...":"Add Comment"})]})]})]})}async function x5(e){var r,o;const t=new URLSearchParams;e.entityId&&t.set("entityId",e.entityId),(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.actions)!=null&&o.length&&t.set("action",e.actions.join(",")),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString());const n=await fetch(`/api/history?${t.toString()}`);if(!n.ok){const l=await n.json();throw new Error(l.error||"Failed to fetch history")}return n.json()}function EC(e){return Ta({queryKey:["history",e],queryFn:()=>x5(e)})}function w5({event:e}){return y.jsxs("div",{className:"flex gap-2.5 py-2.5 border-b last:border-b-0",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(o1,{action:e.action,className:"h-3.5 w-3.5"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[y.jsxs("span",{className:We("text-xs font-medium capitalize",s1(e.action)),children:[e.action,"d"]}),y.jsx("span",{className:"text-xs text-muted-foreground",children:_m(e.timestamp)})]}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-0.5",children:Object.entries(e.changes).map(([t,n])=>{const{from:r,to:o}=n;return y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[t,":"]}),y.jsx("span",{className:"line-through",children:String(r)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(o)})]},t)})}),e.action==="create"&&e.snapshot&&y.jsx("p",{className:"text-xs text-muted-foreground",children:"Task created"})]})]})}function b5({taskId:e}){const{data:t,isLoading:n,error:r}=EC({entityId:e,limit:50});return n?y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"p-4",children:y.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):t!=null&&t.events.length?y.jsxs("div",{className:"p-4",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["History (",t.events.length,")"]}),y.jsx("div",{children:t.events.map(o=>y.jsx(w5,{event:o},o.id))})]}):y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No history"})})}function k5({task:e,subtasks:t,onStatusChange:n,onPriorityChange:r,onTaskClick:o,onEpicClick:l,getEpicById:a,getTaskById:u}){const[d,f]=b.useState("comments");return y.jsxs("div",{className:"bg-muted/50 rounded-b-md",children:[y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsx(h5,{task:e,onStatusChange:n,onPriorityChange:r,onEpicClick:l,getEpicById:a}),y.jsx(p5,{dependsOn:e.dependsOn,blocks:e.blocks,onTaskClick:o,getTaskById:u}),y.jsx(y5,{subtasks:t,onTaskClick:o}),y.jsx(n1,{createdAt:e.createdAt,updatedAt:e.updatedAt})]}),y.jsxs("div",{className:"border-t",children:[y.jsxs("div",{className:"flex border-b",children:[y.jsxs(gt,{variant:"ghost",size:"sm",className:We("flex-1 rounded-none",d==="comments"&&"bg-accent"),onClick:()=>f("comments"),children:[y.jsx(pR,{className:"h-4 w-4 mr-1.5"}),"Comments"]}),y.jsxs(gt,{variant:"ghost",size:"sm",className:We("flex-1 rounded-none",d==="history"&&"bg-accent"),onClick:()=>f("history"),children:[y.jsx(Hb,{className:"h-4 w-4 mr-1.5"}),"History"]})]}),d==="comments"?y.jsx(v5,{taskId:e.id}):y.jsx(b5,{taskId:e.id})]})]})}function S5({task:e,subtasks:t,breadcrumbItems:n,status:r,priority:o,open:l,onClose:a,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g}){return y.jsx(SC,{open:l,onClose:a,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(k5,{task:{...e,status:r,priority:o},subtasks:t,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g})})}var C5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E5=C5.reduce((e,t)=>{const n=dm(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_5="Label",_C=b.forwardRef((e,t)=>y.jsx(E5.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));_C.displayName=_5;var P5=_C;function Wt({className:e,...t}){return y.jsx(P5,{"data-slot":"label",className:We("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function T5({form:e,epics:t,breadcrumbItems:n,open:r,isDeleting:o,onClose:l,onSubmit:a,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h}){const{watch:p,setValue:x,handleSubmit:g,formState:{isSubmitting:S,errors:k}}=e,C=p("title"),E=p("description"),_=p("status"),T=p("priority"),I=p("tags"),O=p("epicId"),R=async V=>{await a(V)&&u()};return y.jsx(CC,{open:r,onClose:l,breadcrumbItems:n,formId:"task-edit-form",isSubmitting:S,isDeleting:o,entityName:"Task",onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:y.jsxs("form",{id:"task-edit-form",onSubmit:g(R),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(wi,{value:C,onChange:V=>x("title",V.target.value),placeholder:"Task title",className:"text-lg font-semibold"}),k.title&&y.jsx("p",{className:"text-xs text-destructive",children:k.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(za,{value:E,onChange:V=>x("description",V.target.value),placeholder:"Task description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(pd,{value:_,onChange:V=>x("status",V),statuses:ad})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(md,{value:T,onChange:V=>x("priority",V)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(wi,{value:I,onChange:V=>x("tags",V.target.value),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsxs(Bn,{value:O||"none",onValueChange:V=>x("epicId",V==="none"?null:V),children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"none",children:"No Epic"}),t.map(V=>y.jsxs(Et,{value:V.id,children:[V.id,": ",V.title]},V.id))]})]})]})]})})}var Ma=e=>e.type==="checkbox",Po=e=>e instanceof Date,$n=e=>e==null;const PC=e=>typeof e=="object";var Lt=e=>!$n(e)&&!Array.isArray(e)&&PC(e)&&!Po(e),TC=e=>Lt(e)&&e.target?Ma(e.target)?e.target.checked:e.target.value:e,N5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,NC=(e,t)=>e.has(N5(t)),R5=e=>{const t=e.constructor&&e.constructor.prototype;return Lt(t)&&t.hasOwnProperty("isPrototypeOf")},rg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Dt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(rg&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Lt(e)&&R5(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Dt(e[o]));return r}var Cd=e=>/^\w*$/.test(e),wt=e=>e===void 0,ig=e=>Array.isArray(e)?e.filter(Boolean):[],og=e=>ig(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Se=(e,t,n)=>{if(!t||!Lt(e))return n;const r=(Cd(t)?[t]:og(t)).reduce((o,l)=>$n(o)?o:o[l],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},Jn=e=>typeof e=="boolean",Sn=e=>typeof e=="function",st=(e,t,n)=>{let r=-1;const o=Cd(t)?[t]:og(t),l=o.length,a=l-1;for(;++r<l;){const u=o[r];let d=n;if(r!==a){const f=e[u];d=Lt(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const $c={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Rr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},fi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},RC=le.createContext(null);RC.displayName="HookFormControlContext";const sg=()=>le.useContext(RC);var jC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const a=l;return t._proxyFormState[a]!==Rr.all&&(t._proxyFormState[a]=!r||Rr.all),n&&(n[a]=!0),e[a]}});return o};const lg=typeof window<"u"?le.useLayoutEffect:le.useEffect;function j5(e){const t=sg(),{control:n=t,disabled:r,name:o,exact:l}=e||{},[a,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return lg(()=>n._subscribe({name:o,formState:d.current,exact:l,callback:f=>{!r&&u({...n._formState,...f})}}),[o,r,l]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>jC(a,n,d.current,!1),[a,n])}var tr=e=>typeof e=="string",Up=(e,t,n,r,o)=>tr(e)?(r&&t.watch.add(e),Se(n,e,o)):Array.isArray(e)?e.map(l=>(r&&t.watch.add(l),Se(n,l))):(r&&(t.watchAll=!0),n),Hp=e=>$n(e)||!PC(e);function jr(e,t,n=new WeakSet){if(Hp(e)||Hp(t))return Object.is(e,t);if(Po(e)&&Po(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of r){const a=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const u=t[l];if(Po(a)&&Po(u)||Lt(a)&&Lt(u)||Array.isArray(a)&&Array.isArray(u)?!jr(a,u,n):!Object.is(a,u))return!1}}return!0}function I5(e){const t=sg(),{control:n=t,name:r,defaultValue:o,disabled:l,exact:a,compute:u}=e||{},d=le.useRef(o),f=le.useRef(u),h=le.useRef(void 0),p=le.useRef(n),x=le.useRef(r);f.current=u;const[g,S]=le.useState(()=>{const I=n._getWatch(r,d.current);return f.current?f.current(I):I}),k=le.useCallback(I=>{const O=Up(r,n._names,I||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),C=le.useCallback(I=>{if(!l){const O=Up(r,n._names,I||n._formValues,!1,d.current);if(f.current){const R=f.current(O);jr(R,h.current)||(S(R),h.current=R)}else S(O)}},[n._formValues,n._names,l,r]);lg(()=>((p.current!==n||!jr(x.current,r))&&(p.current=n,x.current=r,C()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:I=>{C(I.values)}})),[n,a,r,C]),le.useEffect(()=>n._removeUnmounted());const E=p.current!==n,_=x.current,T=le.useMemo(()=>{if(l)return null;const I=!E&&!jr(_,r);return E||I?k():null},[l,E,r,_,k]);return T!==null?T:g}function A5(e){const t=sg(),{name:n,disabled:r,control:o=t,shouldUnregister:l,defaultValue:a,exact:u=!0}=e,d=NC(o._names.array,n),f=le.useMemo(()=>Se(o._formValues,n,Se(o._defaultValues,n,a)),[o,n,a]),h=I5({control:o,name:n,defaultValue:f,exact:u}),p=j5({control:o,name:n,exact:u}),x=le.useRef(e),g=le.useRef(void 0),S=le.useRef(o.register(n,{...e.rules,value:h,...Jn(e.disabled)?{disabled:e.disabled}:{}}));x.current=e;const k=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(p.validatingFields,n)},error:{enumerable:!0,get:()=>Se(p.errors,n)}}),[p,n]),C=le.useCallback(I=>S.current.onChange({target:{value:TC(I),name:n},type:$c.CHANGE}),[n]),E=le.useCallback(()=>S.current.onBlur({target:{value:Se(o._formValues,n),name:n},type:$c.BLUR}),[n,o._formValues]),_=le.useCallback(I=>{const O=Se(o._fields,n);O&&O._f&&I&&(O._f.ref={focus:()=>Sn(I.focus)&&I.focus(),select:()=>Sn(I.select)&&I.select(),setCustomValidity:R=>Sn(I.setCustomValidity)&&I.setCustomValidity(R),reportValidity:()=>Sn(I.reportValidity)&&I.reportValidity()})},[o._fields,n]),T=le.useMemo(()=>({name:n,value:h,...Jn(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:C,onBlur:E,ref:_}),[n,r,p.disabled,C,E,_,h]);return le.useEffect(()=>{const I=o._options.shouldUnregister||l,O=g.current;O&&O!==n&&!d&&o.unregister(O),o.register(n,{...x.current.rules,...Jn(x.current.disabled)?{disabled:x.current.disabled}:{}});const R=(V,Q)=>{const oe=Se(o._fields,V);oe&&oe._f&&(oe._f.mount=Q)};if(R(n,!0),I){const V=Dt(Se(o._options.defaultValues,n,x.current.defaultValue));st(o._defaultValues,n,V),wt(Se(o._formValues,n))&&st(o._formValues,n,V)}return!d&&o.register(n),g.current=n,()=>{(d?I&&!o._state.action:I)?o.unregister(n):R(n,!1)}},[n,o,d,l]),le.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),le.useMemo(()=>({field:T,formState:p,fieldState:k}),[T,p,k])}const Vc=e=>e.render(A5(e)),O5=le.createContext(null);O5.displayName="HookFormContext";var ag=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},ra=e=>Array.isArray(e)?e:[e],c0=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function IC(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],l=t[r];if(o&&Lt(o)&&l){const a=IC(o,l);Lt(a)&&(n[r]=a)}else e[r]&&(n[r]=l)}return n}var bn=e=>Lt(e)&&!Object.keys(e).length,ug=e=>e.type==="file",Bc=e=>{if(!rg)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},AC=e=>e.type==="select-multiple",cg=e=>e.type==="radio",D5=e=>cg(e)||Ma(e),Gh=e=>Bc(e)&&e.isConnected;function z5(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wt(e)?r++:e[t[r++]];return e}function M5(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function zt(e,t){const n=Array.isArray(t)?t:Cd(t)?[t]:og(t),r=n.length===1?e:z5(e,n),o=n.length-1,l=n[o];return r&&delete r[l],o!==0&&(Lt(r)&&bn(r)||Array.isArray(r)&&M5(r))&&zt(e,n.slice(0,-1)),e}var L5=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function OC(e){return Array.isArray(e)||Lt(e)&&!L5(e)}function Wp(e,t={}){for(const n in e){const r=e[n];OC(r)?(t[n]=Array.isArray(r)?[]:{},Wp(r,t[n])):wt(r)||(t[n]=!0)}return t}function Ps(e,t,n){n||(n=Wp(t));for(const r in e){const o=e[r];if(OC(o))wt(t)||Hp(n[r])?n[r]=Wp(o,Array.isArray(o)?[]:{}):Ps(o,$n(t)?{}:t[r],n[r]);else{const l=t[r];n[r]=!jr(o,l)}}return n}const d0={value:!1,isValid:!1},f0={value:!0,isValid:!0};var DC=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!wt(e[0].attributes.value)?wt(e[0].value)||e[0].value===""?f0:{value:e[0].value,isValid:!0}:f0:d0}return d0},zC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&tr(e)?new Date(e):r?r(e):e;const h0={isValid:!1,value:null};var MC=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,h0):h0;function p0(e){const t=e.ref;return ug(t)?t.files:cg(t)?MC(e.refs).value:AC(t)?[...t.selectedOptions].map(({value:n})=>n):Ma(t)?DC(e.refs).value:zC(wt(t.value)?e.ref.value:t.value,e)}var F5=(e,t,n,r)=>{const o={};for(const l of e){const a=Se(t,l);a&&st(o,l,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Uc=e=>e instanceof RegExp,Kl=e=>wt(e)?e:Uc(e)?e.source:Lt(e)?Uc(e.value)?e.value.source:e.value:e,m0=e=>({isOnSubmit:!e||e===Rr.onSubmit,isOnBlur:e===Rr.onBlur,isOnChange:e===Rr.onChange,isOnAll:e===Rr.all,isOnTouch:e===Rr.onTouched});const g0="AsyncFunction";var $5=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===g0||Lt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===g0)),V5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),y0=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ia=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const l=Se(e,o);if(l){const{_f:a,...u}=l;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(ia(u,t))break}else if(Lt(u)&&ia(u,t))break}}};function v0(e,t,n){const r=Se(e,n);if(r||Cd(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),a=Se(t,l),u=Se(e,l);if(a&&!Array.isArray(a)&&n!==l)return{name:n};if(u&&u.type)return{name:l,error:u};if(u&&u.root&&u.root.type)return{name:`${l}.root`,error:u.root};o.pop()}return{name:n}}var B5=(e,t,n,r)=>{n(e);const{name:o,...l}=e;return bn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(a=>t[a]===(!r||Rr.all))},U5=(e,t,n)=>!e||!t||e===t||ra(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),H5=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,W5=(e,t)=>!ig(Se(e,t)).length&&zt(e,t),Z5=(e,t,n)=>{const r=ra(Se(e,n));return st(r,"root",t[n]),st(e,n,r),e};function x0(e,t,n="validate"){if(tr(e)||Array.isArray(e)&&e.every(tr)||Jn(e)&&!e)return{type:n,message:tr(e)?e:"",ref:t}}var Es=e=>Lt(e)&&!Uc(e)?e:{value:e,message:""},w0=async(e,t,n,r,o,l)=>{const{ref:a,refs:u,required:d,maxLength:f,minLength:h,min:p,max:x,pattern:g,validate:S,name:k,valueAsNumber:C,mount:E}=e._f,_=Se(n,k);if(!E||t.has(k))return{};const T=u?u[0]:a,I=M=>{o&&T.reportValidity&&(T.setCustomValidity(Jn(M)?"":M||""),T.reportValidity())},O={},R=cg(a),V=Ma(a),Q=R||V,oe=(C||ug(a))&&wt(a.value)&&wt(_)||Bc(a)&&a.value===""||_===""||Array.isArray(_)&&!_.length,A=ag.bind(null,k,r,O),K=(M,ne,W,B=fi.maxLength,q=fi.minLength)=>{const ee=M?ne:W;O[k]={type:M?B:q,message:ee,ref:a,...A(M?B:q,ee)}};if(l?!Array.isArray(_)||!_.length:d&&(!Q&&(oe||$n(_))||Jn(_)&&!_||V&&!DC(u).isValid||R&&!MC(u).isValid)){const{value:M,message:ne}=tr(d)?{value:!!d,message:d}:Es(d);if(M&&(O[k]={type:fi.required,message:ne,ref:T,...A(fi.required,ne)},!r))return I(ne),O}if(!oe&&(!$n(p)||!$n(x))){let M,ne;const W=Es(x),B=Es(p);if(!$n(_)&&!isNaN(_)){const q=a.valueAsNumber||_&&+_;$n(W.value)||(M=q>W.value),$n(B.value)||(ne=q<B.value)}else{const q=a.valueAsDate||new Date(_),ee=N=>new Date(new Date().toDateString()+" "+N),D=a.type=="time",G=a.type=="week";tr(W.value)&&_&&(M=D?ee(_)>ee(W.value):G?_>W.value:q>new Date(W.value)),tr(B.value)&&_&&(ne=D?ee(_)<ee(B.value):G?_<B.value:q<new Date(B.value))}if((M||ne)&&(K(!!M,W.message,B.message,fi.max,fi.min),!r))return I(O[k].message),O}if((f||h)&&!oe&&(tr(_)||l&&Array.isArray(_))){const M=Es(f),ne=Es(h),W=!$n(M.value)&&_.length>+M.value,B=!$n(ne.value)&&_.length<+ne.value;if((W||B)&&(K(W,M.message,ne.message),!r))return I(O[k].message),O}if(g&&!oe&&tr(_)){const{value:M,message:ne}=Es(g);if(Uc(M)&&!_.match(M)&&(O[k]={type:fi.pattern,message:ne,ref:a,...A(fi.pattern,ne)},!r))return I(ne),O}if(S){if(Sn(S)){const M=await S(_,n),ne=x0(M,T);if(ne&&(O[k]={...ne,...A(fi.validate,ne.message)},!r))return I(ne.message),O}else if(Lt(S)){let M={};for(const ne in S){if(!bn(M)&&!r)break;const W=x0(await S[ne](_,n),T,ne);W&&(M={...W,...A(ne,W.message)},I(W.message),r&&(O[k]=M))}if(!bn(M)&&(O[k]={ref:T,...M},!r))return O}}return I(!0),O};const q5={mode:Rr.onSubmit,reValidateMode:Rr.onChange,shouldFocusError:!0};function Q5(e={}){let t={...q5,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Lt(t.defaultValues)||Lt(t.values)?Dt(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:Dt(o),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...h};let x={...p};const g={array:c0(),state:c0()},S=t.criteriaMode===Rr.all,k=F=>J=>{clearTimeout(f),f=setTimeout(F,J)},C=async F=>{if(!a.keepIsValid&&!t.disabled&&(p.isValid||x.isValid||F)){let J;t.resolver?(J=bn((await Q()).errors),E()):J=await A(r,!0),J!==n.isValid&&g.state.next({isValid:J})}},E=(F,J)=>{!t.disabled&&(p.isValidating||p.validatingFields||x.isValidating||x.validatingFields)&&((F||Array.from(u.mount)).forEach(se=>{se&&(J?st(n.validatingFields,se,J):zt(n.validatingFields,se))}),g.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},_=(F,J=[],se,be,ge=!0,$=!0)=>{if(be&&se&&!t.disabled){if(a.action=!0,$&&Array.isArray(Se(r,F))){const ie=se(Se(r,F),be.argA,be.argB);ge&&st(r,F,ie)}if($&&Array.isArray(Se(n.errors,F))){const ie=se(Se(n.errors,F),be.argA,be.argB);ge&&st(n.errors,F,ie),W5(n.errors,F)}if((p.touchedFields||x.touchedFields)&&$&&Array.isArray(Se(n.touchedFields,F))){const ie=se(Se(n.touchedFields,F),be.argA,be.argB);ge&&st(n.touchedFields,F,ie)}(p.dirtyFields||x.dirtyFields)&&(n.dirtyFields=Ps(o,l)),g.state.next({name:F,isDirty:M(F,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else st(l,F,J)},T=(F,J)=>{st(n.errors,F,J),g.state.next({errors:n.errors})},I=F=>{n.errors=F,g.state.next({errors:n.errors,isValid:!1})},O=(F,J,se,be)=>{const ge=Se(r,F);if(ge){const $=Se(l,F,wt(se)?Se(o,F):se);wt($)||be&&be.defaultChecked||J?st(l,F,J?$:p0(ge._f)):B(F,$),a.mount&&!a.action&&C()}},R=(F,J,se,be,ge)=>{let $=!1,ie=!1;const xe={name:F};if(!t.disabled){if(!se||be){(p.isDirty||x.isDirty)&&(ie=n.isDirty,n.isDirty=xe.isDirty=M(),$=ie!==xe.isDirty);const Ee=jr(Se(o,F),J);ie=!!Se(n.dirtyFields,F),Ee?zt(n.dirtyFields,F):st(n.dirtyFields,F,!0),xe.dirtyFields=n.dirtyFields,$=$||(p.dirtyFields||x.dirtyFields)&&ie!==!Ee}if(se){const Ee=Se(n.touchedFields,F);Ee||(st(n.touchedFields,F,se),xe.touchedFields=n.touchedFields,$=$||(p.touchedFields||x.touchedFields)&&Ee!==se)}$&&ge&&g.state.next(xe)}return $?xe:{}},V=(F,J,se,be)=>{const ge=Se(n.errors,F),$=(p.isValid||x.isValid)&&Jn(J)&&n.isValid!==J;if(t.delayError&&se?(d=k(()=>T(F,se)),d(t.delayError)):(clearTimeout(f),d=null,se?st(n.errors,F,se):zt(n.errors,F)),(se?!jr(ge,se):ge)||!bn(be)||$){const ie={...be,...$&&Jn(J)?{isValid:J}:{},errors:n.errors,name:F};n={...n,...ie},g.state.next(ie)}},Q=async F=>(E(F,!0),await t.resolver(l,t.context,F5(F||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),oe=async F=>{const{errors:J}=await Q(F);if(E(F),F)for(const se of F){const be=Se(J,se);be?st(n.errors,se,be):zt(n.errors,se)}else n.errors=J;return J},A=async(F,J,se={valid:!0})=>{for(const be in F){const ge=F[be];if(ge){const{_f:$,...ie}=ge;if($){const xe=u.array.has($.name),Ee=ge._f&&$5(ge._f);Ee&&p.validatingFields&&E([$.name],!0);const De=await w0(ge,u.disabled,l,S,t.shouldUseNativeValidation&&!J,xe);if(Ee&&p.validatingFields&&E([$.name]),De[$.name]&&(se.valid=!1,J||e.shouldUseNativeValidation))break;!J&&(Se(De,$.name)?xe?Z5(n.errors,De,$.name):st(n.errors,$.name,De[$.name]):zt(n.errors,$.name))}!bn(ie)&&await A(ie,J,se)}}return se.valid},K=()=>{for(const F of u.unMount){const J=Se(r,F);J&&(J._f.refs?J._f.refs.every(se=>!Gh(se)):!Gh(J._f.ref))&&ve(F)}u.unMount=new Set},M=(F,J)=>!t.disabled&&(F&&J&&st(l,F,J),!jr(L(),o)),ne=(F,J,se)=>Up(F,u,{...a.mount?l:wt(J)?o:tr(F)?{[F]:J}:J},se,J),W=F=>ig(Se(a.mount?l:o,F,t.shouldUnregister?Se(o,F,[]):[])),B=(F,J,se={})=>{const be=Se(r,F);let ge=J;if(be){const $=be._f;$&&(!$.disabled&&st(l,F,zC(J,$)),ge=Bc($.ref)&&$n(J)?"":J,AC($.ref)?[...$.ref.options].forEach(ie=>ie.selected=ge.includes(ie.value)):$.refs?Ma($.ref)?$.refs.forEach(ie=>{(!ie.defaultChecked||!ie.disabled)&&(Array.isArray(ge)?ie.checked=!!ge.find(xe=>xe===ie.value):ie.checked=ge===ie.value||!!ge)}):$.refs.forEach(ie=>ie.checked=ie.value===ge):ug($.ref)?$.ref.value="":($.ref.value=ge,$.ref.type||g.state.next({name:F,values:Dt(l)})))}(se.shouldDirty||se.shouldTouch)&&R(F,ge,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&N(F)},q=(F,J,se)=>{for(const be in J){if(!J.hasOwnProperty(be))return;const ge=J[be],$=F+"."+be,ie=Se(r,$);(u.array.has(F)||Lt(ge)||ie&&!ie._f)&&!Po(ge)?q($,ge,se):B($,ge,se)}},ee=(F,J,se={})=>{const be=Se(r,F),ge=u.array.has(F),$=Dt(J);st(l,F,$),ge?(g.array.next({name:F,values:Dt(l)}),(p.isDirty||p.dirtyFields||x.isDirty||x.dirtyFields)&&se.shouldDirty&&g.state.next({name:F,dirtyFields:Ps(o,l),isDirty:M(F,$)})):be&&!be._f&&!$n($)?q(F,$,se):B(F,$,se),y0(F,u)?g.state.next({...n,name:F,values:Dt(l)}):g.state.next({name:a.mount?F:void 0,values:Dt(l)})},D=async F=>{a.mount=!0;const J=F.target;let se=J.name,be=!0;const ge=Se(r,se),$=Ee=>{be=Number.isNaN(Ee)||Po(Ee)&&isNaN(Ee.getTime())||jr(Ee,Se(l,se,Ee))},ie=m0(t.mode),xe=m0(t.reValidateMode);if(ge){let Ee,De;const ct=J.type?p0(ge._f):TC(F),Rt=F.type===$c.BLUR||F.type===$c.FOCUS_OUT,Zt=!V5(ge._f)&&!t.resolver&&!Se(n.errors,se)&&!ge._f.deps||H5(Rt,Se(n.touchedFields,se),n.isSubmitted,xe,ie),Vt=y0(se,u,Rt);st(l,se,ct),Rt?(!J||!J.readOnly)&&(ge._f.onBlur&&ge._f.onBlur(F),d&&d(0)):ge._f.onChange&&ge._f.onChange(F);const Pn=R(se,ct,Rt),ht=!bn(Pn)||Vt;if(!Rt&&g.state.next({name:se,type:F.type,values:Dt(l)}),Zt)return(p.isValid||x.isValid)&&(t.mode==="onBlur"?Rt&&C():Rt||C()),ht&&g.state.next({name:se,...Vt?{}:Pn});if(!Rt&&Vt&&g.state.next({...n}),t.resolver){const{errors:pn}=await Q([se]);if(E([se]),$(ct),be){const Xt=v0(n.errors,r,se),ni=v0(pn,r,Xt.name||se);Ee=ni.error,se=ni.name,De=bn(pn)}}else E([se],!0),Ee=(await w0(ge,u.disabled,l,S,t.shouldUseNativeValidation))[se],E([se]),$(ct),be&&(Ee?De=!1:(p.isValid||x.isValid)&&(De=await A(r,!0)));be&&(ge._f.deps&&(!Array.isArray(ge._f.deps)||ge._f.deps.length>0)&&N(ge._f.deps),V(se,De,Ee,Pn))}},G=(F,J)=>{if(Se(n.errors,J)&&F.focus)return F.focus(),1},N=async(F,J={})=>{let se,be;const ge=ra(F);if(t.resolver){const $=await oe(wt(F)?F:ge);se=bn($),be=F?!ge.some(ie=>Se($,ie)):se}else F?(be=(await Promise.all(ge.map(async $=>{const ie=Se(r,$);return await A(ie&&ie._f?{[$]:ie}:ie)}))).every(Boolean),!(!be&&!n.isValid)&&C()):be=se=await A(r);return g.state.next({...!tr(F)||(p.isValid||x.isValid)&&se!==n.isValid?{}:{name:F},...t.resolver||!F?{isValid:se}:{},errors:n.errors}),J.shouldFocus&&!be&&ia(r,G,F?ge:u.mount),be},L=(F,J)=>{let se={...a.mount?l:o};return J&&(se=IC(J.dirtyFields?n.dirtyFields:n.touchedFields,se)),wt(F)?se:tr(F)?Se(se,F):F.map(be=>Se(se,be))},Y=(F,J)=>({invalid:!!Se((J||n).errors,F),isDirty:!!Se((J||n).dirtyFields,F),error:Se((J||n).errors,F),isValidating:!!Se(n.validatingFields,F),isTouched:!!Se((J||n).touchedFields,F)}),j=F=>{F&&ra(F).forEach(J=>zt(n.errors,J)),g.state.next({errors:F?n.errors:{}})},ue=(F,J,se)=>{const be=(Se(r,F,{_f:{}})._f||{}).ref,ge=Se(n.errors,F)||{},{ref:$,message:ie,type:xe,...Ee}=ge;st(n.errors,F,{...Ee,...J,ref:be}),g.state.next({name:F,errors:n.errors,isValid:!1}),se&&se.shouldFocus&&be&&be.focus&&be.focus()},ye=(F,J)=>Sn(F)?g.state.subscribe({next:se=>"values"in se&&F(ne(void 0,J),se)}):ne(F,J,!0),we=F=>g.state.subscribe({next:J=>{U5(F.name,J.name,F.exact)&&B5(J,F.formState||p,ir,F.reRenderRoot)&&F.callback({values:{...l},...n,...J,defaultValues:o})}}).unsubscribe,ae=F=>(a.mount=!0,x={...x,...F.formState},we({...F,formState:{...h,...F.formState}})),ve=(F,J={})=>{for(const se of F?ra(F):u.mount)u.mount.delete(se),u.array.delete(se),J.keepValue||(zt(r,se),zt(l,se)),!J.keepError&&zt(n.errors,se),!J.keepDirty&&zt(n.dirtyFields,se),!J.keepTouched&&zt(n.touchedFields,se),!J.keepIsValidating&&zt(n.validatingFields,se),!t.shouldUnregister&&!J.keepDefaultValue&&zt(o,se);g.state.next({values:Dt(l)}),g.state.next({...n,...J.keepDirty?{isDirty:M()}:{}}),!J.keepIsValid&&C()},Ce=({disabled:F,name:J})=>{if(Jn(F)&&a.mount||F||u.disabled.has(J)){const ge=u.disabled.has(J)!==!!F;F?u.disabled.add(J):u.disabled.delete(J),ge&&a.mount&&!a.action&&C()}},ke=(F,J={})=>{let se=Se(r,F);const be=Jn(J.disabled)||Jn(t.disabled);return st(r,F,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:F}},name:F,mount:!0,...J}}),u.mount.add(F),se?Ce({disabled:Jn(J.disabled)?J.disabled:t.disabled,name:F}):O(F,!0,J.value),{...be?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:Kl(J.min),max:Kl(J.max),minLength:Kl(J.minLength),maxLength:Kl(J.maxLength),pattern:Kl(J.pattern)}:{},name:F,onChange:D,onBlur:D,ref:ge=>{if(ge){ke(F,J),se=Se(r,F);const $=wt(ge.value)&&ge.querySelectorAll&&ge.querySelectorAll("input,select,textarea")[0]||ge,ie=D5($),xe=se._f.refs||[];if(ie?xe.find(Ee=>Ee===$):$===se._f.ref)return;st(r,F,{_f:{...se._f,...ie?{refs:[...xe.filter(Gh),$,...Array.isArray(Se(o,F))?[{}]:[]],ref:{type:$.type,name:F}}:{ref:$}}}),O(F,!1,void 0,$)}else se=Se(r,F,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(NC(u.array,F)&&a.action)&&u.unMount.add(F)}}},Ae=()=>t.shouldFocusError&&ia(r,G,u.mount),Ve=F=>{Jn(F)&&(g.state.next({disabled:F}),ia(r,(J,se)=>{const be=Se(r,se);be&&(J.disabled=be._f.disabled||F,Array.isArray(be._f.refs)&&be._f.refs.forEach(ge=>{ge.disabled=be._f.disabled||F}))},0,!1))},nt=(F,J)=>async se=>{let be;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let ge=Dt(l);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:$,values:ie}=await Q();E(),n.errors=$,ge=Dt(ie)}else await A(r);if(u.disabled.size)for(const $ of u.disabled)zt(ge,$);if(zt(n.errors,"root"),bn(n.errors)){g.state.next({errors:{}});try{await F(ge,se)}catch($){be=$}}else J&&await J({...n.errors},se),Ae(),setTimeout(Ae);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!be,submitCount:n.submitCount+1,errors:n.errors}),be)throw be},At=(F,J={})=>{Se(r,F)&&(wt(J.defaultValue)?ee(F,Dt(Se(o,F))):(ee(F,J.defaultValue),st(o,F,Dt(J.defaultValue))),J.keepTouched||zt(n.touchedFields,F),J.keepDirty||(zt(n.dirtyFields,F),n.isDirty=J.defaultValue?M(F,Dt(Se(o,F))):M()),J.keepError||(zt(n.errors,F),p.isValid&&C()),g.state.next({...n}))},sn=(F,J={})=>{const se=F?Dt(F):o,be=Dt(se),ge=bn(F),$=ge?o:be;if(J.keepDefaultValues||(o=se),!J.keepValues){if(J.keepDirtyValues){const ie=new Set([...u.mount,...Object.keys(Ps(o,l))]);for(const xe of Array.from(ie)){const Ee=Se(n.dirtyFields,xe),De=Se(l,xe),ct=Se($,xe);Ee&&!wt(De)?st($,xe,De):!Ee&&!wt(ct)&&ee(xe,ct)}}else{if(rg&&wt(F))for(const ie of u.mount){const xe=Se(r,ie);if(xe&&xe._f){const Ee=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(Bc(Ee)){const De=Ee.closest("form");if(De){De.reset();break}}}}if(J.keepFieldsRef)for(const ie of u.mount)ee(ie,Se($,ie));else r={}}l=t.shouldUnregister?J.keepDefaultValues?Dt(o):{}:Dt($),g.array.next({values:{...$}}),g.state.next({values:{...$}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!p.isValid||!!J.keepIsValid||!!J.keepDirtyValues||!t.shouldUnregister&&!bn($),a.watch=!!t.shouldUnregister,a.keepIsValid=!!J.keepIsValid,a.action=!1,J.keepErrors||(n.errors={}),g.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:ge?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!jr(F,o)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ge?{}:J.keepDirtyValues?J.keepDefaultValues&&l?Ps(o,l):n.dirtyFields:J.keepDefaultValues&&F?Ps(o,F):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Gt=(F,J)=>sn(Sn(F)?F(l):F,{...t.resetOptions,...J}),ln=(F,J={})=>{const se=Se(r,F),be=se&&se._f;if(be){const ge=be.refs?be.refs[0]:be.ref;ge.focus&&setTimeout(()=>{ge.focus(),J.shouldSelect&&Sn(ge.select)&&ge.select()})}},ir=F=>{n={...n,...F}},_n={control:{register:ke,unregister:ve,getFieldState:Y,handleSubmit:nt,setError:ue,_subscribe:we,_runSchema:Q,_updateIsValidating:E,_focusError:Ae,_getWatch:ne,_getDirty:M,_setValid:C,_setFieldArray:_,_setDisabledField:Ce,_setErrors:I,_getFieldArray:W,_reset:sn,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then(F=>{Gt(F,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:K,_disableForm:Ve,_subjects:g,_proxyFormState:p,get _fields(){return r},get _formValues(){return l},get _state(){return a},set _state(F){a=F},get _defaultValues(){return o},get _names(){return u},set _names(F){u=F},get _formState(){return n},get _options(){return t},set _options(F){t={...t,...F}}},subscribe:ae,trigger:N,register:ke,handleSubmit:nt,watch:ye,setValue:ee,getValues:L,reset:Gt,resetField:At,clearErrors:j,unregister:ve,setError:ue,setFocus:ln,getFieldState:Y};return{..._n,formControl:_n}}function dg(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,o]=le.useState({isDirty:!1,isValidating:!1,isLoading:Sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Sn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Sn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...u}=Q5(e);t.current={...u,formState:r}}const l=t.current.control;return l._options=e,lg(()=>{const a=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),l._formState.isReady=!0,a},[l]),le.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),le.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),le.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),le.useEffect(()=>{if(l._proxyFormState.isDirty){const a=l._getDirty();a!==r.isDirty&&l._subjects.state.next({isDirty:a})}},[l,r.isDirty]),le.useEffect(()=>{var a;e.values&&!jr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((a=l._options.resetOptions)===null||a===void 0)&&a.keepIsValid||l._setValid(),n.current=e.values,o(u=>({...u}))):l._resetDefaultValues()},[l,e.values]),le.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=le.useMemo(()=>jC(r,l),[l,r]),t.current}const b0=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Zp=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?b0(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>b0(o,n,e))}},k0=(e,t)=>{t.shouldUseNativeValidation&&Zp(e,t);const n={};for(const r in e){const o=Se(t.fields,r),l=Object.assign(e[r]||{},{ref:o&&o.ref});if(Y5(t.names||Object.keys(e),r)){const a=Object.assign({},Se(n,r));st(a,"root",l),st(n,r,a)}else st(n,r,l)}return n},Y5=(e,t)=>{const n=S0(t);return e.some(r=>S0(r).match(`^${n}\\.\\d+`))};function S0(e){return e.replace(/\]|\[/g,"")}function ce(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=a.prototype,h=Object.keys(f);for(let p=0;p<h.length;p++){const x=h[p];x in u||(u[x]=f[x].bind(u))}}const o=(n==null?void 0:n.Parent)??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function a(u){var d;const f=n!=null&&n.Parent?new l:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>{var d,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:f.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Is extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class LC extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const FC={};function Ho(e){return FC}function $C(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function qp(e,t){return typeof t=="bigint"?t.toString():t}function fg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function hg(e){return e==null}function pg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function K5(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d!=null&&d[1]&&(o=Number.parseInt(d[1]))}const l=n>o?n:o,a=Number.parseInt(e.toFixed(l).replace(".","")),u=Number.parseInt(t.toFixed(l).replace(".",""));return a%u/10**l}const C0=Symbol("evaluating");function lt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==C0)return r===void 0&&(r=C0,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Yo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ao(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function E0(e){return JSON.stringify(e)}function G5(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const VC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const X5=fg(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ga(e){if(Hc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Hc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function BC(e){return ga(e)?{...e}:Array.isArray(e)?[...e]:e}const J5=new Set(["string","number","symbol"]);function Ed(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function ze(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function e6(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const t6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function n6(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=ao(e._zod.def,{get shape(){const a={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=n.shape[u])}return Yo(this,"shape",a),a},checks:[]});return uo(e,l)}function r6(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=ao(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u]}return Yo(this,"shape",a),a},checks:[]});return uo(e,l)}function i6(e,t){if(!ga(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(l,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ao(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Yo(this,"shape",l),l}});return uo(e,o)}function o6(e,t){if(!ga(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ao(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Yo(this,"shape",r),r}});return uo(e,n)}function s6(e,t){const n=ao(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Yo(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return uo(e,n)}function l6(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=ao(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Yo(this,"shape",d),d},checks:[]});return uo(t,a)}function a6(e,t,n){const r=ao(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(n)for(const a in n){if(!(a in l))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(l[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)l[a]=new e({type:"nonoptional",innerType:o[a]});return Yo(this,"shape",l),l}});return uo(t,r)}function Ts(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function UC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function uc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Wo(e,t,n){var o,l,a,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const h=uc((a=(l=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:l.error)==null?void 0:a.call(l,e))??uc((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??uc((d=n.customError)==null?void 0:d.call(n,e))??uc((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function mg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ya(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const HC=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,qp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},gg=ce("$ZodError",HC),_d=ce("$ZodError",HC,{Parent:Error});function u6(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function c6(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(a=>r({issues:a}));else if(l.code==="invalid_key")r({issues:l.issues});else if(l.code==="invalid_element")r({issues:l.issues});else if(l.path.length===0)n._errors.push(t(l));else{let a=n,u=0;for(;u<l.path.length;){const d=l.path[u];u===l.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(t(l))):a[d]=a[d]||{_errors:[]},a=a[d],u++}}};return r(e),n}const Pd=e=>(t,n,r,o)=>{const l=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},l);if(a instanceof Promise)throw new Is;if(a.issues.length){const u=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>Wo(d,l,Ho())));throw VC(u,o==null?void 0:o.callee),u}return a.value},d6=Pd(_d),Td=e=>async(t,n,r,o)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},l);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>Wo(d,l,Ho())));throw VC(u,o==null?void 0:o.callee),u}return a.value},f6=Td(_d),Nd=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Is;return l.issues.length?{success:!1,error:new(e??gg)(l.issues.map(a=>Wo(a,o,Ho())))}:{success:!0,data:l.value}},h6=Nd(_d),Rd=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(a=>Wo(a,o,Ho())))}:{success:!0,data:l.value}},p6=Rd(_d),m6=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pd(e)(t,n,o)},g6=e=>(t,n,r)=>Pd(e)(t,n,r),y6=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Td(e)(t,n,o)},v6=e=>async(t,n,r)=>Td(e)(t,n,r),x6=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nd(e)(t,n,o)},w6=e=>(t,n,r)=>Nd(e)(t,n,r),b6=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rd(e)(t,n,o)},k6=e=>async(t,n,r)=>Rd(e)(t,n,r),S6=/^[cC][^\s-]{8,}$/,C6=/^[0-9a-z]+$/,E6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,_6=/^[0-9a-vA-V]{20}$/,P6=/^[A-Za-z0-9]{27}$/,T6=/^[a-zA-Z0-9_-]{21}$/,N6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,R6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,_0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,j6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,I6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function A6(){return new RegExp(I6,"u")}const O6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,D6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,z6=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,M6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,L6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WC=/^[A-Za-z0-9_-]*$/,F6=/^\+[1-9]\d{6,14}$/,ZC="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",$6=new RegExp(`^${ZC}$`);function qC(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function V6(e){return new RegExp(`^${qC(e)}$`)}function B6(e){const t=qC({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ZC}T(?:${r})$`)}const U6=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},H6=/^-?\d+$/,W6=/^-?\d+(?:\.\d+)?$/,Z6=/^[^A-Z]*$/,q6=/^[^a-z]*$/,qn=ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),QC={number:"number",bigint:"bigint",object:"date"},YC=ce("$ZodCheckLessThan",(e,t)=>{qn.init(e,t);const n=QC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,l=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),KC=ce("$ZodCheckGreaterThan",(e,t)=>{qn.init(e,t);const n=QC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,l=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Q6=ce("$ZodCheckMultipleOf",(e,t)=>{qn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):K5(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Y6=ce("$ZodCheckNumberFormat",(e,t)=>{var a;qn.init(e,t),t.format=t.format||"float64";const n=(a=t.format)==null?void 0:a.includes("int"),r=n?"int":"number",[o,l]=t6[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=l,n&&(d.pattern=H6)}),e._zod.check=u=>{const d=u.value;if(n){if(!Number.isInteger(d)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?u.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<o&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>l&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),K6=ce("$ZodCheckMaxLength",(e,t)=>{var n;qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=mg(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),G6=ce("$ZodCheckMinLength",(e,t)=>{var n;qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=mg(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),X6=ce("$ZodCheckLengthEquals",(e,t)=>{var n;qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,l=o.length;if(l===t.length)return;const a=mg(o),u=l>t.length;r.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),jd=ce("$ZodCheckStringFormat",(e,t)=>{var n,r;qn.init(e,t),e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),J6=ce("$ZodCheckRegex",(e,t)=>{jd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eV=ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Z6),jd.init(e,t)}),tV=ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=q6),jd.init(e,t)}),nV=ce("$ZodCheckIncludes",(e,t)=>{qn.init(e,t);const n=Ed(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),rV=ce("$ZodCheckStartsWith",(e,t)=>{qn.init(e,t);const n=new RegExp(`^${Ed(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),iV=ce("$ZodCheckEndsWith",(e,t)=>{qn.init(e,t);const n=new RegExp(`.*${Ed(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),oV=ce("$ZodCheckOverwrite",(e,t)=>{qn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class sV{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
295
+ `).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),l=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of l)this.content.push(a)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(l=>` ${l}`)];return new t(...n,o.join(`
296
+ `))}}const lV={major:4,minor:3,patch:5},Ft=ce("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=lV;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const l of r)for(const a of l._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const l=(u,d,f)=>{let h=Ts(u),p;for(const x of d){if(x._zod.def.when){if(!x._zod.def.when(u))continue}else if(h)continue;const g=u.issues.length,S=x._zod.check(u);if(S instanceof Promise&&(f==null?void 0:f.async)===!1)throw new Is;if(p||S instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await S,u.issues.length!==g&&(h||(h=Ts(u,g)))});else{if(u.issues.length===g)continue;h||(h=Ts(u,g))}}return p?p.then(()=>u):u},a=(u,d,f)=>{if(Ts(u))return u.aborted=!0,u;const h=l(d,r,f);if(h instanceof Promise){if(f.async===!1)throw new Is;return h.then(p=>e._zod.parse(p,f))}return e._zod.parse(h,f)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(p=>a(p,u,d)):a(h,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new Is;return f.then(h=>l(h,r,d))}return l(f,r,d)}}lt(e,"~standard",()=>({validate:l=>{var a;try{const u=h6(e,l);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return p6(e,l).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}))}),yg=ce("$ZodString",(e,t)=>{var n;Ft.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??U6(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),bt=ce("$ZodStringFormat",(e,t)=>{jd.init(e,t),yg.init(e,t)}),aV=ce("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=R6),bt.init(e,t)}),uV=ce("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=_0(r))}else t.pattern??(t.pattern=_0());bt.init(e,t)}),cV=ce("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=j6),bt.init(e,t)}),dV=ce("$ZodURL",(e,t)=>{bt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),fV=ce("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=A6()),bt.init(e,t)}),hV=ce("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=T6),bt.init(e,t)}),pV=ce("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=S6),bt.init(e,t)}),mV=ce("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=C6),bt.init(e,t)}),gV=ce("$ZodULID",(e,t)=>{t.pattern??(t.pattern=E6),bt.init(e,t)}),yV=ce("$ZodXID",(e,t)=>{t.pattern??(t.pattern=_6),bt.init(e,t)}),vV=ce("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=P6),bt.init(e,t)}),xV=ce("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=B6(t)),bt.init(e,t)}),wV=ce("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$6),bt.init(e,t)}),bV=ce("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=V6(t)),bt.init(e,t)}),kV=ce("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=N6),bt.init(e,t)}),SV=ce("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=O6),bt.init(e,t),e._zod.bag.format="ipv4"}),CV=ce("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=D6),bt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),EV=ce("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=z6),bt.init(e,t)}),_V=ce("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=M6),bt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,l]=r;if(!l)throw new Error;const a=Number(l);if(`${a}`!==l)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function GC(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const PV=ce("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=L6),bt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{GC(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function TV(e){if(!WC.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return GC(n)}const NV=ce("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=WC),bt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{TV(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),RV=ce("$ZodE164",(e,t)=>{t.pattern??(t.pattern=F6),bt.init(e,t)});function jV(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const IV=ce("$ZodJWT",(e,t)=>{bt.init(e,t),e._zod.check=n=>{jV(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),XC=ce("$ZodNumber",(e,t)=>{Ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??W6,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const l=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...l?{received:l}:{}}),n}}),AV=ce("$ZodNumberFormat",(e,t)=>{Y6.init(e,t),XC.init(e,t)}),OV=ce("$ZodUnknown",(e,t)=>{Ft.init(e,t),e._zod.parse=n=>n}),DV=ce("$ZodNever",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function P0(e,t,n){e.issues.length&&t.issues.push(...UC(n,e.issues)),t.value[n]=e.value}const zV=ce("$ZodArray",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const l=[];for(let a=0;a<o.length;a++){const u=o[a],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?l.push(d.then(f=>P0(f,n,a))):P0(d,n,a)}return l.length?Promise.all(l).then(()=>n):n}});function Wc(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...UC(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function JC(e){var r,o,l,a;const t=Object.keys(e.shape);for(const u of t)if(!((a=(l=(o=(r=e.shape)==null?void 0:r[u])==null?void 0:o._zod)==null?void 0:l.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const n=e6(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function eE(e,t,n,r,o,l){const a=[],u=o.keySet,d=o.catchall._zod,f=d.def.type,h=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){a.push(p);continue}const x=d.run({value:t[p],issues:[]},r);x instanceof Promise?e.push(x.then(g=>Wc(g,n,p,t,h))):Wc(x,n,p,t,h)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:l}),e.length?Promise.all(e).then(()=>n):n}const MV=ce("$ZodObject",(e,t)=>{Ft.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=fg(()=>JC(t));lt(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const h=u[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(const p of h.values)d[f].add(p)}}return d});const o=Hc,l=t.catchall;let a;e._zod.parse=(u,d)=>{a??(a=r.value);const f=u.value;if(!o(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const h=[],p=a.shape;for(const x of a.keys){const g=p[x],S=g._zod.optout==="optional",k=g._zod.run({value:f[x],issues:[]},d);k instanceof Promise?h.push(k.then(C=>Wc(C,u,x,f,S))):Wc(k,u,x,f,S)}return l?eE(h,f,u,d,r.value,e):h.length?Promise.all(h).then(()=>u):u}}),LV=ce("$ZodObjectJIT",(e,t)=>{MV.init(e,t);const n=e._zod.parse,r=fg(()=>JC(t)),o=x=>{var T;const g=new sV(["shape","payload","ctx"]),S=r.value,k=I=>{const O=E0(I);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};g.write("const input = payload.value;");const C=Object.create(null);let E=0;for(const I of S.keys)C[I]=`key_${E++}`;g.write("const newResult = {};");for(const I of S.keys){const O=C[I],R=E0(I),V=x[I],Q=((T=V==null?void 0:V._zod)==null?void 0:T.optout)==="optional";g.write(`const ${O} = ${k(I)};`),Q?g.write(`
297
+ if (${O}.issues.length) {
298
+ if (${R} in input) {
299
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
300
+ ...iss,
301
+ path: iss.path ? [${R}, ...iss.path] : [${R}]
302
+ })));
303
+ }
304
+ }
305
+
306
+ if (${O}.value === undefined) {
307
+ if (${R} in input) {
308
+ newResult[${R}] = undefined;
309
+ }
310
+ } else {
311
+ newResult[${R}] = ${O}.value;
312
+ }
313
+
314
+ `):g.write(`
315
+ if (${O}.issues.length) {
316
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
317
+ ...iss,
318
+ path: iss.path ? [${R}, ...iss.path] : [${R}]
319
+ })));
320
+ }
321
+
322
+ if (${O}.value === undefined) {
323
+ if (${R} in input) {
324
+ newResult[${R}] = undefined;
325
+ }
326
+ } else {
327
+ newResult[${R}] = ${O}.value;
328
+ }
329
+
330
+ `)}g.write("payload.value = newResult;"),g.write("return payload;");const _=g.compile();return(I,O)=>_(x,I,O)};let l;const a=Hc,u=!FC.jitless,f=u&&X5.value,h=t.catchall;let p;e._zod.parse=(x,g)=>{p??(p=r.value);const S=x.value;return a(S)?u&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(l||(l=o(t.shape)),x=l(x,g),h?eE([],S,x,g,p,e):x):n(x,g):(x.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),x)}});function T0(e,t,n,r){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const o=e.filter(l=>!Ts(l));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(a=>Wo(a,r,Ho())))}),t)}const FV=ce("$ZodUnion",(e,t)=>{Ft.init(e,t),lt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),lt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),lt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),lt(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${o.map(l=>pg(l.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,l)=>{if(n)return r(o,l);let a=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},l);if(f instanceof Promise)u.push(f),a=!0;else{if(f.issues.length===0)return f;u.push(f)}}return a?Promise.all(u).then(d=>T0(d,o,e,l)):T0(u,o,e,l)}}),$V=ce("$ZodIntersection",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,l=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return l instanceof Promise||a instanceof Promise?Promise.all([l,a]).then(([d,f])=>N0(n,d,f)):N0(n,l,a)}});function Qp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ga(e)&&ga(t)){const n=Object.keys(t),r=Object.keys(e).filter(l=>n.indexOf(l)!==-1),o={...e,...t};for(const l of r){const a=Qp(e[l],t[l]);if(!a.valid)return{valid:!1,mergeErrorPath:[l,...a.mergeErrorPath]};o[l]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],l=t[r],a=Qp(o,l);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function N0(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const l=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(l.length&&o&&e.issues.push({...o,keys:l}),Ts(e))return e;const a=Qp(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const VV=ce("$ZodEnum",(e,t)=>{Ft.init(e,t);const n=$C(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>J5.has(typeof o)).map(o=>typeof o=="string"?Ed(o):o.toString()).join("|")})$`),e._zod.parse=(o,l)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),BV=ce("$ZodTransform",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new LC(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new Is;return n.value=o,n}});function R0(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const tE=ce("$ZodOptional",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",e._zod.optout="optional",lt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),lt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${pg(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>R0(l,n.value)):R0(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),UV=ce("$ZodExactOptional",(e,t)=>{tE.init(e,t),lt(e._zod,"values",()=>t.innerType._zod.values),lt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),HV=ce("$ZodNullable",(e,t)=>{Ft.init(e,t),lt(e._zod,"optin",()=>t.innerType._zod.optin),lt(e._zod,"optout",()=>t.innerType._zod.optout),lt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${pg(n.source)}|null)$`):void 0}),lt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),WV=ce("$ZodDefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",lt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>j0(l,t)):j0(o,t)}});function j0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ZV=ce("$ZodPrefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",lt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),qV=ce("$ZodNonOptional",(e,t)=>{Ft.init(e,t),lt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>I0(l,e)):I0(o,e)}});function I0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const QV=ce("$ZodCatch",(e,t)=>{Ft.init(e,t),lt(e._zod,"optin",()=>t.innerType._zod.optin),lt(e._zod,"optout",()=>t.innerType._zod.optout),lt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(a=>Wo(a,r,Ho()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>Wo(l,r,Ho()))},input:n.value}),n.issues=[]),n)}}),YV=ce("$ZodPipe",(e,t)=>{Ft.init(e,t),lt(e._zod,"values",()=>t.in._zod.values),lt(e._zod,"optin",()=>t.in._zod.optin),lt(e._zod,"optout",()=>t.out._zod.optout),lt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const l=t.out._zod.run(n,r);return l instanceof Promise?l.then(a=>cc(a,t.in,r)):cc(l,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(l=>cc(l,t.out,r)):cc(o,t.out,r)}});function cc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const KV=ce("$ZodReadonly",(e,t)=>{Ft.init(e,t),lt(e._zod,"propValues",()=>t.innerType._zod.propValues),lt(e._zod,"values",()=>t.innerType._zod.values),lt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),lt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(A0):A0(o)}});function A0(e){return e.value=Object.freeze(e.value),e}const GV=ce("$ZodCustom",(e,t)=>{qn.init(e,t),Ft.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(l=>O0(l,n,r,e));O0(o,n,r,e)}});function O0(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(ya(o))}}var D0;class XV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function JV(){return new XV}(D0=globalThis).__zod_globalRegistry??(D0.__zod_globalRegistry=JV());const Jl=globalThis.__zod_globalRegistry;function eB(e,t){return new e({type:"string",...ze(t)})}function tB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ze(t)})}function z0(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ze(t)})}function nB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ze(t)})}function rB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ze(t)})}function iB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ze(t)})}function oB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ze(t)})}function sB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ze(t)})}function lB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ze(t)})}function aB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ze(t)})}function uB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ze(t)})}function cB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ze(t)})}function dB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ze(t)})}function fB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ze(t)})}function hB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ze(t)})}function pB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ze(t)})}function mB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ze(t)})}function gB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ze(t)})}function yB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ze(t)})}function vB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ze(t)})}function xB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ze(t)})}function wB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ze(t)})}function bB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ze(t)})}function kB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ze(t)})}function SB(e,t){return new e({type:"string",format:"date",check:"string_format",...ze(t)})}function CB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ze(t)})}function EB(e,t){return new e({type:"string",format:"duration",check:"string_format",...ze(t)})}function _B(e,t){return new e({type:"number",checks:[],...ze(t)})}function PB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ze(t)})}function TB(e){return new e({type:"unknown"})}function NB(e,t){return new e({type:"never",...ze(t)})}function M0(e,t){return new YC({check:"less_than",...ze(t),value:e,inclusive:!1})}function Xh(e,t){return new YC({check:"less_than",...ze(t),value:e,inclusive:!0})}function L0(e,t){return new KC({check:"greater_than",...ze(t),value:e,inclusive:!1})}function Jh(e,t){return new KC({check:"greater_than",...ze(t),value:e,inclusive:!0})}function F0(e,t){return new Q6({check:"multiple_of",...ze(t),value:e})}function nE(e,t){return new K6({check:"max_length",...ze(t),maximum:e})}function Zc(e,t){return new G6({check:"min_length",...ze(t),minimum:e})}function rE(e,t){return new X6({check:"length_equals",...ze(t),length:e})}function RB(e,t){return new J6({check:"string_format",format:"regex",...ze(t),pattern:e})}function jB(e){return new eV({check:"string_format",format:"lowercase",...ze(e)})}function IB(e){return new tV({check:"string_format",format:"uppercase",...ze(e)})}function AB(e,t){return new nV({check:"string_format",format:"includes",...ze(t),includes:e})}function OB(e,t){return new rV({check:"string_format",format:"starts_with",...ze(t),prefix:e})}function DB(e,t){return new iV({check:"string_format",format:"ends_with",...ze(t),suffix:e})}function al(e){return new oV({check:"overwrite",tx:e})}function zB(e){return al(t=>t.normalize(e))}function MB(){return al(e=>e.trim())}function LB(){return al(e=>e.toLowerCase())}function FB(){return al(e=>e.toUpperCase())}function $B(){return al(e=>G5(e))}function VB(e,t,n){return new e({type:"array",element:t,...ze(n)})}function BB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ze(n)})}function UB(e){const t=HB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(ya(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(ya(o))}},e(n.value,n)));return t}function HB(e,t){const n=new qn({check:"custom",...ze(t)});return n._zod.check=e,n}function iE(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Jl,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function on(e,t,n={path:[],schemaPath:[]}){var h,p;var r;const o=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const u=(p=(h=e._zod).toJSONSchema)==null?void 0:p.call(h);if(u)a.schema=u;else{const x={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,x);else{const S=a.schema,k=t.processors[o.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);k(e,t,S,x)}const g=e._zod.parent;g&&(a.ref||(a.ref=g),on(g,t,x),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&vn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function oE(e,t){var a,u,d,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of e.seen.entries()){const p=(a=e.metadataRegistry.get(h[0]))==null?void 0:a.id;if(p){const x=r.get(p);if(x&&x!==h[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(p,h[0])}}const o=h=>{var k;const p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const C=(k=e.external.registry.get(h[0]))==null?void 0:k.id,E=e.external.uri??(T=>T);if(C)return{ref:E(C)};const _=h[1].defId??h[1].schema.id??`schema${e.counter++}`;return h[1].defId=_,{defId:_,ref:`${E("__shared")}#/${p}/${_}`}}if(h[1]===n)return{ref:"#"};const g=`#/${p}/`,S=h[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:g+S}},l=h=>{if(h[1].schema.$ref)return;const p=h[1],{ref:x,defId:g}=o(h);p.def={...p.schema},g&&(p.defId=g);const S=p.schema;for(const k in S)delete S[k];S.$ref=x};if(e.cycles==="throw")for(const h of e.seen.entries()){const p=h[1];if(p.cycle)throw new Error(`Cycle detected: #/${(u=p.cycle)==null?void 0:u.join("/")}/<root>
331
+
332
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of e.seen.entries()){const p=h[1];if(t===h[0]){l(h);continue}if(e.external){const g=(d=e.external.registry.get(h[0]))==null?void 0:d.id;if(t!==h[0]&&g){l(h);continue}}if((f=e.metadataRegistry.get(h[0]))==null?void 0:f.id){l(h);continue}if(p.cycle){l(h);continue}if(p.count>1&&e.reused==="ref"){l(h);continue}}}function sE(e,t){var a,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const h=e.seen.get(f);if(h.ref===null)return;const p=h.def??h.schema,x={...p},g=h.ref;if(h.ref=null,g){r(g);const k=e.seen.get(g),C=k.schema;if(C.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(C)):Object.assign(p,C),Object.assign(p,x),f._zod.parent===g)for(const _ in p)_==="$ref"||_==="allOf"||_ in x||delete p[_];if(C.$ref)for(const _ in p)_==="$ref"||_==="allOf"||_ in k.def&&JSON.stringify(p[_])===JSON.stringify(k.def[_])&&delete p[_]}const S=f._zod.parent;if(S&&S!==g){r(S);const k=e.seen.get(S);if(k!=null&&k.schema.$ref&&(p.$ref=k.schema.$ref,k.def))for(const C in p)C==="$ref"||C==="allOf"||C in k.def&&JSON.stringify(p[C])===JSON.stringify(k.def[C])&&delete p[C]}e.override({zodSchema:f,jsonSchema:p,path:h.path??[]})};for(const f of[...e.seen.entries()].reverse())r(f[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const f=(u=e.external.registry.get(t))==null?void 0:u.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(f)}Object.assign(o,n.def??n.schema);const l=((d=e.external)==null?void 0:d.defs)??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(l[h.defId]=h.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?o.$defs=l:o.definitions=l);try{const f=JSON.parse(JSON.stringify(o));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:qc(t,"input",e.processors),output:qc(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function vn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return vn(r.element,n);if(r.type==="set")return vn(r.valueType,n);if(r.type==="lazy")return vn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return vn(r.innerType,n);if(r.type==="intersection")return vn(r.left,n)||vn(r.right,n);if(r.type==="record"||r.type==="map")return vn(r.keyType,n)||vn(r.valueType,n);if(r.type==="pipe")return vn(r.in,n)||vn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(vn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(vn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(vn(o,n))return!0;return!!(r.rest&&vn(r.rest,n))}return!1}const WB=(e,t={})=>n=>{const r=iE({...n,processors:t});return on(e,r),oE(r,e),sE(r,e)},qc=(e,t,n={})=>r=>{const{libraryOptions:o,target:l}=r??{},a=iE({...o??{},target:l,io:t,processors:n});return on(e,a),oE(a,e),sE(a,e)},ZB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qB=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:l,maximum:a,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof a=="number"&&(o.maxLength=a),u&&(o.format=ZB[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const h=[...d];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},QB=(e,t,n,r)=>{const o=n,{minimum:l,maximum:a,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof l=="number"&&(o.minimum=l,typeof h=="number"&&t.target!=="draft-04"&&(h>=l?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof a=="number"&&(o.maximum=a,typeof f=="number"&&t.target!=="draft-04"&&(f<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},YB=(e,t,n,r)=>{n.not={}},KB=(e,t,n,r)=>{},GB=(e,t,n,r)=>{const o=e._zod.def,l=$C(o.entries);l.every(a=>typeof a=="number")&&(n.type="number"),l.every(a=>typeof a=="string")&&(n.type="string"),n.enum=l},XB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},JB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},e9=(e,t,n,r)=>{const o=n,l=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=on(l.element,t,{...r,path:[...r.path,"items"]})},t9=(e,t,n,r)=>{var f;const o=n,l=e._zod.def;o.type="object",o.properties={};const a=l.shape;for(const h in a)o.properties[h]=on(a[h],t,{...r,path:[...r.path,"properties",h]});const u=new Set(Object.keys(a)),d=new Set([...u].filter(h=>{const p=l.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),((f=l.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=on(l.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},n9=(e,t,n,r)=>{const o=e._zod.def,l=o.inclusive===!1,a=o.options.map((u,d)=>on(u,t,{...r,path:[...r.path,l?"oneOf":"anyOf",d]}));l?n.oneOf=a:n.anyOf=a},r9=(e,t,n,r)=>{const o=e._zod.def,l=on(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=on(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(l)?l.allOf:[l],...u(a)?a.allOf:[a]];n.allOf=d},i9=(e,t,n,r)=>{const o=e._zod.def,l=on(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},o9=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType},s9=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},l9=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},a9=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},u9=(e,t,n,r)=>{const o=e._zod.def,l=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(l,t,r);const a=t.seen.get(e);a.ref=l},c9=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,n.readOnly=!0},lE=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType};function $0(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function d9(e,t){for(var n={};e.length;){var r=e[0],o=r.code,l=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:l,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(h){return h.errors.forEach(function(p){return e.push(p)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=ag(a,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function f9(e,t){for(var n={};e.length;){var r=e[0],o=r.code,l=r.message,a=r.path.join(".");if(!n[a])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[a]={message:u.message,type:u.code}}else n[a]={message:l,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(h){return h.forEach(function(p){return e.push(p)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=ag(a,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function vg(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,l){try{return Promise.resolve($0(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(a){return l.shouldUseNativeValidation&&Zp({},l),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if((function(u){return Array.isArray(u==null?void 0:u.issues)})(a))return{values:{},errors:k0(d9(a.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw a}))}catch(a){return Promise.reject(a)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,l){try{return Promise.resolve($0(function(){return Promise.resolve((n.mode==="sync"?d6:f6)(e,r,t)).then(function(a){return l.shouldUseNativeValidation&&Zp({},l),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if((function(u){return u instanceof gg})(a))return{values:{},errors:k0(f9(a.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const h9=ce("ZodISODateTime",(e,t)=>{xV.init(e,t),Pt.init(e,t)});function p9(e){return kB(h9,e)}const m9=ce("ZodISODate",(e,t)=>{wV.init(e,t),Pt.init(e,t)});function g9(e){return SB(m9,e)}const y9=ce("ZodISOTime",(e,t)=>{bV.init(e,t),Pt.init(e,t)});function v9(e){return CB(y9,e)}const x9=ce("ZodISODuration",(e,t)=>{kV.init(e,t),Pt.init(e,t)});function w9(e){return EB(x9,e)}const b9=(e,t)=>{gg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>c6(e,n)},flatten:{value:n=>u6(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,qp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,qp,2)}},isEmpty:{get(){return e.issues.length===0}}})},gr=ce("ZodError",b9,{Parent:Error}),k9=Pd(gr),S9=Td(gr),C9=Nd(gr),E9=Rd(gr),_9=m6(gr),P9=g6(gr),T9=y6(gr),N9=v6(gr),R9=x6(gr),j9=w6(gr),I9=b6(gr),A9=k6(gr),$t=ce("ZodType",(e,t)=>(Ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:qc(e,"input"),output:qc(e,"output")}}),e.toJSONSchema=WB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ao(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>uo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>k9(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>C9(e,n,r),e.parseAsync=async(n,r)=>S9(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>E9(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>_9(e,n,r),e.decode=(n,r)=>P9(e,n,r),e.encodeAsync=async(n,r)=>T9(e,n,r),e.decodeAsync=async(n,r)=>N9(e,n,r),e.safeEncode=(n,r)=>R9(e,n,r),e.safeDecode=(n,r)=>j9(e,n,r),e.safeEncodeAsync=async(n,r)=>I9(e,n,r),e.safeDecodeAsync=async(n,r)=>A9(e,n,r),e.refine=(n,r)=>e.check(_U(n,r)),e.superRefine=n=>e.check(PU(n)),e.overwrite=n=>e.check(al(n)),e.optional=()=>H0(e),e.exactOptional=()=>hU(e),e.nullable=()=>W0(e),e.nullish=()=>H0(W0(e)),e.nonoptional=n=>xU(e,n),e.array=()=>rU(e),e.or=n=>sU([e,n]),e.and=n=>aU(e,n),e.transform=n=>Z0(e,dU(n)),e.default=n=>gU(e,n),e.prefault=n=>vU(e,n),e.catch=n=>bU(e,n),e.pipe=n=>Z0(e,n),e.readonly=()=>CU(e),e.describe=n=>{const r=e.clone();return Jl.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Jl.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Jl.get(e);const r=e.clone();return Jl.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),aE=ce("_ZodString",(e,t)=>{yg.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>qB(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(RB(...r)),e.includes=(...r)=>e.check(AB(...r)),e.startsWith=(...r)=>e.check(OB(...r)),e.endsWith=(...r)=>e.check(DB(...r)),e.min=(...r)=>e.check(Zc(...r)),e.max=(...r)=>e.check(nE(...r)),e.length=(...r)=>e.check(rE(...r)),e.nonempty=(...r)=>e.check(Zc(1,...r)),e.lowercase=r=>e.check(jB(r)),e.uppercase=r=>e.check(IB(r)),e.trim=()=>e.check(MB()),e.normalize=(...r)=>e.check(zB(...r)),e.toLowerCase=()=>e.check(LB()),e.toUpperCase=()=>e.check(FB()),e.slugify=()=>e.check($B())}),O9=ce("ZodString",(e,t)=>{yg.init(e,t),aE.init(e,t),e.email=n=>e.check(tB(D9,n)),e.url=n=>e.check(sB(z9,n)),e.jwt=n=>e.check(bB(G9,n)),e.emoji=n=>e.check(lB(M9,n)),e.guid=n=>e.check(z0(V0,n)),e.uuid=n=>e.check(nB(dc,n)),e.uuidv4=n=>e.check(rB(dc,n)),e.uuidv6=n=>e.check(iB(dc,n)),e.uuidv7=n=>e.check(oB(dc,n)),e.nanoid=n=>e.check(aB(L9,n)),e.guid=n=>e.check(z0(V0,n)),e.cuid=n=>e.check(uB(F9,n)),e.cuid2=n=>e.check(cB($9,n)),e.ulid=n=>e.check(dB(V9,n)),e.base64=n=>e.check(vB(Q9,n)),e.base64url=n=>e.check(xB(Y9,n)),e.xid=n=>e.check(fB(B9,n)),e.ksuid=n=>e.check(hB(U9,n)),e.ipv4=n=>e.check(pB(H9,n)),e.ipv6=n=>e.check(mB(W9,n)),e.cidrv4=n=>e.check(gB(Z9,n)),e.cidrv6=n=>e.check(yB(q9,n)),e.e164=n=>e.check(wB(K9,n)),e.datetime=n=>e.check(p9(n)),e.date=n=>e.check(g9(n)),e.time=n=>e.check(v9(n)),e.duration=n=>e.check(w9(n))});function Cn(e){return eB(O9,e)}const Pt=ce("ZodStringFormat",(e,t)=>{bt.init(e,t),aE.init(e,t)}),D9=ce("ZodEmail",(e,t)=>{cV.init(e,t),Pt.init(e,t)}),V0=ce("ZodGUID",(e,t)=>{aV.init(e,t),Pt.init(e,t)}),dc=ce("ZodUUID",(e,t)=>{uV.init(e,t),Pt.init(e,t)}),z9=ce("ZodURL",(e,t)=>{dV.init(e,t),Pt.init(e,t)}),M9=ce("ZodEmoji",(e,t)=>{fV.init(e,t),Pt.init(e,t)}),L9=ce("ZodNanoID",(e,t)=>{hV.init(e,t),Pt.init(e,t)}),F9=ce("ZodCUID",(e,t)=>{pV.init(e,t),Pt.init(e,t)}),$9=ce("ZodCUID2",(e,t)=>{mV.init(e,t),Pt.init(e,t)}),V9=ce("ZodULID",(e,t)=>{gV.init(e,t),Pt.init(e,t)}),B9=ce("ZodXID",(e,t)=>{yV.init(e,t),Pt.init(e,t)}),U9=ce("ZodKSUID",(e,t)=>{vV.init(e,t),Pt.init(e,t)}),H9=ce("ZodIPv4",(e,t)=>{SV.init(e,t),Pt.init(e,t)}),W9=ce("ZodIPv6",(e,t)=>{CV.init(e,t),Pt.init(e,t)}),Z9=ce("ZodCIDRv4",(e,t)=>{EV.init(e,t),Pt.init(e,t)}),q9=ce("ZodCIDRv6",(e,t)=>{_V.init(e,t),Pt.init(e,t)}),Q9=ce("ZodBase64",(e,t)=>{PV.init(e,t),Pt.init(e,t)}),Y9=ce("ZodBase64URL",(e,t)=>{NV.init(e,t),Pt.init(e,t)}),K9=ce("ZodE164",(e,t)=>{RV.init(e,t),Pt.init(e,t)}),G9=ce("ZodJWT",(e,t)=>{IV.init(e,t),Pt.init(e,t)}),uE=ce("ZodNumber",(e,t)=>{XC.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>QB(e,r,o),e.gt=(r,o)=>e.check(L0(r,o)),e.gte=(r,o)=>e.check(Jh(r,o)),e.min=(r,o)=>e.check(Jh(r,o)),e.lt=(r,o)=>e.check(M0(r,o)),e.lte=(r,o)=>e.check(Xh(r,o)),e.max=(r,o)=>e.check(Xh(r,o)),e.int=r=>e.check(B0(r)),e.safe=r=>e.check(B0(r)),e.positive=r=>e.check(L0(0,r)),e.nonnegative=r=>e.check(Jh(0,r)),e.negative=r=>e.check(M0(0,r)),e.nonpositive=r=>e.check(Xh(0,r)),e.multipleOf=(r,o)=>e.check(F0(r,o)),e.step=(r,o)=>e.check(F0(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function xg(e){return _B(uE,e)}const X9=ce("ZodNumberFormat",(e,t)=>{AV.init(e,t),uE.init(e,t)});function B0(e){return PB(X9,e)}const J9=ce("ZodUnknown",(e,t)=>{OV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>KB()});function U0(){return TB(J9)}const eU=ce("ZodNever",(e,t)=>{DV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>YB(e,n,r)});function tU(e){return NB(eU,e)}const nU=ce("ZodArray",(e,t)=>{zV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>e9(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Zc(n,r)),e.nonempty=n=>e.check(Zc(1,n)),e.max=(n,r)=>e.check(nE(n,r)),e.length=(n,r)=>e.check(rE(n,r)),e.unwrap=()=>e.element});function rU(e,t){return VB(nU,e,t)}const iU=ce("ZodObject",(e,t)=>{LV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>t9(e,n,r,o),lt(e,"shape",()=>t.shape),e.keyof=()=>uU(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:U0()}),e.loose=()=>e.clone({...e._zod.def,catchall:U0()}),e.strict=()=>e.clone({...e._zod.def,catchall:tU()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>i6(e,n),e.safeExtend=n=>o6(e,n),e.merge=n=>s6(e,n),e.pick=n=>n6(e,n),e.omit=n=>r6(e,n),e.partial=(...n)=>l6(cE,e,n[0]),e.required=(...n)=>a6(dE,e,n[0])});function wg(e,t){const n={type:"object",shape:e??{},...ze(t)};return new iU(n)}const oU=ce("ZodUnion",(e,t)=>{FV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>n9(e,n,r,o),e.options=t.options});function sU(e,t){return new oU({type:"union",options:e,...ze(t)})}const lU=ce("ZodIntersection",(e,t)=>{$V.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>r9(e,n,r,o)});function aU(e,t){return new lU({type:"intersection",left:e,right:t})}const Yp=ce("ZodEnum",(e,t)=>{VV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>GB(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const l={};for(const a of r)if(n.has(a))l[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Yp({...t,checks:[],...ze(o),entries:l})},e.exclude=(r,o)=>{const l={...t.entries};for(const a of r)if(n.has(a))delete l[a];else throw new Error(`Key ${a} not found in enum`);return new Yp({...t,checks:[],...ze(o),entries:l})}});function uU(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Yp({type:"enum",entries:n,...ze(t)})}const cU=ce("ZodTransform",(e,t)=>{BV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>JB(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new LC(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(ya(l,n.value,t));else{const a=l;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(ya(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(l=>(n.value=l,n)):(n.value=o,n)}});function dU(e){return new cU({type:"transform",transform:e})}const cE=ce("ZodOptional",(e,t)=>{tE.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lE(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function H0(e){return new cE({type:"optional",innerType:e})}const fU=ce("ZodExactOptional",(e,t)=>{UV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lE(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function hU(e){return new fU({type:"optional",innerType:e})}const pU=ce("ZodNullable",(e,t)=>{HV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>i9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function W0(e){return new pU({type:"nullable",innerType:e})}const mU=ce("ZodDefault",(e,t)=>{WV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>s9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gU(e,t){return new mU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():BC(t)}})}const yU=ce("ZodPrefault",(e,t)=>{ZV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>l9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vU(e,t){return new yU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():BC(t)}})}const dE=ce("ZodNonOptional",(e,t)=>{qV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>o9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function xU(e,t){return new dE({type:"nonoptional",innerType:e,...ze(t)})}const wU=ce("ZodCatch",(e,t)=>{QV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>a9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bU(e,t){return new wU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const kU=ce("ZodPipe",(e,t)=>{YV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>u9(e,n,r,o),e.in=t.in,e.out=t.out});function Z0(e,t){return new kU({type:"pipe",in:e,out:t})}const SU=ce("ZodReadonly",(e,t)=>{KV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>c9(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function CU(e){return new SU({type:"readonly",innerType:e})}const EU=ce("ZodCustom",(e,t)=>{GV.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>XB(e,n)});function _U(e,t={}){return BB(EU,e,t)}function PU(e){return UB(e)}const TU=wg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:xg().min(0).max(5),tags:Cn(),epicId:Cn().nullable()});function NU({task:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const l=Mb(),[a,u]=b.useState(!1),d=dg({resolver:vg(TU),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}:{title:"",description:"",status:"todo",priority:2,tags:"",epicId:null},resetOptions:{keepDirtyValues:!1}}),{reset:f,formState:{isSubmitting:h}}=d;return b.useEffect(()=>{u(!1)},[t,n]),{form:d,isSubmitting:h,isDeleting:a,setIsDeleting:u,handleSave:async C=>{if(e)try{const E=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:C.title.trim(),description:C.description.trim()||null,status:C.status,priority:C.priority,tags:C.tags.trim()||null,epicId:C.epicId||null})});if(!E.ok){const _=await E.json();throw new Error(_.error||"Failed to update task")}return Ct.success("Task updated"),o(),l.invalidateQueries({queryKey:["history"]}),!0}catch(E){return Ct.error(E instanceof Error?E.message:"Failed to update task"),!1}},handleDelete:async()=>{if(e)try{const C=await fetch(`/api/tasks/${e.id}`,{method:"DELETE"});if(!C.ok){const E=await C.json();throw new Error(E.error||"Failed to delete task")}Ct.success("Task deleted"),r(),o(),l.invalidateQueries({queryKey:["history"]})}catch(C){Ct.error(C instanceof Error?C.message:"Failed to delete task")}},handleCancel:()=>{e&&f({title:e.title,description:e.description||"",status:e.status,priority:e.priority,tags:e.tags||"",epicId:e.epicId}),u(!1)},handleStatusChange:async C=>{if(!e)return;const E=d.getValues("status");d.setValue("status",C);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:C})});if(!_.ok){const T=await _.json();throw d.setValue("status",E),new Error(T.error||"Failed to update status")}o(),l.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update status")}},handlePriorityChange:async C=>{if(!e)return;const E=d.getValues("priority");d.setValue("priority",C);try{const _=await fetch(`/api/tasks/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:C})});if(!_.ok){const T=await _.json();throw d.setValue("priority",E),new Error(T.error||"Failed to update priority")}o(),l.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update priority")}}}}function bg({task:e,epics:t,allTasks:n,open:r,onClose:o,onUpdate:l,onTaskClick:a,onEpicClick:u}){const[d,f]=b.useState(!1),{form:h,isDeleting:p,setIsDeleting:x,handleSave:g,handleDelete:S,handleCancel:k,handleStatusChange:C,handlePriorityChange:E}=NU({task:e,open:r,isEditing:d,onClose:o,onUpdate:l}),_=b.useCallback(ne=>t.find(W=>W.id===ne),[t]),T=b.useCallback(ne=>n.find(W=>W.id===ne),[n]),I=b.useCallback(ne=>ne?n.find(W=>W.id===ne):null,[n]),O=()=>{f(!1),o()};if(!e)return null;const R=!!e.parentTaskId,V=n.filter(ne=>ne.parentTaskId===e.id),oe=(()=>{const ne=[],W=e.epicId?_(e.epicId):null,B=I(e.parentTaskId);return W&&ne.push({id:W.id,title:W.title,type:"epic",onClick:u?()=>u(W):void 0}),B&&ne.push({id:B.id,title:B.title,type:"task",onClick:a?()=>a(B):void 0}),ne.push({id:e.id,title:e.title,type:R?"subtask":"task"}),ne})(),A=h.watch("status"),K=h.watch("priority"),M=()=>{k(),f(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(S5,{task:e,subtasks:V,breadcrumbItems:oe,status:A,priority:K,open:r&&!d,onClose:O,onEdit:()=>f(!0),onStatusChange:C,onPriorityChange:E,onTaskClick:a,onEpicClick:u,getEpicById:_,getTaskById:T}),y.jsx(T5,{form:h,epics:t,breadcrumbItems:oe,open:r&&d,isDeleting:p,onClose:O,onSubmit:g,onCancel:M,onDelete:()=>x(!0),onDeleteConfirm:S,onDeleteCancel:()=>x(!1)})]})}function RU({status:e,priority:t,tasks:n,createdAt:r,updatedAt:o,onStatusChange:l,onPriorityChange:a,onTaskClick:u}){const d=n.filter(h=>!h.parentTaskId),f=d.filter(h=>Bp(h.status)).length;return y.jsx("div",{className:"p-4 bg-muted/30 rounded-b-md",children:y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx(fa,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(pd,{value:e,onChange:l,statuses:Sm,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(md,{value:t,onChange:a,triggerClassName:"w-auto h-8 text-right"})]})]})]}),d.length>0&&y.jsxs("div",{children:[y.jsx(fa,{count:{current:f,total:d.length},children:"Tasks"}),y.jsx("div",{className:"space-y-1",children:d.map(h=>{const p=Bp(h.status);return y.jsxs(gt,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:()=>u==null?void 0:u(h),children:[y.jsx(r1,{status:h.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:h.id}),y.jsx("span",{className:We("text-sm flex-1 text-left truncate",p&&"line-through text-muted-foreground"),children:h.title})]},h.id)})})]}),y.jsx(n1,{createdAt:r,updatedAt:o})]})})}function jU({epic:e,tasks:t,breadcrumbItems:n,status:r,priority:o,open:l,onClose:a,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h}){return y.jsx(SC,{open:l,onClose:a,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(RU,{status:r,priority:o,tasks:t,createdAt:e.createdAt,updatedAt:e.updatedAt,onStatusChange:d,onPriorityChange:f,onTaskClick:h})})}function IU({form:e,breadcrumbItems:t,open:n,isDeleting:r,onClose:o,onSubmit:l,onCancel:a,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f}){const{watch:h,setValue:p,handleSubmit:x,formState:{isSubmitting:g,errors:S}}=e,k=h("title"),C=h("description"),E=h("status"),_=h("priority"),T=async I=>{await l(I)&&a()};return y.jsx(CC,{open:n,onClose:o,breadcrumbItems:t,formId:"epic-edit-form",isSubmitting:g,isDeleting:r,entityName:"Epic",onCancel:a,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f,children:y.jsxs("form",{id:"epic-edit-form",onSubmit:x(T),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(wi,{value:k,onChange:I=>p("title",I.target.value),placeholder:"Epic title",className:"text-lg font-semibold"}),S.title&&y.jsx("p",{className:"text-xs text-destructive",children:S.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(za,{value:C,onChange:I=>p("description",I.target.value),placeholder:"Epic description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(pd,{value:E,onChange:I=>p("status",I),statuses:Sm})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(md,{value:_,onChange:I=>p("priority",I)})]})]})]})})}const AU=wg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:xg().min(0).max(5)});function OU({epic:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const[l,a]=b.useState(!1),u=dg({resolver:vg(AU),values:e?{title:e.title,description:e.description||"",status:e.status,priority:e.priority}:{title:"",description:"",status:"todo",priority:2},resetOptions:{keepDirtyValues:!1}}),{reset:d,formState:{isSubmitting:f}}=u;return b.useEffect(()=>{a(!1)},[t,n]),{form:u,isSubmitting:f,isDeleting:l,setIsDeleting:a,handleSave:async k=>{if(e)try{const C=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:k.title.trim(),description:k.description.trim()||null,status:k.status,priority:k.priority})});if(!C.ok){const E=await C.json();throw new Error(E.error||"Failed to update epic")}return Ct.success("Epic updated"),o(),!0}catch(C){return Ct.error(C instanceof Error?C.message:"Failed to update epic"),!1}},handleDelete:async()=>{if(e)try{const k=await fetch(`/api/epics/${e.id}`,{method:"DELETE"});if(!k.ok){const C=await k.json();throw new Error(C.error||"Failed to delete epic")}Ct.success("Epic deleted"),r(),o()}catch(k){Ct.error(k instanceof Error?k.message:"Failed to delete epic")}},handleCancel:()=>{e&&d({title:e.title,description:e.description||"",status:e.status,priority:e.priority}),a(!1)},handleStatusChange:async k=>{if(!e)return;const C=u.getValues("status");u.setValue("status",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:k})});if(!E.ok){const _=await E.json();throw u.setValue("status",C),new Error(_.error||"Failed to update status")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update status")}},handlePriorityChange:async k=>{if(!e)return;const C=u.getValues("priority");u.setValue("priority",k);try{const E=await fetch(`/api/epics/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:k})});if(!E.ok){const _=await E.json();throw u.setValue("priority",C),new Error(_.error||"Failed to update priority")}o()}catch(E){Ct.error(E instanceof Error?E.message:"Failed to update priority")}}}}function kg({epic:e,tasks:t=[],open:n,onClose:r,onUpdate:o,onTaskClick:l}){const[a,u]=b.useState(!1),{form:d,isDeleting:f,setIsDeleting:h,handleSave:p,handleDelete:x,handleCancel:g,handleStatusChange:S,handlePriorityChange:k}=OU({epic:e,open:n,isEditing:a,onClose:r,onUpdate:o}),C=()=>{u(!1),r()};if(!e)return null;const E=[{id:e.id,title:e.title,type:"epic"}],_=d.watch("status"),T=d.watch("priority"),I=()=>{g(),u(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(jU,{epic:e,tasks:t,breadcrumbItems:E,status:_,priority:T,open:n&&!a,onClose:C,onEdit:()=>u(!0),onStatusChange:S,onPriorityChange:k,onTaskClick:l}),y.jsx(IU,{form:d,breadcrumbItems:E,open:n&&a,isDeleting:f,onClose:C,onSubmit:p,onCancel:I,onDelete:()=>h(!0),onDeleteConfirm:x,onDeleteCancel:()=>h(!1)})]})}function DU({form:e,type:t,epics:n,parentTasks:r}){const{register:o,control:l,formState:{errors:a}}=e,u=t==="epic"?Sm:ad;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Title ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(wi,{...o("title"),placeholder:`${t.charAt(0).toUpperCase()+t.slice(1)} title`}),a.title&&y.jsx("p",{className:"text-sm text-destructive",children:a.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(za,{...o("description"),placeholder:"Optional description",rows:3})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Status"}),y.jsx(Vc,{control:l,name:"status",render:({field:d})=>y.jsxs(Bn,{value:d.value,onValueChange:d.onChange,children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsx(Wn,{children:u.map(f=>y.jsx(Et,{value:f,children:Qs[f]},f))})]})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Vc,{control:l,name:"priority",render:({field:d})=>y.jsxs(Bn,{value:String(d.value),onValueChange:f=>d.onChange(parseInt(f,10)),children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsx(Wn,{children:Object.entries(ud).map(([f,h])=>y.jsxs(Et,{value:f,children:["P",f," - ",h]},f))})]})})]})]}),t==="task"&&y.jsx(zU,{form:e,epics:n}),t==="subtask"&&y.jsx(MU,{form:e,parentTasks:r})]})}function zU({form:e,epics:t}){const{register:n,control:r}=e;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(wi,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsx(Vc,{control:r,name:"epicId",render:({field:o})=>y.jsxs(Bn,{value:o.value||"none",onValueChange:l=>o.onChange(l==="none"?null:l),children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"none",children:"No Epic"}),t.map(l=>y.jsxs(Et,{value:l.id,children:[l.id,": ",l.title]},l.id))]})]})})]})]})}function MU({form:e,parentTasks:t}){const{register:n,control:r,formState:{errors:o}}=e;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(wi,{...n("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Wt,{children:["Parent Task ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Vc,{control:r,name:"parentTaskId",render:({field:l})=>y.jsxs(Bn,{value:l.value||"none",onValueChange:a=>l.onChange(a==="none"?"":a),children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"none",children:"Select a task..."}),t.map(a=>y.jsxs(Et,{value:a.id,children:[a.id,": ",a.title]},a.id))]})]})}),o.parentTaskId&&y.jsx("p",{className:"text-sm text-destructive",children:o.parentTaskId.message})]})]})}const Sg=wg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:xg().min(0).max(5)}),LU=Sg,FU=Sg.extend({tags:Cn(),epicId:Cn().nullable()}),$U=Sg.extend({tags:Cn(),parentTaskId:Cn().min(1,"Parent task is required")}),VU=e=>{switch(e){case"epic":return LU;case"subtask":return $U;default:return FU}},BU=(e,t)=>{const n={title:"",description:"",status:t||"todo",priority:2};return e==="epic"?n:e==="subtask"?{...n,tags:"",parentTaskId:""}:{...n,tags:"",epicId:null}};function UU({type:e,defaultStatus:t,onClose:n,onCreated:r}){const o=dg({resolver:vg(VU(e)),defaultValues:BU(e,t)}),{formState:{isSubmitting:l}}=o,a=async h=>{const p=await fetch("/api/epics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create epic")}return p.json()},u=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:h.epicId||null,parentTaskId:null})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create task")}return p.json()},d=async h=>{const p=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:h.title.trim(),description:h.description.trim()||null,status:h.status,priority:h.priority,tags:h.tags.trim()||null,epicId:null,parentTaskId:h.parentTaskId})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create subtask")}return p.json()},f=o.handleSubmit(async h=>{try{let p;switch(e){case"epic":p=await a(h),Ct.success(`Epic ${p.id} created`);break;case"subtask":p=await d(h),Ct.success(`Subtask ${p.id} created`);break;default:p=await u(h),Ct.success(`Task ${p.id} created`)}n(),r()}catch(p){Ct.error(p instanceof Error?p.message:"Failed to create")}},h=>{const p=Object.values(h)[0];p!=null&&p.message&&Ct.error(p.message)});return{form:o,isSubmitting:l,handleSubmit:f}}const HU={epic:Na,task:Ra,subtask:am};function WU({type:e,defaultStatus:t,onClose:n,onCreated:r,epics:o,parentTasks:l}){const{form:a,isSubmitting:u,handleSubmit:d}=UU({type:e,defaultStatus:t,onClose:n,onCreated:r});return y.jsxs("form",{onSubmit:d,children:[y.jsx("div",{className:"px-4 mt-8",children:y.jsx(DU,{form:a,type:e,epics:o,parentTasks:l})}),y.jsxs("div",{className:"flex justify-end gap-2 p-4 border-t mt-4",children:[y.jsx(gt,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),y.jsx(gt,{type:"submit",disabled:u,children:u?"Creating...":"Create"})]})]})}function ZU({open:e,onClose:t,onCreated:n,epics:r,tasks:o,defaultStatus:l,defaultType:a}){const[u,d]=b.useState("task");b.useEffect(()=>{e&&d(a||"task")},[e,a]);const f=o.filter(p=>!p.parentTaskId),h=HU[u];return y.jsx(Am,{open:e,onOpenChange:p=>!p&&t(),children:y.jsxs(Om,{className:"p-0 max-h-[90vh] overflow-hidden flex flex-col",children:[y.jsx(Cz,{className:"shrink-0",children:y.jsxs(Ez,{className:"flex items-center gap-2 border-b p-4",children:[y.jsx(h,{className:"h-5 w-5"}),"Create New ",u.charAt(0).toUpperCase()+u.slice(1)]})}),y.jsxs(Lm,{className:"flex-1 overflow-auto",children:[y.jsxs("div",{className:"space-y-2 px-4 pt-2",children:[y.jsx(Wt,{children:"Type"}),y.jsxs(Bn,{value:u,onValueChange:p=>d(p),children:[y.jsx(Hn,{children:y.jsx(Un,{})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"epic",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Na,{className:"h-4 w-4"}),"Epic"]})}),y.jsx(Et,{value:"task",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Ra,{className:"h-4 w-4"}),"Task"]})}),y.jsx(Et,{value:"subtask",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(am,{className:"h-4 w-4"}),"Subtask"]})})]})]})]}),y.jsx(WU,{type:u,defaultStatus:l,onClose:t,onCreated:n,epics:r,parentTasks:f},u)]})]})})}function qU(){const{tasks:e,epics:t,isLoading:n,error:r,refetch:o}=Kc(),{selectedTaskId:l,selectedEpicId:a,showCreateModal:u,createModalDefaults:d,openTaskDetail:f,openEpicDetail:h,openCreateModal:p,closeTaskDetail:x,closeEpicDetail:g,closeCreateModal:S}=Ws();DA(o);const k=l&&e.find(E=>E.id===l)||null,C=a&&t.find(E=>E.id===a)||null;return n&&e.length===0?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",r instanceof Error?r.message:"Unknown error"]})}):y.jsxs(y.Fragment,{children:[y.jsx("main",{className:"flex-1 p-4 overflow-x-auto",children:y.jsx(eO,{tasks:e,epics:t,onAddClick:E=>p({status:E}),onTaskClick:E=>f(E.id),onEpicClick:E=>h(E.id)})}),y.jsx(bg,{task:k,epics:t,allTasks:e,open:k!==null,onClose:x,onUpdate:o,onTaskClick:E=>f(E.id),onEpicClick:E=>{x(),h(E.id)}}),y.jsx(kg,{epic:C,tasks:C?e.filter(E=>E.epicId===C.id):[],open:C!==null,onClose:g,onUpdate:o,onTaskClick:E=>{g();const _=e.find(T=>T.id===E.id);_&&f(_.id)}}),y.jsx(ZU,{open:u,onClose:S,onCreated:o,epics:t,tasks:e,defaultStatus:d.status||"todo"})]})}async function QU(e){var r,o,l;const t=new URLSearchParams;(r=e.types)!=null&&r.length&&t.set("type",e.types.join(",")),(o=e.statuses)!=null&&o.length&&t.set("status",e.statuses.join(",")),(l=e.priorities)!=null&&l.length&&t.set("priority",e.priorities.join(",")),e.sort&&t.set("sort",e.sort),e.limit&&t.set("limit",e.limit.toString()),e.page&&t.set("page",e.page.toString()),e.since&&t.set("since",e.since),e.until&&t.set("until",e.until);const n=await fetch(`/api/list?${t.toString()}`);if(!n.ok){const a=await n.json();throw new Error(a.error||"Failed to fetch list")}return n.json()}function YU(e){return Ta({queryKey:["list",e],queryFn:()=>QU(e)})}const KU=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"}],GU=[{value:"created:desc",label:"Newest first"},{value:"created:asc",label:"Oldest first"},{value:"updated:desc",label:"Recently updated"},{value:"priority:asc",label:"Priority (high to low)"},{value:"priority:desc",label:"Priority (low to high)"},{value:"title:asc",label:"Title (A-Z)"},{value:"title:desc",label:"Title (Z-A)"}],XU=[20,50,100];function JU(){var V,Q,oe,A,K;const{tasks:e,epics:t,refetch:n}=Kc(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:l,openEpicDetail:a,closeTaskDetail:u,closeEpicDetail:d}=Ws(),[f,h]=b.useState({limit:20,page:1,sort:"created:desc"}),[p,x]=b.useState(""),{data:g,isLoading:S,error:k}=YU(f),C=r&&e.find(M=>M.id===r)||null,E=o&&t.find(M=>M.id===o)||null,_=M=>{M.type==="epic"?a(M.id):l(M.id)},T=M=>{const ne=f.types||[],W=ne.includes(M)?ne.filter(B=>B!==M):[...ne,M];h({...f,types:W.length?W:void 0,page:1})},I=()=>{h({limit:f.limit,page:1,sort:f.sort}),x("")},O=!!((V=f.types)!=null&&V.length||(Q=f.statuses)!=null&&Q.length||(oe=f.priorities)!=null&&oe.length),R=g?Math.ceil(g.total/(f.limit||20)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs("div",{className:"relative w-64",children:[y.jsx(kR,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(wi,{placeholder:"Search...",value:p,onChange:M=>x(M.target.value),className:"pl-9"})]}),y.jsx("div",{className:"flex gap-1",children:KU.map(({value:M,label:ne})=>{var W;return y.jsx(gt,{variant:(W=f.types)!=null&&W.includes(M)?"default":"outline",size:"sm",onClick:()=>T(M),children:ne},M)})}),y.jsxs(Bn,{value:((A=f.statuses)==null?void 0:A.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,statuses:void 0,page:1}:{...f,statuses:M.split(","),page:1})},children:[y.jsx(Hn,{className:"w-[140px]",children:y.jsx(Un,{placeholder:"Status"})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"all",children:"All Statuses"}),ad.map(M=>y.jsx(Et,{value:M,children:Qs[M]},M))]})]}),y.jsxs(Bn,{value:((K=f.priorities)==null?void 0:K.join(","))||"all",onValueChange:M=>{h(M==="all"?{...f,priorities:void 0,page:1}:{...f,priorities:M.split(",").map(Number),page:1})},children:[y.jsx(Hn,{className:"w-[140px]",children:y.jsx(Un,{placeholder:"Priority"})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"all",children:"All Priorities"}),Object.entries(ud).map(([M,ne])=>y.jsxs(Et,{value:M,children:["P",M," - ",ne]},M))]})]}),y.jsxs(Bn,{value:f.sort||"created:desc",onValueChange:M=>h({...f,sort:M,page:1}),children:[y.jsx(Hn,{className:"w-[180px]",children:y.jsx(Un,{})}),y.jsx(Wn,{children:GU.map(({value:M,label:ne})=>y.jsx(Et,{value:M,children:ne},M))})]}),O&&y.jsxs(gt,{variant:"ghost",size:"sm",onClick:I,children:[y.jsx(Wb,{className:"h-4 w-4 mr-1"}),"Clear"]})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:S?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):k?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",k instanceof Error?k.message:"Unknown error"]})}):g!=null&&g.items.length?y.jsxs("table",{className:"w-full",children:[y.jsx("thead",{className:"bg-muted/50 sticky top-0",children:y.jsxs("tr",{className:"text-left text-sm",children:[y.jsx("th",{className:"px-4 py-3 font-medium",children:"ID"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Type"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Title"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Status"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Priority"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Created"})]})}),y.jsx("tbody",{children:g.items.filter(M=>p?M.title.toLowerCase().includes(p.toLowerCase())||M.id.toLowerCase().includes(p.toLowerCase()):!0).map(M=>{var ne,W,B,q;return y.jsxs("tr",{className:"border-t hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>_(M),children:[y.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:M.id}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(no,{variant:"outline",className:We(M.type==="epic"&&"border-purple-500 text-purple-500",M.type==="task"&&"border-blue-500 text-blue-500",M.type==="subtask"&&"border-gray-500 text-gray-500"),children:M.type})}),y.jsx("td",{className:"px-4 py-3 max-w-md truncate",children:M.title}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(no,{style:{backgroundColor:((ne=nw[M.status])==null?void 0:ne.bg)||"#6b7280",color:((W=nw[M.status])==null?void 0:W.text)||"#ffffff"},children:Qs[M.status]||M.status})}),y.jsx("td",{className:"px-4 py-3",children:y.jsxs(no,{variant:"outline",style:{borderColor:((B=Rc[M.priority])==null?void 0:B.bg)||"#6b7280",color:((q=Rc[M.priority])==null?void 0:q.bg)||"#6b7280"},children:["P",M.priority]})}),y.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:uO(M.createdAt)})]},M.id)})})]}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No items found"})})}),g&&g.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[y.jsxs("span",{children:["Showing ",((f.page||1)-1)*(f.limit||20)+1,"-",Math.min((f.page||1)*(f.limit||20),g.total)," of"," ",g.total]}),y.jsxs(Bn,{value:(f.limit||20).toString(),onValueChange:M=>h({...f,limit:parseInt(M,10),page:1}),children:[y.jsx(Hn,{className:"w-[80px] h-8",children:y.jsx(Un,{})}),y.jsx(Wn,{children:XU.map(M=>y.jsx(Et,{value:M.toString(),children:M},M))})]}),y.jsx("span",{children:"per page"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(gt,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(Ub,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",R]}),y.jsxs(gt,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=R,children:["Next",y.jsx(Gc,{className:"h-4 w-4"})]})]})]})]}),y.jsx(bg,{task:C,epics:t,allTasks:e,open:C!==null,onClose:u,onUpdate:n,onTaskClick:M=>l(M.id),onEpicClick:M=>{u(),a(M.id)}}),y.jsx(kg,{epic:E,tasks:E?e.filter(M=>M.epicId===E.id):[],open:E!==null,onClose:d,onUpdate:n,onTaskClick:M=>{d();const ne=e.find(W=>W.id===M.id);ne&&l(ne.id)}})]})}const e8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"},{value:"comment",label:"Comment"},{value:"dependency",label:"Dependency"}],t8=[{value:"create",label:"Created",icon:Xc},{value:"update",label:"Updated",icon:um},{value:"delete",label:"Deleted",icon:cm}];function n8({event:e,onEntityClick:t}){var o,l,a,u,d;const n=((o=e.snapshot)==null?void 0:o.title)||((a=(l=e.changes)==null?void 0:l.title)==null?void 0:a.to)||((d=(u=e.changes)==null?void 0:u.title)==null?void 0:d.from)||null,r=e.action!=="delete"&&["epic","task","subtask"].includes(e.entityType);return y.jsxs("div",{className:"flex gap-3 p-4 border-b last:border-b-0 hover:bg-muted/30 transition-colors",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(o1,{action:e.action})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("button",{className:We("font-mono text-sm",r&&"hover:underline cursor-pointer",e.action==="delete"&&"line-through text-muted-foreground"),onClick:()=>r&&t(e.entityType,e.entityId),disabled:!r,children:e.entityId}),y.jsxs("span",{className:We("text-sm font-medium",s1(e.action)),children:[e.action,"d"]}),y.jsx(no,{variant:"outline",className:"text-xs",children:e.entityType})]}),n&&y.jsx("p",{className:We("text-sm mb-2",e.action==="delete"&&"line-through text-muted-foreground"),children:n}),e.changes&&Object.keys(e.changes).length>0&&y.jsx("div",{className:"text-xs space-y-1",children:Object.entries(e.changes).map(([f,h])=>{const{from:p,to:x}=h;return y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[f,":"]}),y.jsx("span",{className:"line-through",children:String(p)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(x)})]},f)})})]}),y.jsx("div",{className:"text-xs text-muted-foreground whitespace-nowrap",children:_m(e.timestamp)})]})}function r8(){var _,T,I,O;const{tasks:e,epics:t,refetch:n}=Kc(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:l,openEpicDetail:a,closeTaskDetail:u,closeEpicDetail:d}=Ws(),[f,h]=b.useState({limit:50,page:1}),{data:p,isLoading:x,error:g}=EC(f),S=r&&e.find(R=>R.id===r)||null,k=o&&t.find(R=>R.id===o)||null,C=(R,V)=>{R==="epic"?a(V):(R==="task"||R==="subtask")&&l(V)},E=p?Math.ceil(p.total/(f.limit||50)):0;return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex-1 p-4 flex flex-col gap-4 overflow-hidden",children:[y.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[y.jsxs(Bn,{value:((_=f.types)==null?void 0:_.join(","))||"all",onValueChange:R=>{h(R==="all"?{...f,types:void 0,page:1}:{...f,types:R.split(","),page:1})},children:[y.jsx(Hn,{className:"w-[140px]",children:y.jsx(Un,{placeholder:"Type"})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"all",children:"All Types"}),e8.map(({value:R,label:V})=>y.jsx(Et,{value:R,children:V},R))]})]}),y.jsxs(Bn,{value:((T=f.actions)==null?void 0:T.join(","))||"all",onValueChange:R=>{h(R==="all"?{...f,actions:void 0,page:1}:{...f,actions:R.split(","),page:1})},children:[y.jsx(Hn,{className:"w-[140px]",children:y.jsx(Un,{placeholder:"Action"})}),y.jsxs(Wn,{children:[y.jsx(Et,{value:"all",children:"All Actions"}),t8.map(({value:R,label:V})=>y.jsx(Et,{value:R,children:V},R))]})]}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((I=f.since)==null?void 0:I.split("T")[0])||"",onChange:R=>h({...f,since:R.target.value?`${R.target.value}T00:00:00Z`:void 0,page:1}),placeholder:"Since"}),y.jsx("input",{type:"date",className:"h-9 px-3 text-sm border rounded-md bg-background",value:((O=f.until)==null?void 0:O.split("T")[0])||"",onChange:R=>h({...f,until:R.target.value?`${R.target.value}T23:59:59Z`:void 0,page:1}),placeholder:"Until"})]}),y.jsx("div",{className:"flex-1 overflow-auto border rounded-lg",children:x?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):g?y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",g instanceof Error?g.message:"Unknown error"]})}):p!=null&&p.events.length?y.jsx("div",{children:p.events.map(R=>y.jsx(n8,{event:R,onEntityClick:C},R.id))}):y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx("span",{className:"text-muted-foreground",children:"No events found"})})}),p&&p.total>0&&y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",((f.page||1)-1)*(f.limit||50)+1,"-",Math.min((f.page||1)*(f.limit||50),p.total)," of ",p.total," ","events"]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(gt,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(Ub,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",E]}),y.jsxs(gt,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=E,children:["Next",y.jsx(Gc,{className:"h-4 w-4"})]})]})]})]}),y.jsx(bg,{task:S,epics:t,allTasks:e,open:S!==null,onClose:u,onUpdate:n,onTaskClick:R=>l(R.id),onEpicClick:R=>{u(),a(R.id)}}),y.jsx(kg,{epic:k,tasks:k?e.filter(R=>R.epicId===k.id):[],open:k!==null,onClose:d,onUpdate:n,onTaskClick:R=>{d();const V=e.find(Q=>Q.id===R.id);V&&l(V.id)}})]})}function i8(){const{tasks:e,epics:t,project:n}=Kc(),{connectionStatus:r,openCreateModal:o}=Ws();return y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsx(iA,{projectName:n==null?void 0:n.name,onNewClick:()=>o({status:"todo"})}),y.jsxs(fT,{children:[y.jsx(fc,{path:"/",element:y.jsx(qU,{})}),y.jsx(fc,{path:"/list",element:y.jsx(JU,{})}),y.jsx(fc,{path:"/history",element:y.jsx(r8,{})})]}),y.jsx("footer",{className:"px-4 py-2 border-t",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.length," tasks across ",t.length," epics"]}),y.jsx(sA,{status:r})]})})]})}function o8({children:e}){const[t]=b.useState(()=>new pN({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}}));return y.jsx(mN,{client:t,children:y.jsxs(Nj,{defaultTheme:"system",disableTransitionOnChange:!0,children:[y.jsx(YI,{delayDuration:300,children:e}),y.jsx(AA,{position:"bottom-right",richColors:!0})]})})}pP.createRoot(document.getElementById("root")).render(y.jsx(le.StrictMode,{children:y.jsx(zT,{children:y.jsx(o8,{children:y.jsx(i8,{})})})}));