@obsfx/trekker-dashboard 1.6.0 → 1.7.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,337 @@
1
+ var cx=e=>{throw TypeError(e)};var Sh=(e,t,n)=>t.has(e)||cx("Cannot "+n);var $=(e,t,n)=>(Sh(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?cx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ce=(e,t,n,r)=>(Sh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(Sh(e,t,"access private method"),n);var Ku=(e,t,n,r)=>({set _(o){Ce(e,t,o,n)},get _(){return $(e,t,r)}});function _P(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 a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{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 a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ch={exports:{}},Ka={},Eh={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 dx;function PP(){if(dx)return Qe;dx=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"),a=Symbol.for("react.provider"),l=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,R){this.props=L,this.context=Y,this.refs=k,this.updater=R||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,R){this.props=L,this.context=Y,this.refs=k,this.updater=R||g}var T=_.prototype=new E;T.constructor=_,S(T,C.prototype),T.isPureReactComponent=!0;var I=Array.isArray,O=Object.prototype.hasOwnProperty,j={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function Q(L,Y,R){var ue,ye={},we=null,le=null;if(Y!=null)for(ue in Y.ref!==void 0&&(le=Y.ref),Y.key!==void 0&&(we=""+Y.key),Y)O.call(Y,ue)&&!B.hasOwnProperty(ue)&&(ye[ue]=Y[ue]);var ve=arguments.length-2;if(ve===1)ye.children=R;else if(1<ve){for(var Ee=Array(ve),ke=0;ke<ve;ke++)Ee[ke]=arguments[ke+2];ye.children=Ee}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:le,props:ye,_owner:j.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(R){return Y[R]})}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,R,ue,ye){var we=typeof L;(we==="undefined"||we==="boolean")&&(L=null);var le=!1;if(L===null)le=!0;else switch(we){case"string":case"number":le=!0;break;case"object":switch(L.$$typeof){case e:case t:le=!0}}if(le)return le=L,ye=ye(le),L=ue===""?"."+ne(le,0):ue,I(ye)?(R="",L!=null&&(R=L.replace(M,"$&/")+"/"),W(ye,Y,R,"",function(ke){return ke})):ye!=null&&(A(ye)&&(ye=oe(ye,R+(!ye.key||le&&le.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+L)),Y.push(ye)),1;if(le=0,ue=ue===""?".":ue+":",I(L))for(var ve=0;ve<L.length;ve++){we=L[ve];var Ee=ue+ne(we,ve);le+=W(we,Y,R,Ee,ye)}else if(Ee=x(L),typeof Ee=="function")for(L=Ee.call(L),ve=0;!(we=L.next()).done;)we=we.value,Ee=ue+ne(we,ve++),le+=W(we,Y,R,Ee,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 le}function U(L,Y,R){if(L==null)return L;var ue=[],ye=0;return W(L,ue,"","",function(we){return Y.call(R,we,ye++)}),ue}function q(L){if(L._status===-1){var Y=L._result;Y=Y(),Y.then(function(R){(L._status===0||L._status===-1)&&(L._status=1,L._result=R)},function(R){(L._status===0||L._status===-1)&&(L._status=2,L._result=R)}),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:j};function N(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:U,forEach:function(L,Y,R){U(L,function(){Y.apply(this,arguments)},R)},count:function(L){var Y=0;return U(L,function(){Y++}),Y},toArray:function(L){return U(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,R){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,le=L._owner;if(Y!=null){if(Y.ref!==void 0&&(we=Y.ref,le=j.current),Y.key!==void 0&&(ye=""+Y.key),L.type&&L.type.defaultProps)var ve=L.type.defaultProps;for(Ee in Y)O.call(Y,Ee)&&!B.hasOwnProperty(Ee)&&(ue[Ee]=Y[Ee]===void 0&&ve!==void 0?ve[Ee]:Y[Ee])}var Ee=arguments.length-2;if(Ee===1)ue.children=R;else if(1<Ee){ve=Array(Ee);for(var ke=0;ke<Ee;ke++)ve[ke]=arguments[ke+2];ue.children=ve}return{$$typeof:e,type:L.type,key:ye,ref:we,props:ue,_owner:le}},Qe.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_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,R){return ee.current.useImperativeHandle(L,Y,R)},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,R){return ee.current.useReducer(L,Y,R)},Qe.useRef=function(L){return ee.current.useRef(L)},Qe.useState=function(L){return ee.current.useState(L)},Qe.useSyncExternalStore=function(L,Y,R){return ee.current.useSyncExternalStore(L,Y,R)},Qe.useTransition=function(){return ee.current.useTransition()},Qe.version="18.3.1",Qe}var fx;function sm(){return fx||(fx=1,Eh.exports=PP()),Eh.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 hx;function TP(){if(hx)return Ka;hx=1;var e=sm(),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,a={key:!0,ref:!0,__self:!0,__source:!0};function l(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)&&!a.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 Ka.Fragment=n,Ka.jsx=l,Ka.jsxs=l,Ka}var px;function NP(){return px||(px=1,Ch.exports=TP()),Ch.exports}var y=NP(),b=sm();const ae=Xo(b),am=_P({__proto__:null,default:ae},[b]);var Gu={},_h={exports:{}},zn={},Ph={exports:{}},Th={};/**
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 mx;function jP(){return mx||(mx=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,R=Y>>>1;L<R;){var ue=2*(L+1)-1,ye=D[ue],we=ue+1,le=D[we];if(0>o(ye,N))we<Y&&0>o(le,ye)?(D[L]=le,D[we]=N,L=we):(D[L]=ye,D[ue]=N,L=ue);else if(we<Y&&0>o(le,N))D[L]=le,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 a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.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 R=!0;else{var ue=n(f);ue!==null&&ee(I,ue.startTime-G),R=!1}return R}finally{p=null,x=N,g=!1}}var j=!1,B=null,Q=-1,oe=5,A=-1;function K(){return!(e.unstable_now()-A<oe)}function M(){if(B!==null){var D=e.unstable_now();A=D;var G=!0;try{G=B(!0,D)}finally{G?ne():(j=!1,B=null)}}else j=!1}var ne;if(typeof _=="function")ne=function(){_(M)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,U=W.port2;W.port1.onmessage=M,ne=function(){U.postMessage(null)}}else ne=function(){C(M,0)};function q(D){B=D,j||(j=!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}}}})(Th)),Th}var gx;function RP(){return gx||(gx=1,Ph.exports=jP()),Ph.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 yx;function IP(){if(yx)return zn;yx=1;var e=sm(),t=RP();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 a(i,s){l(i,s),l(i+"Capture",s)}function l(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"),j=Symbol.for("react.portal"),B=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"),U=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 R=!1;function ue(i,s){if(!i||R)return"";R=!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 H=`
37
+ `+v[P].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=P&&0<=z);break}}}finally{R=!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 B:return"Fragment";case j: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 U: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 le(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 Ee(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ke(i){var s=Ee(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=Ee(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 It(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 an(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")?_n(i,s.type,c):s.hasOwnProperty("defaultValue")&&_n(i,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function tr(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 _n(i,s,c){(s!=="number"||nt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Pn=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(Pn(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 V(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"?V(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var xe,_e=(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 ze(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var dt={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},Nt=["Webkit","ms","Moz","O"];Object.keys(dt).forEach(function(i){Nt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),dt[s]=dt[i]})});function Zt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||dt.hasOwnProperty(i)&&dt[i]?(""+s).trim():s+"px"}function $t(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 Tn=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 pt(i,s){if(s){if(Tn[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 ii(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ns=null,Pi=null,Lr=null;function vr(i){if(i=Da(i)){if(typeof ns!="function")throw Error(n(280));var s=i.stateNode;s&&(s=du(s),ns(i.stateNode,i.type,s))}}function Bl(i){Pi?Lr?Lr.push(i):Lr=[i]:Pi=i}function He(){if(Pi){var i=Pi,s=Lr;if(Lr=Pi=null,vr(i),s)for(i=0;i<s.length;i++)vr(s[i])}}function rt(i,s){return i(s)}function ft(){}var mn=!1;function Nn(i,s,c){if(mn)return i(s,c);mn=!0;try{return rt(i,s,c)}finally{mn=!1,(Pi!==null||Lr!==null)&&(ft(),He())}}function jn(i,s){var c=i.stateNode;if(c===null)return null;var m=du(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 xr=!1;if(u)try{var Jt={};Object.defineProperty(Jt,"passive",{get:function(){xr=!0}}),window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{xr=!1}function Fr(i,s,c,m,v,w,P,z,H){var re=Array.prototype.slice.call(arguments,3);try{s.apply(c,re)}catch(fe){this.onError(fe)}}var ga=!1,Ul=null,Hl=!1,Vd=null,AE={onError:function(i){ga=!0,Ul=i}};function OE(i,s,c,m,v,w,P,z,H){ga=!1,Ul=null,Fr.apply(AE,arguments)}function DE(i,s,c,m,v,w,P,z,H){if(OE.apply(this,arguments),ga){if(ga){var re=Ul;ga=!1,Ul=null}else throw Error(n(198));Hl||(Hl=!0,Vd=re)}}function go(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 Ag(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 Og(i){if(go(i)!==i)throw Error(n(188))}function zE(i){var s=i.alternate;if(!s){if(s=go(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 Og(v),i;if(w===m)return Og(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 Dg(i){return i=zE(i),i!==null?zg(i):null}function zg(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=zg(i);if(s!==null)return s;i=i.sibling}return null}var Mg=t.unstable_scheduleCallback,Lg=t.unstable_cancelCallback,ME=t.unstable_shouldYield,LE=t.unstable_requestPaint,jt=t.unstable_now,FE=t.unstable_getCurrentPriorityLevel,Bd=t.unstable_ImmediatePriority,Fg=t.unstable_UserBlockingPriority,Wl=t.unstable_NormalPriority,$E=t.unstable_LowPriority,$g=t.unstable_IdlePriority,Zl=null,$r=null;function VE(i){if($r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(Zl,i,void 0,(i.current.flags&128)===128)}catch{}}var wr=Math.clz32?Math.clz32:HE,BE=Math.log,UE=Math.LN2;function HE(i){return i>>>=0,i===0?32:31-(BE(i)/UE|0)|0}var ql=64,Ql=4194304;function ya(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 Yl(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=ya(z):(w&=P,w!==0&&(m=ya(w)))}else P=c&~v,P!==0?m=ya(P):w!==0&&(m=ya(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-wr(s),v=1<<c,m|=i[c],s&=~v;return m}function WE(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 ZE(i,s){for(var c=i.suspendedLanes,m=i.pingedLanes,v=i.expirationTimes,w=i.pendingLanes;0<w;){var P=31-wr(w),z=1<<P,H=v[P];H===-1?((z&c)===0||(z&m)!==0)&&(v[P]=WE(z,s)):H<=s&&(i.expiredLanes|=z),w&=~z}}function Ud(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Vg(){var i=ql;return ql<<=1,(ql&4194240)===0&&(ql=64),i}function Hd(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function va(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-wr(s),i[s]=c}function qE(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-wr(c),w=1<<v;s[v]=0,m[v]=-1,i[v]=-1,c&=~w}}function Wd(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var m=31-wr(c),v=1<<m;v&s|i[m]&s&&(i[m]|=s),c&=~v}}var at=0;function Bg(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Ug,Zd,Hg,Wg,Zg,qd=!1,Kl=[],Ti=null,Ni=null,ji=null,xa=new Map,wa=new Map,Ri=[],QE="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 qg(i,s){switch(i){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":xa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":wa.delete(s.pointerId)}}function ba(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=Da(s),s!==null&&Zd(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),i)}function YE(i,s,c,m,v){switch(s){case"focusin":return Ti=ba(Ti,i,s,c,m,v),!0;case"dragenter":return Ni=ba(Ni,i,s,c,m,v),!0;case"mouseover":return ji=ba(ji,i,s,c,m,v),!0;case"pointerover":var w=v.pointerId;return xa.set(w,ba(xa.get(w)||null,i,s,c,m,v)),!0;case"gotpointercapture":return w=v.pointerId,wa.set(w,ba(wa.get(w)||null,i,s,c,m,v)),!0}return!1}function Qg(i){var s=yo(i.target);if(s!==null){var c=go(s);if(c!==null){if(s=c.tag,s===13){if(s=Ag(c),s!==null){i.blockedOn=s,Zg(i.priority,function(){Hg(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 Gl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Yd(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=Da(c),s!==null&&Zd(s),i.blockedOn=c,!1;s.shift()}return!0}function Yg(i,s,c){Gl(i)&&c.delete(s)}function KE(){qd=!1,Ti!==null&&Gl(Ti)&&(Ti=null),Ni!==null&&Gl(Ni)&&(Ni=null),ji!==null&&Gl(ji)&&(ji=null),xa.forEach(Yg),wa.forEach(Yg)}function ka(i,s){i.blockedOn===s&&(i.blockedOn=null,qd||(qd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,KE)))}function Sa(i){function s(v){return ka(v,i)}if(0<Kl.length){ka(Kl[0],i);for(var c=1;c<Kl.length;c++){var m=Kl[c];m.blockedOn===i&&(m.blockedOn=null)}}for(Ti!==null&&ka(Ti,i),Ni!==null&&ka(Ni,i),ji!==null&&ka(ji,i),xa.forEach(s),wa.forEach(s),c=0;c<Ri.length;c++)m=Ri[c],m.blockedOn===i&&(m.blockedOn=null);for(;0<Ri.length&&(c=Ri[0],c.blockedOn===null);)Qg(c),c.blockedOn===null&&Ri.shift()}var rs=I.ReactCurrentBatchConfig,Xl=!0;function GE(i,s,c,m){var v=at,w=rs.transition;rs.transition=null;try{at=1,Qd(i,s,c,m)}finally{at=v,rs.transition=w}}function XE(i,s,c,m){var v=at,w=rs.transition;rs.transition=null;try{at=4,Qd(i,s,c,m)}finally{at=v,rs.transition=w}}function Qd(i,s,c,m){if(Xl){var v=Yd(i,s,c,m);if(v===null)hf(i,s,m,Jl,c),qg(i,m);else if(YE(v,i,s,c,m))m.stopPropagation();else if(qg(i,m),s&4&&-1<QE.indexOf(i)){for(;v!==null;){var w=Da(v);if(w!==null&&Ug(w),w=Yd(i,s,c,m),w===null&&hf(i,s,m,Jl,c),w===v)break;v=w}v!==null&&m.stopPropagation()}else hf(i,s,m,null,c)}}var Jl=null;function Yd(i,s,c,m){if(Jl=null,i=ii(m),i=yo(i),i!==null)if(s=go(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Ag(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 Jl=i,null}function Kg(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(FE()){case Bd:return 1;case Fg:return 4;case Wl:case $E:return 16;case $g:return 536870912;default:return 16}default:return 16}}var Ii=null,Kd=null,eu=null;function Gg(){if(eu)return eu;var i,s=Kd,c=s.length,m,v="value"in Ii?Ii.value:Ii.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 eu=v.slice(i,1<m?1-m:void 0)}function tu(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 nu(){return!0}function Xg(){return!1}function Wn(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)?nu:Xg,this.isPropagationStopped=Xg,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=nu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),s}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gd=Wn(is),Ca=N({},is,{view:0,detail:0}),JE=Wn(Ca),Xd,Jd,Ea,ru=N({},Ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tf,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!==Ea&&(Ea&&i.type==="mousemove"?(Xd=i.screenX-Ea.screenX,Jd=i.screenY-Ea.screenY):Jd=Xd=0,Ea=i),Xd)},movementY:function(i){return"movementY"in i?i.movementY:Jd}}),Jg=Wn(ru),e_=N({},ru,{dataTransfer:0}),t_=Wn(e_),n_=N({},Ca,{relatedTarget:0}),ef=Wn(n_),r_=N({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),i_=Wn(r_),o_=N({},is,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),s_=Wn(o_),a_=N({},is,{data:0}),ey=Wn(a_),l_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},u_={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"},c_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=c_[i])?!!s[i]:!1}function tf(){return d_}var f_=N({},Ca,{key:function(i){if(i.key){var s=l_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=tu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?u_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tf,charCode:function(i){return i.type==="keypress"?tu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?tu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),h_=Wn(f_),p_=N({},ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ty=Wn(p_),m_=N({},Ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tf}),g_=Wn(m_),y_=N({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),v_=Wn(y_),x_=N({},ru,{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}),w_=Wn(x_),b_=[9,13,27,32],nf=u&&"CompositionEvent"in window,_a=null;u&&"documentMode"in document&&(_a=document.documentMode);var k_=u&&"TextEvent"in window&&!_a,ny=u&&(!nf||_a&&8<_a&&11>=_a),ry=" ",iy=!1;function oy(i,s){switch(i){case"keyup":return b_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sy(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var os=!1;function S_(i,s){switch(i){case"compositionend":return sy(s);case"keypress":return s.which!==32?null:(iy=!0,ry);case"textInput":return i=s.data,i===ry&&iy?null:i;default:return null}}function C_(i,s){if(os)return i==="compositionend"||!nf&&oy(i,s)?(i=Gg(),eu=Kd=Ii=null,os=!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 ny&&s.locale!=="ko"?null:s.data;default:return null}}var E_={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 ay(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!E_[i.type]:s==="textarea"}function ly(i,s,c,m){Bl(m),s=lu(s,"onChange"),0<s.length&&(c=new Gd("onChange","change",null,c,m),i.push({event:c,listeners:s}))}var Pa=null,Ta=null;function __(i){_y(i,0)}function iu(i){var s=cs(i);if(Ve(s))return i}function P_(i,s){if(i==="change")return s}var uy=!1;if(u){var rf;if(u){var of="oninput"in document;if(!of){var cy=document.createElement("div");cy.setAttribute("oninput","return;"),of=typeof cy.oninput=="function"}rf=of}else rf=!1;uy=rf&&(!document.documentMode||9<document.documentMode)}function dy(){Pa&&(Pa.detachEvent("onpropertychange",fy),Ta=Pa=null)}function fy(i){if(i.propertyName==="value"&&iu(Ta)){var s=[];ly(s,Ta,i,ii(i)),Nn(__,s)}}function T_(i,s,c){i==="focusin"?(dy(),Pa=s,Ta=c,Pa.attachEvent("onpropertychange",fy)):i==="focusout"&&dy()}function N_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return iu(Ta)}function j_(i,s){if(i==="click")return iu(s)}function R_(i,s){if(i==="input"||i==="change")return iu(s)}function I_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var br=typeof Object.is=="function"?Object.is:I_;function Na(i,s){if(br(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)||!br(i[v],s[v]))return!1}return!0}function hy(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function py(i,s){var c=hy(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=hy(c)}}function my(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?my(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function gy(){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 sf(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 A_(i){var s=gy(),c=i.focusedElem,m=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&my(c.ownerDocument.documentElement,c)){if(m!==null&&sf(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=py(c,w);var P=py(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 O_=u&&"documentMode"in document&&11>=document.documentMode,ss=null,af=null,ja=null,lf=!1;function yy(i,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;lf||ss==null||ss!==nt(m)||(m=ss,"selectionStart"in m&&sf(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}),ja&&Na(ja,m)||(ja=m,m=lu(af,"onSelect"),0<m.length&&(s=new Gd("onSelect","select",null,s,c),i.push({event:s,listeners:m}),s.target=ss)))}function ou(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var as={animationend:ou("Animation","AnimationEnd"),animationiteration:ou("Animation","AnimationIteration"),animationstart:ou("Animation","AnimationStart"),transitionend:ou("Transition","TransitionEnd")},uf={},vy={};u&&(vy=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function su(i){if(uf[i])return uf[i];if(!as[i])return i;var s=as[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in vy)return uf[i]=s[c];return i}var xy=su("animationend"),wy=su("animationiteration"),by=su("animationstart"),ky=su("transitionend"),Sy=new Map,Cy="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 Ai(i,s){Sy.set(i,s),a(s,[i])}for(var cf=0;cf<Cy.length;cf++){var df=Cy[cf],D_=df.toLowerCase(),z_=df[0].toUpperCase()+df.slice(1);Ai(D_,"on"+z_)}Ai(xy,"onAnimationEnd"),Ai(wy,"onAnimationIteration"),Ai(by,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(ky,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ra="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(" "),M_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ra));function Ey(i,s,c){var m=i.type||"unknown-event";i.currentTarget=c,DE(m,s,void 0,i),i.currentTarget=null}function _y(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],H=z.instance,re=z.currentTarget;if(z=z.listener,H!==w&&v.isPropagationStopped())break e;Ey(v,z,re),w=H}else for(P=0;P<m.length;P++){if(z=m[P],H=z.instance,re=z.currentTarget,z=z.listener,H!==w&&v.isPropagationStopped())break e;Ey(v,z,re),w=H}}}if(Hl)throw i=Vd,Hl=!1,Vd=null,i}function yt(i,s){var c=s[xf];c===void 0&&(c=s[xf]=new Set);var m=i+"__bubble";c.has(m)||(Py(s,i,2,!1),c.add(m))}function ff(i,s,c){var m=0;s&&(m|=4),Py(c,i,m,s)}var au="_reactListening"+Math.random().toString(36).slice(2);function Ia(i){if(!i[au]){i[au]=!0,r.forEach(function(c){c!=="selectionchange"&&(M_.has(c)||ff(c,!1,i),ff(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[au]||(s[au]=!0,ff("selectionchange",!1,s))}}function Py(i,s,c,m){switch(Kg(s)){case 1:var v=GE;break;case 4:v=XE;break;default:v=Qd}c=v.bind(null,s,c,i),v=void 0,!xr||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 hf(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 H=P.tag;if((H===3||H===4)&&(H=P.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;P=P.return}for(;z!==null;){if(P=yo(z),P===null)return;if(H=P.tag,H===5||H===6){m=w=P;continue e}z=z.parentNode}}m=m.return}Nn(function(){var re=w,fe=ii(c),he=[];e:{var de=Sy.get(i);if(de!==void 0){var Pe=Gd,Ne=i;switch(i){case"keypress":if(tu(c)===0)break e;case"keydown":case"keyup":Pe=h_;break;case"focusin":Ne="focus",Pe=ef;break;case"focusout":Ne="blur",Pe=ef;break;case"beforeblur":case"afterblur":Pe=ef;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":Pe=Jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=t_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=g_;break;case xy:case wy:case by:Pe=i_;break;case ky:Pe=v_;break;case"scroll":Pe=JE;break;case"wheel":Pe=w_;break;case"copy":case"cut":case"paste":Pe=s_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=ty}var Ie=(s&4)!==0,Rt=!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=jn(Z,X),me!=null&&Ie.push(Aa(Z,me,te)))),Rt)break;Z=Z.return}0<Ie.length&&(de=new Pe(de,Ne,null,c,fe),he.push({event:de,listeners:Ie}))}}if((s&7)===0){e:{if(de=i==="mouseover"||i==="pointerover",Pe=i==="mouseout"||i==="pointerout",de&&c!==Xt&&(Ne=c.relatedTarget||c.fromElement)&&(yo(Ne)||Ne[oi]))break e;if((Pe||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,Pe?(Ne=c.relatedTarget||c.toElement,Pe=re,Ne=Ne?yo(Ne):null,Ne!==null&&(Rt=go(Ne),Ne!==Rt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Pe=null,Ne=re),Pe!==Ne)){if(Ie=Jg,me="onMouseLeave",X="onMouseEnter",Z="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=ty,me="onPointerLeave",X="onPointerEnter",Z="pointer"),Rt=Pe==null?de:cs(Pe),te=Ne==null?de:cs(Ne),de=new Ie(me,Z+"leave",Pe,c,fe),de.target=Rt,de.relatedTarget=te,me=null,yo(fe)===re&&(Ie=new Ie(X,Z+"enter",Ne,c,fe),Ie.target=te,Ie.relatedTarget=Rt,me=Ie),Rt=me,Pe&&Ne)t:{for(Ie=Pe,X=Ne,Z=0,te=Ie;te;te=ls(te))Z++;for(te=0,me=X;me;me=ls(me))te++;for(;0<Z-te;)Ie=ls(Ie),Z--;for(;0<te-Z;)X=ls(X),te--;for(;Z--;){if(Ie===X||X!==null&&Ie===X.alternate)break t;Ie=ls(Ie),X=ls(X)}Ie=null}else Ie=null;Pe!==null&&Ty(he,de,Pe,Ie,!1),Ne!==null&&Rt!==null&&Ty(he,Rt,Ne,Ie,!0)}}e:{if(de=re?cs(re):window,Pe=de.nodeName&&de.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&de.type==="file")var Oe=P_;else if(ay(de))if(uy)Oe=R_;else{Oe=N_;var Le=T_}else(Pe=de.nodeName)&&Pe.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Oe=j_);if(Oe&&(Oe=Oe(i,re))){ly(he,Oe,c,fe);break e}Le&&Le(i,de,re),i==="focusout"&&(Le=de._wrapperState)&&Le.controlled&&de.type==="number"&&_n(de,"number",de.value)}switch(Le=re?cs(re):window,i){case"focusin":(ay(Le)||Le.contentEditable==="true")&&(ss=Le,af=re,ja=null);break;case"focusout":ja=af=ss=null;break;case"mousedown":lf=!0;break;case"contextmenu":case"mouseup":case"dragend":lf=!1,yy(he,c,fe);break;case"selectionchange":if(O_)break;case"keydown":case"keyup":yy(he,c,fe)}var Fe;if(nf)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else os?oy(i,c)&&(Ue="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ue="onCompositionStart");Ue&&(ny&&c.locale!=="ko"&&(os||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&os&&(Fe=Gg()):(Ii=fe,Kd="value"in Ii?Ii.value:Ii.textContent,os=!0)),Le=lu(re,Ue),0<Le.length&&(Ue=new ey(Ue,i,null,c,fe),he.push({event:Ue,listeners:Le}),Fe?Ue.data=Fe:(Fe=sy(c),Fe!==null&&(Ue.data=Fe)))),(Fe=k_?S_(i,c):C_(i,c))&&(re=lu(re,"onBeforeInput"),0<re.length&&(fe=new ey("onBeforeInput","beforeinput",null,c,fe),he.push({event:fe,listeners:re}),fe.data=Fe))}_y(he,s)})}function Aa(i,s,c){return{instance:i,listener:s,currentTarget:c}}function lu(i,s){for(var c=s+"Capture",m=[];i!==null;){var v=i,w=v.stateNode;v.tag===5&&w!==null&&(v=w,w=jn(i,c),w!=null&&m.unshift(Aa(i,w,v)),w=jn(i,s),w!=null&&m.push(Aa(i,w,v))),i=i.return}return m}function ls(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Ty(i,s,c,m,v){for(var w=s._reactName,P=[];c!==null&&c!==m;){var z=c,H=z.alternate,re=z.stateNode;if(H!==null&&H===m)break;z.tag===5&&re!==null&&(z=re,v?(H=jn(c,w),H!=null&&P.unshift(Aa(c,H,z))):v||(H=jn(c,w),H!=null&&P.push(Aa(c,H,z)))),c=c.return}P.length!==0&&i.push({event:s,listeners:P})}var L_=/\r\n?/g,F_=/\u0000|\uFFFD/g;function Ny(i){return(typeof i=="string"?i:""+i).replace(L_,`
38
+ `).replace(F_,"")}function uu(i,s,c){if(s=Ny(s),Ny(i)!==s&&c)throw Error(n(425))}function cu(){}var pf=null,mf=null;function gf(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 yf=typeof setTimeout=="function"?setTimeout:void 0,$_=typeof clearTimeout=="function"?clearTimeout:void 0,jy=typeof Promise=="function"?Promise:void 0,V_=typeof queueMicrotask=="function"?queueMicrotask:typeof jy<"u"?function(i){return jy.resolve(null).then(i).catch(B_)}:yf;function B_(i){setTimeout(function(){throw i})}function vf(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),Sa(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=v}while(c);Sa(s)}function Oi(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 Ry(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 us=Math.random().toString(36).slice(2),Vr="__reactFiber$"+us,Oa="__reactProps$"+us,oi="__reactContainer$"+us,xf="__reactEvents$"+us,U_="__reactListeners$"+us,H_="__reactHandles$"+us;function yo(i){var s=i[Vr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[oi]||c[Vr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Ry(i);i!==null;){if(c=i[Vr])return c;i=Ry(i)}return s}i=c,c=i.parentNode}return null}function Da(i){return i=i[Vr]||i[oi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function cs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function du(i){return i[Oa]||null}var wf=[],ds=-1;function Di(i){return{current:i}}function vt(i){0>ds||(i.current=wf[ds],wf[ds]=null,ds--)}function mt(i,s){ds++,wf[ds]=i.current,i.current=s}var zi={},ln=Di(zi),Rn=Di(!1),vo=zi;function fs(i,s){var c=i.type.contextTypes;if(!c)return zi;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 In(i){return i=i.childContextTypes,i!=null}function fu(){vt(Rn),vt(ln)}function Iy(i,s,c){if(ln.current!==zi)throw Error(n(168));mt(ln,s),mt(Rn,c)}function Ay(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,le(i)||"Unknown",v));return N({},c,m)}function hu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||zi,vo=ln.current,mt(ln,i),mt(Rn,Rn.current),!0}function Oy(i,s,c){var m=i.stateNode;if(!m)throw Error(n(169));c?(i=Ay(i,s,vo),m.__reactInternalMemoizedMergedChildContext=i,vt(Rn),vt(ln),mt(ln,i)):vt(Rn),mt(Rn,c)}var si=null,pu=!1,bf=!1;function Dy(i){si===null?si=[i]:si.push(i)}function W_(i){pu=!0,Dy(i)}function Mi(){if(!bf&&si!==null){bf=!0;var i=0,s=at;try{var c=si;for(at=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}si=null,pu=!1}catch(v){throw si!==null&&(si=si.slice(i+1)),Mg(Bd,Mi),v}finally{at=s,bf=!1}}return null}var hs=[],ps=0,mu=null,gu=0,nr=[],rr=0,xo=null,ai=1,li="";function wo(i,s){hs[ps++]=gu,hs[ps++]=mu,mu=i,gu=s}function zy(i,s,c){nr[rr++]=ai,nr[rr++]=li,nr[rr++]=xo,xo=i;var m=ai;i=li;var v=32-wr(m)-1;m&=~(1<<v),c+=1;var w=32-wr(s)+v;if(30<w){var P=v-v%5;w=(m&(1<<P)-1).toString(32),m>>=P,v-=P,ai=1<<32-wr(s)+v|c<<v|m,li=w+i}else ai=1<<w|c<<v|m,li=i}function kf(i){i.return!==null&&(wo(i,1),zy(i,1,0))}function Sf(i){for(;i===mu;)mu=hs[--ps],hs[ps]=null,gu=hs[--ps],hs[ps]=null;for(;i===xo;)xo=nr[--rr],nr[rr]=null,li=nr[--rr],nr[rr]=null,ai=nr[--rr],nr[rr]=null}var Zn=null,qn=null,xt=!1,kr=null;function My(i,s){var c=ar(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 Ly(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,Zn=i,qn=Oi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Zn=i,qn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=xo!==null?{id:ai,overflow:li}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Zn=i,qn=null,!0):!1;default:return!1}}function Cf(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Ef(i){if(xt){var s=qn;if(s){var c=s;if(!Ly(i,s)){if(Cf(i))throw Error(n(418));s=Oi(c.nextSibling);var m=Zn;s&&Ly(i,s)?My(m,c):(i.flags=i.flags&-4097|2,xt=!1,Zn=i)}}else{if(Cf(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Zn=i}}}function Fy(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Zn=i}function yu(i){if(i!==Zn)return!1;if(!xt)return Fy(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!gf(i.type,i.memoizedProps)),s&&(s=qn)){if(Cf(i))throw $y(),Error(n(418));for(;s;)My(i,s),s=Oi(s.nextSibling)}if(Fy(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){qn=Oi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}qn=null}}else qn=Zn?Oi(i.stateNode.nextSibling):null;return!0}function $y(){for(var i=qn;i;)i=Oi(i.nextSibling)}function ms(){qn=Zn=null,xt=!1}function _f(i){kr===null?kr=[i]:kr.push(i)}var Z_=I.ReactCurrentBatchConfig;function za(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 vu(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Vy(i){var s=i._init;return s(i._payload)}function By(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=Wi(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=yh(te,X.mode,me),Z.return=X,Z):(Z=v(Z,te),Z.return=X,Z)}function H(X,Z,te,me){var Oe=te.type;return Oe===B?fe(X,Z,te.props.children,me,te.key):Z!==null&&(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Vy(Oe)===Z.type)?(me=v(Z,te.props),me.ref=za(X,Z,te),me.return=X,me):(me=Bu(te.type,te.key,te.props,null,X.mode,me),me.ref=za(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=vh(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=To(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=yh(""+Z,X.mode,te),Z.return=X,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case O:return te=Bu(Z.type,Z.key,Z.props,null,X.mode,te),te.ref=za(X,null,Z),te.return=X,te;case j:return Z=vh(Z,X.mode,te),Z.return=X,Z;case q:var me=Z._init;return he(X,me(Z._payload),te)}if(Pn(Z)||G(Z))return Z=To(Z,X.mode,te,null),Z.return=X,Z;vu(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?H(X,Z,te,me):null;case j:return te.key===Oe?re(X,Z,te,me):null;case q:return Oe=te._init,de(X,Z,Oe(te._payload),me)}if(Pn(te)||G(te))return Oe!==null?null:fe(X,Z,te,me,null);vu(X,te)}return null}function Pe(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,H(Z,X,me,Oe);case j:return X=X.get(me.key===null?te:me.key)||null,re(Z,X,me,Oe);case q:var Le=me._init;return Pe(X,Z,te,Le(me._payload),Oe)}if(Pn(me)||G(me))return X=X.get(te)||null,fe(Z,X,me,Oe,null);vu(Z,me)}return null}function Ne(X,Z,te,me){for(var Oe=null,Le=null,Fe=Z,Ue=Z=0,Yt=null;Fe!==null&&Ue<te.length;Ue++){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var et=de(X,Fe,te[Ue],me);if(et===null){Fe===null&&(Fe=Yt);break}i&&Fe&&et.alternate===null&&s(X,Fe),Z=w(et,Z,Ue),Le===null?Oe=et:Le.sibling=et,Le=et,Fe=Yt}if(Ue===te.length)return c(X,Fe),xt&&wo(X,Ue),Oe;if(Fe===null){for(;Ue<te.length;Ue++)Fe=he(X,te[Ue],me),Fe!==null&&(Z=w(Fe,Z,Ue),Le===null?Oe=Fe:Le.sibling=Fe,Le=Fe);return xt&&wo(X,Ue),Oe}for(Fe=m(X,Fe);Ue<te.length;Ue++)Yt=Pe(Fe,X,Ue,te[Ue],me),Yt!==null&&(i&&Yt.alternate!==null&&Fe.delete(Yt.key===null?Ue:Yt.key),Z=w(Yt,Z,Ue),Le===null?Oe=Yt:Le.sibling=Yt,Le=Yt);return i&&Fe.forEach(function(Zi){return s(X,Zi)}),xt&&wo(X,Ue),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 Le=Oe=null,Fe=Z,Ue=Z=0,Yt=null,et=te.next();Fe!==null&&!et.done;Ue++,et=te.next()){Fe.index>Ue?(Yt=Fe,Fe=null):Yt=Fe.sibling;var Zi=de(X,Fe,et.value,me);if(Zi===null){Fe===null&&(Fe=Yt);break}i&&Fe&&Zi.alternate===null&&s(X,Fe),Z=w(Zi,Z,Ue),Le===null?Oe=Zi:Le.sibling=Zi,Le=Zi,Fe=Yt}if(et.done)return c(X,Fe),xt&&wo(X,Ue),Oe;if(Fe===null){for(;!et.done;Ue++,et=te.next())et=he(X,et.value,me),et!==null&&(Z=w(et,Z,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return xt&&wo(X,Ue),Oe}for(Fe=m(X,Fe);!et.done;Ue++,et=te.next())et=Pe(Fe,X,Ue,et.value,me),et!==null&&(i&&et.alternate!==null&&Fe.delete(et.key===null?Ue:et.key),Z=w(et,Z,Ue),Le===null?Oe=et:Le.sibling=et,Le=et);return i&&Fe.forEach(function(EP){return s(X,EP)}),xt&&wo(X,Ue),Oe}function Rt(X,Z,te,me){if(typeof te=="object"&&te!==null&&te.type===B&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case O:e:{for(var Oe=te.key,Le=Z;Le!==null;){if(Le.key===Oe){if(Oe=te.type,Oe===B){if(Le.tag===7){c(X,Le.sibling),Z=v(Le,te.props.children),Z.return=X,X=Z;break e}}else if(Le.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Vy(Oe)===Le.type){c(X,Le.sibling),Z=v(Le,te.props),Z.ref=za(X,Le,te),Z.return=X,X=Z;break e}c(X,Le);break}else s(X,Le);Le=Le.sibling}te.type===B?(Z=To(te.props.children,X.mode,me,te.key),Z.return=X,X=Z):(me=Bu(te.type,te.key,te.props,null,X.mode,me),me.ref=za(X,Z,te),me.return=X,X=me)}return P(X);case j:e:{for(Le=te.key;Z!==null;){if(Z.key===Le)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=vh(te,X.mode,me),Z.return=X,X=Z}return P(X);case q:return Le=te._init,Rt(X,Z,Le(te._payload),me)}if(Pn(te))return Ne(X,Z,te,me);if(G(te))return Ie(X,Z,te,me);vu(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=yh(te,X.mode,me),Z.return=X,X=Z),P(X)):c(X,Z)}return Rt}var gs=By(!0),Uy=By(!1),xu=Di(null),wu=null,ys=null,Pf=null;function Tf(){Pf=ys=wu=null}function Nf(i){var s=xu.current;vt(xu),i._currentValue=s}function jf(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 vs(i,s){wu=i,Pf=ys=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(An=!0),i.firstContext=null)}function ir(i){var s=i._currentValue;if(Pf!==i)if(i={context:i,memoizedValue:s,next:null},ys===null){if(wu===null)throw Error(n(308));ys=i,wu.dependencies={lanes:0,firstContext:i}}else ys=ys.next=i;return s}var bo=null;function Rf(i){bo===null?bo=[i]:bo.push(i)}function Hy(i,s,c,m){var v=s.interleaved;return v===null?(c.next=c,Rf(s)):(c.next=v.next,v.next=c),s.interleaved=c,ui(i,m)}function ui(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 Li=!1;function If(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wy(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 ci(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Fi(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,ui(i,c)}return v=m.interleaved,v===null?(s.next=s,Rf(m)):(s.next=v.next,v.next=s),m.interleaved=s,ui(i,c)}function bu(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,Wd(i,c)}}function Zy(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 ku(i,s,c,m){var v=i.updateQueue;Li=!1;var w=v.firstBaseUpdate,P=v.lastBaseUpdate,z=v.shared.pending;if(z!==null){v.shared.pending=null;var H=z,re=H.next;H.next=null,P===null?w=re:P.next=re,P=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,z=fe.lastBaseUpdate,z!==P&&(z===null?fe.firstBaseUpdate=re:z.next=re,fe.lastBaseUpdate=H))}if(w!==null){var he=v.baseState;P=0,fe=re=H=null,z=w;do{var de=z.lane,Pe=z.eventTime;if((m&de)===de){fe!==null&&(fe=fe.next={eventTime:Pe,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Ne=i,Ie=z;switch(de=s,Pe=c,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(Pe,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(Pe,he,de):Ne,de==null)break e;he=N({},he,de);break e;case 2:Li=!0}}z.callback!==null&&z.lane!==0&&(i.flags|=64,de=v.effects,de===null?v.effects=[z]:de.push(z))}else Pe={eventTime:Pe,lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},fe===null?(re=fe=Pe,H=he):fe=fe.next=Pe,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&&(H=he),v.baseState=H,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);Co|=P,i.lanes=P,i.memoizedState=he}}function qy(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 Ma={},Br=Di(Ma),La=Di(Ma),Fa=Di(Ma);function ko(i){if(i===Ma)throw Error(n(174));return i}function Af(i,s){switch(mt(Fa,s),mt(La,i),mt(Br,Ma),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(Br),mt(Br,s)}function xs(){vt(Br),vt(La),vt(Fa)}function Qy(i){ko(Fa.current);var s=ko(Br.current),c=ie(s,i.type);s!==c&&(mt(La,i),mt(Br,c))}function Of(i){La.current===i&&(vt(Br),vt(La))}var kt=Di(0);function Su(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 Df=[];function zf(){for(var i=0;i<Df.length;i++)Df[i]._workInProgressVersionPrimary=null;Df.length=0}var Cu=I.ReactCurrentDispatcher,Mf=I.ReactCurrentBatchConfig,So=0,St=null,Vt=null,qt=null,Eu=!1,$a=!1,Va=0,q_=0;function un(){throw Error(n(321))}function Lf(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!br(i[c],s[c]))return!1;return!0}function Ff(i,s,c,m,v,w){if(So=w,St=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Cu.current=i===null||i.memoizedState===null?G_:X_,i=c(m,v),$a){w=0;do{if($a=!1,Va=0,25<=w)throw Error(n(301));w+=1,qt=Vt=null,s.updateQueue=null,Cu.current=J_,i=c(m,v)}while($a)}if(Cu.current=Tu,s=Vt!==null&&Vt.next!==null,So=0,qt=Vt=St=null,Eu=!1,s)throw Error(n(300));return i}function $f(){var i=Va!==0;return Va=0,i}function Ur(){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 or(){if(Vt===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Vt.next;var s=qt===null?St.memoizedState:qt.next;if(s!==null)qt=s,Vt=i;else{if(i===null)throw Error(n(310));Vt=i,i={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},qt===null?St.memoizedState=qt=i:qt=qt.next=i}return qt}function Ba(i,s){return typeof s=="function"?s(i):s}function Vf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=Vt,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,H=null,re=w;do{var fe=re.lane;if((So&fe)===fe)H!==null&&(H=H.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};H===null?(z=H=he,P=m):H=H.next=he,St.lanes|=fe,Co|=fe}re=re.next}while(re!==null&&re!==w);H===null?P=m:H.next=z,br(m,s.memoizedState)||(An=!0),s.memoizedState=m,s.baseState=P,s.baseQueue=H,c.lastRenderedState=m}if(i=c.interleaved,i!==null){v=i;do w=v.lane,St.lanes|=w,Co|=w,v=v.next;while(v!==i)}else v===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Bf(i){var s=or(),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);br(w,s.memoizedState)||(An=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,m]}function Yy(){}function Ky(i,s){var c=St,m=or(),v=s(),w=!br(m.memoizedState,v);if(w&&(m.memoizedState=v,An=!0),m=m.queue,Uf(Jy.bind(null,c,m,i),[i]),m.getSnapshot!==s||w||qt!==null&&qt.memoizedState.tag&1){if(c.flags|=2048,Ua(9,Xy.bind(null,c,m,v,s),void 0,null),Qt===null)throw Error(n(349));(So&30)!==0||Gy(c,s,v)}return v}function Gy(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 Xy(i,s,c,m){s.value=c,s.getSnapshot=m,ev(s)&&tv(i)}function Jy(i,s,c){return c(function(){ev(s)&&tv(i)})}function ev(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!br(i,c)}catch{return!0}}function tv(i){var s=ui(i,1);s!==null&&_r(s,i,1,-1)}function nv(i){var s=Ur();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:i},s.queue=i,i=i.dispatch=K_.bind(null,St,i),[s.memoizedState,i]}function Ua(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 rv(){return or().memoizedState}function _u(i,s,c,m){var v=Ur();St.flags|=i,v.memoizedState=Ua(1|s,c,void 0,m===void 0?null:m)}function Pu(i,s,c,m){var v=or();m=m===void 0?null:m;var w=void 0;if(Vt!==null){var P=Vt.memoizedState;if(w=P.destroy,m!==null&&Lf(m,P.deps)){v.memoizedState=Ua(s,c,w,m);return}}St.flags|=i,v.memoizedState=Ua(1|s,c,w,m)}function iv(i,s){return _u(8390656,8,i,s)}function Uf(i,s){return Pu(2048,8,i,s)}function ov(i,s){return Pu(4,2,i,s)}function sv(i,s){return Pu(4,4,i,s)}function av(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 lv(i,s,c){return c=c!=null?c.concat([i]):null,Pu(4,4,av.bind(null,s,i),c)}function Hf(){}function uv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Lf(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function cv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Lf(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function dv(i,s,c){return(So&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(br(c,s)||(c=Vg(),St.lanes|=c,Co|=c,i.baseState=!0),s)}function Q_(i,s){var c=at;at=c!==0&&4>c?c:4,i(!0);var m=Mf.transition;Mf.transition={};try{i(!1),s()}finally{at=c,Mf.transition=m}}function fv(){return or().memoizedState}function Y_(i,s,c){var m=Ui(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},hv(i))pv(s,c);else if(c=Hy(i,s,c,m),c!==null){var v=yn();_r(c,i,m,v),mv(c,s,m)}}function K_(i,s,c){var m=Ui(i),v={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(hv(i))pv(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,br(z,P)){var H=s.interleaved;H===null?(v.next=v,Rf(s)):(v.next=H.next,H.next=v),s.interleaved=v;return}}catch{}finally{}c=Hy(i,s,v,m),c!==null&&(v=yn(),_r(c,i,m,v),mv(c,s,m))}}function hv(i){var s=i.alternate;return i===St||s!==null&&s===St}function pv(i,s){$a=Eu=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function mv(i,s,c){if((c&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Wd(i,c)}}var Tu={readContext:ir,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},G_={readContext:ir,useCallback:function(i,s){return Ur().memoizedState=[i,s===void 0?null:s],i},useContext:ir,useEffect:iv,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,_u(4194308,4,av.bind(null,s,i),c)},useLayoutEffect:function(i,s){return _u(4194308,4,i,s)},useInsertionEffect:function(i,s){return _u(4,2,i,s)},useMemo:function(i,s){var c=Ur();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Ur();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=Y_.bind(null,St,i),[m.memoizedState,i]},useRef:function(i){var s=Ur();return i={current:i},s.memoizedState=i},useState:nv,useDebugValue:Hf,useDeferredValue:function(i){return Ur().memoizedState=i},useTransition:function(){var i=nv(!1),s=i[0];return i=Q_.bind(null,i[1]),Ur().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=St,v=Ur();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Qt===null)throw Error(n(349));(So&30)!==0||Gy(m,s,c)}v.memoizedState=c;var w={value:c,getSnapshot:s};return v.queue=w,iv(Jy.bind(null,m,w,i),[i]),m.flags|=2048,Ua(9,Xy.bind(null,m,w,c,s),void 0,null),c},useId:function(){var i=Ur(),s=Qt.identifierPrefix;if(xt){var c=li,m=ai;c=(m&~(1<<32-wr(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=Va++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=q_++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},X_={readContext:ir,useCallback:uv,useContext:ir,useEffect:Uf,useImperativeHandle:lv,useInsertionEffect:ov,useLayoutEffect:sv,useMemo:cv,useReducer:Vf,useRef:rv,useState:function(){return Vf(Ba)},useDebugValue:Hf,useDeferredValue:function(i){var s=or();return dv(s,Vt.memoizedState,i)},useTransition:function(){var i=Vf(Ba)[0],s=or().memoizedState;return[i,s]},useMutableSource:Yy,useSyncExternalStore:Ky,useId:fv,unstable_isNewReconciler:!1},J_={readContext:ir,useCallback:uv,useContext:ir,useEffect:Uf,useImperativeHandle:lv,useInsertionEffect:ov,useLayoutEffect:sv,useMemo:cv,useReducer:Bf,useRef:rv,useState:function(){return Bf(Ba)},useDebugValue:Hf,useDeferredValue:function(i){var s=or();return Vt===null?s.memoizedState=i:dv(s,Vt.memoizedState,i)},useTransition:function(){var i=Bf(Ba)[0],s=or().memoizedState;return[i,s]},useMutableSource:Yy,useSyncExternalStore:Ky,useId:fv,unstable_isNewReconciler:!1};function Sr(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 Wf(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 Nu={isMounted:function(i){return(i=i._reactInternals)?go(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Ui(i),w=ci(m,v);w.payload=s,c!=null&&(w.callback=c),s=Fi(i,w,v),s!==null&&(_r(s,i,v,m),bu(s,i,v))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=yn(),v=Ui(i),w=ci(m,v);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=Fi(i,w,v),s!==null&&(_r(s,i,v,m),bu(s,i,v))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),m=Ui(i),v=ci(c,m);v.tag=2,s!=null&&(v.callback=s),s=Fi(i,v,m),s!==null&&(_r(s,i,m,c),bu(s,i,m))}};function gv(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?!Na(c,m)||!Na(v,w):!0}function yv(i,s,c){var m=!1,v=zi,w=s.contextType;return typeof w=="object"&&w!==null?w=ir(w):(v=In(s)?vo:ln.current,m=s.contextTypes,w=(m=m!=null)?fs(i,v):zi),s=new s(c,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Nu,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=v,i.__reactInternalMemoizedMaskedChildContext=w),s}function vv(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&&Nu.enqueueReplaceState(s,s.state,null)}function Zf(i,s,c,m){var v=i.stateNode;v.props=c,v.state=i.memoizedState,v.refs={},If(i);var w=s.contextType;typeof w=="object"&&w!==null?v.context=ir(w):(w=In(s)?vo:ln.current,v.context=fs(i,w)),v.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Wf(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&&Nu.enqueueReplaceState(v,v.state,null),ku(i,c,v,m),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308)}function ws(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 qf(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Qf(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var eP=typeof WeakMap=="function"?WeakMap:Map;function xv(i,s,c){c=ci(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){zu||(zu=!0,uh=m),Qf(i,s)},c}function wv(i,s,c){c=ci(-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(){Qf(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Qf(i,s),typeof m!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var P=s.stack;this.componentDidCatch(s.value,{componentStack:P!==null?P:""})}),c}function bv(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new eP;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=pP.bind(null,i,s,c),s.then(i,i))}function kv(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 Sv(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=ci(-1,1),s.tag=2,Fi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=v,i)}var tP=I.ReactCurrentOwner,An=!1;function gn(i,s,c,m){s.child=i===null?Uy(s,null,c,m):gs(s,i.child,c,m)}function Cv(i,s,c,m,v){c=c.render;var w=s.ref;return vs(s,v),m=Ff(i,s,c,m,w,v),c=$f(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,di(i,s,v)):(xt&&c&&kf(s),s.flags|=1,gn(i,s,m,v),s.child)}function Ev(i,s,c,m,v){if(i===null){var w=c.type;return typeof w=="function"&&!gh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,_v(i,s,w,m,v)):(i=Bu(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:Na,c(P,m)&&i.ref===s.ref)return di(i,s,v)}return s.flags|=1,i=Wi(w,m),i.ref=s.ref,i.return=s,s.child=i}function _v(i,s,c,m,v){if(i!==null){var w=i.memoizedProps;if(Na(w,m)&&i.ref===s.ref)if(An=!1,s.pendingProps=m=w,(i.lanes&v)!==0)(i.flags&131072)!==0&&(An=!0);else return s.lanes=i.lanes,di(i,s,v)}return Yf(i,s,c,m,v)}function Pv(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},mt(ks,Qn),Qn|=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,mt(ks,Qn),Qn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:c,mt(ks,Qn),Qn|=m}else w!==null?(m=w.baseLanes|c,s.memoizedState=null):m=c,mt(ks,Qn),Qn|=m;return gn(i,s,v,c),s.child}function Tv(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Yf(i,s,c,m,v){var w=In(c)?vo:ln.current;return w=fs(s,w),vs(s,v),c=Ff(i,s,c,m,w,v),m=$f(),i!==null&&!An?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~v,di(i,s,v)):(xt&&m&&kf(s),s.flags|=1,gn(i,s,c,v),s.child)}function Nv(i,s,c,m,v){if(In(c)){var w=!0;hu(s)}else w=!1;if(vs(s,v),s.stateNode===null)Ru(i,s),yv(s,c,m),Zf(s,c,m,v),m=!0;else if(i===null){var P=s.stateNode,z=s.memoizedProps;P.props=z;var H=P.context,re=c.contextType;typeof re=="object"&&re!==null?re=ir(re):(re=In(c)?vo:ln.current,re=fs(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||H!==re)&&vv(s,P,m,re),Li=!1;var de=s.memoizedState;P.state=de,ku(s,m,P,v),H=s.memoizedState,z!==m||de!==H||Rn.current||Li?(typeof fe=="function"&&(Wf(s,c,fe,m),H=s.memoizedState),(z=Li||gv(s,c,z,m,de,H,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=H),P.props=m,P.state=H,P.context=re,m=z):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{P=s.stateNode,Wy(i,s),z=s.memoizedProps,re=s.type===s.elementType?z:Sr(s.type,z),P.props=re,he=s.pendingProps,de=P.context,H=c.contextType,typeof H=="object"&&H!==null?H=ir(H):(H=In(c)?vo:ln.current,H=fs(s,H));var Pe=c.getDerivedStateFromProps;(fe=typeof Pe=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(z!==he||de!==H)&&vv(s,P,m,H),Li=!1,de=s.memoizedState,P.state=de,ku(s,m,P,v);var Ne=s.memoizedState;z!==he||de!==Ne||Rn.current||Li?(typeof Pe=="function"&&(Wf(s,c,Pe,m),Ne=s.memoizedState),(re=Li||gv(s,c,re,m,de,Ne,H)||!1)?(fe||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(m,Ne,H),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(m,Ne,H)),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=H,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 Kf(i,s,c,m,w,v)}function Kf(i,s,c,m,v,w){Tv(i,s);var P=(s.flags&128)!==0;if(!m&&!P)return v&&Oy(s,c,!1),di(i,s,w);m=s.stateNode,tP.current=s;var z=P&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&P?(s.child=gs(s,i.child,null,w),s.child=gs(s,null,z,w)):gn(i,s,z,w),s.memoizedState=m.state,v&&Oy(s,c,!0),s.child}function jv(i){var s=i.stateNode;s.pendingContext?Iy(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Iy(i,s.context,!1),Af(i,s.containerInfo)}function Rv(i,s,c,m,v){return ms(),_f(v),s.flags|=256,gn(i,s,c,m),s.child}var Gf={dehydrated:null,treeContext:null,retryLane:0};function Xf(i){return{baseLanes:i,cachePool:null,transitions:null}}function Iv(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),mt(kt,v&1),i===null)return Ef(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=Uu(P,m,0,null),i=To(i,m,c,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=Xf(c),s.memoizedState=Gf,i):Jf(s,P));if(v=i.memoizedState,v!==null&&(z=v.dehydrated,z!==null))return nP(i,s,P,m,z,v,c);if(w){w=m.fallback,P=s.mode,v=i.child,z=v.sibling;var H={mode:"hidden",children:m.children};return(P&1)===0&&s.child!==v?(m=s.child,m.childLanes=0,m.pendingProps=H,s.deletions=null):(m=Wi(v,H),m.subtreeFlags=v.subtreeFlags&14680064),z!==null?w=Wi(z,w):(w=To(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?Xf(c):{baseLanes:P.baseLanes|c,cachePool:null,transitions:P.transitions},w.memoizedState=P,w.childLanes=i.childLanes&~c,s.memoizedState=Gf,m}return w=i.child,i=w.sibling,m=Wi(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 Jf(i,s){return s=Uu({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ju(i,s,c,m){return m!==null&&_f(m),gs(s,i.child,null,c),i=Jf(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function nP(i,s,c,m,v,w,P){if(c)return s.flags&256?(s.flags&=-257,m=qf(Error(n(422))),ju(i,s,P,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,v=s.mode,m=Uu({mode:"visible",children:m.children},v,0,null),w=To(w,v,P,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&gs(s,i.child,null,P),s.child.memoizedState=Xf(P),s.memoizedState=Gf,w);if((s.mode&1)===0)return ju(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=qf(w,m,void 0),ju(i,s,P,m)}if(z=(P&i.childLanes)!==0,An||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,ui(i,v),_r(m,i,v,-1))}return mh(),m=qf(Error(n(421))),ju(i,s,P,m)}return v.data==="$?"?(s.flags|=128,s.child=i.child,s=mP.bind(null,i),v._reactRetry=s,null):(i=w.treeContext,qn=Oi(v.nextSibling),Zn=s,xt=!0,kr=null,i!==null&&(nr[rr++]=ai,nr[rr++]=li,nr[rr++]=xo,ai=i.id,li=i.overflow,xo=s),s=Jf(s,m.children),s.flags|=4096,s)}function Av(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),jf(i.return,s,c)}function eh(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 Ov(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&&Av(i,c,s);else if(i.tag===19)Av(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(mt(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&&Su(i)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),eh(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&&Su(i)===null){s.child=v;break}i=v.sibling,v.sibling=c,c=v,v=i}eh(s,!0,c,null,w);break;case"together":eh(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Ru(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function di(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Co|=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=Wi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Wi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function rP(i,s,c){switch(s.tag){case 3:jv(s),ms();break;case 5:Qy(s);break;case 1:In(s.type)&&hu(s);break;case 4:Af(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,v=s.memoizedProps.value;mt(xu,m._currentValue),m._currentValue=v;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(mt(kt,kt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?Iv(i,s,c):(mt(kt,kt.current&1),i=di(i,s,c),i!==null?i.sibling:null);mt(kt,kt.current&1);break;case 19:if(m=(c&s.childLanes)!==0,(i.flags&128)!==0){if(m)return Ov(i,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),mt(kt,kt.current),m)break;return null;case 22:case 23:return s.lanes=0,Pv(i,s,c)}return di(i,s,c)}var Dv,th,zv,Mv;Dv=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}},th=function(){},zv=function(i,s,c,m){var v=i.memoizedProps;if(v!==m){i=s.stateNode,ko(Br.current);var w=null;switch(c){case"input":v=It(i,v),m=It(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=cu)}pt(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 H=m[re];if(z=v!=null?v[re]:void 0,m.hasOwnProperty(re)&&H!==z&&(H!=null||z!=null))if(re==="style")if(z){for(P in z)!z.hasOwnProperty(P)||H&&H.hasOwnProperty(P)||(c||(c={}),c[P]="");for(P in H)H.hasOwnProperty(P)&&z[P]!==H[P]&&(c||(c={}),c[P]=H[P])}else c||(w||(w=[]),w.push(re,c)),c=H;else re==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,z=z?z.__html:void 0,H!=null&&z!==H&&(w=w||[]).push(re,H)):re==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(re,""+H):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(o.hasOwnProperty(re)?(H!=null&&re==="onScroll"&&yt("scroll",i),w||z===H||(w=[])):(w=w||[]).push(re,H))}c&&(w=w||[]).push("style",c);var re=w;(s.updateQueue=re)&&(s.flags|=4)}},Mv=function(i,s,c,m){c!==m&&(s.flags|=4)};function Ha(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 iP(i,s,c){var m=s.pendingProps;switch(Sf(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 In(s.type)&&fu(),cn(s),null;case 3:return m=s.stateNode,xs(),vt(Rn),vt(ln),zf(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(yu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,kr!==null&&(fh(kr),kr=null))),th(i,s),cn(s),null;case 5:Of(s);var v=ko(Fa.current);if(c=s.type,i!==null&&s.stateNode!=null)zv(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=ko(Br.current),yu(s)){m=s.stateNode,c=s.type;var w=s.memoizedProps;switch(m[Vr]=s,m[Oa]=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<Ra.length;v++)yt(Ra[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)}pt(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&&uu(m.textContent,z,i),v=["children",z]):typeof z=="number"&&m.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&uu(m.textContent,z,i),v=["children",""+z]):o.hasOwnProperty(P)&&z!=null&&P==="onScroll"&&yt("scroll",m)}switch(c){case"input":Ae(m),tr(m,w,!0);break;case"textarea":Ae(m),ge(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=cu)}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=V(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[Vr]=s,i[Oa]=m,Dv(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<Ra.length;v++)yt(Ra[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=It(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}pt(c,v),z=v;for(w in z)if(z.hasOwnProperty(w)){var H=z[w];w==="style"?$t(i,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&_e(i,H)):w==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&ze(i,H):typeof H=="number"&&ze(i,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?H!=null&&w==="onScroll"&&yt("scroll",i):H!=null&&T(i,w,H,P))}switch(c){case"input":Ae(i),tr(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=cu)}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)Mv(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(c=ko(Fa.current),ko(Br.current),yu(s)){if(m=s.stateNode,c=s.memoizedProps,m[Vr]=s,(w=m.nodeValue!==c)&&(i=Zn,i!==null))switch(i.tag){case 3:uu(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&uu(m.nodeValue,c,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[Vr]=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&&qn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)$y(),ms(),s.flags|=98560,w=!1;else if(w=yu(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[Vr]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),w=!1}else kr!==null&&(fh(kr),kr=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?Bt===0&&(Bt=3):mh())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return xs(),th(i,s),i===null&&Ia(s.stateNode.containerInfo),cn(s),null;case 10:return Nf(s.type._context),cn(s),null;case 17:return In(s.type)&&fu(),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)Ha(w,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(P=Su(i),P!==null){for(s.flags|=128,Ha(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 mt(kt,kt.current&1|2),s.child}i=i.sibling}w.tail!==null&&jt()>Ss&&(s.flags|=128,m=!0,Ha(w,!1),s.lanes=4194304)}else{if(!m)if(i=Su(P),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Ha(w,!0),w.tail===null&&w.tailMode==="hidden"&&!P.alternate&&!xt)return cn(s),null}else 2*jt()-w.renderingStartTime>Ss&&c!==1073741824&&(s.flags|=128,m=!0,Ha(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,mt(kt,m?c&1|2:c&1),s):(cn(s),null);case 22:case 23:return ph(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Qn&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 oP(i,s){switch(Sf(s),s.tag){case 1:return In(s.type)&&fu(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return xs(),vt(Rn),vt(ln),zf(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Of(s),null;case 13:if(vt(kt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ms()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(kt),null;case 4:return xs(),null;case 10:return Nf(s.type._context),null;case 22:case 23:return ph(),null;case 24:return null;default:return null}}var Iu=!1,dn=!1,sP=typeof WeakSet=="function"?WeakSet:Set,Te=null;function bs(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Pt(i,s,m)}else c.current=null}function nh(i,s,c){try{c()}catch(m){Pt(i,s,m)}}var Lv=!1;function aP(i,s){if(pf=Xl,i=gy(),sf(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,H=-1,re=0,fe=0,he=i,de=null;t:for(;;){for(var Pe;he!==c||v!==0&&he.nodeType!==3||(z=P+v),he!==w||m!==0&&he.nodeType!==3||(H=P+m),he.nodeType===3&&(P+=he.nodeValue.length),(Pe=he.firstChild)!==null;)de=he,he=Pe;for(;;){if(he===i)break t;if(de===c&&++re===v&&(z=P),de===w&&++fe===m&&(H=P),(Pe=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=Pe}c=z===-1||H===-1?null:{start:z,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(mf={focusedElem:i,selectionRange:c},Xl=!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,Rt=Ne.memoizedState,X=s.stateNode,Z=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Sr(s.type,Ie),Rt);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){Pt(s,s.return,me)}if(i=s.sibling,i!==null){i.return=s.return,Te=i;break}Te=s.return}return Ne=Lv,Lv=!1,Ne}function Wa(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&&nh(s,c,w)}v=v.next}while(v!==m)}}function Au(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 rh(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 Fv(i){var s=i.alternate;s!==null&&(i.alternate=null,Fv(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Vr],delete s[Oa],delete s[xf],delete s[U_],delete s[H_])),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 $v(i){return i.tag===5||i.tag===3||i.tag===4}function Vv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||$v(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 ih(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=cu));else if(m!==4&&(i=i.child,i!==null))for(ih(i,s,c),i=i.sibling;i!==null;)ih(i,s,c),i=i.sibling}function oh(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(oh(i,s,c),i=i.sibling;i!==null;)oh(i,s,c),i=i.sibling}var en=null,Cr=!1;function $i(i,s,c){for(c=c.child;c!==null;)Bv(i,s,c),c=c.sibling}function Bv(i,s,c){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(Zl,c)}catch{}switch(c.tag){case 5:dn||bs(c,s);case 6:var m=en,v=Cr;en=null,$i(i,s,c),en=m,Cr=v,en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(Cr?(i=en,c=c.stateNode,i.nodeType===8?vf(i.parentNode,c):i.nodeType===1&&vf(i,c),Sa(i)):vf(en,c.stateNode));break;case 4:m=en,v=Cr,en=c.stateNode.containerInfo,Cr=!0,$i(i,s,c),en=m,Cr=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)&&nh(c,s,P),v=v.next}while(v!==m)}$i(i,s,c);break;case 1:if(!dn&&(bs(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(z){Pt(c,s,z)}$i(i,s,c);break;case 21:$i(i,s,c);break;case 22:c.mode&1?(dn=(m=dn)||c.memoizedState!==null,$i(i,s,c),dn=m):$i(i,s,c);break;default:$i(i,s,c)}}function Uv(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new sP),s.forEach(function(m){var v=gP.bind(null,i,m);c.has(m)||(c.add(m),m.then(v,v))})}}function Er(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,Cr=!1;break e;case 3:en=z.stateNode.containerInfo,Cr=!0;break e;case 4:en=z.stateNode.containerInfo,Cr=!0;break e}z=z.return}if(en===null)throw Error(n(160));Bv(w,P,v),en=null,Cr=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(re){Pt(v,s,re)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Hv(s,i),s=s.sibling}function Hv(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Er(s,i),Hr(i),m&4){try{Wa(3,i,i.return),Au(3,i)}catch(Ie){Pt(i,i.return,Ie)}try{Wa(5,i,i.return)}catch(Ie){Pt(i,i.return,Ie)}}break;case 1:Er(s,i),Hr(i),m&512&&c!==null&&bs(c,c.return);break;case 5:if(Er(s,i),Hr(i),m&512&&c!==null&&bs(c,c.return),i.flags&32){var v=i.stateNode;try{ze(v,"")}catch(Ie){Pt(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,H=i.updateQueue;if(i.updateQueue=null,H!==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<H.length;P+=2){var fe=H[P],he=H[P+1];fe==="style"?$t(v,he):fe==="dangerouslySetInnerHTML"?_e(v,he):fe==="children"?ze(v,he):T(v,fe,he,re)}switch(z){case"input":an(v,w);break;case"textarea":be(v,w);break;case"select":var de=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!w.multiple;var Pe=w.value;Pe!=null?F(v,!!w.multiple,Pe,!1):de!==!!w.multiple&&(w.defaultValue!=null?F(v,!!w.multiple,w.defaultValue,!0):F(v,!!w.multiple,w.multiple?[]:"",!1))}v[Oa]=w}catch(Ie){Pt(i,i.return,Ie)}}break;case 6:if(Er(s,i),Hr(i),m&4){if(i.stateNode===null)throw Error(n(162));v=i.stateNode,w=i.memoizedProps;try{v.nodeValue=w}catch(Ie){Pt(i,i.return,Ie)}}break;case 3:if(Er(s,i),Hr(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Sa(s.containerInfo)}catch(Ie){Pt(i,i.return,Ie)}break;case 4:Er(s,i),Hr(i);break;case 13:Er(s,i),Hr(i),v=i.child,v.flags&8192&&(w=v.memoizedState!==null,v.stateNode.isHidden=w,!w||v.alternate!==null&&v.alternate.memoizedState!==null||(lh=jt())),m&4&&Uv(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(re=dn)||fe,Er(s,i),dn=re):Er(s,i),Hr(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,Pe=de.child,de.tag){case 0:case 11:case 14:case 15:Wa(4,de,de.return);break;case 1:bs(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){Pt(m,c,Ie)}}break;case 5:bs(de,de.return);break;case 22:if(de.memoizedState!==null){qv(he);continue}}Pe!==null?(Pe.return=de,Te=Pe):qv(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,H=he.memoizedProps.style,P=H!=null&&H.hasOwnProperty("display")?H.display:null,z.style.display=Zt("display",P))}catch(Ie){Pt(i,i.return,Ie)}}}else if(he.tag===6){if(fe===null)try{he.stateNode.nodeValue=re?"":he.memoizedProps}catch(Ie){Pt(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:Er(s,i),Hr(i),m&4&&Uv(i);break;case 21:break;default:Er(s,i),Hr(i)}}function Hr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if($v(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&&(ze(v,""),m.flags&=-33);var w=Vv(i);oh(i,w,v);break;case 3:case 4:var P=m.stateNode.containerInfo,z=Vv(i);ih(i,z,P);break;default:throw Error(n(161))}}catch(H){Pt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function lP(i,s,c){Te=i,Wv(i)}function Wv(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||Iu;if(!P){var z=v.alternate,H=z!==null&&z.memoizedState!==null||dn;z=Iu;var re=dn;if(Iu=P,(dn=H)&&!re)for(Te=v;Te!==null;)P=Te,H=P.child,P.tag===22&&P.memoizedState!==null?Qv(v):H!==null?(H.return=P,Te=H):Qv(v);for(;w!==null;)Te=w,Wv(w),w=w.sibling;Te=v,Iu=z,dn=re}Zv(i)}else(v.subtreeFlags&8772)!==0&&w!==null?(w.return=v,Te=w):Zv(i)}}function Zv(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||Au(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:Sr(s.type,c.memoizedProps);m.componentDidUpdate(v,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&qy(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}qy(s,P,c)}break;case 5:var z=s.stateNode;if(c===null&&s.flags&4){c=z;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.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&&Sa(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&rh(s)}catch(de){Pt(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 qv(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 Qv(i){for(;Te!==null;){var s=Te;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Au(4,s)}catch(H){Pt(s,c,H)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var v=s.return;try{m.componentDidMount()}catch(H){Pt(s,v,H)}}var w=s.return;try{rh(s)}catch(H){Pt(s,w,H)}break;case 5:var P=s.return;try{rh(s)}catch(H){Pt(s,P,H)}}}catch(H){Pt(s,s.return,H)}if(s===i){Te=null;break}var z=s.sibling;if(z!==null){z.return=s.return,Te=z;break}Te=s.return}}var uP=Math.ceil,Ou=I.ReactCurrentDispatcher,sh=I.ReactCurrentOwner,sr=I.ReactCurrentBatchConfig,Je=0,Qt=null,At=null,tn=0,Qn=0,ks=Di(0),Bt=0,Za=null,Co=0,Du=0,ah=0,qa=null,On=null,lh=0,Ss=1/0,fi=null,zu=!1,uh=null,Vi=null,Mu=!1,Bi=null,Lu=0,Qa=0,ch=null,Fu=-1,$u=0;function yn(){return(Je&6)!==0?jt():Fu!==-1?Fu:Fu=jt()}function Ui(i){return(i.mode&1)===0?1:(Je&2)!==0&&tn!==0?tn&-tn:Z_.transition!==null?($u===0&&($u=Vg()),$u):(i=at,i!==0||(i=window.event,i=i===void 0?16:Kg(i.type)),i)}function _r(i,s,c,m){if(50<Qa)throw Qa=0,ch=null,Error(n(185));va(i,c,m),((Je&2)===0||i!==Qt)&&(i===Qt&&((Je&2)===0&&(Du|=c),Bt===4&&Hi(i,tn)),Dn(i,m),c===1&&Je===0&&(s.mode&1)===0&&(Ss=jt()+500,pu&&Mi()))}function Dn(i,s){var c=i.callbackNode;ZE(i,s);var m=Yl(i,i===Qt?tn:0);if(m===0)c!==null&&Lg(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&Lg(c),s===1)i.tag===0?W_(Kv.bind(null,i)):Dy(Kv.bind(null,i)),V_(function(){(Je&6)===0&&Mi()}),c=null;else{switch(Bg(m)){case 1:c=Bd;break;case 4:c=Fg;break;case 16:c=Wl;break;case 536870912:c=$g;break;default:c=Wl}c=ix(c,Yv.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Yv(i,s){if(Fu=-1,$u=0,(Je&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Cs()&&i.callbackNode!==c)return null;var m=Yl(i,i===Qt?tn:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=Vu(i,m);else{s=m;var v=Je;Je|=2;var w=Xv();(Qt!==i||tn!==s)&&(fi=null,Ss=jt()+500,_o(i,s));do try{fP();break}catch(z){Gv(i,z)}while(!0);Tf(),Ou.current=w,Je=v,At!==null?s=0:(Qt=null,tn=0,s=Bt)}if(s!==0){if(s===2&&(v=Ud(i),v!==0&&(m=v,s=dh(i,v))),s===1)throw c=Za,_o(i,0),Hi(i,m),Dn(i,jt()),c;if(s===6)Hi(i,m);else{if(v=i.current.alternate,(m&30)===0&&!cP(v)&&(s=Vu(i,m),s===2&&(w=Ud(i),w!==0&&(m=w,s=dh(i,w))),s===1))throw c=Za,_o(i,0),Hi(i,m),Dn(i,jt()),c;switch(i.finishedWork=v,i.finishedLanes=m,s){case 0:case 1:throw Error(n(345));case 2:Po(i,On,fi);break;case 3:if(Hi(i,m),(m&130023424)===m&&(s=lh+500-jt(),10<s)){if(Yl(i,0)!==0)break;if(v=i.suspendedLanes,(v&m)!==m){yn(),i.pingedLanes|=i.suspendedLanes&v;break}i.timeoutHandle=yf(Po.bind(null,i,On,fi),s);break}Po(i,On,fi);break;case 4:if(Hi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,v=-1;0<m;){var P=31-wr(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*uP(m/1960))-m,10<m){i.timeoutHandle=yf(Po.bind(null,i,On,fi),m);break}Po(i,On,fi);break;case 5:Po(i,On,fi);break;default:throw Error(n(329))}}}return Dn(i,jt()),i.callbackNode===c?Yv.bind(null,i):null}function dh(i,s){var c=qa;return i.current.memoizedState.isDehydrated&&(_o(i,s).flags|=256),i=Vu(i,s),i!==2&&(s=On,On=c,s!==null&&fh(s)),i}function fh(i){On===null?On=i:On.push.apply(On,i)}function cP(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(!br(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 Hi(i,s){for(s&=~ah,s&=~Du,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-wr(s),m=1<<c;i[c]=-1,s&=~m}}function Kv(i){if((Je&6)!==0)throw Error(n(327));Cs();var s=Yl(i,0);if((s&1)===0)return Dn(i,jt()),null;var c=Vu(i,s);if(i.tag!==0&&c===2){var m=Ud(i);m!==0&&(s=m,c=dh(i,m))}if(c===1)throw c=Za,_o(i,0),Hi(i,s),Dn(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Po(i,On,fi),Dn(i,jt()),null}function hh(i,s){var c=Je;Je|=1;try{return i(s)}finally{Je=c,Je===0&&(Ss=jt()+500,pu&&Mi())}}function Eo(i){Bi!==null&&Bi.tag===0&&(Je&6)===0&&Cs();var s=Je;Je|=1;var c=sr.transition,m=at;try{if(sr.transition=null,at=1,i)return i()}finally{at=m,sr.transition=c,Je=s,(Je&6)===0&&Mi()}}function ph(){Qn=ks.current,vt(ks)}function _o(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,$_(c)),At!==null)for(c=At.return;c!==null;){var m=c;switch(Sf(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&fu();break;case 3:xs(),vt(Rn),vt(ln),zf();break;case 5:Of(m);break;case 4:xs();break;case 13:vt(kt);break;case 19:vt(kt);break;case 10:Nf(m.type._context);break;case 22:case 23:ph()}c=c.return}if(Qt=i,At=i=Wi(i.current,null),tn=Qn=s,Bt=0,Za=null,ah=Du=Co=0,On=qa=null,bo!==null){for(s=0;s<bo.length;s++)if(c=bo[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}bo=null}return i}function Gv(i,s){do{var c=At;try{if(Tf(),Cu.current=Tu,Eu){for(var m=St.memoizedState;m!==null;){var v=m.queue;v!==null&&(v.pending=null),m=m.next}Eu=!1}if(So=0,qt=Vt=St=null,$a=!1,Va=0,sh.current=null,c===null||c.return===null){Bt=1,Za=s,At=null;break}e:{var w=i,P=c.return,z=c,H=s;if(s=tn,z.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var re=H,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 Pe=kv(P);if(Pe!==null){Pe.flags&=-257,Sv(Pe,P,z,w,s),Pe.mode&1&&bv(w,re,s),s=Pe,H=re;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(H),s.updateQueue=Ie}else Ne.add(H);break e}else{if((s&1)===0){bv(w,re,s),mh();break e}H=Error(n(426))}}else if(xt&&z.mode&1){var Rt=kv(P);if(Rt!==null){(Rt.flags&65536)===0&&(Rt.flags|=256),Sv(Rt,P,z,w,s),_f(ws(H,z));break e}}w=H=ws(H,z),Bt!==4&&(Bt=2),qa===null?qa=[w]:qa.push(w),w=P;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=xv(w,H,s);Zy(w,X);break e;case 1:z=H;var Z=w.type,te=w.stateNode;if((w.flags&128)===0&&(typeof Z.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Vi===null||!Vi.has(te)))){w.flags|=65536,s&=-s,w.lanes|=s;var me=wv(w,z,s);Zy(w,me);break e}}w=w.return}while(w!==null)}ex(c)}catch(Oe){s=Oe,At===c&&c!==null&&(At=c=c.return);continue}break}while(!0)}function Xv(){var i=Ou.current;return Ou.current=Tu,i===null?Tu:i}function mh(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Qt===null||(Co&268435455)===0&&(Du&268435455)===0||Hi(Qt,tn)}function Vu(i,s){var c=Je;Je|=2;var m=Xv();(Qt!==i||tn!==s)&&(fi=null,_o(i,s));do try{dP();break}catch(v){Gv(i,v)}while(!0);if(Tf(),Je=c,Ou.current=m,At!==null)throw Error(n(261));return Qt=null,tn=0,Bt}function dP(){for(;At!==null;)Jv(At)}function fP(){for(;At!==null&&!ME();)Jv(At)}function Jv(i){var s=rx(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,s===null?ex(i):At=s,sh.current=null}function ex(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=iP(c,s,Qn),c!==null){At=c;return}}else{if(c=oP(c,s),c!==null){c.flags&=32767,At=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,At=null;return}}if(s=s.sibling,s!==null){At=s;return}At=s=i}while(s!==null);Bt===0&&(Bt=5)}function Po(i,s,c){var m=at,v=sr.transition;try{sr.transition=null,at=1,hP(i,s,c,m)}finally{sr.transition=v,at=m}return null}function hP(i,s,c,m){do Cs();while(Bi!==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(qE(i,w),i===Qt&&(At=Qt=null,tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Mu||(Mu=!0,ix(Wl,function(){return Cs(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=sr.transition,sr.transition=null;var P=at;at=1;var z=Je;Je|=4,sh.current=null,aP(i,c),Hv(c,i),A_(mf),Xl=!!pf,mf=pf=null,i.current=c,lP(c),LE(),Je=z,at=P,sr.transition=w}else i.current=c;if(Mu&&(Mu=!1,Bi=i,Lu=v),w=i.pendingLanes,w===0&&(Vi=null),VE(c.stateNode),Dn(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(zu)throw zu=!1,i=uh,uh=null,i;return(Lu&1)!==0&&i.tag!==0&&Cs(),w=i.pendingLanes,(w&1)!==0?i===ch?Qa++:(Qa=0,ch=i):Qa=0,Mi(),null}function Cs(){if(Bi!==null){var i=Bg(Lu),s=sr.transition,c=at;try{if(sr.transition=null,at=16>i?16:i,Bi===null)var m=!1;else{if(i=Bi,Bi=null,Lu=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 H=0;H<z.length;H++){var re=z[H];for(Te=re;Te!==null;){var fe=Te;switch(fe.tag){case 0:case 11:case 15:Wa(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,Pe=fe.return;if(Fv(fe),fe===re){Te=null;break}if(de!==null){de.return=Pe,Te=de;break}Te=Pe}}}var Ne=w.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var Rt=Ie.sibling;Ie.sibling=null,Ie=Rt}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:Wa(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:Au(9,z)}}catch(Oe){Pt(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,Mi(),$r&&typeof $r.onPostCommitFiberRoot=="function")try{$r.onPostCommitFiberRoot(Zl,i)}catch{}m=!0}return m}finally{at=c,sr.transition=s}}return!1}function tx(i,s,c){s=ws(c,s),s=xv(i,s,1),i=Fi(i,s,1),s=yn(),i!==null&&(va(i,1,s),Dn(i,s))}function Pt(i,s,c){if(i.tag===3)tx(i,i,c);else for(;s!==null;){if(s.tag===3){tx(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Vi===null||!Vi.has(m))){i=ws(c,i),i=wv(s,i,1),s=Fi(s,i,1),i=yn(),s!==null&&(va(s,1,i),Dn(s,i));break}}s=s.return}}function pP(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(tn&c)===c&&(Bt===4||Bt===3&&(tn&130023424)===tn&&500>jt()-lh?_o(i,0):ah|=c),Dn(i,s)}function nx(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ql,Ql<<=1,(Ql&130023424)===0&&(Ql=4194304)));var c=yn();i=ui(i,s),i!==null&&(va(i,s,c),Dn(i,c))}function mP(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),nx(i,c)}function gP(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),nx(i,c)}var rx;rx=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Rn.current)An=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return An=!1,rP(i,s,c);An=(i.flags&131072)!==0}else An=!1,xt&&(s.flags&1048576)!==0&&zy(s,gu,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Ru(i,s),i=s.pendingProps;var v=fs(s,ln.current);vs(s,c),v=Ff(null,s,m,i,v,c);var w=$f();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,In(m)?(w=!0,hu(s)):w=!1,s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,If(s),v.updater=Nu,s.stateNode=v,v._reactInternals=s,Zf(s,m,i,c),s=Kf(null,s,m,!0,w,c)):(s.tag=0,xt&&w&&kf(s),gn(null,s,v,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Ru(i,s),i=s.pendingProps,v=m._init,m=v(m._payload),s.type=m,v=s.tag=vP(m),i=Sr(m,i),v){case 0:s=Yf(null,s,m,i,c);break e;case 1:s=Nv(null,s,m,i,c);break e;case 11:s=Cv(null,s,m,i,c);break e;case 14:s=Ev(null,s,m,Sr(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:Sr(m,v),Yf(i,s,m,v,c);case 1:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Nv(i,s,m,v,c);case 3:e:{if(jv(s),i===null)throw Error(n(387));m=s.pendingProps,w=s.memoizedState,v=w.element,Wy(i,s),ku(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=ws(Error(n(423)),s),s=Rv(i,s,m,c,v);break e}else if(m!==v){v=ws(Error(n(424)),s),s=Rv(i,s,m,c,v);break e}else for(qn=Oi(s.stateNode.containerInfo.firstChild),Zn=s,xt=!0,kr=null,c=Uy(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ms(),m===v){s=di(i,s,c);break e}gn(i,s,m,c)}s=s.child}return s;case 5:return Qy(s),i===null&&Ef(s),m=s.type,v=s.pendingProps,w=i!==null?i.memoizedProps:null,P=v.children,gf(m,v)?P=null:w!==null&&gf(m,w)&&(s.flags|=32),Tv(i,s),gn(i,s,P,c),s.child;case 6:return i===null&&Ef(s),null;case 13:return Iv(i,s,c);case 4:return Af(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=gs(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:Sr(m,v),Cv(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,mt(xu,m._currentValue),m._currentValue=P,w!==null)if(br(w.value,P)){if(w.children===v.children&&!Rn.current){s=di(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 H=z.firstContext;H!==null;){if(H.context===m){if(w.tag===1){H=ci(-1,c&-c),H.tag=2;var re=w.updateQueue;if(re!==null){re=re.shared;var fe=re.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),re.pending=H}}w.lanes|=c,H=w.alternate,H!==null&&(H.lanes|=c),jf(w.return,c,s),z.lanes|=c;break}H=H.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),jf(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,vs(s,c),v=ir(v),m=m(v),s.flags|=1,gn(i,s,m,c),s.child;case 14:return m=s.type,v=Sr(m,s.pendingProps),v=Sr(m.type,v),Ev(i,s,m,v,c);case 15:return _v(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,v=s.pendingProps,v=s.elementType===m?v:Sr(m,v),Ru(i,s),s.tag=1,In(m)?(i=!0,hu(s)):i=!1,vs(s,c),yv(s,m,v),Zf(s,m,v,c),Kf(null,s,m,!0,i,c);case 19:return Ov(i,s,c);case 22:return Pv(i,s,c)}throw Error(n(156,s.tag))};function ix(i,s){return Mg(i,s)}function yP(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 ar(i,s,c,m){return new yP(i,s,c,m)}function gh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function vP(i){if(typeof i=="function")return gh(i)?1:0;if(i!=null){if(i=i.$$typeof,i===M)return 11;if(i===U)return 14}return 2}function Wi(i,s){var c=i.alternate;return c===null?(c=ar(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 Bu(i,s,c,m,v,w){var P=2;if(m=i,typeof i=="function")gh(i)&&(P=1);else if(typeof i=="string")P=5;else e:switch(i){case B:return To(c.children,v,w,s);case Q:P=8,v|=8;break;case oe:return i=ar(12,c,s,v|2),i.elementType=oe,i.lanes=w,i;case ne:return i=ar(13,c,s,v),i.elementType=ne,i.lanes=w,i;case W:return i=ar(19,c,s,v),i.elementType=W,i.lanes=w,i;case ee:return Uu(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 U:P=14;break e;case q:P=16,m=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ar(P,c,s,v),s.elementType=i,s.type=m,s.lanes=w,s}function To(i,s,c,m){return i=ar(7,i,m,s),i.lanes=c,i}function Uu(i,s,c,m){return i=ar(22,i,m,s),i.elementType=ee,i.lanes=c,i.stateNode={isHidden:!1},i}function yh(i,s,c){return i=ar(6,i,null,s),i.lanes=c,i}function vh(i,s,c){return s=ar(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function xP(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=Hd(0),this.expirationTimes=Hd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hd(0),this.identifierPrefix=m,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function xh(i,s,c,m,v,w,P,z,H){return i=new xP(i,s,c,z,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=ar(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},If(w),i}function wP(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function ox(i){if(!i)return zi;i=i._reactInternals;e:{if(go(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(In(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(In(c))return Ay(i,c,s)}return s}function sx(i,s,c,m,v,w,P,z,H){return i=xh(c,m,!0,i,v,w,P,z,H),i.context=ox(null),c=i.current,m=yn(),v=Ui(c),w=ci(m,v),w.callback=s??null,Fi(c,w,v),i.current.lanes=v,va(i,v,m),Dn(i,m),i}function Hu(i,s,c,m){var v=s.current,w=yn(),P=Ui(v);return c=ox(c),s.context===null?s.context=c:s.pendingContext=c,s=ci(w,P),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Fi(v,s,P),i!==null&&(_r(i,v,P,w),bu(i,v,P)),P}function Wu(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 ax(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function wh(i,s){ax(i,s),(i=i.alternate)&&ax(i,s)}function bP(){return null}var lx=typeof reportError=="function"?reportError:function(i){console.error(i)};function bh(i){this._internalRoot=i}Zu.prototype.render=bh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Hu(i,s,null,null)},Zu.prototype.unmount=bh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Eo(function(){Hu(null,i,null,null)}),s[oi]=null}};function Zu(i){this._internalRoot=i}Zu.prototype.unstable_scheduleHydration=function(i){if(i){var s=Wg();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ri.length&&s!==0&&s<Ri[c].priority;c++);Ri.splice(c,0,i),c===0&&Qg(i)}};function kh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function qu(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ux(){}function kP(i,s,c,m,v){if(v){if(typeof m=="function"){var w=m;m=function(){var re=Wu(P);w.call(re)}}var P=sx(s,m,i,0,null,!1,!1,"",ux);return i._reactRootContainer=P,i[oi]=P.current,Ia(i.nodeType===8?i.parentNode:i),Eo(),P}for(;v=i.lastChild;)i.removeChild(v);if(typeof m=="function"){var z=m;m=function(){var re=Wu(H);z.call(re)}}var H=xh(i,0,!1,null,null,!1,!1,"",ux);return i._reactRootContainer=H,i[oi]=H.current,Ia(i.nodeType===8?i.parentNode:i),Eo(function(){Hu(s,H,c,m)}),H}function Qu(i,s,c,m,v){var w=c._reactRootContainer;if(w){var P=w;if(typeof v=="function"){var z=v;v=function(){var H=Wu(P);z.call(H)}}Hu(s,P,i,v)}else P=kP(c,s,i,v,m);return Wu(P)}Ug=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=ya(s.pendingLanes);c!==0&&(Wd(s,c|1),Dn(s,jt()),(Je&6)===0&&(Ss=jt()+500,Mi()))}break;case 13:Eo(function(){var m=ui(i,1);if(m!==null){var v=yn();_r(m,i,1,v)}}),wh(i,1)}},Zd=function(i){if(i.tag===13){var s=ui(i,134217728);if(s!==null){var c=yn();_r(s,i,134217728,c)}wh(i,134217728)}},Hg=function(i){if(i.tag===13){var s=Ui(i),c=ui(i,s);if(c!==null){var m=yn();_r(c,i,s,m)}wh(i,s)}},Wg=function(){return at},Zg=function(i,s){var c=at;try{return at=i,s()}finally{at=c}},ns=function(i,s,c){switch(s){case"input":if(an(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=du(m);if(!v)throw Error(n(90));Ve(m),an(m,v)}}}break;case"textarea":be(i,c);break;case"select":s=c.value,s!=null&&F(i,!!c.multiple,s,!1)}},rt=hh,ft=Eo;var SP={usingClientEntryPoint:!1,Events:[Da,cs,du,Bl,He,hh]},Ya={findFiberByHostInstance:yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},CP={bundleType:Ya.bundleType,version:Ya.version,rendererPackageName:Ya.rendererPackageName,rendererConfig:Ya.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=Dg(i),i===null?null:i.stateNode},findFiberByHostInstance:Ya.findFiberByHostInstance||bP,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 Yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yu.isDisabled&&Yu.supportsFiber)try{Zl=Yu.inject(CP),$r=Yu}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SP,zn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kh(s))throw Error(n(200));return wP(i,s,null,c)},zn.createRoot=function(i,s){if(!kh(i))throw Error(n(299));var c=!1,m="",v=lx;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=xh(i,1,!1,null,null,c,!1,m,v),i[oi]=s.current,Ia(i.nodeType===8?i.parentNode:i),new bh(s)},zn.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=Dg(s),i=i===null?null:i.stateNode,i},zn.flushSync=function(i){return Eo(i)},zn.hydrate=function(i,s,c){if(!qu(s))throw Error(n(200));return Qu(null,i,s,!0,c)},zn.hydrateRoot=function(i,s,c){if(!kh(i))throw Error(n(405));var m=c!=null&&c.hydratedSources||null,v=!1,w="",P=lx;if(c!=null&&(c.unstable_strictMode===!0&&(v=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(P=c.onRecoverableError)),s=sx(s,null,i,1,c??null,v,!1,w,P),i[oi]=s.current,Ia(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 Zu(s)},zn.render=function(i,s,c){if(!qu(s))throw Error(n(200));return Qu(null,i,s,!1,c)},zn.unmountComponentAtNode=function(i){if(!qu(i))throw Error(n(40));return i._reactRootContainer?(Eo(function(){Qu(null,null,i,!1,function(){i._reactRootContainer=null,i[oi]=null})}),!0):!1},zn.unstable_batchedUpdates=hh,zn.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!qu(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Qu(i,s,c,!1,m)},zn.version="18.3.1-next-f1338f8080-20240426",zn}var vx;function mb(){if(vx)return _h.exports;vx=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(),_h.exports=IP(),_h.exports}var xx;function AP(){if(xx)return Gu;xx=1;var e=mb();return Gu.createRoot=e.createRoot,Gu.hydrateRoot=e.hydrateRoot,Gu}var OP=AP();const DP=Xo(OP);/**
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 wx="popstate";function zP(e={}){function t(r,o){let{pathname:a,search:l,hash:u}=r.location;return up("",{pathname:a,search:l,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:fl(o)}return LP(t,n,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MP(){return Math.random().toString(36).substring(2,10)}function bx(e,t){return{usr:e.state,key:e.key,idx:t}}function up(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ra(t):t,state:n,key:t&&t.key||r||MP()}}function fl({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 ra(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 LP(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,u="POP",d=null,f=h();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function h(){return(l.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 _=up(k.location,C,E);f=h()+1;let T=bx(_,f),I=k.createHref(_);try{l.pushState(T,"",I)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(I)}a&&d&&d({action:u,location:k.location,delta:1})}function g(C,E){u="REPLACE";let _=up(k.location,C,E);f=h();let T=bx(_,f),I=k.createHref(_);l.replaceState(T,"",I),a&&d&&d({action:u,location:k.location,delta:0})}function S(C){return FP(C)}let k={get action(){return u},get location(){return e(o,l)},listen(C){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(wx,p),d=C,()=>{o.removeEventListener(wx,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 l.go(C)}};return k}function FP(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:fl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function gb(e,t,n="/"){return $P(e,t,n,!1)}function $P(e,t,n,r){let o=typeof t=="string"?ra(t):t,a=ki(o.pathname||"/",n);if(a==null)return null;let l=yb(e);VP(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=XP(a);u=KP(l[d],f,r)}return u}function yb(e,t=[],n=[],r="",o=!1){let a=(l,u,d=o,f)=>{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;Et(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=wi([r,h.relativePath]),x=n.concat(h);l.children&&l.children.length>0&&(Et(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),yb(l.children,t,x,p,d)),!(l.path==null&&!l.index)&&t.push({path:p,score:QP(p,l.index),routesMeta:x})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,u);else for(let f of vb(l.path))a(l,u,!0,f)}),t}function vb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=vb(r.join("/")),u=[];return u.push(...l.map(d=>d===""?a:[a,d].join("/"))),o&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function VP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var BP=/^:[\w-]+$/,UP=3,HP=2,WP=1,ZP=10,qP=-2,kx=e=>e==="*";function QP(e,t){let n=e.split("/"),r=n.length;return n.some(kx)&&(r+=qP),t&&(r+=HP),n.filter(o=>!kx(o)).reduce((o,a)=>o+(BP.test(a)?UP:a===""?WP:ZP),r)}function YP(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 KP(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",p=_c({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},h),x=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=_c({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},h)),!p)return null;Object.assign(o,p.params),l.push({params:o,pathname:wi([a,p.pathname]),pathnameBase:nT(wi([a,p.pathnameBase])),route:x}),p.pathnameBase!=="/"&&(a=wi([a,p.pathnameBase]))}return l}function _c(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=GP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],l=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:p},x)=>{if(h==="*"){let S=u[x]||"";l=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}const g=u[x];return p&&!g?f[h]=void 0:f[h]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:l,pattern:e}}function GP(e,t=!1,n=!0){Or(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,(l,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 XP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Or(!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 ki(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 xb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,JP=e=>xb.test(e);function eT(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ra(e):e,a;if(n)if(JP(n))a=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Or(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?a=Sx(n.substring(1),"/"):a=Sx(n,t)}else a=t;return{pathname:a,search:rT(r),hash:iT(o)}}function Sx(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 Nh(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 tT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wb(e){let t=tT(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function bb(e,t,n,r=!1){let o;typeof e=="string"?o=ra(e):(o={...e},Et(!o.pathname||!o.pathname.includes("?"),Nh("?","pathname","search",o)),Et(!o.pathname||!o.pathname.includes("#"),Nh("#","pathname","hash",o)),Et(!o.search||!o.search.includes("#"),Nh("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,u;if(l==null)u=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),p-=1;o.pathname=x.join("/")}u=p>=0?t[p]:"/"}let d=eT(o,u),f=l&&l!=="/"&&l.endsWith("/"),h=(a||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var wi=e=>e.join("/").replace(/\/\/+/g,"/"),nT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,oT=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 sT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function aT(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Sb(e,t){let n=e;if(typeof n!="string"||!xb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(kb)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),u=ki(l.pathname,t);l.origin===a.origin&&u!=null?n=u+l.search+l.hash:o=!0}catch{Or(!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 Cb=["POST","PUT","PATCH","DELETE"];new Set(Cb);var lT=["GET",...Cb];new Set(lT);var ia=b.createContext(null);ia.displayName="DataRouter";var ed=b.createContext(null);ed.displayName="DataRouterState";var uT=b.createContext(!1),Eb=b.createContext({isTransitioning:!1});Eb.displayName="ViewTransition";var cT=b.createContext(new Map);cT.displayName="Fetchers";var dT=b.createContext(null);dT.displayName="Await";var mr=b.createContext(null);mr.displayName="Navigation";var Nl=b.createContext(null);Nl.displayName="Location";var Ei=b.createContext({outlet:null,matches:[],isDataRoute:!1});Ei.displayName="Route";var lm=b.createContext(null);lm.displayName="RouteError";var _b="REACT_ROUTER_ERROR",fT="REDIRECT",hT="ROUTE_ERROR_RESPONSE";function pT(e){if(e.startsWith(`${_b}:${fT}:{`))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 mT(e){if(e.startsWith(`${_b}:${hT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new oT(t.status,t.statusText,t.data)}catch{}}function gT(e,{relative:t}={}){Et(jl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(mr),{hash:o,pathname:a,search:l}=Rl(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:wi([n,a])),r.createHref({pathname:u,search:l,hash:o})}function jl(){return b.useContext(Nl)!=null}function Jo(){return Et(jl(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Nl).location}var Pb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Tb(e){b.useContext(mr).static||b.useLayoutEffect(e)}function yT(){let{isDataRoute:e}=b.useContext(Ei);return e?jT():vT()}function vT(){Et(jl(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(ia),{basename:t,navigator:n}=b.useContext(mr),{matches:r}=b.useContext(Ei),{pathname:o}=Jo(),a=JSON.stringify(wb(r)),l=b.useRef(!1);return Tb(()=>{l.current=!0}),b.useCallback((d,f={})=>{if(Or(l.current,Pb),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=bb(d,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:wi([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,a,o,e])}b.createContext(null);function Rl(e,{relative:t}={}){let{matches:n}=b.useContext(Ei),{pathname:r}=Jo(),o=JSON.stringify(wb(n));return b.useMemo(()=>bb(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function xT(e,t){return Nb(e,t)}function Nb(e,t,n,r,o){var _;Et(jl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=b.useContext(mr),{matches:l}=b.useContext(Ei),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",h=u?u.pathnameBase:"/",p=u&&u.route;{let T=p&&p.path||"";Rb(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=Jo(),g;if(t){let T=typeof t=="string"?ra(t):t;Et(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=gb(e,{pathname:k});Or(p||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Or(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=CT(C&&C.map(T=>Object.assign({},T,{params:Object.assign({},d,T.params),pathname:wi([h,a.encodeLocation?a.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:wi([h,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),l,n,r,o);return t&&E?b.createElement(Nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function wT(){let e=NT(),t=sT(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},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=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:a},"ErrorBoundary")," or"," ",b.createElement("code",{style:a},"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,l)}var bT=b.createElement(wT,null),jb=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=mT(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Ei.Provider,{value:this.props.routeContext},b.createElement(lm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(kT,{error:e},t):t}};jb.contextType=uT;var jh=new WeakMap;function kT({children:e,error:t}){let{basename:n}=b.useContext(mr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=pT(t.digest);if(r){let o=jh.get(t);if(o)throw o;let a=Sb(r.location,n);if(kb&&!jh.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw jh.set(t,l),l}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function ST({routeContext:e,match:t,children:n}){let r=b.useContext(ia);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Ei.Provider,{value:e},n)}function CT(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 a=e,l=n==null?void 0:n.errors;if(l!=null){let h=a.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);Et(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,d=-1;if(n)for(let h=0;h<a.length;h++){let p=a[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?a=a.slice(0,d+1):a=[a[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:aT(n.matches),errorInfo:p})}:void 0;return a.reduceRight((h,p,x)=>{let g,S=!1,k=null,C=null;n&&(g=l&&p.route.id?l[p.route.id]:void 0,k=p.route.errorElement||bT,u&&(d<0&&x===0?(Rb("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(a.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(ST,{match:p,routeContext:{outlet:h,matches:E,isDataRoute:n!=null},children:T})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement(jb,{location:n.location,revalidation:n.revalidation,component:k,error:g,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function um(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ET(e){let t=b.useContext(ia);return Et(t,um(e)),t}function _T(e){let t=b.useContext(ed);return Et(t,um(e)),t}function PT(e){let t=b.useContext(Ei);return Et(t,um(e)),t}function cm(e){let t=PT(e),n=t.matches[t.matches.length-1];return Et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function TT(){return cm("useRouteId")}function NT(){var r;let e=b.useContext(lm),t=_T("useRouteError"),n=cm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function jT(){let{router:e}=ET("useNavigate"),t=cm("useNavigate"),n=b.useRef(!1);return Tb(()=>{n.current=!0}),b.useCallback(async(o,a={})=>{Or(n.current,Pb),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var Cx={};function Rb(e,t,n){!t&&!Cx[e]&&(Cx[e]=!0,Or(!1,n))}b.memo(RT);function RT({routes:e,future:t,state:n,onError:r}){return Nb(e,void 0,n,r,t)}function gc(e){Et(!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 IT({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:l}){Et(!jl(),"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:a,unstable_useTransitions:l,future:{}}),[u,o,a,l]);typeof n=="string"&&(n=ra(n));let{pathname:f="/",search:h="",hash:p="",state:x=null,key:g="default"}=n,S=b.useMemo(()=>{let k=ki(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 Or(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(mr.Provider,{value:d},b.createElement(Nl.Provider,{children:t,value:S}))}function AT({children:e,location:t}){return xT(cp(e),t)}function cp(e,t=[]){let n=[];return b.Children.forEach(e,(r,o)=>{if(!b.isValidElement(r))return;let a=[...t,o];if(r.type===b.Fragment){n.push.apply(n,cp(r.props.children,a));return}Et(r.type===gc,`[${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>`),Et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||a.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&&(l.children=cp(r.props.children,a)),n.push(l)}),n}var yc="get",vc="application/x-www-form-urlencoded";function td(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function OT(e){return td(e)&&e.tagName.toLowerCase()==="button"}function DT(e){return td(e)&&e.tagName.toLowerCase()==="form"}function zT(e){return td(e)&&e.tagName.toLowerCase()==="input"}function MT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LT(e,t){return e.button===0&&(!t||t==="_self")&&!MT(e)}var Xu=null;function FT(){if(Xu===null)try{new FormData(document.createElement("form"),0),Xu=!1}catch{Xu=!0}return Xu}var $T=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rh(e){return e!=null&&!$T.has(e)?(Or(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vc}"`),null):e}function VT(e,t){let n,r,o,a,l;if(DT(e)){let u=e.getAttribute("action");r=u?ki(u,t):null,n=e.getAttribute("method")||yc,o=Rh(e.getAttribute("enctype"))||vc,a=new FormData(e)}else if(OT(e)||zT(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?ki(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||yc,o=Rh(e.getAttribute("formenctype"))||Rh(u.getAttribute("enctype"))||vc,a=new FormData(u,e),!FT()){let{name:f,type:h,value:p}=e;if(h==="image"){let x=f?`${f}.`:"";a.append(`${x}x`,"0"),a.append(`${x}y`,"0")}else f&&a.append(f,p)}}else{if(td(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=yc,r=null,o=vc,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dm(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&&ki(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function UT(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 HT(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 WT(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await UT(a,n);return l.links?l.links():[]}return[]}));return YT(r.flat(1).filter(HT).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ex(e,t,n,r,o,a){let l=(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 a==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):a==="data"?t.filter((d,f)=>{var p;let h=r.routes[d.route.id];if(!h||!h.hasLoader)return!1;if(l(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 ZT(e,t,{includeHydrateFallback:n}={}){return qT(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function qT(e){return[...new Set(e)]}function QT(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function YT(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(QT(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function Ib(){let e=b.useContext(ia);return dm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function KT(){let e=b.useContext(ed);return dm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var fm=b.createContext(void 0);fm.displayName="FrameworkContext";function Ab(){let e=b.useContext(fm);return dm(e,"You must render this element inside a <HydratedRouter> element"),e}function GT(e,t){let n=b.useContext(fm),[r,o]=b.useState(!1),[a,l]=b.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let k=E=>{E.forEach(_=>{l(_.isIntersecting)})},C=new IntersectionObserver(k,{threshold:.5});return x.current&&C.observe(x.current),()=>{C.disconnect()}}},[e]),b.useEffect(()=>{if(r){let k=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(k)}}},[r]);let g=()=>{o(!0)},S=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,x,{}]:[a,x,{onFocus:Ga(u,g),onBlur:Ga(d,S),onMouseEnter:Ga(f,g),onMouseLeave:Ga(h,S),onTouchStart:Ga(p,g)}]:[!1,x,{}]}function Ga(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function XT({page:e,...t}){let{router:n}=Ib(),r=b.useMemo(()=>gb(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(eN,{page:e,matches:r,...t}):null}function JT(e){let{manifest:t,routeModules:n}=Ab(),[r,o]=b.useState([]);return b.useEffect(()=>{let a=!1;return WT(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function eN({page:e,matches:t,...n}){let r=Jo(),{future:o,manifest:a,routeModules:l}=Ab(),{basename:u}=Ib(),{loaderData:d,matches:f}=KT(),h=b.useMemo(()=>Ex(e,t,f,a,r,"data"),[e,t,f,a,r]),p=b.useMemo(()=>Ex(e,t,f,a,r,"assets"),[e,t,f,a,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=a.routes[_.route.id];!T||!T.hasLoader||(!h.some(O=>O.route.id===_.route.id)&&_.route.id in d&&((I=l[_.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,a,h,t,e,l]),g=b.useMemo(()=>ZT(p,a),[p,a]),S=JT(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 tN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var nN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nN&&(window.__reactRouterVersion="7.12.0")}catch{}function rN({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=b.useRef();o.current==null&&(o.current=zP({window:r,v5Compat:!0}));let a=o.current,[l,u]=b.useState({action:a.action,location:a.location}),d=b.useCallback(f=>{n===!1?u(f):b.startTransition(()=>u(f))},[n]);return b.useLayoutEffect(()=>a.listen(d),[a,d]),b.createElement(IT,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:a,unstable_useTransitions:n})}var Ob=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Db=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,state:u,target:d,to:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},S){let{basename:k,unstable_useTransitions:C}=b.useContext(mr),E=typeof f=="string"&&Ob.test(f),_=Sb(f,k);f=_.to;let T=gT(f,{relative:o}),[I,O,j]=GT(r,g),B=sN(f,{replace:l,state:u,target:d,preventScrollReset:h,relative:o,viewTransition:p,unstable_defaultShouldRevalidate:x,unstable_useTransitions:C});function Q(A){t&&t(A),A.defaultPrevented||B(A)}let oe=b.createElement("a",{...g,...j,href:_.absoluteURL||T,onClick:_.isExternal||a?t:Q,ref:tN(S,O),target:d,"data-discover":!E&&n==="render"?"true":void 0});return I&&!E?b.createElement(b.Fragment,null,oe,b.createElement(XT,{page:T})):oe});Db.displayName="Link";var zb=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:u,children:d,...f},h){let p=Rl(l,{relative:f.relative}),x=Jo(),g=b.useContext(ed),{navigator:S,basename:k}=b.useContext(mr),C=g!=null&&dN(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=ki(T,k)||T);const I=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let O=_===E||!o&&_.startsWith(E)&&_.charAt(I)==="/",j=T!=null&&(T===E||!o&&T.startsWith(E)&&T.charAt(E.length)==="/"),B={isActive:O,isPending:j,isTransitioning:C},Q=O?t:void 0,oe;typeof r=="function"?oe=r(B):oe=[r,O?"active":null,j?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let A=typeof a=="function"?a(B):a;return b.createElement(Db,{...f,"aria-current":Q,className:oe,ref:h,style:A,to:l,viewTransition:u},typeof d=="function"?d(B):d)});zb.displayName="NavLink";var iN=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=yc,action:u,onSubmit:d,relative:f,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:x,...g},S)=>{let{unstable_useTransitions:k}=b.useContext(mr),C=uN(),E=cN(u,{relative:f}),_=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&Ob.test(u),I=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let j=O.nativeEvent.submitter,B=(j==null?void 0:j.getAttribute("formmethod"))||l,Q=()=>C(j||O.currentTarget,{fetcherKey:t,method:B,navigate:n,replace:o,state:a,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})});iN.displayName="Form";function oN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mb(e){let t=b.useContext(ia);return Et(t,oN(e)),t}function sN(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let f=yT(),h=Jo(),p=Rl(e,{relative:a});return b.useCallback(x=>{if(LT(x,t)){x.preventDefault();let g=n!==void 0?n:fl(h)===fl(p),S=()=>f(e,{replace:g,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u});d?b.startTransition(()=>S()):S()}},[h,f,p,n,r,t,e,o,a,l,u,d])}var aN=0,lN=()=>`__${String(++aN)}__`;function uN(){let{router:e}=Mb("useSubmit"),{basename:t}=b.useContext(mr),n=TT(),r=e.fetch,o=e.navigate;return b.useCallback(async(a,l={})=>{let{action:u,method:d,encType:f,formData:h,body:p}=VT(a,t);if(l.navigate===!1){let x=l.fetcherKey||lN();await r(x,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,flushSync:l.flushSync})}else await o(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:p,formMethod:l.method||d,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function cN(e,{relative:t}={}){let{basename:n}=b.useContext(mr),r=b.useContext(Ei);Et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Rl(e||".",{relative:t})},l=Jo();if(e==null){a.search=l.search;let u=new URLSearchParams(a.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();a.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:wi([n,a.pathname])),fl(a)}function dN(e,{relative:t}={}){let n=b.useContext(Eb);Et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Mb("useViewTransitionState"),o=Rl(e,{relative:t});if(!n.isTransitioning)return!1;let a=ki(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=ki(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _c(o.pathname,l)!=null||_c(o.pathname,a)!=null}var Il=mb();const Lb=Xo(Il);var oa=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(){}},fN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gi,om,ib,hN=(ib=class{constructor(){De(this,Gi,fN);De(this,om,!1)}setTimeoutProvider(e){Ce(this,Gi,e)}setTimeout(e,t){return $(this,Gi).setTimeout(e,t)}clearTimeout(e){$(this,Gi).clearTimeout(e)}setInterval(e,t){return $(this,Gi).setInterval(e,t)}clearInterval(e){$(this,Gi).clearInterval(e)}},Gi=new WeakMap,om=new WeakMap,ib),Ro=new hN;function pN(e){setTimeout(e,0)}var Uo=typeof window>"u"||"Deno"in globalThis;function kn(){}function mN(e,t){return typeof e=="function"?e(t):e}function dp(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function so(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function _x(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==hm(l,t.options))return!1}else if(!hl(t.queryKey,l))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||a&&!a(t))}function Px(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ho(t.options.mutationKey)!==Ho(a))return!1}else if(!hl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function hm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ho)(e)}function Ho(e){return JSON.stringify(e,(t,n)=>fp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function hl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hl(e[n],t[n])):!1}var gN=Object.prototype.hasOwnProperty;function $b(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Tx(e)&&Tx(t);if(!r&&!(fp(e)&&fp(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:l[h],x=e[p],g=t[p];if(x===g){d[p]=x,(r?h<a:gN.call(e,p))&&f++;continue}if(x===null||g===null||typeof x!="object"||typeof g!="object"){d[p]=g;continue}const S=$b(x,g,n+1);d[p]=S,S===x&&f++}return a===u&&f===a?e:d}function Pc(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 Tx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fp(e){if(!Nx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Nx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Nx(e){return Object.prototype.toString.call(e)==="[object Object]"}function yN(e){return new Promise(t=>{Ro.setTimeout(t,e)})}function hp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$b(e,t):t}function vN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function xN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pm=Symbol();function Vb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mm(e,t){return typeof e=="function"?e(...t):!!e}function wN(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 Ao,Xi,Fs,ob,bN=(ob=class extends oa{constructor(){super();De(this,Ao);De(this,Xi);De(this,Fs);Ce(this,Fs,t=>{if(!Uo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){$(this,Xi)||this.setEventListener($(this,Fs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Xi))==null||t.call(this),Ce(this,Xi,void 0))}setEventListener(t){var n;Ce(this,Fs,t),(n=$(this,Xi))==null||n.call(this),Ce(this,Xi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Ao)!==t&&(Ce(this,Ao,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof $(this,Ao)=="boolean"?$(this,Ao):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ao=new WeakMap,Xi=new WeakMap,Fs=new WeakMap,ob),gm=new bN;function pp(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});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 kN=pN;function SN(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=kN;const a=u=>{t?e.push(u):o(()=>{n(u)})},l=()=>{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||l()}return d},batchCalls:u=>(...d)=>{a(()=>{u(...d)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var Ht=SN(),$s,Ji,Vs,sb,CN=(sb=class extends oa{constructor(){super();De(this,$s,!0);De(this,Ji);De(this,Vs);Ce(this,Vs,t=>{if(!Uo&&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(){$(this,Ji)||this.setEventListener($(this,Vs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ji))==null||t.call(this),Ce(this,Ji,void 0))}setEventListener(t){var n;Ce(this,Vs,t),(n=$(this,Ji))==null||n.call(this),Ce(this,Ji,t(this.setOnline.bind(this)))}setOnline(t){$(this,$s)!==t&&(Ce(this,$s,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,$s)}},$s=new WeakMap,Ji=new WeakMap,Vs=new WeakMap,sb),Tc=new CN;function EN(e){return Math.min(1e3*2**e,3e4)}function Bb(e){return(e??"online")==="online"?Tc.isOnline():!0}var mp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ub(e){let t=!1,n=0,r;const o=pp(),a=()=>o.status!=="pending",l=k=>{var C;if(!a()){const E=new mp(k);x(E),(C=e.onCancel)==null||C.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>gm.isFocused()&&(e.networkMode==="always"||Tc.isOnline())&&e.canRun(),h=()=>Bb(e.networkMode)&&e.canRun(),p=k=>{a()||(r==null||r(),o.resolve(k))},x=k=>{a()||(r==null||r(),o.reject(k))},g=()=>new Promise(k=>{var C;r=E=>{(a()||f())&&k(E)},(C=e.onPause)==null||C.call(e)}).then(()=>{var k;r=void 0,a()||(k=e.onContinue)==null||k.call(e)}),S=()=>{if(a())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 j;if(a())return;const _=e.retry??(Uo?0:3),T=e.retryDelay??EN,I=typeof T=="function"?T(n,E):T,O=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!O){x(E);return}n++,(j=e.onFail)==null||j.call(e,n,E),yN(I).then(()=>f()?void 0:g()).then(()=>{t?x(E):S()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?S():g().then(S),o)}}var Oo,ab,Hb=(ab=class{constructor(){De(this,Oo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dp(this.gcTime)&&Ce(this,Oo,Ro.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Uo?1/0:300*1e3))}clearGcTimeout(){$(this,Oo)&&(Ro.clearTimeout($(this,Oo)),Ce(this,Oo,void 0))}},Oo=new WeakMap,ab),Do,Bs,lr,zo,Kt,Cl,Mo,Nr,mi,lb,_N=(lb=class extends Hb{constructor(t){super();De(this,Nr);De(this,Do);De(this,Bs);De(this,lr);De(this,zo);De(this,Kt);De(this,Cl);De(this,Mo);Ce(this,Mo,!1),Ce(this,Cl,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ce(this,zo,t.client),Ce(this,lr,$(this,zo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ce(this,Do,Rx(this.options)),this.state=t.state??$(this,Do),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,Kt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,Cl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Rx(this.options);n.data!==void 0&&(this.setState(jx(n.data,n.dataUpdatedAt)),Ce(this,Do,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,lr).remove(this)}setData(t,n){const r=hp(this.state.data,t,this.options);return Ze(this,Nr,mi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,Nr,mi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=$(this,Kt))==null?void 0:r.promise;return(o=$(this,Kt))==null||o.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Do))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>so(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:!Fb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,lr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||($(this,Kt)&&($(this,Mo)?$(this,Kt).cancel({revert:!0}):$(this,Kt).cancelRetry()),this.scheduleGc()),$(this,lr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Nr,mi).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=$(this,Kt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if($(this,Kt))return $(this,Kt).continueRetry(),$(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:()=>(Ce(this,Mo,!0),r.signal)})},a=()=>{const I=Vb(this.options,n),j=(()=>{const B={client:$(this,zo),queryKey:this.queryKey,meta:this.meta};return o(B),B})();return Ce(this,Mo,!1),this.options.persister?this.options.persister(I,j,this):I(j)},u=(()=>{const I={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:$(this,zo),state:this.state,fetchFn:a};return o(I),I})();(f=this.options.behavior)==null||f.onFetch(u,this),Ce(this,Bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&Ze(this,Nr,mi).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Ce(this,Kt,Ub({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:I=>{I instanceof mp&&I.revert&&this.setState({...$(this,Bs),fetchStatus:"idle"}),r.abort()},onFail:(I,O)=>{Ze(this,Nr,mi).call(this,{type:"failed",failureCount:I,error:O})},onPause:()=>{Ze(this,Nr,mi).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Nr,mi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const I=await $(this,Kt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(g=(x=$(this,lr).config).onSuccess)==null||g.call(x,I,this),(k=(S=$(this,lr).config).onSettled)==null||k.call(S,I,this.state.error,this),I}catch(I){if(I instanceof mp){if(I.silent)return $(this,Kt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Ze(this,Nr,mi).call(this,{type:"error",error:I}),(E=(C=$(this,lr).config).onError)==null||E.call(C,I,this),(T=(_=$(this,lr).config).onSettled)==null||T.call(_,this.state.data,I,this),I}finally{this.scheduleGc()}}},Do=new WeakMap,Bs=new WeakMap,lr=new WeakMap,zo=new WeakMap,Kt=new WeakMap,Cl=new WeakMap,Mo=new WeakMap,Nr=new WeakSet,mi=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,...Wb(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...jx(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ce(this,Bs,t.manual?o:void 0),o;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,lr).notify({query:this,type:"updated",action:t})})},lb);function Wb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Rx(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 Ln,Ge,El,xn,Lo,Us,gi,eo,_l,Hs,Ws,Fo,$o,to,Zs,ot,il,gp,yp,vp,xp,wp,bp,kp,Zb,ub,PN=(ub=class extends oa{constructor(t,n){super();De(this,ot);De(this,Ln);De(this,Ge);De(this,El);De(this,xn);De(this,Lo);De(this,Us);De(this,gi);De(this,eo);De(this,_l);De(this,Hs);De(this,Ws);De(this,Fo);De(this,$o);De(this,to);De(this,Zs,new Set);this.options=n,Ce(this,Ln,t),Ce(this,eo,null),Ce(this,gi,pp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Ge).addObserver(this),Ix($(this,Ge),this.options)?Ze(this,ot,il).call(this):this.updateResult(),Ze(this,ot,xp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sp($(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sp($(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,ot,wp).call(this),Ze(this,ot,bp).call(this),$(this,Ge).removeObserver(this)}setOptions(t){const n=this.options,r=$(this,Ge);if(this.options=$(this,Ln).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,$(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,ot,kp).call(this),$(this,Ge).setOptions(this.options),n._defaulted&&!Pc(this.options,n)&&$(this,Ln).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Ge),observer:this});const o=this.hasListeners();o&&Ax($(this,Ge),r,this.options,n)&&Ze(this,ot,il).call(this),this.updateResult(),o&&($(this,Ge)!==r||ur(this.options.enabled,$(this,Ge))!==ur(n.enabled,$(this,Ge))||so(this.options.staleTime,$(this,Ge))!==so(n.staleTime,$(this,Ge)))&&Ze(this,ot,gp).call(this);const a=Ze(this,ot,yp).call(this);o&&($(this,Ge)!==r||ur(this.options.enabled,$(this,Ge))!==ur(n.enabled,$(this,Ge))||a!==$(this,to))&&Ze(this,ot,vp).call(this,a)}getOptimisticResult(t){const n=$(this,Ln).getQueryCache().build($(this,Ln),t),r=this.createResult(n,t);return NN(this,r)&&(Ce(this,xn,r),Ce(this,Us,this.options),Ce(this,Lo,$(this,Ge).state)),r}getCurrentResult(){return $(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&&$(this,gi).status==="pending"&&$(this,gi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){$(this,Zs).add(t)}getCurrentQuery(){return $(this,Ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=$(this,Ln).defaultQueryOptions(t),r=$(this,Ln).getQueryCache().build($(this,Ln),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,ot,il).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,xn)))}createResult(t,n){var oe;const r=$(this,Ge),o=this.options,a=$(this,xn),l=$(this,Lo),u=$(this,Us),f=t!==r?t.state:$(this,El),{state:h}=t;let p={...h},x=!1,g;if(n._optimisticResults){const A=this.hasListeners(),K=!A&&Ix(t,n),M=A&&Ax(t,r,n,o);(K||M)&&(p={...p,...Wb(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;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(A=a.data,E=!0):A=typeof n.placeholderData=="function"?n.placeholderData((oe=$(this,Ws))==null?void 0:oe.state.data,$(this,Ws)):n.placeholderData,A!==void 0&&(C="success",g=hp(a==null?void 0:a.data,A,n),x=!0)}if(n.select&&g!==void 0&&!E)if(a&&g===(l==null?void 0:l.data)&&n.select===$(this,_l))g=$(this,Hs);else try{Ce(this,_l,n.select),g=n.select(g),g=hp(a==null?void 0:a.data,g,n),Ce(this,Hs,g),Ce(this,eo,null)}catch(A){Ce(this,eo,A)}$(this,eo)&&(S=$(this,eo),g=$(this,Hs),k=Date.now(),C="error");const _=p.fetchStatus==="fetching",T=C==="pending",I=C==="error",O=T&&_,j=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&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:I&&j,isStale:ym(t,n),refetch:this.refetch,promise:$(this,gi),isEnabled:ur(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=Q.data!==void 0,K=Q.status==="error"&&!A,M=U=>{K?U.reject(Q.error):A&&U.resolve(Q.data)},ne=()=>{const U=Ce(this,gi,Q.promise=pp());M(U)},W=$(this,gi);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=$(this,xn),n=this.createResult($(this,Ge),this.options);if(Ce(this,Lo,$(this,Ge).state),Ce(this,Us,this.options),$(this,Lo).data!==void 0&&Ce(this,Ws,$(this,Ge)),Pc(n,t))return;Ce(this,xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!$(this,Zs).size)return!0;const l=new Set(a??$(this,Zs));return this.options.throwOnError&&l.add("error"),Object.keys($(this,xn)).some(u=>{const d=u;return $(this,xn)[d]!==t[d]&&l.has(d)})};Ze(this,ot,Zb).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,ot,xp).call(this)}},Ln=new WeakMap,Ge=new WeakMap,El=new WeakMap,xn=new WeakMap,Lo=new WeakMap,Us=new WeakMap,gi=new WeakMap,eo=new WeakMap,_l=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,Fo=new WeakMap,$o=new WeakMap,to=new WeakMap,Zs=new WeakMap,ot=new WeakSet,il=function(t){Ze(this,ot,kp).call(this);let n=$(this,Ge).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},gp=function(){Ze(this,ot,wp).call(this);const t=so(this.options.staleTime,$(this,Ge));if(Uo||$(this,xn).isStale||!dp(t))return;const r=Fb($(this,xn).dataUpdatedAt,t)+1;Ce(this,Fo,Ro.setTimeout(()=>{$(this,xn).isStale||this.updateResult()},r))},yp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Ge)):this.options.refetchInterval)??!1},vp=function(t){Ze(this,ot,bp).call(this),Ce(this,to,t),!(Uo||ur(this.options.enabled,$(this,Ge))===!1||!dp($(this,to))||$(this,to)===0)&&Ce(this,$o,Ro.setInterval(()=>{(this.options.refetchIntervalInBackground||gm.isFocused())&&Ze(this,ot,il).call(this)},$(this,to)))},xp=function(){Ze(this,ot,gp).call(this),Ze(this,ot,vp).call(this,Ze(this,ot,yp).call(this))},wp=function(){$(this,Fo)&&(Ro.clearTimeout($(this,Fo)),Ce(this,Fo,void 0))},bp=function(){$(this,$o)&&(Ro.clearInterval($(this,$o)),Ce(this,$o,void 0))},kp=function(){const t=$(this,Ln).getQueryCache().build($(this,Ln),this.options);if(t===$(this,Ge))return;const n=$(this,Ge);Ce(this,Ge,t),Ce(this,El,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Zb=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n($(this,xn))}),$(this,Ln).getQueryCache().notify({query:$(this,Ge),type:"observerResultsUpdated"})})},ub);function TN(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ix(e,t){return TN(e,t)||e.state.data!==void 0&&Sp(e,t,t.refetchOnMount)}function Sp(e,t,n){if(ur(t.enabled,e)!==!1&&so(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ym(e,t)}return!1}function Ax(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ym(e,n)}function ym(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(so(t.staleTime,e))}function NN(e,t){return!Pc(e.getCurrentResult(),t)}function Ox(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,a=((g=t.state.data)==null?void 0:g.pages)||[],l=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const C=T=>{wN(T,()=>t.signal,()=>k=!0)},E=Vb(t.options,t.fetchOptions),_=async(T,I,O)=>{if(k)return Promise.reject();if(I==null&&T.pages.length)return Promise.resolve(T);const B=(()=>{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(B),{maxPages:oe}=t.options,A=O?xN:vN;return{pages:A(T.pages,Q,oe),pageParams:A(T.pageParams,I,oe)}};if(o&&a.length){const T=o==="backward",I=T?jN:Dx,O={pages:a,pageParams:l},j=I(r,O);u=await _(O,j,T)}else{const T=e??a.length;do{const I=d===0?l[0]??r.initialPageParam:Dx(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 Dx(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 jN(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 Pl,Zr,wn,Vo,qr,Yi,cb,RN=(cb=class extends Hb{constructor(t){super();De(this,qr);De(this,Pl);De(this,Zr);De(this,wn);De(this,Vo);Ce(this,Pl,t.client),this.mutationId=t.mutationId,Ce(this,wn,t.mutationCache),Ce(this,Zr,[]),this.state=t.state||qb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,Zr).includes(t)||($(this,Zr).push(t),this.clearGcTimeout(),$(this,wn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ce(this,Zr,$(this,Zr).filter(n=>n!==t)),this.scheduleGc(),$(this,wn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,Zr).length||(this.state.status==="pending"?this.scheduleGc():$(this,wn).remove(this))}continue(){var t;return((t=$(this,Vo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,f,h,p,x,g,S,k,C,E,_,T,I,O,j,B,Q,oe;const n=()=>{Ze(this,qr,Yi).call(this,{type:"continue"})},r={client:$(this,Pl),meta:this.options.meta,mutationKey:this.options.mutationKey};Ce(this,Vo,Ub({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,K)=>{Ze(this,qr,Yi).call(this,{type:"failed",failureCount:A,error:K})},onPause:()=>{Ze(this,qr,Yi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,wn).canRun(this)}));const o=this.state.status==="pending",a=!$(this,Vo).canStart();try{if(o)n();else{Ze(this,qr,Yi).call(this,{type:"pending",variables:t,isPaused:a}),await((u=(l=$(this,wn).config).onMutate)==null?void 0:u.call(l,t,this,r));const K=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,t,r));K!==this.state.context&&Ze(this,qr,Yi).call(this,{type:"pending",context:K,variables:t,isPaused:a})}const A=await $(this,Vo).start();return await((p=(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=$(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)),Ze(this,qr,Yi).call(this,{type:"success",data:A}),A}catch(A){try{await((T=(_=$(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((B=(j=$(this,wn).config).onSettled)==null?void 0:B.call(j,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 Ze(this,qr,Yi).call(this,{type:"error",error:A}),A}finally{$(this,wn).runNext(this)}}},Pl=new WeakMap,Zr=new WeakMap,wn=new WeakMap,Vo=new WeakMap,qr=new WeakSet,Yi=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),Ht.batch(()=>{$(this,Zr).forEach(r=>{r.onMutationUpdate(t)}),$(this,wn).notify({mutation:this,type:"updated",action:t})})},cb);function qb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yi,jr,Tl,db,IN=(db=class extends oa{constructor(t={}){super();De(this,yi);De(this,jr);De(this,Tl);this.config=t,Ce(this,yi,new Set),Ce(this,jr,new Map),Ce(this,Tl,0)}build(t,n,r){const o=new RN({client:t,mutationCache:this,mutationId:++Ku(this,Tl)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){$(this,yi).add(t);const n=Ju(t);if(typeof n=="string"){const r=$(this,jr).get(n);r?r.push(t):$(this,jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,yi).delete(t)){const n=Ju(t);if(typeof n=="string"){const r=$(this,jr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&$(this,jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ju(t);if(typeof n=="string"){const r=$(this,jr).get(n),o=r==null?void 0:r.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Ju(t);if(typeof n=="string"){const o=(r=$(this,jr).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{$(this,yi).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,yi).clear(),$(this,jr).clear()})}getAll(){return Array.from($(this,yi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Px(n,r))}findAll(t={}){return this.getAll().filter(n=>Px(t,n))}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},yi=new WeakMap,jr=new WeakMap,Tl=new WeakMap,db);function Ju(e){var t;return(t=e.options.scope)==null?void 0:t.id}var vi,no,Fn,xi,bi,xc,Cp,fb,AN=(fb=class extends oa{constructor(n,r){super();De(this,bi);De(this,vi);De(this,no);De(this,Fn);De(this,xi);Ce(this,vi,n),this.setOptions(r),this.bindMethods(),Ze(this,bi,xc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=$(this,vi).defaultMutationOptions(n),Pc(this.options,r)||$(this,vi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:$(this,Fn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ho(r.mutationKey)!==Ho(this.options.mutationKey)?this.reset():((o=$(this,Fn))==null?void 0:o.state.status)==="pending"&&$(this,Fn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=$(this,Fn))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,bi,xc).call(this),Ze(this,bi,Cp).call(this,n)}getCurrentResult(){return $(this,no)}reset(){var n;(n=$(this,Fn))==null||n.removeObserver(this),Ce(this,Fn,void 0),Ze(this,bi,xc).call(this),Ze(this,bi,Cp).call(this)}mutate(n,r){var o;return Ce(this,xi,r),(o=$(this,Fn))==null||o.removeObserver(this),Ce(this,Fn,$(this,vi).getMutationCache().build($(this,vi),this.options)),$(this,Fn).addObserver(this),$(this,Fn).execute(n)}},vi=new WeakMap,no=new WeakMap,Fn=new WeakMap,xi=new WeakMap,bi=new WeakSet,xc=function(){var r;const n=((r=$(this,Fn))==null?void 0:r.state)??qb();Ce(this,no,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Cp=function(n){Ht.batch(()=>{var r,o,a,l,u,d,f,h;if($(this,xi)&&this.hasListeners()){const p=$(this,no).variables,x=$(this,no).context,g={client:$(this,vi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=$(this,xi)).onSuccess)==null||o.call(r,n.data,p,x,g)}catch(S){Promise.reject(S)}try{(l=(a=$(this,xi)).onSettled)==null||l.call(a,n.data,null,p,x,g)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=$(this,xi)).onError)==null||d.call(u,n.error,p,x,g)}catch(S){Promise.reject(S)}try{(h=(f=$(this,xi)).onSettled)==null||h.call(f,void 0,n.error,p,x,g)}catch(S){Promise.reject(S)}}}this.listeners.forEach(p=>{p($(this,no))})})},fb),Qr,hb,ON=(hb=class extends oa{constructor(t={}){super();De(this,Qr);this.config=t,Ce(this,Qr,new Map)}build(t,n,r){const o=n.queryKey,a=n.queryHash??hm(o,n);let l=this.get(a);return l||(l=new _N({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){$(this,Qr).has(t.queryHash)||($(this,Qr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=$(this,Qr).get(t.queryHash);n&&(t.destroy(),n===t&&$(this,Qr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,Qr).get(t)}getAll(){return[...$(this,Qr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_x(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_x(t,r)):n}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Qr=new WeakMap,hb),Tt,ro,io,qs,Qs,oo,Ys,Ks,pb,DN=(pb=class{constructor(e={}){De(this,Tt);De(this,ro);De(this,io);De(this,qs);De(this,Qs);De(this,oo);De(this,Ys);De(this,Ks);Ce(this,Tt,e.queryCache||new ON),Ce(this,ro,e.mutationCache||new IN),Ce(this,io,e.defaultOptions||{}),Ce(this,qs,new Map),Ce(this,Qs,new Map),Ce(this,oo,0)}mount(){Ku(this,oo)._++,$(this,oo)===1&&(Ce(this,Ys,gm.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Tt).onFocus())})),Ce(this,Ks,Tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Tt).onOnline())})))}unmount(){var e,t;Ku(this,oo)._--,$(this,oo)===0&&((e=$(this,Ys))==null||e.call(this),Ce(this,Ys,void 0),(t=$(this,Ks))==null||t.call(this),Ce(this,Ks,void 0))}isFetching(e){return $(this,Tt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,ro).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,Tt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=$(this,Tt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(so(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,Tt).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=$(this,Tt).get(r.queryHash),a=o==null?void 0:o.state.data,l=mN(t,a);if(l!==void 0)return $(this,Tt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ht.batch(()=>$(this,Tt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,Tt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=$(this,Tt);Ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=$(this,Tt);return Ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ht.batch(()=>$(this,Tt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return Ht.batch(()=>($(this,Tt).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=Ht.batch(()=>$(this,Tt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(kn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=$(this,Tt).build(this,t);return n.isStaleByTime(so(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Ox(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Ox(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Tc.isOnline()?$(this,ro).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Tt)}getMutationCache(){return $(this,ro)}getDefaultOptions(){return $(this,io)}setDefaultOptions(e){Ce(this,io,e)}setQueryDefaults(e,t){$(this,qs).set(Ho(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,qs).values()],n={};return t.forEach(r=>{hl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){$(this,Qs).set(Ho(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,Qs).values()],n={};return t.forEach(r=>{hl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,io).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hm(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===pm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,io).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Tt).clear(),$(this,ro).clear()}},Tt=new WeakMap,ro=new WeakMap,io=new WeakMap,qs=new WeakMap,Qs=new WeakMap,oo=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,pb),Qb=b.createContext(void 0),nd=e=>{const t=b.useContext(Qb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zN=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(Qb.Provider,{value:e,children:t})),Yb=b.createContext(!1),MN=()=>b.useContext(Yb);Yb.Provider;function LN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var FN=b.createContext(LN()),$N=()=>b.useContext(FN),VN=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?mm(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])},UN=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||mm(n,[e.error,r])),HN=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))}},WN=(e,t)=>e.isLoading&&e.isFetching&&!t,ZN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qN(e,t,n){var x,g,S,k;const r=MN(),o=$N(),a=nd(),l=a.defaultQueryOptions(e);(g=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||g.call(x,l);const u=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",HN(l),VN(l,o,u),BN(o);const d=!a.getQueryCache().get(l.queryHash),[f]=b.useState(()=>new t(a,l)),h=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const E=p?f.subscribe(Ht.batchCalls(C)):kn;return f.updateResult(),E},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(l)},[l,f]),ZN(l,h))throw zx(l,f,o);if(UN({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;if((k=(S=a.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||k.call(S,l,h),l.experimental_prefetchInRender&&!Uo&&WN(h,r)){const C=d?zx(l,f,o):u==null?void 0:u.promise;C==null||C.catch(kn).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?h:f.trackResult(h)}function Al(e,t){return qN(e,PN)}function QN(e,t){const n=nd(),[r]=b.useState(()=>new AN(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(l=>r.subscribe(Ht.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((l,u)=>{r.mutate(l,u).catch(kn)},[r]);if(o.error&&mm(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}async function YN(){const e=await fetch("/api/tasks");if(!e.ok)throw new Error("Failed to fetch tasks");return e.json()}async function KN(){const e=await fetch("/api/epics");if(!e.ok)throw new Error("Failed to fetch epics");return e.json()}async function GN(){const e=await fetch("/api/project");return e.ok?e.json():null}function XN(){return Al({queryKey:["tasks"],queryFn:YN})}function JN(){return Al({queryKey:["epics"],queryFn:KN})}function ej(){return Al({queryKey:["project"],queryFn:GN})}function rd(){const e=XN(),t=JN(),n=ej();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()}}}function tj(){const e=nd();return QN({mutationFn:async()=>{const t=await fetch("/api/bulk-archive-completed",{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to archive completed items")}return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["epics"]})}})}const Mx=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},nj=(e=>e?Mx(e):Mx),rj=e=>e;function ij(e,t=rj){const n=ae.useSyncExternalStore(e.subscribe,ae.useCallback(()=>t(e.getState()),[e,t]),ae.useCallback(()=>t(e.getInitialState()),[e,t]));return ae.useDebugValue(n),n}const Lx=e=>{const t=nj(e),n=r=>ij(t,r);return Object.assign(n,t),n},oj=(e=>e?Lx(e):Lx),Gs=oj(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 sj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Fx=e=>{const t=aj(e);return t.charAt(0).toUpperCase()+t.slice(1)},Kb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),lj=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 uj={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 cj=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...u},d)=>b.createElement("svg",{ref:d,...uj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Kb("lucide",o),...!a&&!lj(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,h])=>b.createElement(f,h)),...Array.isArray(a)?a:[a]]));/**
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 st=(e,t)=>{const n=b.forwardRef(({className:r,...o},a)=>b.createElement(cj,{ref:a,iconNode:t,className:Kb(`lucide-${sj(Fx(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Fx(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 dj=[["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"}]],Gb=st("archive",dj);/**
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 fj=[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]],Xb=st("arrow-left-to-line",fj);/**
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 hj=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M21 12H7",key:"13ipq5"}],["path",{d:"m15 18 6-6-6-6",key:"6tx3qv"}]],Jb=st("arrow-right-from-line",hj);/**
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 pj=[["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"}]],mj=st("bell-off",pj);/**
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 gj=[["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"}]],yj=st("bell-ring",gj);/**
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 vj=[["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"}]],$x=st("bell",vj);/**
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 xj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ek=st("check",xj);/**
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 wj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tk=st("chevron-down",wj);/**
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 bj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],nk=st("chevron-left",bj);/**
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 kj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],id=st("chevron-right",kj);/**
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 Sj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Cj=st("chevron-up",Sj);/**
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 Ej=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],_j=st("chevrons-up-down",Ej);/**
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 Pj=[["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"}]],Tj=st("git-branch-plus",Pj);/**
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 Nj=[["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"}]],rk=st("git-branch",Nj);/**
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 jj=[["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"}]],ik=st("history",jj);/**
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 Rj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Ij=st("kanban",Rj);/**
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 Aj=[["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"}]],od=st("layers",Aj);/**
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 Oj=[["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"}]],Dj=st("list",Oj);/**
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 zj=[["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"}]],Mj=st("message-square",zj);/**
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 Lj=[["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"}]],Fj=st("moon",Lj);/**
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 $j=[["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"}]],Vj=st("package",$j);/**
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 Bj=[["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"}]],vm=st("pencil",Bj);/**
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 Uj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sd=st("plus",Uj);/**
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 Hj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Wj=st("search",Hj);/**
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 Zj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ol=st("square-check",Zj);/**
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 qj=[["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"}]],Qj=st("square-x",qj);/**
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 Yj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Kj=st("square",Yj);/**
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 Gj=[["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"}]],Xj=st("sun",Gj);/**
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 Jj=[["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"}]],xm=st("trash-2",Jj);/**
217
+ * @license lucide-react v0.562.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const eR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ad=st("x",eR);function Vx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Vx(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Vx(e[o],null)}}}}function ct(...e){return b.useCallback(sa(...e),e)}var tR=Symbol.for("react.lazy"),Nc=am[" use ".trim().toString()];function nR(e){return typeof e=="object"&&e!==null&&"then"in e}function ok(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tR&&"_payload"in e&&nR(e._payload)}function wm(e){const t=rR(e),n=b.forwardRef((r,o)=>{let{children:a,...l}=r;ok(a)&&typeof Nc=="function"&&(a=Nc(a._payload));const u=b.Children.toArray(a),d=u.find(oR);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,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var sk=wm("Slot");function rR(e){const t=b.forwardRef((n,r)=>{let{children:o,...a}=n;if(ok(o)&&typeof Nc=="function"&&(o=Nc(o._payload)),b.isValidElement(o)){const l=aR(o),u=sR(a,o.props);return o.type!==b.Fragment&&(u.ref=r?sa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iR=Symbol("radix.slottable");function oR(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iR}function sR(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function aR(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 ak(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=ak(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function lk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ak(e))&&(r&&(r+=" "),r+=t);return r}const Bx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ux=lk,uk=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ux(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(f=>{const h=n==null?void 0:n[f],p=a==null?void 0:a[f];if(h===null)return null;const x=Bx(h)||Bx(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({...a,...u}[k]):{...a,...u}[k]===C})?[...f,p,x]:f},[]);return Ux(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},lR=(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},uR=(e,t)=>({classGroupId:e,validator:t}),ck=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jc="-",Hx=[],cR="arbitrary..",dR=e=>{const t=hR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return fR(l);const u=l.split(jc),d=u[0]===""&&u.length>1?1:0;return dk(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?lR(f,d):d:f||Hx}return n[l]||Hx}}},dk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const f=dk(e,t+1,a);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(jc):e.slice(t).join(jc),d=l.length;for(let f=0;f<d;f++){const h=l[f];if(h.validator(u))return h.classGroupId}},fR=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?cR+r:void 0})(),hR=e=>{const{theme:t,classGroups:n}=e;return pR(n,t)},pR=(e,t)=>{const n=ck();for(const r in e){const o=e[r];bm(o,n,r,t)}return n},bm=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const l=e[a];mR(l,t,n,r)}},mR=(e,t,n,r)=>{if(typeof e=="string"){gR(e,t,n);return}if(typeof e=="function"){yR(e,t,n,r);return}vR(e,t,n,r)},gR=(e,t,n)=>{const r=e===""?t:fk(t,e);r.classGroupId=n},yR=(e,t,n,r)=>{if(xR(e)){bm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uR(n,e))},vR=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let l=0;l<a;l++){const[u,d]=o[l];bm(d,fk(t,u),n,r)}},fk=(e,t)=>{let n=e;const r=t.split(jc),o=r.length;for(let a=0;a<o;a++){const l=r[a];let u=n.nextPart.get(l);u||(u=ck(),n.nextPart.set(l,u)),n=u}return n},xR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set(a,l){a in n?n[a]=l:o(a,l)}}},Ep="!",Wx=":",bR=[],Zx=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),kR=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let l=0,u=0,d=0,f;const h=o.length;for(let k=0;k<h;k++){const C=o[k];if(l===0&&u===0){if(C===Wx){a.push(o.slice(d,k)),d=k+1;continue}if(C==="/"){f=k;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const p=a.length===0?o:o.slice(d);let x=p,g=!1;p.endsWith(Ep)?(x=p.slice(0,-1),g=!0):p.startsWith(Ep)&&(x=p.slice(1),g=!0);const S=f&&f>d?f-d:void 0;return Zx(a,g,x,S)};if(t){const o=t+Wx,a=r;r=l=>l.startsWith(o)?a(l.slice(o.length)):Zx(bR,!1,l,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},SR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",d=t.has(l);u||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},CR=e=>({cache:wR(e.cacheSize),parseClassName:kR(e),sortModifiers:SR(e),...dR(e)}),ER=/\s+/,_R=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,l=[],u=e.trim().split(ER);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]:a(x).join(":"),T=g?_+Ep:_,I=T+E;if(l.indexOf(I)>-1)continue;l.push(I);const O=o(E,C);for(let j=0;j<O.length;++j){const B=O[j];l.push(T+B)}d=h+(d.length>0?" "+d:d)}return d},PR=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=hk(n))&&(o&&(o+=" "),o+=r);return o},hk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hk(e[r]))&&(n&&(n+=" "),n+=t);return n},TR=(e,...t)=>{let n,r,o,a;const l=d=>{const f=t.reduce((h,p)=>p(h),e());return n=CR(f),r=n.cache.get,o=n.cache.set,a=u,u(d)},u=d=>{const f=r(d);if(f)return f;const h=_R(d,n);return o(d,h),h};return a=l,(...d)=>a(PR(...d))},NR=[],Ut=e=>{const t=n=>n[e]||NR;return t.isThemeGetter=!0,t},pk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jR=/^\d+\/\d+$/,RR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IR=/\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$/,AR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Es=e=>jR.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),qi=e=>!!e&&Number.isInteger(Number(e)),Ih=e=>e.endsWith("%")&&qe(e.slice(0,-1)),hi=e=>RR.test(e),zR=()=>!0,MR=e=>IR.test(e)&&!AR.test(e),gk=()=>!1,LR=e=>OR.test(e),FR=e=>DR.test(e),$R=e=>!je(e)&&!Re(e),VR=e=>aa(e,xk,gk),je=e=>pk.test(e),No=e=>aa(e,wk,MR),Ah=e=>aa(e,ZR,qe),qx=e=>aa(e,yk,gk),BR=e=>aa(e,vk,FR),ec=e=>aa(e,bk,LR),Re=e=>mk.test(e),Xa=e=>la(e,wk),UR=e=>la(e,qR),Qx=e=>la(e,yk),HR=e=>la(e,xk),WR=e=>la(e,vk),tc=e=>la(e,bk,!0),aa=(e,t,n)=>{const r=pk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},la=(e,t,n=!1)=>{const r=mk.exec(e);return r?r[1]?t(r[1]):n:!1},yk=e=>e==="position"||e==="percentage",vk=e=>e==="image"||e==="url",xk=e=>e==="length"||e==="size"||e==="bg-size",wk=e=>e==="length",ZR=e=>e==="number",qR=e=>e==="family-name",bk=e=>e==="shadow",QR=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),r=Ut("font-weight"),o=Ut("tracking"),a=Ut("leading"),l=Ut("breakpoint"),u=Ut("container"),d=Ut("spacing"),f=Ut("radius"),h=Ut("shadow"),p=Ut("inset-shadow"),x=Ut("text-shadow"),g=Ut("drop-shadow"),S=Ut("blur"),k=Ut("perspective"),C=Ut("aspect"),E=Ut("ease"),_=Ut("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(),Re,je],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],Q=()=>[Re,je,d],oe=()=>[Es,"full","auto",...Q()],A=()=>[qi,"none","subgrid",Re,je],K=()=>["auto",{span:["full",qi,Re,je]},qi,Re,je],M=()=>[qi,"auto",Re,je],ne=()=>["auto","min","max","fr",Re,je],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...Q()],ee=()=>[Es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],D=()=>[e,Re,je],G=()=>[...I(),Qx,qx,{position:[Re,je]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",HR,VR,{size:[Re,je]}],Y=()=>[Ih,Xa,No],R=()=>["","none","full",f,Re,je],ue=()=>["",qe,Xa,No],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"],le=()=>[qe,Ih,Qx,qx],ve=()=>["","none",S,Re,je],Ee=()=>["none",qe,Re,je],ke=()=>["none",qe,Re,je],Ae=()=>[qe,Re,je],Ve=()=>[Es,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[zR],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[$R],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hi],shadow:[hi],spacing:["px",qe],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Es,je,Re,C]}],container:["container"],columns:[{columns:[qe,je,Re,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:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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:[qi,"auto",Re,je]}],basis:[{basis:[Es,"full","auto",u,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Es,"auto","initial","none",je]}],grow:[{grow:["",qe,Re,je]}],shrink:[{shrink:["",qe,Re,je]}],order:[{order:[qi,"first","last","none",Re,je]}],"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":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],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:[l]},...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,Xa,No]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Re,Ah]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ih,je]}],"font-family":[{font:[UR,je,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,Re,je]}],"line-clamp":[{"line-clamp":[qe,"none",Re,Ah]}],leading:[{leading:[a,...Q()]}],"list-image":[{"list-image":["none",Re,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,je]}],"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:[qe,"from-font","auto",Re,No]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[qe,"auto",Re,je]}],"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",Re,je]}],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",Re,je]}],"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"]},qi,Re,je],radial:["",Re,je],conic:[qi,Re,je]},WR,BR]}],"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:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"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":[qe,Re,je]}],"outline-w":[{outline:["",qe,Xa,No]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,tc,ec]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,tc,ec]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[qe,No]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",x,tc,ec]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[qe,Re,je]}],"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":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"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":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"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":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"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":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"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":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"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":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"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":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Re,je]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"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":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"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",Re,je]}],filter:[{filter:["","none",Re,je]}],blur:[{blur:ve()}],brightness:[{brightness:[qe,Re,je]}],contrast:[{contrast:[qe,Re,je]}],"drop-shadow":[{"drop-shadow":["","none",g,tc,ec]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",qe,Re,je]}],"hue-rotate":[{"hue-rotate":[qe,Re,je]}],invert:[{invert:["",qe,Re,je]}],saturate:[{saturate:[qe,Re,je]}],sepia:[{sepia:["",qe,Re,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,je]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Re,je]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Re,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Re,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Re,je]}],"backdrop-invert":[{"backdrop-invert":["",qe,Re,je]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Re,je]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Re,je]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Re,je]}],"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",Re,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Re,je]}],ease:[{ease:["linear","initial",E,Re,je]}],delay:[{delay:[qe,Re,je]}],animate:[{animate:["none",_,Re,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Re,je]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],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:[Re,je,"","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",Re,je]}],"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",Re,je]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[qe,Xa,No,Ah]}],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"]}},YR=TR(QR);function Be(...e){return YR(lk(e))}const KR=uk("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"}}),it=b.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,...o},a)=>{const l=r?sk:"button";return y.jsx(l,{ref:a,"data-slot":"button","data-variant":t,"data-size":n,className:Be(KR({variant:t,size:n,className:e})),...o})});it.displayName="Button";const kk=b.createContext(void 0),Sk="theme";function Ck(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function GR(){if(typeof window>"u")return"system";const e=localStorage.getItem(Sk);return e==="light"||e==="dark"||e==="system"?e:"system"}function Yx(e){return e==="system"?Ck():e}function XR({children:e,defaultTheme:t="system",disableTransitionOnChange:n=!1}){const[r,o]=b.useState(()=>typeof window>"u"?t:GR()),[a,l]=b.useState(()=>Yx(r)),u=d=>{o(d),localStorage.setItem(Sk,d)};return b.useEffect(()=>{const d=Yx(r);l(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=()=>{l(Ck())};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[r]),y.jsx(kk.Provider,{value:{theme:r,setTheme:u,resolvedTheme:a},children:e})}function JR(){const e=b.useContext(kk);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function e2(){const{setTheme:e,resolvedTheme:t}=JR(),n=()=>{e(t==="dark"?"light":"dark")};return y.jsxs(it,{variant:"outline",size:"icon",onClick:n,children:[t==="dark"?y.jsx(Fj,{className:"h-4 w-4"}):y.jsx(Xj,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Ye(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 t2(e,t){const n=b.createContext(t),r=a=>{const{children:l,...u}=a,d=b.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(a){const l=b.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ua(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l),d=n.length;n=[...n,l];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=a+"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(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,n2(o,...t)]}function n2(...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(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function r2(e){const t=i2(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(s2);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,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function i2(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=l2(o),u=a2(a,o.props);return o.type!==b.Fragment&&(u.ref=r?sa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o2=Symbol("radix.slottable");function s2(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o2}function a2(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function l2(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 u2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=u2.reduce((e,t)=>{const n=r2(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function c2(e,t){e&&Il.flushSync(()=>e.dispatchEvent(t))}function Bn(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 d2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(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 f2="DismissableLayer",_p="dismissableLayer.update",h2="dismissableLayer.pointerDownOutside",p2="dismissableLayer.focusOutside",Kx,Ek=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ld=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...d}=e,f=b.useContext(Ek),[h,p]=b.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=b.useState({}),S=ct(t,B=>p(B)),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=y2(B=>{const Q=B.target,oe=[...f.branches].some(A=>A.contains(Q));!I||oe||(o==null||o(B),l==null||l(B),B.defaultPrevented||u==null||u())},x),j=v2(B=>{const Q=B.target;[...f.branches].some(A=>A.contains(Q))||(a==null||a(B),l==null||l(B),B.defaultPrevented||u==null||u())},x);return d2(B=>{_===f.layers.size-1&&(r==null||r(B),!B.defaultPrevented&&u&&(B.preventDefault(),u()))},x),b.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Kx=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Gx(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Kx)}},[h,x,n,f]),b.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Gx())},[h,f]),b.useEffect(()=>{const B=()=>g({});return document.addEventListener(_p,B),()=>document.removeEventListener(_p,B)},[]),y.jsx(tt.div,{...d,ref:S,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,O.onPointerDownCapture)})});ld.displayName=f2;var m2="DismissableLayerBranch",g2=b.forwardRef((e,t)=>{const n=b.useContext(Ek),r=b.useRef(null),o=ct(t,r);return b.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),y.jsx(tt.div,{...e,ref:o})});g2.displayName=m2;function y2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let d=function(){_k(h2,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},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function v2(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=b.useRef(!1);return b.useEffect(()=>{const o=a=>{a.target&&!r.current&&_k(p2,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gx(){const e=new CustomEvent(_p);document.dispatchEvent(e)}function _k(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?c2(o,a):o.dispatchEvent(a)}var rn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},x2=am[" useId ".trim().toString()]||(()=>{}),w2=0;function Bo(e){const[t,n]=b.useState(x2());return rn(()=>{n(r=>r??String(w2++))},[e]),e||(t?`radix-${t}`:"")}const b2=["top","right","bottom","left"],lo=Math.min,Gn=Math.max,Rc=Math.round,nc=Math.floor,Gr=e=>({x:e,y:e}),k2={left:"right",right:"left",bottom:"top",top:"bottom"},S2={start:"end",end:"start"};function Pp(e,t,n){return Gn(e,lo(t,n))}function Si(e,t){return typeof e=="function"?e(t):e}function Ci(e){return e.split("-")[0]}function ca(e){return e.split("-")[1]}function km(e){return e==="x"?"y":"x"}function Sm(e){return e==="y"?"height":"width"}const C2=new Set(["top","bottom"]);function Kr(e){return C2.has(Ci(e))?"y":"x"}function Cm(e){return km(Kr(e))}function E2(e,t,n){n===void 0&&(n=!1);const r=ca(e),o=Cm(e),a=Sm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Ic(l)),[l,Ic(l)]}function _2(e){const t=Ic(e);return[Tp(e),t,Tp(t)]}function Tp(e){return e.replace(/start|end/g,t=>S2[t])}const Xx=["left","right"],Jx=["right","left"],P2=["top","bottom"],T2=["bottom","top"];function N2(e,t,n){switch(e){case"top":case"bottom":return n?t?Jx:Xx:t?Xx:Jx;case"left":case"right":return t?P2:T2;default:return[]}}function j2(e,t,n,r){const o=ca(e);let a=N2(Ci(e),n==="start",r);return o&&(a=a.map(l=>l+"-"+o),t&&(a=a.concat(a.map(Tp)))),a}function Ic(e){return e.replace(/left|right|bottom|top/g,t=>k2[t])}function R2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pk(e){return typeof e!="number"?R2(e):{top:e,right:e,bottom:e,left:e}}function Ac(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 ew(e,t,n){let{reference:r,floating:o}=e;const a=Kr(t),l=Cm(t),u=Sm(l),d=Ci(t),f=a==="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(ca(t)){case"start":g[l]-=x*(n&&f?-1:1);break;case"end":g[l]+=x*(n&&f?-1:1);break}return g}const I2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=ew(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:l,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 l.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:h,y:p}=ew(f,x,d)),k=-1)}return{x:h,y:p,placement:x,strategy:o,middlewareData:g}};async function pl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:x=!1,padding:g=0}=Si(t,e),S=Pk(g),C=u[x?p==="floating"?"reference":"floating":p],E=Ac(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:d})),_=p==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),I=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Ac(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.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 A2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:h=0}=Si(e,t)||{};if(f==null)return{};const p=Pk(h),x={x:n,y:r},g=Cm(o),S=Sm(g),k=await l.getDimensions(f),C=g==="y",E=C?"top":"left",_=C?"bottom":"right",T=C?"clientHeight":"clientWidth",I=a.reference[S]+a.reference[g]-x[g]-a.floating[S],O=x[g]-a.reference[g],j=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let B=j?j[T]:0;(!B||!await(l.isElement==null?void 0:l.isElement(j)))&&(B=u.floating[T]||a.floating[S]);const Q=I/2-O/2,oe=B/2-k[S]/2-1,A=lo(p[E],oe),K=lo(p[_],oe),M=A,ne=B-k[S]-K,W=B/2-k[S]/2+Q,U=Pp(M,W,ne),q=!d.arrow&&ca(o)!=null&&W!==U&&a.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]:U,centerOffset:W-U-ee,...q&&{alignmentOffset:ee}},reset:q}}}),O2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:l,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}=Si(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Ci(o),_=Kr(u),T=Ci(u)===u,I=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=x||(T||!k?[Ic(u)]:_2(u)),j=S!=="none";!x&&j&&O.push(...j2(u,k,S,I));const B=[u,...O],Q=await pl(t,C),oe=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&oe.push(Q[E]),p){const W=E2(o,l,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=a.flip)==null?void 0:K.index)||0)+1,U=B[W];if(U&&(!(p==="alignment"?_!==Kr(U):!1)||A.every(D=>Kr(D.placement)===_?D.overflows[0]>0:!0)))return{data:{index:W,overflows:A},reset:{placement:U}};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(j){const G=Kr(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 tw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nw(e){return b2.some(t=>e[t]>=0)}const D2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Si(e,t);switch(r){case"referenceHidden":{const a=await pl(t,{...o,elementContext:"reference"}),l=tw(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:nw(l)}}}case"escaped":{const a=await pl(t,{...o,altBoundary:!0}),l=tw(a,n.floating);return{data:{escapedOffsets:l,escaped:nw(l)}}}default:return{}}}}},Tk=new Set(["left","top"]);async function z2(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Ci(n),u=ca(n),d=Kr(n)==="y",f=Tk.has(l)?-1:1,h=a&&d?-1:1,p=Si(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 M2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:l,middlewareData:u}=t,d=await z2(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:l}}}}},L2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:C=>{let{x:E,y:_}=C;return{x:E,y:_}}},...d}=Si(e,t),f={x:n,y:r},h=await pl(t,d),p=Kr(Ci(o)),x=km(p);let g=f[x],S=f[p];if(a){const C=x==="y"?"top":"left",E=x==="y"?"bottom":"right",_=g+h[C],T=g-h[E];g=Pp(_,g,T)}if(l){const C=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=S+h[C],T=S-h[E];S=Pp(_,S,T)}const k=u.fn({...t,[x]:g,[p]:S});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[x]:a,[p]:l}}}}}},F2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Si(e,t),h={x:n,y:r},p=Kr(o),x=km(p);let g=h[x],S=h[p];const k=Si(u,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const T=x==="y"?"height":"width",I=a.reference[x]-a.floating[T]+C.mainAxis,O=a.reference[x]+a.reference[T]-C.mainAxis;g<I?g=I:g>O&&(g=O)}if(f){var E,_;const T=x==="y"?"width":"height",I=Tk.has(Ci(o)),O=a.reference[p]-a.floating[T]+(I&&((E=l.offset)==null?void 0:E[p])||0)+(I?0:C.crossAxis),j=a.reference[p]+a.reference[T]+(I?0:((_=l.offset)==null?void 0:_[p])||0)-(I?C.crossAxis:0);S<O?S=O:S>j&&(S=j)}return{[x]:g,[p]:S}}}},$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Si(e,t),h=await pl(t,f),p=Ci(o),x=ca(o),g=Kr(o)==="y",{width:S,height:k}=a.floating;let C,E;p==="top"||p==="bottom"?(C=p,E=x===(await(l.isRTL==null?void 0:l.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=lo(k-h[C],_),O=lo(S-h[E],T),j=!t.middlewareData.shift;let B=I,Q=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(Q=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=_),j&&!x){const A=Gn(h.left,0),K=Gn(h.right,0),M=Gn(h.top,0),ne=Gn(h.bottom,0);g?Q=S-2*(A!==0||K!==0?A+K:Gn(h.left,h.right)):B=k-2*(M!==0||ne!==0?M+ne:Gn(h.top,h.bottom))}await d({...t,availableWidth:Q,availableHeight:B});const oe=await l.getDimensions(u.floating);return S!==oe.width||k!==oe.height?{reset:{rects:!0}}:{}}}};function ud(){return typeof window<"u"}function da(e){return Nk(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=(Nk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nk(e){return ud()?e instanceof Node||e instanceof Jn(e).Node:!1}function Dr(e){return ud()?e instanceof Element||e instanceof Jn(e).Element:!1}function Xr(e){return ud()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function rw(e){return!ud()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const V2=new Set(["inline","contents"]);function Dl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!V2.has(o)}const B2=new Set(["table","td","th"]);function U2(e){return B2.has(da(e))}const H2=[":popover-open",":modal"];function cd(e){return H2.some(t=>{try{return e.matches(t)}catch{return!1}})}const W2=["transform","translate","scale","rotate","perspective"],Z2=["transform","translate","scale","rotate","perspective","filter"],q2=["paint","layout","strict","content"];function Em(e){const t=_m(),n=Dr(e)?zr(e):e;return W2.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)||Z2.some(r=>(n.willChange||"").includes(r))||q2.some(r=>(n.contain||"").includes(r))}function Q2(e){let t=uo(e);for(;Xr(t)&&!Xs(t);){if(Em(t))return t;if(cd(t))return null;t=uo(t)}return null}function _m(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Y2=new Set(["html","body","#document"]);function Xs(e){return Y2.has(da(e))}function zr(e){return Jn(e).getComputedStyle(e)}function dd(e){return Dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(da(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rw(e)&&e.host||ei(e);return rw(t)?t.host:t}function jk(e){const t=uo(e);return Xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xr(t)&&Dl(t)?t:jk(t)}function ml(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=jk(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),l=Jn(o);if(a){const u=Np(l);return t.concat(l,l.visualViewport||[],Dl(o)?o:[],u&&n?ml(u):[])}return t.concat(o,ml(o,[],n))}function Np(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rk(e){const t=zr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xr(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Rc(n)!==a||Rc(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function Pm(e){return Dr(e)?e:e.contextElement}function Ds(e){const t=Pm(e);if(!Xr(t))return Gr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Rk(t);let l=(a?Rc(n.width):n.width)/r,u=(a?Rc(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const K2=Gr(0);function Ik(e){const t=Jn(e);return!_m()||!t.visualViewport?K2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function G2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Pm(e);let l=Gr(1);t&&(r?Dr(r)&&(l=Ds(r)):l=Ds(e));const u=G2(a,n,r)?Ik(a):Gr(0);let d=(o.left+u.x)/l.x,f=(o.top+u.y)/l.y,h=o.width/l.x,p=o.height/l.y;if(a){const x=Jn(a),g=r&&Dr(r)?Jn(r):r;let S=x,k=Np(S);for(;k&&r&&g!==S;){const C=Ds(k),E=k.getBoundingClientRect(),_=zr(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=Jn(k),k=Np(S)}}return Ac({width:h,height:p,x:d,y:f})}function fd(e,t){const n=dd(e).scrollLeft;return t?t.left+n:Wo(ei(e)).left+n}function Ak(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fd(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function X2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",l=ei(r),u=t?cd(t.floating):!1;if(r===l||u&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Gr(1);const h=Gr(0),p=Xr(r);if((p||!p&&!a)&&((da(r)!=="body"||Dl(l))&&(d=dd(r)),Xr(r))){const g=Wo(r);f=Ds(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const x=l&&!p&&!a?Ak(l,d):Gr(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 J2(e){return Array.from(e.getClientRects())}function eI(e){const t=ei(e),n=dd(e),r=e.ownerDocument.body,o=Gn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Gn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fd(e);const u=-n.scrollTop;return zr(r).direction==="rtl"&&(l+=Gn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:l,y:u}}const iw=25;function tI(e,t){const n=Jn(e),r=ei(e),o=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,d=0;if(o){a=o.width,l=o.height;const h=_m();(!h||h&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}const f=fd(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<=iw&&(a-=S)}else f<=iw&&(a+=f);return{width:a,height:l,x:u,y:d}}const nI=new Set(["absolute","fixed"]);function rI(e,t){const n=Wo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Xr(e)?Ds(e):Gr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:l,height:u,x:d,y:f}}function ow(e,t,n){let r;if(t==="viewport")r=tI(e,n);else if(t==="document")r=eI(ei(e));else if(Dr(t))r=rI(t,n);else{const o=Ik(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ac(r)}function Ok(e,t){const n=uo(e);return n===t||!Dr(n)||Xs(n)?!1:zr(n).position==="fixed"||Ok(n,t)}function iI(e,t){const n=t.get(e);if(n)return n;let r=ml(e,[],!1).filter(u=>Dr(u)&&da(u)!=="body"),o=null;const a=zr(e).position==="fixed";let l=a?uo(e):e;for(;Dr(l)&&!Xs(l);){const u=zr(l),d=Em(l);!d&&u.position==="fixed"&&(o=null),(a?!d&&!o:!d&&u.position==="static"&&!!o&&nI.has(o.position)||Dl(l)&&!d&&Ok(e,l))?r=r.filter(h=>h!==l):o=u,l=uo(l)}return t.set(e,r),r}function oI(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?cd(t)?[]:iI(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,h)=>{const p=ow(t,h,o);return f.top=Gn(p.top,f.top),f.right=lo(p.right,f.right),f.bottom=lo(p.bottom,f.bottom),f.left=Gn(p.left,f.left),f},ow(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function sI(e){const{width:t,height:n}=Rk(e);return{width:t,height:n}}function aI(e,t,n){const r=Xr(t),o=ei(t),a=n==="fixed",l=Wo(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=Gr(0);function f(){d.x=fd(o)}if(r||!r&&!a)if((da(t)!=="body"||Dl(o))&&(u=dd(t)),r){const g=Wo(t,!0,a,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&f();a&&!r&&o&&f();const h=o&&!r&&!a?Ak(o,u):Gr(0),p=l.left+u.scrollLeft-d.x-h.x,x=l.top+u.scrollTop-d.y-h.y;return{x:p,y:x,width:l.width,height:l.height}}function Oh(e){return zr(e).position==="static"}function sw(e,t){if(!Xr(e)||zr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ei(e)===n&&(n=n.ownerDocument.body),n}function Dk(e,t){const n=Jn(e);if(cd(e))return n;if(!Xr(e)){let o=uo(e);for(;o&&!Xs(o);){if(Dr(o)&&!Oh(o))return o;o=uo(o)}return n}let r=sw(e,t);for(;r&&U2(r)&&Oh(r);)r=sw(r,t);return r&&Xs(r)&&Oh(r)&&!Em(r)?n:r||Q2(e)||n}const lI=async function(e){const t=this.getOffsetParent||Dk,n=this.getDimensions,r=await n(e.floating);return{reference:aI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uI(e){return zr(e).direction==="rtl"}const cI={convertOffsetParentRelativeRectToViewportRelativeRect:X2,getDocumentElement:ei,getClippingRect:oI,getOffsetParent:Dk,getElementRects:lI,getClientRects:J2,getDimensions:sI,getScale:Ds,isElement:Dr,isRTL:uI};function zk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dI(e,t){let n=null,r;const o=ei(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:x,height:g}=f;if(u||t(),!x||!g)return;const S=nc(p),k=nc(o.clientWidth-(h+x)),C=nc(o.clientHeight-(p+g)),E=nc(h),T={rootMargin:-S+"px "+-k+"px "+-C+"px "+-E+"px",threshold:Gn(0,lo(1,d))||1};let I=!0;function O(j){const B=j[0].intersectionRatio;if(B!==d){if(!I)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!zk(f,e.getBoundingClientRect())&&l(),I=!1}try{n=new IntersectionObserver(O,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return l(!0),a}function fI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Pm(e),h=o||a?[...f?ml(f):[],...ml(t)]:[];h.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const p=f&&u?dI(f,n):null;let x=-1,g=null;l&&(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?Wo(e):null;d&&C();function C(){const E=Wo(e);k&&!zk(k,E)&&n(),k=E,S=requestAnimationFrame(C)}return n(),()=>{var E;h.forEach(_=>{o&&_.removeEventListener("scroll",n),a&&_.removeEventListener("resize",n)}),p==null||p(),(E=g)==null||E.disconnect(),g=null,d&&cancelAnimationFrame(S)}}const hI=M2,pI=L2,mI=O2,gI=$2,yI=D2,aw=A2,vI=F2,xI=(e,t,n)=>{const r=new Map,o={platform:cI,...n},a={...o.platform,_c:r};return I2(e,t,{...o,platform:a})};var wI=typeof document<"u",bI=function(){},wc=wI?b.useLayoutEffect:bI;function Oc(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(!Oc(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 a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Oc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Mk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lw(e,t){const n=Mk(e);return Math.round(t*n)/n}function Dh(e){const t=b.useRef(e);return wc(()=>{t.current=e}),t}function kI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},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);Oc(x,r)||g(r);const[S,k]=b.useState(null),[C,E]=b.useState(null),_=b.useCallback(D=>{D!==j.current&&(j.current=D,k(D))},[]),T=b.useCallback(D=>{D!==B.current&&(B.current=D,E(D))},[]),I=a||S,O=l||C,j=b.useRef(null),B=b.useRef(null),Q=b.useRef(h),oe=d!=null,A=Dh(d),K=Dh(o),M=Dh(f),ne=b.useCallback(()=>{if(!j.current||!B.current)return;const D={placement:t,strategy:n,middleware:x};K.current&&(D.platform=K.current),xI(j.current,B.current,D).then(G=>{const N={...G,isPositioned:M.current!==!1};W.current&&!Oc(Q.current,N)&&(Q.current=N,Il.flushSync(()=>{p(N)}))})},[x,t,n,K,M]);wc(()=>{f===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[f]);const W=b.useRef(!1);wc(()=>(W.current=!0,()=>{W.current=!1}),[]),wc(()=>{if(I&&(j.current=I),O&&(B.current=O),I&&O){if(A.current)return A.current(I,O,ne);ne()}},[I,O,ne,A,oe]);const U=b.useMemo(()=>({reference:j,floating:B,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=lw(q.floating,h.x),N=lw(q.floating,h.y);return u?{...D,transform:"translate("+G+"px, "+N+"px)",...Mk(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:U,elements:q,floatingStyles:ee}),[h,ne,U,q,ee])}const SI=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?aw({element:r.current,padding:o}).fn(n):{}:r?aw({element:r,padding:o}).fn(n):{}}}},CI=(e,t)=>({...hI(e),options:[e,t]}),EI=(e,t)=>({...pI(e),options:[e,t]}),_I=(e,t)=>({...vI(e),options:[e,t]}),PI=(e,t)=>({...mI(e),options:[e,t]}),TI=(e,t)=>({...gI(e),options:[e,t]}),NI=(e,t)=>({...yI(e),options:[e,t]}),jI=(e,t)=>({...SI(e),options:[e,t]});var RI="Arrow",Lk=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return y.jsx(tt.svg,{...a,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"})})});Lk.displayName=RI;var II=Lk;function AI(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 a=o[0];let l,u;if("borderBoxSize"in a){const d=a.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Tm="Popper",[Fk,hd]=ua(Tm),[OI,$k]=Fk(Tm),Vk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return y.jsx(OI,{scope:t,anchor:r,onAnchorChange:o,children:n})};Vk.displayName=Tm;var Bk="PopperAnchor",Uk=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=$k(Bk,n),l=b.useRef(null),u=ct(t,l),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||l.current,f!==d.current&&a.onAnchorChange(d.current)}),r?null:y.jsx(tt.div,{...o,ref:u})});Uk.displayName=Bk;var Nm="PopperContent",[DI,zI]=Fk(Nm),Hk=b.forwardRef((e,t)=>{var le,ve,Ee,ke,Ae,Ve;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=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=$k(Nm,n),[E,_]=b.useState(null),T=ct(t,nt=>_(nt)),[I,O]=b.useState(null),j=AI(I),B=(j==null?void 0:j.width)??0,Q=(j==null?void 0:j.height)??0,oe=r+(a!=="center"?"-"+a:""),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(LI),altBoundary:M},{refs:W,floatingStyles:U,placement:q,isPositioned:ee,middlewareData:D}=kI({strategy:"fixed",placement:oe,whileElementsMounted:(...nt)=>fI(...nt,{animationFrame:g==="always"}),elements:{reference:C.anchor},middleware:[CI({mainAxis:o+Q,alignmentAxis:l}),d&&EI({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?_I():void 0,...ne}),d&&PI({...ne}),TI({...ne,apply:({elements:nt,rects:It,availableWidth:sn,availableHeight:Gt})=>{const{width:an,height:tr}=It.reference,_n=nt.floating.style;_n.setProperty("--radix-popper-available-width",`${sn}px`),_n.setProperty("--radix-popper-available-height",`${Gt}px`),_n.setProperty("--radix-popper-anchor-width",`${an}px`),_n.setProperty("--radix-popper-anchor-height",`${tr}px`)}}),I&&jI({element:I,padding:u}),FI({arrowWidth:B,arrowHeight:Q}),x&&NI({strategy:"referenceHidden",...ne})]}),[G,N]=qk(q),L=Bn(S);rn(()=>{ee&&(L==null||L())},[ee,L]);const Y=(le=D.arrow)==null?void 0:le.x,R=(ve=D.arrow)==null?void 0:ve.y,ue=((Ee=D.arrow)==null?void 0:Ee.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:{...U,transform:ee?U.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(DI,{scope:n,placedSide:G,onArrowChange:O,arrowX:Y,arrowY:R,shouldHideArrow:ue,children:y.jsx(tt.div,{"data-side":G,"data-align":N,...k,ref:T,style:{...k.style,animation:ee?void 0:"none"}})})})});Hk.displayName=Nm;var Wk="PopperArrow",MI={top:"bottom",right:"left",bottom:"top",left:"right"},Zk=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=zI(Wk,r),l=MI[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(II,{...o,ref:n,style:{...o.style,display:"block"}})})});Zk.displayName=Wk;function LI(e){return e!==null}var FI=e=>({name:"transformOrigin",options:e,fn(t){var C,E,_;const{placement:n,rects:r,middlewareData:o}=t,l=((C=o.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=qk(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=l?p:`${x}px`,k=`${-d}px`):f==="top"?(S=l?p:`${x}px`,k=`${r.floating.height+d}px`):f==="right"?(S=`${-d}px`,k=l?p:`${g}px`):f==="left"&&(S=`${r.floating.width+d}px`,k=l?p:`${g}px`),{data:{x:S,y:k}}}});function qk(e){const[t,n="center"]=e.split("-");return[t,n]}var Qk=Vk,Yk=Uk,Kk=Hk,Gk=Zk,$I="Portal",pd=b.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,a]=b.useState(!1);rn(()=>a(!0),[]);const l=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?Lb.createPortal(y.jsx(tt.div,{...r,ref:t}),l):null});pd.displayName=$I;function VI(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ti=e=>{const{present:t,children:n}=e,r=BI(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),a=ct(r.ref,UI(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:a}):null};ti.displayName="Presence";function BI(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),a=b.useRef("none"),l=e?"mounted":"unmounted",[u,d]=VI(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=rc(r.current);a.current=u==="mounted"?f:"none"},[u]),rn(()=>{const f=r.current,h=o.current;if(h!==e){const x=a.current,g=rc(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=rc(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&&(a.current=rc(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 rc(e){return(e==null?void 0:e.animationName)||"none"}function UI(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 HI=Symbol("radix.slottable");function WI(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=HI,t}var ZI=am[" useInsertionEffect ".trim().toString()]||rn;function Dc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,l]=qI({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=QI(h)?h(e):h;x!==e&&((p=l.current)==null||p.call(l,x))}else a(h)},[u,e,a,l]);return[d,f]}function qI({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),a=b.useRef(t);return ZI(()=>{a.current=t},[t]),b.useEffect(()=>{var l;o.current!==n&&((l=a.current)==null||l.call(a,n),o.current=n)},[n,o]),[n,r,a]}function QI(e){return typeof e=="function"}var Xk=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"}),YI="VisuallyHidden",Jk=b.forwardRef((e,t)=>y.jsx(tt.span,{...e,ref:t,style:{...Xk,...e.style}}));Jk.displayName=YI;var KI=Jk,[md]=ua("Tooltip",[hd]),gd=hd(),e1="TooltipProvider",GI=700,jp="tooltip.open",[XI,jm]=md(e1),t1=e=>{const{__scopeTooltip:t,delayDuration:n=GI,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,l=b.useRef(!0),u=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(XI,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:b.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};t1.displayName=e1;var gl="Tooltip",[JI,zl]=md(gl),n1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,d=jm(gl,e.__scopeTooltip),f=gd(t),[h,p]=b.useState(null),x=Bo(),g=b.useRef(0),S=l??d.disableHoverableContent,k=u??d.delayDuration,C=b.useRef(!1),[E,_]=Dc({prop:r,defaultProp:o??!1,onChange:B=>{B?(d.onOpen(),document.dispatchEvent(new CustomEvent(jp))):d.onClose(),a==null||a(B)},caller:gl}),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)},[_]),j=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(Qk,{...f,children:y.jsx(JI,{scope:t,contentId:x,open:E,stateAttribute:T,trigger:h,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?j():I()},[d.isOpenDelayedRef,j,I]),onTriggerLeave:b.useCallback(()=>{S?O():(window.clearTimeout(g.current),g.current=0)},[O,S]),onOpen:I,onClose:O,disableHoverableContent:S,children:n})})};n1.displayName=gl;var Rp="TooltipTrigger",r1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zl(Rp,n),a=jm(Rp,n),l=gd(n),u=b.useRef(null),d=ct(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(Yk,{asChild:!0,...l,children:y.jsx(tt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:Ye(e.onPointerMove,x=>{x.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ye(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:Ye(e.onBlur,o.onClose),onClick:Ye(e.onClick,o.onClose)})})});r1.displayName=Rp;var Rm="TooltipPortal",[eA,tA]=md(Rm,{forceMount:void 0}),i1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=zl(Rm,t);return y.jsx(eA,{scope:t,forceMount:n,children:y.jsx(ti,{present:n||a.open,children:y.jsx(pd,{asChild:!0,container:o,children:r})})})};i1.displayName=Rm;var Js="TooltipContent",o1=b.forwardRef((e,t)=>{const n=tA(Js,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,l=zl(Js,e.__scopeTooltip);return y.jsx(ti,{present:r||l.open,children:l.disableHoverableContent?y.jsx(s1,{side:o,...a,ref:t}):y.jsx(nA,{side:o,...a,ref:t})})}),nA=b.forwardRef((e,t)=>{const n=zl(Js,e.__scopeTooltip),r=jm(Js,e.__scopeTooltip),o=b.useRef(null),a=ct(t,o),[l,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},_=sA(E,C.getBoundingClientRect()),T=aA(E,_),I=lA(k.getBoundingClientRect()),O=cA([...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(l){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=!uA(E,l);_?x():T&&(x(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,h,l,f,x]),y.jsx(s1,{...e,ref:a})}),[rA,iA]=md(gl,{isInside:!1}),oA=WI("TooltipContent"),s1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,d=zl(Js,n),f=gd(n),{onClose:h}=d;return b.useEffect(()=>(document.addEventListener(jp,h),()=>document.removeEventListener(jp,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(ld,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:y.jsxs(Kk,{"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(oA,{children:r}),y.jsx(rA,{scope:n,isInside:!0,children:y.jsx(KI,{id:d.contentId,role:"tooltip",children:o||r})})]})})});o1.displayName=Js;var a1="TooltipArrow",l1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gd(n);return iA(a1,n).isInside?null:y.jsx(Gk,{...o,...r,ref:t})});l1.displayName=a1;function sA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function aA(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 lA(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 uA(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],d=t[l],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 cA(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),dA(t)}function dA(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 a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.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 a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.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 fA=t1,hA=n1,pA=r1,mA=i1,gA=o1,yA=l1;function vA({delayDuration:e=0,...t}){return y.jsx(fA,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function xA({...e}){return y.jsx(hA,{"data-slot":"tooltip",...e})}function wA({...e}){return y.jsx(pA,{"data-slot":"tooltip-trigger",...e})}function bA({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(mA,{children:y.jsxs(gA,{"data-slot":"tooltip-content",sideOffset:t,className:Be("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(yA,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function yl(){return typeof window<"u"&&"Notification"in window}function kA(){return yl()?Notification.permission:"denied"}async function SA(){return yl()?Notification.requestPermission():"denied"}function CA(e){if(!yl()||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 EA(){const[e,t]=b.useState(!1),[n,r]=b.useState("default");if(b.useEffect(()=>{t(!0),yl()&&r(kA())},[]),!e)return y.jsx(it,{variant:"outline",size:"icon",disabled:!0,children:y.jsx($x,{className:"h-4 w-4"})});if(!yl())return null;const o=async()=>{if(n==="granted")return;const u=await SA();r(u)},a=()=>{switch(n){case"granted":return y.jsx(yj,{className:"h-4 w-4"});case"denied":return y.jsx(mj,{className:"h-4 w-4"});default:return y.jsx($x,{className:"h-4 w-4"})}},l=()=>{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(xA,{children:[y.jsx(wA,{asChild:!0,children:y.jsxs(it,{variant:"outline",size:"icon",onClick:o,disabled:n==="denied",children:[a(),y.jsx("span",{className:"sr-only",children:l()})]})}),y.jsx(bA,{sideOffset:8,children:y.jsx("p",{children:l()})})]})}const _A=[{to:"/",label:"Kanban",icon:Ij},{to:"/list",label:"List",icon:Dj},{to:"/history",label:"History",icon:ik}];function PA({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(Tj,{}),y.jsx("h1",{className:"text-lg font-bold",children:"trekker"})]}),y.jsx("nav",{className:"flex items-center gap-1",children:_A.map(({to:n,label:r,icon:o})=>y.jsxs(zb,{to:n,end:n==="/",className:({isActive:a})=>Be("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",a?"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(Vj,{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(it,{size:"sm",onClick:t,children:[y.jsx(sd,{className:"mr-1 h-4 w-4"}),"New"]}),y.jsx(EA,{}),y.jsx(e2,{})]})]})]})}const TA={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 NA({status:e}){const t=TA[e];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:Be("h-2 w-2 rounded-full",t.color)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:t.label})]})}var zh="focusScope.autoFocusOnMount",Mh="focusScope.autoFocusOnUnmount",uw={bubbles:!1,cancelable:!0},jA="FocusScope",Im=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[u,d]=b.useState(null),f=Bn(o),h=Bn(a),p=b.useRef(null),x=ct(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:Ki(p.current,{select:!0})},C=function(T){if(g.paused||!u)return;const I=T.relatedTarget;I!==null&&(u.contains(I)||Ki(p.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Ki(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){dw.add(g);const k=document.activeElement;if(!u.contains(k)){const E=new CustomEvent(zh,uw);u.addEventListener(zh,f),u.dispatchEvent(E),E.defaultPrevented||(RA(zA(u1(u)),{select:!0}),document.activeElement===k&&Ki(u))}return()=>{u.removeEventListener(zh,f),setTimeout(()=>{const E=new CustomEvent(Mh,uw);u.addEventListener(Mh,h),u.dispatchEvent(E),E.defaultPrevented||Ki(k??document.body,{select:!0}),u.removeEventListener(Mh,h),dw.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]=IA(_);T&&I?!k.shiftKey&&E===I?(k.preventDefault(),n&&Ki(T,{select:!0})):k.shiftKey&&E===T&&(k.preventDefault(),n&&Ki(I,{select:!0})):E===_&&k.preventDefault()}},[n,r,g.paused]);return y.jsx(tt.div,{tabIndex:-1,...l,ref:x,onKeyDown:S})});Im.displayName=jA;function RA(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ki(r,{select:t}),document.activeElement!==n)return}function IA(e){const t=u1(e),n=cw(t,e),r=cw(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 cw(e,t){for(const n of e)if(!AA(n,{upTo:t}))return n}function AA(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 OA(e){return e instanceof HTMLInputElement&&"select"in e}function Ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&OA(e)&&t&&e.select()}}var dw=DA();function DA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fw(e,t),e.unshift(t)},remove(t){var n;e=fw(e,t),(n=e[0])==null||n.resume()}}}function fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zA(e){return e.filter(t=>t.tagName!=="A")}var Lh=0;function c1(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hw()),document.body.insertAdjacentElement("beforeend",e[1]??hw()),Lh++,()=>{Lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lh--}},[])}function hw(){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 Yr=function(){return Yr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Yr.apply(this,arguments)};function d1(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 MA(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var bc="right-scroll-bar-position",kc="width-before-scroll-bar",LA="with-scroll-bars-hidden",FA="--removed-body-scroll-bar-size";function Fh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $A(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 VA=typeof window<"u"?b.useLayoutEffect:b.useEffect,pw=new WeakMap;function BA(e,t){var n=$A(null,function(r){return e.forEach(function(o){return Fh(o,r)})});return VA(function(){var r=pw.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(u){a.has(u)||Fh(u,null)}),a.forEach(function(u){o.has(u)||Fh(u,l)})}pw.set(n,e)},[e]),n}function UA(e){return e}function HA(e,t){t===void 0&&(t=UA);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(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var d=function(){var h=l;l=[],h.forEach(a)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(h){l.push(h),f()},filter:function(h){return l=l.filter(h),n}}}};return o}function WA(e){e===void 0&&(e={});var t=HA(null);return t.options=Yr({async:!0,ssr:!1},e),t}var f1=function(e){var t=e.sideCar,n=d1(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,Yr({},n))};f1.isSideCarExport=!0;function ZA(e,t){return e.useMedium(t),f1}var h1=WA(),$h=function(){},yd=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:$h,onWheelCapture:$h,onTouchMoveCapture:$h}),o=r[0],a=r[1],l=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=d1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=x,j=BA([n,t]),B=Yr(Yr({},I),o);return b.createElement(b.Fragment,null,h&&b.createElement(O,{sideCar:h1,removeScrollBar:f,shards:p,noRelative:g,noIsolation:S,inert:k,setCallbacks:a,allowPinchZoom:!!C,lockRef:n,gapMode:T}),l?b.cloneElement(b.Children.only(u),Yr(Yr({},B),{ref:j})):b.createElement(_,Yr({},B,{className:d,ref:j}),u))});yd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yd.classNames={fullWidth:kc,zeroRight:bc};var qA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function QA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qA();return t&&e.setAttribute("nonce",t),e}function YA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function KA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=QA())&&(YA(t,n),KA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},XA=function(){var e=GA();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},p1=function(){var e=XA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},JA={left:0,top:0,right:0,gap:0},Vh=function(e){return parseInt(e||"",10)||0},eO=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[Vh(n),Vh(r),Vh(o)]},tO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JA;var t=eO(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])}},nO=p1(),zs="data-scroll-locked",rO=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
222
+ .`.concat(LA,` {
223
+ overflow: hidden `).concat(r,`;
224
+ padding-right: `).concat(u,"px ").concat(r,`;
225
+ }
226
+ body[`).concat(zs,`] {
227
+ overflow: hidden `).concat(r,`;
228
+ overscroll-behavior: contain;
229
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
230
+ padding-left: `.concat(o,`px;
231
+ padding-top: `).concat(a,`px;
232
+ padding-right: `).concat(l,`px;
233
+ margin-left:0;
234
+ margin-top:0;
235
+ margin-right: `).concat(u,"px ").concat(r,`;
236
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
237
+ }
238
+
239
+ .`).concat(bc,` {
240
+ right: `).concat(u,"px ").concat(r,`;
241
+ }
242
+
243
+ .`).concat(kc,` {
244
+ margin-right: `).concat(u,"px ").concat(r,`;
245
+ }
246
+
247
+ .`).concat(bc," .").concat(bc,` {
248
+ right: 0 `).concat(r,`;
249
+ }
250
+
251
+ .`).concat(kc," .").concat(kc,` {
252
+ margin-right: 0 `).concat(r,`;
253
+ }
254
+
255
+ body[`).concat(zs,`] {
256
+ `).concat(FA,": ").concat(u,`px;
257
+ }
258
+ `)},mw=function(){var e=parseInt(document.body.getAttribute(zs)||"0",10);return isFinite(e)?e:0},iO=function(){b.useEffect(function(){return document.body.setAttribute(zs,(mw()+1).toString()),function(){var e=mw()-1;e<=0?document.body.removeAttribute(zs):document.body.setAttribute(zs,e.toString())}},[])},oO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;iO();var a=b.useMemo(function(){return tO(o)},[o]);return b.createElement(nO,{styles:rO(a,!t,o,n?"":"!important")})},Ip=!1;if(typeof window<"u")try{var ic=Object.defineProperty({},"passive",{get:function(){return Ip=!0,!0}});window.addEventListener("test",ic,ic),window.removeEventListener("test",ic,ic)}catch{Ip=!1}var _s=Ip?{passive:!1}:!1,sO=function(e){return e.tagName==="TEXTAREA"},m1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sO(e)&&n[t]==="visible")},aO=function(e){return m1(e,"overflowY")},lO=function(e){return m1(e,"overflowX")},gw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=g1(e,r);if(o){var a=y1(e,r),l=a[1],u=a[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},g1=function(e,t){return e==="v"?aO(t):lO(t)},y1=function(e,t){return e==="v"?uO(t):cO(t)},dO=function(e,t){return e==="h"&&t==="rtl"?-1:1},fO=function(e,t,n,r,o){var a=dO(e,window.getComputedStyle(t).direction),l=a*r,u=n.target,d=t.contains(u),f=!1,h=l>0,p=0,x=0;do{if(!u)break;var g=y1(e,u),S=g[0],k=g[1],C=g[2],E=k-C-a*S;(S||E)&&g1(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},oc=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},hO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pO=function(e){return`
259
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
260
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
261
+ `)},mO=0,Ps=[];function gO(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(mO++)[0],a=b.useState(p1)[0],l=b.useRef(e);b.useEffect(function(){l.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var k=MA([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!l.current.allowPinchZoom;var E=oc(k),_=n.current,T="deltaX"in k?k.deltaX:_[0]-E[0],I="deltaY"in k?k.deltaY:_[1]-E[1],O,j=k.target,B=Math.abs(T)>Math.abs(I)?"h":"v";if("touches"in k&&B==="h"&&j.type==="range")return!1;var Q=window.getSelection(),oe=Q&&Q.anchorNode,A=oe?oe===j||oe.contains(j):!1;if(A)return!1;var K=gw(B,j);if(!K)return!0;if(K?O=B:(O=B==="v"?"h":"v",K=gw(B,j)),!K)return!1;if(!r.current&&"changedTouches"in k&&(T||I)&&(r.current=O),!O)return!0;var M=r.current||O;return fO(M,C,k,M==="h"?T:I)},[]),d=b.useCallback(function(k){var C=k;if(!(!Ps.length||Ps[Ps.length-1]!==a)){var E="deltaY"in C?yw(C):oc(C),_=t.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&hO(O.delta,E)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var T=(l.current.shards||[]).map(vw).filter(Boolean).filter(function(O){return O.contains(C.target)}),I=T.length>0?u(C,T[0]):!l.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),f=b.useCallback(function(k,C,E,_){var T={name:k,delta:C,target:E,should:_,shadowParent:yO(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=oc(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,oc(k),k.target,u(k,e.lockRef.current))},[]);b.useEffect(function(){return Ps.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,_s),document.addEventListener("touchmove",d,_s),document.addEventListener("touchstart",h,_s),function(){Ps=Ps.filter(function(k){return k!==a}),document.removeEventListener("wheel",d,_s),document.removeEventListener("touchmove",d,_s),document.removeEventListener("touchstart",h,_s)}},[]);var g=e.removeScrollBar,S=e.inert;return b.createElement(b.Fragment,null,S?b.createElement(a,{styles:pO(o)}):null,g?b.createElement(oO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vO=ZA(h1,gO);var Am=b.forwardRef(function(e,t){return b.createElement(yd,Yr({},e,{ref:t,sideCar:vO}))});Am.classNames=yd.classNames;var xO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ts=new WeakMap,sc=new WeakMap,ac={},Bh=0,v1=function(e){return e&&(e.host||v1(e.parentNode))},wO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=v1(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})},bO=function(e,t,n,r){var o=wO(t,Array.isArray(e)?e:[e]);ac[n]||(ac[n]=new WeakMap);var a=ac[n],l=[],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=(Ts.get(x)||0)+1,C=(a.get(x)||0)+1;Ts.set(x,k),a.set(x,C),l.push(x),k===1&&S&&sc.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(),Bh++,function(){l.forEach(function(p){var x=Ts.get(p)-1,g=a.get(p)-1;Ts.set(p,x),a.set(p,g),x||(sc.has(p)||p.removeAttribute(r),sc.delete(p)),g||p.removeAttribute(n)}),Bh--,Bh||(Ts=new WeakMap,Ts=new WeakMap,sc=new WeakMap,ac={})}},x1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),bO(r,o,n,"aria-hidden")):function(){return null}};function kO(e){const t=SO(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(EO);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,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function SO(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=PO(o),u=_O(a,o.props);return o.type!==b.Fragment&&(u.ref=r?sa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CO=Symbol("radix.slottable");function EO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CO}function _O(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].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)}var vd="Dialog",[w1]=ua(vd),[TO,Mr]=w1(vd),b1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=b.useRef(null),d=b.useRef(null),[f,h]=Dc({prop:r,defaultProp:o??!1,onChange:a,caller:vd});return y.jsx(TO,{scope:t,triggerRef:u,contentRef:d,contentId:Bo(),titleId:Bo(),descriptionId:Bo(),open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};b1.displayName=vd;var k1="DialogTrigger",NO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mr(k1,n),a=ct(t,o.triggerRef);return y.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zm(o.open),...r,ref:a,onClick:Ye(e.onClick,o.onOpenToggle)})});NO.displayName=k1;var Om="DialogPortal",[jO,S1]=w1(Om,{forceMount:void 0}),C1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Mr(Om,t);return y.jsx(jO,{scope:t,forceMount:n,children:b.Children.map(r,l=>y.jsx(ti,{present:n||a.open,children:y.jsx(pd,{asChild:!0,container:o,children:l})}))})};C1.displayName=Om;var zc="DialogOverlay",E1=b.forwardRef((e,t)=>{const n=S1(zc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Mr(zc,e.__scopeDialog);return a.modal?y.jsx(ti,{present:r||a.open,children:y.jsx(IO,{...o,ref:t})}):null});E1.displayName=zc;var RO=kO("DialogOverlay.RemoveScroll"),IO=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mr(zc,n);return y.jsx(Am,{as:RO,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(tt.div,{"data-state":zm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Zo="DialogContent",_1=b.forwardRef((e,t)=>{const n=S1(Zo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Mr(Zo,e.__scopeDialog);return y.jsx(ti,{present:r||a.open,children:a.modal?y.jsx(AO,{...o,ref:t}):y.jsx(OO,{...o,ref:t})})});_1.displayName=Zo;var AO=b.forwardRef((e,t)=>{const n=Mr(Zo,e.__scopeDialog),r=b.useRef(null),o=ct(t,n.contentRef,r);return b.useEffect(()=>{const a=r.current;if(a)return x1(a)},[]),y.jsx(P1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault())})}),OO=b.forwardRef((e,t)=>{const n=Mr(Zo,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return y.jsx(P1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),P1=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,u=Mr(Zo,n),d=b.useRef(null),f=ct(t,d);return c1(),y.jsxs(y.Fragment,{children:[y.jsx(Im,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(ld,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":zm(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(DO,{titleId:u.titleId}),y.jsx(MO,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Dm="DialogTitle",T1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mr(Dm,n);return y.jsx(tt.h2,{id:o.titleId,...r,ref:t})});T1.displayName=Dm;var N1="DialogDescription",j1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mr(N1,n);return y.jsx(tt.p,{id:o.descriptionId,...r,ref:t})});j1.displayName=N1;var R1="DialogClose",I1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mr(R1,n);return y.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>o.onOpenChange(!1))})});I1.displayName=R1;function zm(e){return e?"open":"closed"}var A1="DialogTitleWarning",[I8,O1]=t2(A1,{contentName:Zo,titleName:Dm,docsSlug:"dialog"}),DO=({titleId:e})=>{const t=O1(A1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
262
+
263
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
264
+
265
+ 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},zO="DialogDescriptionWarning",MO=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${O1(zO).contentName}}.`;return b.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},D1=b1,z1=C1,M1=E1,L1=_1,F1=T1,LO=j1,$1=I1;function FO({...e}){return y.jsx(D1,{"data-slot":"sheet",...e})}function $O({...e}){return y.jsx(z1,{"data-slot":"sheet-portal",...e})}function VO({className:e,...t}){return y.jsx(M1,{"data-slot":"sheet-overlay",className:Be("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 BO({className:e,children:t,side:n="right",...r}){return y.jsxs($O,{children:[y.jsx(VO,{}),y.jsxs(L1,{"data-slot":"sheet-content",className:Be("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,y.jsxs($1,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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",children:[y.jsx(ad,{className:"size-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function UO({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-header",className:Be("flex flex-col gap-1.5 p-4",e),...t})}function HO({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-footer",className:Be("mt-auto flex flex-col gap-2 p-4",e),...t})}function WO({className:e,...t}){return y.jsx(F1,{"data-slot":"sheet-title",className:Be("text-foreground font-semibold",e),...t})}var ZO=b.createContext(void 0);function V1(e){const t=b.useContext(ZO);return e||t||"ltr"}function Ap(e,[t,n]){return Math.min(n,Math.max(t,e))}function qO(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Mm="ScrollArea",[B1]=ua(Mm),[QO,gr]=B1(Mm),U1=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...l}=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,j]=b.useState(!1),[B,Q]=b.useState(!1),oe=ct(t,K=>d(K)),A=V1(o);return y.jsx(QO,{scope:n,type:r,dir:A,scrollHideDelay:a,scrollArea:u,viewport:f,onViewportChange:h,content:p,onContentChange:x,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:O,onScrollbarXEnabledChange:j,scrollbarY:k,onScrollbarYChange:C,scrollbarYEnabled:B,onScrollbarYEnabledChange:Q,onCornerWidthChange:_,onCornerHeightChange:I,children:y.jsx(tt.div,{dir:A,...l,ref:oe,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});U1.displayName=Mm;var H1="ScrollAreaViewport",W1=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,l=gr(H1,n),u=b.useRef(null),d=ct(t,u,l.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":"",...a,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});W1.displayName=H1;var ni="ScrollAreaScrollbar",Z1=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ni,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=o,u=e.orientation==="horizontal";return b.useEffect(()=>(u?a(!0):l(!0),()=>{u?a(!1):l(!1)}),[u,a,l]),o.type==="hover"?y.jsx(YO,{...r,ref:t,forceMount:n}):o.type==="scroll"?y.jsx(KO,{...r,ref:t,forceMount:n}):o.type==="auto"?y.jsx(q1,{...r,ref:t,forceMount:n}):o.type==="always"?y.jsx(Lm,{...r,ref:t}):null});Z1.displayName=ni;var YO=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ni,e.__scopeScrollArea),[a,l]=b.useState(!1);return b.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),l(!0)},h=()=>{d=window.setTimeout(()=>l(!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(ti,{present:n||a,children:y.jsx(q1,{"data-state":a?"visible":"hidden",...r,ref:t})})}),KO=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gr(ni,e.__scopeScrollArea),a=e.orientation==="horizontal",l=wd(()=>d("SCROLL_END"),100),[u,d]=qO("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=a?"scrollLeft":"scrollTop";if(f){let p=f[h];const x=()=>{const g=f[h];p!==g&&(d("SCROLL"),l()),p=g};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[o.viewport,a,d,l]),y.jsx(ti,{present:n||u!=="hidden",children:y.jsx(Lm,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),q1=b.forwardRef((e,t)=>{const n=gr(ni,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,l]=b.useState(!1),u=e.orientation==="horizontal",d=wd(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:h)}},10);return ea(n.viewport,d),ea(n.content,d),y.jsx(ti,{present:r||a,children:y.jsx(Lm,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Lm=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=gr(ni,e.__scopeScrollArea),a=b.useRef(null),l=b.useRef(0),[u,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=X1(u.viewport,u.content),h={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:x=>a.current=x,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:x=>l.current=x};function p(x,g){return nD(x,l.current,u,g)}return n==="horizontal"?y.jsx(GO,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollLeft,g=xw(x,u,o.dir);a.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(XO,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const x=o.viewport.scrollTop,g=xw(x,u);a.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}),GO=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ni,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarXChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(Y1,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollLeft+h.deltaX;e.onWheelScroll(x),eS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Lc(l.paddingLeft),paddingEnd:Lc(l.paddingRight)}})}})}),XO=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=gr(ni,e.__scopeScrollArea),[l,u]=b.useState(),d=b.useRef(null),f=ct(t,d,a.onScrollbarYChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(Y1,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xd(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,p)=>{if(a.viewport){const x=a.viewport.scrollTop+h.deltaY;e.onWheelScroll(x),eS(x,p)&&h.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Lc(l.paddingTop),paddingEnd:Lc(l.paddingBottom)}})}})}),[JO,Q1]=B1(ni),Y1=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:h,onResize:p,...x}=e,g=gr(ni,n),[S,k]=b.useState(null),C=ct(t,oe=>k(oe)),E=b.useRef(null),_=b.useRef(""),T=g.viewport,I=r.content-r.viewport,O=Bn(h),j=Bn(d),B=wd(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(j,[r,j]),ea(S,B),ea(g.content,B),y.jsx(JO,{scope:n,scrollbar:S,hasThumb:o,onThumbChange:Bn(a),onThumbPointerUp:Bn(l),onThumbPositionChange:j,onThumbPointerDown:Bn(u),children:y.jsx(tt.div,{...x,ref:C,style:{position:"absolute",...x.style},onPointerDown:Ye(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:Ye(e.onPointerMove,Q),onPointerUp:Ye(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})})})}),Mc="ScrollAreaThumb",K1=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Q1(Mc,e.__scopeScrollArea);return y.jsx(ti,{present:n||o.hasThumb,children:y.jsx(eD,{ref:t,...r})})}),eD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=gr(Mc,n),l=Q1(Mc,n),{onThumbPositionChange:u}=l,d=ct(t,p=>l.onThumbChange(p)),f=b.useRef(void 0),h=wd(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const p=a.viewport;if(p){const x=()=>{if(h(),!f.current){const g=rD(p,u);f.current=g,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[a.viewport,h,u]),y.jsx(tt.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),S=p.clientX-g.left,k=p.clientY-g.top;l.onThumbPointerDown({x:S,y:k})}),onPointerUp:Ye(e.onPointerUp,l.onThumbPointerUp)})});K1.displayName=Mc;var Fm="ScrollAreaCorner",G1=b.forwardRef((e,t)=>{const n=gr(Fm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(tD,{...e,ref:t}):null});G1.displayName=Fm;var tD=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=gr(Fm,n),[a,l]=b.useState(0),[u,d]=b.useState(0),f=!!(a&&u);return ea(o.scrollbarX,()=>{var p;const h=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(h),d(h)}),ea(o.scrollbarY,()=>{var p;const h=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(h),l(h)}),f?y.jsx(tt.div,{...r,ref:t,style:{width:a,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Lc(e){return e?parseInt(e,10):0}function X1(e,t){const n=e/t;return isNaN(n)?0:n}function xd(e){const t=X1(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function nD(e,t,n,r="ltr"){const o=xd(n),a=o/2,l=t||a,u=o-l,d=n.scrollbar.paddingStart+l,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,h=n.content-n.viewport,p=r==="ltr"?[0,h]:[h*-1,0];return J1([d,f],p)(e)}function xw(e,t,n="ltr"){const r=xd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,l=t.content-t.viewport,u=a-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Ap(e,d);return J1([0,l],[0,u])(f)}function J1(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 eS(e,t){return e>0&&e<t}var rD=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,u=n.top!==a.top;(l||u)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function wd(e,t){const n=Bn(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 ea(e,t){const n=Bn(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 iD=U1,oD=W1,sD=G1;function $m({className:e,children:t,showScrollbar:n=!1,...r}){return y.jsxs(iD,{"data-slot":"scroll-area",className:Be("relative overflow-hidden",e),...r,children:[y.jsx(oD,{"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(aD,{forceMount:n?!0:void 0,className:n?"opacity-100":void 0}),y.jsx(sD,{})]})}function aD({className:e,orientation:t="vertical",...n}){return y.jsx(Z1,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Be("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(K1,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var lD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uD=lD.reduce((e,t)=>{const n=wm(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cD="Label",tS=b.forwardRef((e,t)=>y.jsx(uD.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())}}));tS.displayName=cD;var dD=tS;function Wt({className:e,...t}){return y.jsx(dD,{"data-slot":"label",className:Be("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 ww(e){const t=fD(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(pD);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,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function fD(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=gD(o),u=mD(a,o.props);return o.type!==b.Fragment&&(u.ref=r?sa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hD=Symbol("radix.slottable");function pD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hD}function mD(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function gD(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 yD(e){const t=e+"CollectionProvider",[n,r]=ua(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=k=>{const{scope:C,children:E}=k,_=ae.useRef(null),T=ae.useRef(new Map).current;return y.jsx(o,{scope:C,itemMap:T,collectionRef:_,children:E})};l.displayName=t;const u=e+"CollectionSlot",d=ww(u),f=ae.forwardRef((k,C)=>{const{scope:E,children:_}=k,T=a(u,E),I=ct(C,T.collectionRef);return y.jsx(d,{ref:I,children:_})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",x=ww(h),g=ae.forwardRef((k,C)=>{const{scope:E,children:_,...T}=k,I=ae.useRef(null),O=ct(C,I),j=a(h,E);return ae.useEffect(()=>(j.itemMap.set(I,{ref:I,...T}),()=>void j.itemMap.delete(I))),y.jsx(x,{[p]:"",ref:O,children:_})});g.displayName=h;function S(k){const C=a(e+"CollectionConsumer",k);return ae.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const T=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((j,B)=>T.indexOf(j.ref.current)-T.indexOf(B.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:f,ItemSlot:g},S,r]}function vD(e){const t=xD(e),n=b.forwardRef((r,o)=>{const{children:a,...l}=r,u=b.Children.toArray(a),d=u.find(bD);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,{...l,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,h):null})}return y.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function xD(e){const t=b.forwardRef((n,r)=>{const{children:o,...a}=n;if(b.isValidElement(o)){const l=SD(o),u=kD(a,o.props);return o.type!==b.Fragment&&(u.ref=r?sa(r,l):l),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wD=Symbol("radix.slottable");function bD(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wD}function kD(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const d=a(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function SD(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 CD(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 ED=[" ","Enter","ArrowUp","ArrowDown"],_D=[" ","Enter"],qo="Select",[bd,kd,PD]=yD(qo),[fa]=ua(qo,[PD,hd]),Sd=hd(),[TD,co]=fa(qo),[ND,jD]=fa(qo),nS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:l,defaultValue:u,onValueChange:d,dir:f,name:h,autoComplete:p,disabled:x,required:g,form:S}=e,k=Sd(t),[C,E]=b.useState(null),[_,T]=b.useState(null),[I,O]=b.useState(!1),j=V1(f),[B,Q]=Dc({prop:r,defaultProp:o??!1,onChange:a,caller:qo}),[oe,A]=Dc({prop:l,defaultProp:u,onChange:d,caller:qo}),K=b.useRef(null),M=C?S||!!C.closest("form"):!0,[ne,W]=b.useState(new Set),U=Array.from(ne).map(q=>q.props.value).join(";");return y.jsx(Qk,{...k,children:y.jsxs(TD,{required:g,scope:t,trigger:C,onTriggerChange:E,valueNode:_,onValueNodeChange:T,valueNodeHasChildren:I,onValueNodeHasChildrenChange:O,contentId:Bo(),value:oe,onValueChange:A,open:B,onOpenChange:Q,dir:j,triggerPointerDownPosRef:K,disabled:x,children:[y.jsx(bd.Provider,{scope:t,children:y.jsx(ND,{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(CS,{"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)]},U):null]})})};nS.displayName=qo;var rS="SelectTrigger",iS=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Sd(n),l=co(rS,n),u=l.disabled||r,d=ct(t,l.onTriggerChange),f=kd(n),h=b.useRef("touch"),[p,x,g]=_S(k=>{const C=f().filter(T=>!T.disabled),E=C.find(T=>T.value===l.value),_=PS(C,k,E);_!==void 0&&l.onValueChange(_.value)}),S=k=>{u||(l.onOpenChange(!0),g()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return y.jsx(Yk,{asChild:!0,...a,children:y.jsx(tt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":ES(l.value)?"":void 0,...o,ref:d,onClick:Ye(o.onClick,k=>{k.currentTarget.focus(),h.current!=="mouse"&&S(k)}),onPointerDown:Ye(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:Ye(o.onKeyDown,k=>{const C=p.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&x(k.key),!(C&&k.key===" ")&&ED.includes(k.key)&&(S(),k.preventDefault())})})})});iS.displayName=rS;var oS="SelectValue",sS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:l="",...u}=e,d=co(oS,n),{onValueNodeHasChildrenChange:f}=d,h=a!==void 0,p=ct(t,d.onValueNodeChange);return rn(()=>{f(h)},[f,h]),y.jsx(tt.span,{...u,ref:p,style:{pointerEvents:"none"},children:ES(d.value)?y.jsx(y.Fragment,{children:l}):a})});sS.displayName=oS;var RD="SelectIcon",aS=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(tt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});aS.displayName=RD;var ID="SelectPortal",lS=e=>y.jsx(pd,{asChild:!0,...e});lS.displayName=ID;var Qo="SelectContent",uS=b.forwardRef((e,t)=>{const n=co(Qo,e.__scopeSelect),[r,o]=b.useState();if(rn(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Il.createPortal(y.jsx(cS,{scope:e.__scopeSelect,children:y.jsx(bd.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),a):null}return y.jsx(dS,{...e,ref:t})});uS.displayName=Qo;var Tr=10,[cS,fo]=fa(Qo),AD="SelectContentImpl",OD=vD("SelectContent.RemoveScroll"),dS=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C,...E}=e,_=co(Qo,n),[T,I]=b.useState(null),[O,j]=b.useState(null),B=ct(t,le=>I(le)),[Q,oe]=b.useState(null),[A,K]=b.useState(null),M=kd(n),[ne,W]=b.useState(!1),U=b.useRef(!1);b.useEffect(()=>{if(T)return x1(T)},[T]),c1();const q=b.useCallback(le=>{const[ve,...Ee]=M().map(Ve=>Ve.ref.current),[ke]=Ee.slice(-1),Ae=document.activeElement;for(const Ve of le)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 le={x:0,y:0};const ve=ke=>{var Ae,Ve;le={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))}},Ee=ke=>{le.x<=10&&le.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",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[T,D,G]),b.useEffect(()=>{const le=()=>D(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[D]);const[N,L]=_S(le=>{const ve=M().filter(Ae=>!Ae.disabled),Ee=ve.find(Ae=>Ae.ref.current===document.activeElement),ke=PS(ve,le,Ee);ke&&setTimeout(()=>ke.ref.current.focus())}),Y=b.useCallback((le,ve,Ee)=>{const ke=!U.current&&!Ee;(_.value!==void 0&&_.value===ve||ke)&&(oe(le),ke&&(U.current=!0))},[_.value]),R=b.useCallback(()=>T==null?void 0:T.focus(),[T]),ue=b.useCallback((le,ve,Ee)=>{const ke=!U.current&&!Ee;(_.value!==void 0&&_.value===ve||ke)&&K(le)},[_.value]),ye=r==="popper"?Op:fS,we=ye===Op?{side:u,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:x,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C}:{};return y.jsx(cS,{scope:n,content:T,viewport:O,onViewportChange:j,itemRefCallback:Y,selectedItem:Q,onItemLeave:R,itemTextRefCallback:ue,focusSelectedItem:ee,selectedItemText:A,position:r,isPositioned:ne,searchRef:N,children:y.jsx(Am,{as:OD,allowPinchZoom:!0,children:y.jsx(Im,{asChild:!0,trapped:_.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:Ye(o,le=>{var ve;(ve=_.trigger)==null||ve.focus({preventScroll:!0}),le.preventDefault()}),children:y.jsx(ld,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:y.jsx(ye,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:le=>le.preventDefault(),...E,...we,onPlaced:()=>W(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ye(E.onKeyDown,le=>{const ve=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!ve&&le.key.length===1&&L(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let ke=M().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(le.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Ae=le.target,Ve=ke.indexOf(Ae);ke=ke.slice(Ve+1)}setTimeout(()=>q(ke)),le.preventDefault()}})})})})})})});dS.displayName=AD;var DD="SelectItemAlignedPosition",fS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=co(Qo,n),l=fo(Qo,n),[u,d]=b.useState(null),[f,h]=b.useState(null),p=ct(t,B=>h(B)),x=kd(n),g=b.useRef(!1),S=b.useRef(!0),{viewport:k,selectedItem:C,selectedItemText:E,focusSelectedItem:_}=l,T=b.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&f&&k&&C&&E){const B=a.trigger.getBoundingClientRect(),Q=f.getBoundingClientRect(),oe=a.valueNode.getBoundingClientRect(),A=E.getBoundingClientRect();if(a.dir!=="rtl"){const Ae=A.left-Q.left,Ve=oe.left-Ae,nt=B.left-Ve,It=B.width+nt,sn=Math.max(It,Q.width),Gt=window.innerWidth-Tr,an=Ap(Ve,[Tr,Math.max(Tr,Gt-sn)]);u.style.minWidth=It+"px",u.style.left=an+"px"}else{const Ae=Q.right-A.right,Ve=window.innerWidth-oe.right-Ae,nt=window.innerWidth-B.right-Ve,It=B.width+nt,sn=Math.max(It,Q.width),Gt=window.innerWidth-Tr,an=Ap(Ve,[Tr,Math.max(Tr,Gt-sn)]);u.style.minWidth=It+"px",u.style.right=an+"px"}const K=x(),M=window.innerHeight-Tr*2,ne=k.scrollHeight,W=window.getComputedStyle(f),U=parseInt(W.borderTopWidth,10),q=parseInt(W.paddingTop,10),ee=parseInt(W.borderBottomWidth,10),D=parseInt(W.paddingBottom,10),G=U+q+ne+D+ee,N=Math.min(C.offsetHeight*5,G),L=window.getComputedStyle(k),Y=parseInt(L.paddingTop,10),R=parseInt(L.paddingBottom,10),ue=B.top+B.height/2-Tr,ye=M-ue,we=C.offsetHeight/2,le=C.offsetTop+we,ve=U+q+le,Ee=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?R:0)+Ve+ee),It=ve+nt;u.style.height=It+"px"}else{const Ae=K.length>0&&C===K[0].ref.current;u.style.top="0px";const nt=Math.max(ue,U+k.offsetTop+(Ae?Y:0)+we)+Ee;u.style.height=nt+"px",k.scrollTop=ve-ue+k.offsetTop}u.style.margin=`${Tr}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[x,a.trigger,a.valueNode,u,f,k,C,E,a.dir,r]);rn(()=>T(),[T]);const[I,O]=b.useState();rn(()=>{f&&O(window.getComputedStyle(f).zIndex)},[f]);const j=b.useCallback(B=>{B&&S.current===!0&&(T(),_==null||_(),S.current=!1)},[T,_]);return y.jsx(MD,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:j,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}})})})});fS.displayName=DD;var zD="SelectPopperPosition",Op=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Tr,...a}=e,l=Sd(n);return y.jsx(Kk,{...l,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});Op.displayName=zD;var[MD,Vm]=fa(Qo,{}),Dp="SelectViewport",hS=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=fo(Dp,n),l=Vm(Dp,n),u=ct(t,a.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(bd.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:Ye(o.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&p){const g=Math.abs(d.current-h.scrollTop);if(g>0){const S=window.innerHeight-Tr*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})})})]})});hS.displayName=Dp;var pS="SelectGroup",[LD,FD]=fa(pS),$D=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Bo();return y.jsx(LD,{scope:n,id:o,children:y.jsx(tt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});$D.displayName=pS;var mS="SelectLabel",VD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=FD(mS,n);return y.jsx(tt.div,{id:o.id,...r,ref:t})});VD.displayName=mS;var Fc="SelectItem",[BD,gS]=fa(Fc),yS=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...l}=e,u=co(Fc,n),d=fo(Fc,n),f=u.value===r,[h,p]=b.useState(a??""),[x,g]=b.useState(!1),S=ct(t,_=>{var T;return(T=d.itemRefCallback)==null?void 0:T.call(d,_,r,o)}),k=Bo(),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(BD,{scope:n,value:r,disabled:o,textId:k,isSelected:f,onItemTextChange:b.useCallback(_=>{p(T=>T||((_==null?void 0:_.textContent)??"").trim())},[]),children:y.jsx(bd.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,...l,ref:S,onFocus:Ye(l.onFocus,()=>g(!0)),onBlur:Ye(l.onBlur,()=>g(!1)),onClick:Ye(l.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:Ye(l.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:Ye(l.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:Ye(l.onPointerMove,_=>{var T;C.current=_.pointerType,o?(T=d.onItemLeave)==null||T.call(d):C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(l.onPointerLeave,_=>{var T;_.currentTarget===document.activeElement&&((T=d.onItemLeave)==null||T.call(d))}),onKeyDown:Ye(l.onKeyDown,_=>{var I;((I=d.searchRef)==null?void 0:I.current)!==""&&_.key===" "||(_D.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})})})})});yS.displayName=Fc;var ol="SelectItemText",vS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,l=co(ol,n),u=fo(ol,n),d=gS(ol,n),f=jD(ol,n),[h,p]=b.useState(null),x=ct(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,...a,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Il.createPortal(a.children,l.valueNode):null]})});vS.displayName=ol;var xS="SelectItemIndicator",wS=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gS(xS,n).isSelected?y.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});wS.displayName=xS;var zp="SelectScrollUpButton",bS=b.forwardRef((e,t)=>{const n=fo(zp,e.__scopeSelect),r=Vm(zp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(t,r.onScrollButtonChange);return rn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;a(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(SS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});bS.displayName=zp;var Mp="SelectScrollDownButton",kS=b.forwardRef((e,t)=>{const n=fo(Mp,e.__scopeSelect),r=Vm(Mp,e.__scopeSelect),[o,a]=b.useState(!1),l=ct(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;a(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(SS,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});kS.displayName=Mp;var SS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=fo("SelectScrollButton",n),l=b.useRef(null),u=kd(n),d=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.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:Ye(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ye(o.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ye(o.onPointerLeave,()=>{d()})})}),UD="SelectSeparator",HD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});HD.displayName=UD;var Lp="SelectArrow",WD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Sd(n),a=co(Lp,n),l=fo(Lp,n);return a.open&&l.position==="popper"?y.jsx(Gk,{...o,...r,ref:t}):null});WD.displayName=Lp;var ZD="SelectBubbleInput",CS=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),a=ct(r,o),l=CD(t);return b.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&h){const p=new Event("change",{bubbles:!0});h.call(u,t),u.dispatchEvent(p)}},[l,t]),y.jsx(tt.select,{...n,style:{...Xk,...n.style},ref:a,defaultValue:t})});CS.displayName=ZD;function ES(e){return e===""||e===void 0}function _S(e){const t=Bn(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(l=>{const u=n.current+l;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),a=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function PS(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=qD(e,Math.max(a,0));o.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function qD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QD=nS,YD=iS,KD=sS,GD=aS,XD=lS,JD=uS,ez=hS,tz=yS,nz=vS,rz=wS,iz=bS,oz=kS;function dr({...e}){return y.jsx(QD,{"data-slot":"select",...e})}function fr({...e}){return y.jsx(KD,{"data-slot":"select-value",...e})}function hr({className:e,size:t="default",children:n,...r}){return y.jsxs(YD,{"data-slot":"select-trigger","data-size":t,className:Be("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(GD,{asChild:!0,children:y.jsx(tk,{className:"size-4 opacity-50"})})]})}function pr({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return y.jsx(XD,{children:y.jsxs(JD,{"data-slot":"select-content",className:Be("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(sz,{}),y.jsx(ez,{className:Be("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(az,{})]})})}function nn({className:e,children:t,...n}){return y.jsxs(tz,{"data-slot":"select-item",className:Be("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(rz,{children:y.jsx(ek,{className:"size-4"})})}),y.jsx(nz,{children:t})]})}function sz({className:e,...t}){return y.jsx(iz,{"data-slot":"select-scroll-up-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(Cj,{className:"size-4"})})}function az({className:e,...t}){return y.jsx(oz,{"data-slot":"select-scroll-down-button",className:Be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(tk,{className:"size-4"})})}var Ml=e=>e.type==="checkbox",Io=e=>e instanceof Date,Vn=e=>e==null;const TS=e=>typeof e=="object";var Mt=e=>!Vn(e)&&!Array.isArray(e)&&TS(e)&&!Io(e),NS=e=>Mt(e)&&e.target?Ml(e.target)?e.target.checked:e.target.value:e,lz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,jS=(e,t)=>e.has(lz(t)),uz=e=>{const t=e.constructor&&e.constructor.prototype;return Mt(t)&&t.hasOwnProperty("isPrototypeOf")},Bm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ot(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Bm&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Mt(e)&&uz(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Ot(e[o]));return r}var Cd=e=>/^\w*$/.test(e),wt=e=>e===void 0,Um=e=>Array.isArray(e)?e.filter(Boolean):[],Hm=e=>Um(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Se=(e,t,n)=>{if(!t||!Mt(e))return n;const r=(Cd(t)?[t]:Hm(t)).reduce((o,a)=>Vn(o)?o:o[a],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},Kn=e=>typeof e=="boolean",Sn=e=>typeof e=="function",lt=(e,t,n)=>{let r=-1;const o=Cd(t)?[t]:Hm(t),a=o.length,l=a-1;for(;++r<a;){const u=o[r];let d=n;if(r!==l){const f=e[u];d=Mt(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"},pi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},RS=ae.createContext(null);RS.displayName="HookFormControlContext";const Wm=()=>ae.useContext(RS);var IS=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const l=a;return t._proxyFormState[l]!==Rr.all&&(t._proxyFormState[l]=!r||Rr.all),n&&(n[l]=!0),e[l]}});return o};const Zm=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function cz(e){const t=Wm(),{control:n=t,disabled:r,name:o,exact:a}=e||{},[l,u]=ae.useState(n._formState),d=ae.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Zm(()=>n._subscribe({name:o,formState:d.current,exact:a,callback:f=>{!r&&u({...n._formState,...f})}}),[o,r,a]),ae.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ae.useMemo(()=>IS(l,n,d.current,!1),[l,n])}var Xn=e=>typeof e=="string",Fp=(e,t,n,r,o)=>Xn(e)?(r&&t.watch.add(e),Se(n,e,o)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),Se(n,a))):(r&&(t.watchAll=!0),n),$p=e=>Vn(e)||!TS(e);function Ir(e,t,n=new WeakSet){if($p(e)||$p(t))return Object.is(e,t);if(Io(e)&&Io(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 a of r){const l=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const u=t[a];if(Io(l)&&Io(u)||Mt(l)&&Mt(u)||Array.isArray(l)&&Array.isArray(u)?!Ir(l,u,n):!Object.is(l,u))return!1}}return!0}function dz(e){const t=Wm(),{control:n=t,name:r,defaultValue:o,disabled:a,exact:l,compute:u}=e||{},d=ae.useRef(o),f=ae.useRef(u),h=ae.useRef(void 0),p=ae.useRef(n),x=ae.useRef(r);f.current=u;const[g,S]=ae.useState(()=>{const I=n._getWatch(r,d.current);return f.current?f.current(I):I}),k=ae.useCallback(I=>{const O=Fp(r,n._names,I||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),C=ae.useCallback(I=>{if(!a){const O=Fp(r,n._names,I||n._formValues,!1,d.current);if(f.current){const j=f.current(O);Ir(j,h.current)||(S(j),h.current=j)}else S(O)}},[n._formValues,n._names,a,r]);Zm(()=>((p.current!==n||!Ir(x.current,r))&&(p.current=n,x.current=r,C()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:I=>{C(I.values)}})),[n,l,r,C]),ae.useEffect(()=>n._removeUnmounted());const E=p.current!==n,_=x.current,T=ae.useMemo(()=>{if(a)return null;const I=!E&&!Ir(_,r);return E||I?k():null},[a,E,r,_,k]);return T!==null?T:g}function fz(e){const t=Wm(),{name:n,disabled:r,control:o=t,shouldUnregister:a,defaultValue:l,exact:u=!0}=e,d=jS(o._names.array,n),f=ae.useMemo(()=>Se(o._formValues,n,Se(o._defaultValues,n,l)),[o,n,l]),h=dz({control:o,name:n,defaultValue:f,exact:u}),p=cz({control:o,name:n,exact:u}),x=ae.useRef(e),g=ae.useRef(void 0),S=ae.useRef(o.register(n,{...e.rules,value:h,...Kn(e.disabled)?{disabled:e.disabled}:{}}));x.current=e;const k=ae.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=ae.useCallback(I=>S.current.onChange({target:{value:NS(I),name:n},type:$c.CHANGE}),[n]),E=ae.useCallback(()=>S.current.onBlur({target:{value:Se(o._formValues,n),name:n},type:$c.BLUR}),[n,o._formValues]),_=ae.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:j=>Sn(I.setCustomValidity)&&I.setCustomValidity(j),reportValidity:()=>Sn(I.reportValidity)&&I.reportValidity()})},[o._fields,n]),T=ae.useMemo(()=>({name:n,value:h,...Kn(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:C,onBlur:E,ref:_}),[n,r,p.disabled,C,E,_,h]);return ae.useEffect(()=>{const I=o._options.shouldUnregister||a,O=g.current;O&&O!==n&&!d&&o.unregister(O),o.register(n,{...x.current.rules,...Kn(x.current.disabled)?{disabled:x.current.disabled}:{}});const j=(B,Q)=>{const oe=Se(o._fields,B);oe&&oe._f&&(oe._f.mount=Q)};if(j(n,!0),I){const B=Ot(Se(o._options.defaultValues,n,x.current.defaultValue));lt(o._defaultValues,n,B),wt(Se(o._formValues,n))&&lt(o._formValues,n,B)}return!d&&o.register(n),g.current=n,()=>{(d?I&&!o._state.action:I)?o.unregister(n):j(n,!1)}},[n,o,d,a]),ae.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),ae.useMemo(()=>({field:T,formState:p,fieldState:k}),[T,p,k])}const Vc=e=>e.render(fz(e)),hz=ae.createContext(null);hz.displayName="HookFormContext";var qm=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},al=e=>Array.isArray(e)?e:[e],bw=()=>{let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}};function AS(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],a=t[r];if(o&&Mt(o)&&a){const l=AS(o,a);Mt(l)&&(n[r]=l)}else e[r]&&(n[r]=a)}return n}var bn=e=>Mt(e)&&!Object.keys(e).length,Qm=e=>e.type==="file",Bc=e=>{if(!Bm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},OS=e=>e.type==="select-multiple",Ym=e=>e.type==="radio",pz=e=>Ym(e)||Ml(e),Uh=e=>Bc(e)&&e.isConnected;function mz(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 gz(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function Dt(e,t){const n=Array.isArray(t)?t:Cd(t)?[t]:Hm(t),r=n.length===1?e:mz(e,n),o=n.length-1,a=n[o];return r&&delete r[a],o!==0&&(Mt(r)&&bn(r)||Array.isArray(r)&&gz(r))&&Dt(e,n.slice(0,-1)),e}var yz=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function DS(e){return Array.isArray(e)||Mt(e)&&!yz(e)}function Vp(e,t={}){for(const n in e){const r=e[n];DS(r)?(t[n]=Array.isArray(r)?[]:{},Vp(r,t[n])):wt(r)||(t[n]=!0)}return t}function Is(e,t,n){n||(n=Vp(t));for(const r in e){const o=e[r];if(DS(o))wt(t)||$p(n[r])?n[r]=Vp(o,Array.isArray(o)?[]:{}):Is(o,Vn(t)?{}:t[r],n[r]);else{const a=t[r];n[r]=!Ir(o,a)}}return n}const kw={value:!1,isValid:!1},Sw={value:!0,isValid:!0};var zS=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===""?Sw:{value:e[0].value,isValid:!0}:Sw:kw}return kw},MS=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&Xn(e)?new Date(e):r?r(e):e;const Cw={isValid:!1,value:null};var LS=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Cw):Cw;function Ew(e){const t=e.ref;return Qm(t)?t.files:Ym(t)?LS(e.refs).value:OS(t)?[...t.selectedOptions].map(({value:n})=>n):Ml(t)?zS(e.refs).value:MS(wt(t.value)?e.ref.value:t.value,e)}var vz=(e,t,n,r)=>{const o={};for(const a of e){const l=Se(t,a);l&&lt(o,a,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Uc=e=>e instanceof RegExp,Ja=e=>wt(e)?e:Uc(e)?e.source:Mt(e)?Uc(e.value)?e.value.source:e.value:e,_w=e=>({isOnSubmit:!e||e===Rr.onSubmit,isOnBlur:e===Rr.onBlur,isOnChange:e===Rr.onChange,isOnAll:e===Rr.all,isOnTouch:e===Rr.onTouched});const Pw="AsyncFunction";var xz=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===Pw||Mt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Pw)),wz=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Tw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ll=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const a=Se(e,o);if(a){const{_f:l,...u}=a;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(ll(u,t))break}else if(Mt(u)&&ll(u,t))break}}};function Nw(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 a=o.join("."),l=Se(t,a),u=Se(e,a);if(l&&!Array.isArray(l)&&n!==a)return{name:n};if(u&&u.type)return{name:a,error:u};if(u&&u.root&&u.root.type)return{name:`${a}.root`,error:u.root};o.pop()}return{name:n}}var bz=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return bn(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(l=>t[l]===(!r||Rr.all))},kz=(e,t,n)=>!e||!t||e===t||al(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),Sz=(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,Cz=(e,t)=>!Um(Se(e,t)).length&&Dt(e,t),Ez=(e,t,n)=>{const r=al(Se(e,n));return lt(r,"root",t[n]),lt(e,n,r),e};function jw(e,t,n="validate"){if(Xn(e)||Array.isArray(e)&&e.every(Xn)||Kn(e)&&!e)return{type:n,message:Xn(e)?e:"",ref:t}}var Ns=e=>Mt(e)&&!Uc(e)?e:{value:e,message:""},Rw=async(e,t,n,r,o,a)=>{const{ref:l,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]:l,I=M=>{o&&T.reportValidity&&(T.setCustomValidity(Kn(M)?"":M||""),T.reportValidity())},O={},j=Ym(l),B=Ml(l),Q=j||B,oe=(C||Qm(l))&&wt(l.value)&&wt(_)||Bc(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length,A=qm.bind(null,k,r,O),K=(M,ne,W,U=pi.maxLength,q=pi.minLength)=>{const ee=M?ne:W;O[k]={type:M?U:q,message:ee,ref:l,...A(M?U:q,ee)}};if(a?!Array.isArray(_)||!_.length:d&&(!Q&&(oe||Vn(_))||Kn(_)&&!_||B&&!zS(u).isValid||j&&!LS(u).isValid)){const{value:M,message:ne}=Xn(d)?{value:!!d,message:d}:Ns(d);if(M&&(O[k]={type:pi.required,message:ne,ref:T,...A(pi.required,ne)},!r))return I(ne),O}if(!oe&&(!Vn(p)||!Vn(x))){let M,ne;const W=Ns(x),U=Ns(p);if(!Vn(_)&&!isNaN(_)){const q=l.valueAsNumber||_&&+_;Vn(W.value)||(M=q>W.value),Vn(U.value)||(ne=q<U.value)}else{const q=l.valueAsDate||new Date(_),ee=N=>new Date(new Date().toDateString()+" "+N),D=l.type=="time",G=l.type=="week";Xn(W.value)&&_&&(M=D?ee(_)>ee(W.value):G?_>W.value:q>new Date(W.value)),Xn(U.value)&&_&&(ne=D?ee(_)<ee(U.value):G?_<U.value:q<new Date(U.value))}if((M||ne)&&(K(!!M,W.message,U.message,pi.max,pi.min),!r))return I(O[k].message),O}if((f||h)&&!oe&&(Xn(_)||a&&Array.isArray(_))){const M=Ns(f),ne=Ns(h),W=!Vn(M.value)&&_.length>+M.value,U=!Vn(ne.value)&&_.length<+ne.value;if((W||U)&&(K(W,M.message,ne.message),!r))return I(O[k].message),O}if(g&&!oe&&Xn(_)){const{value:M,message:ne}=Ns(g);if(Uc(M)&&!_.match(M)&&(O[k]={type:pi.pattern,message:ne,ref:l,...A(pi.pattern,ne)},!r))return I(ne),O}if(S){if(Sn(S)){const M=await S(_,n),ne=jw(M,T);if(ne&&(O[k]={...ne,...A(pi.validate,ne.message)},!r))return I(ne.message),O}else if(Mt(S)){let M={};for(const ne in S){if(!bn(M)&&!r)break;const W=jw(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 _z={mode:Rr.onSubmit,reValidateMode:Rr.onChange,shouldFocusError:!0};function Pz(e={}){let t={..._z,...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=Mt(t.defaultValues)||Mt(t.values)?Ot(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Ot(o),l={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:bw(),state:bw()},S=t.criteriaMode===Rr.all,k=F=>J=>{clearTimeout(f),f=setTimeout(F,J)},C=async F=>{if(!l.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?lt(n.validatingFields,se,J):Dt(n.validatingFields,se))}),g.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},_=(F,J=[],se,be,ge=!0,V=!0)=>{if(be&&se&&!t.disabled){if(l.action=!0,V&&Array.isArray(Se(r,F))){const ie=se(Se(r,F),be.argA,be.argB);ge&&lt(r,F,ie)}if(V&&Array.isArray(Se(n.errors,F))){const ie=se(Se(n.errors,F),be.argA,be.argB);ge&&lt(n.errors,F,ie),Cz(n.errors,F)}if((p.touchedFields||x.touchedFields)&&V&&Array.isArray(Se(n.touchedFields,F))){const ie=se(Se(n.touchedFields,F),be.argA,be.argB);ge&&lt(n.touchedFields,F,ie)}(p.dirtyFields||x.dirtyFields)&&(n.dirtyFields=Is(o,a)),g.state.next({name:F,isDirty:M(F,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else lt(a,F,J)},T=(F,J)=>{lt(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 V=Se(a,F,wt(se)?Se(o,F):se);wt(V)||be&&be.defaultChecked||J?lt(a,F,J?V:Ew(ge._f)):U(F,V),l.mount&&!l.action&&C()}},j=(F,J,se,be,ge)=>{let V=!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(),V=ie!==xe.isDirty);const _e=Ir(Se(o,F),J);ie=!!Se(n.dirtyFields,F),_e?Dt(n.dirtyFields,F):lt(n.dirtyFields,F,!0),xe.dirtyFields=n.dirtyFields,V=V||(p.dirtyFields||x.dirtyFields)&&ie!==!_e}if(se){const _e=Se(n.touchedFields,F);_e||(lt(n.touchedFields,F,se),xe.touchedFields=n.touchedFields,V=V||(p.touchedFields||x.touchedFields)&&_e!==se)}V&&ge&&g.state.next(xe)}return V?xe:{}},B=(F,J,se,be)=>{const ge=Se(n.errors,F),V=(p.isValid||x.isValid)&&Kn(J)&&n.isValid!==J;if(t.delayError&&se?(d=k(()=>T(F,se)),d(t.delayError)):(clearTimeout(f),d=null,se?lt(n.errors,F,se):Dt(n.errors,F)),(se?!Ir(ge,se):ge)||!bn(be)||V){const ie={...be,...V&&Kn(J)?{isValid:J}:{},errors:n.errors,name:F};n={...n,...ie},g.state.next(ie)}},Q=async F=>(E(F,!0),await t.resolver(a,t.context,vz(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?lt(n.errors,se,be):Dt(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:V,...ie}=ge;if(V){const xe=u.array.has(V.name),_e=ge._f&&xz(ge._f);_e&&p.validatingFields&&E([V.name],!0);const ze=await Rw(ge,u.disabled,a,S,t.shouldUseNativeValidation&&!J,xe);if(_e&&p.validatingFields&&E([V.name]),ze[V.name]&&(se.valid=!1,J||e.shouldUseNativeValidation))break;!J&&(Se(ze,V.name)?xe?Ez(n.errors,ze,V.name):lt(n.errors,V.name,ze[V.name]):Dt(n.errors,V.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=>!Uh(se)):!Uh(J._f.ref))&&ve(F)}u.unMount=new Set},M=(F,J)=>!t.disabled&&(F&&J&&lt(a,F,J),!Ir(L(),o)),ne=(F,J,se)=>Fp(F,u,{...l.mount?a:wt(J)?o:Xn(F)?{[F]:J}:J},se,J),W=F=>Um(Se(l.mount?a:o,F,t.shouldUnregister?Se(o,F,[]):[])),U=(F,J,se={})=>{const be=Se(r,F);let ge=J;if(be){const V=be._f;V&&(!V.disabled&&lt(a,F,MS(J,V)),ge=Bc(V.ref)&&Vn(J)?"":J,OS(V.ref)?[...V.ref.options].forEach(ie=>ie.selected=ge.includes(ie.value)):V.refs?Ml(V.ref)?V.refs.forEach(ie=>{(!ie.defaultChecked||!ie.disabled)&&(Array.isArray(ge)?ie.checked=!!ge.find(xe=>xe===ie.value):ie.checked=ge===ie.value||!!ge)}):V.refs.forEach(ie=>ie.checked=ie.value===ge):Qm(V.ref)?V.ref.value="":(V.ref.value=ge,V.ref.type||g.state.next({name:F,values:Ot(a)})))}(se.shouldDirty||se.shouldTouch)&&j(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],V=F+"."+be,ie=Se(r,V);(u.array.has(F)||Mt(ge)||ie&&!ie._f)&&!Io(ge)?q(V,ge,se):U(V,ge,se)}},ee=(F,J,se={})=>{const be=Se(r,F),ge=u.array.has(F),V=Ot(J);lt(a,F,V),ge?(g.array.next({name:F,values:Ot(a)}),(p.isDirty||p.dirtyFields||x.isDirty||x.dirtyFields)&&se.shouldDirty&&g.state.next({name:F,dirtyFields:Is(o,a),isDirty:M(F,V)})):be&&!be._f&&!Vn(V)?q(F,V,se):U(F,V,se),Tw(F,u)?g.state.next({...n,name:F,values:Ot(a)}):g.state.next({name:l.mount?F:void 0,values:Ot(a)})},D=async F=>{l.mount=!0;const J=F.target;let se=J.name,be=!0;const ge=Se(r,se),V=_e=>{be=Number.isNaN(_e)||Io(_e)&&isNaN(_e.getTime())||Ir(_e,Se(a,se,_e))},ie=_w(t.mode),xe=_w(t.reValidateMode);if(ge){let _e,ze;const dt=J.type?Ew(ge._f):NS(F),Nt=F.type===$c.BLUR||F.type===$c.FOCUS_OUT,Zt=!wz(ge._f)&&!t.resolver&&!Se(n.errors,se)&&!ge._f.deps||Sz(Nt,Se(n.touchedFields,se),n.isSubmitted,xe,ie),$t=Tw(se,u,Nt);lt(a,se,dt),Nt?(!J||!J.readOnly)&&(ge._f.onBlur&&ge._f.onBlur(F),d&&d(0)):ge._f.onChange&&ge._f.onChange(F);const Tn=j(se,dt,Nt),pt=!bn(Tn)||$t;if(!Nt&&g.state.next({name:se,type:F.type,values:Ot(a)}),Zt)return(p.isValid||x.isValid)&&(t.mode==="onBlur"?Nt&&C():Nt||C()),pt&&g.state.next({name:se,...$t?{}:Tn});if(!Nt&&$t&&g.state.next({...n}),t.resolver){const{errors:pn}=await Q([se]);if(E([se]),V(dt),be){const Xt=Nw(n.errors,r,se),ii=Nw(pn,r,Xt.name||se);_e=ii.error,se=ii.name,ze=bn(pn)}}else E([se],!0),_e=(await Rw(ge,u.disabled,a,S,t.shouldUseNativeValidation))[se],E([se]),V(dt),be&&(_e?ze=!1:(p.isValid||x.isValid)&&(ze=await A(r,!0)));be&&(ge._f.deps&&(!Array.isArray(ge._f.deps)||ge._f.deps.length>0)&&N(ge._f.deps),B(se,ze,_e,Tn))}},G=(F,J)=>{if(Se(n.errors,J)&&F.focus)return F.focus(),1},N=async(F,J={})=>{let se,be;const ge=al(F);if(t.resolver){const V=await oe(wt(F)?F:ge);se=bn(V),be=F?!ge.some(ie=>Se(V,ie)):se}else F?(be=(await Promise.all(ge.map(async V=>{const ie=Se(r,V);return await A(ie&&ie._f?{[V]:ie}:ie)}))).every(Boolean),!(!be&&!n.isValid)&&C()):be=se=await A(r);return g.state.next({...!Xn(F)||(p.isValid||x.isValid)&&se!==n.isValid?{}:{name:F},...t.resolver||!F?{isValid:se}:{},errors:n.errors}),J.shouldFocus&&!be&&ll(r,G,F?ge:u.mount),be},L=(F,J)=>{let se={...l.mount?a:o};return J&&(se=AS(J.dirtyFields?n.dirtyFields:n.touchedFields,se)),wt(F)?se:Xn(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)}),R=F=>{F&&al(F).forEach(J=>Dt(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:V,message:ie,type:xe,..._e}=ge;lt(n.errors,F,{..._e,...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=>{kz(F.name,J.name,F.exact)&&bz(J,F.formState||p,tr,F.reRenderRoot)&&F.callback({values:{...a},...n,...J,defaultValues:o})}}).unsubscribe,le=F=>(l.mount=!0,x={...x,...F.formState},we({...F,formState:{...h,...F.formState}})),ve=(F,J={})=>{for(const se of F?al(F):u.mount)u.mount.delete(se),u.array.delete(se),J.keepValue||(Dt(r,se),Dt(a,se)),!J.keepError&&Dt(n.errors,se),!J.keepDirty&&Dt(n.dirtyFields,se),!J.keepTouched&&Dt(n.touchedFields,se),!J.keepIsValidating&&Dt(n.validatingFields,se),!t.shouldUnregister&&!J.keepDefaultValue&&Dt(o,se);g.state.next({values:Ot(a)}),g.state.next({...n,...J.keepDirty?{isDirty:M()}:{}}),!J.keepIsValid&&C()},Ee=({disabled:F,name:J})=>{if(Kn(F)&&l.mount||F||u.disabled.has(J)){const ge=u.disabled.has(J)!==!!F;F?u.disabled.add(J):u.disabled.delete(J),ge&&l.mount&&!l.action&&C()}},ke=(F,J={})=>{let se=Se(r,F);const be=Kn(J.disabled)||Kn(t.disabled);return lt(r,F,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:F}},name:F,mount:!0,...J}}),u.mount.add(F),se?Ee({disabled:Kn(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:Ja(J.min),max:Ja(J.max),minLength:Ja(J.minLength),maxLength:Ja(J.maxLength),pattern:Ja(J.pattern)}:{},name:F,onChange:D,onBlur:D,ref:ge=>{if(ge){ke(F,J),se=Se(r,F);const V=wt(ge.value)&&ge.querySelectorAll&&ge.querySelectorAll("input,select,textarea")[0]||ge,ie=pz(V),xe=se._f.refs||[];if(ie?xe.find(_e=>_e===V):V===se._f.ref)return;lt(r,F,{_f:{...se._f,...ie?{refs:[...xe.filter(Uh),V,...Array.isArray(Se(o,F))?[{}]:[]],ref:{type:V.type,name:F}}:{ref:V}}}),O(F,!1,void 0,V)}else se=Se(r,F,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(jS(u.array,F)&&l.action)&&u.unMount.add(F)}}},Ae=()=>t.shouldFocusError&&ll(r,G,u.mount),Ve=F=>{Kn(F)&&(g.state.next({disabled:F}),ll(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=Ot(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:V,values:ie}=await Q();E(),n.errors=V,ge=Ot(ie)}else await A(r);if(u.disabled.size)for(const V of u.disabled)Dt(ge,V);if(Dt(n.errors,"root"),bn(n.errors)){g.state.next({errors:{}});try{await F(ge,se)}catch(V){be=V}}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},It=(F,J={})=>{Se(r,F)&&(wt(J.defaultValue)?ee(F,Ot(Se(o,F))):(ee(F,J.defaultValue),lt(o,F,Ot(J.defaultValue))),J.keepTouched||Dt(n.touchedFields,F),J.keepDirty||(Dt(n.dirtyFields,F),n.isDirty=J.defaultValue?M(F,Ot(Se(o,F))):M()),J.keepError||(Dt(n.errors,F),p.isValid&&C()),g.state.next({...n}))},sn=(F,J={})=>{const se=F?Ot(F):o,be=Ot(se),ge=bn(F),V=ge?o:be;if(J.keepDefaultValues||(o=se),!J.keepValues){if(J.keepDirtyValues){const ie=new Set([...u.mount,...Object.keys(Is(o,a))]);for(const xe of Array.from(ie)){const _e=Se(n.dirtyFields,xe),ze=Se(a,xe),dt=Se(V,xe);_e&&!wt(ze)?lt(V,xe,ze):!_e&&!wt(dt)&&ee(xe,dt)}}else{if(Bm&&wt(F))for(const ie of u.mount){const xe=Se(r,ie);if(xe&&xe._f){const _e=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(Bc(_e)){const ze=_e.closest("form");if(ze){ze.reset();break}}}}if(J.keepFieldsRef)for(const ie of u.mount)ee(ie,Se(V,ie));else r={}}a=t.shouldUnregister?J.keepDefaultValues?Ot(o):{}:Ot(V),g.array.next({values:{...V}}),g.state.next({values:{...V}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!J.keepIsValid||!!J.keepDirtyValues||!t.shouldUnregister&&!bn(V),l.watch=!!t.shouldUnregister,l.keepIsValid=!!J.keepIsValid,l.action=!1,J.keepErrors||(n.errors={}),g.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:ge?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!Ir(F,o)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ge?{}:J.keepDirtyValues?J.keepDefaultValues&&a?Is(o,a):n.dirtyFields:J.keepDefaultValues&&F?Is(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(a):F,{...t.resetOptions,...J}),an=(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()})}},tr=F=>{n={...n,...F}},Pn={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:Ee,_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 a},get _state(){return l},set _state(F){l=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:le,trigger:N,register:ke,handleSubmit:nt,watch:ye,setValue:ee,getValues:L,reset:Gt,resetField:It,clearErrors:R,unregister:ve,setError:ue,setFocus:an,getFieldState:Y};return{...Pn,formControl:Pn}}function Km(e={}){const t=ae.useRef(void 0),n=ae.useRef(void 0),[r,o]=ae.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:l,...u}=Pz(e);t.current={...u,formState:r}}const a=t.current.control;return a._options=e,Zm(()=>{const l=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),a._formState.isReady=!0,l},[a]),ae.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ae.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ae.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ae.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ae.useEffect(()=>{if(a._proxyFormState.isDirty){const l=a._getDirty();l!==r.isDirty&&a._subjects.state.next({isDirty:l})}},[a,r.isDirty]),ae.useEffect(()=>{var l;e.values&&!Ir(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((l=a._options.resetOptions)===null||l===void 0)&&l.keepIsValid||a._setValid(),n.current=e.values,o(u=>({...u}))):a._resetDefaultValues()},[a,e.values]),ae.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ae.useMemo(()=>IS(r,a),[a,r]),t.current}const Jr=b.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,"data-slot":"input",className:Be("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}));Jr.displayName="Input";const Ll=b.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{"data-slot":"textarea",className:Be("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}));Ll.displayName="Textarea";function FS({options:e,value:t,onValueChange:n,placeholder:r="Select...",emptyText:o="No results found",className:a}){const[l,u]=b.useState(!1),[d,f]=b.useState(""),h=b.useRef(null),p=b.useRef(null),x=b.useMemo(()=>{if(!d)return e;const C=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(C)||E.value.toLowerCase().includes(C))},[e,d]),g=e.find(C=>C.value===t);b.useEffect(()=>{l&&setTimeout(()=>{var C;return(C=p.current)==null?void 0:C.focus()},10)},[l]),b.useEffect(()=>{if(!l)return;const C=E=>{h.current&&!h.current.contains(E.target)&&(u(!1),f(""))};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[l]);const S=C=>{n(C===t?null:C),u(!1),f("")},k=C=>{C.stopPropagation(),n(null),f("")};return y.jsxs("div",{ref:h,className:Be("relative",a),children:[y.jsxs(it,{type:"button",variant:"outline",role:"combobox","aria-expanded":l,className:"w-full justify-between font-normal",onClick:()=>{u(!l)},children:[y.jsx("span",{className:"truncate",children:g?g.label:r}),y.jsxs("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[t&&y.jsx(ad,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:k}),y.jsx(_j,{className:"h-4 w-4 opacity-50"})]})]}),l&&y.jsxs("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md",children:[y.jsx("div",{className:"p-2",children:y.jsx(Jr,{ref:p,placeholder:"Search...",value:d,onChange:C=>f(C.target.value),className:"h-8"})}),y.jsx("div",{className:"max-h-[200px] overflow-y-auto p-1",children:x.length===0?y.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o}):x.map(C=>y.jsxs("button",{type:"button",className:Be("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 px-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",t===C.value&&"bg-accent"),onClick:()=>S(C.value),children:[y.jsx(ek,{className:Be("mr-2 h-4 w-4",t===C.value?"opacity-100":"opacity-0")}),y.jsx("span",{className:"truncate",children:C.label})]},C.value))})]})]})}const Ed=["todo","in_progress","completed","wont_fix","archived"],Gm=["todo","in_progress","completed","archived"],ta={todo:"TODO",in_progress:"In Progress",completed:"Completed",wont_fix:"Won't Fix",archived:"Archived"},Iw={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"}},_d={0:"Critical",1:"High",2:"Medium",3:"Low",4:"Backlog",5:"Someday"},Hc={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 Tz(e){return e.id.startsWith("EPIC-")?"epic":e.parentTaskId?"subtask":"task"}function Nz({form:e,type:t,epics:n,parentTasks:r}){const{register:o,control:a,formState:{errors:l}}=e,u=t==="epic"?Gm:Ed;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(Jr,{...o("title"),placeholder:`${t.charAt(0).toUpperCase()+t.slice(1)} title`}),l.title&&y.jsx("p",{className:"text-sm text-destructive",children:l.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Description"}),y.jsx(Ll,{...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:a,name:"status",render:({field:d})=>y.jsxs(dr,{value:d.value,onValueChange:d.onChange,children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:u.map(f=>y.jsx(nn,{value:f,children:ta[f]},f))})]})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Vc,{control:a,name:"priority",render:({field:d})=>y.jsxs(dr,{value:String(d.value),onValueChange:f=>d.onChange(parseInt(f,10)),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(_d).map(([f,h])=>y.jsxs(nn,{value:f,children:["P",f," - ",h]},f))})]})})]})]}),t==="task"&&y.jsx(jz,{form:e,epics:n}),t==="subtask"&&y.jsx(Rz,{form:e,parentTasks:r})]})}function jz({form:e,epics:t}){const{register:n,control:r}=e,o=b.useMemo(()=>t.map(a=>({value:a.id,label:`${a.id}: ${a.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(Jr,{...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:a})=>y.jsx(FS,{options:o,value:a.value,onValueChange:a.onChange,placeholder:"No Epic",emptyText:"No epics found"})})]})]})}function Rz({form:e,parentTasks:t}){const{register:n,control:r,formState:{errors:o}}=e,a=b.useMemo(()=>t.map(l=>({value:l.id,label:`${l.id}: ${l.title}`})),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(Jr,{...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.jsx(FS,{options:a,value:l.value||null,onValueChange:u=>l.onChange(u||""),placeholder:"Select a task...",emptyText:"No tasks found"})}),o.parentTaskId&&y.jsx("p",{className:"text-sm text-destructive",children:o.parentTaskId.message})]})]})}const Aw=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Bp=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Aw(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Aw(o,n,e))}},Ow=(e,t)=>{t.shouldUseNativeValidation&&Bp(e,t);const n={};for(const r in e){const o=Se(t.fields,r),a=Object.assign(e[r]||{},{ref:o&&o.ref});if(Iz(t.names||Object.keys(e),r)){const l=Object.assign({},Se(n,r));lt(l,"root",a),lt(n,r,l)}else lt(n,r,a)}return n},Iz=(e,t)=>{const n=Dw(t);return e.some(r=>Dw(r).match(`^${n}\\.\\d+`))};function Dw(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:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.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 a extends o{}Object.defineProperty(a,"name",{value:e});function l(u){var d;const f=n!=null&&n.Parent?new a:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,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(l,"name",{value:e}),l}class Ms extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $S extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const VS={};function Yo(e){return VS}function BS(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 Up(e,t){return typeof t=="bigint"?t.toString():t}function Xm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Jm(e){return e==null}function eg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Az(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 a=n>o?n:o,l=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return l%u/10**a}const zw=Symbol("evaluating");function ut(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==zw)return r===void 0&&(r=zw,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function es(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ho(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Mw(e){return JSON.stringify(e)}function Oz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const US="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Dz=Xm(()=>{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 vl(e){if(Wc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Wc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function HS(e){return vl(e)?{...e}:Array.isArray(e)?[...e]:e}const zz=new Set(["string","number","symbol"]);function Pd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function po(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 Me(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 Mz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Lz={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 Fz(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 a=ho(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return es(this,"shape",l),l},checks:[]});return po(e,a)}function $z(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 a=ho(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return es(this,"shape",l),l},checks:[]});return po(e,a)}function Vz(e,t){if(!vl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(a,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ho(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return es(this,"shape",a),a}});return po(e,o)}function Bz(e,t){if(!vl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ho(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return es(this,"shape",r),r}});return po(e,n)}function Uz(e,t){const n=ho(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return es(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return po(e,n)}function Hz(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 l=ho(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 es(this,"shape",d),d},checks:[]});return po(t,l)}function Wz(e,t,n){const r=ho(t._zod.def,{get shape(){const o=t._zod.def.shape,a={...o};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)a[l]=new e({type:"nonoptional",innerType:o[l]});return es(this,"shape",a),a}});return po(t,r)}function Os(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 WS(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function lc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ko(e,t,n){var o,a,l,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const h=lc((l=(a=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:a.error)==null?void 0:l.call(a,e))??lc((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??lc((d=n.customError)==null?void 0:d.call(n,e))??lc((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 tg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function xl(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ZS=(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,Up,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ng=ce("$ZodError",ZS),Td=ce("$ZodError",ZS,{Parent:Error});function Zz(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 qz(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>r({issues:l}));else if(a.code==="invalid_key")r({issues:a.issues});else if(a.code==="invalid_element")r({issues:a.issues});else if(a.path.length===0)n._errors.push(t(a));else{let l=n,u=0;for(;u<a.path.length;){const d=a.path[u];u===a.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Nd=e=>(t,n,r,o)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new Ms;if(l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ko(d,a,Yo())));throw US(u,o==null?void 0:o.callee),u}return l.value},Qz=Nd(Td),jd=e=>async(t,n,r,o)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ko(d,a,Yo())));throw US(u,o==null?void 0:o.callee),u}return l.value},Yz=jd(Td),Rd=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Ms;return a.issues.length?{success:!1,error:new(e??ng)(a.issues.map(l=>Ko(l,o,Yo())))}:{success:!0,data:a.value}},Kz=Rd(Td),Id=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>Ko(l,o,Yo())))}:{success:!0,data:a.value}},Gz=Id(Td),Xz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nd(e)(t,n,o)},Jz=e=>(t,n,r)=>Nd(e)(t,n,r),eM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jd(e)(t,n,o)},tM=e=>async(t,n,r)=>jd(e)(t,n,r),nM=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rd(e)(t,n,o)},rM=e=>(t,n,r)=>Rd(e)(t,n,r),iM=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Id(e)(t,n,o)},oM=e=>async(t,n,r)=>Id(e)(t,n,r),sM=/^[cC][^\s-]{8,}$/,aM=/^[0-9a-z]+$/,lM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uM=/^[0-9a-vA-V]{20}$/,cM=/^[A-Za-z0-9]{27}$/,dM=/^[a-zA-Z0-9_-]{21}$/,fM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hM=/^([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})$/,Lw=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)$/,pM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gM(){return new RegExp(mM,"u")}const yM=/^(?:(?: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])$/,vM=/^(([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}|:))$/,xM=/^((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])$/,wM=/^(([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])$/,bM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qS=/^[A-Za-z0-9_-]*$/,kM=/^\+[1-9]\d{6,14}$/,QS="(?:(?:\\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])))",SM=new RegExp(`^${QS}$`);function YS(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 CM(e){return new RegExp(`^${YS(e)}$`)}function EM(e){const t=YS({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(`^${QS}T(?:${r})$`)}const _M=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}$`)},PM=/^-?\d+$/,TM=/^-?\d+(?:\.\d+)?$/,NM=/^[^A-Z]*$/,jM=/^[^a-z]*$/,Un=ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),KS={number:"number",bigint:"bigint",object:"date"},GS=ce("$ZodCheckLessThan",(e,t)=>{Un.init(e,t);const n=KS[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(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})}}),XS=ce("$ZodCheckGreaterThan",(e,t)=>{Un.init(e,t);const n=KS[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(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})}}),RM=ce("$ZodCheckMultipleOf",(e,t)=>{Un.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):Az(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})}}),IM=ce("$ZodCheckNumberFormat",(e,t)=>{var l;Un.init(e,t),t.format=t.format||"float64";const n=(l=t.format)==null?void 0:l.includes("int"),r=n?"int":"number",[o,a]=Lz[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=a,n&&(d.pattern=PM)}),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>a&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),AM=ce("$ZodCheckMaxLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Jm(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 l=tg(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),OM=ce("$ZodCheckMinLength",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Jm(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 l=tg(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),DM=ce("$ZodCheckLengthEquals",(e,t)=>{var n;Un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Jm(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,a=o.length;if(a===t.length)return;const l=tg(o),u=a>t.length;r.issues.push({origin:l,...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})}}),Ad=ce("$ZodCheckStringFormat",(e,t)=>{var n,r;Un.init(e,t),e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),zM=ce("$ZodCheckRegex",(e,t)=>{Ad.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})}}),MM=ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=NM),Ad.init(e,t)}),LM=ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jM),Ad.init(e,t)}),FM=ce("$ZodCheckIncludes",(e,t)=>{Un.init(e,t);const n=Pd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),$M=ce("$ZodCheckStartsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`^${Pd(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})}}),VM=ce("$ZodCheckEndsWith",(e,t)=>{Un.init(e,t);const n=new RegExp(`.*${Pd(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})}}),BM=ce("$ZodCheckOverwrite",(e,t)=>{Un.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class UM{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(`
266
+ `).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(a=>` ${a}`)];return new t(...n,o.join(`
267
+ `))}}const HM={major:4,minor:3,patch:5},Lt=ce("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=HM;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const l of a._zod.onattach)l(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 a=(u,d,f)=>{let h=Os(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 Ms;if(p||S instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await S,u.issues.length!==g&&(h||(h=Os(u,g)))});else{if(u.issues.length===g)continue;h||(h=Os(u,g))}}return p?p.then(()=>u):u},l=(u,d,f)=>{if(Os(u))return u.aborted=!0,u;const h=a(d,r,f);if(h instanceof Promise){if(f.async===!1)throw new Ms;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=>l(p,u,d)):l(h,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new Ms;return f.then(h=>a(h,r,d))}return a(f,r,d)}}ut(e,"~standard",()=>({validate:a=>{var l;try{const u=Kz(e,a);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return Gz(e,a).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}))}),rg=ce("$ZodString",(e,t)=>{var n;Lt.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??_M(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)=>{Ad.init(e,t),rg.init(e,t)}),WM=ce("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=hM),bt.init(e,t)}),ZM=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=Lw(r))}else t.pattern??(t.pattern=Lw());bt.init(e,t)}),qM=ce("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=pM),bt.init(e,t)}),QM=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})}}}),YM=ce("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gM()),bt.init(e,t)}),KM=ce("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=dM),bt.init(e,t)}),GM=ce("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=sM),bt.init(e,t)}),XM=ce("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=aM),bt.init(e,t)}),JM=ce("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lM),bt.init(e,t)}),eL=ce("$ZodXID",(e,t)=>{t.pattern??(t.pattern=uM),bt.init(e,t)}),tL=ce("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=cM),bt.init(e,t)}),nL=ce("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=EM(t)),bt.init(e,t)}),rL=ce("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=SM),bt.init(e,t)}),iL=ce("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=CM(t)),bt.init(e,t)}),oL=ce("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=fM),bt.init(e,t)}),sL=ce("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yM),bt.init(e,t),e._zod.bag.format="ipv4"}),aL=ce("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vM),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})}}}),lL=ce("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=xM),bt.init(e,t)}),uL=ce("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wM),bt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,a]=r;if(!a)throw new Error;const l=Number(a);if(`${l}`!==a)throw new Error;if(l<0||l>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 JS(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const cL=ce("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bM),bt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{JS(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function dL(e){if(!qS.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return JS(n)}const fL=ce("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=qS),bt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{dL(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),hL=ce("$ZodE164",(e,t)=>{t.pattern??(t.pattern=kM),bt.init(e,t)});function pL(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 mL=ce("$ZodJWT",(e,t)=>{bt.init(e,t),e._zod.check=n=>{pL(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),eC=ce("$ZodNumber",(e,t)=>{Lt.init(e,t),e._zod.pattern=e._zod.bag.pattern??TM,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 a=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,...a?{received:a}:{}}),n}}),gL=ce("$ZodNumberFormat",(e,t)=>{IM.init(e,t),eC.init(e,t)}),yL=ce("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),vL=ce("$ZodNever",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Fw(e,t,n){e.issues.length&&t.issues.push(...WS(n,e.issues)),t.value[n]=e.value}const xL=ce("$ZodArray",(e,t)=>{Lt.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 a=[];for(let l=0;l<o.length;l++){const u=o[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?a.push(d.then(f=>Fw(f,n,l))):Fw(d,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Zc(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...WS(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function tC(e){var r,o,a,l;const t=Object.keys(e.shape);for(const u of t)if(!((l=(a=(o=(r=e.shape)==null?void 0:r[u])==null?void 0:o._zod)==null?void 0:a.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const n=Mz(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nC(e,t,n,r,o,a){const l=[],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"){l.push(p);continue}const x=d.run({value:t[p],issues:[]},r);x instanceof Promise?e.push(x.then(g=>Zc(g,n,p,t,h))):Zc(x,n,p,t,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const wL=ce("$ZodObject",(e,t)=>{Lt.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=Xm(()=>tC(t));ut(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=Wc,a=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=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=l.shape;for(const x of l.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=>Zc(C,u,x,f,S))):Zc(k,u,x,f,S)}return a?nC(h,f,u,d,r.value,e):h.length?Promise.all(h).then(()=>u):u}}),bL=ce("$ZodObjectJIT",(e,t)=>{wL.init(e,t);const n=e._zod.parse,r=Xm(()=>tC(t)),o=x=>{var T;const g=new UM(["shape","payload","ctx"]),S=r.value,k=I=>{const O=Mw(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],j=Mw(I),B=x[I],Q=((T=B==null?void 0:B._zod)==null?void 0:T.optout)==="optional";g.write(`const ${O} = ${k(I)};`),Q?g.write(`
268
+ if (${O}.issues.length) {
269
+ if (${j} in input) {
270
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
271
+ ...iss,
272
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
273
+ })));
274
+ }
275
+ }
276
+
277
+ if (${O}.value === undefined) {
278
+ if (${j} in input) {
279
+ newResult[${j}] = undefined;
280
+ }
281
+ } else {
282
+ newResult[${j}] = ${O}.value;
283
+ }
284
+
285
+ `):g.write(`
286
+ if (${O}.issues.length) {
287
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
288
+ ...iss,
289
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
290
+ })));
291
+ }
292
+
293
+ if (${O}.value === undefined) {
294
+ if (${j} in input) {
295
+ newResult[${j}] = undefined;
296
+ }
297
+ } else {
298
+ newResult[${j}] = ${O}.value;
299
+ }
300
+
301
+ `)}g.write("payload.value = newResult;"),g.write("return payload;");const _=g.compile();return(I,O)=>_(x,I,O)};let a;const l=Wc,u=!VS.jitless,f=u&&Dz.value,h=t.catchall;let p;e._zod.parse=(x,g)=>{p??(p=r.value);const S=x.value;return l(S)?u&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(a||(a=o(t.shape)),x=a(x,g),h?nC([],S,x,g,p,e):x):n(x,g):(x.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),x)}});function $w(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const o=e.filter(a=>!Os(a));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(a=>a.issues.map(l=>Ko(l,r,Yo())))}),t)}const kL=ce("$ZodUnion",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ut(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>eg(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(n)return r(o,a);let l=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},a);if(f instanceof Promise)u.push(f),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>$w(d,o,e,a)):$w(u,o,e,a)}}),SL=ce("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,a=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([d,f])=>Vw(n,d,f)):Vw(n,a,l)}});function Hp(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(vl(e)&&vl(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),o={...e,...t};for(const a of r){const l=Hp(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o[a]=l.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],a=t[r],l=Hp(o,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Vw(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 a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&o&&e.issues.push({...o,keys:a}),Os(e))return e;const l=Hp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const CL=ce("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=BS(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>zz.has(typeof o)).map(o=>typeof o=="string"?Pd(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),EL=ce("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new $S(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Ms;return n.value=o,n}});function Bw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const rC=ce("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${eg(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(a=>Bw(a,n.value)):Bw(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),_L=ce("$ZodExactOptional",(e,t)=>{rC.init(e,t),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),PL=ce("$ZodNullable",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${eg(n.source)}|null)$`):void 0}),ut(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)}),TL=ce("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(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(a=>Uw(a,t)):Uw(o,t)}});function Uw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const NL=ce("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",ut(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))}),jL=ce("$ZodNonOptional",(e,t)=>{Lt.init(e,t),ut(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(a=>Hw(a,e)):Hw(o,e)}});function Hw(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 RL=ce("$ZodCatch",(e,t)=>{Lt.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(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(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>Ko(l,r,Yo()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>Ko(a,r,Yo()))},input:n.value}),n.issues=[]),n)}}),IL=ce("$ZodPipe",(e,t)=>{Lt.init(e,t),ut(e._zod,"values",()=>t.in._zod.values),ut(e._zod,"optin",()=>t.in._zod.optin),ut(e._zod,"optout",()=>t.out._zod.optout),ut(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>uc(l,t.in,r)):uc(a,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>uc(a,t.out,r)):uc(o,t.out,r)}});function uc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const AL=ce("$ZodReadonly",(e,t)=>{Lt.init(e,t),ut(e._zod,"propValues",()=>t.innerType._zod.propValues),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ut(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(Ww):Ww(o)}});function Ww(e){return e.value=Object.freeze(e.value),e}const OL=ce("$ZodCustom",(e,t)=>{Un.init(e,t),Lt.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(a=>Zw(a,n,r,e));Zw(o,n,r,e)}});function Zw(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(xl(o))}}var qw;class DL{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 zL(){return new DL}(qw=globalThis).__zod_globalRegistry??(qw.__zod_globalRegistry=zL());const sl=globalThis.__zod_globalRegistry;function ML(e,t){return new e({type:"string",...Me(t)})}function LL(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function Qw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function FL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function $L(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function VL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function BL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function UL(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function HL(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function WL(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function ZL(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function qL(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function QL(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function YL(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function KL(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function GL(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function XL(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function JL(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function eF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function tF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function nF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function rF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function iF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}function oF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function sF(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function aF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function lF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function uF(e,t){return new e({type:"number",checks:[],...Me(t)})}function cF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function dF(e){return new e({type:"unknown"})}function fF(e,t){return new e({type:"never",...Me(t)})}function Yw(e,t){return new GS({check:"less_than",...Me(t),value:e,inclusive:!1})}function Hh(e,t){return new GS({check:"less_than",...Me(t),value:e,inclusive:!0})}function Kw(e,t){return new XS({check:"greater_than",...Me(t),value:e,inclusive:!1})}function Wh(e,t){return new XS({check:"greater_than",...Me(t),value:e,inclusive:!0})}function Gw(e,t){return new RM({check:"multiple_of",...Me(t),value:e})}function iC(e,t){return new AM({check:"max_length",...Me(t),maximum:e})}function qc(e,t){return new OM({check:"min_length",...Me(t),minimum:e})}function oC(e,t){return new DM({check:"length_equals",...Me(t),length:e})}function hF(e,t){return new zM({check:"string_format",format:"regex",...Me(t),pattern:e})}function pF(e){return new MM({check:"string_format",format:"lowercase",...Me(e)})}function mF(e){return new LM({check:"string_format",format:"uppercase",...Me(e)})}function gF(e,t){return new FM({check:"string_format",format:"includes",...Me(t),includes:e})}function yF(e,t){return new $M({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function vF(e,t){return new VM({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function ha(e){return new BM({check:"overwrite",tx:e})}function xF(e){return ha(t=>t.normalize(e))}function wF(){return ha(e=>e.trim())}function bF(){return ha(e=>e.toLowerCase())}function kF(){return ha(e=>e.toUpperCase())}function SF(){return ha(e=>Oz(e))}function CF(e,t,n){return new e({type:"array",element:t,...Me(n)})}function EF(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function _F(e){const t=PF(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(xl(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(xl(o))}},e(n.value,n)));return t}function PF(e,t){const n=new Un({check:"custom",...Me(t)});return n._zod.check=e,n}function sC(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)??sl,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,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=(p=(h=e._zod).toJSONSchema)==null?void 0:p.call(h);if(u)l.schema=u;else{const x={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,x);else{const S=l.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&&(l.ref||(l.ref=g),on(g,t,x),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&vn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function aC(e,t){var l,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=(l=e.metadataRegistry.get(h[0]))==null?void 0:l.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}},a=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>
302
+
303
+ 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]){a(h);continue}if(e.external){const g=(d=e.external.registry.get(h[0]))==null?void 0:d.id;if(t!==h[0]&&g){a(h);continue}}if((f=e.metadataRegistry.get(h[0]))==null?void 0:f.id){a(h);continue}if(p.cycle){a(h);continue}if(p.count>1&&e.reused==="ref"){a(h);continue}}}function lC(e,t){var l,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,(l=e.external)!=null&&l.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 a=((d=e.external)==null?void 0:d.defs)??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(a[h.defId]=h.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);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 TF=(e,t={})=>n=>{const r=sC({...n,processors:t});return on(e,r),aC(r,e),lC(r,e)},Qc=(e,t,n={})=>r=>{const{libraryOptions:o,target:a}=r??{},l=sC({...o??{},target:a,io:t,processors:n});return on(e,l),aC(l,e),lC(l,e)},NF={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},jF=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:a,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof l=="number"&&(o.maxLength=l),u&&(o.format=NF[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}))])}},RF=(e,t,n,r)=>{const o=n,{minimum:a,maximum:l,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 a=="number"&&(o.minimum=a,typeof h=="number"&&t.target!=="draft-04"&&(h>=a?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 l=="number"&&(o.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},IF=(e,t,n,r)=>{n.not={}},AF=(e,t,n,r)=>{},OF=(e,t,n,r)=>{const o=e._zod.def,a=BS(o.entries);a.every(l=>typeof l=="number")&&(n.type="number"),a.every(l=>typeof l=="string")&&(n.type="string"),n.enum=a},DF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},zF=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},MF=(e,t,n,r)=>{const o=n,a=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=on(a.element,t,{...r,path:[...r.path,"items"]})},LF=(e,t,n,r)=>{var f;const o=n,a=e._zod.def;o.type="object",o.properties={};const l=a.shape;for(const h in l)o.properties[h]=on(l[h],t,{...r,path:[...r.path,"properties",h]});const u=new Set(Object.keys(l)),d=new Set([...u].filter(h=>{const p=a.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),((f=a.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=on(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},FF=(e,t,n,r)=>{const o=e._zod.def,a=o.inclusive===!1,l=o.options.map((u,d)=>on(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",d]}));a?n.oneOf=l:n.anyOf=l},$F=(e,t,n,r)=>{const o=e._zod.def,a=on(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=on(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(a)?a.allOf:[a],...u(l)?l.allOf:[l]];n.allOf=d},VF=(e,t,n,r)=>{const o=e._zod.def,a=on(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},BF=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType},UF=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},HF=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},WF=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},ZF=(e,t,n,r)=>{const o=e._zod.def,a=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;on(a,t,r);const l=t.seen.get(e);l.ref=a},qF=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},uC=(e,t,n,r)=>{const o=e._zod.def;on(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType};function Xw(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function QF(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,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[l].types,f=d&&d[r.code];n[l]=qm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function YF(e,t){for(var n={};e.length;){var r=e[0],o=r.code,a=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:a,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[l].types,f=d&&d[r.code];n[l]=qm(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function ig(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,a){try{return Promise.resolve(Xw(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&Bp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u==null?void 0:u.issues)})(l))return{values:{},errors:Ow(QF(l.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,a){try{return Promise.resolve(Xw(function(){return Promise.resolve((n.mode==="sync"?Qz:Yz)(e,r,t)).then(function(l){return a.shouldUseNativeValidation&&Bp({},a),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof ng})(l))return{values:{},errors:Ow(YF(l.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}var KF=e=>{switch(e){case"success":return JF;case"info":return t4;case"warning":return e4;case"error":return n4;default:return null}},GF=Array(12).fill(0),XF=({visible:e,className:t})=>ae.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ae.createElement("div",{className:"sonner-spinner"},GF.map((n,r)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),JF=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),e4=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),t4=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),n4=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),r4=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),i4=()=>{let[e,t]=ae.useState(document.hidden);return ae.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Wp=1,o4=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:Wp++,a=this.toasts.find(u=>u.id===o),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,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,a,l=r.then(async d=>{if(a=["resolve",d],ae.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(a4(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(a=["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)=>l.then(()=>a[0]==="reject"?f(a[1]):d(a[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)||Wp++;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}},$n=new o4,s4=(e,t)=>{let n=(t==null?void 0:t.id)||Wp++;return $n.addToast({title:e,...t,id:n}),n},a4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",l4=s4,u4=()=>$n.toasts,c4=()=>$n.getActiveToasts(),Ct=Object.assign(l4,{success:$n.success,info:$n.info,warning:$n.warning,error:$n.error,custom:$n.custom,message:$n.message,promise:$n.promise,dismiss:$n.dismiss,loading:$n.loading},{getHistory:u4,getToasts:c4});function d4(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))}d4(`: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%)}
304
+ `);function cc(e){return e.label!==void 0}var f4=3,h4="32px",p4="16px",Jw=4e3,m4=356,g4=14,y4=20,v4=200;function Pr(...e){return e.filter(Boolean).join(" ")}function x4(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var w4=e=>{var t,n,r,o,a,l,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:j,defaultRichColors:B,closeButton:Q,style:oe,cancelButtonStyle:A,actionButtonStyle:K,className:M="",descriptionClassName:ne="",duration:W,position:U,gap:q,loadingIcon:ee,expandByDefault:D,classNames:G,icons:N,closeButtonAriaLabel:L="Close toast",pauseWhenPageIsHidden:Y}=e,[R,ue]=ae.useState(null),[ye,we]=ae.useState(null),[le,ve]=ae.useState(!1),[Ee,ke]=ae.useState(!1),[Ae,Ve]=ae.useState(!1),[nt,It]=ae.useState(!1),[sn,Gt]=ae.useState(!1),[an,tr]=ae.useState(0),[_n,Pn]=ae.useState(0),F=ae.useRef(g.duration||W||Jw),J=ae.useRef(null),se=ae.useRef(null),be=T===0,ge=T+1<=E,V=g.type,ie=g.dismissible!==!1,xe=g.className||"",_e=g.descriptionClassName||"",ze=ae.useMemo(()=>_.findIndex(He=>He.toastId===g.id)||0,[_,g.id]),dt=ae.useMemo(()=>{var He;return(He=g.closeButton)!=null?He:Q},[g.closeButton,Q]),Nt=ae.useMemo(()=>g.duration||W||Jw,[g.duration,W]),Zt=ae.useRef(0),$t=ae.useRef(0),Tn=ae.useRef(0),pt=ae.useRef(null),[pn,Xt]=U.split("-"),ii=ae.useMemo(()=>_.reduce((He,rt,ft)=>ft>=ze?He:He+rt.height,0),[_,ze]),ns=i4(),Pi=g.invert||x,Lr=V==="loading";$t.current=ae.useMemo(()=>ze*q+ii,[ze,ii]),ae.useEffect(()=>{F.current=Nt},[Nt]),ae.useEffect(()=>{ve(!0)},[]),ae.useEffect(()=>{let He=se.current;if(He){let rt=He.getBoundingClientRect().height;return Pn(rt),C(ft=>[{toastId:g.id,height:rt,position:g.position},...ft]),()=>C(ft=>ft.filter(mn=>mn.toastId!==g.id))}},[C,g.id]),ae.useLayoutEffect(()=>{if(!le)return;let He=se.current,rt=He.style.height;He.style.height="auto";let ft=He.getBoundingClientRect().height;He.style.height=rt,Pn(ft),C(mn=>mn.find(Nn=>Nn.toastId===g.id)?mn.map(Nn=>Nn.toastId===g.id?{...Nn,height:ft}:Nn):[{toastId:g.id,height:ft,position:g.position},...mn])},[le,g.title,g.description,C,g.id]);let vr=ae.useCallback(()=>{ke(!0),tr($t.current),C(He=>He.filter(rt=>rt.toastId!==g.id)),setTimeout(()=>{j(g)},v4)},[g,j,C,$t]);ae.useEffect(()=>{if(g.promise&&V==="loading"||g.duration===1/0||g.type==="loading")return;let He;return O||k||Y&&ns?(()=>{if(Tn.current<Zt.current){let rt=new Date().getTime()-Zt.current;F.current=F.current-rt}Tn.current=new Date().getTime()})():F.current!==1/0&&(Zt.current=new Date().getTime(),He=setTimeout(()=>{var rt;(rt=g.onAutoClose)==null||rt.call(g,g),vr()},F.current)),()=>clearTimeout(He)},[O,k,g,V,Y,ns,vr]),ae.useEffect(()=>{g.delete&&vr()},[vr,g.delete]);function Bl(){var He,rt,ft;return N!=null&&N.loading?ae.createElement("div",{className:Pr(G==null?void 0:G.loader,(He=g==null?void 0:g.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":V==="loading"},N.loading):ee?ae.createElement("div",{className:Pr(G==null?void 0:G.loader,(rt=g==null?void 0:g.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":V==="loading"},ee):ae.createElement(XF,{className:Pr(G==null?void 0:G.loader,(ft=g==null?void 0:g.classNames)==null?void 0:ft.loader),visible:V==="loading"})}return ae.createElement("li",{tabIndex:0,ref:se,className:Pr(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[V],(n=g==null?void 0:g.classNames)==null?void 0:n[V]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:B,"data-styled":!(g.jsx||g.unstyled||S),"data-mounted":le,"data-promise":!!g.promise,"data-swiped":sn,"data-removed":Ee,"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":V,"data-invert":Pi,"data-swipe-out":nt,"data-swipe-direction":ye,"data-expanded":!!(O||D&&le),style:{"--index":T,"--toasts-before":T,"--z-index":I.length-T,"--offset":`${Ee?an:$t.current}px`,"--initial-height":D?"auto":`${_n}px`,...oe,...g.style},onDragEnd:()=>{Ve(!1),ue(null),pt.current=null},onPointerDown:He=>{Lr||!ie||(J.current=new Date,tr($t.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(Ve(!0),pt.current={x:He.clientX,y:He.clientY}))},onPointerUp:()=>{var He,rt,ft,mn;if(nt||!ie)return;pt.current=null;let Nn=Number(((He=se.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((rt=se.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xr=new Date().getTime()-((ft=J.current)==null?void 0:ft.getTime()),Jt=R==="x"?Nn:jn,Fr=Math.abs(Jt)/xr;if(Math.abs(Jt)>=y4||Fr>.11){tr($t.current),(mn=g.onDismiss)==null||mn.call(g,g),we(R==="x"?Nn>0?"right":"left":jn>0?"down":"up"),vr(),It(!0),Gt(!1);return}Ve(!1),ue(null)},onPointerMove:He=>{var rt,ft,mn,Nn;if(!pt.current||!ie||((rt=window.getSelection())==null?void 0:rt.toString().length)>0)return;let jn=He.clientY-pt.current.y,xr=He.clientX-pt.current.x,Jt=(ft=e.swipeDirections)!=null?ft:x4(U);!R&&(Math.abs(xr)>1||Math.abs(jn)>1)&&ue(Math.abs(xr)>Math.abs(jn)?"x":"y");let Fr={x:0,y:0};R==="y"?(Jt.includes("top")||Jt.includes("bottom"))&&(Jt.includes("top")&&jn<0||Jt.includes("bottom")&&jn>0)&&(Fr.y=jn):R==="x"&&(Jt.includes("left")||Jt.includes("right"))&&(Jt.includes("left")&&xr<0||Jt.includes("right")&&xr>0)&&(Fr.x=xr),(Math.abs(Fr.x)>0||Math.abs(Fr.y)>0)&&Gt(!0),(mn=se.current)==null||mn.style.setProperty("--swipe-amount-x",`${Fr.x}px`),(Nn=se.current)==null||Nn.style.setProperty("--swipe-amount-y",`${Fr.y}px`)}},dt&&!g.jsx?ae.createElement("button",{"aria-label":L,"data-disabled":Lr,"data-close-button":!0,onClick:Lr||!ie?()=>{}:()=>{var He;vr(),(He=g.onDismiss)==null||He.call(g,g)},className:Pr(G==null?void 0:G.closeButton,(o=g==null?void 0:g.classNames)==null?void 0:o.closeButton)},(a=N==null?void 0:N.close)!=null?a:r4):null,g.jsx||b.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:ae.createElement(ae.Fragment,null,V||g.icon||g.promise?ae.createElement("div",{"data-icon":"",className:Pr(G==null?void 0:G.icon,(l=g==null?void 0:g.classNames)==null?void 0:l.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Bl():null,g.type!=="loading"?g.icon||(N==null?void 0:N[V])||KF(V):null):null,ae.createElement("div",{"data-content":"",className:Pr(G==null?void 0:G.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},ae.createElement("div",{"data-title":"",className:Pr(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?ae.createElement("div",{"data-description":"",className:Pr(ne,_e,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&&cc(g.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||A,onClick:He=>{var rt,ft;cc(g.cancel)&&ie&&((ft=(rt=g.cancel).onClick)==null||ft.call(rt,He),vr())},className:Pr(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&&cc(g.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||K,onClick:He=>{var rt,ft;cc(g.action)&&((ft=(rt=g.action).onClick)==null||ft.call(rt,He),!He.defaultPrevented&&vr())},className:Pr(G==null?void 0:G.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function e0(){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 b4(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,l=a?"--mobile-offset":"--offset",u=a?p4:h4;function d(f){["top","right","bottom","left"].forEach(h=>{n[`${l}-${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[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}var k4=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:d,mobileOffset:f,theme:h="light",richColors:p,duration:x,style:g,visibleToasts:S=f4,toastOptions:k,dir:C=e0(),gap:E=g4,loadingIcon:_,icons:T,containerAriaLabel:I="Notifications",pauseWhenPageIsHidden:O}=e,[j,B]=ae.useState([]),Q=ae.useMemo(()=>Array.from(new Set([r].concat(j.filter(Y=>Y.position).map(Y=>Y.position)))),[j,r]),[oe,A]=ae.useState([]),[K,M]=ae.useState(!1),[ne,W]=ae.useState(!1),[U,q]=ae.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=ae.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=ae.useRef(null),N=ae.useRef(!1),L=ae.useCallback(Y=>{B(R=>{var ue;return(ue=R.find(ye=>ye.id===Y.id))!=null&&ue.delete||$n.dismiss(Y.id),R.filter(({id:ye})=>ye!==Y.id)})},[]);return ae.useEffect(()=>$n.subscribe(Y=>{if(Y.dismiss){B(R=>R.map(ue=>ue.id===Y.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{Lb.flushSync(()=>{B(R=>{let ue=R.findIndex(ye=>ye.id===Y.id);return ue!==-1?[...R.slice(0,ue),{...R[ue],...Y},...R.slice(ue+1)]:[Y,...R]})})})}),[]),ae.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:R})=>{q(R?"dark":"light")})}catch{Y.addListener(({matches:ue})=>{try{q(ue?"dark":"light")}catch(ye){console.error(ye)}})}},[h]),ae.useEffect(()=>{j.length<=1&&M(!1)},[j]),ae.useEffect(()=>{let Y=R=>{var ue,ye;o.every(we=>R[we]||R.code===we)&&(M(!0),(ue=ee.current)==null||ue.focus()),R.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]),ae.useEffect(()=>{if(ee.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[ee.current]),ae.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,R)=>{var ue;let[ye,we]=Y.split("-");return j.length?ae.createElement("ol",{key:Y,dir:C==="auto"?e0():C,tabIndex:-1,ref:ee,className:u,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":ye,"data-lifted":K&&j.length>1&&!a,"data-x-position":we,style:{"--front-toast-height":`${((ue=oe[0])==null?void 0:ue.height)||0}px`,"--width":`${m4}px`,"--gap":`${E}px`,...g,...b4(d,f)},onBlur:le=>{N.current&&!le.currentTarget.contains(le.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=le.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{ne||M(!1)},onDragEnd:()=>M(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},j.filter(le=>!le.position&&R===0||le.position===Y).map((le,ve)=>{var Ee,ke;return ae.createElement(w4,{key:le.id,icons:T,index:ve,toast:le,defaultRichColors:p,duration:(Ee=k==null?void 0:k.duration)!=null?Ee: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:l,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:j.filter(Ae=>Ae.position==le.position),heights:oe.filter(Ae=>Ae.position==le.position),setHeights:A,expandByDefault:a,gap:E,loadingIcon:_,expanded:K,pauseWhenPageIsHidden:O,swipeDirections:e.swipeDirections})})):null}))});const S4=ce("ZodISODateTime",(e,t)=>{nL.init(e,t),_t.init(e,t)});function C4(e){return oF(S4,e)}const E4=ce("ZodISODate",(e,t)=>{rL.init(e,t),_t.init(e,t)});function _4(e){return sF(E4,e)}const P4=ce("ZodISOTime",(e,t)=>{iL.init(e,t),_t.init(e,t)});function T4(e){return aF(P4,e)}const N4=ce("ZodISODuration",(e,t)=>{oL.init(e,t),_t.init(e,t)});function j4(e){return lF(N4,e)}const R4=(e,t)=>{ng.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>qz(e,n)},flatten:{value:n=>Zz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Up,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Up,2)}},isEmpty:{get(){return e.issues.length===0}}})},yr=ce("ZodError",R4,{Parent:Error}),I4=Nd(yr),A4=jd(yr),O4=Rd(yr),D4=Id(yr),z4=Xz(yr),M4=Jz(yr),L4=eM(yr),F4=tM(yr),$4=nM(yr),V4=rM(yr),B4=iM(yr),U4=oM(yr),Ft=ce("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qc(e,"input"),output:Qc(e,"output")}}),e.toJSONSchema=TF(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ho(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)=>po(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>I4(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>O4(e,n,r),e.parseAsync=async(n,r)=>A4(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>D4(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>z4(e,n,r),e.decode=(n,r)=>M4(e,n,r),e.encodeAsync=async(n,r)=>L4(e,n,r),e.decodeAsync=async(n,r)=>F4(e,n,r),e.safeEncode=(n,r)=>$4(e,n,r),e.safeDecode=(n,r)=>V4(e,n,r),e.safeEncodeAsync=async(n,r)=>B4(e,n,r),e.safeDecodeAsync=async(n,r)=>U4(e,n,r),e.refine=(n,r)=>e.check(z$(n,r)),e.superRefine=n=>e.check(M$(n)),e.overwrite=n=>e.check(ha(n)),e.optional=()=>i0(e),e.exactOptional=()=>S$(e),e.nullable=()=>o0(e),e.nullish=()=>i0(o0(e)),e.nonoptional=n=>N$(e,n),e.array=()=>h$(e),e.or=n=>g$([e,n]),e.and=n=>v$(e,n),e.transform=n=>s0(e,b$(n)),e.default=n=>_$(e,n),e.prefault=n=>T$(e,n),e.catch=n=>R$(e,n),e.pipe=n=>s0(e,n),e.readonly=()=>O$(e),e.describe=n=>{const r=e.clone();return sl.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=sl.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return sl.get(e);const r=e.clone();return sl.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),cC=ce("_ZodString",(e,t)=>{rg.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>jF(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(hF(...r)),e.includes=(...r)=>e.check(gF(...r)),e.startsWith=(...r)=>e.check(yF(...r)),e.endsWith=(...r)=>e.check(vF(...r)),e.min=(...r)=>e.check(qc(...r)),e.max=(...r)=>e.check(iC(...r)),e.length=(...r)=>e.check(oC(...r)),e.nonempty=(...r)=>e.check(qc(1,...r)),e.lowercase=r=>e.check(pF(r)),e.uppercase=r=>e.check(mF(r)),e.trim=()=>e.check(wF()),e.normalize=(...r)=>e.check(xF(...r)),e.toLowerCase=()=>e.check(bF()),e.toUpperCase=()=>e.check(kF()),e.slugify=()=>e.check(SF())}),H4=ce("ZodString",(e,t)=>{rg.init(e,t),cC.init(e,t),e.email=n=>e.check(LL(W4,n)),e.url=n=>e.check(UL(Z4,n)),e.jwt=n=>e.check(iF(a$,n)),e.emoji=n=>e.check(HL(q4,n)),e.guid=n=>e.check(Qw(t0,n)),e.uuid=n=>e.check(FL(dc,n)),e.uuidv4=n=>e.check($L(dc,n)),e.uuidv6=n=>e.check(VL(dc,n)),e.uuidv7=n=>e.check(BL(dc,n)),e.nanoid=n=>e.check(WL(Q4,n)),e.guid=n=>e.check(Qw(t0,n)),e.cuid=n=>e.check(ZL(Y4,n)),e.cuid2=n=>e.check(qL(K4,n)),e.ulid=n=>e.check(QL(G4,n)),e.base64=n=>e.check(tF(i$,n)),e.base64url=n=>e.check(nF(o$,n)),e.xid=n=>e.check(YL(X4,n)),e.ksuid=n=>e.check(KL(J4,n)),e.ipv4=n=>e.check(GL(e$,n)),e.ipv6=n=>e.check(XL(t$,n)),e.cidrv4=n=>e.check(JL(n$,n)),e.cidrv6=n=>e.check(eF(r$,n)),e.e164=n=>e.check(rF(s$,n)),e.datetime=n=>e.check(C4(n)),e.date=n=>e.check(_4(n)),e.time=n=>e.check(T4(n)),e.duration=n=>e.check(j4(n))});function Cn(e){return ML(H4,e)}const _t=ce("ZodStringFormat",(e,t)=>{bt.init(e,t),cC.init(e,t)}),W4=ce("ZodEmail",(e,t)=>{qM.init(e,t),_t.init(e,t)}),t0=ce("ZodGUID",(e,t)=>{WM.init(e,t),_t.init(e,t)}),dc=ce("ZodUUID",(e,t)=>{ZM.init(e,t),_t.init(e,t)}),Z4=ce("ZodURL",(e,t)=>{QM.init(e,t),_t.init(e,t)}),q4=ce("ZodEmoji",(e,t)=>{YM.init(e,t),_t.init(e,t)}),Q4=ce("ZodNanoID",(e,t)=>{KM.init(e,t),_t.init(e,t)}),Y4=ce("ZodCUID",(e,t)=>{GM.init(e,t),_t.init(e,t)}),K4=ce("ZodCUID2",(e,t)=>{XM.init(e,t),_t.init(e,t)}),G4=ce("ZodULID",(e,t)=>{JM.init(e,t),_t.init(e,t)}),X4=ce("ZodXID",(e,t)=>{eL.init(e,t),_t.init(e,t)}),J4=ce("ZodKSUID",(e,t)=>{tL.init(e,t),_t.init(e,t)}),e$=ce("ZodIPv4",(e,t)=>{sL.init(e,t),_t.init(e,t)}),t$=ce("ZodIPv6",(e,t)=>{aL.init(e,t),_t.init(e,t)}),n$=ce("ZodCIDRv4",(e,t)=>{lL.init(e,t),_t.init(e,t)}),r$=ce("ZodCIDRv6",(e,t)=>{uL.init(e,t),_t.init(e,t)}),i$=ce("ZodBase64",(e,t)=>{cL.init(e,t),_t.init(e,t)}),o$=ce("ZodBase64URL",(e,t)=>{fL.init(e,t),_t.init(e,t)}),s$=ce("ZodE164",(e,t)=>{hL.init(e,t),_t.init(e,t)}),a$=ce("ZodJWT",(e,t)=>{mL.init(e,t),_t.init(e,t)}),dC=ce("ZodNumber",(e,t)=>{eC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>RF(e,r,o),e.gt=(r,o)=>e.check(Kw(r,o)),e.gte=(r,o)=>e.check(Wh(r,o)),e.min=(r,o)=>e.check(Wh(r,o)),e.lt=(r,o)=>e.check(Yw(r,o)),e.lte=(r,o)=>e.check(Hh(r,o)),e.max=(r,o)=>e.check(Hh(r,o)),e.int=r=>e.check(n0(r)),e.safe=r=>e.check(n0(r)),e.positive=r=>e.check(Kw(0,r)),e.nonnegative=r=>e.check(Wh(0,r)),e.negative=r=>e.check(Yw(0,r)),e.nonpositive=r=>e.check(Hh(0,r)),e.multipleOf=(r,o)=>e.check(Gw(r,o)),e.step=(r,o)=>e.check(Gw(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 og(e){return uF(dC,e)}const l$=ce("ZodNumberFormat",(e,t)=>{gL.init(e,t),dC.init(e,t)});function n0(e){return cF(l$,e)}const u$=ce("ZodUnknown",(e,t)=>{yL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>AF()});function r0(){return dF(u$)}const c$=ce("ZodNever",(e,t)=>{vL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>IF(e,n,r)});function d$(e){return fF(c$,e)}const f$=ce("ZodArray",(e,t)=>{xL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>MF(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(qc(n,r)),e.nonempty=n=>e.check(qc(1,n)),e.max=(n,r)=>e.check(iC(n,r)),e.length=(n,r)=>e.check(oC(n,r)),e.unwrap=()=>e.element});function h$(e,t){return CF(f$,e,t)}const p$=ce("ZodObject",(e,t)=>{bL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>LF(e,n,r,o),ut(e,"shape",()=>t.shape),e.keyof=()=>x$(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:r0()}),e.loose=()=>e.clone({...e._zod.def,catchall:r0()}),e.strict=()=>e.clone({...e._zod.def,catchall:d$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Vz(e,n),e.safeExtend=n=>Bz(e,n),e.merge=n=>Uz(e,n),e.pick=n=>Fz(e,n),e.omit=n=>$z(e,n),e.partial=(...n)=>Hz(fC,e,n[0]),e.required=(...n)=>Wz(hC,e,n[0])});function sg(e,t){const n={type:"object",shape:e??{},...Me(t)};return new p$(n)}const m$=ce("ZodUnion",(e,t)=>{kL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>FF(e,n,r,o),e.options=t.options});function g$(e,t){return new m$({type:"union",options:e,...Me(t)})}const y$=ce("ZodIntersection",(e,t)=>{SL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$F(e,n,r,o)});function v$(e,t){return new y$({type:"intersection",left:e,right:t})}const Zp=ce("ZodEnum",(e,t)=>{CL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,o,a)=>OF(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 a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Zp({...t,checks:[],...Me(o),entries:a})},e.exclude=(r,o)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new Zp({...t,checks:[],...Me(o),entries:a})}});function x$(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Zp({type:"enum",entries:n,...Me(t)})}const w$=ce("ZodTransform",(e,t)=>{EL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zF(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new $S(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(xl(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(xl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n)):(n.value=o,n)}});function b$(e){return new w$({type:"transform",transform:e})}const fC=ce("ZodOptional",(e,t)=>{rC.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function i0(e){return new fC({type:"optional",innerType:e})}const k$=ce("ZodExactOptional",(e,t)=>{_L.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function S$(e){return new k$({type:"optional",innerType:e})}const C$=ce("ZodNullable",(e,t)=>{PL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function o0(e){return new C$({type:"nullable",innerType:e})}const E$=ce("ZodDefault",(e,t)=>{TL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>UF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _$(e,t){return new E$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():HS(t)}})}const P$=ce("ZodPrefault",(e,t)=>{NL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>HF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function T$(e,t){return new P$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():HS(t)}})}const hC=ce("ZodNonOptional",(e,t)=>{jL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function N$(e,t){return new hC({type:"nonoptional",innerType:e,...Me(t)})}const j$=ce("ZodCatch",(e,t)=>{RL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function R$(e,t){return new j$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const I$=ce("ZodPipe",(e,t)=>{IL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ZF(e,n,r,o),e.in=t.in,e.out=t.out});function s0(e,t){return new I$({type:"pipe",in:e,out:t})}const A$=ce("ZodReadonly",(e,t)=>{AL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qF(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function O$(e){return new A$({type:"readonly",innerType:e})}const D$=ce("ZodCustom",(e,t)=>{OL.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,o)=>DF(e,n)});function z$(e,t={}){return EF(D$,e,t)}function M$(e){return _F(e)}const ag=sg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:og().min(0).max(5)}),L$=ag,F$=ag.extend({tags:Cn(),epicId:Cn().nullable()}),$$=ag.extend({tags:Cn(),parentTaskId:Cn().min(1,"Parent task is required")}),V$=e=>{switch(e){case"epic":return L$;case"subtask":return $$;default:return F$}},a0=(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 B$({type:e,defaultStatus:t,onClose:n,onCreated:r}){const o=Km({resolver:ig(V$(e)),defaultValues:a0(e,t)});b.useEffect(()=>{o.reset(a0(e,t))},[e,t,o]);const{formState:{isSubmitting:a}}=o,l=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 l(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:a,handleSubmit:f}}const l0=[{value:"epic",label:"Epic",icon:od},{value:"task",label:"Task",icon:Ol},{value:"subtask",label:"Subtask",icon:rk}];function U$({open:e,onClose:t,onCreated:n,epics:r,tasks:o,defaultStatus:a,defaultType:l}){var S;const[u,d]=b.useState("task"),f=o.filter(k=>!k.parentTaskId),{form:h,isSubmitting:p,handleSubmit:x}=B$({type:u,defaultStatus:a,onClose:t,onCreated:n});b.useEffect(()=>{e&&d(l||"task")},[e,l]);const g=((S=l0.find(k=>k.value===u))==null?void 0:S.icon)||Ol;return y.jsx(FO,{open:e,onOpenChange:k=>!k&&t(),children:y.jsxs(BO,{side:"right",className:"p-0 flex flex-col w-full sm:max-w-md gap-0",children:[y.jsx(UO,{className:"shrink-0 border-b p-4",children:y.jsxs(WO,{className:"flex items-center gap-2",children:[y.jsx(g,{className:"h-5 w-5"}),"Create New ",u.charAt(0).toUpperCase()+u.slice(1)]})}),y.jsx($m,{className:"flex-1 min-h-0",showScrollbar:!0,children:y.jsxs("form",{id:"create-form",onSubmit:x,className:"p-4 space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Type"}),y.jsxs(dr,{value:u,onValueChange:k=>d(k),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsx(pr,{children:l0.map(({value:k,label:C,icon:E})=>y.jsx(nn,{value:k,children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(E,{className:"h-4 w-4"}),C]})},k))})]})]}),y.jsx(Nz,{form:h,type:u,epics:r,parentTasks:f},u)]})}),y.jsxs(HO,{className:"shrink-0 border-t p-4",children:[y.jsx(it,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),y.jsx(it,{type:"submit",form:"create-form",disabled:p,children:p?"Creating...":"Create"})]})]})})}function H$(e){const t=Gs(r=>r.connectionStatus),n=b.useRef(e);return n.current=e,b.useEffect(()=>{const r=Gs.getState().setConnectionStatus;r("connecting");const o=new EventSource("/api/events");return o.onopen=()=>{r("connected")},o.onmessage=a=>{var l;try{const u=JSON.parse(a.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}" → ${ta[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}" → ${ta[u.status]||u.status}`;break;case"epic_deleted":d=`Epic ${u.epicId} deleted`,f=`"${u.epicTitle}"`;break}Ct.info(d,{description:f}),CA({title:d,body:f,tag:u.type}),(l=n.current)==null||l.call(n)}catch{}},o.onerror=()=>{r("disconnected")},()=>{o.close(),r("disconnected")}},[]),{connectionStatus:t}}const W$=uk("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 ao({className:e,variant:t,asChild:n=!1,...r}){const o=n?sk:"span";return y.jsx(o,{"data-slot":"badge",className:Be(W$({variant:t}),e),...r})}function pC({priority:e}){const t=Hc[e]||Hc[2];return y.jsxs(ao,{className:"font-mono text-xs",title:_d[e],style:{backgroundColor:t.bg,color:t.text},children:["P",e]})}function Z$(e,t=[]){let n=[];function r(a,l){const u=b.createContext(l);u.displayName=a+"Context";const d=n.length;n=[...n,l];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=a+"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(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const o=()=>{const a=n.map(l=>b.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,q$(o,...t)]}function q$(...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(a){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(a)[`__scope${f}`];return{...u,...p}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Q$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mC=Q$.reduce((e,t)=>{const n=wm(`Primitive.${t}`),r=b.forwardRef((o,a)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lg="Progress",ug=100,[Y$]=Z$(lg),[K$,G$]=Y$(lg),gC=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=X$,...l}=e;(o||o===0)&&!u0(o)&&console.error(J$(`${o}`,"Progress"));const u=u0(o)?o:ug;r!==null&&!c0(r,u)&&console.error(e3(`${r}`,"Progress"));const d=c0(r,u)?r:null,f=Yc(d)?a(d,u):void 0;return y.jsx(K$,{scope:n,value:d,max:u,children:y.jsx(mC.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Yc(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":xC(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});gC.displayName=lg;var yC="ProgressIndicator",vC=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=G$(yC,n);return y.jsx(mC.div,{"data-state":xC(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});vC.displayName=yC;function X$(e,t){return`${Math.round(e/t*100)}%`}function xC(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Yc(e){return typeof e=="number"}function u0(e){return Yc(e)&&!isNaN(e)&&e>0}function c0(e,t){return Yc(e)&&!isNaN(e)&&e<=t&&e>=0}function J$(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ug}\`.`}function e3(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
305
+ - a positive number
306
+ - less than the value passed to \`max\` (or ${ug} if no \`max\` prop is set)
307
+ - \`null\` or \`undefined\` if the progress is indeterminate.
308
+
309
+ Defaulting to \`null\`.`}var t3=gC,n3=vC;function r3({className:e,value:t,...n}){return y.jsx(t3,{"data-slot":"progress",className:Be("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:y.jsx(n3,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function i3({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(r3,{value:n,className:Be("flex-1 h-1.5",r(n))}),y.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e,"/",t]})]})}function o3({task:e,epicName:t,subtasks:n,onClick:r}){const[o,a]=b.useState(!1);Tz(e);const l=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(Ol,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(pC,{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(od,{width:16}),t]}),e.tags&&e.tags.split(",").map(u=>y.jsx(ao,{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(Xb,{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(Jb,{className:"h-2.5 w-2.5"}),u]},u))]}),n.length>0&&y.jsx(i3,{completed:l,total:n.length})]})}function s3({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(od,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(pC,{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 a3({label:e,tasks:t,epics:n,allTasks:r,allEpics:o,onAddClick:a,onTaskClick:l,onEpicClick:u,onArchiveAll:d}){const f=t.length+n.length,h=g=>{if(!g)return null;const S=o.find(k=>k.id===g);return(S==null?void 0:S.title)||g},p=g=>r.filter(S=>S.parentTaskId===g),x=g=>{const S=r.filter(C=>C.epicId===g&&!C.parentTaskId),k=S.filter(C=>C.status==="completed").length;return{total:S.length,completed:k}};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(ao,{variant:"secondary",className:"text-xs",children:f})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[d&&f>0&&y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d,title:"Archive all completed items",children:y.jsx(Gb,{className:"h-4 w-4"})}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:`Add task to ${e}`,children:y.jsx(sd,{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(g=>y.jsx(s3,{epic:g,taskCount:x(g.id),onClick:()=>u(g)},g.id)),t.map(g=>y.jsx(o3,{task:g,epicName:h(g.epicId),subtasks:p(g.id),onClick:()=>l(g)},g.id)),f===0&&y.jsx("div",{className:"flex items-center justify-center min-h-[80px] text-sm text-muted-foreground italic",children:"No items"})]})})]})}const l3=[{key:"todo",label:"TODO"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"wont_fix",label:"Won't Fix"}];function u3({tasks:e,epics:t,onAddClick:n,onTaskClick:r,onEpicClick:o,onArchiveAllCompleted:a}){const l=e.filter(f=>!f.parentTaskId),u=f=>l.filter(h=>h.status===f),d=f=>t.filter(h=>h.status===f);return y.jsx("div",{className:"flex gap-4 items-start flex-nowrap min-h-[calc(100vh-180px)]",children:l3.map(f=>y.jsx(a3,{label:f.label,tasks:u(f.key),epics:d(f.key),allTasks:e,allEpics:t,onAddClick:()=>n(f.key),onTaskClick:r,onEpicClick:o,onArchiveAll:f.key==="completed"?a:void 0},f.key))})}function c3({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(it,{variant:"destructive",size:"sm",onClick:r,children:"Yes"}),y.jsx(it,{variant:"outline",size:"sm",onClick:o,children:"No"})]}):y.jsxs(it,{variant:"destructive",size:"sm",onClick:n,children:["Delete ",t]})}function wl({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 Sc={exports:{}},d3=Sc.exports,d0;function f3(){return d0||(d0=1,(function(e,t){(function(n,r){e.exports=r()})(d3,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",l="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 U=["th","st","nd","rd"],q=W%100;return"["+W+(U[(q-20)%10]||U[q]||U[0])+"]"}},T=function(W,U,q){var ee=String(W);return!ee||ee.length>=U?W:""+Array(U+1-ee.length).join(q)+W},I={s:T,z:function(W){var U=-W.utcOffset(),q=Math.abs(U),ee=Math.floor(q/60),D=q%60;return(U<=0?"+":"-")+T(ee,2,"0")+":"+T(D,2,"0")},m:function W(U,q){if(U.date()<q.date())return-W(q,U);var ee=12*(q.year()-U.year())+(q.month()-U.month()),D=U.clone().add(ee,p),G=q-D<0,N=U.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:l,ms:a,Q:x}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},O="en",j={};j[O]=_;var B="$isDayjsObject",Q=function(W){return W instanceof M||!(!W||!W[B])},oe=function W(U,q,ee){var D;if(!U)return O;if(typeof U=="string"){var G=U.toLowerCase();j[G]&&(D=G),q&&(j[G]=q,D=G);var N=U.split("-");if(!D&&N.length>1)return W(N[0])}else{var L=U.name;j[L]=U,D=L}return!ee&&D&&(O=D),D||!ee&&O},A=function(W,U){if(Q(W))return W.clone();var q=typeof U=="object"?U:{};return q.date=W,q.args=arguments,new M(q)},K=I;K.l=oe,K.i=Q,K.w=function(W,U){return A(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var M=(function(){function W(q){this.$L=oe(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[B]=!0}var U=W.prototype;return U.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()},U.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()},U.$utils=function(){return K},U.isValid=function(){return this.$d.toString()!==k},U.isSame=function(q,ee){var D=A(q);return this.startOf(ee)<=D&&D<=this.endOf(ee)},U.isAfter=function(q,ee){return A(q)<this.startOf(ee)},U.isBefore=function(q,ee){return this.endOf(ee)<A(q)},U.$g=function(q,ee,D){return K.u(q)?this[ee]:this.set(D,q)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(q,ee){var D=this,G=!!K.u(ee)||ee,N=K.p(q),L=function(Ee,ke){var Ae=K.w(D.$u?Date.UTC(D.$y,ke,Ee):new Date(D.$y,ke,Ee),D);return G?Ae:Ae.endOf(f)},Y=function(Ee,ke){return K.w(D.toDate()[Ee].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ke)),D)},R=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 le=this.$locale().weekStart||0,ve=(R<le?R+7:R)-le;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 l:return Y(we+"Milliseconds",3);default:return this.clone()}},U.endOf=function(q){return this.startOf(q,!1)},U.$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[l]=N+"Seconds",D[a]=N+"Milliseconds",D)[G],Y=G===f?this.$D+(ee-this.$W):ee;if(G===p||G===g){var R=this.clone().set(S,1);R.$d[L](Y),R.init(),this.$d=R.set(S,Math.min(this.$D,R.daysInMonth())).$d}else L&&this.$d[L](Y);return this.init(),this},U.set=function(q,ee){return this.clone().$set(q,ee)},U.get=function(q){return this[K.p(q)]()},U.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[l]=n,D)[N]||1,R=this.$d.getTime()+q*Y;return K.w(R,this)},U.subtract=function(q,ee){return this.add(-1*q,ee)},U.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,R=this.$M,ue=D.weekdays,ye=D.months,we=D.meridiem,le=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")},Ee=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 R+1;case"MM":return K.s(R+1,2,"0");case"MMM":return le(D.monthsShort,R,ye,3);case"MMMM":return le(ye,R);case"D":return ee.$D;case"DD":return K.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return le(D.weekdaysMin,ee.$W,ue,2);case"ddd":return le(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 Ee(L,Y,!0);case"A":return Ee(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(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(q,ee,D){var G,N=this,L=K.p(ee),Y=A(q),R=(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-R)/6048e5;break;case f:G=(ue-R)/864e5;break;case d:G=ue/o;break;case u:G=ue/r;break;case l:G=ue/n;break;default:G=ue}return D?G:K.a(G)},U.daysInMonth=function(){return this.endOf(p).$D},U.$locale=function(){return j[this.$L]},U.locale=function(q,ee){if(!q)return this.$L;var D=this.clone(),G=oe(q,ee,!0);return G&&(D.$L=G),D},U.clone=function(){return K.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},W})(),ne=M.prototype;return A.prototype=ne,[["$ms",a],["$s",l],["$m",u],["$H",d],["$W",f],["$M",p],["$y",g],["$D",S]].forEach((function(W){ne[W[1]]=function(U){return this.$g(U,W[0],W[1])}})),A.extend=function(W,U){return W.$i||(W(U,M,A),W.$i=!0),A},A.locale=oe,A.isDayjs=Q,A.unix=function(W){return A(1e3*W)},A.en=j[O],A.Ls=j,A.p={},A}))})(Sc)),Sc.exports}var h3=f3();const bl=Xo(h3);var Cc={exports:{}},p3=Cc.exports,f0;function m3(){return f0||(f0=1,(function(e,t){(function(n,r){e.exports=r()})(p3,(function(){return function(n,r,o){n=n||{};var a=r.prototype,l={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 a.fromToBase(f,h,p,x)}o.en.relativeTime=l,a.fromToBase=function(f,h,p,x,g){for(var S,k,C,E=p.$locale().relativeTime||l,_=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 j=(n.rounding||Math.round)(Math.abs(S));if(C=S>0,j<=O.r||!O.r){j<=1&&I>0&&(O=_[I-1]);var B=E[O.l];g&&(j=g(""+j)),k=typeof B=="string"?B.replace("%d",j):B(j,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)},a.to=function(f,h){return u(f,h,this,!0)},a.from=function(f,h){return u(f,h,this)};var d=function(f){return f.$u?o.utc():o()};a.toNow=function(f){return this.to(d(this),f)},a.fromNow=function(f){return this.from(d(this),f)}}}))})(Cc)),Cc.exports}var g3=m3();const y3=Xo(g3);bl.extend(y3);function h0(e){return bl(e).fromNow()}function v3(e,t="MMM D, YYYY"){return bl(e).format(t)}function cg(e){const t=bl(),n=bl(e),r=t.diff(n,"minute"),o=t.diff(n,"hour"),a=t.diff(n,"day");return r<1?"just now":r<60?`${r}m ago`:o<24?`${o}h ago`:a<7?`${a}d ago`:n.format("MMM D, YYYY")}function wC({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 ",h0(e)]}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated ",h0(t)]})]})}function bC({status:e,className:t}){const n=Be("h-4 w-4 shrink-0",t);switch(e){case"completed":return y.jsx(Ol,{className:Be(n,"text-green-500")});case"archived":return y.jsx(Gb,{className:Be(n,"text-gray-400")});case"wont_fix":return y.jsx(Qj,{className:Be(n,"text-amber-500")});default:return y.jsx(Kj,{className:Be(n,"opacity-50")})}}const kC={create:{icon:sd,color:"text-green-500"},update:{icon:vm,color:"text-blue-500"},delete:{icon:xm,color:"text-red-500"}};function SC({action:e,className:t}){const n=kC[e],r=n.icon;return y.jsx(r,{className:Be("h-4 w-4",n.color,t)})}function CC(e){return kC[e].color}function Od({value:e,onChange:t,statuses:n,triggerClassName:r}){return y.jsxs(dr,{value:e,onValueChange:t,children:[y.jsx(hr,{className:r,children:y.jsx(fr,{})}),y.jsx(pr,{children:n.map(o=>y.jsx(nn,{value:o,children:ta[o]},o))})]})}function Dd({value:e,onChange:t,triggerClassName:n}){return y.jsxs(dr,{value:e.toString(),onValueChange:r=>t(parseInt(r,10)),children:[y.jsx(hr,{className:n,children:y.jsx(fr,{})}),y.jsx(pr,{children:Object.entries(_d).map(([r,o])=>y.jsxs(nn,{value:r,children:["P",r," - ",o]},r))})]})}function dg({...e}){return y.jsx(D1,{"data-slot":"dialog",...e})}function x3({...e}){return y.jsx(z1,{"data-slot":"dialog-portal",...e})}function w3({className:e,...t}){return y.jsx(M1,{"data-slot":"dialog-overlay",className:Be("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 fg({className:e,children:t,showCloseButton:n=!0,...r}){return y.jsxs(x3,{"data-slot":"dialog-portal",children:[y.jsx(w3,{}),y.jsxs(L1,{"data-slot":"dialog-content",className:Be("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($1,{"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(ad,{}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function b3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-header",className:Be("flex flex-col gap-2 text-center sm:text-left",e),...t})}function k3({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-footer",className:Be("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function S3({className:e,...t}){return y.jsx(F1,{"data-slot":"dialog-title",className:Be("text-lg leading-none font-semibold",e),...t})}function C3({className:e,...t}){return y.jsx(LO,{"data-slot":"dialog-description",className:Be("text-muted-foreground text-sm",e),...t})}const E3={epic:od,task:Ol,subtask:rk};function EC({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,a=E3[t.type];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("div",{className:Be("flex items-center gap-1",o&&"cursor-pointer hover:text-foreground"),onClick:o?t.onClick:void 0,title:t.title,children:[y.jsx(a,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t.id})]}),!r&&y.jsx(id,{className:"h-3 w-3 opacity-50"})]},t.id)})})}function _3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const P3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N3={};function p0(e,t){return(N3.jsx?T3:P3).test(e)}const j3=/[ \t\n\f\r]/g;function R3(e){return typeof e=="object"?e.type==="text"?m0(e.value):!1:m0(e)}function m0(e){return e.replace(j3,"")===""}class Fl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Fl.prototype.normal={};Fl.prototype.property={};Fl.prototype.space=void 0;function _C(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Fl(n,r,t)}function qp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let I3=0;const We=ts(),zt=ts(),Qp=ts(),pe=ts(),gt=ts(),Ls=ts(),Yn=ts();function ts(){return 2**++I3}const Yp=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:zt,commaOrSpaceSeparated:Yn,commaSeparated:Ls,number:pe,overloadedBoolean:Qp,spaceSeparated:gt},Symbol.toStringTag,{value:"Module"})),Zh=Object.keys(Yp);class hg extends Hn{constructor(t,n,r,o){let a=-1;if(super(t,n),g0(this,"space",o),typeof r=="number")for(;++a<Zh.length;){const l=Zh[a];g0(this,Zh[a],(r&Yp[l])===Yp[l])}}}hg.prototype.defined=!0;function g0(e,t,n){n&&(e[t]=n)}function pa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new hg(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[qp(r)]=r,n[qp(a.attribute)]=r}return new Fl(t,n,e.space)}const PC=pa({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:gt,ariaCurrent:null,ariaDescribedBy:gt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:gt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:gt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gt,ariaLevel:pe,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:gt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:gt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:zt,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 TC(e,t){return t in e?e[t]:t}function NC(e,t){return TC(e,t.toLowerCase())}const A3=pa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ls,acceptCharset:gt,accessKey:gt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:gt,autoFocus:We,autoPlay:We,blocking:gt,capture:null,charSet:null,checked:We,cite:null,className:gt,cols:pe,colSpan:null,content:null,contentEditable:zt,controls:We,controlsList:gt,coords:pe|Ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Qp,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:gt,height:pe,hidden:Qp,high:pe,href:null,hrefLang:null,htmlFor:gt,httpEquiv:gt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:gt,itemRef:gt,itemScope:We,itemType:gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:pe,pattern:null,ping:gt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:gt,required:We,reversed:We,rows:pe,rowSpan:pe,sandbox:gt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:zt,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:We,useMap:null,value:zt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gt,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:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:zt,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:We,disableRemotePlayback:We,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:NC}),O3=pa({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:Yn,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:gt,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:We,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:Ls,g2:Ls,glyphName:Ls,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:Yn,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:gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,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:Yn,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:Yn,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:Yn,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:TC}),jC=pa({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()}}),RC=pa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:NC}),IC=pa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),D3={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"},z3=/[A-Z]/g,y0=/-[a-z]/g,M3=/^data[-\w.:]+$/i;function L3(e,t){const n=qp(t);let r=t,o=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&M3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(y0,$3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!y0.test(a)){let l=a.replace(z3,F3);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=hg}return new o(r,t)}function F3(e){return"-"+e.toLowerCase()}function $3(e){return e.charAt(1).toUpperCase()}const V3=_C([PC,A3,jC,RC,IC],"html"),pg=_C([PC,O3,jC,RC,IC],"svg");function B3(e){return e.join(" ").trim()}var js={},qh,v0;function U3(){if(v0)return qh;v0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
310
+ `,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 U=W.match(t);U&&(_+=U.length);var q=W.lastIndexOf(d);T=~q?W.length-q:T+W.length}function O(){var W={line:_,column:T};return function(U){return U.position=new j(W),oe(),U}}function j(W){this.start=W,this.end={line:_,column:T},this.source=E.source}j.prototype.content=C;function B(W){var U=new Error(E.source+":"+_+":"+T+": "+W);if(U.reason=W,U.filename=E.source,U.line=_,U.column=T,U.source=C,!E.silent)throw U}function Q(W){var U=W.exec(C);if(U){var q=U[0];return I(q),C=C.slice(q.length),U}}function oe(){Q(n)}function A(W){var U;for(W=W||[];U=K();)U!==!1&&W.push(U);return W}function K(){var W=O();if(!(f!=C.charAt(0)||h!=C.charAt(1))){for(var U=2;p!=C.charAt(U)&&(h!=C.charAt(U)||f!=C.charAt(U+1));)++U;if(U+=2,p===C.charAt(U-1))return B("End of comment missing");var q=C.slice(2,U-2);return T+=2,I(q),C=C.slice(U),T+=2,W({type:x,comment:q})}}function M(){var W=O(),U=Q(r);if(U){if(K(),!Q(o))return B("property missing ':'");var q=Q(a),ee=W({type:g,property:k(U[0].replace(e,p)),value:q?k(q[0].replace(e,p)):p});return Q(l),ee}}function ne(){var W=[];A(W);for(var U;U=M();)U!==!1&&(W.push(U),A(W));return W}return oe(),ne()}function k(C){return C?C.replace(u,p):p}return qh=S,qh}var x0;function H3(){if(x0)return js;x0=1;var e=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=n;const t=e(U3());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:h}=d;u?o(f,h,d):h&&(a=a||{},a[f]=h)}),a}return js}var el={},w0;function W3(){if(w0)return el;w0=1,Object.defineProperty(el,"__esModule",{value:!0}),el.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(o,u):f=f.replace(r,u),f.replace(t,l))};return el.camelCase=d,el}var tl,b0;function Z3(){if(b0)return tl;b0=1;var e=tl&&tl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(H3()),n=W3();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,tl=r,tl}var q3=Z3();const Q3=Xo(q3),AC=OC("end"),mg=OC("start");function OC(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 Y3(e){const t=mg(e),n=AC(e);if(t&&n)return{start:t,end:n}}function ul(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?k0(e.position):"start"in e||"end"in e?k0(e):"line"in e||"column"in e?Kp(e):""}function Kp(e){return S0(e&&e.line)+":"+S0(e&&e.column)}function k0(e){return Kp(e&&e.start)+"-"+Kp(e&&e.end)}function S0(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="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=ul(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.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 gg={}.hasOwnProperty,K3=new Map,G3=/[A-Z]/g,X3=new Set(["table","tbody","thead","tfoot","tr"]),J3=new Set(["td","th"]),DC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e5(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=l5(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=a5(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"?pg:V3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=zC(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function zC(e,t,n){if(t.type==="element")return t5(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i5(e,t,n);if(t.type==="mdxjsEsm")return r5(e,t);if(t.type==="root")return o5(e,t,n);if(t.type==="text")return s5(e,t)}function t5(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(t);const a=LC(e,t.tagName,!1),l=u5(e,t);let u=vg(e,t);return X3.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!R3(d):!0})),MC(e,l,a,t),yg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function n5(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)}kl(e,t.position)}function r5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kl(e,t.position)}function i5(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:LC(e,t.name,!0),l=c5(e,t),u=vg(e,t);return MC(e,l,a,t),yg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function o5(e,t,n){const r={};return yg(r,vg(e,t)),e.create(t,e.Fragment,r,n)}function s5(e,t){return t.value}function MC(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function a5(e,t,n){return r;function r(o,a,l,u){const f=Array.isArray(l.children)?n:t;return u?f(a,l,u):f(a,l)}}function l5(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=mg(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function u5(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&gg.call(t.properties,o)){const a=d5(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&J3.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function c5(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else kl(e,t.position);else{const o=r.name;let a;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,a=e.evaluater.evaluateExpression(u.expression)}else kl(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function vg(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:K3;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;l=d+"-"+f,o.set(d,f+1)}}const u=zC(e,a,l);u!==void 0&&n.push(u)}return n}function d5(e,t,n){const r=L3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_3(n):B3(n)),r.property==="style"){let o=typeof n=="object"?n:f5(e,String(n));return e.stylePropertyNameCase==="css"&&(o=h5(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?D3[r.property]||r.property:r.attribute,n]}}function f5(e,t){try{return Q3(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=DC+"#cannot-parse-style-attribute",o}}function LC(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=p0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=p0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return gg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);kl(e)}function kl(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=DC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function h5(e){const t={};let n;for(n in e)gg.call(e,n)&&(t[p5(n)]=e[n]);return t}function p5(e){let t=e.replace(G3,m5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function m5(e){return"-"+e.toLowerCase()}const Qh={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"]},g5={};function xg(e,t){const n=g5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return FC(e,r,o)}function FC(e,t,n){if(y5(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 C0(e.children,t,n)}return Array.isArray(e)?C0(e,t,n):""}function C0(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=FC(e[o],t,n);return r.join("")}function y5(e){return!!(e&&typeof e=="object")}const E0=document.createElement("i");function wg(e){const t="&"+e+";";E0.innerHTML=t;const n=E0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function er(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function cr(e,t){return e.length>0?(er(e,e.length,0,t),e):t}const _0={}.hasOwnProperty;function $C(e){const t={};let n=-1;for(;++n<e.length;)v5(t,e[n]);return t}function v5(e,t){let n;for(n in t){const o=(_0.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){_0.call(o,l)||(o[l]=[]);const u=a[l];x5(o[l],Array.isArray(u)?u:u?[u]:[])}}}function x5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);er(e,0,0,r)}function VC(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 Ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const En=mo(/[A-Za-z]/),fn=mo(/[\dA-Za-z]/),w5=mo(/[#-'*+\--9=?A-Z^-~]/);function Kc(e){return e!==null&&(e<32||e===127)}const Gp=mo(/\d/),b5=mo(/[\dA-Fa-f]/),k5=mo(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const zd=mo(new RegExp("\\p{P}|\\p{S}","u")),Go=mo(/\s/);function mo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ma(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),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 a=0;return l;function l(d){return Ke(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ke(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const S5={tokenize:C5};function C5(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"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $e(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const E5={tokenize:_5},P0={tokenize:P5};function _5(e){const t=this,n=[];let r=0,o,a,l;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,j;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){j=t.events[O][1].end;break}E(r);let B=I;for(;B<t.events.length;)t.events[B][1].end={...j},B++;return er(t.events,O+1,0,t.events.slice(I)),t.events.length=B,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(P0,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,l=t.now().offset,S(T)}function x(T){return t.containerState={},e.attempt(P0,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:a}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return $e(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=a,a&&(a.next=T),a=T,o.defineSkip(T.start),o.write(O),t.parser.lazy[T.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<l&&(!o.events[j][1].end||o.events[j][1].end.offset>l))return;const B=t.events.length;let Q=B,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),j=B;j<t.events.length;)t.events[j][1].end={...A},j++;er(t.events,Q+1,0,t.events.slice(B)),t.events.length=j}}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]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function P5(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 na(e){if(e===null||ht(e)||Go(e))return 1;if(zd(e))return 2}function Md(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Xp={name:"attention",resolveAll:T5,tokenize:N5};function T5(e,t){let n=-1,r,o,a,l,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};T0(p,-d),T0(x,d),l={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},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=cr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=cr(f,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=cr(f,Md(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=cr(f,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=cr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,er(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 N5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=na(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const f=e.exit("attentionSequence"),h=na(d),p=!h||h===2&&o||n.includes(d),x=!o||o===2&&h||n.includes(r);return f._open=!!(a===42?p:p&&(o||!x)),f._close=!!(a===42?x:x&&(h||!p)),t(d)}}function T0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const j5={name:"autolink",tokenize:R5};function R5(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"),a}function a(g){return En(g)?(e.consume(g),l):g===64?n(g):f(g)}function l(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||Kc(g)?n(g):(e.consume(g),d)}function f(g){return g===64?(e.consume(g),h):w5(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 $l={partial:!0,tokenize:I5};function I5(e,t,n){return r;function r(a){return Ke(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const BC={continuation:{tokenize:O5},exit:D5,name:"blockQuote",tokenize:A5};function A5(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ke(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function O5(e,t,n){const r=this;return o;function o(l){return Ke(l)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(BC,t,n)(l)}}function D5(e){e.exit("blockQuote")}const UC={name:"characterEscape",tokenize:z5};function z5(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return k5(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const HC={name:"characterReference",tokenize:M5};function M5(e,t,n){const r=this;let o=0,a,l;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"),a=31,l=fn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=b5,h):(e.enter("characterReferenceValue"),a=7,l=Gp,h(p))}function h(p){if(p===59&&o){const x=e.exit("characterReferenceValue");return l===fn&&!wg(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&o++<a?(e.consume(p),h):n(p)}}const N0={partial:!0,tokenize:F5},j0={concrete:!0,name:"codeFenced",tokenize:L5};function L5(e,t,n){const r=this,o={partial:!0,tokenize:O};let a=0,l=0,u;return d;function d(j){return f(j)}function f(j){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(j)}function h(j){return j===u?(l++,e.consume(j),h):l<3?n(j):(e.exit("codeFencedFenceSequence"),Ke(j)?Xe(e,p,"whitespace")(j):p(j))}function p(j){return j===null||$e(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(N0,k,I)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,g,"whitespace")(j)):j===96&&j===u?n(j):(e.consume(j),x)}function g(j){return j===null||$e(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===null||$e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===u?n(j):(e.consume(j),S)}function k(j){return e.attempt(o,I,C)(j)}function C(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),E}function E(j){return a>0&&Ke(j)?Xe(e,_,"linePrefix",a+1)(j):_(j)}function _(j){return j===null||$e(j)?e.check(N0,k,I)(j):(e.enter("codeFlowValue"),T(j))}function T(j){return j===null||$e(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),T)}function I(j){return e.exit("codeFenced"),t(j)}function O(j,B,Q){let oe=0;return A;function A(U){return j.enter("lineEnding"),j.consume(U),j.exit("lineEnding"),K}function K(U){return j.enter("codeFencedFence"),Ke(U)?Xe(j,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):M(U)}function M(U){return U===u?(j.enter("codeFencedFenceSequence"),ne(U)):Q(U)}function ne(U){return U===u?(oe++,j.consume(U),ne):oe>=l?(j.exit("codeFencedFenceSequence"),Ke(U)?Xe(j,W,"whitespace")(U):W(U)):Q(U)}function W(U){return U===null||$e(U)?(j.exit("codeFencedFence"),B(U)):Q(U)}}}function F5(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Yh={name:"codeIndented",tokenize:V5},$5={partial:!0,tokenize:B5};function V5(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):$e(f)?e.attempt($5,l,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||$e(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function B5(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):$e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Xe(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):$e(l)?o(l):n(l)}}const U5={name:"codeText",previous:W5,resolve:H5,tokenize:Z5};function H5(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 W5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Z5(e,t,n){let r=0,o,a;return l;function l(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?(a=e.enter("codeTextSequence"),o=0,h(p)):$e(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||$e(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)):(a.type="codeTextData",f(p))}}class q5{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 a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&nl(this.left,r),a.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),nl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),nl(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);nl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);nl(this.left,n.reverse())}}}function nl(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 WC(e){const t={};let n=-1,r,o,a,l,u,d,f;const h=new q5(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,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Q5(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[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 er(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function Q5(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.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;);a.push(o),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),p&&l.defineSkip(g.start),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),g._isInFirstContentOfListItem&&(l._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(l.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]),_=a.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 Y5={resolve:G5,tokenize:X5},K5={partial:!0,tokenize:J5};function G5(e){return WC(e),e}function X5(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?a(u):$e(u)?e.check(K5,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function J5(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(l){if(l===null||$e(l))return n(l);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(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function ZC(e,t,n,r,o,a,l,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(a),e.consume(E),e.exit(a),x):E===null||E===32||E===41||Kc(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),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||$e(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||ht(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),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||Kc(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 qC(e,t,n,r,o,a){const l=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(a),h}function h(g){return u>999||g===null||g===91||g===93&&!d||g===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(g):g===93?(e.exit(a),e.enter(o),e.consume(g),e.exit(o),e.exit(r),t):$e(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||$e(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),d||(d=!Ke(g)),g===92?x:p)}function x(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function QC(e,t,n,r,o,a){let l;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),t):(e.enter(a),f(x))}function f(x){return x===l?(e.exit(a),d(l)):x===null?n(x):$e(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===l||x===null||$e(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?p:h)}function p(x){return x===l||x===92?(e.consume(x),h):h(x)}}function cl(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const e6={name:"definition",tokenize:n6},t6={partial:!0,tokenize:r6};function n6(e,t,n){const r=this;let o;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return qC.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return o=Ar(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 ht(g)?cl(e,f)(g):f(g)}function f(g){return ZC(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(t6,p,p)(g)}function p(g){return Ke(g)?Xe(e,x,"whitespace")(g):x(g)}function x(g){return g===null||$e(g)?(e.exit("definition"),r.parser.defined.push(o),t(g)):n(g)}}function r6(e,t,n){return r;function r(u){return ht(u)?cl(e,o)(u):n(u)}function o(u){return QC(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ke(u)?Xe(e,l,"whitespace")(u):l(u)}function l(u){return u===null||$e(u)?t(u):n(u)}}const i6={name:"hardBreakEscape",tokenize:o6};function o6(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const s6={name:"headingAtx",resolve:a6,tokenize:l6};function a6(e,t){let n=e.length-2,r=3,o,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},er(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function l6(e,t,n){let r=0;return o;function o(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||ht(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||$e(h)?(e.exit("atxHeading"),t(h)):Ke(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||ht(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const u6=["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"],R0=["pre","script","style","textarea"],c6={concrete:!0,name:"htmlFlow",resolveTo:h6,tokenize:p6},d6={partial:!0,tokenize:g6},f6={partial:!0,tokenize:m6};function h6(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 p6(e,t,n){const r=this;let o,a,l,u,d;return f;function f(R){return h(R)}function h(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),x):R===47?(e.consume(R),a=!0,k):R===63?(e.consume(R),o=3,r.interrupt?t:N):En(R)?(e.consume(R),l=String.fromCharCode(R),C):n(R)}function x(R){return R===45?(e.consume(R),o=2,g):R===91?(e.consume(R),o=5,u=0,S):En(R)?(e.consume(R),o=4,r.interrupt?t:N):n(R)}function g(R){return R===45?(e.consume(R),r.interrupt?t:N):n(R)}function S(R){const ue="CDATA[";return R===ue.charCodeAt(u++)?(e.consume(R),u===ue.length?r.interrupt?t:M:S):n(R)}function k(R){return En(R)?(e.consume(R),l=String.fromCharCode(R),C):n(R)}function C(R){if(R===null||R===47||R===62||ht(R)){const ue=R===47,ye=l.toLowerCase();return!ue&&!a&&R0.includes(ye)?(o=1,r.interrupt?t(R):M(R)):u6.includes(l.toLowerCase())?(o=6,ue?(e.consume(R),E):r.interrupt?t(R):M(R)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?_(R):T(R))}return R===45||fn(R)?(e.consume(R),l+=String.fromCharCode(R),C):n(R)}function E(R){return R===62?(e.consume(R),r.interrupt?t:M):n(R)}function _(R){return Ke(R)?(e.consume(R),_):A(R)}function T(R){return R===47?(e.consume(R),A):R===58||R===95||En(R)?(e.consume(R),I):Ke(R)?(e.consume(R),T):A(R)}function I(R){return R===45||R===46||R===58||R===95||fn(R)?(e.consume(R),I):O(R)}function O(R){return R===61?(e.consume(R),j):Ke(R)?(e.consume(R),O):T(R)}function j(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,B):Ke(R)?(e.consume(R),j):Q(R)}function B(R){return R===d?(e.consume(R),d=null,oe):R===null||$e(R)?n(R):(e.consume(R),B)}function Q(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||ht(R)?O(R):(e.consume(R),Q)}function oe(R){return R===47||R===62||Ke(R)?T(R):n(R)}function A(R){return R===62?(e.consume(R),K):n(R)}function K(R){return R===null||$e(R)?M(R):Ke(R)?(e.consume(R),K):n(R)}function M(R){return R===45&&o===2?(e.consume(R),q):R===60&&o===1?(e.consume(R),ee):R===62&&o===4?(e.consume(R),L):R===63&&o===3?(e.consume(R),N):R===93&&o===5?(e.consume(R),G):$e(R)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(d6,Y,ne)(R)):R===null||$e(R)?(e.exit("htmlFlowData"),ne(R)):(e.consume(R),M)}function ne(R){return e.check(f6,W,Y)(R)}function W(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return R===null||$e(R)?ne(R):(e.enter("htmlFlowData"),M(R))}function q(R){return R===45?(e.consume(R),N):M(R)}function ee(R){return R===47?(e.consume(R),l="",D):M(R)}function D(R){if(R===62){const ue=l.toLowerCase();return R0.includes(ue)?(e.consume(R),L):M(R)}return En(R)&&l.length<8?(e.consume(R),l+=String.fromCharCode(R),D):M(R)}function G(R){return R===93?(e.consume(R),N):M(R)}function N(R){return R===62?(e.consume(R),L):R===45&&o===2?(e.consume(R),N):M(R)}function L(R){return R===null||$e(R)?(e.exit("htmlFlowData"),Y(R)):(e.consume(R),L)}function Y(R){return e.exit("htmlFlow"),t(R)}}function m6(e,t,n){const r=this;return o;function o(l){return $e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function g6(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt($l,t,n)}}const y6={name:"htmlText",tokenize:v6};function v6(e,t,n){const r=this;let o,a,l;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):En(N)?(e.consume(N),Q):n(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,S):En(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):$e(N)?(l=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(a++)?(e.consume(N),a===L.length?k:S):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),C):$e(N)?(l=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):$e(N)?(l=_,ee(N)):(e.consume(N),_)}function T(N){return N===null?n(N):N===63?(e.consume(N),I):$e(N)?(l=T,ee(N)):(e.consume(N),T)}function I(N){return N===62?q(N):T(N)}function O(N){return En(N)?(e.consume(N),j):n(N)}function j(N){return N===45||fn(N)?(e.consume(N),j):B(N)}function B(N){return $e(N)?(l=B,ee(N)):Ke(N)?(e.consume(N),B):q(N)}function Q(N){return N===45||fn(N)?(e.consume(N),Q):N===47||N===62||ht(N)?oe(N):n(N)}function oe(N){return N===47?(e.consume(N),q):N===58||N===95||En(N)?(e.consume(N),A):$e(N)?(l=oe,ee(N)):Ke(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):$e(N)?(l=K,ee(N)):Ke(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):$e(N)?(l=M,ee(N)):Ke(N)?(e.consume(N),M):(e.consume(N),W)}function ne(N){return N===o?(e.consume(N),o=void 0,U):N===null?n(N):$e(N)?(l=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||ht(N)?oe(N):(e.consume(N),W)}function U(N){return N===47||N===62||ht(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 Ke(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"),l(N)}}const bg={name:"labelEnd",resolveAll:k6,resolveTo:S6,tokenize:C6},x6={tokenize:E6},w6={tokenize:_6},b6={tokenize:P6};function k6(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&&er(e,0,e.length,n),e}function S6(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=cr(u,e.slice(a+1,a+r+3)),u=cr(u,[["enter",h,t]]),u=cr(u,Md(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=cr(u,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),u=cr(u,e.slice(l+1)),u=cr(u,[["exit",d,t]]),er(e,a,e.length,u),e}function C6(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(x){return a?a._inactive?p(x):(l=r.parser.defined.includes(Ar(r.sliceSerialize({start:a.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(x6,h,l?h:p)(x):x===91?e.attempt(w6,h,l?f:p)(x):l?h(x):p(x)}function f(x){return e.attempt(b6,h,p)(x)}function h(x){return t(x)}function p(x){return a._balanced=!0,n(x)}}function E6(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 ht(p)?cl(e,a)(p):a(p)}function a(p){return p===41?h(p):ZC(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ht(p)?cl(e,d)(p):h(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?QC(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return ht(p)?cl(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 _6(e,t,n){const r=this;return o;function o(u){return qC.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function P6(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const T6={name:"labelStartImage",resolveAll:bg.resolveAll,tokenize:N6};function N6(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const j6={name:"labelStartLink",resolveAll:bg.resolveAll,tokenize:R6};function R6(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Kh={name:"lineEnding",tokenize:I6};function I6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ec={name:"thematicBreak",tokenize:A6};function A6(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||$e(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Xe(e,u,"whitespace")(f):u(f))}}const Mn={continuation:{tokenize:M6},exit:F6,name:"list",tokenize:z6},O6={partial:!0,tokenize:$6},D6={partial:!0,tokenize:L6};function z6(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=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:Gp(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(Ec,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 Gp(g)&&++l<10?(e.consume(g),d):(!r.interrupt||l<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($l,r.interrupt?n:h,e.attempt(O6,x,p))}function h(g){return r.containerState.initialBlankLine=!0,a++,x(g)}function p(g){return Ke(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),x):n(g)}function x(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function M6(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($l,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ke(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(D6,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function L6(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function F6(e){e.exit(this.containerState.type)}function $6(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ke(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const I0={name:"setextUnderline",resolveTo:V6,tokenize:B6};function V6(e,t){let n=e.length,r,o,a;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),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function B6(e,t,n){const r=this;let o;return a;function a(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,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Ke(f)?Xe(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||$e(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const U6={tokenize:H6};function H6(e){const t=this,n=e.attempt($l,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Y5,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const W6={resolveAll:KC()},Z6=YC("string"),q6=YC("text");function YC(e){return{resolveAll:KC(e==="text"?Q6:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(h){return f(h)?a(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"),a(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 KC(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Q6(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 a=o.length,l=-1,u=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(f===-2)d=!0,u++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,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 Y6={42:Mn,43:Mn,45:Mn,48:Mn,49:Mn,50:Mn,51:Mn,52:Mn,53:Mn,54:Mn,55:Mn,56:Mn,57:Mn,62:BC},K6={91:e6},G6={[-2]:Yh,[-1]:Yh,32:Yh},X6={35:s6,42:Ec,45:[I0,Ec],60:c6,61:I0,95:Ec,96:j0,126:j0},J6={38:HC,92:UC},eV={[-5]:Kh,[-4]:Kh,[-3]:Kh,33:T6,38:HC,42:Xp,60:[j5,y6],91:j6,92:[i6,UC],93:bg,95:Xp,96:U5},tV={null:[Xp,W6]},nV={null:[42,95]},rV={null:[]},iV=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nV,contentInitial:K6,disable:rV,document:Y6,flow:X6,flowInitial:G6,insideSpan:tV,string:J6,text:eV},Symbol.toStringTag,{value:"Module"}));function oV(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={},a=[];let l=[],u=[];const d={attempt:B(O),check:B(j),consume:_,enter:T,exit:I,interrupt:B(j,{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&&a.push(t),f;function p(K){return l=cr(l,K),C(),l[l.length-1]!==null?[]:(Q(t,0),f.events=Md(a,f.events,f),f.events)}function x(K,M){return aV(g(K),M)}function g(K){return sV(l,K)}function S(){const{_bufferIndex:K,_index:M,line:ne,column:W,offset:U}=r;return{_bufferIndex:K,_index:M,line:ne,column:W,offset:U}}function k(K){o[K.line]=K.column,A()}function C(){let K;for(;r._index<l.length;){const M=l[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){$e(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===l[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 j(K,M){M.restore()}function B(K,M){return ne;function ne(W,U,q){let ee,D,G,N;return Array.isArray(W)?Y(W):"tokenize"in W?Y([W]):L(W);function L(we){return le;function le(ve){const Ee=ve!==null&&we[ve],ke=ve!==null&&we.null,Ae=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return Y(Ae)(ve)}}function Y(we){return ee=we,D=0,we.length===0?q:R(we[D])}function R(we){return le;function le(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),U}function ye(we){return N.restore(),++D<ee.length?R(ee[D]):q}}}function Q(K,M){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&er(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,U=Array.from(u);return{from:W,restore:q};function q(){r=K,f.previous=M,f.currentConstruct=ne,f.events.length=W,u=U,A()}}function A(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function sV(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function aV(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
311
+ `;break}case-3:{l=`\r
312
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function lV(e){const r={constructs:$C([iV,...(e||{}).extensions||[]]),content:o(S5),defined:[],document:o(E5),flow:o(U6),lazy:{},string:o(Z6),text:o(q6)};return r;function o(a){return l;function l(u){return oV(r,a,u)}}}function uV(e){for(;!WC(e););return e}const A0=/[\0\t\n\r]/g;function cV(){let e=1,t="",n=!0,r;return o;function o(a,l,u){const d=[];let f,h,p,x,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(A0.lastIndex=p,f=A0.exec(a),x=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(x),!f){t=a.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(a.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 dV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fV(e){return e.replace(dV,hV)}function hV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return VC(n.slice(a?2:1),a?16:10)}return wg(n)||e}const GC={}.hasOwnProperty;function pV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),mV(n)(uV(lV(n).document().write(cV()(e,t,!0))))}function mV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_n),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:a(sn),blockQuote:a(ke),characterEscape:oe,characterReference:oe,codeFenced:a(Ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ae,l),codeText:a(Ve,l),codeTextData:oe,data:oe,codeFlowValue:oe,definition:a(nt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(It),hardBreakEscape:a(Gt),hardBreakTrailing:a(Gt),htmlFlow:a(an,l),htmlFlowData:oe,htmlText:a(an,l),htmlTextData:oe,image:a(tr),label:l,link:a(_n),listItem:a(F),listItemValue:x,listOrdered:a(Pn,p),listUnordered:a(Pn),paragraph:a(J),reference:R,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(sn),strong:a(se),thematicBreak:a(ge)},exit:{atxHeading:d(),atxHeadingSequence:O,autolink:d(),autolinkEmail:Ee,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:we,characterReference:le,codeFenced:d(C),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:S,codeFlowValue:A,codeIndented:d(E),codeText:d(U),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:B,setextHeadingText:j,strong:d(),thematicBreak:d()}};XC(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(V){let ie={type:"root",children:[]};const xe={stack:[ie],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:h,data:n},_e=[];let ze=-1;for(;++ze<V.length;)if(V[ze][1].type==="listOrdered"||V[ze][1].type==="listUnordered")if(V[ze][0]==="enter")_e.push(ze);else{const dt=_e.pop();ze=o(V,dt,ze)}for(ze=-1;++ze<V.length;){const dt=t[V[ze][0]];GC.call(dt,V[ze][1].type)&&dt[V[ze][1].type].call(Object.assign({sliceSerialize:V[ze][2].sliceSerialize},xe),V[ze][1])}if(xe.tokenStack.length>0){const dt=xe.tokenStack[xe.tokenStack.length-1];(dt[1]||O0).call(xe,void 0,dt[0])}for(ie.position={start:Qi(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Qi(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<t.transforms.length;)ie=t.transforms[ze](ie)||ie;return ie}function o(V,ie,xe){let _e=ie-1,ze=-1,dt=!1,Nt,Zt,$t,Tn;for(;++_e<=xe;){const pt=V[_e];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ze++:ze--,Tn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Nt&&!Tn&&!ze&&!$t&&($t=_e),Tn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tn=void 0}if(!ze&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ze===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Nt){let pn=_e;for(Zt=void 0;pn--;){const Xt=V[pn];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;Zt&&(V[Zt][1].type="lineEndingBlank",dt=!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}$t&&(!Zt||$t<Zt)&&(Nt._spread=!0),Nt.end=Object.assign({},Zt?V[Zt][1].start:pt[1].end),V.splice(Zt||_e,0,["exit",Nt,pt[2]]),_e++,xe++}if(pt[1].type==="listItemPrefix"){const pn={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Nt=pn,V.splice(_e,0,["enter",pn,pt[2]]),_e++,xe++,$t=void 0,Tn=!0}}}return V[ie][1]._spread=dt,xe}function a(V,ie){return xe;function xe(_e){u.call(this,V(_e),_e),ie&&ie.call(this,_e)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(V,ie,xe){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([ie,xe||void 0]),V.position={start:Qi(ie.start),end:void 0}}function d(V){return ie;function ie(xe){V&&V.call(this,xe),f.call(this,xe)}}function f(V,ie){const xe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==V.type&&(ie?ie.call(this,V,_e[0]):(_e[1]||O0).call(this,V,_e[0]));else throw new Error("Cannot close `"+V.type+"` ("+ul({start:V.start,end:V.end})+"): it’s not open");xe.position.end=Qi(V.end)}function h(){return xg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(V){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function g(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=V}function S(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=V}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/(\r?\n|\r)$/g,"")}function _(V){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Ar(this.sliceSerialize(V)).toLowerCase()}function T(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function I(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function O(V){const ie=this.stack[this.stack.length-1];if(!ie.depth){const xe=this.sliceSerialize(V).length;ie.depth=xe}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function B(V){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(V){const xe=this.stack[this.stack.length-1].children;let _e=xe[xe.length-1];(!_e||_e.type!=="text")&&(_e=be(),_e.position={start:Qi(V.start),end:void 0},xe.push(_e)),this.stack.push(_e)}function A(V){const ie=this.stack.pop();ie.value+=this.sliceSerialize(V),ie.position.end=Qi(V.end)}function K(V){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ie.children[ie.children.length-1];xe.position.end=Qi(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(oe.call(this,V),A.call(this,V))}function M(){this.data.atHardBreak=!0}function ne(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function W(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function U(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function q(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function ee(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function D(V){const ie=this.sliceSerialize(V),xe=this.stack[this.stack.length-2];xe.label=fV(ie),xe.identifier=Ar(ie).toLowerCase()}function G(){const V=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 _e=V.children;xe.children=_e}else xe.alt=ie}function N(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function L(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function Y(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ue(V){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Ar(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function ye(V){this.data.characterReferenceType=V.type}function we(V){const ie=this.sliceSerialize(V),xe=this.data.characterReferenceType;let _e;xe?(_e=VC(ie,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=wg(ie);const ze=this.stack[this.stack.length-1];ze.value+=_e}function le(V){const ie=this.stack.pop();ie.position.end=Qi(V.end)}function ve(V){A.call(this,V);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(V)}function Ee(V){A.call(this,V);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(V)}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 It(){return{type:"emphasis",children:[]}}function sn(){return{type:"heading",depth:0,children:[]}}function Gt(){return{type:"break"}}function an(){return{type:"html",value:""}}function tr(){return{type:"image",title:null,url:"",alt:null}}function _n(){return{type:"link",title:null,url:"",children:[]}}function Pn(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function F(V){return{type:"listItem",spread:V._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 Qi(e){return{line:e.line,column:e.column,offset:e.offset}}function XC(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?XC(e,r):gV(e,r)}}function gV(e,t){let n;for(n in t)if(GC.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 O0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ul({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ul({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ul({start:t.start,end:t.end})+") is still open")}function yV(e){const t=this;t.parser=n;function n(r){return pV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vV(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 xV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
313
+ `}]}function wV(e,t){const n=t.value?t.value+`
314
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function bV(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kV(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SV(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ma(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+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(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function CV(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 EV(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function JC(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),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function _V(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return JC(e,t);const o={src:ma(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function PV(e,t){const n={src:ma(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 TV(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 NV(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return JC(e,t);const o={href:ma(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jV(e,t){const n={href:ma(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 RV(e,t,n){const r=e.all(t),o=n?IV(n):eE(t),a={},l=[];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:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(o||u!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
315
+ `}),h.type==="element"&&h.tagName==="p"&&!o?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
316
+ `});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function IV(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=eE(n[r])}return t}function eE(e){const t=e.spread;return t??e.children.length>1}function AV(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 l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function OV(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DV(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zV(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MV(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=mg(t.children[1]),d=AC(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),o.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function LV(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const p=t.children[d],x={},g=l?l[d]:void 0;g&&(x.align=g);let S={type:"element",tagName:a,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 FV(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const D0=9,z0=32;function $V(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(M0(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(M0(t.slice(o),o>0,!1)),a.join("")}function M0(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===D0||a===z0;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===D0||a===z0;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function VV(e,t){const n={type:"text",value:$V(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function BV(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const UV={blockquote:vV,break:xV,code:wV,delete:bV,emphasis:kV,footnoteReference:SV,heading:CV,html:EV,imageReference:_V,image:PV,inlineCode:TV,linkReference:NV,link:jV,listItem:RV,list:AV,paragraph:OV,root:DV,strong:zV,table:MV,tableCell:FV,tableRow:LV,text:VV,thematicBreak:BV,toml:fc,yaml:fc,definition:fc,footnoteDefinition:fc};function fc(){}const tE=-1,Ld=0,dl=1,Gc=2,kg=3,Sg=4,Cg=5,Eg=6,nE=7,rE=8,L0=typeof self=="object"?self:globalThis,HV=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,l]=t[o];switch(a){case Ld:case tE:return n(l,o);case dl:{const u=n([],o);for(const d of l)u.push(r(d));return u}case Gc:{const u=n({},o);for(const[d,f]of l)u[r(d)]=r(f);return u}case kg:return n(new Date(l),o);case Sg:{const{source:u,flags:d}=l;return n(new RegExp(u,d),o)}case Cg:{const u=n(new Map,o);for(const[d,f]of l)u.set(r(d),r(f));return u}case Eg:{const u=n(new Set,o);for(const d of l)u.add(r(d));return u}case nE:{const{name:u,message:d}=l;return n(new L0[u](d),o)}case rE:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new L0[a](l),o)};return r},F0=e=>HV(new Map,e)(0),Rs="",{toString:WV}={},{keys:ZV}=Object,rl=e=>{const t=typeof e;if(t!=="object"||!e)return[Ld,t];const n=WV.call(e).slice(8,-1);switch(n){case"Array":return[dl,Rs];case"Object":return[Gc,Rs];case"Date":return[kg,Rs];case"RegExp":return[Sg,Rs];case"Map":return[Cg,Rs];case"Set":return[Eg,Rs];case"DataView":return[dl,n]}return n.includes("Array")?[dl,n]:n.includes("Error")?[nE,n]:[Gc,n]},hc=([e,t])=>e===Ld&&(t==="function"||t==="symbol"),qV=(e,t,n,r)=>{const o=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},a=l=>{if(n.has(l))return n.get(l);let[u,d]=rl(l);switch(u){case Ld:{let h=l;switch(d){case"bigint":u=rE,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return o([tE],l)}return o([u,h],l)}case dl:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),o([d,[...x]],l)}const h=[],p=o([u,h],l);for(const x of l)h.push(a(x));return p}case Gc:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],p=o([u,h],l);for(const x of ZV(l))(e||!hc(rl(l[x])))&&h.push([a(x),a(l[x])]);return p}case kg:return o([u,l.toISOString()],l);case Sg:{const{source:h,flags:p}=l;return o([u,{source:h,flags:p}],l)}case Cg:{const h=[],p=o([u,h],l);for(const[x,g]of l)(e||!(hc(rl(x))||hc(rl(g))))&&h.push([a(x),a(g)]);return p}case Eg:{const h=[],p=o([u,h],l);for(const x of l)(e||!hc(rl(x)))&&h.push(a(x));return p}}const{message:f}=l;return o([u,{name:d,message:f}],l)};return a},$0=(e,{json:t,lossy:n}={})=>{const r=[];return qV(!(t||n),!!t,new Map,r)(e),r},Xc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?F0($0(e,t)):structuredClone(e):(e,t)=>F0($0(e,t));function QV(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 YV(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function KV(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||QV,r=e.options.footnoteBackLabel||YV,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=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=ma(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:a,properties:{...Xc(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
317
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
318
+ `}]}}const Fd=(function(e){if(e==null)return eB;if(typeof e=="function")return $d(e);if(typeof e=="object")return Array.isArray(e)?GV(e):XV(e);if(typeof e=="string")return JV(e);throw new Error("Expected function, string, or object as test")});function GV(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fd(e[n]);return $d(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function XV(e){const t=e;return $d(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function JV(e){return $d(t);function t(n){return n&&n.type===e}}function $d(e){return t;function t(n,r,o){return!!(tB(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function eB(){return!0}function tB(e){return e!==null&&typeof e=="object"&&"type"in e}const iE=[],nB=!0,Jp=!1,rB="skip";function oE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Fd(o),l=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=iE,S,k,C;if((!t||a(d,f,h[h.length-1]||void 0))&&(g=iB(n(d,h)),g[0]===Jp))return g;if("children"in d&&d.children){const E=d;if(E.children&&g[0]!==rB)for(k=(r?E.children.length:-1)+l,C=h.concat(E);k>-1&&k<E.children.length;){const _=E.children[k];if(S=u(_,k,C)(),S[0]===Jp)return S;k=typeof S[1]=="number"?S[1]:k+l}}return g}}}function iB(e){return Array.isArray(e)?e:typeof e=="number"?[nB,e]:e==null?iE:[e]}function _g(e,t,n,r){let o,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,o=n):(a=t,l=n,o=r),oE(e,a,u,o);function u(d,f){const h=f[f.length-1],p=h?h.children.indexOf(d):void 0;return l(d,p,h)}}const em={}.hasOwnProperty,oB={};function sB(e,t){const n=t||oB,r=new Map,o=new Map,a=new Map,l={...UV,...n.handlers},u={all:f,applyData:lB,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:aB,wrap:cB};return _g(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(em.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=Xc(C);return E.children=u.all(h),E}return Xc(h)}return(u.options.unknownHandler||uB)(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=V0(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=V0(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function aB(e,t){e.position&&(t.position=Y3(e))}function lB(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Xc(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function uB(e,t){const n=t.data||{},r="value"in t&&!(em.call(n,"hProperties")||em.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 cB(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
319
+ `});++r<e.length;)r&&n.push({type:"text",value:`
320
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
321
+ `}),n}function V0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function B0(e,t){const n=sB(e,t),r=n.one(e,void 0),o=KV(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
322
+ `},o),a}function dB(e,t){return e&&"run"in e?async function(n,r){const o=B0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return B0(n,{file:r,...e||t})}}function U0(e){if(e)throw e}var Gh,H0;function fB(){if(H0)return Gh;H0=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]"},a=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)},l=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 Gh=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&&(a(x)||(g=o(x)))?(g?(g=!1,S=p&&o(p)?p:[]):S=p&&a(p)?p:{},l(k,{name:h,newValue:d(_,S,x)})):typeof x<"u"&&l(k,{name:h,newValue:x}));return k},Gh}var hB=fB();const Xh=Xo(hB);function tm(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 pB(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(d,...f){const h=e[++a];let p=-1;if(d){l(d);return}for(;++p<o.length;)(f[p]===null||f[p]===void 0)&&(f[p]=o[p]);o=f,h?mB(h,u)(...f):l(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 mB(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(o);try{d=e.apply(this,l)}catch(f){const h=f;if(u&&n)throw h;return o(h)}u||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(l,...u){n||(n=!0,t(l,...u))}function a(l){o(null,l)}}const Wr={basename:gB,dirname:yB,extname:vB,join:xB,sep:"/"};function gB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vl(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function yB(e){if(Vl(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 vB(e){Vl(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function xB(...e){let t=-1,n;for(;++t<e.length;)Vl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":wB(n)}function wB(e){Vl(e);const t=e.codePointAt(0)===47;let n=bB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bB(e,t){let n="",r=0,o=-1,a=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(o===l-1||a===1))if(o!==l-1&&a===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=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function Vl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kB={cwd:SB};function SB(){return"/"}function nm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function CB(e){if(typeof e=="string")e=new URL(e);else if(!nm(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 EB(e)}function EB(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 Jh=["history","path","basename","stem","extname","dirname"];class sE{constructor(t){let n;t?nm(t)?n={path:t}:typeof t=="string"||_B(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":kB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jh.length;){const a=Jh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Jh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wr.basename(this.path):void 0}set basename(t){tp(t,"basename"),ep(t,"basename"),this.path=Wr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wr.dirname(this.path):void 0}set dirname(t){W0(this.basename,"dirname"),this.path=Wr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wr.extname(this.path):void 0}set extname(t){if(ep(t,"extname"),W0(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=Wr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nm(t)&&(t=CB(t)),tp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wr.basename(this.path,this.extname):void 0}set stem(t){tp(t,"stem"),ep(t,"stem"),this.path=Wr.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 ep(e,t){if(e&&e.includes(Wr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wr.sep+"`")}function tp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function W0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _B(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PB=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),TB={}.hasOwnProperty;class Pg extends PB{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=pB()}copy(){const t=new Pg;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ip("data",this.frozen),this.namespace[t]=n,this):TB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ip("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=pc(t),r=this.parser||this.Parser;return np("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),np("process",this.parser||this.Parser),rp("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const u=pc(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);RB(S)?x.value=S:x.result=S,f(h,x)});function f(h,p){h||!p?l(h):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),np("processSync",this.parser||this.Parser),rp("processSync",this.compiler||this.Compiler),this.process(t,o),q0("processSync","process",n),r;function o(a,l){n=!0,U0(a),r=l}}run(t,n,r){Z0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const d=pc(n);o.run(t,d,f);function f(h,p,x){const g=p||t;h?u(h):l?l(g):r(void 0,g,x)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),q0("runSync","run",r),o;function a(l,u){U0(l),o=u,r=!0}}stringify(t,n){this.freeze();const r=pc(n),o=this.compiler||this.Compiler;return rp("stringify",o),Z0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ip("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;d(h,p)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(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=Xh(!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];a(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];tm(k)&&tm(g)&&(g=Xh(!0,k,g)),r[x]=[f,g,...S]}}}}const NB=new Pg().freeze();function np(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ip(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 Z0(e){if(!tm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function q0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pc(e){return jB(e)?e:new sE(e)}function jB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RB(e){return typeof e=="string"||IB(e)}function IB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Q0=[],Y0={allowDangerousHtml:!0},OB=/^(https?|ircs?|mailto|xmpp)$/i,DB=[{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 zB(e){const t=MB(e),n=LB(e);return FB(t.runSync(t.parse(n),n),e)}function MB(e){const t=e.rehypePlugins||Q0,n=e.remarkPlugins||Q0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Y0}:Y0;return NB().use(yV).use(n).use(dB,r).use(t)}function LB(e){const t=e.children||"",n=new sE;return typeof t=="string"&&(n.value=t),n}function FB(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||$B;for(const h of DB)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+AB+h.id,void 0);return _g(e,f),e5(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 l?x.children.splice(p,1):x.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let g;for(g in Qh)if(Object.hasOwn(Qh,g)&&Object.hasOwn(h.properties,g)){const S=h.properties[g],k=Qh[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):a?a.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 $B(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||OB.test(e.slice(0,t))?e:""}function K0(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 VB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function BB(e,t,n){const o=Fd((n||{}).ignore||[]),a=UB(t);let l=-1;for(;++l<a.length;)oE(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=a[l][0],g=a[l][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 j=g(...T,O);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=I+1:(S!==I&&_.push({type:"text",value:f.value.slice(S,I)}),Array.isArray(j)?_.push(...j):j&&_.push(j),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 UB(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([HB(o[0]),WB(o[1])])}return t}function HB(e){return typeof e=="string"?new RegExp(VB(e),"g"):e}function WB(e){return typeof e=="function"?e:function(){return e}}const op="phrasing",sp=["autolink","link","image","label"];function ZB(){return{transforms:[JB],enter:{literalAutolink:QB,literalAutolinkEmail:ap,literalAutolinkHttp:ap,literalAutolinkWww:ap},exit:{literalAutolink:XB,literalAutolinkEmail:GB,literalAutolinkHttp:YB,literalAutolinkWww:KB}}}function qB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:op,notInConstruct:sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:op,notInConstruct:sp},{character:":",before:"[ps]",after:"\\/",inConstruct:op,notInConstruct:sp}]}}function QB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ap(e){this.config.enter.autolinkProtocol.call(this,e)}function YB(e){this.config.exit.autolinkProtocol.call(this,e)}function KB(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 GB(e){this.config.exit.autolinkEmail.call(this,e)}function XB(e){this.exit(e)}function JB(e){BB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,e9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),t9]],{ignore:["link","linkReference"]})}function e9(e,t,n,r,o){let a="";if(!aE(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!n9(n)))return!1;const l=r9(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function t9(e,t,n,r){return!aE(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function n9(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 r9(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=K0(e,"(");let a=K0(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function aE(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Go(n)||zd(n))&&(!t||n!==47)}lE.peek=f9;function i9(){this.buffer()}function o9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function s9(){this.buffer()}function a9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function l9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function u9(e){this.exit(e)}function c9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function d9(e){this.exit(e)}function f9(){return"["}function lE(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=o.move("]"),a}function h9(){return{enter:{gfmFootnoteCallString:i9,gfmFootnoteCall:o9,gfmFootnoteDefinitionLabelString:s9,gfmFootnoteDefinition:a9},exit:{gfmFootnoteCallString:l9,gfmFootnoteCall:u9,gfmFootnoteDefinitionLabelString:c9,gfmFootnoteDefinition:d9}}}function p9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const u=a.createTracker(l);let d=u.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=u.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
323
+ `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?uE:m9))),f(),d}}function m9(e,t,n){return t===0?e:uE(e,t,n)}function uE(e,t,n){return(n?"":" ")+e}const g9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];cE.peek=b9;function y9(){return{canContainEols:["delete"],enter:{strikethrough:x9},exit:{strikethrough:w9}}}function v9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:g9}],handlers:{delete:cE}}}function x9(e){this.enter({type:"delete",children:[]},e)}function w9(e){this.exit(e)}function cE(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),a(),l}function b9(){return"~"}function k9(e){return e.length}function S9(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||k9,a=[],l=[],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 _=C9(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(_)}l[h]=k,u[h]=C}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=G0(r[p]);else{const k=G0(r);for(;++p<f;)a[p]=k}p=-1;const x=[],g=[];for(;++p<f;){const k=a[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}l.splice(1,0,x),u.splice(1,0,g),h=-1;const S=[];for(;++h<l.length;){const k=l[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),j=a[p];j===114?T=" ".repeat(O):j===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(`
324
+ `)}function C9(e){return e==null?"":String(e)}function G0(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 E9(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),_9);return o(),l}function _9(e,t,n){return">"+(n?"":" ")+e}function P9(e,t){return X0(e,t.inConstruct,!0)&&!X0(e,t.notInConstruct,!1)}function X0(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 J0(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
325
+ `&&P9(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
326
+ `}function T9(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>l&&(l=a):a=1,o=r+t.length,r=n.indexOf(t,o);return l}function N9(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 j9(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 R9(e,t,n,r){const o=j9(n),a=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(N9(e,n)){const p=n.enter("codeIndented"),x=n.indentLines(a,I9);return p(),x}const u=n.createTracker(r),d=o.repeat(Math.max(T9(a,o)+1,3)),f=n.enter("codeFenced");let h=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
327
+ `,encode:["`"],...u.current()})),p()}return h+=u.move(`
328
+ `),a&&(h+=u.move(a+`
329
+ `)),h+=u.move(d),f(),h}function I9(e,t,n){return(n?"":" ")+e}function Tg(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 A9(e,t,n,r){const o=Tg(n),a=o==='"'?"Quote":"Apostrophe",l=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?" ":`
330
+ `,...d.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),l(),f}function O9(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 Sl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jc(e,t,n){const r=na(e),o=na(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}}dE.peek=D9;function dE(e,t,n,r){const o=O9(n),a=n.enter("emphasis"),l=n.createTracker(r),u=l.move(o);let d=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()}));const f=d.charCodeAt(0),h=Jc(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=Sl(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Jc(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+Sl(p));const g=l.move(o);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function D9(e,t,n){return n.options.emphasis||"*"}function z9(e,t){let n=!1;return _g(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Jp}),!!((!e.depth||e.depth<3)&&xg(e)&&(t.options.setext||n))}function M9(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(z9(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),x=n.containerPhrasing(e,{...a.current(),before:`
331
+ `,after:`
332
+ `});return p(),h(),x+`
333
+ `+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
334
+ `))+1))}const l="#".repeat(o),u=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
335
+ `,...a.current()});return/^[\t ]/.test(f)&&(f=Sl(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),u(),f}fE.peek=L9;function fE(e){return e.value||""}function L9(){return"<"}hE.peek=F9;function hE(e,t,n,r){const o=Tg(n),a=o==='"'?"Quote":"Apostrophe",l=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${a}`),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(")"),l(),f}function F9(){return"!"}pE.peek=$9;function pE(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let l=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+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=h,a(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function $9(){return"!"}mE.peek=V9;function mE(e,t,n){let r=e.value||"",o="`",a=-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+" ");++a<n.unsafe.length;){const l=n.unsafe[a],u=n.compilePattern(l);let d;if(l.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 V9(){return"`"}function gE(e,t){const n=xg(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))}yE.peek=B9;function yE(e,t,n,r){const o=Tg(n),a=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(gE(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=h,p}u=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+o),f+=l.move(n.safe(e.title,{before:f,after:o,...l.current()})),f+=l.move(o),d()),f+=l.move(")"),u(),f}function B9(e,t,n){return gE(e,n)?"<":"["}vE.peek=U9;function vE(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let l=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+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=h,a(),o==="full"||!f||f!==p?d+=u.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function U9(){return"["}function Ng(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 H9(e){const t=Ng(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 W9(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 xE(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 Z9(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?W9(n):Ng(n);const u=e.ordered?l==="."?")":".":H9(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&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),xE(n)===l&&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&&(l=u),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,o(),f}function q9(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 Q9(e,t,n,r){const o=q9(n);let a=n.bulletCurrent||Ng(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(l-a.length)),u.shift(l);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(l))+p:(g?a:a+" ".repeat(l-a.length))+p}}function Y9(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),o(),l}const K9=Fd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function G9(e,t,n,r){return(e.children.some(function(l){return K9(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function X9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wE.peek=J9;function wE(e,t,n,r){const o=X9(n),a=n.enter("strong"),l=n.createTracker(r),u=l.move(o+o);let d=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()}));const f=d.charCodeAt(0),h=Jc(r.before.charCodeAt(r.before.length-1),f,o);h.inside&&(d=Sl(f)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Jc(r.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+Sl(p));const g=l.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:h.outside},u+d+g}function J9(e,t,n){return n.options.strong||"*"}function eU(e,t,n,r){return n.safe(e.value,r)}function tU(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 nU(e,t,n){const r=(xE(n)+(n.options.ruleSpaces?" ":"")).repeat(tU(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bE={blockquote:E9,break:J0,code:R9,definition:A9,emphasis:dE,hardBreak:J0,heading:M9,html:fE,image:hE,imageReference:pE,inlineCode:mE,link:yE,linkReference:vE,list:Z9,listItem:Q9,paragraph:Y9,root:G9,strong:wE,text:eU,thematicBreak:nU};function rU(){return{enter:{table:iU,tableData:eb,tableHeader:eb,tableRow:sU},exit:{codeText:aU,table:oU,tableData:lp,tableHeader:lp,tableRow:lp}}}function iU(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 oU(e){this.exit(e),this.data.inTable=void 0}function sU(e){this.enter({type:"tableRow",children:[]},e)}function lp(e){this.exit(e)}function eb(e){this.enter({type:"tableCell",children:[]},e)}function aU(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lU));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lU(e,t){return t==="|"?t:e}function uU(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
336
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:d,tableRow:u}};function l(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(`
337
+ `))}function d(g,S,k,C){const E=k.enter("tableCell"),_=k.enter("phrasing"),T=k.containerPhrasing(g,{...C,before:a,after:a});return _(),E(),T}function f(g,S){return S9(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=bE.inlineCode(g,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function cU(){return{exit:{taskListCheckValueChecked:tb,taskListCheckValueUnchecked:tb,paragraph:fU}}}function dU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hU}}}function tb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function fU(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 a=-1,l;for(;++a<o.length;){const u=o[a];if(u.type==="paragraph"){l=u;break}}l===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 hU(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(l);let d=bE.listItem(e,t,n,{...r,...u.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function pU(){return[ZB(),h9(),y9(),rU(),cU()]}function mU(e){return{extensions:[qB(),p9(e),v9(),uU(e),dU()]}}const gU={tokenize:kU,partial:!0},kE={tokenize:SU,partial:!0},SE={tokenize:CU,partial:!0},CE={tokenize:EU,partial:!0},yU={tokenize:_U,partial:!0},EE={name:"wwwAutolink",tokenize:wU,previous:PE},_E={name:"protocolAutolink",tokenize:bU,previous:TE},_i={name:"emailAutolink",tokenize:xU,previous:NE},ri={};function vU(){return{text:ri}}let jo=48;for(;jo<123;)ri[jo]=_i,jo++,jo===58?jo=65:jo===91&&(jo=97);ri[43]=_i;ri[45]=_i;ri[46]=_i;ri[95]=_i;ri[72]=[_i,_E];ri[104]=[_i,_E];ri[87]=[_i,EE];ri[119]=[_i,EE];function xU(e,t,n){const r=this;let o,a;return l;function l(p){return!rm(p)||!NE.call(r,r.previous)||jg(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return rm(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(yU,h,f)(p):p===45||p===95||fn(p)?(a=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),o=!0,d}function h(p){return a&&o&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function wU(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!PE.call(r,r.previous)||jg(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gU,e.attempt(kE,e.attempt(SE,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function bU(e,t,n){const r=this;let o="",a=!1;return l;function l(p){return(p===72||p===104)&&TE.call(r,r.previous)&&!jg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(En(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),a?f:(a=!0,d)):n(p)}function f(p){return p===null||Kc(p)||ht(p)||Go(p)||zd(p)?n(p):e.attempt(kE,e.attempt(SE,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function kU(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function SU(e,t,n){let r,o,a;return l;function l(f){return f===46||f===95?e.check(CE,d,u)(f):f===null||ht(f)||Go(f)||f!==45&&zd(f)?d(f):(a=!0,e.consume(f),l)}function u(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),l}function d(f){return o||r||!a?n(f):t(f)}}function CU(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(CE,t,a)(l):l===null||ht(l)||Go(l)?t(l):(e.consume(l),o)}function a(l){return l===41&&r++,e.consume(l),o}}function EU(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),a):u===93?(e.consume(u),o):u===60||u===null||ht(u)||Go(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||ht(u)||Go(u)?t(u):r(u)}function a(u){return En(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):En(u)?(e.consume(u),l):n(u)}}function _U(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return fn(a)?n(a):t(a)}}function PE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function TE(e){return!En(e)}function NE(e){return!(e===47||rm(e))}function rm(e){return e===43||e===45||e===46||e===95||fn(e)}function jg(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 PU={tokenize:DU,partial:!0};function TU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IU,continuation:{tokenize:AU},exit:OU}},text:{91:{name:"gfmFootnoteCall",tokenize:RU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:NU,resolveTo:jU}}}}function NU(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=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(!l||!l._balanced)return n(d);const f=Ar(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function jU(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 a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function RU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;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(a>999||p===93&&!l||p===null||p===91||ht(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(Ar(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ht(p)||(l=!0),a++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function IU(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=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(l>999||S===93&&!u||S===null||S===91||ht(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Ar(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return ht(S)||(u=!0),l++,e.consume(S),S===92?p:h}function p(S){return S===91||S===92||S===93?(e.consume(S),l++,h):h(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(a)||o.push(a),Xe(e,g,"gfmFootnoteDefinitionWhitespace")):n(S)}function g(S){return t(S)}}function AU(e,t,n){return e.check($l,t,e.attempt(PU,t,n))}function OU(e){e.exit("gfmFootnoteDefinition")}function DU(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function zU(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},x=[["enter",h,u],["enter",l[f][1],u],["exit",l[f][1],u],["enter",p,u]],g=u.parser.constructs.insideSpan.null;g&&er(x,x.length,0,Md(g,l.slice(f+1,d),u)),er(x,x.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",h,u]]),er(l,f-1,d-f+3,x),d=f+x.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,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):(l.enter("strikethroughSequenceTemporary"),g(S))}function g(S){const k=na(f);if(S===126)return p>1?d(S):(l.consume(S),p++,g);if(p<2&&!n)return d(S);const C=l.exit("strikethroughSequenceTemporary"),E=na(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,u(S)}}}class MU{constructor(){this.map=[]}add(t,n,r){LU(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[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 a of o)t.push(a);o=r.pop()}this.map.length=0}}function LU(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 FU(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 a=r.length-1;r[a]=r[a]==="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 $U(){return{flow:{null:{name:"table",tokenize:VU,resolveAll:BU}}}}function VU(e,t,n){const r=this;let o=0,a=0,l;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"?j:d;return ne===j&&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||(l=!0,a+=1),h(A)}function h(A){return A===null?n(A):$e(A)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g):n(A):Ke(A)?Xe(e,h,"whitespace")(A):(a+=1,l&&(l=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),p(A)))}function p(A){return A===null||A===124||ht(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"),l=!1,Ke(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?(l=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),k):O(A)}function k(A){return Ke(A)?Xe(e,C,"whitespace")(A):C(A)}function C(A){return A===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),E):A===45?(a+=1,E(A)):A===null||$e(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?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(A))}function T(A){return Ke(A)?Xe(e,I,"whitespace")(A):I(A)}function I(A){return A===124?S(A):A===null||$e(A)?!l||o!==a?O(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):O(A)}function O(A){return n(A)}function j(A){return e.enter("tableRow"),B(A)}function B(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),B):A===null||$e(A)?(e.exit("tableRow"),t(A)):Ke(A)?Xe(e,B,"whitespace")(A):(e.enter("data"),Q(A))}function Q(A){return A===null||A===124||ht(A)?(e.exit("data"),B(A)):(e.consume(A),A===92?oe:Q)}function oe(A){return A===92||A===124?(e.consume(A),Q):Q(A)}}function BU(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,f,h,p;const x=new MU;for(;++n<e.length;){const g=e[n],S=g[1];g[0]==="enter"?S.type==="tableHead"?(u=!1,d!==0&&(nb(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,a=[0,0,0,0],l=[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,l[2]===0&&(a[1]!==0&&(l[0]=l[1],p=mc(x,t,a,o,void 0,p),a=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],p=mc(x,t,a,o,void 0,p)),a=l,l=[a[1],n,0,0])):S.type==="tableHead"?(u=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],p=mc(x,t,a,o,n,p)):l[1]!==0&&(p=mc(x,t,l,o,n,p)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&nb(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=FU(t.events,n))}return e}function mc(e,t,n,r,o,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},As(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=As(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=As(t.events,n[2]),h=As(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&&(a.end=Object.assign({},As(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function nb(e,t,n,r,o){const a=[],l=As(t.events,n);o&&(o.end=Object.assign({},l),a.push(["exit",o,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function As(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const UU={name:"tasklistCheck",tokenize:WU};function HU(){return{text:{91:UU}}}function WU(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"),a)}function a(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return $e(d)?t(d):Ke(d)?e.check({tokenize:ZU},t,n)(d):n(d)}}function ZU(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function qU(e){return $C([vU(),TU(),zU(e),$U(),HU()])}const QU={};function YU(e){const t=this,n=e||QU,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(qU(n)),a.push(pU()),l.push(mU(n))}function KU({content:e,className:t}){return y.jsx("div",{className:Be("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(zB,{remarkPlugins:[YU],children:e})})}function jE({open:e,onClose:t,breadcrumbItems:n,title:r,description:o,onEdit:a,children:l}){return y.jsx(dg,{open:e,onOpenChange:u=>!u&&t(),children:y.jsxs(fg,{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(EC,{items:n})}),y.jsx($m,{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(it,{variant:"ghost",size:"sm",onClick:a,children:[y.jsx(vm,{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(KU,{content:o}):y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"})]}),l]})})]})})}function RE({open:e,onClose:t,breadcrumbItems:n,formId:r,isSubmitting:o,isDeleting:a,entityName:l,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:h,children:p}){return y.jsx(dg,{open:e,onOpenChange:x=>!x&&t(),children:y.jsxs(fg,{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(EC,{items:n})}),y.jsx($m,{className:"max-h-[calc(90vh-140px)]",children:p}),y.jsxs("div",{className:"p-4 border-t flex items-center justify-between",children:[y.jsx(c3,{isConfirming:a,entityName:l,onDelete:d,onConfirm:f,onCancel:h}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(it,{type:"button",variant:"outline",size:"sm",onClick:u,children:"Cancel"}),y.jsx(it,{type:"submit",form:r,size:"sm",disabled:o,children:o?"Saving...":"Save"})]})]})]})})}function GU({task:e,onStatusChange:t,onPriorityChange:n,onEpicClick:r,getEpicById:o}){const a=e.epicId?o(e.epicId):null,l=e.tags?e.tags.split(",").map(d=>d.trim()):[],u=()=>{a&&r&&r(a)};return y.jsxs("div",{children:[y.jsx(wl,{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(Od,{value:e.status,onChange:t,statuses:Ed,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(Dd,{value:e.priority,onChange:n,triggerClassName:"w-auto h-8 text-right"})]}),a&&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:[a.id,y.jsx(id,{className:"h-3 w-3"})]})]}),l.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:l.map(d=>y.jsx(ao,{variant:"secondary",className:"text-xs",children:d},d))})]})]})]})}function rb({taskId:e,variant:t,onClick:n}){const r=t==="depends"?Xb:Jb;return y.jsxs("button",{className:Be("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 XU({dependsOn:e,blocks:t,onTaskClick:n,getTaskById:r}){if(!(e.length>0||t.length>0))return null;const a=l=>{const u=r(l);u&&n&&n(u)};return y.jsxs("div",{children:[y.jsx(wl,{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(l=>y.jsx(rb,{taskId:l,variant:"depends",onClick:()=>a(l)},l))})]}),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(l=>y.jsx(rb,{taskId:l,variant:"blocks",onClick:()=>a(l)},l))})]})]})]})}const JU=["completed","archived","wont_fix"];function im(e){return JU.includes(e)}function e8({subtask:e,onClick:t}){const n=im(e.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:t,children:[y.jsx(bC,{status:e.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left truncate",n&&"line-through text-muted-foreground"),children:e.title})]})}function t8({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(wl,{count:{current:n,total:e.length},children:"Subtasks"}),y.jsx("div",{className:"space-y-1",children:e.map(r=>y.jsx(e8,{subtask:r,onClick:()=>t==null?void 0:t(r)},r.id))})]})}function n8({taskId:e}){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[a,l]=b.useState(""),[u,d]=b.useState(""),[f,h]=b.useState(!1);b.useEffect(()=>{const S=localStorage.getItem("trekker-comment-author");S&&l(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(!a.trim()||!u.trim()){Ct.error("Author and content are required");return}h(!0);try{localStorage.setItem("trekker-comment-author",a);const S=await fetch(`/api/tasks/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:a,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:cg(S.createdAt)})]}),y.jsx(it,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>g(S.id),children:y.jsx(xm,{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(Jr,{placeholder:"Your name",value:a,onChange:S=>l(S.target.value)}),y.jsx(Ll,{placeholder:"Add a comment...",value:u,onChange:S=>d(S.target.value),rows:2}),y.jsx(it,{size:"sm",onClick:x,disabled:f||!a.trim()||!u.trim(),children:f?"Adding...":"Add Comment"})]})]})]})}async function r8(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 a=await n.json();throw new Error(a.error||"Failed to fetch history")}return n.json()}function IE(e){return Al({queryKey:["history",e],queryFn:()=>r8(e)})}function i8({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(SC,{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:Be("text-xs font-medium capitalize",CC(e.action)),children:[e.action,"d"]}),y.jsx("span",{className:"text-xs text-muted-foreground",children:cg(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 o8({taskId:e}){const{data:t,isLoading:n,error:r}=IE({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(i8,{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 s8({task:e,subtasks:t,onStatusChange:n,onPriorityChange:r,onTaskClick:o,onEpicClick:a,getEpicById:l,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(GU,{task:e,onStatusChange:n,onPriorityChange:r,onEpicClick:a,getEpicById:l}),y.jsx(XU,{dependsOn:e.dependsOn,blocks:e.blocks,onTaskClick:o,getTaskById:u}),y.jsx(t8,{subtasks:t,onTaskClick:o}),y.jsx(wC,{createdAt:e.createdAt,updatedAt:e.updatedAt})]}),y.jsxs("div",{className:"border-t",children:[y.jsxs("div",{className:"flex border-b",children:[y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="comments"&&"bg-accent"),onClick:()=>f("comments"),children:[y.jsx(Mj,{className:"h-4 w-4 mr-1.5"}),"Comments"]}),y.jsxs(it,{variant:"ghost",size:"sm",className:Be("flex-1 rounded-none",d==="history"&&"bg-accent"),onClick:()=>f("history"),children:[y.jsx(ik,{className:"h-4 w-4 mr-1.5"}),"History"]})]}),d==="comments"?y.jsx(n8,{taskId:e.id}):y.jsx(o8,{taskId:e.id})]})]})}function a8({task:e,subtasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g}){return y.jsx(jE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(s8,{task:{...e,status:r,priority:o},subtasks:t,onStatusChange:d,onPriorityChange:f,onTaskClick:h,onEpicClick:p,getEpicById:x,getTaskById:g})})}function l8({form:e,epics:t,breadcrumbItems:n,open:r,isDeleting:o,onClose:a,onSubmit:l,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"),j=async B=>{await l(B)&&u()};return y.jsx(RE,{open:r,onClose:a,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(j),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Title"}),y.jsx(Jr,{value:C,onChange:B=>x("title",B.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(Ll,{value:E,onChange:B=>x("description",B.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(Od,{value:_,onChange:B=>x("status",B),statuses:Ed})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Dd,{value:T,onChange:B=>x("priority",B)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Tags (comma-separated)"}),y.jsx(Jr,{value:I,onChange:B=>x("tags",B.target.value),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Epic"}),y.jsxs(dr,{value:O||"none",onValueChange:B=>x("epicId",B==="none"?null:B),children:[y.jsx(hr,{children:y.jsx(fr,{})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"none",children:"No Epic"}),t.map(B=>y.jsxs(nn,{value:B.id,children:[B.id,": ",B.title]},B.id))]})]})]})]})})}const u8=sg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:og().min(0).max(5),tags:Cn(),epicId:Cn().nullable()});function c8({task:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const a=nd(),[l,u]=b.useState(!1),d=Km({resolver:ig(u8),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:l,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(),a.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(),a.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(),a.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(),a.invalidateQueries({queryKey:["history"]})}catch(_){Ct.error(_ instanceof Error?_.message:"Failed to update priority")}}}}function Rg({task:e,epics:t,allTasks:n,open:r,onClose:o,onUpdate:a,onTaskClick:l,onEpicClick:u}){const[d,f]=b.useState(!1),{form:h,isDeleting:p,setIsDeleting:x,handleSave:g,handleDelete:S,handleCancel:k,handleStatusChange:C,handlePriorityChange:E}=c8({task:e,open:r,isEditing:d,onClose:o,onUpdate:a}),_=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 j=!!e.parentTaskId,B=n.filter(ne=>ne.parentTaskId===e.id),oe=(()=>{const ne=[],W=e.epicId?_(e.epicId):null,U=I(e.parentTaskId);return W&&ne.push({id:W.id,title:W.title,type:"epic",onClick:u?()=>u(W):void 0}),U&&ne.push({id:U.id,title:U.title,type:"task",onClick:l?()=>l(U):void 0}),ne.push({id:e.id,title:e.title,type:j?"subtask":"task"}),ne})(),A=h.watch("status"),K=h.watch("priority"),M=()=>{k(),f(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(a8,{task:e,subtasks:B,breadcrumbItems:oe,status:A,priority:K,open:r&&!d,onClose:O,onEdit:()=>f(!0),onStatusChange:C,onPriorityChange:E,onTaskClick:l,onEpicClick:u,getEpicById:_,getTaskById:T}),y.jsx(l8,{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 d8({status:e,priority:t,tasks:n,createdAt:r,updatedAt:o,onStatusChange:a,onPriorityChange:l,onTaskClick:u}){const d=n.filter(h=>!h.parentTaskId),f=d.filter(h=>im(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(wl,{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(Od,{value:e,onChange:a,statuses:Gm,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(Dd,{value:t,onChange:l,triggerClassName:"w-auto h-8 text-right"})]})]})]}),d.length>0&&y.jsxs("div",{children:[y.jsx(wl,{count:{current:f,total:d.length},children:"Tasks"}),y.jsx("div",{className:"space-y-1",children:d.map(h=>{const p=im(h.status);return y.jsxs(it,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2",onClick:()=>u==null?void 0:u(h),children:[y.jsx(bC,{status:h.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:h.id}),y.jsx("span",{className:Be("text-sm flex-1 text-left truncate",p&&"line-through text-muted-foreground"),children:h.title})]},h.id)})})]}),y.jsx(wC,{createdAt:r,updatedAt:o})]})})}function f8({epic:e,tasks:t,breadcrumbItems:n,status:r,priority:o,open:a,onClose:l,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:h}){return y.jsx(jE,{open:a,onClose:l,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(d8,{status:r,priority:o,tasks:t,createdAt:e.createdAt,updatedAt:e.updatedAt,onStatusChange:d,onPriorityChange:f,onTaskClick:h})})}function h8({form:e,breadcrumbItems:t,open:n,isDeleting:r,onClose:o,onSubmit:a,onCancel:l,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 a(I)&&l()};return y.jsx(RE,{open:n,onClose:o,breadcrumbItems:t,formId:"epic-edit-form",isSubmitting:g,isDeleting:r,entityName:"Epic",onCancel:l,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(Jr,{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(Ll,{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(Od,{value:E,onChange:I=>p("status",I),statuses:Gm})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Wt,{children:"Priority"}),y.jsx(Dd,{value:_,onChange:I=>p("priority",I)})]})]})]})})}const p8=sg({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:og().min(0).max(5)});function m8({epic:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const[a,l]=b.useState(!1),u=Km({resolver:ig(p8),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(()=>{l(!1)},[t,n]),{form:u,isSubmitting:f,isDeleting:a,setIsDeleting:l,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}),l(!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 Ig({epic:e,tasks:t=[],open:n,onClose:r,onUpdate:o,onTaskClick:a}){const[l,u]=b.useState(!1),{form:d,isDeleting:f,setIsDeleting:h,handleSave:p,handleDelete:x,handleCancel:g,handleStatusChange:S,handlePriorityChange:k}=m8({epic:e,open:n,isEditing:l,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(f8,{epic:e,tasks:t,breadcrumbItems:E,status:_,priority:T,open:n&&!l,onClose:C,onEdit:()=>u(!0),onStatusChange:S,onPriorityChange:k,onTaskClick:a}),y.jsx(h8,{form:d,breadcrumbItems:E,open:n&&l,isDeleting:f,onClose:C,onSubmit:p,onCancel:I,onDelete:()=>h(!0),onDeleteConfirm:x,onDeleteCancel:()=>h(!1)})]})}function g8({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",cancelLabel:a="Cancel",onConfirm:l,variant:u="default"}){const d=()=>{l(),t(!1)};return y.jsx(dg,{open:e,onOpenChange:t,children:y.jsxs(fg,{className:"sm:max-w-[400px]",children:[y.jsxs(b3,{children:[y.jsx(S3,{children:n}),y.jsx(C3,{children:r})]}),y.jsxs(k3,{children:[y.jsx(it,{variant:"outline",onClick:()=>t(!1),children:a}),y.jsx(it,{variant:u==="destructive"?"destructive":"default",onClick:d,children:o})]})]})})}function y8(){const{tasks:e,epics:t,isLoading:n,error:r,refetch:o}=rd(),a=tj(),[l,u]=b.useState(!1),{selectedTaskId:d,selectedEpicId:f,openTaskDetail:h,openEpicDetail:p,openCreateModal:x,closeTaskDetail:g,closeEpicDetail:S}=Gs();H$(o);const k=d&&e.find(E=>E.id===d)||null,C=f&&t.find(E=>E.id===f)||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(u3,{tasks:e,epics:t,onAddClick:E=>x({status:E}),onTaskClick:E=>h(E.id),onEpicClick:E=>p(E.id),onArchiveAllCompleted:()=>u(!0)})}),y.jsx(g8,{open:l,onOpenChange:u,title:"Archive All Completed",description:"This will move all completed tasks and epics to the archived status. This action can be undone by manually changing their status back.",confirmLabel:"Archive All",onConfirm:()=>a.mutate()}),y.jsx(Rg,{task:k,epics:t,allTasks:e,open:k!==null,onClose:g,onUpdate:o,onTaskClick:E=>h(E.id),onEpicClick:E=>{g(),p(E.id)}}),y.jsx(Ig,{epic:C,tasks:C?e.filter(E=>E.epicId===C.id):[],open:C!==null,onClose:S,onUpdate:o,onTaskClick:E=>{S();const _=e.find(T=>T.id===E.id);_&&h(_.id)}})]})}async function v8(e){var r,o,a;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(",")),(a=e.priorities)!=null&&a.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 l=await n.json();throw new Error(l.error||"Failed to fetch list")}return n.json()}function x8(e){return Al({queryKey:["list",e],queryFn:()=>v8(e)})}const w8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"}],b8=[{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)"}],k8=[20,50,100];function S8(){var B,Q,oe,A,K;const{tasks:e,epics:t,refetch:n}=rd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Gs(),[f,h]=b.useState({limit:20,page:1,sort:"created:desc"}),[p,x]=b.useState(""),{data:g,isLoading:S,error:k}=x8(f),C=r&&e.find(M=>M.id===r)||null,E=o&&t.find(M=>M.id===o)||null,_=M=>{M.type==="epic"?l(M.id):a(M.id)},T=M=>{const ne=f.types||[],W=ne.includes(M)?ne.filter(U=>U!==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=!!((B=f.types)!=null&&B.length||(Q=f.statuses)!=null&&Q.length||(oe=f.priorities)!=null&&oe.length),j=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(Wj,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(Jr,{placeholder:"Search...",value:p,onChange:M=>x(M.target.value),className:"pl-9"})]}),y.jsx("div",{className:"flex gap-1",children:w8.map(({value:M,label:ne})=>{var W;return y.jsx(it,{variant:(W=f.types)!=null&&W.includes(M)?"default":"outline",size:"sm",onClick:()=>T(M),children:ne},M)})}),y.jsxs(dr,{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(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Status"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Statuses"}),Ed.map(M=>y.jsx(nn,{value:M,children:ta[M]},M))]})]}),y.jsxs(dr,{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(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Priority"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Priorities"}),Object.entries(_d).map(([M,ne])=>y.jsxs(nn,{value:M,children:["P",M," - ",ne]},M))]})]}),y.jsxs(dr,{value:f.sort||"created:desc",onValueChange:M=>h({...f,sort:M,page:1}),children:[y.jsx(hr,{className:"w-[180px]",children:y.jsx(fr,{})}),y.jsx(pr,{children:b8.map(({value:M,label:ne})=>y.jsx(nn,{value:M,children:ne},M))})]}),O&&y.jsxs(it,{variant:"ghost",size:"sm",onClick:I,children:[y.jsx(ad,{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,U,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(ao,{variant:"outline",className:Be(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(ao,{style:{backgroundColor:((ne=Iw[M.status])==null?void 0:ne.bg)||"#6b7280",color:((W=Iw[M.status])==null?void 0:W.text)||"#ffffff"},children:ta[M.status]||M.status})}),y.jsx("td",{className:"px-4 py-3",children:y.jsxs(ao,{variant:"outline",style:{borderColor:((U=Hc[M.priority])==null?void 0:U.bg)||"#6b7280",color:((q=Hc[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:v3(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(dr,{value:(f.limit||20).toString(),onValueChange:M=>h({...f,limit:parseInt(M,10),page:1}),children:[y.jsx(hr,{className:"w-[80px] h-8",children:y.jsx(fr,{})}),y.jsx(pr,{children:k8.map(M=>y.jsx(nn,{value:M.toString(),children:M},M))})]}),y.jsx("span",{children:"per page"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(nk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",j]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=j,children:["Next",y.jsx(id,{className:"h-4 w-4"})]})]})]})]}),y.jsx(Rg,{task:C,epics:t,allTasks:e,open:C!==null,onClose:u,onUpdate:n,onTaskClick:M=>a(M.id),onEpicClick:M=>{u(),l(M.id)}}),y.jsx(Ig,{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&&a(ne.id)}})]})}const C8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"},{value:"comment",label:"Comment"},{value:"dependency",label:"Dependency"}],E8=[{value:"create",label:"Created",icon:sd},{value:"update",label:"Updated",icon:vm},{value:"delete",label:"Deleted",icon:xm}];function _8({event:e,onEntityClick:t}){var o,a,l,u,d;const n=((o=e.snapshot)==null?void 0:o.title)||((l=(a=e.changes)==null?void 0:a.title)==null?void 0:l.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(SC,{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:Be("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:Be("text-sm font-medium",CC(e.action)),children:[e.action,"d"]}),y.jsx(ao,{variant:"outline",className:"text-xs",children:e.entityType})]}),n&&y.jsx("p",{className:Be("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:cg(e.timestamp)})]})}function P8(){var _,T,I,O;const{tasks:e,epics:t,refetch:n}=rd(),{selectedTaskId:r,selectedEpicId:o,openTaskDetail:a,openEpicDetail:l,closeTaskDetail:u,closeEpicDetail:d}=Gs(),[f,h]=b.useState({limit:50,page:1}),{data:p,isLoading:x,error:g}=IE(f),S=r&&e.find(j=>j.id===r)||null,k=o&&t.find(j=>j.id===o)||null,C=(j,B)=>{j==="epic"?l(B):(j==="task"||j==="subtask")&&a(B)},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(dr,{value:((_=f.types)==null?void 0:_.join(","))||"all",onValueChange:j=>{h(j==="all"?{...f,types:void 0,page:1}:{...f,types:j.split(","),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Type"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Types"}),C8.map(({value:j,label:B})=>y.jsx(nn,{value:j,children:B},j))]})]}),y.jsxs(dr,{value:((T=f.actions)==null?void 0:T.join(","))||"all",onValueChange:j=>{h(j==="all"?{...f,actions:void 0,page:1}:{...f,actions:j.split(","),page:1})},children:[y.jsx(hr,{className:"w-[140px]",children:y.jsx(fr,{placeholder:"Action"})}),y.jsxs(pr,{children:[y.jsx(nn,{value:"all",children:"All Actions"}),E8.map(({value:j,label:B})=>y.jsx(nn,{value:j,children:B},j))]})]}),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:j=>h({...f,since:j.target.value?`${j.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:j=>h({...f,until:j.target.value?`${j.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(j=>y.jsx(_8,{event:j,onEntityClick:C},j.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(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)-1}),disabled:(f.page||1)<=1,children:[y.jsx(nk,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",f.page||1," of ",E]}),y.jsxs(it,{variant:"outline",size:"sm",onClick:()=>h({...f,page:(f.page||1)+1}),disabled:(f.page||1)>=E,children:["Next",y.jsx(id,{className:"h-4 w-4"})]})]})]})]}),y.jsx(Rg,{task:S,epics:t,allTasks:e,open:S!==null,onClose:u,onUpdate:n,onTaskClick:j=>a(j.id),onEpicClick:j=>{u(),l(j.id)}}),y.jsx(Ig,{epic:k,tasks:k?e.filter(j=>j.epicId===k.id):[],open:k!==null,onClose:d,onUpdate:n,onTaskClick:j=>{d();const B=e.find(Q=>Q.id===j.id);B&&a(B.id)}})]})}function T8(){const{tasks:e,epics:t,project:n,refetch:r}=rd(),{connectionStatus:o,showCreateModal:a,createModalDefaults:l,openCreateModal:u,closeCreateModal:d}=Gs();return y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsx(PA,{projectName:n==null?void 0:n.name,onNewClick:()=>u({status:"todo"})}),y.jsxs(AT,{children:[y.jsx(gc,{path:"/",element:y.jsx(y8,{})}),y.jsx(gc,{path:"/list",element:y.jsx(S8,{})}),y.jsx(gc,{path:"/history",element:y.jsx(P8,{})})]}),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(NA,{status:o})]})}),y.jsx(U$,{open:a,onClose:d,onCreated:r,epics:t,tasks:e,defaultStatus:l.status||"todo"})]})}function N8({children:e}){const[t]=b.useState(()=>new DN({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}}));return y.jsx(zN,{client:t,children:y.jsxs(XR,{defaultTheme:"system",disableTransitionOnChange:!0,children:[y.jsx(vA,{delayDuration:300,children:e}),y.jsx(k4,{position:"bottom-right",richColors:!0})]})})}DP.createRoot(document.getElementById("root")).render(y.jsx(ae.StrictMode,{children:y.jsx(rN,{children:y.jsx(N8,{children:y.jsx(T8,{})})})}));